/* Generated by tools/design.py from kuhaku-linux/design/codex.html. Edit there. */
@font-face { font-family:'NotoK'; font-style:normal; font-weight:100; font-display:swap; src:url(data:font/woff2;base64,d09GMk9UVE8AAAWcAA8AAAAACMgAAAVJAAIBBgAAAAAAAAAAAAAAAAAAAAAAAAAAGYFeDYg8GyAcgVQGYA4IADwBNgIkAwwEBgVWByAXJBgMG8MHUZRQTirIx2HcPFUseEUFl9oeNsHzpTPf35VZh2QriOAjkB0irhCKJlw0SZerg2SPbiY6Rkd568Cue8g4SPWWpn7aP+6nvt8bJU1swCOdSFRYB2aBDWjgA6o+j+JpA/usxKvGaZKtHzwQAvipphwD38jRE2fSsWzd8noGVy2vqGNwddSuomMONVAH0b3royttBuMFQGEQpjmtOStD9EiTdLLZjbhHET0AKrweg9yYW1NWWdq58n8mDG55rMH2k397yKfTS/WYAp6ItYKhEJGsybGVsRlRe8WI8RNq451mVtfYiMigZKFk4QNmOFlEVFipiFaWge1N51dNpjPcMTzh9vQ7d8WMlIDrms0Tz9MS78xWzkSzZeJLBn4Rb2rZ2r0Hrz1/fZ/8BVwVK1Z85lF3uhUiMbFZba984h1dHZVJdhx3u84WwE7rf0FKNrT4NRzS19L4xtllnW3Ey6CyUq81fqqV1hSLkzrLquv0GWP1dMFx5RWxD7xfeQUeEa+Znl1wIyFlKNGx4WZDKOv7kykkHu9mwvVmSOo7sLxRgYgIHoUwk0vymLaOl9V09Dyqv78bcNT/+1Hd/Sg78B09ud7zf7G9x1KlzTCOt1QVV+1r4S7Tl7MHIMi2zxG7+kjOCSOVkXir6++cVmNzf+9oAduKF3GEBkJp4aym6Xt8Yb8pzWf0p7jCniQeK91S6NGmrJV5JOdy+nGKl+wsDtuUxm3EaLjMIfIPSOI9VkBk6SJAoS1WLlEEyvu/kMpFPhGQIGYJ9vbGCz2Es583sK0k7O0LKA/hZB626FoJxw2JXBO1LHQ1TDl29UcGdKfQH1dag1NWXi6aAMWDEgudiE1/Udy98fo1KyZOQ4+guYWGrQ5PLwYrCXt7A1It9vEGeovUWdlUoOC12X1Kux26E9PYHlPKHSLhvbTbTIE7GAk1fElAb6jTpP9bqZyat3aW7Jl6oS7x3z0hoN61fskZ+dsfw4AnpU5TnBjF27et1BBZ//S5+cHn5Ocnt29SfGIe8an6njDl4BLcEnbFqXANL5FR+g7PHJM1MHksNfVxpITWOsxi37CcJOwZtDEuZNH2qaeX76XegyRkC/DLfQ/k1JC+6ap8ICFClizyYgGfou9JUx6y4aqw602FF5hNButnPHtczuCUsdTUcf3BIN1ags16NcZBoyPWRK0MWQ0j9l18lgxdKLTAwdaAhEVHiiZB5SBRSOQFhcYV2xi5IW5jNF2/eMLGBdOxZNCMQtPWRstiMBgi9CEtSmDSm5fwiG/9/Yan8V0jUSKBjGQJs+x1Z7l/siS11hUn2b8pNKjY0/aA93HwcejxW9OclqYcNDOcxdn/uNZ/I3gjJD3xlSwMEU8wq+BI86CH7fhuhCLbD285suOYP5TTLGiGhRAgSDFh5Dzl8WMwcFwXmUW/zcnzGNYb6431xnpjvbt7u5Ku548da5E7hxkQhpn61jfHZBQh+QpdHyurJzvECt0W6CQhRqag8ZM/qn0SC35pb8JYNoKX4wiKULO1fk05HlD71VxgAvWTLKa7tAEVUgwMP3syZsqUMbB60/r1Ou7uBWOvWGDLUxH1FLB89aHjiH2ARqPTqFwGbSnwiluxW37XBcq/b+euva3M1dMo8c7u/CZlSdrAv1TrDwCND4JyAN63ckozwN2r7/mFaTcIKs//F2A/xAD6620Ig0p0meVcZQCz6hhTwYMUCReLEUBoD5xLkZpHJhNj5XQdixlEsVmBxQjGMwErR6ZuPZNqarCZTgVVrKKeKMvRDALdHXQnV9KRP/9NtDqi3hJGoDPdGnUXAAA=) format('woff2'); }
@font-face { font-family:'NotoK'; font-style:normal; font-weight:300; font-display:swap; src:url(data:font/woff2;base64,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) format('woff2'); }

:root {
  /* Layout: a narrow rail of labels beside one wide column of plates. Everything hangs from hairlines; nothing sits in a box. */
  --bg:#f7f4f1; --fg:#111111; --muted:#666666; --faint:rgba(17,17,17,.08); --rule:rgba(17,17,17,.18); --accent:#e0301e;
  --o-bg:#121212; --o-fg:#ececec; --o-muted:#9a9a9a; --o-faint:rgba(236,236,236,.08); --o-accent:#f0705a;
  --sans:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --jp:'NotoK','Noto Sans CJK JP','Hiragino Sans','Yu Gothic','Meiryo',sans-serif;
  color-scheme:light;
}

html.night {
  --bg:#121212; --fg:#ececec; --muted:#9a9a9a; --faint:rgba(236,236,236,.08); --rule:rgba(236,236,236,.2); --accent:#f0705a;
  --o-bg:#f7f4f1; --o-fg:#111111; --o-muted:#666666; --o-faint:rgba(17,17,17,.08); --o-accent:#e0301e;
  color-scheme:dark;
}
* { box-sizing:border-box; }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } * { transition:none !important; animation:none !important; } }
body { margin:0; background:var(--bg); color:var(--fg); font-family:var(--sans); font-size:15px; line-height:1.65; font-weight:300;
       -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
a { color:inherit; text-decoration-color:var(--rule); text-underline-offset:3px; }
a:hover { text-decoration-color:var(--fg); }
:focus-visible { outline:1.5px solid var(--accent); outline-offset:4px; }
.jp { font-family:var(--jp); }
.num { font-variant-numeric:tabular-nums; }
strong { font-weight:400; }
code { font-family:ui-monospace,'SF Mono','JetBrains Mono',Menlo,Consolas,monospace; font-size:.86em; letter-spacing:0; }

/* The top row, as in Kūhaku itself: the red line on the left, status on the right. */
.opt { font:inherit; background:none; border:0; padding:8px 0; cursor:pointer; color:var(--muted); display:inline-flex; align-items:center; gap:.55em; transition:color .2s; }
.opt::after { content:''; width:.8em; height:.8em; box-sizing:border-box; border:1.5px solid var(--muted); transition:background .2s, border-color .2s; }
.opt:hover { color:var(--fg); }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { color:var(--fg); }
.opt[aria-pressed="true"]::after, .opt[aria-checked="true"]::after { background:var(--fg); border-color:var(--fg); }

main.codex { max-width:1180px; margin:0 auto; padding:0 clamp(20px,5vw,64px) 120px; }

/* Cover */
.cover { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:40px; padding:clamp(72px,15vh,170px) 0 clamp(40px,8vh,90px); }
.wm { font-size:clamp(72px,15.5vw,208px); font-weight:200; letter-spacing:-.045em; line-height:1; margin:0 0 0 -.05em; white-space:nowrap; }
.wm .u, .wm2 .u { position:relative; display:inline-block; line-height:1; }
.wm .u::after, .wm2 .u::after { content:'ū'; position:absolute; left:0; top:0; line-height:1; color:var(--accent); clip-path:inset(0 0 70% 0); }
.cover .sub { margin:clamp(28px,5vh,56px) 0 0; display:grid; gap:4px; font-size:15px; }
.cover .sub span { color:var(--muted); font-size:12.5px; letter-spacing:.02em; }
.cover .kan { font-family:var(--jp); font-weight:100; font-size:clamp(56px,9vw,120px); line-height:1.08; writing-mode:vertical-rl; color:var(--rule); margin:0 0 .12em; user-select:none; }

/* Sections: rail and column */
main.codex section { display:grid; grid-template-columns:208px minmax(0,1fr); gap:0 48px; padding-top:26px; border-top:1px solid var(--faint);
          margin-top:clamp(96px,13vw,176px); }
.rail { position:sticky; top:84px; align-self:start; }
.wide .rail { position:static; }
.bleed { margin-left:-256px; }
.rail .no { display:block; font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.rail h2 { margin:4px 0 0; font-size:15px; font-weight:400; letter-spacing:0; }
.lead { margin:-6px 0 44px; font-size:clamp(27px,3.5vw,44px); font-weight:200; letter-spacing:-.024em; line-height:1.14; max-width:19ch; text-wrap:balance; }
.col { min-width:0; }
.col p { margin:0 0 1.15em; max-width:62ch; }
.col p.cap, .cap { color:var(--muted); font-size:12.5px; line-height:1.55; letter-spacing:.01em; max-width:56ch; }
h3 { margin:72px 0 18px; font-size:19px; font-weight:300; letter-spacing:-.008em; line-height:1.35; display:flex; gap:14px; align-items:baseline; }
h3 .k { font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums; letter-spacing:.02em; min-width:22px; }
h3:first-child { margin-top:0; }
.rule-line { font-size:19px; font-weight:300; line-height:1.4; max-width:34ch; margin:0 0 18px; }

/* Icons */
svg.k { display:block; fill:none; stroke:currentColor; overflow:visible; }
symbol path, symbol circle, .k path, .k circle { vector-effect:none; }
.hot { stroke:var(--hot,currentColor); }
.dot { fill:currentColor; stroke:none; }
.dot.hot { fill:var(--hot,currentColor); stroke:none; }
.rest { color:var(--muted); }
.on { color:var(--fg); --hot:var(--accent); }
.seal { stroke:var(--accent); } .sealfill { fill:var(--accent); stroke:none; }

/* The seal plate: the home screen at rest */
.screen { position:relative; aspect-ratio:16/9.2; border:1px solid var(--rule); max-width:760px; }
.screen .row { position:absolute; left:3.2%; right:3.2%; top:5%; display:flex; align-items:center; justify-content:space-between; }
.screen .row i { display:block; width:20px; height:2px; background:var(--accent); }
.screen .stat { display:flex; align-items:center; gap:14px; color:var(--muted); font-size:11.5px; letter-spacing:.02em; }
.screen .stat b { font-weight:400; color:var(--fg); font-variant-numeric:tabular-nums; }
.bar { display:block; width:18px; height:6px; background:linear-gradient(90deg,var(--fg) 66%,var(--rule) 66%); }
.uses { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; margin-top:56px; max-width:760px; }
.use .spec { height:64px; display:flex; align-items:center; }
.use .spec .wm2 { font-size:34px; font-weight:200; letter-spacing:-.04em; line-height:1; }
.use b { display:block; font-weight:400; font-size:13.5px; margin-top:10px; }

/* Tables that are lists */
.tbl { width:100%; border-collapse:collapse; font-size:13.5px; line-height:1.5; }
.tbl th { text-align:left; font-weight:300; color:var(--muted); font-size:12.5px; letter-spacing:.02em; padding:0 20px 10px 0; vertical-align:bottom; }
.tbl td { padding:14px 20px 14px 0; border-top:1px solid var(--faint); vertical-align:top; }
.tbl.src { table-layout:fixed; min-width:640px; } .tbl.src th:nth-child(1) { width:21%; } .tbl.src th:nth-child(2) { width:31%; } .tbl.src th:nth-child(3) { width:25%; }
.tbl td.m { color:var(--muted); }
.scroll { overflow-x:auto; }

/* Laws */
.laws { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 56px; counter-reset:law; }
.laws li { counter-increment:law; display:grid; grid-template-columns:34px minmax(0,1fr); padding:22px 0 26px; border-top:1px solid var(--faint); }
.laws li::before { content:counter(law,decimal-leading-zero); font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums; padding-top:4px; }
.laws h4 { margin:0 0 6px; font-size:19px; font-weight:300; letter-spacing:-.008em; }
.laws p { margin:0; font-size:13.5px; line-height:1.55; }
.laws .test { color:var(--muted); margin-top:8px; }

/* Materials */
.sw { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:20px; }
.sw div { min-width:0; }
.sw i { display:grid; grid-template-columns:1fr 1fr; height:88px; border:1px solid var(--faint); }
.sw i span { display:block; }
.sw b { display:block; font-weight:400; font-size:13.5px; margin-top:12px; }
.sw small { display:block; color:var(--muted); font-size:12px; line-height:1.5; font-variant-numeric:tabular-nums; }
.type { display:grid; gap:0; }
.type > div { display:grid; grid-template-columns:150px minmax(0,1fr); gap:24px; align-items:baseline; padding:18px 0; border-top:1px solid var(--faint); }
.type .cap { margin:0; }
.t72 { font-size:72px; font-weight:200; line-height:1; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.t30 { font-size:30px; font-weight:200; line-height:1.2; letter-spacing:-.02em; }
.t15 { font-size:15px; font-weight:300; }
.t12 { font-size:12.5px; font-weight:300; letter-spacing:.02em; color:var(--muted); }

/* Diagrams */
svg.dia { display:block; width:100%; height:auto; overflow:visible; font-family:var(--sans); }
.dia .g1 { stroke:var(--faint); stroke-width:1; fill:none; } .dia .g4 { stroke:var(--rule); stroke-width:1; fill:none; }
.dia .live { fill:none; stroke:var(--muted); stroke-width:1; stroke-dasharray:3 4; }
.dia .ink { fill:none; stroke:var(--fg); } .dia .hotd { fill:none; stroke:var(--accent); }
.dia .pen { fill:none; stroke:var(--bg); stroke-width:1; } .dia .node { fill:var(--bg); stroke:none; }
.dia .dim { fill:none; stroke:var(--muted); stroke-width:1; }
.dia .dl { fill:var(--muted); font-size:11.5px; letter-spacing:.02em; font-weight:300; font-variant-numeric:tabular-nums; }
.dia .dt { fill:var(--fg); font-size:13.5px; font-weight:400; }
.dia .retired .ink { stroke:var(--rule); } .dia .retired .dt { fill:var(--muted); text-decoration:line-through; }
.dia .track { fill:var(--rule); } .dia .fill { fill:var(--fg); } .dia .fillhot { fill:var(--accent); }
.two { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:48px; align-items:start; }
.spec-list { margin:0; padding:0; list-style:none; font-size:13.5px; line-height:1.5; }
.spec-list li { display:grid; grid-template-columns:118px minmax(0,1fr); gap:16px; padding:11px 0; border-top:1px solid var(--faint); }
.spec-list li span:first-child { color:var(--muted); }
.spec-list.why { max-width:760px; } .spec-list.why li { grid-template-columns:168px minmax(0,1fr); }
.prims { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:24px; align-items:start; }
.prims figure, .hots figure, .steps figure, .sizes figure { margin:0; }
.prims .k { width:88px; height:88px; margin-left:-12px; }
.prims figcaption, .hots figcaption, .steps figcaption, .sizes figcaption { font-size:12.5px; color:var(--muted); line-height:1.5; margin-top:12px; }
.prims figcaption b, .hots figcaption b, .steps figcaption b, .sizes figcaption b { display:block; color:var(--fg); font-weight:400; font-size:13.5px; }
.hots { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:24px; }
.hots .k { width:56px; height:56px; }
.sizes { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; align-items:start; }
.sizes .box { height:44px; display:flex; align-items:flex-end; }
.steps { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:20px; }
.steps .pl { aspect-ratio:1; display:grid; place-items:center; border:1px solid var(--faint); position:relative; }
.steps .pl.grid { background:
    linear-gradient(var(--faint) 1px,transparent 1px) 0 0/calc(100%/6) calc(100%/6),
    linear-gradient(90deg,var(--faint) 1px,transparent 1px) 0 0/calc(100%/6) calc(100%/6); }
.steps .pl .k { width:58%; height:58%; }
.steps .pl q { quotes:none; font-size:17px; font-weight:200; letter-spacing:-.01em; text-align:center; line-height:1.3; padding:0 14px; }
.steps .pl .old { color:var(--rule); }
.chip { display:inline-flex; }
.chip span { display:grid; place-items:center; width:46px; height:40px; }
.chip .d { background:#f7f4f1; color:#666; --hot:#666; } .chip .d.on { color:#111; --hot:#e0301e; }
.chip .n { background:#121212; color:#9a9a9a; --hot:#9a9a9a; } .chip .n.on { color:#ececec; --hot:#f0705a; }
.chip.edge { outline:1px solid var(--faint); }
.steps .chip span { width:32px; height:34px; }

/* Library */
.tools { display:flex; flex-wrap:wrap; gap:10px 34px; font-size:12.5px; letter-spacing:.02em; color:var(--muted); margin-bottom:8px; align-items:center; }
.tools .grp { display:flex; gap:16px; }
.tools .tabs button { font:inherit; color:var(--muted); background:none; border:0; padding:6px 0; cursor:pointer; position:relative; }
.tools .tabs button[aria-pressed="true"] { color:var(--fg); }
.tools .tabs button[aria-pressed="true"]::after { content:''; position:absolute; left:0; bottom:2px; width:14px; height:1.5px; background:var(--accent); }
.find { display:flex; align-items:center; gap:18px; margin:6px 0 10px; font-size:12.5px; color:var(--muted); letter-spacing:.02em; }
.find .fd { max-width:280px; }
.fd input::placeholder { color:var(--muted); opacity:1; }
.fd input[type="search"]::-webkit-search-cancel-button { -webkit-appearance:none; }
.find output { margin-left:auto; color:var(--fg); min-height:1em; }
.none { color:var(--muted); padding:30px 0; border-top:1px solid var(--faint); margin:0; }
.lib.compact .bleed { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:30px 14px; padding:34px 0 20px; border-top:1px solid var(--faint); }
.lib.compact .count, .lib.compact .tiles { display:contents; }
.lib.compact .count > header, .lib.compact .tile .chip, .lib.compact .tile .idea, .lib.compact .tile .wh { display:none; }
.lib.compact .tile .pl { height:52px; }
.lib.compact .tile .pl .k { width:40px; height:40px; margin-left:-6px; }
.lib.compact.grid .tile .pl .k { background-size:6.667px 6.667px; }
.lib.compact .tile .nm { font-size:12.5px; font-weight:300; margin-top:6px; }
.count { display:grid; grid-template-columns:208px minmax(0,1fr); gap:0 48px; padding:30px 0 44px; border-top:1px solid var(--faint); }
.count > header { display:block; }
.count > header b { display:block; font-size:72px; font-weight:200; line-height:.9; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.count > header span { display:block; color:var(--muted); font-size:12.5px; letter-spacing:.02em; margin-top:10px; }
.tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:40px 20px; align-items:start; }
.tile { background:none; border:0; padding:0; margin:0; font:inherit; color:inherit; text-align:left; cursor:pointer; display:block; min-width:0; }
.tile .pl { height:96px; display:grid; place-items:center start; color:var(--muted); transition:color .25s; }
.tile .pl .k { width:60px; height:60px; margin-left:-8px; }
.lib.grid .tile .pl .k { outline:1px solid var(--faint); background:
    linear-gradient(var(--faint) 1px,transparent 1px) 0 0/10px 10px,
    linear-gradient(90deg,var(--faint) 1px,transparent 1px) 0 0/10px 10px; }
.tile:hover .pl, .tile:focus-visible .pl, .lib.all-on .tile .pl { color:var(--fg); --hot:var(--accent); }
.tile .nm { display:block; font-size:13.5px; font-weight:400; margin-top:6px; }
.tile .wh { display:block; font-size:12px; color:var(--muted); line-height:1.45; }
.tile .idea { display:block; font-size:12px; line-height:1.45; margin-top:8px; max-width:22ch; }
.tile .chip { margin-top:10px; }
.tile .chip span { width:30px; height:26px; }
.tile[hidden] { display:none; }
.count[hidden] { display:none; }

/* Audit */
.stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:20px; margin:0 0 64px; }
.stats div { border-top:1px solid var(--faint); padding-top:14px; }
.stats b { display:block; font-size:44px; font-weight:200; line-height:1; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.stats b s { text-decoration:none; color:var(--rule); margin-right:.18em; }
.stats span { display:block; font-size:12.5px; color:var(--muted); margin-top:10px; line-height:1.45; }
.pairs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 48px; }
.pair { display:grid; grid-template-columns:60px 60px minmax(0,1fr); gap:18px; align-items:center; padding:18px 0; border-top:1px solid var(--faint); }
.pair .k, .pair .before { width:52px; height:52px; display:block; margin:0 auto; }
.pair .was { color:var(--muted); }
.pair .now { color:var(--fg); }
.pair:hover .now { --hot:var(--accent); }
.before { overflow:visible; }
.before [class]:not([stroke]) { stroke:currentColor; }
.pair b { display:block; font-weight:400; font-size:13.5px; }
.pair span { display:block; font-size:12px; line-height:1.45; color:var(--muted); }
.pairs .hd { font-size:12px; color:var(--muted); letter-spacing:.02em; text-align:center; padding:0 0 10px; border:0; }

/* Origins */
.story h3 { margin:2.6em 0 .7em; font-size:19px; font-weight:300; }
.story p.not { color:var(--muted); }
/* Method */
.qs { margin-top:36px; }
.qs p { font-size:13.5px; }
.red-h { margin:64px 0 18px; font-size:19px; font-weight:300; }
.steps .pl.ink { color:var(--fg); }
.steps .pl.lost { color:var(--rule); }
.steps figcaption b.no { color:var(--muted); }
/* Controls */
.tbl.which td:nth-child(2) { font-weight:400; white-space:nowrap; }
.ctl { display:grid; grid-template-columns:minmax(0,300px) minmax(0,1fr); gap:24px 48px; align-items:center; padding:26px 0; border-top:1px solid var(--faint); }
.ctl h4 { margin:0 0 6px; font-size:19px; font-weight:300; }
.ctl p { margin:0; font-size:13.5px; line-height:1.55; max-width:52ch; }
.demo { display:flex; align-items:center; gap:22px; min-height:44px; position:relative; }
.swt { width:34px; height:34px; padding:0; border:0; background:none; cursor:pointer; display:grid; place-items:center; flex-shrink:0; }
.swt::before { content:''; width:12px; height:12px; box-sizing:border-box; border:1.5px solid var(--muted); transition:background .2s, border-color .2s; }
.swt[aria-checked="true"]::before { background:var(--fg); border-color:var(--fg); }
.swt:hover::before { border-color:var(--fg); }
.demo .swt:first-child { margin-left:-11px; }
.ts { display:flex; gap:18px; }
.ch { display:flex; gap:20px; font-size:15px; }
.sheet .opt { justify-content:space-between; gap:22px; }
.ptabs { margin:-6px 0 12px; }
.story .fig { margin:26px 0 8px; }
.story h3 { margin-top:3em; }
.ts button, .wd, .lsb { font:inherit; font-size:15px; font-weight:300; background:none; border:0; padding:8px 0; cursor:pointer; color:var(--muted); position:relative; transition:color .2s; }
.sheet { font-size:15px; }
.ts button:hover, .wd:hover { color:var(--fg); }
.ts button[aria-pressed="true"] { color:var(--fg); }
.ts button[aria-pressed="true"]::after { content:''; position:absolute; left:0; bottom:3px; width:14px; height:1.5px; background:var(--accent); }
.wd.main, .lsb, .wd.is-ink { color:var(--fg); }
span.wd, span.btn { cursor:default; display:inline-flex; align-items:center; }
.btn { font:inherit; font-size:15px; font-weight:300; height:34px; padding:0 16px; border:0; border-radius:0; background:var(--fg); color:var(--bg); cursor:pointer; display:inline-flex; align-items:center; white-space:nowrap; transition:background .15s; }
button.btn:active, .btn.is-down { background:var(--muted); }
.btn.is-off { background:var(--rule); }
.wd.is-off { color:var(--rule); }
.is-focus { outline:1.5px solid var(--accent); outline-offset:4px; }
.gb { width:34px; height:34px; padding:0; border:0; background:none; color:var(--muted); cursor:pointer; display:inline-grid; place-items:center; transition:color .2s; }
.gb:hover { color:var(--fg); }
.tbl.btns td { vertical-align:middle; }
.tbl.btns td:first-child { white-space:nowrap; }
.tbl.btns .wd, .tbl.btns .btn { white-space:nowrap; }
.tbl.btns.states td:nth-child(2), .tbl.btns.states td:nth-child(3) { padding-left:6px; }
.working { display:inline-flex; align-items:center; gap:10px; color:var(--muted); font-size:15px; height:34px; }
.panel.ask { padding:28px; }
.panel.ask .aq { margin:0; font-size:19px; font-weight:300; }
.panel.ask .ah { margin:4px 0 18px; color:var(--muted); font-size:13.5px; }
.panel.ask .pact { border-top:0; padding-top:0; align-items:center; }
.ls { position:relative; }
.lsb { display:flex; align-items:center; gap:8px; }
.lsb .k { color:var(--muted); }
.sheet { position:absolute; z-index:3; right:-22px; top:calc(100% + 2px); min-width:132px; display:grid; padding:10px 22px; background:var(--bg); border:1px solid var(--faint); border-radius:18px; box-shadow:0 14px 36px rgba(0,0,0,.10); }
.demo .sheet { right:auto; left:-22px; }
.sheet[hidden] { display:none; }
.sheet .opt { padding:7px 0; }
.lv { flex:1; height:26px; display:grid; align-items:center; cursor:pointer; touch-action:none; min-width:120px; }
.lv i { display:block; height:6px; background:var(--rule); transition:height .15s; }
.lv b { display:block; height:100%; background:var(--fg); }
.lv:hover i, .lv.drag i { height:8px; }
.lvn { font-size:15px; min-width:2ch; text-align:right; }
.fd { flex:1; max-width:220px; }
.fd input { width:100%; font:inherit; font-size:15px; font-weight:300; color:var(--fg); background:none; border:0; border-bottom:1px solid var(--rule); border-radius:0; padding:7px 0; outline:none; caret-color:var(--accent); }
.fd input:focus { border-bottom-color:var(--fg); }
.panel { border:1px solid var(--faint); border-radius:18px; box-shadow:0 14px 36px rgba(0,0,0,.07); padding:26px 28px 18px; }
.panel .pt { margin:0 0 14px; font-size:12.5px; color:var(--muted); letter-spacing:.02em; }
.prow { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:50px; border-top:1px solid var(--faint); }
.prow .pn small { display:block; font-size:12.5px; color:var(--muted); line-height:1.4; }
.prow .swt { margin-right:-11px; }
.prow .ch .opt, .prow .lsb { padding:8px 0; }
.prow.lvrow { flex-wrap:wrap; padding:10px 0 8px; gap:0 18px; }
.prow.lvrow .lv { flex-basis:100%; }
.pact { display:flex; gap:22px; border-top:1px solid var(--faint); padding-top:8px; margin-top:0; }

/* Practice */
.dia.wire { max-width:760px; }
.dia .hair { fill:none; stroke:var(--rule); stroke-width:1; }
.dia .tx { fill:var(--fg); } .dia .tm { fill:var(--muted); } .dia .trk { fill:var(--rule); } .dia .sealr { fill:var(--accent); }
.dia .an { fill:var(--muted); font-size:11.5px; font-variant-numeric:tabular-nums; }
.spec-list.keyed li { grid-template-columns:150px minmax(0,1fr); }
.tbl.words td:nth-child(2) { font-weight:400; }
.tbl.words { table-layout:fixed; min-width:620px; }
.check { margin:18px 0 0; padding:0; list-style:none; counter-reset:c; max-width:720px; }
.check li { counter-increment:c; display:grid; grid-template-columns:34px minmax(0,1fr) 14px; align-items:center; gap:0 8px; padding:12px 0; border-top:1px solid var(--faint); font-size:15px; }
.check li::before { content:counter(c,decimal-leading-zero); font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums; }
.check li::after { content:''; width:12px; height:12px; background:var(--fg); }
.demo.mo { min-height:64px; }
.risebox { width:120px; height:56px; border:1px solid var(--faint); border-radius:18px; box-shadow:0 10px 26px rgba(0,0,0,.08); background:var(--bg); }
.risebox.go { animation:rise .35s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
.pulse { width:8px; height:8px; border-radius:50%; background:var(--fg); animation:pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity:.2; } }

/* Decisions */
.dec { list-style:none; margin:0; padding:0; }
.dec li { display:grid; grid-template-columns:64px minmax(0,1fr) 110px; gap:8px 24px; padding:22px 0 26px; border-top:1px solid var(--faint); }
.dec .id { font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums; padding-top:4px; }
.dec h4 { margin:0 0 6px; font-size:19px; font-weight:300; }
.dec p { margin:0 0 .6em; font-size:13.5px; line-height:1.55; max-width:64ch; }
.dec .st { font-size:12.5px; color:var(--muted); padding-top:4px; text-align:right; }
.dec .fig { margin:18px 0 6px; }
.dec .open { color:var(--muted); }


@media (max-width:900px) {
  section { grid-template-columns:minmax(0,1fr); gap:22px; }
  .bleed { margin-left:0; }
  .rail, .wide .rail { position:static; display:flex; gap:14px; align-items:baseline; }
  .count { grid-template-columns:72px minmax(0,1fr); gap:0 24px; }
  .rail h2 { margin:0; }
  .lead { margin-top:0; }
  .laws, .two { grid-template-columns:1fr; }
  .ctl { grid-template-columns:1fr; gap:14px; }
  .sw { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .prims { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .hots { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .steps { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .pairs { grid-template-columns:repeat(2,minmax(0,1fr)); } .pairs .hd { display:none; }
}
@media (max-width:560px) {
  .cover { grid-template-columns:1fr; } .cover .kan { display:none; }
  .uses, .sw, .sizes, .steps, .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pairs { grid-template-columns:1fr; }
  .type > div { grid-template-columns:1fr; gap:6px; } .t72 { font-size:56px; }
  .count { grid-template-columns:1fr; gap:20px; } .count > header { display:flex; gap:14px; align-items:baseline; } .count > header b { font-size:44px; }
  .dec li { grid-template-columns:44px minmax(0,1fr); } .dec .st { grid-column:2; text-align:left; padding-top:0; }
  .spec-list li { grid-template-columns:96px minmax(0,1fr); }
}
/* --- The design pages inside the site (tools/design.py) --- */
html { scroll-padding-top:100px; }
main.codex { padding-top:76px; }
.rail { top:100px; }
.rail h1 { margin:4px 0 0; font-size:15px; font-weight:400; letter-spacing:0; }
.codex .cover { padding-top:clamp(56px,11vh,130px); }
.cover .sub a { color:var(--muted); }
/* Chapters, in the rail: words in a column. The one you are on is ink, with the red line of a tab beneath. */
.toc { list-style:none; margin:40px 0 0; padding:0; display:grid; gap:2px; font-size:12.5px; letter-spacing:.02em; }
.toc a { display:inline-block; padding:5px 0; color:var(--muted); text-decoration:none; position:relative; transition:color .2s; }
.toc a:hover { color:var(--fg); }
.toc a[aria-current="page"] { color:var(--fg); }
.toc a[aria-current="page"]::after { content:''; position:absolute; left:0; bottom:1px; width:14px; height:1.5px; background:var(--accent); }
.toc .n { display:inline-block; min-width:26px; font-variant-numeric:tabular-nums; color:var(--muted); }
.wide .toc { display:none; }
/* Contents on /design/: a list that hangs from hairlines. */
.contents { list-style:none; margin:0; padding:0; }
.contents li { border-top:1px solid var(--faint); }
.contents a { display:grid; grid-template-columns:44px minmax(0,1fr); gap:0 16px; padding:18px 0 20px; text-decoration:none; }
.contents .n { font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums; padding-top:5px; }
.contents b { display:block; font-size:19px; font-weight:300; letter-spacing:-.008em; }
.contents span.l { display:block; color:var(--muted); font-size:13.5px; margin-top:2px; }
.contents a:hover b { text-decoration:underline; text-decoration-color:var(--rule); text-underline-offset:4px; }
/* The way on: two grey words, next ink. */
.onward { display:flex; justify-content:space-between; gap:24px; margin-top:96px; padding-top:22px; border-top:1px solid var(--faint); font-size:15px; }
.onward a { text-decoration:none; color:var(--muted); display:grid; gap:2px; }
.onward a.next { color:var(--fg); text-align:right; margin-left:auto; }
.onward small { font-size:12.5px; color:var(--muted); letter-spacing:.02em; }
.onward a:hover span { text-decoration:underline; text-decoration-color:var(--rule); text-underline-offset:4px; }
.colophon { color:var(--muted); font-size:12.5px; line-height:1.6; max-width:62ch; margin:40px 0 0; }
/* The site's top row keeps its own rule: red only on the open app's stroke (the document's .on and .hot mean the same, but not on the day/night glyph). */
.top .hot { stroke:currentColor; }
.top .mark.on .hot, .top .mark:hover .hot { stroke:var(--accent); }
/* A chapter's own page starts under the top row, not a cover's depth below it. */
main.codex > section:first-child { margin-top:clamp(40px,6vw,72px); }
@media (max-width:900px) { .toc { display:none; } .rail h1 { margin:0; } }
