/* The dblp Explorer's design system (tokens, sidebar, cards, tables), plus the live model's form.
   Light first; dark under both the OS preference and an explicit data-theme. */
:root {
  color-scheme: light;
  --ground: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfa;
  --ink: #12151a;
  --ink-2: #4c5361;
  --muted: #868d99;
  --rule: #e2e5ea;
  --rule-2: #edeff3;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --tint: #e9f1fb;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #4a3aa7; --good: #0ca30c; --bad: #e34948;
  --seq-1: #b7d3f6; --seq-2: #6da7ec; --seq-3: #2a78d6; --seq-4: #1c5cab; --seq-5: #104281;
  --neutral: #c9ced6;
  --chart-surface: #fcfcfb;
  --shadow: 0 1px 2px rgba(20, 24, 33, .04), 0 1px 10px rgba(20, 24, 33, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0f1115; --surface: #171a20; --surface-2: #1b1f26; --ink: #eef0f3; --ink-2: #b7bec9; --muted: #7c8492;
    --rule: #282e38; --rule-2: #20242c;
    --accent: #5a9cf0; --accent-ink: #8ab8f5; --tint: #182335;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #9085e9; --good: #3fcf5e; --bad: #f0716f;
    --seq-1: #1c5cab; --seq-2: #2a78d6; --seq-3: #5598e7; --seq-4: #86b6ef; --seq-5: #b7d3f6;
    --neutral: #3a414d;
    --chart-surface: #171a20;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 20px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0f1115; --surface: #171a20; --surface-2: #1b1f26; --ink: #eef0f3; --ink-2: #b7bec9; --muted: #7c8492;
  --rule: #282e38; --rule-2: #20242c;
  --accent: #5a9cf0; --accent-ink: #8ab8f5; --tint: #182335;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #9085e9; --good: #3fcf5e; --bad: #f0716f;
  --seq-1: #1c5cab; --seq-2: #2a78d6; --seq-3: #5598e7; --seq-4: #86b6ef; --seq-5: #b7d3f6;
  --neutral: #3a414d;
  --chart-surface: #171a20;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 20px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 14.5px; line-height: 1.5;
}
h1, h2, h3, h4 { font-family: "Bricolage Grotesque", "IBM Plex Sans", sans-serif; margin: 0; text-wrap: balance; color: var(--ink); }
code, .mono, .num { font-family: "IBM Plex Mono", "Consolas", monospace; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--accent-ink); }
::selection { background: var(--tint); }
button { font-family: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Sidebar ---- */
.sidebar {
  width: 248px; background: var(--surface); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 15;
}
.brand {
  padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--rule-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand .mark { font-family: "IBM Plex Mono", monospace; font-size: 14px; color: var(--ink); letter-spacing: .01em; }
.brand .mark b { color: var(--accent-ink); font-weight: 600; }
nav.pages { padding: 10px 10px 20px; display: flex; flex-direction: column; gap: 1px; }
.navsec { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; padding: 14px 10px 6px; }
.navbtn {
  display: flex; align-items: baseline; gap: 9px; text-align: left; border: none; background: none; cursor: pointer;
  padding: 8px 10px; border-radius: 7px; color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none;
}
.navbtn:hover { background: var(--surface-2); color: var(--ink); }
.navbtn.active { background: var(--tint); color: var(--accent-ink); font-weight: 600; }
.navbtn .no { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); min-width: 16px; }
.navbtn.active .no { color: var(--accent-ink); }
.navbtn.cta { color: var(--accent-ink); font-weight: 600; }
.themebtn {
  flex-shrink: 0; text-transform: capitalize; border: 1px solid var(--rule); background: var(--surface-2);
  color: var(--ink-2); border-radius: 6px; padding: 4px 10px; font-size: 11.5px; cursor: pointer;
}
.sidefoot { margin-top: auto; padding: 14px 20px 18px; border-top: 1px solid var(--rule-2); font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ---- Main ---- */
main { margin-left: 248px; min-width: 0; padding: 30px 36px 64px; max-width: 1180px; }
.pagehead { margin-bottom: 22px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); }
.pagehead h2 { font-size: 27px; font-weight: 700; margin-top: 5px; letter-spacing: -.01em; }
.pagehead p { color: var(--ink-2); max-width: 70ch; margin: 8px 0 0; font-size: 14.5px; }

/* ---- KPI strip ---- */
.kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin-bottom: 26px;
}
.kpi { background: var(--surface); padding: 15px 16px; box-shadow: 1px 0 0 var(--rule), 0 1px 0 var(--rule); }
.kpi .n { font-family: "Bricolage Grotesque", sans-serif; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.kpi .l { font-size: 12px; color: var(--ink-2); margin-top: 4px; line-height: 1.35; }

/* ---- Card grid ---- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid + .grid, .grid + .card, .card + .grid, :not(.grid) > .card + .card { margin-top: 18px; }
@media (max-width: 980px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0;
}
.card.span2 { grid-column: span 2; }
@media (max-width: 980px) { .card.span2 { grid-column: span 1; } }
.cardhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card h3 { font-size: 15px; font-weight: 600; }
.card .cardsub { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.card .body { margin-top: 4px; flex: 1; min-width: 0; }
.chartbox { width: 100%; margin-top: 10px; }
.srctag { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; white-space: nowrap; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--rule); }
.srctag.live { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); border-color: transparent; }

/* ---- Chips and toggles ---- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule-2); }
.chipgroup { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--rule); background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 500;
  padding: 5px 11px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--tint); border-color: var(--accent); color: var(--accent-ink); }
.segtoggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.segtoggle button { border: none; background: var(--surface-2); color: var(--ink-2); font-size: 12px; padding: 5px 12px; cursor: pointer; border-right: 1px solid var(--rule); }
.segtoggle button:last-child { border-right: none; }
.segtoggle button.on { background: var(--accent); color: #fff; font-weight: 600; }

/* ---- Tables ---- */
.tablewrap { overflow-x: auto; margin-top: 8px; }
table.data { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.data th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--rule); padding: 6px 12px 6px 0; white-space: nowrap;
}
table.data td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule-2); color: var(--ink-2); vertical-align: top; }
table.data td.num, table.data th.num { text-align: right; }
table.data td.num { color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 12px; white-space: nowrap; }
table.data tr:last-child td { border-bottom: none; }
table.data td.strong { color: var(--ink); font-weight: 500; }
table.data tr.group td { color: var(--muted); font-style: italic; padding-top: 12px; }

.callout { background: var(--tint); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 11px 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 14px; max-width: 86ch; }
.callout b { color: var(--ink); }

/* ---- Badges ---- */
.flag { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 1px 8px; border-radius: 999px; white-space: nowrap; color: var(--ink-2); border: 1px solid var(--rule); }
.flag.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.flag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.flag.mid { color: var(--s4); border-color: color-mix(in srgb, var(--s4) 45%, transparent); }

/* ---- Text ---- */
.muted { color: var(--muted); font-size: 12px; }
.prose { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.prose h3 { font-size: 15px; margin: 18px 0 6px; }
.prose h3:first-child { margin-top: 2px; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; max-width: 80ch; }
.prose li { margin: 3px 0; }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.findings { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.findings b { color: var(--ink); }
.linkcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.linkcard { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px; border: 1px solid var(--rule); border-radius: 9px; text-decoration: none; background: var(--surface-2); }
.linkcard:hover { border-color: var(--accent); background: var(--tint); }
.linkcard b { color: var(--ink); font-size: 13.5px; }
.linkcard span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ar { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, serif; font-size: 15px; direction: rtl; text-align: right; }

/* ---- Small screens ---- */
.menubtn {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 21; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 8px; width: 38px; height: 38px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
@media (max-width: 760px) {
  .sidebar { z-index: 20; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  main { margin-left: 0; padding: 64px 16px 48px; }
  .menubtn { display: flex; }
  .card { padding: 16px 14px 14px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ---- Loading ---- */
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--rule-2) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
.cardmsg { color: var(--muted); font-size: 13px; padding: 24px 8px; text-align: center; }
.cardmsg.error { color: var(--bad); text-align: left; }

/* ---- Live model ---- */
.modelwrap[dir="rtl"] { font-family: "Noto Naskh Arabic", "IBM Plex Sans", "Segoe UI", Tahoma, sans-serif; }
.modelwrap[dir="rtl"] h3 { font-family: inherit; }
.qlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 6px; }
@media (max-width: 980px) { .qlist { grid-template-columns: minmax(0, 1fr); } }
.qblock { border: 1px solid var(--rule-2); border-radius: 10px; padding: 12px 14px 14px; background: var(--surface-2); min-width: 0; }
.qblock.missing { border-color: var(--bad); }
.qhead { display: flex; gap: 9px; align-items: baseline; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.qhead .no { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); min-width: 16px; }
.qhead .multi { font-weight: 400; color: var(--muted); font-size: 12px; }
.opt { position: relative; display: inline-flex; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt input:checked + .chip { background: var(--accent); border-color: var(--accent); color: #fff; }
.opt input:focus-visible + .chip { outline: 2px solid var(--accent); outline-offset: 2px; }
.formfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }
.btn { font-size: 13px; font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 7px; padding: 8px 18px; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.ghost { background: transparent; color: var(--accent-ink); }
.formerror { color: var(--bad); font-size: 12.5px; font-weight: 600; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 6px; }
@media (max-width: 1100px) { .results { grid-template-columns: minmax(0, 1fr); } }
.result { border: 1px solid var(--rule); border-radius: 10px; padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.result.likely { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); background: var(--tint); }
.result h4 { font-size: 14px; font-weight: 600; line-height: 1.35; }
.result .verdict { align-self: flex-start; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--rule-2); color: var(--ink-2); }
.result.likely .verdict { background: var(--accent); color: #fff; }
.meter { position: relative; height: 8px; border-radius: 999px; background: var(--rule); margin: 6px 0 0; }
.meter .mid { position: absolute; inset-inline-start: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--muted); opacity: .5; }
.meter .mark { position: absolute; top: 50%; width: 18px; height: 18px; margin-inline-start: -9px; transform: translateY(-50%); border-radius: 50%; background: var(--surface); border: 3px solid var(--muted); }
.result.likely .meter .mark { border-color: var(--accent); }
.ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.moves { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.moves li { display: flex; gap: 7px; align-items: baseline; padding: 2px 0; color: var(--ink-2); }
.moves .arrow { font-size: 9px; width: 10px; flex: none; }
.moves .up .arrow { color: var(--accent); }
.moves .down .arrow { color: var(--muted); }
.moves .dir { margin-inline-start: auto; color: var(--muted); font-size: 11.5px; }
.result .fine { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 0; }

/* ---- Research page (as on the dblp Explorer) ---- */
.papertitle { font-family: "Bricolage Grotesque", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.3; margin: 6px 0 4px; }
.paperby { font-size: 12.5px; color: var(--muted); margin: 0; }
.abstract { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); margin: 12px 0 10px; max-width: 100ch; }
.keywords { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.keywords b { color: var(--ink-2); font-weight: 600; }
.paperactions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
a.btn { text-decoration: none; display: inline-block; }
.srclist { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.srclist a { color: var(--accent-ink); }
.qsecs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.qsec { border: 1px solid var(--rule); border-radius: 9px; background: var(--surface-2); }
.qsec summary { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.qsec summary::-webkit-details-marker { display: none; }
.qsec summary::before { content: "▸"; color: var(--muted); margin-right: 8px; }
.qsec[open] summary::before { content: "▾"; }
.qsec summary > span:first-child { flex: 1; }
.qsec summary .ar { font-weight: 600; }
.qitem { padding: 10px 14px 12px; border-top: 1px solid var(--rule-2); font-size: 13px; color: var(--ink-2); }
.qitem.note { font-size: 12.5px; color: var(--muted); }
.qitem.note p { margin: 0 0 4px; white-space: pre-line; }
.qitem .no { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--muted); margin-right: 8px; }
.qitem b { color: var(--ink); font-weight: 600; }
.qpair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: baseline; }
.qrows { list-style: none; margin: 6px 0 0; padding: 0; }
.qrows li { padding: 3px 0; border-bottom: 1px dashed var(--rule-2); }
.qopts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.chip.static { cursor: default; font-size: 12px; }
.chip.static:hover { border-color: var(--rule); }
.ar-inline { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, serif; color: var(--muted); }
@media (max-width: 640px) { .qpair { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---- The story: chapters, sections, takeaways ---- */
a.mark { text-decoration: none; }
.hero { padding: 18px 0 14px; max-width: 860px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; letter-spacing: -.02em; margin: 8px 0 14px; }
.hero .lede { font-size: 17px; }
.herobtns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.herobtns .btn { padding: 9px 18px; font-size: 13.5px; }
.answer { font-family: "Bricolage Grotesque", sans-serif; font-size: 19px; line-height: 1.45; font-weight: 600; color: var(--ink); margin: 6px 0 16px; max-width: 70ch; }
.card .kpis { margin-bottom: 0; }
.chapterhead { margin: 4px 0 22px; max-width: 860px; }
.chapterhead h2 { font-size: 30px; font-weight: 700; margin-top: 6px; letter-spacing: -.015em; }
.lede { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; margin: 10px 0 0; max-width: 72ch; }
.storysec { margin-top: 34px; }
.storysec > h3 { font-size: 19px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.01em; }
.storysec > .prose, .storysec > .grid + .prose, .card + .prose { margin-top: 12px; }
.prose p { margin: 0 0 10px; }
.takeaway {
  font-family: "Bricolage Grotesque", sans-serif; font-size: 17px; line-height: 1.45; font-weight: 600; color: var(--ink);
  border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 18px 0; max-width: 72ch;
}
.takeaway .cite { font-family: "IBM Plex Sans", sans-serif; font-weight: 400; font-size: 14px; }
.cite { color: var(--muted); white-space: normal; }
.cite a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px dotted currentColor; }
.howwe { margin-top: 18px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.howwe summary { display: flex; align-items: baseline; gap: 10px; padding: 11px 16px; cursor: pointer; list-style: none; color: var(--ink-2); font-size: 13.5px; }
.howwe summary::-webkit-details-marker { display: none; }
.howwe summary::before { content: "▸"; color: var(--muted); }
.howwe[open] summary::before { content: "▾"; }
.howwe .hw { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.howwe .inner { padding: 2px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.howwe .inner .grid { margin-top: 6px; }
.storymap { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.storymap a {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow); text-decoration: none;
}
.storymap a:hover { border-color: var(--accent); }
.storymap .chno { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--accent-ink); }
.storymap b { color: var(--ink); font-size: 15px; font-family: "Bricolage Grotesque", sans-serif; }
.storymap span:last-child { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.domainline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.domainline .end { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.domainline .arrow { color: var(--muted); }
.hyplist { display: flex; flex-direction: column; gap: 8px; }
.hyp { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 14px; border: 1px solid var(--rule); border-radius: 9px; background: var(--surface); text-decoration: none; color: var(--ink-2); font-size: 13.5px; }
.hyp:hover { border-color: var(--accent); }
.hyp .hk { font-family: "IBM Plex Mono", monospace; font-weight: 600; color: var(--accent-ink); }
.hyp .hto { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 560px) { .hyp { grid-template-columns: 44px 1fr; } .hyp .hto { grid-column: 2; } }
.refs { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 7px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.refs a { color: var(--accent-ink); }
.bignum { font-family: "Bricolage Grotesque", sans-serif; font-size: 44px; font-weight: 700; color: var(--accent-ink); margin: 10px 0 2px; }
.citebox { font-size: 13.5px; line-height: 1.6; color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule-2); border-radius: 8px; padding: 10px 12px; margin: 6px 0 10px; }
.storynav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule); }
.storynav a { display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); text-decoration: none; box-shadow: var(--shadow); }
.storynav a:hover { border-color: var(--accent); }
.storynav a.next { text-align: right; }
.storynav small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.storynav b { color: var(--ink); font-family: "Bricolage Grotesque", sans-serif; font-size: 15px; }
@media (max-width: 560px) { .storynav { grid-template-columns: 1fr; } .storynav a.next { text-align: left; } }
