:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #0f172a;
  --ink-secondary: #475569;
  --ink-muted: #64748b;
  --indigo: #4338ca;
  --indigo-soft: #eef2ff;
  --indigo-border: #c7d2fe;
  --violet: #6d28d9;
  --violet-soft: #f5f3ff;
  --violet-border: #ddd6fe;
  --teal: #0f766e;
  --teal-soft: #f0fdfa;
  --teal-border: #99f6e4;
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --emerald-border: #a7f3d0;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --rose: #e11d48;
  --rose-soft: #fff1f2;
  --sky: #0284c7;
  --sky-soft: #f0f9ff;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.06);
  --shadow-drawer: -8px 0 32px rgba(15, 23, 42, 0.14);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

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

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open {
  overflow: hidden;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sticky Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #059669 100%);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(67, 56, 202, 0.2);
}

.brand-text h1 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.brand-text p {
  margin: 1px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  font-size: 11.5px;
  font-weight: 600;
  color: #065f46;
}

.live-pill.stale {
  background: var(--amber-soft);
  border-color: var(--amber-border);
  color: #92400e;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-dot 2.2s infinite;
}

.live-pill.stale .live-dot {
  background: var(--amber);
  animation: none;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.live-sep { opacity: 0.45; }
.live-time { font-weight: 500; font-variant-numeric: tabular-nums; }

.visits-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.visits-count {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.visits-label {
  font-weight: 500;
  color: var(--ink-muted);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  border-color: var(--border-strong);
  color: var(--ink);
  background: var(--surface-subtle);
}

.btn-icon.spinning svg { animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.lang-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn.active {
  background: var(--surface);
  color: var(--indigo);
  box-shadow: var(--shadow-sm);
}

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--indigo);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-primary-sm:hover { background: #3730a3; }

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-discord {
  background: #5865F2;
  border-color: #5865F2;
  color: #fff;
}

.btn-discord:hover {
  background: #4752C4;
  border-color: #4752C4;
}

.btn-feishu {
  background: #1456F0;
  border-color: #1456F0;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.btn-feishu:hover {
  background: #0f44c4;
  border-color: #0f44c4;
}

.btn-x {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.btn-x:hover {
  background: #1e293b;
  border-color: #1e293b;
}

.community-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.community-cta-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.community-cta-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.community-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.community-pill-discord {
  background: #5865F2;
  color: #fff;
}

.community-pill-discord:hover {
  background: #4752C4;
}

.community-pill-feishu {
  background: #1456F0;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.community-pill-feishu:hover {
  background: #0f44c4;
}

.qr-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 90;
}

.qr-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 28px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
  z-index: 95;
  overflow: hidden;
}

.qr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.qr-modal-header h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.qr-modal-body {
  padding: 16px;
  text-align: center;
}

.qr-modal-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto 12px;
  border: 1px solid var(--border);
}

.qr-modal-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

.community-pill-x {
  background: #0f172a;
  color: #fff;
}

.community-pill-x:hover {
  background: #1e293b;
}

.community-pill-gh {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink);
}

.community-pill-gh:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

/* Error Banner */
.error-banner {
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: var(--rose-soft);
  border: 1px solid #fecdd3;
  color: #9f1239;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.btn-retry {
  border: 1px solid #fda4af;
  background: #fff;
  color: #9f1239;
  border-radius: 7px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Main Content */
.main-content {
  padding-top: 18px;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 4px;
}

/* Public Scope & Audit Notice Banner */
.notice-card {
  padding: 15px 20px;
  background: linear-gradient(135deg, #fffdf7 0%, #fffbeb 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid #d97706;
}

.notice-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  white-space: nowrap;
}

.notice-heading {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.3;
  color: #78350f;
}

.notice-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.6px;
  line-height: 1.54;
  color: #451a03;
}

.ar-scope-note {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 3px solid #d97706;
  font-size: 12px;
  line-height: 1.48;
  color: #78350f;
  font-weight: 600;
}

/* Intro Banner */
.intro-card {
  padding: 20px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8faff 55%, #f2fdf8 100%);
  border: 1px solid #dbe4f3;
}

.intro-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.intro-copy {
  flex: 1 1 560px;
  min-width: 0;
}

.intro-heading {
  margin: 0 0 7px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.25;
}

.intro-lead {
  margin: 0;
  font-size: 13.8px;
  line-height: 1.62;
  color: var(--ink-secondary);
  max-width: 820px;
}

.intro-summary-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
}

.summary-chip {
  padding: 9px 13px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbe4f3;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-chip-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}

.summary-chip-val {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--indigo);
}

.summary-chip-clean {
  color: var(--emerald);
  font-size: 13px;
}

.summary-chip-sub {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.35;
  margin-top: 2px;
}

.intro-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(203, 213, 225, 0.7);
}

.intro-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.2px;
  color: var(--ink-secondary);
}

.intro-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-emerald { background: var(--emerald); }
.dot-indigo { background: var(--indigo); }
.dot-violet { background: var(--violet); }

/* Section Card */
.section-card { padding: 20px 24px; }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.section-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  max-width: 820px;
}

/* Badges & Tags */
.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.tag-indigo { background: var(--indigo-soft); color: var(--indigo); }
.tag-emerald { background: var(--emerald-soft); color: #065f46; }
.tag-amber { background: var(--amber-soft); color: #92400e; }
.tag-sky { background: var(--sky-soft); color: #0369a1; }

.badge-model {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--violet-soft);
  color: var(--violet);
  border: 1px solid var(--violet-border);
  white-space: nowrap;
}

.badge-harness {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--teal);
  border: 1px solid var(--teal-border);
  white-space: nowrap;
}

.badge-glyph { font-size: 10px; opacity: 0.85; }

.tier-filter-pills {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.14s ease;
}

.pill-btn:hover {
  border-color: var(--indigo-border);
  color: var(--indigo);
}

.pill-btn.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}

/* STAR SECTION: Substantive Techniques Grid & Cards */
.techniques-section {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-md);
  border-color: #d8e2f0;
}

.techniques-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.technique-card {
  position: relative;
  border: 1px solid #dbe4f0;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 11px;
  cursor: pointer;
  transition: all 0.16s ease;
  border-top: 3px solid var(--indigo);
}

.technique-card.is-core {
  border-top-color: var(--emerald);
}

.technique-card.is-main {
  border-top-color: var(--amber);
}

.technique-card:hover {
  border-color: var(--indigo);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.technique-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.technique-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.technique-why-box {
  background: #f8fafc;
  border: 1px solid #e7edf5;
  border-left: 3px solid var(--emerald);
  border-radius: 9px;
  padding: 11px 13px;
}

.technique-why-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #047857;
  margin-bottom: 4px;
}

.technique-why-text {
  margin: 0;
  font-size: 13.2px;
  line-height: 1.6;
  color: #1e293b;
}

.technique-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.signal-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.technique-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.technique-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.technique-author {
  font-weight: 700;
  color: var(--ink);
}

.technique-metric-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

/* AutoResearch Frontier Chart */
.autoresearch-hero {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-md);
  border-color: #d8e2f0;
  border-top: 3px solid var(--emerald);
}

.ar-mobile-milestones {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
}

.ar-ms-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 9px;
}

.ar-ms-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.ar-ms-hint {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.ar-ms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ar-ms-item {
  width: 100%;
  text-align: left;
  border: 1px solid #dbe4f0;
  border-left: 3px solid var(--emerald);
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
}

.ar-ms-item:active {
  background: var(--indigo-soft);
  border-color: var(--indigo);
}

.ar-ms-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ar-ms-method {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--ink);
}

.ar-ms-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.ar-ms-arrow {
  color: var(--indigo);
  font-weight: 700;
}

/* Artificial Analysis–Style Model & Agent Harness Benchmark */
.aa-section {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border-color: #d8e2f0;
  border-top: 3px solid var(--indigo);
}

.aa-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.aa-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aa-control-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.aa-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.aa-seg-btn {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.aa-seg-btn:hover { color: var(--indigo); }
.aa-seg-btn.active {
  background: var(--indigo);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.aa-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.aa-bar-row {
  width: 100%;
  text-align: left;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.aa-bar-row:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow-sm);
}

.aa-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.aa-bar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.aa-rank {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-muted);
  min-width: 24px;
}

.aa-prov-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.aa-prov-anthropic { background: #ea580c; }
.aa-prov-openai { background: #059669; }
.aa-prov-google { background: #4f46e5; }
.aa-prov-deepseek { background: #0284c7; }
.aa-prov-zhipu { background: #7c3aed; }
.aa-prov-xai { background: #334155; }
.aa-prov-other { background: #64748b; }

.aa-entity-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.aa-entity-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.aa-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.aa-bar-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.aa-bar-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  min-width: 56px;
  text-align: right;
}

.aa-bar-track {
  height: 9px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.aa-bar-fill {
  height: 100%;
  border-radius: 999px;
  opacity: 0.88;
  transition: width 0.4s ease;
}

.aa-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.aa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.aa-table th {
  text-align: left;
  padding: 9px 10px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.aa-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.aa-table tbody tr:last-child td { border-bottom: none; }
.aa-tbl-row { cursor: pointer; transition: background 0.12s ease; }
.aa-tbl-row:hover { background: var(--indigo-soft); }
.aa-tbl-entity-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.aa-td-num, .aa-td-runs, .aa-td-authors { text-align: right; white-space: nowrap; }
.aa-table th.aa-col-active { color: var(--indigo); background: var(--indigo-soft); }
.aa-table td.aa-col-active { font-weight: 800; color: var(--indigo); background: rgba(238, 242, 255, 0.55); }

.aa-footnote {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.select-input {
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-family: var(--font-sans);
}

.ar-select { min-width: 260px; max-width: 380px; font-weight: 600; }

.select-input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.12);
}

.metric-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
}

.metric-toggle-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
}

.metric-toggle-btn.active {
  background: var(--surface);
  color: var(--emerald);
  box-shadow: var(--shadow-sm);
}

.ar-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ar-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.ar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.ar-dot-discarded { background: #94a3b8; opacity: 0.65; }
.ar-dot-kept { background: #059669; box-shadow: 0 0 0 2px #d1fae5; }
.ar-line-swatch { width: 20px; height: 3px; border-radius: 2px; background: #059669; display: inline-block; }

.ar-stats-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--ink-secondary);
}

.ar-plot-frame {
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fcfdff;
  padding: 8px 6px 4px;
  overflow: visible;
}

.ar-chart-container {
  width: 100%;
  min-height: 290px;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.ar-point-hit { cursor: pointer; }

.ar-tooltip {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  min-width: 240px;
  max-width: 340px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.ar-tt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; margin-bottom: 4px; }
.ar-tt-status { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.ar-tt-status.kept { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; }
.ar-tt-status.discarded { background: rgba(148, 163, 184, 0.22); color: #cbd5e1; }
.ar-tt-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0; }
.ar-tt-badge-m { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: rgba(139, 92, 246, 0.25); color: #ddd6fe; font-weight: 600; }
.ar-tt-badge-h { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: rgba(20, 184, 166, 0.25); color: #99f6e4; font-weight: 600; }
.ar-tt-metrics { font-family: var(--font-mono); font-size: 11px; color: #e2e8f0; margin: 4px 0; }
.ar-tt-method { font-size: 11.5px; color: #cbd5e1; margin-top: 4px; border-top: 1px solid rgba(148, 163, 184, 0.2); padding-top: 4px; }

/* Core Theorems Grid */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.challenge-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 17px 18px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.challenge-card:hover {
  border-color: var(--indigo);
  box-shadow: var(--shadow-md);
}

.challenge-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.challenge-card-title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.challenge-pct-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--emerald);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  padding: 3px 9px;
  border-radius: 8px;
  flex-shrink: 0;
}

.challenge-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.54;
}

.math-statement {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.48;
  padding: 8px 11px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--indigo);
  color: #1e293b;
  overflow-x: auto;
}

.challenge-role-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  align-self: flex-start;
}

.challenge-role-toggle:hover { color: var(--indigo); }

.challenge-role-box {
  font-size: 12px;
  color: var(--ink-secondary);
  background: #fbfdff;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 9px 11px;
  line-height: 1.5;
}

.challenge-role-entry {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-muted);
}

.progress-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #059669 60%, #4f46e5 100%);
  transition: width 0.5s ease;
}

.challenge-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.challenge-leader-strip {
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.challenge-leader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.insight-text {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.48;
}

.challenge-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  margin-top: auto;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--indigo);
  cursor: pointer;
  text-decoration: none;
}

.link-btn:hover { text-decoration: underline; }

/* Detail Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  z-index: 90;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: min(840px, 100vw);
  background: var(--surface);
  z-index: 100;
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
}

.drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.drawer-header h3 { margin: 0; font-size: 17.5px; font-weight: 800; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--surface-subtle);
}

.drawer-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-banner {
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.audit-banner.clean { background: var(--emerald-soft); border: 1px solid var(--emerald-border); color: #065f46; }
.audit-banner.info { background: var(--sky-soft); border: 1px solid #bae6fd; color: #075985; }
.audit-banner.warn { background: var(--amber-soft); border: 1px solid var(--amber-border); color: #92400e; }

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.kv-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.kv-label { font-size: 11px; color: var(--ink-muted); }
.kv-val { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-top: 2px; }

.lemma-list { display: flex; flex-wrap: wrap; gap: 4px; }
.lemma-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.tactic-bars { display: flex; flex-direction: column; gap: 6px; }
.tactic-row {
  display: grid;
  grid-template-columns: 110px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.tactic-track { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.tactic-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #059669); }

.drawer-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.drawer-table th, .drawer-table td { padding: 7px 6px; text-align: left; border-bottom: 1px solid var(--border); }
.drawer-table tr.clickable-row { cursor: pointer; }
.drawer-table tr.clickable-row:hover { background: var(--indigo-soft); }
.drawer-table tr.selected-row { background: #eef2ff; font-weight: 600; }

/* Drawer Summary Strip & Tabs */
.drawer-compact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f8faff 0%, #f2fdf8 100%);
  border: 1px solid #dbe4f3;
}

.drawer-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.drawer-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  border-radius: 9px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.drawer-tab-btn:hover {
  border-color: var(--indigo-border);
  color: var(--indigo);
  background: var(--indigo-soft);
}

.drawer-tab-btn.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.drawer-tab-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
}

.drawer-tab-btn.active .drawer-tab-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Paper-Style Mathematical Derivation (Markdown + KaTeX) */
.paper-card {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}

.paper-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.paper-card-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}

.paper-derivation {
  font-size: 14px;
  line-height: 1.72;
  color: #1e293b;
}

.paper-derivation h3 {
  margin: 18px 0 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--indigo);
  letter-spacing: -0.01em;
  padding-bottom: 4px;
  border-bottom: 1px dashed #e2e8f0;
}

.paper-derivation h3:first-child {
  margin-top: 0;
}

.paper-derivation h4 {
  margin: 14px 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.paper-derivation p {
  margin: 0 0 11px;
}

.paper-derivation ul, .paper-derivation ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.paper-derivation li {
  margin-bottom: 6px;
}

.paper-derivation blockquote {
  margin: 10px 0 12px;
  padding: 9px 13px;
  border-left: 3px solid var(--indigo);
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  color: var(--ink-secondary);
  font-size: 13px;
}

.paper-derivation code {
  font-family: var(--font-mono);
  font-size: 12.2px;
  background: #f1f5f9;
  color: #1e293b;
  padding: 1.5px 5px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.paper-derivation pre {
  margin: 10px 0 12px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

.paper-derivation pre code {
  background: transparent;
  color: inherit;
  border: none;
  padding: 0;
}

.paper-derivation .katex-display {
  margin: 12px 0;
  padding: 10px 14px;
  background: #fbfdff;
  border: 1px solid #e6edf6;
  border-radius: 9px;
  overflow-x: auto;
  overflow-y: hidden;
}

.math-fallback {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--indigo);
  background: var(--indigo-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.math-fallback-block {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--indigo);
  background: #fbfdff;
  border: 1px solid #dbe4f3;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  overflow-x: auto;
}

/* Unified Lean 4 Code Diff Viewer */
.diff-panel {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.diff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.diff-summary-text {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.diff-stats-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.diff-stat-add {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 7px;
  border-radius: 6px;
}

.diff-stat-del {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 2px 7px;
  border-radius: 6px;
}

.btn-copy-diff {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-copy-diff:hover {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-soft);
}

.diff-file-bar {
  padding: 8px 14px;
  background: #fbfdff;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--ink-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.diff-code {
  margin: 0;
  padding: 8px 0;
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.52;
  background: #ffffff;
}

.diff-line {
  display: block;
  padding: 0 14px;
  white-space: pre;
  min-width: max-content;
}

.diff-line.diff-meta {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding-top: 3px;
  padding-bottom: 3px;
}

.diff-line.diff-hunk {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
  padding-top: 2px;
  padding-bottom: 2px;
}

.diff-line.diff-add {
  background: #ecfdf5;
  color: #065f46;
}

.diff-line.diff-del {
  background: #fff1f2;
  color: #9f1239;
}

.diff-line.diff-ctx {
  color: #475569;
}

.diff-trunc-note {
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--ink-muted);
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

.tech-pill-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo);
  border: 1px solid var(--indigo-border);
}

/* Toast */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  border-left: 3px solid #10b981;
  max-width: 340px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.empty-cell {
  text-align: center;
  padding: 24px !important;
  color: var(--ink-muted);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 960px) {
  .techniques-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar-inner { gap: 10px; }
  .challenge-grid { grid-template-columns: minmax(0, 1fr); }
  .ar-select { min-width: 200px; max-width: 100%; }
}

@media (max-width: 640px) {
  .container { padding: 0 12px; }

  .topbar { position: relative; }
  .topbar-inner { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .brand { width: 100%; gap: 9px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 18px; }
  .brand-text h1 { font-size: 14px; line-height: 1.25; }
  .brand-text p { display: none; }
  .topbar-controls { width: 100%; justify-content: space-between; gap: 6px; }
  .live-pill { padding: 4px 8px; font-size: 11px; min-height: 34px; }
  .visits-pill { padding: 4px 8px; font-size: 11px; min-height: 34px; }
  .btn-icon { width: 34px; height: 34px; }
  .lang-btn { padding: 5px 9px; min-height: 30px; }
  .btn-social { padding: 6px 9px; min-height: 34px; font-size: 12px; }
  .btn-primary-sm { padding: 6px 10px; min-height: 34px; font-size: 12px; }
  .community-cta-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .community-cta-actions { width: 100%; }
  .community-pill { font-size: 12px; padding: 6px 11px; }

  .main-content { padding-top: 12px; padding-bottom: 32px; gap: 12px; }
  .section-card, .intro-card, .notice-card { padding: 14px; border-radius: 13px; }
  .notice-heading { font-size: 14px; }
  .notice-list { font-size: 12px; line-height: 1.5; padding-left: 16px; gap: 6px; }
  .ar-scope-note { font-size: 11.5px; padding: 7px 10px; }
  .section-header { gap: 10px; margin-bottom: 12px; }
  .section-header h2 { font-size: 16px; line-height: 1.3; }
  .section-desc { font-size: 12.5px; line-height: 1.5; }

  .intro-top { gap: 12px; }
  .intro-copy { flex: 1 1 100%; }
  .intro-heading { font-size: 17.5px; margin-bottom: 5px; }
  .intro-lead { font-size: 12.8px; line-height: 1.54; }
  .intro-summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    gap: 8px;
  }
  .summary-chip { padding: 8px 10px; }
  .summary-chip-val { font-size: 13px; }
  .intro-pillars { gap: 6px; margin-top: 10px; padding-top: 9px; }
  .intro-pill-item { font-size: 11.8px; align-items: flex-start; }
  .intro-pill-dot { margin-top: 5px; }

  .toolbar { width: 100%; flex-direction: column; align-items: stretch; gap: 8px; }
  .ar-select { width: 100%; min-width: 0; max-width: 100%; height: 38px; font-size: 13px; }
  .metric-toggle { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .metric-toggle-btn { padding: 7px 8px; font-size: 12.5px; }
  .ar-meta-bar { gap: 8px; }
  .ar-legend { gap: 8px 12px; font-size: 11.5px; }
  .ar-stats-pill { width: 100%; text-align: center; font-size: 11px; white-space: normal; }
  .ar-plot-frame { padding: 6px 4px 2px; }
  .ar-chart-container { min-height: 0; }

  .tier-filter-pills {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .pill-btn { flex-shrink: 0; padding: 6px 12px; }

  .techniques-grid,
  .challenge-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .technique-card, .challenge-card { padding: 14px; gap: 9px; }
  .technique-title, .challenge-card-title { font-size: 15px; }
  .technique-why-box { padding: 9px 11px; }
  .technique-why-text { font-size: 12.8px; line-height: 1.52; }
  .tag, .badge-model, .badge-harness, .signal-chip, .lemma-chip, .technique-metric-note {
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
  }
  .technique-footer, .challenge-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .link-btn { padding: 4px 0; font-size: 12.5px; }
  .math-statement { font-size: 11px; padding: 7px 9px; }

  .drawer-header { padding: 12px 14px; }
  .drawer-header h3 { font-size: 15.5px; }
  .drawer-body {
    padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }
  .drawer-section { padding: 12px; }
  .drawer-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .drawer-tab-btn { flex-shrink: 0; padding: 7px 11px; font-size: 12px; }
  .paper-card { padding: 14px; }
  .paper-card-header { flex-direction: column; gap: 6px; }
  .paper-derivation { font-size: 13.5px; line-height: 1.65; overflow-wrap: anywhere; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tactic-row { grid-template-columns: 82px 1fr 34px; gap: 8px; }
  .diff-code { font-size: 11px; max-height: 55dvh; }

  .drawer-table tbody { display: block; width: 100%; }
  .drawer-table tr {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
  }
  .drawer-table td {
    display: block;
    padding: 0;
    border: none;
  }

  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .footer { padding: 14px 0; }

  .aa-controls { padding: 9px 10px; gap: 8px; }
  .aa-control-group { width: 100%; flex-direction: column; align-items: stretch; gap: 4px; }
  .aa-seg { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .aa-seg-btn { flex: 1 0 auto; text-align: center; padding: 6px 9px; font-size: 11.5px; }
  .aa-bar-row { padding: 9px 10px; }
  .aa-bar-right { width: 100%; justify-content: space-between; margin-left: 0; }
  .aa-bar-meta { font-size: 11px; }
  .aa-table-wrap { border: none; overflow: visible; }
  .aa-table thead { display: none; }
  .aa-table, .aa-table tbody { display: block; width: 100%; }
  .aa-table tbody { display: flex; flex-direction: column; gap: 8px; }
  .aa-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
  }
  .aa-table td { border: none; padding: 0; text-align: left; }
  .aa-table td.aa-td-rank { display: none; }
  .aa-table td.aa-td-entity, .aa-table td.aa-td-cov { grid-column: 1 / -1; }
  .aa-table td.aa-td-num::before, .aa-table td.aa-td-runs::before, .aa-table td.aa-td-authors::before {
    content: attr(data-label) ": ";
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 11px;
    color: var(--ink-muted);
  }
  .aa-table td.aa-col-active { background: transparent; }
}

@media (max-width: 420px) {
  .live-sep, .live-time { display: none; }
}
