/* ===== Scientific RAG Hub — Stylesheet ===== */
@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/GoogleSansFlex-VF.ttf") format("truetype-variations"),
       url("fonts/GoogleSansFlex-VF.ttf") format("truetype");
}
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Surfaces — pure white base */
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-accent: #f8f9fa;        /* near-white */
  --bg-subtle: #f1f3f4;        /* very light gray */

  /* Text */
  --fg: #202124;
  --fg-muted: #5f6368;
  --fg-faint: #80868b;

  /* Lines */
  --line: #ececec;
  --line-strong: #dadce0;

  /* ===== K family (rows) — vivid pink tonal (Material Pink scale) ===== */
  --k-50:  #feeaf0;            /* K axis base */
  --k-100: #fcd5dd;
  --k-200: #f8b5c4;
  --k-300: #f48fb1;
  --k-400: #f06292;
  --k-500: #ec407a;
  --k-600: #e91e63;            /* vivid pink — K bold text */
  --k-700: #c2185b;

  /* ===== O family (columns) — Google Blue pastel tonal ===== */
  --o-50:  #e8f0fe;            /* Google blue 50 — O axis base */
  --o-100: #d2e3fc;
  --o-200: #aecbfa;
  --o-300: #8ab4f8;
  --o-400: #669df6;
  --o-500: #4285f4;            /* Google blue 500 — heatmap high */
  --o-600: #1a73e8;            /* Google blue 600 — links/buttons */
  --o-700: #1557b0;            /* hover only */

  /* Axis tokens */
  --k-bg: var(--k-50);
  --k-fg: var(--k-600);
  --o-bg: var(--o-50);
  --o-fg: var(--o-700);

  /* Primary link/button — deep O blue */
  --link: var(--o-600);
  --link-hover: var(--o-700);

  /* K×O heatmap — Google blue tonal (intensity = density) */
  --cell-zero: var(--bg-accent);
  --cell-low:  var(--o-50);    /* #e8f0fe */
  --cell-mid:  #c8dffc;        /* bright pastel sky blue */
  --cell-high: var(--o-500);   /* #4285f4 — vivid Google blue */
  --cell-high-fg: #ffffff;     /* white text on darkest tone */
  --cell-deep-fg: var(--o-700);/* deep blue text on light tones */

  --frontier: var(--k-600);    /* pink star against blue heatmap */
  --xs: var(--k-500);

  --shadow-card: 0 1px 2px rgba(60,64,67,.06), 0 4px 16px rgba(60,64,67,.06);
  --radius: 12px;

  --font-display: "Google Sans Flex", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body:    "Noto Sans", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono:    "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --sidebar-w: 270px;
  --sb-active-bg: var(--o-50);
  --sb-active-fg: var(--o-700);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  transition: background-color .18s ease, color .18s ease;
  hyphens: none;
  -webkit-hyphens: none;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-hover); text-decoration: underline; }

code, pre { font-family: var(--font-mono); font-size: .92em; }
pre {
  background: var(--bg-accent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}
code:not(pre code) {
  background: var(--bg-accent);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* ----- Sidebar ----- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  border-right: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
  z-index: 100;
  transition: transform .25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  display: block;
  box-sizing: border-box;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.sb-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 0 1.4rem 1.3rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--fg);
}
.sb-logo:hover { text-decoration: none; color: var(--fg); }
.sb-logo-mark { font-size: 2rem; line-height: 1; }
.sb-logo-text { line-height: 1.2; }
.sb-logo-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.sb-logo-sub {
  font-size: .74rem;
  color: var(--fg-faint);
  margin-top: 3px;
}

.sb-nav {
  display: flex;
  flex-direction: column;
  padding: .35rem .75rem;
  gap: 2px;
}
.sb-item {
  display: flex !important;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  border-radius: 10px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: background .12s, color .12s;
  position: relative;
}
.sb-item::-webkit-details-marker { display: none; }
.sb-item::marker { content: ''; }
.sb-item:hover {
  background: var(--bg-accent);
  color: var(--fg);
  text-decoration: none;
}
.sb-item.active {
  background: var(--sb-active-bg);
  color: var(--sb-active-fg);
  font-weight: 600;
}
.sb-icon {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.sb-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  color: var(--fg-faint);
  background: var(--bg-accent);
  padding: 1px 7px;
  border-radius: 99px;
}
.sb-item.active .sb-count { background: #fff; color: var(--link); }
.sb-caret {
  margin-left: auto;
  font-size: .75rem;
  color: var(--fg-faint);
  transition: transform .15s;
}
.sb-group[open] > summary .sb-caret { transform: rotate(180deg); }

.sb-subs {
  display: flex;
  flex-direction: column;
  padding: .15rem 0 .35rem 1.65rem;
  gap: 1px;
  margin: .15rem 0 .25rem .9rem;
}
.sb-sub {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .6rem;
  border-radius: 6px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: .82rem;
}
.sb-sub:hover { background: var(--bg-accent); color: var(--fg); text-decoration: none; }
.sb-sub.active { background: var(--o-50); color: var(--link); font-weight: 600; }
.sb-sub.sb-sub-overview { font-style: italic; font-size: .78rem; color: var(--fg-faint); }
.sb-sub .sb-count { margin-left: auto; font-size: .68rem; background: transparent; padding: 0; }

/* Rung sub-headers inside the Operational Objective group (grounding/synthesis/discovery) */
.sb-subhead {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .6rem .15rem;
  margin-top: .3rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--fg-faint);
  text-decoration: none;
}
.sb-subhead:first-child { margin-top: 0; }
.sb-subhead:hover, .sb-subhead.active { color: var(--link); text-decoration: none; }
.sb-subhead .sb-count { margin-left: auto; font-size: .66rem; background: transparent; padding: 0; }
.sb-sub.sb-task { padding-left: 1.15rem; font-size: .8rem; }

.sb-rule { border: 0; border-top: 1px solid var(--line); margin: .65rem .75rem; }
.sb-quiet { font-size: .82rem; color: var(--fg-faint); }

/* Mobile hamburger */
.sb-toggle {
  position: fixed;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  font-size: 1.3rem;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--fg);
  z-index: 200;
  cursor: pointer;
  display: none;
}
.sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 90;
}

main.with-sidebar {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg);
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
  }
  body.sb-open .sidebar { transform: translateX(0); }
  body.sb-open .sb-backdrop { display: block; }
  .sb-toggle { display: block; }
  main.with-sidebar { margin-left: 0; padding-top: 60px; }
}

/* ----- Hero ----- */
.hero {
  padding: 7.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--fg-muted);
  margin: 0 0 1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 auto 2rem;
  max-width: 900px;
  color: var(--fg);
}
.lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 720px;
  margin: 0 auto 2rem;
  line-height: 1.55;
}
.lede strong { color: var(--fg); font-weight: 600; }

.hero-search {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin: 0 auto 1.5rem;
  max-width: 640px;
}
.hero-search input {
  flex: 1;
  font-size: 1.05rem;
  padding: .85rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--fg);
  font-family: var(--font-body);
}
.hero-search input:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
  border-color: var(--link);
}
.hero-search-hint { font-size: .82rem; color: var(--fg-faint); }

.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block;
  padding: .65rem 1.25rem;
  background: var(--link);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .95rem;
  border: 1px solid var(--link);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.btn:hover { background: var(--link-hover); border-color: var(--link-hover); color: #fff; text-decoration: none; }
.btn-secondary {
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { background: var(--bg-accent); color: var(--fg); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--fg-muted); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--link); background: var(--o-50); text-decoration: none; }

/* ----- Section titles ----- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 .5rem;
  color: var(--fg);
}
.section-sub {
  color: var(--fg-muted);
  max-width: 720px;
  margin: 0 0 2rem;
  font-size: .97rem;
}

/* ----- K×O Grid ----- */
.ko-grid-section { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.ko-grid-section > .wrap > .section-title,
.ko-grid-section > .wrap > .section-sub { text-align: center; }
.ko-grid-section > .wrap > .section-title { margin-bottom: 2.25rem; }
.ko-grid-section > .wrap > .section-sub { margin-left: auto; margin-right: auto; }

.ko-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  table-layout: fixed;
}
.ko-grid th {
  padding: .85rem .75rem;
  vertical-align: middle;
  text-align: left;
  font-weight: 600;
  font-family: var(--font-display);
}
.ko-grid .corner { background: transparent; width: 14%; }
.ko-grid .o-head {
  background: var(--o-bg);
  color: var(--o-fg);
  border-radius: 10px;
  text-align: center;
}
.ko-grid .k-head {
  background: var(--k-bg);
  color: var(--k-fg);
  border-radius: 10px;
  width: 14%;
}
.cell-axis {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
}
.cell-axis,
.cell-axis-desc,
.cell-id { display: none; }
.ko-cell {
  padding: 0;
  border-radius: 12px;
  vertical-align: top;
  height: 195px;
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  transition: transform .2s cubic-bezier(.2,.7,.2,1),
              box-shadow .2s cubic-bezier(.2,.7,.2,1),
              border-color .15s;
  will-change: transform;
}
.ko-cell:hover {
  transform: translateY(-8px) scale(1.025);
  box-shadow: 0 14px 36px rgba(60,64,67,.18),
              0 4px 12px rgba(60,64,67,.10);
  border-color: var(--o-300);
  z-index: 2;
}
.ko-cell:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 22px rgba(60,64,67,.16);
  transition-duration: .08s;
}
.cell-link {
  display: block;
  height: 100%;
  padding: .8rem .9rem;
  color: var(--fg);
  text-decoration: none;
}
.cell-link:hover { text-decoration: none; color: var(--fg); }
.cell-id {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--fg-muted);
}
.cell-count {
  float: right;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  color: var(--fg);
  opacity: .75;
}
.cell-label { display: block; }
.cell-label-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--fg);
  display: block;
  line-height: 1.2;
}
.cell-label-desc {
  font-family: var(--font-body);
  font-size: .8rem;
  color: var(--fg-muted);
  margin: 5px 0 0;
  line-height: 1.4;
  font-weight: 400;
}
.cell-top {
  list-style: none;
  padding: 0;
  margin: .75rem 0 0;
  font-size: .72rem;
  color: var(--fg-faint);
  line-height: 1.4;
  border: 0;
}
.cell-top li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 0;
}
.heat-zero { background: var(--cell-zero); }
.heat-low  { background: var(--cell-low); }
.heat-mid  { background: var(--cell-mid); }
.heat-high { background: var(--cell-high); border-color: transparent; }

/* Deep blue text on light/mid blue cells */
.heat-low  .cell-link,
.heat-mid  .cell-link,
.heat-low  .cell-count,
.heat-mid  .cell-count,
.heat-low  .cell-label-title,
.heat-mid  .cell-label-title { color: var(--cell-deep-fg); }
.heat-low  .cell-label-desc,
.heat-mid  .cell-label-desc { color: var(--cell-deep-fg); opacity: .78; }
.heat-low  .cell-top,
.heat-mid  .cell-top { color: var(--cell-deep-fg); opacity: .7; }

/* White text on darkest tone */
.heat-high .cell-link,
.heat-high .cell-count,
.heat-high .cell-label-title,
.heat-high .cell-label-desc,
.heat-high .cell-top { color: var(--cell-high-fg); }
.heat-high .cell-count { opacity: .85; }
.heat-high .cell-label-desc { opacity: .92; }
.heat-high .cell-top { opacity: .9; }
.ko-cell.frontier::after {
  content: "★ frontier";
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: none;
  color: var(--frontier);
  background: rgba(255,255,255,.92);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 800px) {
  .ko-grid { font-size: .85rem; }
  .ko-cell { height: 155px; }
  .cell-top { display: none; }
  .cell-label-desc { display: none; }
}

/* ----- Domains & types ----- */
.domains-section, .types-section { padding: 3rem 0; border-bottom: 1px solid var(--line); }

.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.domain-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  padding: 1.4rem 1.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
  transition: all .15s;
}
.domain-card:hover {
  transform: translateY(-2px);
  border-color: var(--o-200);
  color: var(--fg);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}
.domain-emoji { font-size: 2rem; }
.domain-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -.005em; }
.domain-count { font-size: .92rem; color: var(--fg-faint); }

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
}
.type-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .9rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
}
.type-card:hover { border-color: var(--o-200); color: var(--fg); text-decoration: none; }
.type-card strong { font-family: var(--font-display); font-weight: 600; }
.type-card span { font-family: var(--font-mono); color: var(--fg-faint); }

/* ----- Paper cards ----- */
.recent-section, .cell-list, .domain-list, .browse-list { padding: 3rem 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.1rem;
}
/* Cell and axis pages: lay papers out in a single column so the full title is
   always visible on one line, which reads better than narrow tiles. */
.cell-list .card-grid,
.cell-overview .card-grid { grid-template-columns: 1fr; gap: .7rem; }
.cell-list .card-title,
.cell-overview .card-title { font-size: 1.12rem; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  transition: all .15s;
}
.card:hover { border-color: var(--o-200); box-shadow: var(--shadow-card); }
.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 0 0 .35rem;
  line-height: 1.35;
}
.card-title a { color: var(--fg); text-decoration: none; }
.card-title a:hover { color: var(--link); text-decoration: none; }
.card-meta { font-size: .83rem; color: var(--fg-faint); margin: 0 0 .6rem; }
.card-meta .meta-method {
  font-family: var(--font-mono);
  color: var(--link);
  font-weight: 600;
}
.card-note { font-size: .9rem; color: var(--fg-muted); line-height: 1.55; margin: 0 0 .85rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  display: inline-block;
  font-size: .7rem;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  transition: all .1s;
}
.tag:hover { text-decoration: none; opacity: .85; }
.tag-cell   { background: var(--o-50); color: var(--link); }
.tag-sub    { background: #f0f7ff; color: #3b6ea5; border: 1px solid #c8dff5; font-style: italic; }
.tag-k      { background: var(--k-50);  color: var(--k-700); font-family: var(--font-display); font-weight: 600; font-size: .74rem; letter-spacing: 0; }
.tag-o      { background: var(--o-50);  color: var(--o-700); font-family: var(--font-display); font-weight: 600; font-size: .74rem; letter-spacing: 0; }
.tag-domain { background: var(--bg-subtle); color: var(--fg-muted); }
.tag-type   { background: var(--bg-accent); color: var(--fg-muted); border: 1px solid var(--line); }
.tag-mod    { background: transparent; color: var(--fg-faint); border: 1px dashed var(--line-strong); font-size: 0.62rem; opacity: 0.65; padding: 1px 5px; text-transform: lowercase; letter-spacing: 0.02em; }
.tag-mod::before { content: '◇ '; }
.tag-xs     { background: var(--k-100); color: var(--k-700); }

/* ----- Cell page ----- */
.cell-hero, .domain-hero, .browse-hero {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
}
.cell-hero h1, .domain-hero h1, .browse-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.cell-id-big {
  font-family: var(--font-mono);
  font-size: .55em;
  color: var(--fg-muted);
  vertical-align: middle;
  margin-right: .5rem;
}
.times { color: var(--fg-faint); margin: 0 .3rem; }
.cell-axis-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 800px;
}
@media (max-width: 640px) { .cell-axis-pair { grid-template-columns: 1fr; } }

.axis-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.axis-tag {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--fg-faint);
  text-transform: none;
}
.axis-card.axis-k .axis-tag { color: var(--fg-muted); }
.axis-card.axis-o .axis-tag { color: var(--link); }
.axis-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: .25rem 0 .4rem;
}
.axis-card p { font-size: .88rem; color: var(--fg-muted); margin: 0; }

.cell-nav, .cell-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: 1.5rem;
}
.pill {
  font-family: var(--font-mono);
  font-size: .78rem;
  padding: 4px 10px;
  background: var(--bg-accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
  text-decoration: none;
}
.pill:hover { border-color: var(--link); color: var(--link); text-decoration: none; }
.pill.current { background: var(--link); color: #fff; border-color: var(--link); }
.muted { color: var(--fg-faint); font-size: .85rem; margin-right: .35rem; }

.empty {
  text-align: center;
  padding: 2rem;
  color: var(--fg-muted);
  font-style: italic;
}

/* ----- Browse filters ----- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin: 1.5rem 0 0;
}
.filters input,
.filters select {
  font-family: var(--font-body);
  font-size: .92rem;
  padding: .55rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--fg);
}
.filters button {
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 500;
  padding: .55rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--fg);
}
.filters input { flex: 1; min-width: 220px; }
.filters input:focus, .filters select:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
.filters button { cursor: pointer; background: var(--bg-accent); }
.filters button:hover { border-color: var(--link); color: var(--link); }
.result-count { font-size: .85rem; color: var(--fg-faint); font-family: var(--font-mono); margin-left: auto; }

/* ----- Prose pages ----- */
.prose { padding: 3rem 0 4rem; }
.prose .wrap { max-width: 800px; }
.prose h1 { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 1.5rem; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 2.5rem 0 .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--line);
}
.prose h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 .5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .35rem 0; }
.prose strong { color: var(--fg); }
.ko-stat { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1rem 0; }
.ko-stat th, .ko-stat td { text-align: left; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.ko-stat th { background: var(--bg-accent); }
.ko-stat tr td:first-child { font-family: var(--font-mono); color: var(--link); }

/* ----- Flagship strip ----- */
.flagship-section { padding: 3rem 0; border-bottom: 1px solid var(--line); background: var(--bg-accent); }
.flagship-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.fl-mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  transition: all .15s;
}
.fl-mini:hover { border-color: var(--o-200); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.fl-mini-big {
  display: flex; flex-direction: column; align-items: flex-start;
  padding-bottom: .35rem; border-bottom: 1px solid var(--line);
  margin-bottom: .25rem;
}
.fl-mini-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--link); letter-spacing: -.02em; }
.fl-mini-label { font-size: .72rem; color: var(--fg-faint); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.fl-mini-name { font-family: var(--font-display); font-size: 1.1rem; margin: 0; font-weight: 600; }
.fl-mini-tag { font-size: .88rem; color: var(--fg-muted); margin: 0; line-height: 1.45; }
.fl-mini-meta { display: flex; gap: .5rem; align-items: center; font-size: .8rem; margin-top: .3rem; }
.fl-mini-cite { font-size: .8rem; margin: 0; color: var(--fg-muted); }
.fl-mini-cite a { color: var(--fg-muted); }
.fl-mini-cite a:hover { color: var(--link); }

/* ----- Insights page ----- */
.insights-hero { padding: 4rem 0 2rem; border-bottom: 1px solid var(--line); }
.insights-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 1.25rem;
  max-width: 900px;
}
.insights-toc {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}
.insights-toc a {
  font-family: var(--font-mono);
  font-size: .85rem;
  padding: 6px 14px;
  background: var(--bg-accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
}
.insights-toc a:hover { border-color: var(--link); color: var(--link); text-decoration: none; }

.prose-section { padding: 4rem 0; border-bottom: 1px solid var(--line); }
.prose-section.alt-bg { background: var(--bg-accent); }
.prose-section .wrap { max-width: 1200px; }

/* Flagship full grid */
.fl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}
.fl-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  position: relative;
}
.fl-card:hover { border-color: var(--o-200); box-shadow: var(--shadow-card); }
.fl-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.fl-name { font-family: var(--font-display); font-size: 1.35rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
.fl-tagline { font-size: 1rem; color: var(--fg); margin: 0 0 1rem; font-weight: 500; }
.fl-stats {
  display: flex;
  gap: 1.25rem;
  padding: .8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: .8rem;
}
.fl-stat { display: flex; flex-direction: column; }
.fl-num { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1; color: var(--link); letter-spacing: -.01em; }
.fl-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-faint); margin-top: 4px; }
.fl-subtitle { font-size: .85rem; color: var(--fg-muted); margin: 0 0 .8rem; font-family: var(--font-mono); }
.fl-why { font-size: .9rem; line-height: 1.55; margin: 0 0 .8rem; color: var(--fg-muted); }
.fl-why strong { color: var(--fg); }
.fl-cite { font-size: .85rem; margin: 0; color: var(--fg-muted); }

/* 5 Requirements */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.req-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  position: relative;
}
.req-num {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 700;
  color: var(--fg-faint); line-height: 1;
  position: absolute; top: 1rem; right: 1.2rem;
  opacity: .35;
}
.req-card h3 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .5rem; font-size: 1.1rem; }
.req-card p { font-size: .9rem; line-height: 1.55; margin: 0 0 .6rem; color: var(--fg-muted); }
.req-card p:last-child { margin-bottom: 0; }
.req-evidence { font-family: var(--font-mono); font-size: .78rem; color: var(--fg-faint); }

/* Timeline */
.chart-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  overflow-x: auto;
}
.chart-frame svg { max-width: 100%; height: auto; min-width: 600px; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: .82rem;
}
.lg-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
}
.chart-note { font-size: .8rem; color: var(--fg-faint); margin: .7rem 0 0; line-height: 1.5; }

/* Getting Started overview figure */
.gs-figure { margin: 2rem 0 2.5rem; text-align: center; }
.gs-figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1rem;
}
.gs-figure figcaption { font-size: .85rem; color: var(--fg-muted); margin-top: .8rem; line-height: 1.55; max-width: 640px; margin-left: auto; margin-right: auto; }

/* K × Domain grid */
.kd-grid { width: 100%; border-collapse: separate; border-spacing: 4px; margin-top: 1rem; }
.kd-grid th {
  padding: .6rem .5rem;
  background: var(--bg-accent);
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-display);
}
.kd-grid thead th { background: var(--o-bg); color: var(--o-fg); }
.kd-grid tbody th { background: var(--k-bg); color: var(--k-fg); text-align: left; padding-left: 1rem; }
.kd-grid td { text-align: center; padding: 0; border-radius: 6px; width: 11%; }
.kd-link {
  display: block;
  padding: 1rem .5rem;
  color: inherit;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
}
.kd-link:hover { text-decoration: none; opacity: .85; }

/* Frontier pair */
.frontier-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem; }
@media (max-width: 800px) { .frontier-pair { grid-template-columns: 1fr; } }
.frontier-col h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0 0 .5rem; }
.frontier-col p { color: var(--fg-muted); margin: 0 0 1rem; font-size: .92rem; }

/* Future directions */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.dir-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  position: relative;
}
.dir-num {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: var(--fg-faint);
  opacity: .3;
}
.dir-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  margin: 0 0 .5rem;
  max-width: 85%;
}
.dir-star {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--frontier);
  text-transform: none;
  display: block;
  margin-top: 4px;
}
.dir-card p { font-size: .9rem; line-height: 1.55; margin: 0 0 .6rem; color: var(--fg-muted); }
.dir-ev { font-family: var(--font-mono); font-size: .78rem; color: var(--fg-faint); margin: 0; }

.see-more { text-align: center; margin-top: 1.5rem; }

/* ----- Footer ----- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  font-size: .88rem;
  color: var(--fg-muted);
  background: #fff;
  margin-top: 4rem;
}
.site-footer .wrap { max-width: 900px; }
.site-footer .links { display: flex; gap: 1.25rem; margin-top: .8rem; }

/* Paper card "Summary →" link */
.card-summary-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--accent, #0066cc);
  text-decoration: none;
  font-weight: 500;
}
.card-summary-link:hover {
  text-decoration: underline;
}

/* Paper detail pages */
.paper-hero {
  padding: 2.5rem 1.5rem 1rem;
  border-bottom: 1px solid #eee;
}
.paper-hero h1 {
  font-size: 1.6rem;
  margin: 0.5rem 0 0.75rem;
  line-height: 1.3;
}
.paper-hero-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  flex-wrap: wrap;
}
.paper-hero-meta .ext-link {
  color: var(--accent, #0066cc);
  text-decoration: none;
}
.paper-tags {
  margin-top: 0.5rem;
}
.paper-body {
  padding: 1.5rem;
}
.paper-markdown {
  max-width: 800px;
  line-height: 1.65;
  font-size: 0.95rem;
}
.paper-markdown h1, .paper-markdown h2, .paper-markdown h3 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}
.paper-markdown h1 { display: none; }  /* already in hero */
.paper-markdown table {
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.88rem;
}
.paper-markdown th, .paper-markdown td {
  border: 1px solid #ddd;
  padding: 0.4em 0.8em;
}
.paper-markdown th {
  background: #f5f5f5;
}
.paper-markdown code {
  background: #f5f5f5;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.85em;
}
.paper-markdown pre {
  background: #f5f5f5;
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
}
.paper-markdown blockquote {
  border-left: 3px solid #ccc;
  padding-left: 1em;
  color: #666;
  margin-left: 0;
}

/* Notion-style tables: first row treated as header */
.paper-markdown table[header-row="true"] tr:first-child td {
  background: #f3f4f7;
  font-weight: 600;
  color: #333;
}
.paper-markdown table {
  width: auto;
  max-width: 100%;
}

/* ===== Subsection filter chips ===== */
.subsec-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.subsec-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: .35rem .85rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.subsec-btn:hover {
  border-color: var(--link);
  color: var(--link);
}
.subsec-btn.active {
  background: var(--link);
  border-color: var(--link);
  color: #fff;
  font-weight: 600;
}
.subsec-n {
  display: inline-block;
  background: rgba(255,255,255,.3);
  border-radius: 10px;
  padding: 0 .4rem;
  font-size: .74rem;
  margin-left: .2rem;
  font-weight: 700;
}
.subsec-btn:not(.active) .subsec-n {
  background: var(--bg-subtle);
  color: var(--fg-faint);
}

/* ===== Property table (Notion metadata block) ===== */
.prop-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0 1.8rem;
  font-size: .88rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.prop-table tr { border-bottom: 1px solid var(--line); }
.prop-table tr:last-child { border-bottom: none; }
.prop-table tr:hover td, .prop-table tr:hover th { background: #f0f4ff; }
.prop-key {
  width: 9.5rem;
  padding: .55rem 1rem;
  font-weight: 600;
  color: #5a6a8a;
  background: #f4f6fb;
  white-space: nowrap;
  vertical-align: middle;
  font-size: .78rem;
  letter-spacing: .03em;
  border-right: 1px solid var(--line);
}
.prop-val {
  padding: .55rem 1rem;
  color: var(--fg);
  vertical-align: middle;
  line-height: 1.5;
}

/* ===== Pipeline diagram (About page) ===== */
.pipeline-diagram {
  margin: 2rem 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.pipe-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}
.pipe-node {
  background: var(--bg-card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .9rem 1.1rem;
  min-width: 140px;
  text-align: center;
  font-size: .88rem;
  line-height: 1.4;
}
.pipe-node.pipe-wide { width: 100%; max-width: 640px; }
.pipe-icon { font-size: 1.5rem; margin-bottom: .3rem; }
.pipe-label { font-weight: 600; color: var(--fg); }
.pipe-sub { font-size: .78rem; font-weight: 400; color: var(--fg-muted); }
.pipe-node-src  { border-color: #b5c4e0; background: #f5f8ff; }
.pipe-node-classify { border-color: var(--k-300); background: #fef9f5; }
.pipe-node-grid { border-color: var(--o-300); background: #f5fcf7; }
.pipe-node-out  { border-color: #b5d5b5; background: #f5faf5; }
.pipe-arrow-down { font-size: 1.4rem; color: var(--fg-faint); line-height: 1; }
.pipe-classify-grid {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: .7rem;
  flex-wrap: wrap;
  justify-content: center;
}
.pipe-axis { flex: 1; min-width: 200px; }
.pipe-axis-label { font-size: .75rem; color: var(--fg-muted); margin-bottom: .4rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pipe-axis-items { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.pipe-axis-times { font-size: 1.8rem; font-weight: 700; color: var(--fg-faint); }
.pipe-pill { display: inline-block; padding: .2rem .55rem; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.pipe-k1 { background: #ffe8e0; color: #b8431f; }
.pipe-k2 { background: #e0f5ec; color: #1f7a4d; }
.pipe-k3 { background: #ece0f8; color: #6a3acb; }
.pipe-k4 { background: #fef3dd; color: #a07010; }
.pipe-o1 { background: #e0eeff; color: #1f5ab8; }
.pipe-o2 { background: #fff0e0; color: #b86010; }
.pipe-o3 { background: #e8f5e0; color: #3a7a1f; }
.pipe-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  margin-top: .7rem;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.pipe-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .4rem .3rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 600;
  transition: opacity .15s;
}
.pipe-cell:hover { opacity: .8; text-decoration: none; }
.pipe-cell-h { background: var(--cell-high); color: var(--cell-high-fg); }
.pipe-cell-m { background: var(--cell-mid); color: var(--fg); }
.pipe-cell-l { background: var(--cell-low); color: var(--fg-muted); }
.pipe-cell-id { font-size: .7rem; opacity: .75; }
.pipe-cell-n  { font-size: 1rem; font-weight: 700; }
.pipe-grid-legend { margin-top: .6rem; font-size: .75rem; color: var(--fg-muted); display: flex; align-items: center; gap: .3rem; justify-content: center; flex-wrap: wrap; }
.pipe-cell-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.pipe-cell-dot.pipe-cell-h { background: var(--cell-high); }
.pipe-cell-dot.pipe-cell-m { background: var(--cell-mid); }
.pipe-cell-dot.pipe-cell-l { background: var(--cell-low); }

/* ============= Footnote popover ============= */
sup.footnote-ref {
  font-size: 0.72em;
  vertical-align: super;
  line-height: 0;
  margin: 0 1px;
}
sup.footnote-ref a {
  display: inline-block;
  padding: 1px 5px;
  min-width: 14px;
  background: rgba(0, 95, 175, 0.12);
  color: var(--accent, #005faf);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s;
}
sup.footnote-ref a:hover,
sup.footnote-ref a:focus {
  background: var(--accent, #005faf);
  color: #fff;
  outline: none;
}
.fn-popover {
  position: absolute;
  z-index: 1000;
  max-width: 380px;
  background: var(--bg, #fff);
  color: var(--fg, #1a1a1a);
  border: 1px solid var(--border, #d8d8d8);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.85em;
  line-height: 1.55;
}
.fn-popover::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 16px;
  width: 12px;
  height: 12px;
  background: var(--bg, #fff);
  border-left: 1px solid var(--border, #d8d8d8);
  border-top: 1px solid var(--border, #d8d8d8);
  transform: rotate(45deg);
}
.fn-popover p { margin: 0 0 6px 0; }
.fn-popover p:last-child { margin-bottom: 0; }
.fn-popover .fn-close {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 1.2em;
  color: var(--fg-muted, #777);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}
.fn-popover .fn-close:hover { color: var(--fg, #1a1a1a); }
.fn-popover code {
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.92em;
}
/* Hide the long footnotes section at the bottom — replaced by popover */
.paper-markdown .footnotes {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #d8d8d8);
  font-size: 0.82em;
  color: var(--fg-muted, #555);
}
.paper-markdown .footnotes ol { padding-left: 1.5em; }
.paper-markdown .footnotes li { margin-bottom: 0.5rem; }
.footnote-backref { text-decoration: none; opacity: 0.6; margin-left: 4px; }

/* ============= Cell-page section overview (survey paragraph excerpt) ============= */
.cell-overview {
  background: var(--bg-alt, #f9f9fb);
  border-top: 1px solid var(--border, #d8d8d8);
  border-bottom: 1px solid var(--border, #d8d8d8);
  padding: 2rem 0;
}
.cell-overview .ov-title {
  font-size: 1.1rem;
  margin: 0 0 0.4rem 0;
  color: var(--accent, #005faf);
  font-weight: 600;
}
.cell-overview .ov-sub {
  font-size: 0.8rem;
  color: var(--fg-muted, #666);
  margin: 0 0 1.2rem 0;
}
.cell-overview .ov-paragraph {
  background: var(--bg, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  max-width: 920px;
}
.cell-overview .ov-paragraph p {
  margin: 0;
  line-height: 1.75;
  font-size: 0.95rem;
  text-align: justify;
}
/* Hide the overview footnote list — kept in DOM as popover target only.
   footnotes.js reads innerHTML to populate the popover on chip click. */
.cell-overview .overview-fns {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* Cited-papers card grid (shown directly under the paragraph) */
.cell-overview .ov-cards {
  margin-top: 1.5rem;
}
.cell-overview .ov-cards .card {
  /* Inherit card styling; nothing extra needed since .card-grid handles layout */
}

/* ============= Cell tier badge (Active / Emerging / Frontier) ============= */
.cell-tier-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.8rem 0 0.4rem 0;
  flex-wrap: wrap;
}
.cell-tier {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  padding: 3px 9px;
  border-radius: 4px;
  line-height: 1.4;
}
.cell-tier-active   { background: rgba(40, 167, 69, 0.15); color: #2c8f3f; border: 1px solid rgba(40,167,69,0.35); }
.cell-tier-emerging { background: rgba(255, 193, 7, 0.18); color: #997404; border: 1px solid rgba(255,193,7,0.40); }
.cell-tier-dormant { background: rgba(120, 120, 130, 0.14); color: #5a5a66; border: 1px solid rgba(120,120,130,0.34); }
.cell-tier-name {
  font-size: 0.95rem;
  color: var(--fg, #1a1a1a);
  font-weight: 600;
}

/* ============= Cell overview — sub-subsection grouped cards ============= */
.cell-overview .ov-group {
  margin-top: 1.5rem;
}
.cell-overview .ov-group + .ov-group {
  margin-top: 2rem;
}
.cell-overview .ov-group-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg, #1a1a1a);
  margin: 0 0 0.8rem 0;
  padding: 0.4rem 0.8rem;
  background: var(--bg, #fff);
  border-left: 3px solid var(--accent, #005faf);
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.cell-overview .ov-group-count {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent, #005faf);
  background: rgba(0, 95, 175, 0.08);
  padding: 1px 8px;
  border-radius: 10px;
}
.cell-overview .ov-group-other {
  border-left-color: var(--fg-muted, #999);
}
.cell-overview .ov-group-other .ov-group-count {
  color: var(--fg-muted, #777);
  background: rgba(0, 0, 0, 0.06);
}

/* Standalone fact-check footnote list (cell pages): kept in DOM as popover
   target only — footnotes.js reads its innerHTML on chip click. */
.footnotes.overview-fns {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* Per-card fact-check chip: clicking opens the verbatim-evidence popover. */
.card-factcheck {
  margin: 0.1rem 0 0.5rem 0;
}
.card-factcheck a.footnote-ref {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--accent, #2a7);
  background: rgba(34, 170, 119, 0.10);
  border: 1px solid rgba(34, 170, 119, 0.30);
  border-radius: 999px;
  padding: 1px 9px;
  text-decoration: none;
  cursor: pointer;
}
.card-factcheck a.footnote-ref:hover,
.card-factcheck a.footnote-ref:focus {
  background: rgba(34, 170, 119, 0.20);
}
.fn-popover .fn-src {
  font-size: 0.92em;
  color: var(--fg-muted, #777);
  border-top: 1px solid var(--border, #e2e2e2);
  padding-top: 6px;
}

/* ============================================================
   Main-page pipeline overview (paper Fig. 1) + growth chart
   ============================================================ */
.flow-section { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.flow {
  display: flex; flex-wrap: wrap; align-items: stretch;
  gap: .55rem; justify-content: center; margin-top: 1.4rem;
}
.flow-card {
  border: 1px solid var(--line-strong); border-radius: 14px;
  padding: .85rem .9rem; background: var(--bg-accent);
  min-width: 168px; display: flex; flex-direction: column; gap: .4rem;
}
.flow-cap {
  font-size: .68rem; letter-spacing: .02em;
  color: var(--fg-muted); font-weight: 700; margin-bottom: .1rem;
}
.flow-chip {
  display: block; padding: .34rem .6rem; border-radius: 9px;
  font-size: .85rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: filter .12s ease;
}
.flow-k .flow-chip { background: var(--k-50); color: var(--k-700); border-color: var(--k-100); }
.flow-o .flow-chip { background: var(--o-50); color: var(--o-700); border-color: var(--o-100); }
.flow-chip:hover { filter: brightness(.965); }
.flow-axis-note { font-size: .66rem; color: var(--fg-faint); margin-top: .1rem; }
.flow-stages {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem;
  position: relative; padding-bottom: 1.5rem; flex: 1 1 420px; justify-content: center;
}
.flow-stage {
  flex: 1 1 112px; min-width: 104px; border: 1px solid var(--line-strong);
  border-radius: 11px; padding: .6rem .65rem; background: var(--bg);
  display: flex; flex-direction: column; gap: .18rem;
  text-decoration: none; color: inherit; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.flow-stage:hover { border-color: var(--o-400); box-shadow: var(--shadow-card); transform: translateY(-1px); }
.flow-stage strong { font-size: .86rem; color: var(--fg); }
.flow-stage span { font-size: .7rem; color: var(--fg-muted); line-height: 1.3; }
.flow-loop {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
  font-size: .72rem; color: var(--k-600); font-weight: 600;
}
.flow-arrow { align-self: center; color: var(--fg-faint); font-size: 1.4rem; line-height: 1; }
.flow-foot {
  text-align: center; color: var(--fg-muted); font-size: .88rem;
  margin: 1.4rem auto 0; max-width: 780px; line-height: 1.5;
}
@media (max-width: 760px) {
  .flow { flex-direction: column; align-items: stretch; }
  .flow-arrow { transform: rotate(90deg); align-self: center; }
  .flow-stages { flex-basis: auto; }
}

/* Growth chart section */
.growth-section { padding: 3rem 0; border-bottom: 1px solid var(--line); }

/* What's next + Contributing / Cite (main page) */
.whatsnext-section { padding: 3rem 0; border-bottom: 1px solid var(--line); background: var(--bg-accent); }
.whatsnext-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.contribute-section { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.contribute-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; }
@media (max-width: 760px) { .contribute-grid { grid-template-columns: 1fr; } }
.contribute-card p { color: var(--fg-muted); line-height: 1.6; margin: .6rem 0 0; }
.contribute-card .section-title { font-size: 1.35rem; }
.contribute-card pre {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: .6rem 0 0;
}
.contribute-card pre code { font-family: var(--font-mono); font-size: .82rem; line-height: 1.5; color: var(--fg-muted); }

/* Demoted 12-cell grid (secondary browse aid) */
.ko-grid-secondary { background: var(--bg-accent); }
.ko-grid-secondary .section-title { font-size: 1.15rem; }

/* ============================================================
   Paper detail page: resource links, table of contents, citation
   ============================================================ */
.paper-links { display: flex; flex-wrap: wrap; gap: .55rem; margin: .9rem 0 .2rem; }
.res-link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  text-decoration: none; border: 1px solid var(--line-strong); background: var(--bg);
  color: var(--fg); transition: border-color .12s ease, background .12s ease;
}
.res-link:hover { border-color: var(--o-400); background: var(--o-50); }
.res-paper { border-color: var(--o-200); }
.res-code  { border-color: var(--line-strong); }
.res-model { border-color: #f0c000; }

.paper-layout { display: grid; grid-template-columns: 232px minmax(0,1fr); gap: 2.4rem; align-items: start; }
.paper-toc {
  position: sticky; top: 1.2rem; align-self: start; font-size: .84rem;
  border-left: 2px solid var(--line); padding-left: .9rem; max-height: calc(100vh - 2rem); overflow-y: auto;
}
.paper-toc .toc-cap { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-faint); font-weight: 700; margin-bottom: .5rem; }
.paper-toc ul { list-style: none; margin: 0; padding: 0; }
.paper-toc li { margin: .12rem 0; }
.paper-toc a { color: var(--fg-muted); text-decoration: none; display: block; padding: .12rem 0; line-height: 1.35; }
.paper-toc a:hover { color: var(--link); }
.paper-toc .toc-l3 { padding-left: .8rem; font-size: .8rem; }
.paper-markdown { scroll-margin-top: 1rem; min-width: 0; }
.paper-markdown h2, .paper-markdown h3 { scroll-margin-top: 1rem; }

.paper-cite { border-top: 1px solid var(--line); background: var(--bg-accent); padding: 2rem 0 2.6rem; }
.paper-cite h2 { margin: 0 0 .8rem; font-size: 1.2rem; }
.bibtex {
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 1rem 1.1rem; overflow-x: auto; font-size: .82rem; line-height: 1.5;
  white-space: pre; margin: 0;
}
.paper-cite-jump { margin-top: 2rem; font-size: .85rem; }
.paper-cite-jump a { color: var(--fg-muted); text-decoration: none; }
.paper-cite-jump a:hover { color: var(--link); }

@media (max-width: 860px) {
  .paper-layout { grid-template-columns: 1fr; gap: 1rem; }
  .paper-toc { position: static; max-height: none; border-left: none; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .8rem 0; }
  .paper-toc ul { columns: 2; }
}

/* ---------- At-a-glance systems table (paper Table 3) ---------- */
.sys-table-wrap { margin: 0 0 1.6rem; }
.sys-cap {
  font-size: .82rem; color: var(--fg-muted); font-family: var(--font-mono);
  margin: 0 0 .55rem; line-height: 1.45;
}
.sys-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-card);
}
.sys-table {
  width: 100%; border-collapse: collapse;
  font-size: .82rem; line-height: 1.4; min-width: 720px;
}
.sys-table thead th {
  text-align: left; font-family: var(--font-mono); font-weight: 600;
  font-size: .74rem; letter-spacing: .01em; color: var(--fg-muted);
  background: var(--bg-subtle);
  padding: .5rem .7rem; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.sys-table .sys-sym { color: var(--fg-faint); font-style: italic; }
.sys-table tbody td { padding: .45rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.sys-table tbody tr:last-child td { border-bottom: 0; }
.sys-table tbody tr:hover td { background: var(--bg-accent); }
.sys-name { font-weight: 600; white-space: nowrap; }
.sys-name a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.sys-name a:hover { color: var(--link); border-color: var(--link); }
.sys-group td {
  background: var(--bg-subtle) !important;
  padding: .4rem .7rem !important; border-bottom: 1px solid var(--line-strong) !important;
}
.sys-coupling {
  font-family: var(--font-mono); font-weight: 600; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--fg);
  margin-right: .6rem;
}
.sys-coupling-desc { font-size: .76rem; color: var(--fg-muted); font-style: italic; }
.sys-k, .sys-o {
  display: inline-block; font-family: var(--font-mono); font-weight: 600;
  font-size: .68rem; padding: .12rem .4rem; border-radius: 6px; white-space: nowrap;
}
.sys-k { background: var(--k-bg); color: var(--k-fg); }
.sys-o { background: var(--o-bg); color: var(--o-fg); }
@media (max-width: 640px) { .sys-coupling-desc { display: none; } }

/* ---------- Knowledge-source (Table 1) & benchmark (Table 2) variants ---------- */
.ks-group td, .bm-group td {
  background: var(--bg-subtle) !important;
  padding: .4rem .7rem !important; border-bottom: 1px solid var(--line-strong) !important;
}
.ks-sub-name { font-weight: 600; color: var(--fg); margin-left: .5rem; }
.bm-task {
  font-family: var(--font-mono); font-weight: 600; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .03em; color: var(--o-700);
}
.ks-name { font-weight: 600; white-space: nowrap; }
.ks-scale { font-family: var(--font-mono); font-size: .78rem; color: var(--fg-muted); white-space: nowrap; }
.ks-acc {
  display: inline-block; font-family: var(--font-mono); font-weight: 600;
  font-size: .68rem; padding: .1rem .4rem; border-radius: 6px; white-space: nowrap;
}
.acc-open  { background: #e6f4ea; color: #137333; }
.acc-comm  { background: #fce8e6; color: #c5221f; }
.acc-restr { background: #fef7e0; color: #b06000; }
.acc-mixed { background: var(--bg-subtle); color: var(--fg-muted); }

/* ---------- Axis overview pages ---------- */
.axis-hero .axis-intro {
  max-width: 62ch; font-size: 1rem; line-height: 1.6; color: var(--fg-muted);
  margin: .5rem 0 1.1rem;
}
.axis-id-k { background: var(--k-bg); color: var(--k-fg); }
.axis-id-o { background: var(--o-bg); color: var(--o-fg); }
.pill-n { font-family: var(--font-mono); font-size: .78em; color: var(--fg-faint); margin-left: .25rem; }
.axis-full-table { margin: 0 0 2.4rem; }
.axis-sub { border-top: 1px solid var(--line); padding: 1.6rem 0 .4rem; }
.axis-sub-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .3rem; }
.axis-sub-head h2 { margin: 0; font-size: 1.35rem; }
.axis-sub-link { margin-left: auto; font-size: .85rem; font-family: var(--font-mono); white-space: nowrap; }
.axis-sub-desc { max-width: 68ch; color: var(--fg-muted); margin: 0 0 1rem; line-height: 1.55; }

/* ---------- Axis body prose (§4/§5 content) ---------- */
.axis-body { padding: 1.4rem 0 .4rem; }
.axis-intro { max-width: 66ch; }
.axis-intro p { font-size: 1.02rem; line-height: 1.65; color: var(--fg-muted); margin: 0 0 .8rem; }
.axis-prose { max-width: 72ch; }
.axis-prose p { line-height: 1.62; margin: 0 0 .85rem; color: var(--fg); }
.axis-subsub { margin: 1.3rem 0; }
.axis-subsub-title {
  font-size: 1.02rem; margin: 0 0 .4rem; color: var(--fg);
  font-family: var(--font-display);
}
.axis-subsub-title::before {
  content: "▸"; color: var(--k-500); margin-right: .4rem; font-size: 1.15em; vertical-align: -0.03em;
}
.axis-sub .axis-subsub-title::before { color: var(--o-500); }
#k1 .axis-subsub-title::before, #k2 .axis-subsub-title::before,
#k3 .axis-subsub-title::before, #k4 .axis-subsub-title::before { color: var(--k-500); }
.axis-systems-title {
  font-size: 1.15rem; margin: .5rem 0 1rem; padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}
.axis-systems-n {
  font-family: var(--font-mono); font-size: .8rem; color: var(--fg-faint);
  background: var(--bg-subtle); padding: .1rem .45rem; border-radius: 6px; margin-left: .3rem;
}

/* ---------- Data resource chips (§4 resources on K pages) ---------- */
.axis-lede { max-width: 70ch; color: var(--fg-muted); font-size: 1.02rem; line-height: 1.6; margin: 0 0 1.3rem; }
.res-group { margin: 0 0 1.5rem; }
.res-group-title { font-size: 1.05rem; margin: 0 0 .3rem; font-family: var(--font-display); }
.res-group-title::before { content: "▸"; color: var(--k-500); margin-right: .4rem; font-size: 1.15em; vertical-align: -0.03em; }
.sys-o + * .res-group-title::before, #o1 .res-group-title::before, #o2 .res-group-title::before, #o3 .res-group-title::before { color: var(--o-500); }
.res-note { max-width: 72ch; color: var(--fg-muted); font-size: .92rem; margin: 0 0 .6rem; line-height: 1.5; }
.res-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.res-chip {
  display: inline-block; padding: .28rem .6rem; border-radius: 8px;
  font-size: .85rem; font-family: var(--font-mono);
  background: var(--k-bg); color: var(--k-fg);
  border: 1px solid transparent; text-decoration: none; white-space: nowrap;
}
.res-chip:hover { border-color: var(--k-fg); text-decoration: none; }
.res-chip-plain { background: var(--bg-subtle); color: var(--fg-muted); cursor: default; }
.res-chip-plain:hover { border-color: var(--line-strong); }
#o1 .res-chip, #o2 .res-chip, #o3 .res-chip { background: var(--o-bg); color: var(--o-fg); }
.axis-systems-link { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.axis-systems-label { display: block; font-size: .9rem; color: var(--fg-muted); margin-bottom: .5rem; }

/* ---------- Per-dataset description table (below the chips) ---------- */
.res-table-scroll { margin-top: .7rem; }
.res-table { min-width: 420px; }
.res-table thead th { font-size: .72rem; }
.res-td-name { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.res-td-name a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.res-td-name a:hover { color: var(--link); border-color: var(--link); }
.res-td-desc { color: var(--fg-muted); }

/* ---------- O-axis pages: blue accent for task groups & benchmark chips ---------- */
.o-body .res-group-title::before { color: var(--o-500); }
.o-body .res-chip { background: var(--o-bg); color: var(--o-fg); }
.o-body .res-chip:hover { border-color: var(--o-fg); }
.o-body .res-td-name a:hover { color: var(--o-700); border-color: var(--o-700); }

/* ---------- Task pages ---------- */
.res-group-title a { color: inherit; text-decoration: none; }
.res-group-title a:hover { color: var(--o-700); text-decoration: underline; }
.crumb-sep { color: var(--fg-faint); margin: 0 .3rem; }
.axis-systems-cta {
  display: inline-block; margin-top: .4rem; padding: .55rem 1rem;
  background: var(--o-bg); color: var(--o-fg); border-radius: 8px;
  font-family: var(--font-mono); font-size: .9rem; text-decoration: none;
  border: 1px solid transparent;
}
.axis-systems-cta:hover { border-color: var(--o-fg); text-decoration: none; }

/* ---------- Method (§6 pipeline) accent ---------- */
:root { --m-bg: #ede7f6; --m-fg: #5e35b1; }
.sys-m { display:inline-block; font-family: var(--font-mono); font-weight:600; font-size:.68rem; padding:.12rem .4rem; border-radius:6px; background: var(--m-bg); color: var(--m-fg); }
.axis-id-m { background: var(--m-bg); color: var(--m-fg); }
.axis-subsub-title::before { color: var(--m-fg); }

/* ---------- About / Getting started page ---------- */
.prose.prose-wide .wrap { max-width: 1040px; }
.about-byline { color: var(--fg-muted); font-family: var(--font-mono); font-size: .9rem; margin: -.4rem 0 1.4rem; }
.about-intro { font-size: 1.02rem; line-height: 1.65; color: var(--fg); max-width: 74ch; }
.about-abstract { font-size: .95rem; line-height: 1.7; color: var(--fg-muted); }
.about-axes-4 { grid-template-columns: repeat(4, 1fr); }
.site-guide { margin: 1rem 0 1.6rem; }
.site-guide-row { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.site-guide-row:last-child { border-bottom: none; }
.site-guide dt { font-weight: 600; }
.site-guide dt a { color: var(--link); text-decoration: none; }
.site-guide dt a:hover { text-decoration: underline; }
.site-guide dd { margin: 0; color: var(--fg-muted); font-size: .92rem; line-height: 1.55; }
@media (max-width: 640px) { .site-guide-row { grid-template-columns: 1fr; gap: .2rem; } }
.about-axes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0 1.6rem; }
.about-axis { display: block; padding: 1.1rem 1.15rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev); text-decoration: none; color: var(--fg); transition: border-color .15s, box-shadow .15s; }
.about-axis:hover { text-decoration: none; box-shadow: var(--shadow-card); }
.about-axis h3 { margin: .5rem 0 .4rem; font-size: 1.1rem; }
.about-axis p { color: var(--fg-muted); font-size: .9rem; line-height: 1.5; margin: 0; }
.about-axis-tag { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 8px; font-family: var(--font-mono); font-weight: 700; }
.about-axis-k { } .about-axis-k:hover { border-color: var(--k-fg); }
.about-axis-k .about-axis-tag { background: var(--k-bg); color: var(--k-fg); }
.about-axis-o:hover { border-color: var(--o-fg); }
.about-axis-o .about-axis-tag { background: var(--o-bg); color: var(--o-fg); }
.about-axis-m:hover { border-color: var(--m-fg); }
.about-axis-m .about-axis-tag { background: var(--m-bg); color: var(--m-fg); }
.about-axis-e:hover { border-color: #00695c; }
.about-axis-e .about-axis-tag { background: #e0f2f1; color: #00695c; }
.cite-block { background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow-x: auto; font-size: .85rem; }
@media (max-width: 900px) { .about-axes-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .about-axes { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .about-axes-4 { grid-template-columns: 1fr; } }

/* ---------- Home: the four axes (K, O, M, E) ---------- */
.axes-section { padding: 2.4rem 0; border-top: 1px solid var(--line); }
.home-axes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.4rem; }
.home-axis { display: flex; flex-direction: column; padding: 1.1rem 1.15rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg-elev); text-decoration: none; color: var(--fg); transition: border-color .15s, box-shadow .15s; }
.home-axis:hover { text-decoration: none; box-shadow: var(--shadow-card); }
.home-axis h3 { margin: .55rem 0 .45rem; font-size: 1.05rem; }
.home-axis p { color: var(--fg-muted); font-size: .86rem; line-height: 1.5; margin: 0 0 .8rem; flex: 1; }
.home-axis-tag { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 8px; font-family: var(--font-mono); font-weight: 700; }
.home-axis-more { font-size: .82rem; font-weight: 600; color: var(--link); }
.home-axis-k:hover { border-color: var(--k-fg); } .home-axis-k .home-axis-tag { background: var(--k-bg); color: var(--k-fg); }
.home-axis-o:hover { border-color: var(--o-fg); } .home-axis-o .home-axis-tag { background: var(--o-bg); color: var(--o-fg); }
.home-axis-m:hover { border-color: var(--m-fg); } .home-axis-m .home-axis-tag { background: var(--m-bg); color: var(--m-fg); }
.home-axis-e:hover { border-color: #00695c; } .home-axis-e .home-axis-tag { background: #e0f2f1; color: #00695c; }
@media (max-width: 900px) { .home-axes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-axes { grid-template-columns: 1fr; } }

/* ---------- Evaluation (§7) & Open Challenges (§8) ---------- */
.axis-id-e { background: #e0f2f1; color: #00695c; }
.frontier-list { margin: .4rem 0 0; padding-left: 1.1rem; }
.frontier-list li { color: var(--fg); line-height: 1.5; margin: .15rem 0; }

/* ---------- Evaluation (§7) dimension cards ---------- */
.eval-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.eval-card { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.1rem 1.15rem; background: var(--bg-elev); }
.eval-title { margin: 0 0 .35rem; font-size: 1.08rem; }
.eval-measures { margin: 0 0 .7rem; color: var(--fg); line-height: 1.5; }
.eval-lab { display: inline-block; font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--fg-faint); margin-right: .4rem; }
.eval-metrics { margin: 0 0 .7rem; }
.eval-metrics .eval-lab { display: block; margin-bottom: .35rem; }
.eval-ceiling { margin: 0; font-size: .9rem; color: var(--fg-muted); line-height: 1.5; padding-top: .6rem; border-top: 1px dashed var(--line); }
@media (max-width: 760px) { .eval-grid { grid-template-columns: 1fr; } }

/* ---------- Open Challenges (§8) themes ---------- */
.frontier-theme { margin: 0 0 1.8rem; }
.frontier-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-top: .6rem; }
.frontier-item { border-left: 3px solid var(--line-strong); padding: .1rem 0 .1rem .8rem; }
.frontier-item-title { margin: 0 0 .2rem; font-size: .95rem; }
.frontier-item-desc { margin: 0; font-size: .87rem; color: var(--fg-muted); line-height: 1.5; }
@media (max-width: 760px) { .frontier-items { grid-template-columns: 1fr; } }

/* ---------- Section icons ---------- */
.sec-ic { font-size: 1.05em; margin-right: .1rem; }
.theme-ic { margin-right: .35rem; font-size: 1.05em; }
.frontier-theme .res-group-title::before { content: none; }  /* icon replaces the ▸ bullet */
.eval-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9px; background: #e0f2f1;
  margin-right: .55rem; font-size: 1.05rem; vertical-align: middle;
}
.eval-title { display: flex; align-items: center; }
.eval-card { border-top: 3px solid #26a69a; }

/* ---------- Method pipeline SVG diagram ---------- */
.pipeline-figure { margin: 1.4rem 0 .4rem; }
.pipeline-figure svg { width: 100%; height: auto; max-width: 940px; display: block; overflow: visible; }
.pl-box { fill: #f3effa; stroke: #5e35b1; stroke-width: 1.5; transition: fill .15s, stroke-width .15s; }
.pl-link { cursor: pointer; }
.pl-link:hover .pl-box { fill: #e7ddf7; stroke-width: 2.2; }
.pl-ic { font-size: 21px; }
.pl-name { font-size: 13.5px; fill: #4a2c8f; font-weight: 600; font-family: var(--font-display); }
.pl-link:hover .pl-name { text-decoration: underline; }
.pl-sym { font-size: 12px; fill: #7e57c2; font-style: italic; font-family: var(--font-mono); }
.pl-arrow { stroke: #9aa0a6; stroke-width: 1.7; }
.pl-loop { fill: none; stroke: #7e57c2; stroke-width: 1.6; stroke-dasharray: 5 3; }
.pl-loop-lab { font-size: 10.5px; fill: #7e57c2; font-family: var(--font-mono); }
.pl-io { font-size: 14px; fill: var(--fg-muted); font-style: italic; font-family: var(--font-mono); }
.pipeline-figure figcaption { font-size: .82rem; color: var(--fg-muted); margin-top: .6rem; font-family: var(--font-mono); line-height: 1.45; }
