/* ============================================================
   GUISE & AXIS project page
   GTK4 / Adwaita design language, desktop only, single light theme.

   Desktop only is deliberate: the page is dense with wide tables and
   side-by-side figures, so there is no small-screen breakpoint
   anywhere in this file. A narrow window scrolls horizontally.
   ============================================================ */

:root {
  /* --- surfaces -------------------------------------------------- */
  --paper:        #f6f8fb;   /* cool porcelain ground                */
  --paper-alt:    #e9eef6;   /* banded section, blue-grey            */
  --paper-tint:   #edf3f2;   /* second banded tone, celadon          */
  --card:         #ffffff;
  --deep:         #172238;   /* dark band (mechanism), ink navy      */
  --deep-2:       #0f1828;
  --headerbar:    rgba(246, 248, 251, 0.88);

  /* --- ink ------------------------------------------------------- */
  --ink:          #121a2b;
  --ink-2:        #3a4458;
  --ink-3:        #616d85;
  --ink-on-deep:  #eef2f8;
  --ink-on-deep-2:#b6c1d6;

  /* --- rules and shadow ------------------------------------------ */
  --line:         rgba(18, 26, 43, 0.10);
  --line-2:       rgba(18, 26, 43, 0.20);
  --line-deep:    rgba(220, 230, 245, 0.16);

  --shadow-xs: 0 1px 2px rgba(20, 32, 58, 0.06);
  --shadow-sm: 0 1px 3px rgba(20, 32, 58, 0.07), 0 2px 8px rgba(20, 32, 58, 0.05);
  --shadow-md: 0 2px 6px rgba(20, 32, 58, 0.08), 0 10px 26px rgba(20, 32, 58, 0.07);

  /* --- accent family --------------------------------------------
     Blue-and-white porcelain with a cinnabar seal, sampled from the
     paper's figures: cobalt = the aligned model and harm334 (structure,
     navigation), cinnabar = AXIS (ours only), plum = the bare harmful
     request, celadon = the refusal panel, ochre = the wrapper, indigo =
     the DPO + commitment curve. */
  --cinnabar: #b42f2a;  --cinnabar-soft: #fae3e0;  --cinnabar-line: rgba(180, 47, 42, .28);
  --plum:     #7e2c63;  --plum-soft:     #f3e2ee;  --plum-line:     rgba(126, 44, 99, .28);
  --celadon:  #237566;  --celadon-soft:  #dcefea;  --celadon-line:  rgba(35, 117, 102, .28);
  --ochre:    #8f6a0e;  --ochre-soft:    #f5ebcf;  --ochre-line:    rgba(143, 106, 14, .30);
  --cobalt:   #1f4f9a;  --cobalt-soft:   #e0e9f7;  --cobalt-line:   rgba(31, 79, 154, .28);
  --indigo:   #4a3ea3;  --indigo-soft:   #e5e2f6;  --indigo-line:   rgba(74, 62, 163, .28);

  --accent:      var(--cobalt);
  --accent-soft: var(--cobalt-soft);
  --accent-line: var(--cobalt-line);

  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --headerbar-h: 56px;
  --page-w: 1180px;
  --prose-w: 74ch;

  --ease:        cubic-bezier(0.0, 0.0, 0.2, 1.0);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --fast: 140ms;
  --norm: 240ms;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ============================ base ============================ */

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--headerbar-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 1160px;                 /* desktop only, on purpose */
  font-family: 'Inter', 'Cantarell', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

a { color: var(--accent); text-decoration: none; transition: color var(--fast) var(--ease); }
a:hover { color: var(--ink); }

::selection { background: var(--accent-soft); color: var(--ink); }

strong { font-weight: 650; color: var(--ink); }
em { font-style: italic; }
sub, sup { font-size: .72em; line-height: 0; }

code, .mono { font-family: var(--mono); font-variant-ligatures: none; }

/* ========================== headerbar ========================= */

.headerbar {
  position: fixed; inset: 0 0 auto 0;
  height: var(--headerbar-h);
  min-width: 1160px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--headerbar);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: border-color var(--norm) var(--ease), box-shadow var(--norm) var(--ease);
}
.headerbar.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-xs); }

.headerbar-title { display: flex; align-items: baseline; gap: 10px; }
.headerbar-title a { font-size: 18px; font-weight: 800; letter-spacing: .06em; color: var(--ink); }
.headerbar-title a .u { color: var(--cinnabar); }

.headerbar-nav { display: flex; align-items: center; gap: 2px; }
.headerbar-nav a {
  padding: 7px 13px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 550; letter-spacing: .005em;
  color: var(--ink-2);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.headerbar-nav a:hover { background: rgba(18, 26, 43, .06); color: var(--ink); }
.headerbar-nav a.active { background: var(--cobalt-soft); color: var(--cobalt); }
.headerbar-nav .pill {
  margin-left: 10px; padding: 7px 15px;
  background: var(--ink); color: var(--paper);
  border-radius: 999px; font-weight: 650;
}
.headerbar-nav .pill:hover { background: var(--cobalt); color: #fff; }

/* ============================ shell =========================== */

.band { padding: 76px 0; }
.band--paper { background: var(--paper); }
.band--alt   { background: var(--paper-alt); }
.band--tint  { background: var(--paper-tint); }
.band--deep  { background: var(--deep); color: var(--ink-on-deep); }

.wrap { max-width: var(--page-w); margin: 0 auto; padding: 0 28px; }

section[id] { scroll-margin-top: calc(var(--headerbar-h) + 20px); }

[data-accent="cinnabar"]   { --accent: var(--cinnabar);   --accent-soft: var(--cinnabar-soft);   --accent-line: var(--cinnabar-line); }
[data-accent="plum"] { --accent: var(--plum); --accent-soft: var(--plum-soft); --accent-line: var(--plum-line); }
[data-accent="celadon"]    { --accent: var(--celadon);    --accent-soft: var(--celadon-soft);    --accent-line: var(--celadon-line); }
[data-accent="ochre"]   { --accent: var(--ochre);   --accent-soft: var(--ochre-soft);   --accent-line: var(--ochre-line); }
[data-accent="cobalt"]    { --accent: var(--cobalt);    --accent-soft: var(--cobalt-soft);    --accent-line: var(--cobalt-line); }
[data-accent="indigo"]  { --accent: var(--indigo);  --accent-soft: var(--indigo-soft);  --accent-line: var(--indigo-line); }

/* ====================== section headings ====================== */

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 750;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--accent); opacity: .55;
}

.sec-title { font-size: 40px; font-weight: 750; letter-spacing: -.022em; line-height: 1.14; color: var(--ink); }
.band--deep .sec-title { color: var(--ink-on-deep); }

.sec-sub { margin-top: 16px; max-width: var(--prose-w); font-size: 18px; line-height: 1.72; color: var(--ink-2); }
.band--deep .sec-sub { color: var(--ink-on-deep-2); }

.sec-head { margin-bottom: 40px; }
.sec-head--center { text-align: center; }
.sec-head--center .eyebrow { justify-content: center; }
.sec-head--center .sec-sub { margin-left: auto; margin-right: auto; }

.sec-head--split {
  display: grid; grid-template-columns: minmax(330px, 0.85fr) 1.15fr;
  gap: 48px; align-items: end;
  padding-bottom: 26px; border-bottom: 2px solid var(--accent-line);
}
.sec-head--split .sec-sub { margin-top: 0; font-size: 17px; }

.subhead {
  display: flex; align-items: baseline; gap: 14px;
  margin: 54px 0 20px;
  font-size: 24px; font-weight: 700; letter-spacing: -.012em; color: var(--ink);
}
.subhead .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex: none; align-self: center;
  border-radius: 9px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.subhead .rule { flex: 1; height: 1px; background: var(--line); }

/* ============================ hero ============================ */

.hero {
  padding: calc(var(--headerbar-h) + 78px) 0 72px;
  text-align: center;
  background:
    radial-gradient(900px 460px at 50% -6%, #e1ebfa 0%, rgba(225, 235, 250, 0) 68%),
    radial-gradient(700px 380px at 12% 8%, #e0efeb 0%, rgba(224, 239, 235, 0) 70%),
    radial-gradient(700px 380px at 88% 10%, #f7e5e4 0%, rgba(247, 229, 228, 0) 70%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero h1.title {
  font-size: 50px; font-weight: 800; letter-spacing: -.028em; line-height: 1.12;
  color: var(--ink); max-width: 24ch; margin: 0 auto 30px;
}

.authors { font-size: 17.5px; line-height: 1.75; color: var(--ink); max-width: 1000px; margin: 0 auto; }
.authors .au:first-child { margin-left: 0; }
.authors .au { white-space: nowrap; margin: 0 .5em; font-weight: 550; }
.authors a.au { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.authors a.au:hover { color: var(--cinnabar); border-bottom-color: var(--cinnabar-line); }
.authors sup { color: var(--ink-3); font-weight: 500; margin-left: 1px; }
.affils { margin: 8px auto 26px; font-size: 15px; color: var(--ink-3); }
.affils span { white-space: nowrap; margin: 0 .6em; }

.hero .tagline { font-size: 27px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); margin-bottom: 8px; }
.hero .tagline .a { color: var(--cobalt); }
.hero .tagline .b { color: var(--cinnabar); box-shadow: inset 0 -.34em 0 var(--cinnabar-soft); }

.hero .venue { font-size: 15px; color: var(--ink-3); margin-bottom: 30px; }

.hero-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-links a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 16px; font-weight: 650; letter-spacing: -.005em;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
  transition: transform var(--norm) var(--ease-spring), box-shadow var(--norm) var(--ease),
              background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.hero-links a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-links svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.hero-links a.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hero-links a.primary:hover { background: #000; color: #fff; }
.hero-links a.k-cinnabar:hover { border-color: var(--cinnabar-line); color: var(--cinnabar); background: var(--cinnabar-soft); }
.hero-links a.k-plum:hover { border-color: var(--plum-line); color: var(--plum); background: var(--plum-soft); }
.hero-links a.k-cobalt:hover  { border-color: var(--cobalt-line);  color: var(--cobalt);  background: var(--cobalt-soft); }
.hero-links a.k-ochre:hover { border-color: var(--ochre-line); color: var(--ochre); background: var(--ochre-soft); }

.figures {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.figures > div { padding: 26px 30px 28px; text-align: left; border-right: 1px solid var(--line); }
.figures > div:last-child { border-right: 0; }
.figures .big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.figures .big .unit { font-size: 22px; font-weight: 650; letter-spacing: 0; margin-left: 2px; }
.figures .k { font-size: 15px; font-weight: 700; color: var(--ink); margin: 6px 0 3px; }
.figures .d { font-size: 14.5px; line-height: 1.6; color: var(--ink-3); }
.figures .f-1 .big { color: var(--plum); }
.figures .f-2 .big { color: var(--ochre); }
.figures .f-3 .big { color: var(--cinnabar); }

/* ===================== figures and captions =================== */

.fig-wide {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 26px 20px;
  box-shadow: var(--shadow-md);
}
.fig-wide img { width: 100%; display: block; }
.fig-wide figcaption,
.fig-cap {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 15.5px; line-height: 1.65; color: var(--ink-3);
}
.fig-cap .lbl,
.fig-wide figcaption .lbl { font-weight: 750; color: var(--ink); margin-right: 6px; }

/* ========================= benchmark ========================== */

.pieces {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 44px;
}
.pieces li {
  background: var(--card);
  border: 1px solid var(--line); border-top: 3px solid var(--c);
  border-radius: var(--radius-md); padding: 20px 22px;
  box-shadow: var(--shadow-xs);
}
.pieces .n { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--c); }
.pieces .k { display: block; font-size: 17px; font-weight: 700; color: var(--ink); margin: 6px 0; line-height: 1.4; }
.pieces .d { display: block; font-size: 15px; line-height: 1.6; color: var(--ink-3); }
.pieces .num {
  display: block; margin-top: 12px;
  font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--c);
  font-variant-numeric: tabular-nums;
}
.pieces .num small { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; line-height: 1.4; margin-top: 2px; }
.pieces .t-1 { --c: var(--plum); }
.pieces .t-2 { --c: var(--celadon); }
.pieces .t-3 { --c: var(--ochre); }
.pieces .t-4 { --c: var(--cobalt); }

/* ====================== split figure rows ===================== */

.split {
  display: grid; gap: 52px; align-items: center;
  margin-top: 34px;
  grid-template-columns: 1fr 1fr;
}
.split.flip > .split-fig { order: 2; }
.split.flip > .split-txt { order: 1; }
.split.wide-fig { grid-template-columns: 1.15fr 0.85fr; }

.split-fig {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.split-fig img { width: 100%; display: block; }
.split-fig .fig-cap { font-size: 14.5px; }

.split-txt h4 { font-size: 22px; font-weight: 700; letter-spacing: -.012em; color: var(--ink); margin-bottom: 12px; }
.split-txt p { font-size: 17.5px; line-height: 1.74; color: var(--ink-2); }
.split-txt p + p { margin-top: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.chip .mono { font-size: 13px; }

/* ========================== method ============================ */

.objective {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.objective .eq {
  display: flex; align-items: center; justify-content: center;
  padding: 26px 44px;
  background: var(--deep-2); color: #e4e9f2;
  font-family: var(--mono); font-size: 23px; white-space: nowrap;
}
.objective .eq .t1 { color: #a9c5f0; }
.objective .eq .t2 { color: #f3a49b; }
.objective .eq .t3 { color: #c7b9f2; }
.objective .terms { display: grid; grid-template-columns: repeat(3, 1fr); }
.objective .term { padding: 24px 28px; border-left: 1px solid var(--line); }
.objective .term:first-child { border-left: 0; }
.objective .term .k { font-size: 16.5px; font-weight: 750; color: var(--c); margin-bottom: 4px; }
.objective .term p { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.objective .tm-1 { --c: var(--cobalt); }
.objective .tm-2 { --c: var(--cinnabar); }
.objective .tm-3 { --c: var(--indigo); }

.plate {
  margin-top: 34px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--indigo-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.plate .lhs { padding: 34px 38px; }
.plate .rhs {
  padding: 34px 38px;
  background: var(--indigo-soft);
  border-left: 1px solid var(--indigo-line);
  display: flex; flex-direction: column; justify-content: center;
}
.plate h4 { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.plate p { font-size: 17px; line-height: 1.72; color: var(--ink-2); }
.plate p + p { margin-top: 13px; }

.formula { font-family: var(--mono); font-size: 16px; line-height: 2; color: var(--indigo); white-space: nowrap; }
.formula .var { color: var(--ink); font-weight: 600; }
.plate .rhs .note-small { margin-top: 16px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); white-space: normal; }

.note {
  margin-top: 34px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 22px 28px;
  font-size: 16.5px; line-height: 1.72; color: var(--ink-2);
}
.note h4 { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.note strong { color: var(--ink); }

/* =========================== tables =========================== */

.table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tbl th, table.tbl td { padding: 10px 12px; white-space: nowrap; }
table.tbl.dense { font-size: 14px; }
table.tbl.dense th, table.tbl.dense td { padding: 9px 9px; }

table.tbl thead th {
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); text-align: right;
  border-bottom: 2px solid var(--line-2);
  background: #f8fafd;
}
table.tbl thead tr.grp th {
  text-align: center; text-transform: none; letter-spacing: 0;
  font-size: 14px; font-weight: 750; color: var(--ink);
  border-bottom: 1px solid var(--line-2);
}
table.tbl thead tr.grp th.blank { border-bottom: 0; }
table.tbl th.sep, table.tbl td.sep { border-left: 1px solid var(--line-2); }
table.tbl thead th.l, table.tbl td.l { text-align: left; }
table.tbl td { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
table.tbl td.l { color: var(--ink); font-weight: 550; }

table.tbl tbody tr + tr td { border-top: 1px solid var(--line); }
table.tbl tbody tr:hover td { background: #f4f7fc; }

table.tbl tr.group td {
  padding-top: 16px;
  font-size: 12.5px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3);
}
table.tbl tr.base td { color: var(--ink-3); font-style: italic; }
table.tbl tr.base td.l { font-weight: 500; }

table.tbl tr.ours td {
  background: var(--accent-soft);
  color: var(--ink); font-weight: 650;
  border-top: 2px solid var(--accent-line) !important;
  border-bottom: 2px solid var(--accent-line);
}
table.tbl tr.ours td.l { color: var(--accent); font-weight: 800; }
table.tbl tr.ours:hover td { background: var(--accent-soft); }

table.tbl .best { font-weight: 800; color: var(--ink); }
table.tbl tr.ours .best { color: var(--accent); }
table.tbl .ci { font-size: 12px; color: var(--ink-3); font-weight: 400; }
table.tbl tfoot td {
  text-align: left; white-space: normal;
  font-size: 13.5px; color: var(--ink-3);
  border-top: 1px solid var(--line);
}

.tbl-cap { margin-top: 16px; font-size: 15px; line-height: 1.65; color: var(--ink-3); max-width: 100ch; }
.tbl-cap .lbl { font-weight: 750; color: var(--ink); margin-right: 6px; }

.table-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.table-duo .tbl-cap { font-size: 14.5px; }

.findings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.finding {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--c);
  border-radius: var(--radius-md); padding: 18px 22px;
  box-shadow: var(--shadow-xs);
}
.finding .k { font-size: 16.5px; font-weight: 750; color: var(--ink); margin-bottom: 4px; }
.finding p { font-size: 15px; line-height: 1.62; color: var(--ink-2); }
.finding .big { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--c); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.finding.f-rot { --c: var(--cinnabar); }
.finding.f-anc { --c: var(--cobalt); }
.finding.f-pref { --c: var(--celadon); }

/* ===================== mechanism (dark band) ================== */

.band--deep .eyebrow { color: #9fc0f2; }
.band--deep .eyebrow::before { background: #9fc0f2; }

.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.chart {
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-deep);
  border-radius: var(--radius-md);
  padding: 24px 26px 22px;
}
.chart h3 { font-size: 18px; font-weight: 650; color: var(--ink-on-deep); }
.chart .unit { font-family: var(--mono); font-size: 12.5px; color: #8e9ab3; margin: 4px 0 22px; }
.chart-legend { margin-top: 18px; text-align: center; font-size: 14.5px; color: var(--ink-on-deep-2); }
.chart-legend .sw { display: inline-block; width: 22px; height: 10px; border-radius: 3px; margin: 0 7px 0 18px; vertical-align: 1px; }
.chart-legend .sw.bare { background: linear-gradient(90deg, #4d5d7e, #6a7ca0); }
.chart-legend .sw.hot { background: linear-gradient(90deg, #b42f2a, #e86f63); }
.nowrap { white-space: nowrap; }

.bars { display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 112px 1fr auto; gap: 12px; align-items: center; }
.bar-row .name { font-size: 14px; color: var(--ink-on-deep-2); text-align: right; line-height: 1.3; }
.bar-row.hot .name { color: #ffb1a8; font-weight: 650; }

.bar-track { height: 24px; border-radius: var(--radius-xs); background: rgba(255,255,255,.07); overflow: hidden; }
.bar-fill {
  height: 100%; width: 0; border-radius: var(--radius-xs);
  background: linear-gradient(90deg, #4d5d7e, #6a7ca0);
  transition: width 950ms var(--ease);
}
.bar-row.hot .bar-fill { background: linear-gradient(90deg, #b42f2a, #e86f63); }

.bar-row .val {
  min-width: 3.4em; text-align: right;
  font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums;
  color: var(--ink-on-deep-2);
}
.bar-row.hot .val { color: #ffb1a8; font-weight: 700; }

.chart .foot {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-deep);
  font-size: 14px; line-height: 1.6; color: #9eaac2;
}

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.callout {
  border-left: 4px solid #e86f63;
  background: rgba(255,255,255,.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 22px 28px;
  font-size: 16.5px; line-height: 1.7; color: var(--ink-on-deep-2);
}
.callout h4 { font-size: 18px; font-weight: 700; color: var(--ink-on-deep); margin-bottom: 6px; }
.callout strong { color: #ffd0ca; font-weight: 700; }
.callout .pair { display: flex; align-items: baseline; gap: 14px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.callout .pair .from { font-size: 34px; font-weight: 800; color: #dce3ee; letter-spacing: -.02em; }
.callout .pair .arrow { font-size: 22px; color: #8e9ab3; }
.callout .pair .to { font-size: 34px; font-weight: 800; color: #ff9d92; letter-spacing: -.02em; }
.callout .lab { display: block; margin-bottom: 10px; font-size: 13.5px; color: #8e9ab3; }

/* ======================== case studies ======================== */

/* system identity colours follow the paper's case cards; AXIS keeps this
   page's cinnabar and is the only system with a thick rule and a marker */
.sys-base    { --sc: #6b7280; }
.sys-dpo     { --sc: #334155; }
.sys-rot     { --sc: #0e7490; }
.sys-alpha   { --sc: #a16207; }
.sys-simper  { --sc: #0369a1; }
.sys-door    { --sc: #4d7c0f; }
.sys-deepal  { --sc: #7e22ce; }
.sys-booster { --sc: #4338ca; }
.sys-axis    { --sc: var(--cinnabar); }

.v-good { --vc: var(--celadon); --vs: var(--celadon-soft); }
.v-bad  { --vc: var(--plum);    --vs: var(--plum-soft); }
.v-warn { --vc: var(--ochre);   --vs: var(--ochre-soft); }
table.tbl td .v-good, table.tbl td .v-bad { color: var(--vc); font-weight: 650; }

.content-warning {
  margin: 0 0 22px; padding: 14px 20px;
  border: 1px solid rgba(200, 30, 30, .35); border-left: 4px solid #c81e1e;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #fdeaea; color: #b01818; font-size: 15.5px; font-weight: 550;
}
.content-warning strong { color: #b01818; font-weight: 800; }

.case-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 14px 18px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
  font-size: 14px; color: var(--ink-2);
}
.case-legend .lg { display: inline-flex; align-items: center; gap: 7px; color: var(--sc); font-weight: 600; }
.case-legend .lg::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--sc); }
.case-legend .lg.sys-axis::before { width: 5px; }
.case-legend .lg-sep { width: 1px; height: 18px; background: var(--line-2); }

.group-intro { margin: -6px 0 18px; max-width: 92ch; font-size: 16.5px; line-height: 1.7; color: var(--ink-2); }
.cross-table { margin-bottom: 4px; max-width: 860px; }
.cross-table thead th code { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.cross-table + .tbl-cap { margin-bottom: 22px; }

.case-list { display: grid; gap: 12px; }

details.case {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
  overflow: hidden;
}
details.case[open] { box-shadow: var(--shadow-sm); border-color: var(--line-2); }
details.case > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 92px 128px 200px 1fr 18px; gap: 14px; align-items: center;
  padding: 15px 20px;
}
details.case > summary::-webkit-details-marker { display: none; }
details.case > summary:hover { background: #f8fafd; }
details.case .cid { font-weight: 800; color: var(--ink); font-size: 16px; }
details.case .ckind { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
details.case .cprov { font-size: 13.5px; color: var(--ink-3); }
details.case .cprov code { font-size: 12.5px; }
details.case .cverdicts { display: flex; flex-wrap: wrap; gap: 6px; }
details.case .chev {
  width: 9px; height: 9px; justify-self: end;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform var(--fast) var(--ease);
}
details.case[open] .chev { transform: rotate(-135deg); }

.chip-v {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--vs); color: var(--vc); border: 1px solid transparent;
}
.chip-v i { width: 7px; height: 7px; border-radius: 50%; background: var(--vc); display: inline-block; }

.case-body { padding: 4px 22px 22px; border-top: 1px solid var(--line); }
.case-body .blk { margin-top: 16px; padding: 12px 16px; border-left: 3px solid var(--bc); background: var(--bs); border-radius: 0 var(--radius-xs) var(--radius-xs) 0; }
.case-body .blk.intent { --bc: var(--cobalt); --bs: var(--cobalt-soft); }
.case-body .blk.prompt { --bc: var(--ochre); --bs: var(--ochre-soft); }
.case-body .blk-lab, .case-body .resp-head {
  font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 6px;
}
.case-body .resp-head { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.case-body .case-note { margin-top: 12px; font-size: 14.5px; font-style: italic; color: var(--ink-3); }
.case-body p { font-size: 15.5px; line-height: 1.7; color: var(--ink); }
.case-body p + p { margin-top: 6px; }

.case-body .resp {
  margin-top: 10px; padding: 11px 16px;
  border-left: 3px solid var(--sc);
  background: color-mix(in srgb, var(--sc) 5%, white);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}
.case-body .resp.ours { border-left-width: 5px; background: var(--cinnabar-soft); }
.case-body .resp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.case-body .resp .sys { font-size: 14px; font-weight: 700; color: var(--sc); }
.case-body .verdict {
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--vc);
}

.zh { font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif; font-size: 1.04em; }
.gloss { display: block; margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.gloss .gl {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--ink-3);
  margin-right: 7px; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px;
}

/* =========================== bibtex =========================== */

.bib {
  background: var(--deep-2); color: #d2dae8;
  border-radius: var(--radius-md);
  padding: 26px 30px;
  /* 13.5px keeps arXiv's long author line verbatim on one line at full page width */
  font-family: var(--mono); font-size: 13.5px; line-height: 1.8;
  overflow-x: auto;
  border: 1px solid rgba(0,0,0,.3);
}
.bib .fld { color: #a8c7f0; }

/* =========================== footer =========================== */

.footer { background: var(--paper-alt); border-top: 1px solid var(--line); padding: 40px 0 52px; }
.footer .cols { display: grid; grid-template-columns: 1fr; gap: 40px; }
.footer h5 {
  font-size: 12.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}
.footer p, .footer li { font-size: 15px; line-height: 1.7; color: var(--ink-3); }
.footer ul { list-style: none; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--cobalt); }
