@font-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/be-vietnam-pro-latin-400-normal.woff2) format("woff2"); 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-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/be-vietnam-pro-latin-600-normal.woff2) format("woff2"); 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-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/be-vietnam-pro-latin-700-normal.woff2) format("woff2"); 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-face { font-family: "Be Vietnam Pro"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format("woff2"); 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-face { font-family: "Be Vietnam Pro"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format("woff2"); 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-face { font-family: "Be Vietnam Pro"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format("woff2"); 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; }

:root {
    --page: #eff1f3;
  --ink: #17191c;
  --muted: #55595f;
  --line: #cfd4d9;
  --panel: #e5e8eb;
  --pass: #0b6b3a;
  --pass-tint: #e3ede7;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --measure: 58ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: var(--pass); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pass); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--page); padding: 10px 12px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

h1, h2, h3 { line-height: 1.2; margin: 0; }
p, ul, dl, figure { margin: 0; }

.hero { padding: 40px 0 36px; border-bottom: 1px solid var(--line); background: var(--pass-tint); }
.hero h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.01em; }
.hero .aka { font-size: 1.05rem; font-weight: 400; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.hero .title { font-size: 1.2rem; margin-top: 6px; }

.runline {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.5;
  max-width: var(--measure);
  border-top: 2px solid var(--pass);
  border-bottom: 2px solid var(--pass);
  padding: 10px 0;
  margin: 22px 0;
}
.runline span { display: inline-block; }

.runline { position: relative; }
.runline::before, .runline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: right;
  animation: run-sweep 1.2s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.runline::before { top: -2px; }
.runline::after { bottom: -2px; }
.runline .run-status {
  position: absolute;
  top: -0.8em;
  right: 0;
  padding-left: 10px;
  background: var(--pass-tint);
  font: 600 0.78rem/1.4 var(--mono);
}
.run-status::before { content: "running"; position: absolute; right: 0; color: var(--muted); opacity: 0; animation: run-out 1.3s both; }
.run-status::after { content: "\2713\00a0passed"; color: var(--pass); animation: run-in 1.3s both; }
@keyframes run-sweep { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes run-out { 0%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes run-in { 0%, 88% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .runline::before, .runline::after, .run-status::before, .run-status::after { animation: none; }
}
.runline strong { font-weight: 700; }

.lede { max-width: var(--measure); font-size: 1.08rem; }

.facts { margin-top: 22px; display: grid; gap: 6px 28px; max-width: 860px; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (min-width: 1000px) {
  .facts { grid-template-columns: 1fr 1fr; max-width: none; }
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 16px; }
.reveal {
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--pass);
  border: 0;
  border-radius: 4px;
  padding: 10px 16px;
  cursor: pointer;
}
.reveal:hover { background: #095730; }
.actions .email { font-weight: 600; word-break: break-all; }
.actions a { display: inline-block; padding: 9px 0; }
.small { color: var(--muted); font-size: 0.92rem; margin-top: 10px; max-width: var(--measure); }

.toc { padding: 22px 0 4px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.toc a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.toc a:hover { text-decoration: underline; }
.toc a[aria-current="true"] { color: var(--pass); font-weight: 600; }
@media (max-width: 999.98px) {
  .toc ul { gap: 8px; }
  .toc a { display: inline-block; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; }
  .toc a[aria-current="true"] { border-color: var(--pass); }
}

main section { padding: 40px 0; border-bottom: 1px solid var(--line); }
main section:last-child { border-bottom: 0; }

h2 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.005em; margin-bottom: 16px; }
section > h3 { font-size: 1.12rem; margin: 30px 0 10px; }
section > p, section > ul, .job p { max-width: var(--measure); }
section > p + p, section > p + ul, section > ul + p, .job p + p { margin-top: 12px; }
section > ul { padding-left: 1.2em; }
section > ul li + li { margin-top: 10px; }

.result { border-left: 3px solid var(--pass); padding-left: 14px; }
.tools { font-family: var(--mono); font-size: 0.86rem; color: var(--muted); }
.tools strong { font-family: var(--sans); font-size: 0.95rem; color: var(--ink); }

.shots { display: grid; gap: 22px; margin-top: 26px; }
.shots + p { margin-top: 24px; }
.shot { display: block; border: 1px solid var(--line); background: var(--panel); line-height: 0; }
.shot img { width: 100%; height: auto; display: block; }
.shot:hover { border-color: var(--muted); }
figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 8px; max-width: var(--measure); }
.narrow { max-width: 460px; }
.demo { max-width: 320px; }
.demo video { width: 100%; height: auto; display: block; border: 1px solid var(--line); background: var(--panel); }

.diagram { margin-top: 24px; max-width: 720px; }
.diagram svg { width: 100%; height: auto; display: block; }
.dg-box rect { fill: var(--page); stroke: var(--ink); stroke-width: 1.5; }
.dg-box .dg-ext { fill: var(--panel); stroke: var(--muted); }
.dg-text text { font: 14px var(--sans); fill: var(--ink); text-anchor: middle; }
.dg-line path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.dg-label { font: 13px var(--sans); fill: var(--muted); }

.note { margin-top: 28px; border-left: 3px solid var(--pass); background: var(--pass-tint); padding: 14px 18px; max-width: calc(var(--measure) + 36px); }
.note h3 { font-size: 0.95rem; font-weight: 700; color: var(--pass); margin-bottom: 4px; }

.job { margin-top: 20px; }
.job:first-of-type { margin-top: 0; }
.job h3 { font-size: 1.08rem; }
.job .when { font-family: var(--mono); font-size: 0.86rem; color: var(--muted); margin: 2px 0 6px; }

.up {
  position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 5;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  background: var(--page); color: var(--ink); border: 1px solid var(--ink); border-radius: 999px;
  font-size: 0.92rem; font-weight: 600; text-decoration: none; box-shadow: 0 2px 8px rgba(23, 25, 28, 0.18);
}
.up:hover { background: var(--pass-tint); }
.up[hidden], .up.up-top { display: none; }
@media (min-width: 1000px) {
  .up.up-contents { display: none; }
  .up.up-top:not([hidden]) { display: inline-flex; }
}

dialog#viewer {
  width: min(96vw, 1500px);
  max-height: 94vh;
  padding: 12px;
  border: 1px solid var(--ink);
  background: var(--page);
  color: var(--ink);
}
dialog#viewer::backdrop { background: rgba(23, 25, 28, 0.7); }
html:has(dialog#viewer[open]) { overflow: hidden; scrollbar-gutter: stable; }
dialog#viewer { overscroll-behavior: contain; touch-action: pinch-zoom; }
dialog#viewer form { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.close { font: inherit; padding: 6px 14px; background: var(--page); color: var(--ink); border: 1px solid var(--ink); border-radius: 4px; cursor: pointer; }
.viewer-scroll { overflow: auto; max-height: 76vh; border: 1px solid var(--line); touch-action: pan-x pan-y; overscroll-behavior: contain; }
.viewer-scroll img { display: block; max-width: none; }
.viewer-caption { font-size: 0.92rem; color: var(--muted); margin-top: 8px; }

@media (min-width: 720px) {
  body { font-size: 18px; }
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 3rem; }
  .hero .aka { font-size: 1.25rem; }
  .hero .title { font-size: 1.4rem; }
  .runline { font-size: 1rem; }
  .shots { grid-template-columns: 1fr 1fr; }
  .shots .lead { grid-column: 1 / -1; }
  h2 { font-size: 1.9rem; }
  .viewer-scroll img { max-width: 100%; height: auto; }
}

@media (min-width: 1000px) {
  .layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; }
  .toc { padding-top: 44px; }
  .toc ul { position: sticky; top: 24px; display: block; }
  .toc li + li { margin-top: 9px; }
}

@media print {
  .toc, .reveal, dialog, .skip, .up { display: none !important; }
  body { font-size: 11pt; }
  .hero, main section { padding: 14pt 0; }
  main section { break-inside: auto; }
  figure, .note, .job { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .actions a::after { content: " (" attr(href) ")"; }
}
