:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-subtle: #f4f4f5;
  --surface-hover: #f8fafc;
  --surface-expanded: #f8fafc;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --ink: #18181b;
  --ink-secondary: #52525b;
  --ink-muted: #71717a;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --sort-col-bg: rgba(37, 99, 235, 0.065);
  --sort-head-bg: rgba(37, 99, 235, 0.11);
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-ink: #92400e;
  --info-bg: #f8fafc;
  --info-border: #e2e8f0;
  --info-ink: #1e293b;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.04);
  --shadow-md: 0 4px 16px rgba(9, 9, 11, 0.06);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 5-tier score heatmap fills (light) */
  --tile-5-bg: #d1fae5;
  --tile-5-fg: #065f46;
  --tile-4-bg: #e6f7ee;
  --tile-4-fg: #166534;
  --tile-3-bg: #fef3c7;
  --tile-3-fg: #92400e;
  --tile-2-bg: #ffedd5;
  --tile-2-fg: #9a3412;
  --tile-1-bg: #fee2e2;
  --tile-1-fg: #991b1b;
}

html[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #161920;
  --surface-subtle: #1e222b;
  --surface-hover: #1b2029;
  --surface-expanded: #13161c;
  --border: #272c38;
  --border-strong: #373e4f;
  --ink: #f4f4f5;
  --ink-secondary: #a1a1aa;
  --ink-muted: #71717a;
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.14);
  --sort-col-bg: rgba(96, 165, 250, 0.09);
  --sort-head-bg: rgba(96, 165, 250, 0.16);
  --warn-bg: rgba(217, 119, 6, 0.12);
  --warn-border: rgba(245, 158, 11, 0.35);
  --warn-ink: #fcd34d;
  --info-bg: #1a1f29;
  --info-border: #2b3240;
  --info-ink: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);

  /* 5-tier score heatmap fills (dark) */
  --tile-5-bg: rgba(16, 185, 129, 0.24);
  --tile-5-fg: #6ee7b7;
  --tile-4-bg: rgba(34, 197, 94, 0.16);
  --tile-4-fg: #86efac;
  --tile-3-bg: rgba(245, 158, 11, 0.2);
  --tile-3-fg: #fcd34d;
  --tile-2-bg: rgba(249, 115, 22, 0.2);
  --tile-2-fg: #fdba74;
  --tile-1-bg: rgba(239, 68, 68, 0.22);
  --tile-1-fg: #fca5a5;
}

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

html {
  scroll-behavior: smooth;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-subtle);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.page-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

/* Header */
.site-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

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

.brand-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
  display: block;
  box-shadow: var(--shadow-md);
}

.brand-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink-secondary);
  font-weight: 500;
}

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

.btn-social svg,
.btn-icon svg {
  display: block;
  flex-shrink: 0;
}

.intro-copy {
  margin: 14px 0 14px;
  max-width: 820px;
  color: var(--ink-secondary);
  font-size: 14px;
}

.intro-copy strong {
  color: var(--ink);
  font-weight: 600;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  display: inline-block;
  font-size: 12px;
  color: var(--ink-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  font-variant-numeric: tabular-nums;
}

.meta-pill strong {
  color: var(--ink);
  font-weight: 600;
}

/* Buttons & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border-color: var(--border);
}

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

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

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

.btn-outline.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  background: var(--surface);
  color: var(--ink-secondary);
  border-color: var(--border);
}

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

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Section Headers */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.result-count,
.hint-line,
.section-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

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

.search-box {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  height: 34px;
  color: var(--ink-muted);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: var(--accent);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  width: 210px;
}

.search-box input::placeholder {
  color: var(--ink-muted);
}

.filter-chips {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.chip.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.segmented {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.segmented-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0 7px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.seg-btn.is-active {
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 600;
}

/* Weights Drawer */
.weights-drawer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.weights-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
}

.weights-drawer-head .muted {
  color: var(--ink-muted);
  font-weight: 400;
}

.weights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px 16px;
}

.weight-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weight-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.weight-item-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.weight-item-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}

.weight-item input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Category Legend Bar */
.category-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.14s, background-color 0.14s, color 0.14s;
}

.legend-item:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.legend-item.is-sorted {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

.cat-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-code {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--ink);
}

.legend-weight {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Leaderboard Table */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.leaderboard-table th,
.leaderboard-table td {
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.group-row th {
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  text-align: left;
}

.group-row th.group-cats {
  text-align: center;
}

.group-row th.group-runtime {
  text-align: right;
}

.unweighted-tag {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.85;
}

.col-headers th {
  background: var(--surface);
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  user-select: none;
  border-bottom: 1px solid var(--border-strong);
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

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

.th-model .sort-btn,
.th-rank .sort-btn {
  justify-content: flex-start;
  padding-left: 12px;
}

.th-num .sort-btn {
  justify-content: flex-end;
  padding-right: 10px;
}

.th-cat {
  width: 48px;
  min-width: 48px;
}

.th-cat .sort-btn {
  flex-direction: column;
  gap: 2px;
  padding: 7px 4px;
}

.cat-head-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.sort-arrow {
  font-size: 10px;
  line-height: 1;
  color: var(--accent);
  min-height: 10px;
}

.col-headers th.is-sorted {
  background: var(--sort-head-bg);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

td.is-sorted {
  background: var(--sort-col-bg);
}

.group-divider,
.col-divider {
  border-left: 1px solid var(--border-strong);
}

/* Table Body Rows */
tr.model-row {
  cursor: pointer;
  transition: background-color 0.12s;
}

tr.model-row:hover td {
  background: var(--surface-hover);
}

tr.model-row:hover td.is-sorted {
  background: var(--sort-head-bg);
}

tr.model-row.is-expanded td {
  border-bottom-color: transparent;
}

td.cell-rank {
  width: 54px;
  padding: 10px 6px 10px 12px;
  white-space: nowrap;
}

.rank-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chev {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.78;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

tr.model-row:hover .chev {
  opacity: 1;
}

tr.model-row.is-expanded .chev {
  transform: rotate(90deg);
  opacity: 1;
}

.rank-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-secondary);
}

.rank-1 {
  color: #b45309;
}

html[data-theme="dark"] .rank-1 {
  color: #fbbf24;
}

td.cell-model {
  padding: 9px 12px 9px 4px;
  min-width: 265px;
}

.model-cell-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-subtop {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

.model-mainline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.model-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.quant-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

.arch-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.note-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-border);
}

td.cell-score {
  padding: 8px 12px;
  text-align: right;
  white-space: nowrap;
}

.score-main {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.score-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Fixed Square Category Score Boxes */
td.cell-cat {
  padding: 6px 4px;
  text-align: center;
}

.cat-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}

.tier-5 {
  background: var(--tile-5-bg);
  color: var(--tile-5-fg);
}
.tier-4 {
  background: var(--tile-4-bg);
  color: var(--tile-4-fg);
}
.tier-3 {
  background: var(--tile-3-bg);
  color: var(--tile-3-fg);
}
.tier-2 {
  background: var(--tile-2-bg);
  color: var(--tile-2-fg);
}
.tier-1 {
  background: var(--tile-1-bg);
  color: var(--tile-1-fg);
}

/* Runtime Spec & Speed Cells */
td.cell-num {
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
}

.metric-primary {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.metric-secondary {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.metric-missing {
  color: var(--ink-muted);
  font-family: var(--font-mono);
}

.metric-slow {
  color: #b91c1c;
}

html[data-theme="dark"] .metric-slow {
  color: #fca5a5;
}

/* Expanded Detail Row */
tr.detail-row td {
  padding: 0 16px 16px;
  background: var(--surface-expanded);
  border-bottom: 1px solid var(--border-strong);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 8px;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-card h4 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.kv-label {
  color: var(--ink-secondary);
}

.kv-val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.bar-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.bar-fill.is-warn {
  background: #d97706;
}

.bar-fill.is-danger {
  background: #dc2626;
}

.bar-fill.is-good {
  background: #059669;
}

.detail-note-box {
  margin-top: 4px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.45;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-ink);
}

.detail-note-box.is-info {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info-ink);
}

.loading-cell,
.empty-cell {
  padding: 36px 16px;
  text-align: center;
  color: var(--ink-muted);
}

/* Below-Leaderboard Content Sections */
.content-section {
  margin-top: 40px;
}

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

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}

.note-card.is-warning {
  border-left-color: #d97706;
}

.note-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.note-card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
}

.note-severity {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--info-bg);
  color: var(--info-ink);
  border: 1px solid var(--info-border);
}

.note-card.is-warning .note-severity {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-color: var(--warn-border);
}

.note-card p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.affected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.affected-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-secondary);
  background: var(--surface-subtle);
  border-radius: 5px;
  padding: 2px 6px;
}

/* Methodology & Category Spec Table */
.method-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.info-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.cat-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.cat-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cat-spec-table th,
.cat-spec-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.cat-spec-table th {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  background: var(--surface-subtle);
}

.cat-spec-table tr:last-child td {
  border-bottom: none;
}

.cat-spec-table th.num,
.cat-spec-table td.num {
  text-align: right;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.cat-badge-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
}

/* Takeaways */
.takeaways-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.takeaway-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
}

.takeaway-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}

.takeaway-card h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 600;
}

.takeaway-card p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

/* Footer */
.site-footer {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.site-footer .sep {
  margin: 0 6px;
}

.footer-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 0;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Sticky Model Column on Narrow Viewports */
@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .method-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding: 18px 14px 40px;
  }
  .notes-grid,
  .takeaways-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .search-box input {
    width: 165px;
  }
  .th-model,
  td.cell-model {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--border);
  }
  tr.model-row:hover td.cell-model {
    background: var(--surface-hover);
  }
}
