/* Theos Atlas */
:root {
  --paper: #f7f6f2; --surface: #ffffff; --surface2: #f0efe9; --ink: #15171c; --ink2: #4a515e; --muted: #8a909b;
  --rule: #e5e3dc; --rule2: #cfccc2; --focus: #3b5bdb;
  --god: #4361ee; --nat: #e8731f; --god-soft: #e8ecfd; --nat-soft: #fdeee2; --god-b: #3a55e0; --nat-b: #c4570f;
  --h-CT: #2440c4; --h-PC: #4e74f0; --h-DE: #93aefc; --h-MTI: #6a45dd; --h-NPM: #ab90f7;
  --h-IDL: #f2b51f; --h-N1: #f08a33; --h-NM: #d4522a; --h-OTH: #aab0ba;
  --v-doi: #2f9e44; --v-title: #94d82d; --v-cat: #15aabf; --v-hand: #f2b51f; --v-url: #ced4da;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 16px; --r-s: 10px;
  --shadow: 0 1px 2px rgba(22, 24, 34, .05), 0 10px 30px rgba(22, 24, 34, .07);
  --shadow-l: 0 2px 6px rgba(22, 24, 34, .08), 0 24px 60px rgba(22, 24, 34, .16);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1115; --surface: #171a21; --surface2: #1e222b; --ink: #eef0f4; --ink2: #b4bbc7; --muted: #7e8693;
    --rule: #262b34; --rule2: #39404b; --focus: #8ea2ff;
    --god: #6f87ff; --nat: #ff9b4f; --god-soft: #1d2440; --nat-soft: #3a2616; --god-b: #4f69f2; --nat-b: #d0631d;
    --h-CT: #4a64ea; --h-PC: #6f8ff7; --h-DE: #a3bbff; --h-MTI: #8566f0; --h-NPM: #b9a2fb;
    --h-IDL: #f2bf3a; --h-N1: #f59a4c; --h-NM: #e2683f; --h-OTH: #8c939e;
    --v-url: #4a5260;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    --shadow-l: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #0f1115; --surface: #171a21; --surface2: #1e222b; --ink: #eef0f4; --ink2: #b4bbc7; --muted: #7e8693;
    --rule: #262b34; --rule2: #39404b; --focus: #8ea2ff;
    --god: #6f87ff; --nat: #ff9b4f; --god-soft: #1d2440; --nat-soft: #3a2616; --god-b: #4f69f2; --nat-b: #d0631d;
    --h-CT: #4a64ea; --h-PC: #6f8ff7; --h-DE: #a3bbff; --h-MTI: #8566f0; --h-NPM: #b9a2fb;
    --h-IDL: #f2bf3a; --h-N1: #f59a4c; --h-NM: #e2683f; --h-OTH: #8c939e;
    --v-url: #4a5260;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    --shadow-l: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.k { font: 600 .7rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: -.01em; text-wrap: balance; }

/* ---------------- header */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 18px; padding: 10px 22px;
  background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: #1c2140; display: flex; gap: 3px; align-items: center; justify-content: center; flex: none; }
.logo i { width: 8px; height: 15px; border-radius: 2px; background: var(--h-PC); }
.logo i + i { background: var(--h-N1); }
.brand-t { display: flex; flex-direction: column; line-height: 1.1; }
.brand-t b { font: 600 1.08rem/1.1 var(--display); white-space: nowrap; }
.brand-t small { font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.rooms { display: flex; gap: 4px; margin: 0 auto; background: var(--surface2); padding: 4px; border-radius: 999px; }
.rooms button { display: flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--ink2); transition: background .2s, color .2s; }
.rooms button:hover { color: var(--ink); }
.rooms button[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.tools { display: flex; gap: 6px; }
.tools a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; color: var(--ink2); text-decoration: none; font-size: .85rem; font-weight: 500; }
.tools a:hover, .tbtn:hover { background: var(--surface2); color: var(--ink); }
.tbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--ink2); }

/* ---------------- live answer bar */
.bar { position: sticky; top: 55px; z-index: 30; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 10px 22px 12px;
  background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.bar .pg { display: flex; align-items: baseline; gap: 10px; }
.bar .pg b { font: 600 2.1rem/1 var(--mono); letter-spacing: -.04em; transition: color .3s; }
.bar .pg span { font-size: .8rem; color: var(--ink2); line-height: 1.25; max-width: 13ch; }
.strip { position: relative; height: 34px; }
.strip .seg { position: absolute; top: 9px; height: 16px; border-radius: 3px; transition: left .7s var(--ease), width .7s var(--ease); }
.strip .split { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 2px; transition: left .7s var(--ease); }
.strip .lab { position: absolute; top: -3px; font: 600 .68rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transition: left .7s var(--ease); }
.strip .lab.g { color: var(--god); transform: translateX(-100%); padding-right: 8px; }
.strip .lab.n { color: var(--nat); padding-left: 8px; }
.strip .lab.g, .strip .lab.n { top: auto; bottom: -4px; }
.bar .state { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink2); min-width: 150px; justify-content: flex-end; }
.bar .state .tag { padding: 4px 10px; border-radius: 999px; background: var(--surface2); white-space: nowrap; }
.bar .state .tag.mine { background: var(--god-soft); color: var(--god); font-weight: 600; }
.bar .state button.reset { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule2); font-size: .8rem; font-weight: 600; }
.bar .state button.reset:hover { background: var(--surface); }
.busy .pg b { color: var(--muted); }
.spin { width: 14px; height: 14px; border: 2px solid var(--rule2); border-top-color: var(--god); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- layout */
main { max-width: 1180px; margin: 0 auto; padding: 8px 22px 80px; outline: none; }
.room-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 12px 0 16px; }
.room-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; }
.room-head p { margin: 4px 0 0; color: var(--ink2); max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 18px 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; font-weight: 600; font-size: .88rem; background: var(--ink); color: var(--paper); transition: transform .15s, opacity .2s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--rule2); }
.seg-c { display: inline-flex; background: var(--surface2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-c button { padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--ink2); white-space: nowrap; transition: background .2s, color .2s; }
.seg-c button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--rule2); background: var(--surface); font-size: .84rem; font-weight: 500; color: var(--ink2); transition: all .2s; }
.chip:hover { border-color: var(--ink2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip svg.i { width: 15px; height: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--rule2); flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.grade { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font: 600 .78rem/1 var(--mono); background: var(--surface2); color: var(--ink2); }
.grade.A, .grade.B { background: #d3f0de; color: #17643a; }
.grade.C { background: #e6ebff; color: #2f47b5; }
.grade.D { background: #fbefd3; color: #8a5a00; }
.grade.E, .grade.F { background: #fadcd6; color: #9b2d1b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .grade.A, :root:not([data-theme="light"]) .grade.B { background: #173826; color: #8be0aa; }
  :root:not([data-theme="light"]) .grade.C { background: #1e2650; color: #a8b7ff; }
  :root:not([data-theme="light"]) .grade.D { background: #3a2c10; color: #f3c46b; }
  :root:not([data-theme="light"]) .grade.E, :root:not([data-theme="light"]) .grade.F { background: #3d1c16; color: #f4a493; }
}

/* ---------------- answer room */
.controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.mosaic-card { padding: 16px; position: relative; }
.colhead { position: relative; height: 26px; margin-bottom: 6px; }
.colhead span { position: absolute; top: 0; display: flex; align-items: baseline; gap: 6px; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: left .8s var(--ease), opacity .3s; }
.colhead span b { font: 600 1.05rem/1 var(--mono); }
.colhead .g { color: var(--god); }
.colhead .n { color: var(--nat); }
.mosaic { position: relative; height: clamp(320px, 52vh, 470px); }
.tile { position: absolute; border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 10px 12px; text-align: left;
  transition: left .8s var(--ease), top .8s var(--ease), width .8s var(--ease), height .8s var(--ease), filter .2s, box-shadow .2s; }
.tile:hover { filter: brightness(1.06) saturate(1.05); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); z-index: 2; }
.tile b { font: 600 clamp(.82rem, 1.25vw, 1rem)/1.15 var(--body); text-wrap: balance; }
.tile .v { font: 600 clamp(1rem, 2.2vw, 1.7rem)/1.05 var(--mono); letter-spacing: -.03em; margin-top: 3px; }
.tile .fam { position: absolute; top: 9px; left: 12px; font: 600 .62rem/1 var(--body); letter-spacing: .09em; text-transform: uppercase; opacity: .78; }
.tile.dark { color: #fff; }
.tile.light { color: #16181d; }
.tile.s .v { font-size: .95rem; }
.tile.xs b, .tile.xs .fam { display: none; }
.tile.xs .v { font-size: .8rem; }
.tile.xxs > * { display: none; }
.tile.line { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; }
.tile.line b { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.line .v { font-size: .92rem; margin: 0; }
.tile.dim { filter: saturate(.25) opacity(.55); }
.noanim .tile, .noanim .seg { transition: none !important; }
.mosaic-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.fams { display: flex; gap: 16px; flex-wrap: wrap; font-size: .84rem; color: var(--ink2); }
.fams span { display: inline-flex; align-items: center; gap: 7px; }
.fams i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fams b { font-family: var(--mono); color: var(--ink); }
.takeaway { font-size: .9rem; color: var(--ink2); }
.takeaway b { color: var(--ink); }
.replay { display: flex; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.replay button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface2); color: var(--muted); transition: all .25s; }
.replay button.on { color: #fff; }
.replay button.on.up { background: var(--god); }
.replay button.on.down { background: var(--nat); }
.replay button.cur { transform: translateY(-3px) scale(1.08); box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }
.cap { position: absolute; left: 50%; top: 56px; transform: translate(-50%, 0); z-index: 5; pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 9px 15px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-weight: 600; box-shadow: var(--shadow-l); opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cap.show { opacity: 1; }
.cap .d { font-family: var(--mono); }
.cap .d.up { color: #9fb3ff; }
.cap .d.down { color: #ffbc85; }
.whatif { margin-top: 18px; }
.room-head p a { color: var(--god); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
#defs { scroll-margin-top: 140px; }
.defs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dcol { display: flex; flex-direction: column; gap: 8px; }
.dfam { padding: 0 4px 2px; }
.dfam .k { display: block; margin-bottom: 4px; }
.dfam b { font: 600 1.08rem/1.2 var(--display); }
.dfam b .num { font-size: .92rem; color: var(--ink2); margin-left: 4px; }
.dfam p { margin: 3px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.dcard { position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 13px 17px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .15s, box-shadow .2s; }
.dcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--c); }
.dcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dcard .dn { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dcard .dn i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.dcard .dn .num { margin-left: auto; font-size: .9rem; color: var(--ink2); }
.dcard .dd { font-size: .86rem; line-height: 1.45; }
.dcard .de { font-size: .78rem; line-height: 1.4; color: var(--muted); }
.eg { margin: -8px 0 16px; font-size: .86rem; color: var(--muted); }
.whatif .k { display: block; margin-bottom: 8px; }

/* ---------------- drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 18, .28); opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); box-shadow: var(--shadow-l);
  transform: translateX(104%); transition: transform .35s var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.drawer.wide { width: min(720px, 100vw); }
.drawer.open { transform: none; }
.drawer .in { padding: 22px 24px 40px; }
.drawer .x { position: sticky; top: 0; float: right; margin: -6px -8px 0 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); z-index: 2; }
.drawer .x:hover { background: var(--rule); }
.dh { display: flex; gap: 12px; align-items: center; margin: 2px 40px 10px 0; }
.dh .sw { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #fff; }
.dh .sw svg.i { width: 22px; height: 22px; }
.dh h2 { font-size: 1.55rem; line-height: 1.1; }
.plain { font-size: 1.04rem; color: var(--ink2); margin: 6px 0 16px; }
.ba { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-s); background: var(--surface2); margin-bottom: 18px; }
.ba div { display: flex; flex-direction: column; }
.ba small { font-size: .74rem; color: var(--muted); }
.ba b { font: 600 1.6rem/1.1 var(--mono); letter-spacing: -.03em; }
.ba .arr { color: var(--muted); }
.ba .chg { margin-left: auto; font: 600 .95rem var(--mono); padding: 4px 10px; border-radius: 999px; }
.ba .chg.up { background: var(--god-soft); color: var(--god); }
.ba .chg.down { background: var(--nat-soft); color: var(--nat); }
.ba .chg.own { background: var(--surface); border: 1px solid var(--rule2); }
.pill[style*="--hc"].up .f { color: var(--hc); }
.pill[style*="--hc"].down .f { color: var(--ink2); }
.drawer h4 { font: 600 .74rem/1 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 20px 0 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface2); font-size: .84rem; font-weight: 500; }
.pill svg.i { width: 15px; height: 15px; }
.pill .f { font: 600 .8rem var(--mono); }
.pill.up .f { color: var(--god); }
.pill.down .f { color: var(--nat); }
button.pill:hover { background: var(--rule); }
.fo { display: grid; grid-template-columns: 178px 1fr; gap: 4px 10px; align-items: center; font-size: .82rem; margin-top: 8px; }
.fo .nm { display: flex; align-items: center; gap: 6px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo .nm svg.i { width: 14px; height: 14px; }
.fo .tr { position: relative; height: 18px; }
.fo .tr::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--rule2); }
.fo .b { position: absolute; top: 4px; height: 10px; border-radius: 3px; }
.fo-head { display: flex; justify-content: space-between; font-size: .76rem; font-weight: 600; margin: 10px 0 2px 188px; }
.keyline { font-size: .78rem; color: var(--muted); margin: -4px 0 8px; }
.fo-tot { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-s); background: var(--surface2); font-size: .9rem; }
select.sel { font: inherit; font-weight: 600; padding: 7px 30px 7px 12px; border-radius: 10px; border: 1px solid var(--rule2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a909b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink); appearance: none; }
details.more { margin-top: 16px; border-top: 1px solid var(--rule); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--ink2); list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary svg.i { transition: transform .2s; width: 15px; height: 15px; }
details.more[open] summary svg.i { transform: rotate(90deg); }
details.more p { font-size: .9rem; color: var(--ink2); }

/* ---------------- evidence room */
.scale-card { padding: 10px 16px 14px; overflow: hidden; }
.scale-svg { width: 100%; height: auto; display: block; }
.scale-svg .beam { transition: transform 1s cubic-bezier(.34, 1.4, .5, 1); }
.scale-svg .pan { transition: transform 1s cubic-bezier(.34, 1.4, .5, 1); }
.scale-svg .blk { cursor: pointer; transition: transform .6s var(--ease), opacity .4s; }
.scale-svg .blk rect { transition: filter .2s; }
.scale-svg .blk:hover rect { filter: brightness(1.08); }
.scale-svg .blk text { font: 600 13px var(--body); fill: #fff; pointer-events: none; }
.scale-svg .blk text.v { font: 600 12px var(--mono); }
.scale-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 2px 6px 4px; }
.scale-sum .ln, .scale-sum .rn { font: 600 .74rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.scale-sum .ln { color: var(--nat); }
.scale-sum .rn { color: var(--god); text-align: right; }
.scale-sum .net { font: 500 1rem var(--mono); color: var(--ink2); text-align: center; }
.scale-sum .net b { color: var(--ink); font-weight: 600; font-size: 1.15rem; }
.evlist { margin-top: 16px; }
.evrow { display: grid; grid-template-columns: 44px 34px minmax(0, 1.3fr) minmax(120px, 1fr) 64px; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--rule); }
.evrow:last-child { border-bottom: 0; }
.evrow .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.evrow .t { min-width: 0; text-align: left; }
.evrow .t b { display: block; font-weight: 600; }
.evrow .t span { display: block; font-size: .83rem; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evrow .t:hover b { text-decoration: underline; text-underline-offset: 3px; }
.evrow .db { position: relative; height: 14px; }
.evrow .db::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--rule2); }
.evrow .db i { position: absolute; top: 2px; height: 10px; border-radius: 3px; transition: opacity .3s; }
.evrow .p { font: 600 .9rem var(--mono); text-align: right; }
.evrow.off { opacity: .45; }
.evrow.off .db i { opacity: .3; }
.lik { display: grid; grid-template-columns: 130px 1fr 42px; gap: 6px 10px; align-items: center; font-size: .84rem; }
.lik .nm { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.lik .nm i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.lik .tr { position: relative; height: 16px; border-radius: 8px; background: var(--surface2); }
.lik .rg { position: absolute; top: 4px; height: 8px; border-radius: 4px; opacity: .45; }
.lik .md { position: absolute; top: 1px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--surface); }
.lik .v { font: 600 .8rem var(--mono); text-align: right; color: var(--ink2); }
.lik-axis { display: flex; justify-content: space-between; margin: 4px 52px 0 140px; font-size: .72rem; color: var(--muted); }
.kv { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.kv span { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--ink2); }
.crux { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--rule2); background: var(--surface2); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: .92rem; }
.alist { display: flex; flex-direction: column; gap: 6px; }
.alist button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: var(--r-s); background: var(--surface2); font-size: .88rem; }
.alist button:hover { background: var(--rule); }
.alist button span:nth-child(2) { flex: 1; }
.leave { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: var(--r-s); border: 1px solid var(--rule2); font-weight: 600; font-size: .9rem; }

/* ---------------- you room */
.you { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.qs { display: flex; flex-direction: column; gap: 10px; }
.q { padding: 14px 16px; }
.q .qh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.q .qh b { font-weight: 600; font-size: .98rem; }
.q .qh .k { white-space: nowrap; }
.opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.opts button { padding: 8px 9px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); font-size: .82rem; line-height: 1.25; text-align: left; transition: all .15s; display: flex; flex-direction: column; gap: 3px; }
.opts button:hover { border-color: var(--ink2); }
.opts button small { font: 600 .74rem var(--mono); color: var(--muted); }
.opts button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.opts button[aria-pressed="true"] small { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.opts button.mix { font-weight: 600; }
.prior-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; min-width: 160px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--nat), var(--rule2) 50%, var(--god)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); cursor: grab; }
input[type=range]:disabled { opacity: .35; }
.pv { font: 600 1.3rem var(--mono); min-width: 3.4ch; text-align: right; }
.res { position: sticky; top: 132px; padding: 20px; }
.res .big { font: 600 3.4rem/1 var(--mono); letter-spacing: -.05em; }
.res .dl { font-weight: 600; margin-top: 4px; }
.res .dl.up { color: var(--god); }
.res .dl.down { color: var(--nat); }
.track { position: relative; height: 150px; margin: 18px 4px 6px; }
.track .ln { position: absolute; left: 0; right: 0; top: 74px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--nat), var(--rule2) 50%, var(--god)); }
.track .ar { position: absolute; top: 66px; width: 2px; height: 20px; margin-left: -1px; background: var(--ink2); }
.track .al { position: absolute; font-size: .7rem; color: var(--ink2); transform: translateX(-50%); text-align: center; width: 86px; line-height: 1.2; }
.track .al b { display: block; font: 600 .78rem var(--mono); color: var(--ink); }
.track .al.t { bottom: 88px; }
.track .al.b { top: 90px; }
.track .you-m { position: absolute; top: 56px; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 700 .7rem var(--body);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25); transition: left .8s var(--ease); z-index: 2; }
.track .ax { position: absolute; top: 132px; font-size: .7rem; color: var(--muted); }
.levers { margin-top: 12px; font-size: .86rem; }
.levers div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); }
.levers b { font-family: var(--mono); }

/* ---------------- library */
.lib-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 220px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule2); }
.search input { border: 0; outline: 0; background: none; font: inherit; flex: 1; color: var(--ink); min-width: 0; }
.lib-sum { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 18px; font-size: .85rem; color: var(--ink2); }
.lib-sum .sb { display: flex; height: 10px; width: 220px; border-radius: 5px; overflow: hidden; background: var(--surface2); }
.lib-sum .sb i { display: block; height: 100%; }
.side-for { --side: var(--god); }
.side-against { --side: var(--nat); }
.side-neutral { --side: var(--h-OTH); }
.shelf { margin-bottom: 22px; }
.shelf h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.shelf h3 small { font: 600 .78rem var(--mono); color: var(--muted); }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.book { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 96px; padding: 11px 12px 10px 15px; text-align: left; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .15s, box-shadow .2s, opacity .2s; }
.book::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--side); }
.book:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.book b { font-weight: 600; font-size: .9rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.book .bm { display: flex; justify-content: space-between; align-items: center; font-size: .74rem; color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.steps { position: relative; margin-top: 8px; }
.step { position: relative; padding: 0 0 18px 34px; }
.step::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--rule); }
.step:last-child::before { display: none; }
.step .dot { position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); color: var(--ink2); }
.step .dot svg.i { width: 13px; height: 13px; }
.step .sl { font: 600 .72rem/1 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 7px 0 6px; }
.step .tx { font-size: .94rem; color: var(--ink); }
.step .tx p { margin: 0 0 8px; }
.step .tg { font-size: .82rem; font-weight: 600; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.verdict { margin-top: 6px; padding: 14px 16px; border-radius: var(--r-s); background: var(--surface2); display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.verdict .bfv { font: 600 1.25rem var(--mono); }
.srcs { display: flex; flex-direction: column; gap: 2px; font-size: .84rem; }
.srcs a, .srcs span.s { display: flex; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed var(--rule); text-decoration: none; color: var(--ink2); }
.srcs a:hover { color: var(--ink); }
.srcs i { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; }

/* ---------------- method */
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.numbers .n { padding: 16px 18px; }
.numbers .n b { display: block; font: 600 clamp(1.5rem, 3vw, 2.2rem)/1.05 var(--mono); letter-spacing: -.04em; }
.numbers .n span { font-size: .84rem; color: var(--ink2); }
.dots-wrap { position: relative; }
canvas.dots { width: 100%; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: .82rem; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend b { font-family: var(--mono); color: var(--ink); }
.tl-svg { width: 100%; height: auto; display: block; }
.tl-svg text { font: 500 12px var(--body); fill: var(--ink2); }
.tl-svg text.v { font: 600 13px var(--mono); fill: var(--ink); }
.studies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.study { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.study .q2 { font-weight: 600; line-height: 1.3; }
.study .a { font: 600 1.25rem/1.1 var(--display); }
.study .d { font-size: .82rem; color: var(--ink2); }
.study .badge { align-self: flex-start; font: 600 .68rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: var(--surface2); color: var(--ink2); }
.settle .track2 { position: relative; height: 92px; margin: 26px 10px 8px; }
.settle .base { position: absolute; left: 0; right: 0; top: 40px; height: 8px; border-radius: 4px; background: var(--surface2); }
.settle .band { position: absolute; top: 40px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--nat), var(--god)); opacity: .55; }
.settle .needle { position: absolute; top: 18px; width: 4px; height: 52px; margin-left: -2px; border-radius: 2px; background: var(--ink); transition: left .9s cubic-bezier(.34, 1.3, .5, 1); }
.settle .needle b { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font: 600 1.1rem var(--mono); white-space: nowrap; }
.settle .tick { position: absolute; top: 58px; font-size: .72rem; color: var(--muted); transform: translateX(-50%); }
.settle .bl { position: absolute; top: 70px; font-size: .74rem; font-weight: 600; transform: translateX(-50%); white-space: nowrap; }
.limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.limits div { padding: 14px 16px; border-radius: var(--r-s); background: var(--surface2); font-size: .9rem; display: flex; gap: 10px; }
.limits svg.i { color: var(--muted); margin-top: 2px; }
.sect { margin: 26px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sect h2 { font-size: 1.35rem; }
.sect span { font-size: .86rem; color: var(--ink2); }
.foot { margin-top: 34px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- tooltip + toast */
.tip { position: fixed; z-index: 80; pointer-events: none; max-width: 280px; padding: 8px 11px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: .8rem; line-height: 1.35; opacity: 0; transition: opacity .12s; box-shadow: var(--shadow-l); }
.tip.show { opacity: 1; }
.tip b { font-weight: 600; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: .88rem; opacity: 0; transition: all .3s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.fade-in { animation: fade .45s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- responsive */
@media (max-width: 1020px) {
  .you { grid-template-columns: 1fr; }
  .res { position: static; }
  .studies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .defs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .top { padding: 9px 14px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
  .brand-t small { display: none; }
  .tools a span { display: none; }
  .rooms { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; z-index: 50; border-radius: 0; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--rule); }
  .rooms button { flex-direction: column; gap: 3px; padding: 6px 8px; font-size: .68rem; border-radius: 12px; }
  .rooms button[aria-current="page"] { box-shadow: none; background: var(--surface2); }
  .bar { top: 50px; grid-template-columns: auto 1fr; gap: 12px; padding: 8px 14px 10px; }
  .bar .state { grid-column: 1 / -1; justify-content: flex-start; min-width: 0; }
  .bar .pg b { font-size: 1.7rem; }
  .bar .pg span { display: none; }
  main { padding: 6px 14px 110px; }
  .grid2, .limits { grid-template-columns: 1fr; }
  .mosaic { height: 380px; }
  .evrow { grid-template-columns: 40px 30px minmax(0, 1fr) 56px; }
  .evrow .db { display: none; }
  .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer, .drawer.wide { top: auto; width: 100vw; max-height: 88vh; border-radius: 20px 20px 0 0; transform: translateY(104%); }
  .drawer.open { transform: none; }
  .fo { grid-template-columns: 124px 1fr; }
  .fo-head { margin-left: 134px; }
  .tile b { font-size: .74rem; }
  .colhead span { font-size: .8rem; }
  .lik { grid-template-columns: 112px 1fr 38px; font-size: .8rem; }
  .lik-axis { margin-left: 120px; }
  .scale-svg .blk text, .scale-svg .blk svg { display: none; }
  .scale-sum .net span { display: none; }
  .scale-sum .ln, .scale-sum .rn { font-size: .64rem; }
  .books { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .studies { grid-template-columns: 1fr; }
  .cap { top: 46px; font-size: .85rem; }
  .defs { grid-template-columns: 1fr; }
  #defs { scroll-margin-top: 156px; }
}
:root[data-theme="dark"] .grade.A, :root[data-theme="dark"] .grade.B { background: #173826; color: #8be0aa; }
:root[data-theme="dark"] .grade.C { background: #1e2650; color: #a8b7ff; }
:root[data-theme="dark"] .grade.D { background: #3a2c10; color: #f3c46b; }
:root[data-theme="dark"] .grade.E, :root[data-theme="dark"] .grade.F { background: #3d1c16; color: #f4a493; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
