/* SieveSci website — the specimen-sheet design language (docs/DESIGN_LANGUAGE.md).
   Square corners, 1 px rules, monospaced readouts, one accent colour.
   Solid frame = settled, dashed frame = provisional. */

:root {
  --accent: #4D6BFE;
  --ink: #18181B;
  --paper: #FFFFFF;
  --ok: #16935C;
  --warn: #C27C0E;
  --bad: #D93D3D;
  --info: #2F80ED;
  --verifier: #1E8780;
  --worker: #7D6C57;
  --rule: rgba(0, 0, 0, .24);
  --sep: rgba(0, 0, 0, .16);
  --hair: rgba(0, 0, 0, .08);
  --muted: rgba(24, 24, 27, .62);
  --faint: rgba(24, 24, 27, .42);
  --surface: #F2F3F5;
  --subtle: #F7F8FA;
  --sidebar: #F7F7F8;
  --raised: #FFFFFF;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, "Cascadia Mono", Consolas, "PingFang SC", monospace;
  --ease: cubic-bezier(.12, .23, .5, 1);
  --gutter: 32px;
  --max: 1200px;
  color-scheme: light;
}

.dark {
  --accent: #6E8AFF;
  --ink: #ECECEE;
  --paper: #1A1A1D;
  --ok: #4CC38A;
  --warn: #E8B04B;
  --bad: #F06A6A;
  --info: #6AA7FF;
  --verifier: #4FC3BA;
  --worker: #B8A992;
  --rule: rgba(255, 255, 255, .24);
  --sep: rgba(255, 255, 255, .16);
  --hair: rgba(255, 255, 255, .08);
  --muted: rgba(236, 236, 238, .64);
  --faint: rgba(236, 236, 238, .42);
  --surface: #2C2C31;
  --subtle: #232327;
  --sidebar: #202024;
  --raised: #27272B;
  color-scheme: dark;
}

.blue {
  --paper: #4D6BFE;
  --ink: #FFFFFF;
  --rule: rgba(255, 255, 255, .4);
  --muted: rgba(255, 255, 255, .78);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 56px; }
body {
  margin: 0;
  font: 15px/1.6 var(--sans);
  color: var(--ink);
  background: #1A1A1D;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
section, header.hero, footer { background: var(--paper); color: var(--ink); position: relative; }
a { color: inherit; }
img { max-width: 100%; display: block; }
code, kbd, pre, .mono { font-family: var(--mono); }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: flex-start;
  pointer-events: none;
}
.topbar a {
  pointer-events: auto; text-decoration: none;
  font: 500 12px/1 var(--sans);
  background: #fff; color: #18181B;
  padding: 7px 9px; display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.topbar a:hover { background: #18181B; color: #fff; }
.topbar .brand { font-weight: 600; font-size: 13px; padding: 5px 9px 5px 6px; }
.topbar .brand img { width: 20px; height: 20px; }
.topbar nav { display: flex; }
.topbar nav a.inv { background: #18181B; color: #fff; }
.topbar nav a.inv:hover { background: var(--accent); }
.topbar .stars { font-family: var(--mono); font-size: 11px; opacity: .7; }

/* ---------- Shared bits ---------- */
.tab {
  display: inline-block;
  font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: 4px 6px 3px;
  white-space: nowrap;
}
.tab.accent { background: var(--accent); color: #fff; }
.tab.ok { background: var(--ok); color: #fff; }
.tab.warn { background: var(--warn); color: #fff; }
.framed { position: relative; border: 1px solid var(--rule); }
.framed.dashed { border-style: dashed; }
.framed > .tab:first-child { position: absolute; top: -9px; left: 14px; }

.kicker { font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; }

.h-sec {
  font-weight: 600; letter-spacing: -.03em; line-height: 1.04;
  font-size: clamp(36px, 6.4vw, 84px); margin: 18px 0 0;
}
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 640px; margin: 18px 0 0; }

.crops {
  position: absolute; inset: 22px; pointer-events: none; --c: var(--ink); --l: 16px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px var(--l) no-repeat;
  opacity: .55;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; min-width: 132px;
  font: 600 14px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
  transition: transform .06s linear, box-shadow .06s linear, border-color .2s var(--ease);
}
.btn:hover { border-color: var(--ink); }
.btn.primary {
  background: var(--accent); color: #fff; border: 1.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn.primary:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn small { font: 500 11px/1 var(--mono); opacity: .8; }

.biglink { font-size: clamp(20px, 2.4vw, 28px); font-weight: 500; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.biglink:hover { color: var(--accent); }

.cursor { display: inline-block; width: .5em; height: 1em; background: var(--accent); vertical-align: -.12em; animation: blink 1.1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

canvas.dither { display: block; width: 100%; height: 96px; image-rendering: pixelated; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
.hero canvas.field, section > canvas.field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero, section:has(> canvas.field) { -webkit-tap-highlight-color: transparent; }
.hero .inner { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 96px var(--gutter) 40px; }
.hero .ghost-hero { width: 220px; height: 210px; margin-bottom: -6px; }
.hero canvas.wordmark { display: block; margin: 0 auto 18px; }
.hero h1 { margin: 0; font-weight: 600; letter-spacing: -.04em; line-height: 1.02; font-size: clamp(40px, 7.6vw, 100px); }
.hero h1 .en { letter-spacing: -.035em; }
.hero .sub { margin: 22px auto 0; max-width: 620px; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); }
.hero .links { display: flex; gap: 36px; justify-content: center; margin-top: 30px; }
.hero .latest { margin-top: 18px; font: 12px/1.5 var(--mono); color: var(--muted); }
.hero .latest a { color: var(--ink); }
.hero .scroll { position: relative; text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 22px; }
.hero .vert {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl; font: 10px/1 var(--mono); color: var(--faint); white-space: nowrap; max-height: 80svh; overflow: hidden;
}
.news {
  position: absolute; top: 58px; left: 44px;
  width: 280px; background: var(--paper); border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font: 12px/1.45 var(--mono); text-align: center; z-index: 2;
}
.news .bar { background: var(--ink); color: var(--paper); text-align: left; padding: 3px 8px; font-size: 11px; display: flex; justify-content: space-between; }
.news .bar button { all: unset; cursor: pointer; padding: 0 2px; }
.news p { margin: 8px 12px 4px; }
.news a { display: inline-block; margin: 2px 0 9px; color: var(--ink); }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.pillars > div { padding: 22px 24px 30px; border-left: 1px solid var(--rule); }
.pillars > div:first-child { border-left: 0; }
.pillars h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.pillars p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Demo window ---------- */
.demo-sec { padding: 110px 0 120px; background: var(--subtle); }
.scen { display: flex; gap: 0; margin: 40px 0 26px; border: 1px solid var(--rule); width: max-content; max-width: 100%; overflow-x: auto; background: var(--paper); }
.scen button {
  all: unset; cursor: pointer; padding: 9px 14px; font-size: 13px; white-space: nowrap;
  border-left: 1px solid var(--rule); display: flex; gap: 8px; align-items: baseline;
}
.scen button:first-child { border-left: 0; }
.scen button span { font: 500 10.5px var(--mono); color: var(--faint); }
.scen button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.scen button[aria-selected="true"] span { color: inherit; opacity: .7; }
.scen button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.app {
  --pad: 22px;
  background: var(--paper); border: 1px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  display: grid; grid-template-columns: 236px 1fr; height: 700px; overflow: hidden;
  font-size: 14px; position: relative;
}
.app .side { background: var(--sidebar); border-right: 1px solid var(--sep); display: flex; flex-direction: column; padding: 12px 10px; min-width: 0; }
.app .lights { display: flex; gap: 7px; padding: 2px 4px 14px; }
.app .lights i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.app .lights i:nth-child(2) { background: #FEBC2E; }
.app .lights i:nth-child(3) { background: #28C840; }
.app .logo-row { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; padding: 0 6px 12px; }
.app .logo-row img { width: 26px; height: 26px; }
.app .newtask { border: 1px solid var(--rule); background: var(--paper); text-align: center; padding: 5px; font-size: 13px; margin: 0 4px 16px; }
.app .grp { font: 500 10.5px var(--mono); letter-spacing: .08em; color: var(--muted); padding: 0 6px 6px; display: flex; gap: 6px; align-items: center; }
.app .grp::before { content: ""; width: 10px; height: 1px; background: currentColor; }
.app .row { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; font-size: 13px; white-space: nowrap; }
.app .row span:first-child { overflow: hidden; text-overflow: ellipsis; }
.app .row .when { color: var(--faint); font-size: 11.5px; }
.app .row.ws { font-weight: 500; justify-content: flex-start; gap: 8px; }
.app .row.ws::before { content: ""; width: 14px; height: 11px; border: 1.2px solid var(--muted); margin-right: 2px; flex: none; align-self: center; }
.app .row.ws.on::before { background: var(--accent); border-color: var(--accent); }
.app .row.task { padding-left: 26px; }
.app .row.task.on { background: var(--hair); box-shadow: inset 2px 0 0 var(--accent); }
.app .needs { margin: 14px 4px 0; border: 1px dashed var(--warn); padding: 8px 9px; font-size: 12.5px; display: none; }
.app .needs.show { display: block; animation: pop .32s cubic-bezier(.3, 1.4, .5, 1); }
.app .needs b { display: block; font: 500 10.5px var(--mono); letter-spacing: .06em; color: var(--warn); margin-bottom: 4px; }
.app .side .spacer { flex: 1; }
.app .side .settings { font-size: 13px; padding: 6px 8px; color: var(--muted); }

.app .main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.app .head { padding: 14px var(--pad) 0; border-bottom: 1px solid var(--sep); }
.app .head .t { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; row-gap: 6px; }
.app .head h4 { margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44%; }
.app .head .mode { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.app .head .jobs { font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.app .readout { margin-left: auto; border: 1px solid var(--rule); font: 11.5px var(--mono); display: flex; gap: 12px; padding: 4px 9px; white-space: nowrap; }
.app .readout .w { color: var(--warn); }
.app .tabs { display: flex; gap: 22px; margin-top: 12px; position: relative; overflow-x: auto; scrollbar-width: none; }
.app .tabs::-webkit-scrollbar { display: none; }
.app .tabs button { all: unset; cursor: pointer; padding: 6px 0 9px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.app .tabs button.on { color: var(--accent); }
.app .tabs button sup { font: 600 10px var(--mono); background: var(--warn); color: #fff; padding: 1px 4px; margin-left: 3px; vertical-align: 2px; }
.app .tabs .ul { position: absolute; bottom: 0; height: 2px; background: var(--accent); transition: left .45s var(--ease), width .45s var(--ease); }

.app .body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px var(--pad) 12px; scroll-behavior: smooth; }
.app .panel { display: none; }
.app .panel.on { display: block; }
.app .feed > * { margin: 0 0 14px; animation: rise .32s cubic-bezier(.3, 1.25, .5, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px) scale(.985); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

.msg-user { margin-left: auto !important; max-width: 78%; border: 1px solid var(--ink); padding: 9px 13px; background: var(--paper); width: max-content; }
.thinking { font-size: 13px; color: var(--muted); font-style: italic; }
.thinking b { font-style: normal; font-weight: 500; color: var(--faint); margin-right: 6px; }
.tool { font-size: 13.5px; }
.tool .l { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.tool .ic { font: 12px var(--mono); color: var(--muted); width: 18px; flex: none; text-align: center; }
.tool .nm { font-weight: 500; white-space: nowrap; }
.tool .sm { font: 12.5px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tool .rc { font: 11px var(--mono); color: var(--faint); margin-left: auto; white-space: nowrap; }
.tool .dur { font: 11px var(--mono); color: var(--faint); white-space: nowrap; }
.tool pre { margin: 6px 0 0 26px; padding: 6px 10px; font-size: 12px; line-height: 1.5; border-left: 2px solid var(--sep); color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.tool.err .nm { color: var(--bad); }
.tool.err pre { border-left-color: var(--bad); color: var(--bad); }
.tool .live { margin: 6px 0 0 26px; font: 12px/1.6 var(--mono); color: var(--muted); border-left: 2px solid var(--accent); padding-left: 10px; }
.diff { margin: 6px 0 0 26px; border: 1px solid var(--sep); font: 12px/1.55 var(--mono); }
.diff .p { padding: 3px 10px; background: var(--subtle); border-bottom: 1px solid var(--sep); color: var(--muted); display: flex; justify-content: space-between; }
.diff div.ln { padding: 0 10px; white-space: pre; overflow-x: auto; }
.diff .a { background: rgba(22, 147, 92, .1); color: var(--ok); }
.diff .d { background: rgba(217, 61, 61, .08); color: var(--bad); }
.lit { border-left: 3px solid var(--accent); padding: 4px 12px; font-size: 13px; }
.lit b { font: 500 10.5px var(--mono); letter-spacing: .06em; color: var(--accent); margin-right: 6px; }
.lit em { font-style: normal; color: var(--muted); }
.lit.bad { border-left-color: var(--bad); }
.lit.bad b { color: var(--bad); }
.lit.bad s { color: var(--muted); }
.asst { font-size: 14.5px; line-height: 1.65; }
.asst p { margin: 0 0 10px; }
.asst .math { font-family: "Times New Roman", "STIX Two Math", serif; font-style: italic; font-size: 16px; text-align: center; margin: 10px 0; }
.asst .math sub, .asst .math sup { font-size: 11px; }
.asst table { border-collapse: collapse; font-size: 13px; margin: 6px 0 12px; }
.asst th, .asst td { border: 1px solid var(--sep); padding: 4px 12px; text-align: left; }
.asst th { font-weight: 600; background: var(--subtle); }
.asst code { font-size: 12.5px; background: var(--surface); padding: 1px 4px; }
.asst .cite { color: var(--accent); font: 12px var(--mono); }
.card { border: 1px solid var(--rule); border-left: 3px solid var(--rc, var(--accent)); padding: 10px 14px; }
.card .ttl { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card .ttl b { font-weight: 600; }
.card .ttl .from { font-size: 12px; color: var(--faint); }
.card .ttl .meta { margin-left: auto; font: 11.5px var(--mono); color: var(--faint); }
.card .pp { color: var(--muted); font-size: 13px; }
.card .res { font-size: 13px; margin-top: 4px; }
.card .act { width: 10px; height: 10px; display: inline-block; }
.review { border: 1px solid var(--rule); border-left: 3px solid var(--ok); padding: 10px 14px; font-size: 13px; }
.review .hd { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.review .hd b { font-weight: 600; font-size: 13.5px; }
.verdict { font: 500 11px var(--mono); padding: 1px 6px; border: 1px solid currentColor; }
.verdict.ok { color: var(--ok); background: rgba(22, 147, 92, .08); }
.verdict.warn { color: var(--warn); background: rgba(194, 124, 14, .08); }
.verdict.bad { color: var(--bad); }
.review ul { margin: 4px 0; padding-left: 18px; }
.review .why { color: var(--muted); }
.delib { font-size: 13.5px; }
.delib .l { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.delib .ic { color: var(--warn); font-family: var(--mono); }
.delib .t { color: var(--faint); font: 11px var(--mono); }
.delib p { margin: 3px 0 0 26px; color: var(--muted); }
.commit { font-size: 13px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.commit .h { font-family: var(--mono); color: var(--accent); font-size: 12px; }
.commit .n { color: var(--faint); font-size: 12px; }
.contested { border: 1px dashed var(--warn); border-left: 3px solid var(--warn); padding: 10px 14px; background: rgba(194, 124, 14, .04); }
.contested .hd { color: var(--warn); font-weight: 600; margin-bottom: 6px; }
.contested .it { font-size: 13.5px; }
.contested .it small { display: block; color: var(--muted); font-size: 12.5px; }
.spin { display: flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--faint); flex-wrap: wrap; }
.spin canvas { width: 15px; height: 15px; }
.spin .v { font: 500 14px var(--sans); color: var(--accent); }
.perm { position: relative; border: 1px dashed var(--accent); padding: 22px 18px 14px; margin-top: 22px !important; }
.perm > .tab { position: absolute; top: -9px; left: 16px; }
.perm .q { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.perm .q .ico { width: 34px; height: 34px; border: 1px solid var(--accent); display: grid; place-items: center; color: var(--accent); font: 12px var(--mono); flex: none; background: rgba(77, 107, 254, .06); }
.perm .q b { display: block; font-weight: 600; }
.perm .q small { color: var(--muted); font-size: 13px; }
.perm pre { margin: 0 0 12px; background: var(--surface); padding: 10px 14px; font-size: 12.5px; border-left: 2px solid var(--rule); white-space: pre-wrap; word-break: break-all; }
.perm .opt { display: flex; gap: 10px; align-items: center; padding: 5px 4px; cursor: pointer; font-size: 13.5px; width: 100%; text-align: left; background: none; border: 0; }
.perm .opt kbd { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--rule); font-size: 11px; flex: none; transition: transform .06s linear; }
.perm .opt:hover kbd { border-color: var(--ink); }
.perm .opt.sel { color: var(--accent); }
.perm .opt.sel kbd { background: var(--accent); color: #fff; border-color: var(--accent); transform: translate(1px, 1px); }
.perm .opt code { font-size: 12px; }
.perm.done { border-style: solid; border-color: var(--rule); }
.perm.done > .tab { background: var(--ink); }
.claim { position: relative; border: 1px dashed var(--rule); padding: 20px 16px 12px; margin-top: 20px !important; transition: border-color .4s var(--ease); }
.claim > .tab { position: absolute; top: -9px; left: 14px; transition: background .3s var(--ease); }
.claim p { margin: 0; font-size: 15px; font-weight: 500; }
.claim small { display: block; margin-top: 6px; color: var(--muted); font: 12px var(--mono); }
.claim.ok { border-style: solid; border-color: var(--ok); }
.claim.ok > .tab { background: var(--ok); color: #fff; }
.dark .claim.ok > .tab, .dark .claim.warn > .tab { color: #1A1A1D; }
.vbar { margin-top: 10px; height: 8px; display: grid; grid-template-columns: repeat(32, 1fr); gap: 2px; }
.vbar i { background: var(--sep); }
.vbar i.on { background: var(--verifier); }
.bars { display: flex; align-items: flex-end; gap: 18px; height: 120px; padding: 0 0 0 4px; border-bottom: 1px solid var(--rule); margin: 8px 0 4px 26px; max-width: 420px; }
.bars div { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.bars i { flex: 1; background: #9a9eae; transition: height .5s var(--ease); height: 0; }
.bars i + i { background: var(--accent); }
.bars-l { display: flex; gap: 18px; margin-left: 30px; max-width: 420px; font: 10.5px var(--mono); color: var(--faint); }
.bars-l span { flex: 1; text-align: center; }
.round { font: 500 11px var(--mono); letter-spacing: .04em; color: var(--warn); border-top: 1px solid var(--sep); padding-top: 8px; }
.toast {
  position: absolute; right: 16px; top: 14px; width: 300px; z-index: 5;
  background: var(--raised); border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  padding: 10px 12px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start;
  transform: translateX(120%); transition: transform .45s var(--ease);
}
.toast.show { transform: none; }
.toast img { width: 28px; height: 28px; }
.toast b { display: block; font-size: 13px; }
.toast small { color: var(--muted); }

.compose { padding: 10px var(--pad) 8px; }
.compose .box {
  border: 1.5px solid var(--accent); box-shadow: 4px 4px 0 var(--accent);
  padding: 10px 12px 8px; background: var(--paper); position: relative;
}
.compose .box::before { content: ""; position: absolute; inset: -1.5px -1.5px auto -1.5px; height: 3px; background: var(--accent); }
.compose .in { min-height: 22px; font-size: 14px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.compose .in.ph { color: var(--faint); }
.compose .ctl { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; }
.compose .ctl .plus { width: 26px; height: 26px; border: 1px solid var(--rule); display: grid; place-items: center; }
.compose .ctl .mid { margin-left: auto; display: flex; gap: 6px; align-items: center; font: 11.5px var(--mono); color: var(--muted); cursor: pointer; }
.compose .ctl .mid { position: relative; gap: 5px; padding: 0 6px; }
.compose .pop { position: absolute; right: 0; bottom: calc(100% + 10px); width: 340px; max-width: calc(100vw - 48px); background: var(--raised); border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 16px; display: none; z-index: 6; cursor: default; }
.compose .pop.open { display: block; animation: pop .32s cubic-bezier(.3, 1.4, .5, 1); }
.compose .ctl .model { white-space: nowrap; }
.compose .ctl .stop { width: 28px; height: 28px; background: var(--accent); display: grid; place-items: center; }
.compose .ctl .stop i { width: 9px; height: 9px; background: #fff; }
.compose .ctl .stop.idle { background: var(--ink); }
.compose .ctl .stop.idle i { width: 0; height: 0; background: none; border: 5px solid transparent; border-bottom: 7px solid var(--paper); margin-top: -5px; }
.compose .stat { text-align: center; font: 11px var(--mono); color: var(--faint); margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compose .stat .c { color: var(--ok); }

.plan-step { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; align-items: baseline; }
.plan-step .id { font: 12px var(--mono); color: var(--faint); }
.st { font: 500 10.5px var(--mono); padding: 1px 6px; border: 1px solid currentColor; white-space: nowrap; }
.st.done { color: var(--ok); }
.st.prog { color: var(--accent); border-style: dashed; }
.st.pend { color: var(--faint); }
.st.skip { color: var(--faint); text-decoration: line-through; }
.st.warn { color: var(--warn); border-style: dashed; }
.hyp { border: 1px solid var(--rule); padding: 10px 14px; margin-bottom: 10px; font-size: 13.5px; }
.hyp.open { border-style: dashed; }
.hyp small { display: block; color: var(--muted); font: 12px/1.6 var(--mono); margin-top: 4px; }
.trace-row { display: grid; grid-template-columns: 56px 110px 1fr; gap: 10px; font: 12px/1.9 var(--mono); border-bottom: 1px solid var(--hair); }
.trace-row .k { color: var(--accent); }
.trace-row .e { color: var(--bad); }
.nb h5 { margin: 0 0 8px; font-size: 18px; }
.nb li { margin-bottom: 6px; font-size: 13.5px; }
.nb li code { font-size: 11.5px; color: var(--faint); }

/* ---------- Sieve / stats (dark) ---------- */
.big-stat { padding: 120px 0 80px; }
.big-stat .num { font-weight: 600; letter-spacing: -.04em; line-height: 1.02; font-size: clamp(42px, 8vw, 112px); margin: 26px 0 0; }
.big-stat .foot { font: 12px/1.7 var(--mono); color: var(--muted); max-width: 680px; margin-top: 22px; }
.sieve-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin-top: 70px; }
canvas.sieve { width: 100%; height: 380px; display: block; }
.counts { font: 13px/2 var(--mono); }
.counts div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--sep); }
.counts .ok { color: var(--ok); }
.counts .bad { color: var(--bad); }
.counts .warn { color: var(--warn); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 90px; border-top: 1px solid var(--rule); }
.stats > div { padding: 26px 22px 10px 0; }
.stats b { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.stats span { display: block; margin-top: 10px; font-size: 13.5px; color: var(--muted); }

/* ---------- Roles ---------- */
.roles { padding: 110px 0 120px; overflow: hidden; }
.stage { position: relative; margin-top: 60px; height: 560px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.who { position: absolute; width: 230px; transform: translateX(-50%); text-align: left; }
.who .tab { margin-bottom: 10px; }
.who b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.who small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; }
.who em { display: block; font: normal 500 11.5px var(--mono); margin-top: 8px; }
.bubble {
  position: absolute; width: 270px; padding: 18px 13px 10px; font-size: 13.5px; line-height: 1.5;
  background: var(--paper); border: 1px dashed var(--rule); transform: translateX(-50%);
  opacity: 0; transition: opacity .25s var(--ease), transform .32s cubic-bezier(.3, 1.4, .5, 1);
  pointer-events: none; z-index: 3;
}
.bubble.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.bubble > .tab { position: absolute; top: -9px; left: 12px; }
.bubble.solid { border-style: solid; }
.bubble.ok { border-color: var(--ok); }
.bubble.warn { border-color: var(--warn); }
.bubble::after { content: ""; position: absolute; left: calc(50% + var(--arrow, 0px)); bottom: -7px; width: 12px; height: 12px; background: var(--paper); border-right: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule); transform: translateX(-50%) rotate(45deg); }
.bubble.solid::after { border-style: solid; }
.bubble.ok::after { border-color: var(--ok); }
.bubble.warn::after { border-color: var(--warn); }
.thread { margin-top: 24px; display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.log { font: 12.5px/1.7 var(--mono); border-top: 1px solid var(--rule); max-height: 214px; overflow: hidden; display: flex; flex-direction: column-reverse; }
.log div { display: grid; grid-template-columns: 54px 150px 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--hair); animation: rise .3s var(--ease) both; }
.log .ts { color: var(--faint); }
.log .fr { color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log .tx { color: var(--ink); font-family: var(--sans); font-size: 13px; }
.board { display: flex; flex-direction: column; gap: 18px; padding-top: 10px; }
.board .claim { margin-top: 0 !important; }
.board .claim p { font-size: 13.5px; }
.board .claim.warn { border-color: var(--warn); }
.board .claim.warn > .tab { background: var(--warn); color: #fff; }

/* ---------- Effort ---------- */
.effort { padding: 110px 0 130px; overflow: hidden; transition: background .3s; }
.effort .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-top: 50px; }
/* EffortSlider (Views/EffortSlider.swift); every point measure × --k */
.es { --k: 1; user-select: none; -webkit-user-select: none; }
.es-track { position: relative; height: calc(24px * var(--k)); cursor: pointer; touch-action: none; outline: none; }
.es-track:focus-visible { outline: 2px solid var(--accent); outline-offset: calc(4px * var(--k)); }
.es-frame { position: absolute; left: calc(5px * var(--k)); right: calc(5px * var(--k)); top: calc(4px * var(--k)); height: calc(16px * var(--k)); outline: calc(1px * var(--k)) solid var(--rule); outline-offset: calc(-1px * var(--k)); }
.es-frame canvas { display: block; width: 100%; height: 100%; }
.es-frame i { position: absolute; inset: 0; display: none; pointer-events: none; border: calc(1px * var(--k)) solid; }
.es-frame .es-g1 { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.es-frame .es-g2 { border-color: color-mix(in srgb, var(--bad) 70%, transparent); }
.es-thumb {
  position: absolute; top: calc(3px * var(--k)); left: 0; width: calc(18px * var(--k)); height: calc(18px * var(--k));
  background: var(--raised); --tb: var(--ink);
  box-shadow: inset 0 0 0 calc(1.5px * var(--k)) var(--tb), calc(2px * var(--k)) calc(2px * var(--k)) 0 var(--ink);
  transition: left .28s cubic-bezier(.3, 1.35, .5, 1), transform .06s linear;
}
.es.drag .es-thumb { transition: none; transform: translate(calc(2px * var(--k)), calc(2px * var(--k))); box-shadow: inset 0 0 0 calc(1.5px * var(--k)) var(--tb); }
.es-thumb b { position: absolute; left: 50%; top: 50%; width: calc(6px * var(--k)); height: calc(6px * var(--k)); margin: calc(-3px * var(--k)) 0 0 calc(-3px * var(--k)); }
.es-thumb i { position: absolute; inset: 0; display: none; z-index: -1; border: calc(1.5px * var(--k)) solid; }
.es-thumb .es-t1 { border-color: color-mix(in srgb, var(--accent) 80%, transparent); }
.es-thumb .es-t2 { border-color: color-mix(in srgb, var(--bad) 80%, transparent); }
.es-labels { display: flex; justify-content: space-between; margin-top: calc(8px * var(--k)); font: 500 calc(10.5px * var(--k))/1 var(--mono); color: var(--muted); }
.es-labels span { cursor: pointer; display: inline-block; }
.sect-label { font: 500 10.5px var(--mono); letter-spacing: .08em; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 14px; }
.sect-label::before { content: ""; width: 10px; height: 1px; background: currentColor; }
.effort-panel { border: 1px solid var(--rule); background: var(--raised); padding: 18px 20px 20px; }
.effort-panel .row2 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 13px; }
.effort-panel .row2 .mini { display: flex; align-items: center; gap: 5px; font: 11px var(--mono); color: var(--muted); }
canvas.mini { width: 44px; height: 13px; display: block; outline: 1px solid var(--rule); outline-offset: -1px; }
.pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.pick button { all: unset; cursor: pointer; font: 12px var(--mono); padding: 5px 9px; border: 1px solid var(--rule); color: var(--muted); }
.pick button:hover { border-color: var(--ink); }
.pick button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.effort .cap { margin-top: 28px; font-size: 17px; min-height: 56px; }
.effort .cap small { display: block; font: 12px var(--mono); color: var(--muted); margin-top: 6px; }
.effort .ghostbox { position: relative; aspect-ratio: 4 / 5; max-width: 480px; width: 100%; justify-self: center; }
.effort .ghostbox canvas { width: 100%; height: 100%; display: block; }
.effort .ghostbox .tab { position: absolute; top: 0; left: 0; }
.effort .readout2 { position: absolute; right: 0; top: 0; font: 11px var(--mono); color: var(--muted); text-align: right; }
.effort.max .h-sec { text-shadow: -2px 0 rgba(255, 40, 60, .7), 2px 0 rgba(40, 140, 255, .7); animation: jitter .2s steps(2) infinite; }
.effort.max { background: #141416; }
@keyframes jitter { 50% { transform: translateX(1px); } }

/* ---------- Line semantics ---------- */
.lines { padding: 110px 0 120px; }
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }
.legend > div { padding: 22px 16px 16px; position: relative; min-height: 170px; }
.legend .solid { border: 1px solid var(--ink); }
.legend .dash { border: 1px dashed var(--ink); }
.legend .bar { border: 1px solid var(--rule); border-left: 3px solid var(--ok); }
.legend .heavy { border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.legend b { display: block; font-size: 16px; margin-bottom: 6px; }
.legend p { margin: 0; font-size: 13.5px; color: var(--muted); }
.legend em { display: block; margin-top: 10px; font: normal 11.5px var(--mono); color: var(--faint); }
.sift-demo { margin-top: 70px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.sift-demo .claim { margin: 0 !important; padding: 26px 20px 18px; }
.sift-demo .claim p { font-size: clamp(17px, 2vw, 22px); }
.sift-demo .steps { font: 12.5px/2.1 var(--mono); }
.sift-demo .steps div { display: flex; gap: 10px; color: var(--faint); transition: color .3s; }
.sift-demo .steps div.on { color: var(--ink); }
.sift-demo .steps div::before { content: "○"; }
.sift-demo .steps div.on::before { content: "●"; color: var(--ok); }
.sift-demo .steps div.bad.on::before { color: var(--warn); }

/* ---------- Trace ---------- */
.trace { padding: 110px 0 120px; background: var(--subtle); }
.chain { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 60px; position: relative; }
.chain .node { position: relative; padding: 24px 14px 16px; border: 1px solid var(--rule); background: var(--paper); margin-right: 18px; opacity: .25; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease), border-color .4s; }
.chain .node.on { opacity: 1; transform: none; border-color: var(--ink); }
.chain .node::after { content: ""; position: absolute; top: 50%; right: -19px; width: 18px; height: 1px; background: var(--ink); }
.chain .node:last-child { margin-right: 0; }
.chain .node:last-child::after { display: none; }
.chain .node .tab { position: absolute; top: -9px; left: 10px; }
.chain .node b { display: block; font: 600 14px var(--mono); word-break: break-all; }
.chain .node small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.45; word-break: break-word; }
.term { margin-top: 44px; background: #18181B; color: #ECECEE; border: 1px solid #18181B; box-shadow: 6px 6px 0 var(--accent); font: 12.5px/1.75 var(--mono); }
.term .bar { padding: 4px 12px; border-bottom: 1px solid rgba(255, 255, 255, .16); display: flex; justify-content: space-between; color: rgba(236, 236, 238, .6); font-size: 11px; }
.term pre { margin: 0; padding: 14px 16px; white-space: pre-wrap; word-break: break-word; min-height: 250px; }
.term .p { color: #6E8AFF; }
.term .g { color: #4CC38A; }
.term .y { color: #E8B04B; }
.term .d { color: rgba(236, 236, 238, .5); }

/* ---------- Features ---------- */
.features { padding: 110px 0 130px; overflow: hidden; }
.features .h-sec { color: #fff; }
.win-grid { columns: 2; column-gap: 24px; margin-top: 60px; }
.win {
  break-inside: avoid; margin: 0 0 24px; background: #fff; color: #18181B;
  border: 1px solid #18181B; box-shadow: 5px 5px 0 #18181B;
  --muted: rgba(24, 24, 27, .62); --rule: rgba(0, 0, 0, .24); --ink: #18181B; --paper: #fff; --accent: #4D6BFE;
}
.win .bar { background: #18181B; color: #fff; font: 500 11px/1 var(--mono); padding: 6px 10px; display: flex; justify-content: space-between; letter-spacing: .03em; }
.win .bar i { font-style: normal; opacity: .6; }
.win h3 { margin: 0; padding: 14px 16px 6px; font-size: 19px; font-weight: 600; }
.win dl { margin: 0; padding: 0 16px 8px; }
.win dl div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(0, 0, 0, .1); font-size: 13.5px; }
.win dl div:first-child { border-top: 0; }
.win dt { font-weight: 600; }
.win dd { margin: 0; color: rgba(24, 24, 27, .72); }
.win dd code { font-size: 12px; background: #F2F3F5; padding: 0 4px; color: #18181B; }

/* ---------- Models ---------- */
.models { padding: 110px 0 110px; background: var(--subtle); }
.mstats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 50px; border-top: 1px solid var(--rule); }
.mstats > div { padding: 22px 20px 6px 0; }
.mstats b { display: block; font-size: clamp(40px, 5vw, 64px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.mstats span { display: block; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.access { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 50px; }
.acc { position: relative; border: 1px solid var(--rule); background: var(--paper); padding: 24px 16px 16px; display: flex; flex-direction: column; }
.acc > .tab { position: absolute; top: -9px; left: 12px; }
.acc.hot { border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.acc h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.acc p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.acc ul { list-style: none; margin: 0 0 12px; padding: 0; font-size: 13px; flex: 1; }
.acc li { padding: 6px 0; border-top: 1px solid var(--hair); }
.acc li em { display: block; font: normal 11px var(--mono); color: var(--faint); }
.acc small { font: 11px/1.5 var(--mono); color: var(--faint); }
.roles-map { margin-top: 40px; border: 1px solid var(--rule); background: var(--paper); padding: 18px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 20px; }
.roles-map .sect-label { grid-column: 1 / -1; }
.roles-map .rm { border-top: 1px solid var(--hair); padding: 10px 0; }
.roles-map .rm span { display: block; font-weight: 600; font-size: 14px; }
.roles-map .rm code { font-size: 12.5px; color: var(--accent); }
.roles-map .rm em { display: block; font: normal 11px var(--mono); color: var(--faint); }
.roles-map p { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); margin-top: 40px; border-top: 1px solid var(--rule); border-left: 1px solid var(--hair); }
.dir div { padding: 8px 10px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 8px; font-size: 13px; background: var(--paper); }
.dir em { font: normal 10.5px var(--mono); color: var(--faint); white-space: nowrap; align-self: center; }

/* ---------- Gallery ---------- */
.gallery { padding: 110px 0 120px; }
.shots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; margin-top: 56px; }
.shot { position: relative; border: 1px solid var(--ink); background: var(--paper); margin: 0; }
.shot > .tab { position: absolute; top: -9px; left: 12px; z-index: 1; }
.shot img { width: 100%; height: auto; }
.shot figcaption { font-size: 12.5px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--rule); }
.shot.w6 { grid-column: span 6; }
.shot.w3 { grid-column: span 3; }
.shot.w2 { grid-column: span 2; }

/* ---------- Download ---------- */
.download { padding: 110px 0 100px; overflow: hidden; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 56px; }
.dl { border: 1px solid var(--ink); background: var(--paper); position: relative; }
.dl .bar { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--paper); font: 500 11.5px var(--mono); padding: 5px 10px; }
.dl .bar .you { background: var(--accent); color: #fff; padding: 1px 6px; margin-left: auto; margin-right: 10px; }
.dl .c { padding: 18px 20px 22px; }
.dl h3 { margin: 0; font: 600 15px var(--mono); }
.dl p { color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.dl .acts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.dl .more { font-size: 13px; margin-top: 16px; color: var(--muted); }
.dl .more a { color: var(--ink); }
.inst { margin-top: 26px; border: 1px solid var(--rule); }
.inst .tabs2 { display: flex; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.inst .tabs2 button { all: unset; cursor: pointer; padding: 9px 16px; font: 12.5px var(--mono); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.inst .tabs2 button.on { color: var(--ink); border-bottom-color: var(--accent); }
.inst .cmd { display: none; position: relative; }
.inst .cmd.on { display: block; }
.inst pre { margin: 0; padding: 14px 52px 14px 16px; font-size: 12.5px; line-height: 1.8; overflow-x: auto; white-space: pre; }
.inst pre .d { color: var(--faint); }
.copy { position: absolute; right: 8px; top: 8px; border: 1px solid var(--rule); background: var(--paper); font: 11px var(--mono); padding: 4px 7px; cursor: pointer; }
.copy:hover { border-color: var(--ink); }
.first { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 26px; border-top: 1px solid var(--rule); }
.first > div { padding: 16px 18px 6px 0; font-size: 13.5px; color: var(--muted); }
.first b { display: block; color: var(--ink); font: 600 12px var(--mono); margin-bottom: 4px; }

/* ---------- FAQ ---------- */
.faq { padding: 30px 0 110px; }
.faq h2 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 18px; }
.faq details { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 40px 14px 0; font-size: 15.5px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; width: 20px; height: 20px; border: 1px solid var(--rule); display: grid; place-items: center; font: 13px var(--mono); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 14px; max-width: 720px; }
.faq details code { font-size: 12.5px; background: var(--surface); padding: 1px 5px; color: var(--ink); }

/* ---------- Credits ---------- */
.credits { padding: 90px 0 0; text-align: center; overflow: hidden; }
.credits h4 { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 56px 0 14px; }
.credits ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 2; }
.credits ul a { text-decoration: none; }
.credits ul a:hover { color: var(--accent); }
.credits .author { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.02em; }
.credits .motto { margin: 110px 0 0; font-size: clamp(22px, 3vw, 34px); font-weight: 600; letter-spacing: -.02em; line-height: 1.4; }
.credits canvas.end { display: block; margin: 70px auto 0; width: 220px; height: 200px; }
footer { padding: 70px 0 34px; font-size: 12px; color: var(--muted); }
footer .wrap { border-top: 1px solid var(--rule); padding-top: 18px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer p { margin: 0 0 4px; max-width: 760px; }
footer .seed { font-family: var(--mono); }

/* ---------- Versions page ---------- */
.vhead { padding: 120px 0 50px; }
.vhead h1 { font-size: clamp(48px, 9vw, 110px); font-weight: 600; letter-spacing: -.04em; line-height: 1; margin: 0; }
.vhead p { color: var(--muted); max-width: 640px; }
.vlist { padding: 70px 0 110px; }
.vlist .note { max-width: 760px; color: var(--muted); }
.vlist .note code, .rel code { background: var(--surface); padding: 1px 5px; font-size: 12.5px; color: var(--ink); }
.cmdline { display: inline-block; border: 1px solid var(--ink); background: var(--paper); font: 12.5px var(--mono); padding: 8px 12px; margin: 8px 0 0; max-width: 100%; overflow-x: auto; white-space: nowrap; }
.rel { margin-top: 56px; border: 1px solid var(--ink); background: var(--paper); }
.rel .bar { display: flex; justify-content: space-between; background: var(--ink); color: var(--paper); font: 500 11.5px var(--mono); padding: 5px 12px; gap: 12px; }
.rel .c { padding: 24px 28px 26px; }
.rel h2 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 52px); font-weight: 600; letter-spacing: -.03em; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rel h2 .latest { font: 500 12px var(--mono); background: var(--ok); color: #fff; padding: 3px 8px; letter-spacing: .02em; }
.rel h3 { font-size: 15px; margin: 22px 0 6px; }
.rel ul { padding-left: 20px; margin: 0; }
.rel li { margin-bottom: 8px; font-size: 14.5px; }
.rel .en { color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 22px; }
.rel .acts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.rel .sha { font: 11px var(--mono); color: var(--faint); margin-top: 14px; word-break: break-all; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .app .side { display: none; }
  .chain { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .chain .node:nth-child(3)::after { display: none; }
  .legend { grid-template-columns: repeat(2, 1fr); }
  .thread { grid-template-columns: 1fr; }
  .access { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .roles-map { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 14.5px; }
  .topbar .brand span { display: none; }
  .topbar nav a.opt { display: none; }
  .topbar a { padding: 7px 8px; }
  .hero .vert { display: none; }
  .hero .inner { padding-top: 150px; }
  .hero .ghost-hero { width: 150px; height: 150px; }
  .hero .links { gap: 24px; }
  .news { top: 44px; left: 16px; width: calc(100% - 32px); }
  .pillars { grid-template-columns: 1fr; }
  .pillars > div { border-left: 0; border-top: 1px solid var(--rule); padding: 18px 16px 20px; }
  .pillars > div:first-child { border-top: 0; }
  .crops { inset: 10px; }
  .demo-sec, .roles, .effort, .lines, .trace, .features, .gallery, .download { padding: 80px 0 86px; }
  .app { height: 620px; box-shadow: 4px 4px 0 var(--ink); --pad: 14px; }
  .app .head h4 { max-width: 100%; flex: 1 1 100%; }
  .app .readout { margin-left: 0; }
  .app .head .mode { display: none; }
  .msg-user { max-width: 92%; }
  .tool .rc, .tool .dur { display: none; }
  .toast { left: 12px; right: 12px; width: auto; }
  .compose .ctl .ws { display: none; }
  .sieve-wrap { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  canvas.sieve { height: 260px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 50px; }
  .stage { height: 700px; margin-top: 40px; }
  .who { width: 46%; }
  .who b { font-size: 16px; }
  .who small { font-size: 12px; }
  .bubble { display: none; }
  .log div { grid-template-columns: 1fr; gap: 0; }
  .log .ts { display: none; }
  .log { max-height: 260px; }
  .effort .grid { grid-template-columns: 1fr; gap: 28px; }
  .effort .ghostbox { max-width: 360px; }
  .legend { grid-template-columns: 1fr; }
  .legend > div { min-height: 0; }
  .sift-demo { grid-template-columns: 1fr; }
  .chain { grid-template-columns: 1fr; row-gap: 18px; }
  .chain .node { margin-right: 0; }
  .chain .node::after { top: auto; bottom: -19px; left: 24px; right: auto; width: 1px; height: 18px; }
  .chain .node:nth-child(3)::after { display: block; }
  .win-grid { columns: 1; }
  .mstats { grid-template-columns: repeat(2, 1fr); }
  .access { grid-template-columns: 1fr; }
  .roles-map { grid-template-columns: 1fr; padding: 14px 16px; }
  .dir { grid-template-columns: repeat(2, 1fr); }
  .dir div { flex-direction: column; gap: 0; font-size: 12.5px; }
  .dir em { align-self: flex-start; }
  .models { padding: 80px 0 86px; }
  .win dl div { grid-template-columns: 1fr; gap: 2px; }
  .shots { grid-template-columns: 1fr; }
  .shot.w6, .shot.w3, .shot.w2 { grid-column: span 1; }
  .dl-grid { grid-template-columns: 1fr; }
  .first { grid-template-columns: 1fr; }
  .rel .c { padding: 18px 16px; }
  .rel .bar { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
