/* zippr.to/github/<owner>/<repo>/: the Calm Field Guide (t1623; his d4755's locked theme). The look is the live test's
   (T/ZIPGITHUB-P3-SMOKE-1124/<repo>/live.html, drawn by the proof engine's render_calm_guide), ported to one file so the
   page needs no inline style: the page's policy allows styles from this site and Google Fonts only (src/github_guide.js). */
:root {
  --bg: #FAFBFD; --paper: #FFFFFF; --wash: #EBF1FC; --cobalt: #2A50D6; --cobalt-dark: #1E3DB3;
  --ink: #111827; --ink-2: #3E4A5F; --ink-3: #5B677C; --line: #DCE4F0; --green: #17723F;
  --amber-bg: #FFFBEB; --amber-line: #F59E0B; --amber-ink: #78350F;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-body: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.66; overflow-wrap: break-word; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
code { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.z { background: var(--cobalt); color: #fff; padding: 1px 5px; border-radius: 4px; font-weight: 500; font-family: var(--font-mono); }

.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top-in { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; }
.zmark { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.tip-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); background: var(--wash); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; min-width: 0; overflow: hidden; }
.tip-pill span { white-space: nowrap; }
.tip-pill code { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tip-pill .z { padding: 1px 5px; }
.top-r { display: flex; align-items: center; gap: 16px; font-size: 14px; flex: none; }
.top-r a, .top-r button { background: none; border: none; padding: 0; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.top-r a:hover, .top-r button:hover, .top-r button[aria-pressed="true"] { color: var(--cobalt); }
.top-r a.primary { color: var(--cobalt); }

.shell { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 56px; padding-top: 44px; padding-bottom: 72px; align-items: start; }
.article { min-width: 0; }
.dev-banner { margin-bottom: 20px; padding: 14px 18px; background: var(--amber-bg); border: 1px solid rgba(245,158,11,0.35); border-left: 4px solid var(--amber-line); border-radius: 0 10px 10px 0; font-size: 15px; color: var(--amber-ink); }
.intro-note { margin: 0 0 12px; font-size: 14.5px; color: var(--cobalt); font-weight: 700; }
h1 { margin: 0 0 16px; font-family: var(--font-serif); font-size: clamp(32px, 4.3vw, 48px); font-weight: 700; line-height: 1.09; letter-spacing: -0.02em; text-wrap: balance; }
.sub-lede { margin: 0 0 26px; font-size: 18.5px; line-height: 1.58; color: var(--ink-2); }
.hero-img { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #141C2B; aspect-ratio: 16 / 10; position: relative; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-fb { display: none; height: 100%; padding: 28px; color: #F5F9FF; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; }
.hero-img.err img { display: none; }
.hero-img.err .hero-img-fb { display: flex; }

.sec { padding-top: 38px; margin-top: 38px; border-top: 1px solid var(--line); }
.sec.hero-sec { margin-top: 0; padding-top: 0; border-top: none; }
.sec h2 { margin: 0 0 12px; font-family: var(--font-serif); font-size: 28px; font-weight: 700; line-height: 1.18; letter-spacing: -0.015em; }
.sec > p { margin: 0 0 16px; color: var(--ink-2); }
.sec > p.trust-head { color: var(--ink); font-weight: 700; }

.use-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.use-list li { padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); border-left: 3.5px solid var(--cobalt); border-radius: 0 10px 10px 0; }
.use-list strong { display: block; font-size: 17px; color: var(--ink); margin-bottom: 5px; }
.use-list span { display: block; font-size: 15.5px; color: var(--ink-2); }
.use-list em { display: block; font-style: normal; margin-top: 7px; font-size: 14.5px; font-weight: 700; color: var(--green); }

.diff-table { width: 100%; border-collapse: collapse; margin-top: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.diff-table th, .diff-table td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 15.5px; vertical-align: top; }
.diff-table tr:last-child td, .diff-table tr:last-child th { border-bottom: none; }
.diff-table th { background: var(--wash); font-size: 14.5px; color: var(--ink); width: 32%; }
.diff-table td.good { font-weight: 700; color: var(--ink); }
.ba-foot { margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--green); }

.plain-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.plain-list li { padding-left: 24px; position: relative; color: var(--ink-2); font-size: 16px; }
.plain-list li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--cobalt); font-weight: 700; }
.plain-list strong { color: var(--ink); }

.step-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.step-card { padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.step-card strong { display: block; font-size: 16.5px; margin-bottom: 4px; }
.step-card span { display: block; font-size: 15px; color: var(--ink-2); }
.cmd-row { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--wash); border-radius: 7px; font-family: var(--font-mono); font-size: 13px; min-width: 0; }
.cmd-row code { min-width: 0; overflow-wrap: anywhere; }
.copy-btn { border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; flex: none; }
.copy-btn:hover { border-color: var(--cobalt); color: var(--cobalt); }

.v-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.v-item { text-decoration: none; min-width: 0; }
.v-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: #141C2B; border: 1px solid var(--line); margin-bottom: 9px; }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-thumb img.err { display: none; }
.v-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(17,24,39,0.88); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 5px; }
.v-item:hover .v-badge { background: var(--cobalt); }
.v-item h3 { margin: 0 0 3px; font-size: 15.5px; line-height: 1.3; }
.v-item p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; }

.os-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.os-pill { border: 1px solid var(--line); background: var(--paper); padding: 7px 15px; border-radius: 8px; font-size: 14.5px; font-weight: 700; color: var(--ink-2); }
.os-pill[aria-selected="true"] { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.dl-panel[hidden] { display: none; }
.dl-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 12px; }
.dl-desc { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
.dl-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
.btn-c { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 8px; background: var(--cobalt); color: #fff; text-decoration: none; border: none; font-size: 14.5px; font-weight: 700; }
.btn-c:hover { background: var(--cobalt-dark); }
.btn-g { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 8px; background: var(--wash); color: var(--ink); text-decoration: none; border: none; font-size: 14.5px; font-weight: 700; }
.btn-g:hover { background: #DCE7FA; }
.dl-tip { margin: 0; font-size: 14px; color: var(--ink-2); border-left: 3px solid var(--cobalt); padding-left: 10px; }
.hu-box { margin-top: 12px; padding: 14px 18px; background: var(--wash); border-radius: 10px; font-size: 14.5px; color: var(--ink-2); display: grid; gap: 6px; }
.hu-box p { margin: 0; }

.res-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.res-list li { border-bottom: 1px solid var(--line); }
.res-list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; text-decoration: none; font-weight: 700; font-size: 15px; }
.res-list a:hover { color: var(--cobalt); }
.res-list small { font-weight: 400; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }

details.tech { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
details.tech summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.tech-desc { margin: 12px 0 0; }
.tech-facts { margin: 12px 0 0; display: grid; gap: 6px; }
.tech-facts div { display: flex; gap: 10px; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.tech-facts dt { color: var(--ink-3); }
.tech-facts dd { margin: 0; color: var(--ink); font-weight: 700; text-align: right; min-width: 0; }
.tech-links { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tech-a { color: var(--cobalt); font-weight: 700; text-decoration: none; }

.side { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; min-width: 0; }
.side-box.sky-accent { background: var(--wash); border-color: #C7D7F2; }
.side-title { margin: 0 0 6px; font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.side-note { margin: 0; font-size: 14px; color: var(--ink-2); }
.side-dl-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px 15px; border-radius: 9px; background: var(--cobalt); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; margin: 12px 0 8px; text-align: center; }
.side-dl-btn:hover { background: var(--cobalt-dark); }
.qa-head { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.side-facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.side-facts li { display: flex; justify-content: space-between; gap: 8px; }
.side-facts strong { color: var(--ink); text-align: right; }
.side-label { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.toc { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--cobalt); }
.zip-title { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; }
.zip-say { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.zip-box-url { margin: 10px 0 12px; padding: 7px 10px; border-radius: 7px; background: var(--paper); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-box-url .z { padding: 1px 4px; border-radius: 3px; }
.side-zippr-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
.side-zippr-btn:hover { background: var(--cobalt); }

.src-tag { display: none; margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: var(--wash); color: var(--cobalt); border: 1px solid #C7D7F2; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0; vertical-align: middle; }
body.show-sources .src-tag { display: inline-block; }
.proofs, .qa-proofs { display: none; }
dialog.drawer { margin: 0 0 0 auto; padding: 0; width: min(430px, 100vw); height: 100vh; max-height: 100vh; border: none; border-left: 1px solid var(--line); background: var(--paper); color: var(--ink); }
dialog.drawer::backdrop { background: rgba(17,24,39,0.42); }
.d-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.d-head h3 { margin: 0; font-family: var(--font-serif); font-size: 20px; }
#d-close { border: 1px solid var(--line); background: #fff; width: 36px; height: 36px; border-radius: 8px; font-size: 18px; flex: none; }
.d-body { padding: 18px 22px; display: grid; gap: 14px; overflow-y: auto; max-height: calc(100vh - 74px); }
.p-where { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.proof blockquote { margin: 6px 0 8px; padding-left: 12px; border-left: 3px solid var(--cobalt); font-size: 14px; color: var(--ink); }
.p-link { color: var(--cobalt); font-size: 13.5px; font-weight: 700; }

/* the bottom band (spec §2), then the page's last words: his line and the download prompt (d4776, d4777; the look
   ZIPGITHUB-ZIPPR-LINE-1125's preview settled) */
.band { background: var(--paper); border-top: 1px solid var(--line); }
.band-in { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.band-title { margin: 0; flex: 1 1 100%; font-family: var(--font-serif); font-size: 22px; font-weight: 700; line-height: 1.3; }
.band-title .z { font-size: 0.8em; }
.band-url { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.zippr-end { background: var(--wash); border-top: 1px solid #C7D7F2; }
.zippr-end-in { padding-top: 44px; padding-bottom: 52px; }
.his-line { margin: 0 0 22px; max-width: 760px; font-family: var(--font-serif); font-size: clamp(23px, 2.6vw, 29px); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.zippr-end-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.zippr-end-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 9px; background: var(--cobalt); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
.zippr-end-btn:hover { background: var(--cobalt-dark); }
.zippr-end-alt { color: var(--cobalt); font-weight: 700; font-size: 15px; text-underline-offset: 3px; }
.zippr-end-for { margin: 16px 0 0; max-width: 640px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

/* One long word, address or command from a README never widens the page: every box that draws a stranger's words breaks
   it, and the before-and-after table keeps its columns (the review at e5fab2f81, S2: 742 px wide at 390) */
.diff-table { table-layout: fixed; }
.diff-table th, .diff-table td, .btn-c, .btn-g, .side-facts li, .side-facts span, .side-facts strong, .res-list a, .res-list small,
.tech-facts dd, .use-list li, .plain-list li, .dl-box, .hu-box, .v-item, .sec > p, .sub-lede, h1, .sec h2, .tech-desc, .calm-desc,
.zip-box-url, .intro-note, .step-card, .dev-banner, .proof blockquote, .os-pill, .side-note, .w-card, .his-line, .toc li, .toc a,
.tech-links li, .tech-a, .side-title, .band-title, .w-desc, .zippr-end-alt, .v-item h3, .v-item p { overflow-wrap: anywhere; }
.btn-c, .btn-g, .os-pill { max-width: 100%; min-width: 0; }
.res-list small { white-space: normal; text-align: right; }
.side-facts span { min-width: 0; }
.side-facts strong { min-width: 0; max-width: 60%; }

/* the calm pages: a page from meta alone, not open yet, not found, busy */
.calm-page { padding-top: 48px; padding-bottom: 64px; }
.calm-card { max-width: 720px; }
.calm-card h1 { font-size: clamp(28px, 4vw, 40px); }
.calm-desc { margin: 0 0 18px; color: var(--ink-2); }
.calm-acts, .sp-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.sp-lede { margin: 0; font-size: 18px; color: var(--ink-2); }
.sp-code { background: var(--wash); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; overflow-wrap: anywhere; }

/* the writing screen (d4775): calm words first, while the first block is being written; then a small bar at the foot
   until the end line. It goes by itself as blocks arrive, with no script: :has() reads what the stream has drawn. */
.writing { display: none; }
body.streaming .writing { display: block; padding: 36px 0 0; }
.w-card { max-width: 720px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 28px 30px; }
.w-kicker { margin: 0 0 10px; font-size: 14.5px; font-weight: 700; color: var(--cobalt); }
.w-card h1 { font-size: clamp(26px, 3.4vw, 36px); }
.w-say { margin: 0 0 20px; color: var(--ink-2); }
.w-bar { height: 6px; border-radius: 99px; background: var(--wash); overflow: hidden; margin: 0 0 18px; }
.w-bar span { display: block; width: 34%; height: 100%; border-radius: 99px; background: var(--cobalt); animation: w-slide 1.8s ease-in-out infinite; }
@keyframes w-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.w-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.w-steps li { padding-left: 26px; position: relative; color: var(--ink-3); }
.w-steps li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.w-steps li.w-done { color: var(--ink-2); }
.w-steps li.w-done::before { background: var(--green); border-color: var(--green); }
.w-steps li.w-now { color: var(--ink); font-weight: 700; }
.w-steps li.w-now::before { border-color: var(--cobalt); animation: w-pulse 1.4s ease-in-out infinite; }
@keyframes w-pulse { 50% { background: var(--wash); } }
.w-desc { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
.w-fact { margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }
.writing-bar { display: none; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 6px 24px rgba(17,24,39,0.25); max-width: calc(100vw - 32px); }
.w-dot { width: 9px; height: 9px; border-radius: 50%; background: #8FB0FF; animation: w-pulse-dot 1.2s ease-in-out infinite; flex: none; }
@keyframes w-pulse-dot { 50% { opacity: 0.3; } }
body.streaming:has(.article > .sec) .writing { display: none; }
body.streaming:has(.article > .sec):not(:has(#guide-done)):not(:has(#guide-failed)) .writing-bar { display: flex; }
body.streaming:has(#guide-failed) .writing, body.streaming:has(#guide-failed) .shell { display: none; }
/* the Sources switch works once the page's script runs, at the end line: until then it is not offered */
body.streaming:not(:has(#guide-done)) #toggle-src { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .w-bar span, .w-steps li.w-now::before, .w-dot { animation: none; }
  .w-bar span { width: 100%; opacity: 0.35; }
  html { scroll-behavior: auto; }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .side { position: static; }
  .v-stack { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 18px; padding-right: 18px; }   /* the sides only: .shell and .band-in keep their top and bottom */
  .tip-pill, .hide-sm { display: none; }
  .w-card { padding: 22px 20px; }
  .diff-table th { width: 38%; }
  .zippr-end-in { padding-top: 36px; padding-bottom: 44px; }
  .zippr-end-btn { width: 100%; }
}
