/* XHS Radar Hub — Apple Newsroom Minimalist Gallery × AIHot Information Architecture */

:root {
  --bg: #FFFFFF;
  --sidebar-bg: #FAFAFA;
  --surface: #F5F5F7;
  --surface-2: #ECECF0;
  --ink: #1D1D1F;
  --ink-2: #424245;
  --muted: #6E6E73;
  --subtle: #86868B;
  --line: #E8E8ED;
  --accent: #D92B3A;
  --accent-soft: rgba(217, 43, 58, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --sidebar-w: 212px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  --bg: #0D0D0F;
  --sidebar-bg: #121215;
  --surface: #18181C;
  --surface-2: #222228;
  --ink: #F5F5F7;
  --ink-2: #D1D1D6;
  --muted: #98989D;
  --subtle: #6E6E73;
  --line: #24242A;
  --accent: #FF4557;
  --accent-soft: rgba(255, 69, 87, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }

/* App Shell */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100dvh;
}

/* Fixed Left Sidebar */
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 18px;
}
.brand-mark {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.live-dot.active {
  opacity: 1;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.nav-group { margin-bottom: 18px; }
.nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--subtle);
  padding: 0 10px 6px;
  letter-spacing: 0.04em;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
  margin-bottom: 2px;
}
.nav-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.nav-item.active svg { color: var(--accent); }
.nav-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.env-mini {
  font-size: 11.5px;
  color: var(--subtle);
  padding: 0 6px;
  line-height: 1.45;
}
.foot-actions {
  display: flex;
  gap: 6px;
  padding: 0 4px;
}
.foot-btn {
  flex: 1;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.foot-btn:hover { border-color: var(--ink); color: var(--ink); }

/* Main Viewport */
.main-canvas {
  min-width: 0;
  padding: 32px 44px 96px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .sidebar-top { display: flex; align-items: center; gap: 10px; overflow-x: auto; width: 100%; }
  .brand-lockup { padding: 0 6px 0 0; flex-shrink: 0; }
  .nav-group { display: flex; align-items: center; gap: 4px; margin: 0; }
  .nav-label, .sidebar-foot, .nav-badge { display: none; }
  .nav-item { white-space: nowrap; padding: 6px 10px; margin: 0; }
  .main-canvas { padding: 20px 16px 72px; }
}

.loading-shell {
  padding: 64px 0;
  font-size: 14px;
  color: var(--subtle);
}

/* Top View Header & Controls */
.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.view-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.view-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  max-width: 100%;
}
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  padding: 8px 34px 8px 14px;
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.search-box input:focus {
  border-color: var(--ink);
  background: var(--bg);
}
.search-kbd {
  position: absolute;
  right: 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
  border: 1px solid var(--line);
  padding: 0 5px;
  border-radius: 4px;
  pointer-events: none;
}

/* Filter Pill Rows */
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.pill-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.pill-btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill-btn:hover { color: var(--ink); background: var(--surface-2); }
.pill-btn.active {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.seg-control {
  display: inline-flex;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 2px;
}
.seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.text-action {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.text-action:hover { color: var(--ink); background: var(--surface); }
.text-action.active { color: var(--accent); font-weight: 600; }

/* Spotlight Band (AIHot "当前热点" adapted to Daily Issue) */
.spotlight {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.spotlight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.spotlight-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}
.spotlight-kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.spotlight-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.spotlight-link:hover { color: var(--accent); }
.spotlight-headline {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.spotlight-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
  .spotlight-actions { grid-template-columns: 1fr; gap: 10px; }
}
.spot-act {
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 8px;
  line-height: 1.5;
}
.spot-act b {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-top: 2px;
}

/* Sticky Date-Grouped Feed Timeline */
.day-group { margin-bottom: 36px; }
.day-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.day-header span.sub {
  font-weight: 400;
  color: var(--subtle);
  margin-left: 8px;
}

.feed-row {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  transition: opacity 0.2s ease;
}
.feed-row.is-read { opacity: 0.72; }
.feed-row.is-read:hover { opacity: 1; }
@media (max-width: 680px) {
  .feed-row { grid-template-columns: 1fr; gap: 14px; }
}

.feed-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #141416;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.feed-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.feed-thumb.is-portrait img { object-fit: contain; }
.feed-thumb:hover img { transform: scale(1.03); }
.thumb-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  background: rgba(15, 15, 18, 0.75);
  padding: 2px 6px;
  border-radius: 5px;
}
.thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868B;
  font-size: 12px;
}

.feed-body { min-width: 0; }
.feed-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.feed-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--subtle);
}

/* Clean Typographic Status Indicator (Zero Emojis) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}
.status-pill.is-must { background: var(--accent-soft); color: var(--accent); }
.status-pill.is-must .status-dot { background: var(--accent); }
.status-pill.is-avoid { background: var(--surface); color: var(--muted); }
.status-pill.is-avoid .status-dot {
  background: transparent;
  border: 1.5px solid var(--accent);
}

.icon-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--subtle);
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn.starred { color: var(--accent); }
.icon-btn svg { width: 14px; height: 14px; }

.feed-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.38;
}
.feed-title a:hover { color: var(--accent); }

.feed-sub {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.feed-bullets {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.feed-bullets li {
  position: relative;
  padding-left: 13px;
  font-size: 14px;
  color: var(--ink-2);
}
.feed-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--subtle);
}

.feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.inline-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-tag {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}
.open-detail {
  font-weight: 600;
  color: var(--ink);
}
.open-detail:hover { color: var(--accent); }

/* Cinema Detail & Daily Issue Spread (Apple Newsroom aesthetic) */
.back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.back-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}
.back-link:hover { color: var(--ink); }

.btn-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-pill:hover { border-color: var(--ink); background: var(--surface); }
.btn-pill.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-pill.primary:hover { opacity: 0.9; }
.btn-pill.accent {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.btn-pill.accent:hover { opacity: 0.92; }
.btn-pill:disabled { opacity: 0.45; cursor: not-allowed; }

.story-spread {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
}
.story-spread.no-border { border-top: none; padding-top: 0; }
.story-headline {
  margin: 12px 0 8px;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.28;
  max-width: 820px;
}
.story-sub {
  margin: 0 0 24px;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 780px;
}

.theater {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 860px) {
  .theater { grid-template-columns: 1fr; }
}
.player-frame {
  background: #0B0B0D;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 290px;
  max-height: 450px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.player-frame video, .player-frame img {
  width: 100%;
  height: 100%;
  max-height: 450px;
  object-fit: contain;
  display: block;
}

.chapter-rail {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.rail-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  padding: 0 8px 6px;
  display: flex;
  justify-content: space-between;
}
.chapter-list { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.chapter-btn {
  appearance: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: baseline;
  transition: background 0.15s ease;
}
.chapter-btn:hover { background: color-mix(in srgb, var(--bg) 70%, transparent); }
.chapter-btn.is-active { background: var(--bg); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.chapter-tc {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.chapter-cap { font-size: 13.5px; color: var(--ink); line-height: 1.45; }
.rail-foot {
  font-size: 12px;
  color: var(--subtle);
  padding: 6px 8px 0;
  border-top: 1px solid var(--line);
}

/* Adaptive Keyframe Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.shot { cursor: pointer; display: flex; flex-direction: column; gap: 7px; margin: 0; }
.shot-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #141416;
  border: 1px solid rgba(0, 0, 0, 0.07);
}
.gallery.is-portrait .shot-frame { aspect-ratio: 3 / 4; }
.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery.is-portrait .shot-frame img { object-fit: contain; }
.shot:hover .shot-frame img { transform: scale(1.03); }
.shot-tc {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  background: rgba(15, 15, 18, 0.74);
  padding: 2px 6px;
  border-radius: 5px;
}
.shot-cap { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* 2-col editorial reading strip */
.reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 36px;
}
@media (max-width: 820px) { .reading-grid { grid-template-columns: 1fr; gap: 24px; } }
.col-heading {
  font-size: 12px;
  font-weight: 600;
  color: var(--subtle);
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}
.points {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.points li {
  position: relative;
  padding-left: 15px;
  font-size: 15px;
  color: var(--ink);
}
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.screen-note {
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 16px;
}
.screen-note strong { color: var(--ink); margin-right: 6px; }
details.steps-toggle summary {
  list-style: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 4px 0;
}
details.steps-toggle summary::-webkit-details-marker { display: none; }
details.steps-toggle summary::before { content: "+ "; font-family: var(--font-mono); color: var(--accent); }
details.steps-toggle[open] summary::before { content: "− "; }
.steps-list {
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-col {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
@media (max-width: 820px) {
  .side-col { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 20px; }
}
.resource-row { font-size: 13.5px; margin-bottom: 8px; }
.resource-name { font-weight: 600; color: var(--ink); }
.resource-detail { color: var(--muted); margin-left: 6px; }
.quote-item {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  padding-left: 12px;
  border-left: 2px solid var(--line);
}

/* Topics, Resources & Workbench Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 780px) { .grid-2 { grid-template-columns: 1fr; } }

.panel-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}
.panel-card p.hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.topic-card {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.topic-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.topic-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.topic-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.resource-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}
@media (max-width: 780px) {
  .resource-item { grid-template-columns: 1fr; gap: 8px; }
}
.res-title-col { display: flex; flex-direction: column; gap: 4px; }
.res-name { font-size: 15.5px; font-weight: 650; color: var(--ink); }
.res-cat { font-size: 12px; color: var(--subtle); }
.res-desc { font-size: 14px; color: var(--ink-2); }
.res-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.res-video-link {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.res-video-link:hover { color: var(--accent); }
.res-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
  white-space: nowrap;
}

/* Workbench Forms & Live Log Terminal */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.form-input, .form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  outline: none;
}
.form-textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-input:focus, .form-textarea:focus { border-color: var(--ink); }

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
}
.check-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.log-box {
  background: #111114;
  color: #E5E5EA;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 10px;
}

.job-queue {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.job-row {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.job-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.job-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.job-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.job-latest {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
}
.job-status.running { background: var(--accent-soft); color: var(--accent); }
.job-status.queued { background: var(--surface-2); color: var(--ink-2); }
.job-status.succeeded { background: var(--surface); color: var(--ink); }
.job-status.failed { background: var(--accent-soft); color: var(--accent); }
.job-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.clean-table th, .clean-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.clean-table th { font-size: 12px; color: var(--subtle); font-weight: 600; }

.code-block {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  overflow-x: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 12, 14, 0.90);
  backdrop-filter: blur(22px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.lightbox.open { display: flex; }
.lb-dialog { width: 100%; max-width: 1040px; display: flex; flex-direction: column; gap: 16px; }
.lb-stage { display: flex; align-items: center; justify-content: center; max-height: 76vh; }
.lb-stage img {
  max-width: 100%;
  max-height: 76vh;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: #F5F5F7;
}
.lb-caption { font-size: 14.5px; color: #E5E5EA; }
.lb-tc { font-family: var(--font-mono); color: #FF6B78; margin-right: 10px; font-weight: 600; }
.lb-controls { display: flex; gap: 8px; }
.lb-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb-btn.primary { background: var(--accent); border-color: var(--accent); }

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* v2: Quick Paste Strip on Curated Feed */
.quick-paste-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 10px 8px 16px;
  margin-bottom: 18px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quick-paste-bar:focus-within {
  border-color: var(--ink);
  background: var(--bg);
}
.quick-paste-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
}
.quick-paste-bar input::placeholder { color: var(--subtle); }
.quick-queue-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .quick-paste-bar { flex-wrap: wrap; padding: 10px 12px; }
  .quick-paste-bar input { width: 100%; }
}

/* v2: Author Follow Pill */
.follow-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.follow-btn:hover { border-color: var(--ink); color: var(--ink); }
.follow-btn.is-following {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

/* v2: Detail Personal Note & Ask Video */
.detail-module {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 28px;
}
.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.module-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.note-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.note-box textarea {
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  resize: vertical;
  outline: none;
}
.note-box textarea:focus { border-color: var(--ink); }
.note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--subtle);
}

.ask-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ask-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ask-chip:hover { border-color: var(--ink); color: var(--ink); }
.ask-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ask-input-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  outline: none;
}
.ask-input-row input:focus { border-color: var(--ink); }
.qa-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qa-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.qa-q-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.qa-q {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
}
.qa-a {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}
.qa-a p { margin: 0 0 8px; }
.qa-a p:last-child { margin-bottom: 0; }
.qa-a ul, .qa-a ol { margin: 4px 0 8px; padding-left: 20px; }
.qa-a code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
}
.qa-a pre {
  background: #111114;
  color: #E5E5EA;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 8px 0;
}
.qa-a pre code { background: transparent; padding: 0; color: inherit; }
.qa-meta {
  font-size: 11.5px;
  color: var(--subtle);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* v2: Topic Synthesis Banner */
.synthesis-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.topic-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.topic-syn-preview {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  line-height: 1.45;
}

/* v2: Mobile Touch Refinements */
@media (max-width: 640px) {
  .view-title { font-size: 23px; }
  .search-box { width: 100%; }
  .ask-input-row { flex-direction: column; align-items: stretch; }
  .back-bar { flex-wrap: wrap; gap: 10px; }
}
