:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #111827;
  --muted: #64748b;
  --line: #d8e0ea;
  --blue: #2563eb;
  --green: #0f9f6e;
  --amber: #b7791f;
  --red: #d14343;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  /* Fancy accent gradient (indigo -> violet -> teal) */
  --grad-a: #4f46e5;
  --grad-b: #7c3aed;
  --grad-c: #0ea5a4;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  /* clip (not hidden) so it doesn't become a scroll container and break sticky sidebars */
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 247, 251, 0.94)),
    radial-gradient(circle at 12% -2%, rgba(79, 70, 229, 0.14), transparent 34%),
    radial-gradient(circle at 82% 4%, rgba(124, 58, 237, 0.13), transparent 30%),
    radial-gradient(circle at 98% 22%, rgba(14, 165, 164, 0.12), transparent 26%),
    var(--bg);
  color: var(--ink);
  font-family:
    Pretendard,
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: clip;
}

body.is-locked main,
body.is-locked .topbar {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.tab,
.feedback-nav,
.vote-button,
.comment-toggle,
.action-row a,
.save-button {
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.tab:hover {
  border-color: rgba(37, 99, 235, 0.42);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(216, 224, 234, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--grad-a), var(--grad-b), var(--grad-c), var(--grad-a));
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.topnav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.topnav a:hover {
  color: var(--ink);
}

main {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 32px) 32px;
}

.hero {
  padding: 22px 0 12px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  background: linear-gradient(115deg, #1f2937 6%, var(--grad-a) 48%, var(--grad-b) 78%, var(--grad-c));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow-wrap: anywhere;
}

.hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #475569;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 5px 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 720;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-stats:empty {
  display: none;
}

.hero-stats::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 159, 110, 0.18);
}

.board-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.controls {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 92px);
  margin-top: 10px;
  padding: 10px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 2;
}

.search-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 40px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-row {
  display: grid;
  gap: 6px;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px 0 11px;
  color: #334155;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.tab-count {
  min-width: 20px;
  padding: 1px 7px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 760;
  text-align: center;
}

.tab[aria-pressed="true"] {
  color: white;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

.tab[aria-pressed="true"] .tab-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.sort-panel {
  display: grid;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.sort-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.sort-field select {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  color: #1e293b;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.sort-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.member-panel {
  display: grid;
  gap: 5px;
  padding-top: 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 720;
}

.member-panel strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.member-panel button {
  min-height: 30px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.feedback-nav {
  min-height: 34px;
  padding: 0 10px;
  color: #334155;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-weight: 720;
}

.feedback-nav[aria-pressed="true"] {
  color: white;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}

.feed-board {
  display: grid;
  grid-column: 2;
  gap: 12px;
  margin-top: 10px;
}

.feed-board[hidden] {
  display: none;
}

/* X home feed */
.feed-updated {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.feed-list {
  display: grid;
  gap: 10px;
}

.x-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.x-chip {
  padding: 5px 11px;
  color: #334155;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  transition:
    color 0.14s ease,
    background-color 0.14s ease,
    border-color 0.14s ease;
}

.x-chip:hover {
  border-color: rgba(79, 70, 229, 0.4);
}

.x-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  border-color: transparent;
}

.x-embed {
  min-height: 200px;
}

.x-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  align-items: start;
  gap: 12px;
}

.x-wall .twitter-timeline {
  display: block;
}

.feed-empty,
.feed-empty-card {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
}

.feed-empty-card p {
  margin: 0 0 8px;
}

.feed-empty-card strong {
  color: var(--ink);
}

.feed-empty-hint code {
  padding: 1px 6px;
  background: var(--surface-2);
  border-radius: 5px;
  font-size: 12px;
}

.feed-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.feed-item:hover {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.feed-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.feed-avatar-blank {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  font-weight: 800;
}

.feed-id {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.feed-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-verified {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: #1d9bf0;
}

.feed-handle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.feed-time {
  margin-left: auto;
  align-self: flex-start;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.feed-text {
  margin: 0;
  color: #1f2937;
  font-size: 14.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.feed-text a {
  color: var(--blue);
}

.feed-text a:hover {
  text-decoration: underline;
}

.feed-media {
  display: grid;
  gap: 3px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.feed-media.is-grid {
  grid-template-columns: 1fr 1fr;
}

.feed-media-item {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}

.feed-media.is-grid .feed-media-item {
  aspect-ratio: 1 / 1;
}

.feed-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  background: rgba(15, 23, 42, 0.18);
}

.feed-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feed-links a {
  padding: 3px 9px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 680;
}

.feed-tag {
  padding: 3px 9px;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.feed-metrics {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.feed-metrics a {
  margin-left: auto;
  color: var(--blue);
}

.feed-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 720;
}

.feed-pager > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-pager button {
  min-height: 30px;
  padding: 0 12px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.feed-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.feed-pager strong {
  color: #334155;
}

.feedback-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feedback-board-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.feedback-board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feedback-board-actions button {
  min-height: 28px;
  padding: 0 8px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.comment-item .item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  color: inherit;
}

.comment-item .item-actions button {
  min-height: 24px;
  padding: 0 7px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11px;
  font-weight: 720;
}

.comment-item .item-actions button:hover {
  border-color: var(--blue);
}

.paper-grid {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.paper-grid[hidden] {
  display: none;
}

.pagination {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pagination[hidden] {
  display: none;
}

.page-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.page-actions button {
  min-width: 32px;
  min-height: 30px;
  padding: 0 8px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.page-actions button[aria-current="page"] {
  color: white;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  border-color: transparent;
}

.page-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.page-gap {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
}

.paper-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 72px;
  column-gap: 22px;
  align-items: start;
  padding: 24px 6px;
  border-top: 1px solid var(--line);
}

.paper-grid > .paper-row:first-child {
  border-top: none;
}

.paper-row.is-saved {
  background: linear-gradient(90deg, rgba(183, 121, 31, 0.06), transparent 42%);
}

/* Thumbnail */
.row-thumb-link {
  display: block;
}

.row-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.row-thumb-link:hover .row-thumb {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.thumb-card {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 11px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 80% -10%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(155deg, var(--accent, #64748b), color-mix(in srgb, var(--accent, #64748b) 55%, #0f172a));
}

.thumb-card-cat {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.thumb-card-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: none;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}

.row-thumb.is-fallback img {
  display: none;
}

.row-thumb.is-fallback .thumb-card {
  display: flex;
}

/* Main column */
.row-main {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}

.paper-row h3 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: #161b22;
  overflow-wrap: anywhere;
}

.paper-row h3 a:hover {
  color: var(--blue);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #5b6b7f;
  font-size: 13px;
}

.byline i {
  font-style: normal;
  color: #c0cbd8;
}

.summary {
  margin: 0;
  color: #44505f;
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px 0 9px;
  color: #1f2a37;
  background: color-mix(in srgb, var(--accent, #64748b) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, #64748b) 26%, transparent);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.category-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #64748b);
}

.tag,
.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 680;
}

.tag {
  color: #475569;
  background: transparent;
  border: 1px solid var(--line);
}

/* Right rail */
.row-meta {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 12px;
}

.score-metric {
  display: grid;
  justify-items: center;
  gap: 1px;
  line-height: 1;
}

.score-metric strong {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.score-metric span {
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-c));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.save-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #64748b;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    color 0.14s ease,
    background-color 0.14s ease,
    border-color 0.14s ease;
}

.save-button:hover {
  transform: translateY(-1px);
  color: var(--amber);
  border-color: rgba(183, 121, 31, 0.5);
}

.save-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
}

.save-button[aria-pressed="true"] {
  color: #fff;
  background: var(--amber);
  border-color: var(--amber);
}

.save-button[aria-pressed="true"] svg {
  fill: currentColor;
}

.vote-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 8px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.comment-toggle {
  min-height: 28px;
  padding: 5px 8px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.comment-toggle[aria-expanded="true"] {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.08);
}

.comment-toggle strong {
  font-weight: 820;
}

.vote-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
}

.vote-button[aria-pressed="true"] {
  color: #0f513f;
  background: rgba(15, 159, 110, 0.12);
  border-color: rgba(15, 159, 110, 0.25);
}

.vote-button strong {
  font-weight: 820;
}

.action-row a {
  min-height: 28px;
  padding: 5px 8px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 720;
}

.action-row a:hover {
  border-color: var(--blue);
}

.comment-panel {
  display: grid;
  gap: 8px;
  margin-top: 3px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

.comment-form textarea {
  width: 100%;
  min-height: 44px;
  resize: vertical;
  padding: 7px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  font-size: 12px;
  line-height: 1.35;
}

.comment-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form button {
  min-height: 30px;
  padding: 0 9px;
  color: #1e293b;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}

.comment-list {
  display: grid;
  gap: 6px;
}

.comment-item {
  display: grid;
  gap: 4px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid rgba(216, 224, 234, 0.8);
  border-radius: var(--radius);
}

.comment-item p,
.comment-empty {
  margin: 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.comment-item div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.comment-item strong {
  color: #1e293b;
}

.comment-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.comment-pager div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-pager button {
  min-height: 26px;
  padding: 0 8px;
  color: #334155;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11px;
  font-weight: 720;
}

.comment-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.comment-pager strong {
  color: #334155;
}

.empty {
  grid-column: 1 / -1;
  padding: 32px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.aidas-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
}

.aidas-gate[hidden] {
  display: none;
}

.gate-panel {
  display: grid;
  width: min(360px, 100%);
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gate-panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.gate-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.gate-panel input {
  height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.gate-panel input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.gate-panel button {
  min-height: 38px;
  color: white;
  background: #111827;
  border: 1px solid #111827;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 760;
}

.gate-error {
  min-height: 16px;
  margin: 0;
  color: var(--red);
  font-size: 12px;
}

@media (max-width: 1040px) {
  .board-shell {
    display: block;
  }

  .controls {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .tab {
    text-align: center;
  }

  .sort-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-panel {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .member-panel span {
    grid-column: 1 / -1;
  }

  .feedback-nav {
    text-align: center;
  }

  .feedback-board-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .feed-board {
    grid-column: auto;
  }

  .pagination {
    grid-column: auto;
  }

}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .topnav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    padding-top: 24px;
  }

  .hero h1 {
    max-width: calc(100vw - 40px);
    font-size: 31px;
    line-height: 1.08;
  }

  .hero p,
  .controls {
    max-width: calc(100vw - 40px);
  }

  .sort-panel {
    grid-template-columns: 1fr;
  }

  .paper-row {
    grid-template-columns: 84px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px 2px;
  }

  .row-meta {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 14px;
    margin-top: 2px;
  }

  .score-metric {
    grid-auto-flow: column;
    align-items: baseline;
    gap: 5px;
  }

  .paper-row h3 {
    font-size: 18px;
  }

  .summary {
    font-size: 13px;
  }
}
