/* Batch File Runner for ChatGPT — site stylesheet.
   No third-party requests: fonts are self-hosted (Anton + Fira Sans, SIL OFL). */

@font-face { font-family: "Anton"; src: url("../fonts/anton-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #10162b;
  --ink-2: #1b2340;
  --ink-line: #2d3760;
  --paper: #eceff5;
  --sheet: #ffffff;
  --line: #cdd3df;
  --muted: #4d556b;
  --violet: #4f3fe0;
  --violet-dark: #3a2cc0;
  --violet-soft: #9a90ff;
  --go: #0e8a5c;
  --go-soft: #3dd9a0;
  --stop: #ffb020;
  --stop-ink: #8a4f00;

  --display: "Anton", "Arial Narrow", "Helvetica Neue Condensed", Impact, sans-serif;
  --body: "Fira Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --page: 1120px;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.62 var(--body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--violet-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 2px; }
.on-ink :focus-visible, .site-footer :focus-visible { outline-color: var(--stop); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 50; border-radius: 4px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--page) + var(--gutter) * 2); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ------------------------------------------------------------ type */
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2, h3, summary { text-wrap: balance; }
p, li { text-wrap: pretty; }
.display, h1, h2.display { font-family: var(--display); line-height: 1; letter-spacing: 0.002em; }
h1 { font-size: clamp(3.1rem, 6.3vw, 5.75rem); }
h2 { font-family: var(--display); font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.04; }
h3 { font-family: var(--body); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 52ch; }
.muted { color: var(--muted); }
code, kbd { font-family: var(--mono); font-size: 0.88em; background: rgba(16,22,43,.07); padding: 0.1em 0.38em; border-radius: 3px; }
.on-ink code { background: rgba(255,255,255,.12); }

/* ------------------------------------------------------------ header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; line-height: 1.15; }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; font-weight: 500; }
.site-nav a:hover { border-bottom-color: var(--ink); color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--violet); }
.site-nav .btn { margin-left: 4px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-block; font: 600 1rem/1 var(--body); padding: 15px 22px; border-radius: 6px;
  background: var(--violet); color: #fff; text-decoration: none; border: 2px solid var(--violet);
}
.btn:hover { background: var(--violet-dark); border-color: var(--violet-dark); color: #fff; }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.alt:hover { background: var(--ink); color: #fff; }
.btn.small { padding: 10px 16px; font-size: .95rem; }
.btn[aria-disabled="true"] { background: transparent; color: var(--muted); border-color: var(--line); border-style: dashed; cursor: default; pointer-events: none; }
.on-ink .btn.alt { color: #fff; border-color: #fff; }
.on-ink .btn.alt:hover { background: #fff; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }

/* ------------------------------------------------------------ hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: stretch; margin-top: 8px; }
.hero-text { padding: clamp(28px, 5vw, 64px) clamp(20px, 3vw, 48px) clamp(36px, 6vw, 80px) max(var(--gutter), calc((100vw - var(--page)) / 2)); }
.hero-text h1 { max-width: 11em; }
.hero-text .lede { margin-top: 26px; }
.fine { font-size: .95rem; color: var(--muted); max-width: 52ch; }

.on-ink { background: var(--ink); color: #e8ecf8; }
.run-wrap { display: flex; align-items: center; padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(28px, 4vw, 56px) clamp(20px, 3vw, 48px); }
.run { width: 100%; max-width: 520px; background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 10px; overflow: hidden; }
.run-title { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--ink-line); font-weight: 600; }
.run-title span:last-child { font-weight: 400; color: #aab3d6; }
.run-list { list-style: none; margin: 0; padding: 0; }
.row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--ink-line); font-family: var(--mono); font-size: .95rem; }
.row .state { position: relative; display: block; width: 92px; height: 1.5em; text-align: right; font-family: var(--body); font-size: .9rem; font-weight: 600; }
.row .p { position: absolute; right: 0; top: 0; opacity: 0; font-style: normal; }
.row .q { opacity: 1; color: #7f89b3; font-weight: 500; }
.row .w { color: var(--violet-soft); }
.row .d { color: var(--go-soft); }
.row .bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--violet-soft); }
.run-foot { padding: 14px 18px; color: #aab3d6; font-size: .95rem; }
.run-foot strong { color: #fff; font-weight: 600; }

/* the one orchestrated moment: three files finish, the fourth starts */
@keyframes q-out   { to { opacity: 0; } }
@keyframes w-show  { 0% { opacity: 0; } 1% { opacity: 1; } 99% { opacity: 1; } 100% { opacity: 0; } }
@keyframes w-stay  { to { opacity: 1; } }
@keyframes d-in    { to { opacity: 1; } }
@keyframes grow    { 0% { width: 0; opacity: 1; } 92% { width: 100%; opacity: 1; } 100% { width: 100%; opacity: 0; } }
@keyframes grow-hold { to { width: 68%; } }

.r1 .q { animation: q-out .01s .7s forwards; }  .r1 .w { animation: w-show 1.5s .7s forwards; }  .r1 .d { animation: d-in .01s 2.2s forwards; }  .r1 .bar { animation: grow 1.5s linear .7s forwards; }
.r2 .q { animation: q-out .01s 2.2s forwards; } .r2 .w { animation: w-show 1.5s 2.2s forwards; } .r2 .d { animation: d-in .01s 3.7s forwards; } .r2 .bar { animation: grow 1.5s linear 2.2s forwards; }
.r3 .q { animation: q-out .01s 3.7s forwards; } .r3 .w { animation: w-show 1.5s 3.7s forwards; } .r3 .d { animation: d-in .01s 5.2s forwards; } .r3 .bar { animation: grow 1.5s linear 3.7s forwards; }
.r4 .q { animation: q-out .01s 5.2s forwards; } .r4 .w { animation: w-stay .01s 5.2s forwards; } .r4 .bar { animation: grow-hold 3s linear 5.2s forwards; }

@media (prefers-reduced-motion: reduce) {
  .row .p, .row .bar { animation: none !important; }
  .row .q { opacity: 0; }
  .r1 .d, .r2 .d, .r3 .d, .r4 .w { opacity: 1; }
  .r4 .bar { width: 68%; }
}

/* ------------------------------------------------------------ sections */
.section { padding: clamp(48px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 15em; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section-head.wide { max-width: 22em; }
.section-intro { max-width: var(--measure); margin: 18px 0 0; color: var(--muted); }

/* one run cycle — a real sequence, so it is numbered */
.cycle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 22px; counter-reset: step; border-top: 3px solid var(--ink); }
.cycle li { counter-increment: step; padding: 18px 0 0; position: relative; }
.cycle li::before { content: counter(step); font-family: var(--display); font-size: 2.6rem; line-height: 1; display: block; margin-bottom: 10px; color: var(--violet); }
.cycle h3 { font-size: 1.05rem; margin-bottom: 6px; }
.cycle p { font-size: .98rem; color: var(--muted); margin: 0; }
.cycle-after { margin-top: 28px; max-width: var(--measure); }

.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.split p { max-width: var(--measure); }

table { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--line); font-size: .98rem; }
caption { text-align: left; padding: 0 0 10px; font-weight: 600; }
th, td { text-align: left; vertical-align: top; padding: 13px 16px; border-bottom: 1px solid var(--line); }
thead th { background: var(--ink); color: #fff; font-weight: 600; border-bottom: 0; }
tbody th { font-weight: 600; width: 34%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

.stopline { margin: 22px 0 0; padding: 14px 16px; background: var(--sheet); border-left: 6px solid var(--stop); font-size: .98rem; }
.stopline strong { color: var(--stop-ink); }

.ruled { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--ink); }
.ruled li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 6px 36px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.ruled h3 { font-size: 1.125rem; }
.ruled p { margin: 0; max-width: var(--measure); color: var(--muted); }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 36px); align-items: start; }
.shots figure { margin: 0; }
.shots img { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
.shots figcaption { margin-top: 12px; font-size: .96rem; color: var(--muted); }

.install { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.install ol { padding-left: 1.25em; margin: 14px 0 0; }
.install li { margin-bottom: 8px; padding-left: 4px; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 3px solid var(--ink); }
summary { cursor: pointer; padding: 18px 40px 18px 0; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--display); font-size: 1.6rem; color: var(--violet); }
details[open] summary::after { content: "–"; }
details > :not(summary) { max-width: var(--measure); }
details > p:last-child, details > ul:last-child { margin-bottom: 20px; }

/* ------------------------------------------------------------ prose pages */
.page-head { padding: clamp(32px, 6vw, 72px) 0 clamp(20px, 3vw, 36px); }
.page-head h1 { font-size: clamp(3rem, 7vw, 5.6rem); }
.page-head .lede { margin-top: 18px; }
.prose-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-bottom: clamp(56px, 9vw, 120px); align-items: start; }
.toc { position: sticky; top: 20px; font-size: .96rem; }
.toc p { font-weight: 600; margin: 0 0 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; color: var(--ink); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc li a:hover { color: var(--violet); border-left-color: var(--violet); }
.prose { max-width: 70ch; }
.prose.solo { margin-bottom: clamp(56px, 9vw, 120px); }
.prose h2 { font-size: clamp(1.9rem, 3.6vw, 2.5rem); margin: 2.2em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose table { margin: 1.2em 0 1.6em; }
.callout { margin: 1.4em 0; padding: 14px 18px; background: var(--sheet); border-left: 6px solid var(--violet); }
.callout.warn { border-left-color: var(--stop); }
.callout p:last-child { margin-bottom: 0; }
.toc-mobile { display: none; }
.stamp { color: var(--muted); font-size: .96rem; }

.release { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 36px; }
.release:first-of-type { border-top: 3px solid var(--ink); }
.release h2 { font-size: 2.2rem; margin: 0; }
.release time { color: var(--muted); display: block; font-size: .96rem; margin-top: 4px; }
.release ul { margin: 0; padding-left: 1.2em; }
.release li { margin-bottom: .45em; max-width: var(--measure); }

.notfound { padding: clamp(60px, 12vw, 160px) 0; }
.notfound h1 { font-size: clamp(5rem, 16vw, 12rem); color: var(--violet); }

/* utilities (classes, not inline styles, so a strict CSP can stay on) */
.mt-s { margin-top: 10px; } .mt-m { margin-top: 12px; } .mt-l { margin-top: 22px; }
.measure { max-width: var(--measure); } .w70 { max-width: 70ch; } .no-max { max-width: none; }
.gap-b { margin-bottom: 2.4rem; } .one-col { grid-template-columns: minmax(0, 1fr); }

/* ------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #c9d0ea; padding: 48px 0 40px; margin-top: 0; font-size: .98rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, .6fr)); gap: 32px; }
.site-footer h2 { font-family: var(--body); font-size: 1rem; font-weight: 600; color: #fff; margin: 0 0 10px; line-height: 1.3; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ink-line); max-width: 78ch; color: #aab3d6; font-size: .92rem; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .cycle { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; border-top: 0; }
  .cycle li { border-top: 3px solid var(--ink); }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-text { padding-right: var(--gutter); padding-left: var(--gutter); }
  .run-wrap { padding: 32px var(--gutter) 40px; }
  .split, .install { grid-template-columns: 1fr; }
  .prose-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .toc-mobile { display: block; margin: 0 0 28px; border-top: 3px solid var(--ink); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-footer .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .cycle { grid-template-columns: 1fr 1fr; }
  .ruled li { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .release { grid-template-columns: 1fr; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav .btn { margin-left: 0; }
}
@media (max-width: 420px) {
  .cycle { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .site-footer, .toc, .toc-mobile, .actions { display: none; }
  body { background: #fff; }
}
