/* The page frame: type, the top bar, the contents drawer, the full view, screens, the ledger and the catalogue,
   and how scroll-held sections behave. page.css sets the colours and lays out each section. */
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-400-normal-latin.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-400-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-400-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-500-normal-latin.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-500-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-500-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-600-normal-latin.woff2) format('woff2');font-style:normal;font-weight:600;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-600-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:600;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'Fraunces';src:url(fonts/fraunces-600-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:600;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-400-normal-latin.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-400-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-400-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-500-normal-latin.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-500-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-500-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-600-normal-latin.woff2) format('woff2');font-style:normal;font-weight:600;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-600-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:600;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-600-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:600;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-700-normal-latin.woff2) format('woff2');font-style:normal;font-weight:700;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-700-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:700;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'Inter';src:url(fonts/inter-700-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:700;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'JetBrains Mono';src:url(fonts/jetbrains-mono-400-normal-latin.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'JetBrains Mono';src:url(fonts/jetbrains-mono-400-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'JetBrains Mono';src:url(fonts/jetbrains-mono-400-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:400;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}
@font-face{font-family:'JetBrains Mono';src:url(fonts/jetbrains-mono-500-normal-latin.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;font-display:swap}
@font-face{font-family:'JetBrains Mono';src:url(fonts/jetbrains-mono-500-normal-latin-ext.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;font-display:swap}
@font-face{font-family:'JetBrains Mono';src:url(fonts/jetbrains-mono-500-normal-vietnamese.woff2) format('woff2');font-style:normal;font-weight:500;unicode-range:U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;font-display:swap}

/* ---- ground ---- */
html { box-sizing: border-box; scroll-padding-top: 76px; overflow-x: clip; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
*, ::before, ::after { box-sizing: inherit; }
body { margin: 0; min-height: 100%; overflow-x: clip; background: var(--bg); color: var(--ink); font-family: "Inter", system-ui, sans-serif; font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; }
img { max-width: 100%; height: auto; }
input, button { color: inherit; font: inherit; }
a { color: inherit; text-underline-offset: .16em; }
:focus-visible { outline: 3px solid var(--focus, #c8961e); outline-offset: 3px; border-radius: 6px; }
.sr-only { clip-path: inset(50%); white-space: nowrap; overflow: hidden; position: absolute !important; inline-size: 1px; block-size: 1px; margin: -1px; padding: 0; border: 0; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0; }
.px { image-rendering: pixelated; }
.skip-link { position: fixed; z-index: 120; top: 10px; left: 10px; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* ---- the top bar: the mark, where the reader is, three switches, how far down the page ---- */
.top { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 60px; padding: 0 16px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px) saturate(1.15); }
.top-mark { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-family: "Fraunces", Georgia, serif; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.top-mark svg { inline-size: 30px; block-size: 30px; }
.top-where { flex: 1; min-width: 0; margin: 0 0 0 8px; color: var(--ink-3); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.top-where b { color: var(--ink); font-weight: 600; }
.top-btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-2); border-radius: 22px; background: var(--card); font-size: 14px; font-weight: 600; cursor: pointer; }
.top-btn svg { inline-size: 16px; block-size: 16px; }
.top-meter { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: left center; transform: scaleX(var(--read, 0)); }
@media (max-width: 640px) {
  .top-where { display: none; }
  .top-mark { flex: 1; }
  .top-btn { padding: 0; }
  .top-btn .btn-label { clip-path: inset(50%); white-space: nowrap; overflow: hidden; position: absolute; inline-size: 1px; block-size: 1px; }
}

/* ---- contents drawer ---- */
.toc { position: fixed; z-index: 60; top: 60px; right: 0; inline-size: min(420px, 100vw); max-block-size: calc(100dvh - 60px); overflow-y: auto; padding: 16px; background: var(--card); border: 1px solid var(--rule); border-top: 0; border-right: 0; box-shadow: var(--shadow-3); translate: 105% 0; visibility: hidden; transition: translate .34s var(--ease), visibility 0s linear .34s; }
.toc.is-open { translate: 0 0; visibility: visible; transition: translate .34s var(--ease); }
.toc input { inline-size: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--rule-2); border-radius: 12px; background: var(--bg); }
.toc-head { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 2px 0; color: var(--ink-3); font-size: 13px; }
.toc ol { display: flex; flex-direction: column; margin: 12px 0 0; padding: 0; list-style: none; }
.toc a { display: flex; justify-content: space-between; gap: 12px; min-height: 44px; padding: 12px 10px; border-radius: 10px; text-decoration: none; }
.toc a:hover, .toc a:focus-visible { background: var(--tint); }
.toc small { color: var(--ink-3); font-family: "JetBrains Mono", monospace; font-size: 12px; white-space: nowrap; }

/* ---- rising into view ---- */
.rise { opacity: 0; translate: 0 26px; transition: opacity .85s var(--ease), translate .85s var(--ease); transition-delay: calc(var(--lag, 0) * 85ms); }
.rise.risen { opacity: 1; translate: 0 0; }

/* ---- scroll-held sections: a tall track with a stage held under the top edge ---- */
[data-track="hold"] { position: relative; block-size: calc(var(--span, 3) * 100vh); }
.hold-in { position: sticky; top: 0; block-size: 100vh; block-size: 100dvh; overflow: hidden; }

/* ---- screens: captures of the running product ---- */
.screen { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-2); }
.screen img { inline-size: 100%; }
.screen.on-phone { border: 7px solid var(--phone, #1a1d1b); border-radius: 30px; }
.screen figcaption { padding: 10px 14px 12px; border-top: 1px solid var(--rule); background: var(--card); color: var(--ink-2); font-size: 14px; }
[data-zoom] { cursor: zoom-in; }
.screen.leaning { transform: perspective(1400px) rotateX(var(--lean-x, 0deg)) rotateY(var(--lean-y, 0deg)) translateZ(10px); box-shadow: var(--cast-x, 0px) var(--cast-y, 24px) 60px -18px var(--shadow-c, rgba(20, 30, 20, .35)); transition: transform .2s ease-out, box-shadow .2s ease-out; }

/* ---- the full view ---- */
.vw { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 3vh 3vw; }
.vw[data-state="closed"] { display: none; }
.vw-shade { position: absolute; inset: 0; background: rgba(8, 12, 10, .72); opacity: 0; transition: opacity .32s var(--ease); }
.vw[data-state="shown"] .vw-shade { opacity: 1; }
.vw-panel { position: relative; display: flex; flex-direction: column; inline-size: min(1180px, 94vw); max-block-size: 88dvh; overflow: hidden; border-radius: 16px; background: var(--card); box-shadow: 0 50px 120px -20px rgba(0, 0, 0, .6); }
.vw-panel.is-tall { inline-size: min(430px, 94vw); }
.vw-view { position: relative; flex: 1; overflow: auto; }
.vw-view img { inline-size: 100%; }
.vw-mark { position: absolute; inline-size: 30px; block-size: 30px; margin: -15px 0 0 -15px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink, #1a1a1a); font-size: 13px; font-weight: 700; line-height: 30px; cursor: pointer; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 35%, transparent); }
.vw-tip { position: absolute; max-inline-size: 280px; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 14px; line-height: 1.4; pointer-events: none; }
.vw-bar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--rule); font-size: 14px; }
.vw-bar p { flex: 1; margin: 0; color: var(--ink-2); }

/* ---- the ledger: records chained by hash ---- */
.ledger { position: relative; display: grid; gap: 14px; }
.rec { position: relative; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-1); transition: border-color .3s, box-shadow .3s; }
.rec dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.rec dt { color: var(--ink-3); }
.rec dd { margin: 0; }
.rec input { inline-size: 100%; min-height: 40px; padding: 0 8px; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--bg); }
.digest { margin: 10px 0 0; color: var(--ink-3); font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 500; line-height: 1.3; word-break: break-all; }
.rec.is-broken { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 30%, transparent); }
.rec.is-broken .digest { color: var(--bad); }

/* ---- the catalogue of capabilities ---- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border: 1px solid var(--rule-2); border-radius: 22px; background: var(--card); font-size: 14px; font-weight: 500; cursor: pointer; }
.pill[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.cap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.cap-card { overflow: hidden; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); }
.cap-card[hidden] { display: none; }
.cap-card img { inline-size: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.cap-card div { padding: 12px 14px 14px; }
.cap-card h4 { margin: 0 0 4px; font-size: 15px; }
.cap-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.cap-card small { display: block; margin-top: 8px; color: var(--ink-3); font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

/* ---- motion off: the system setting or the Pause switch; every section reads in full, nothing moves ---- */
[data-motion="off"] .rise { opacity: 1; translate: 0 0; transition: none; }
[data-motion="off"] [data-track="hold"] { block-size: auto; }
[data-motion="off"] .hold-in { position: relative; block-size: auto; overflow: visible; }
[data-motion="off"] *, [data-motion="off"] ::before, [data-motion="off"] ::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
