/* What to draw. Swiss/International style: white paper, black ink, square corners, black rules, Helvetica set large.
   One red (#e30613) = the new stroke in each step, and hover. Yellow #ffc400 = keyboard focus only.
   No dark panels, no green, no pills or badges, no uppercase letter-spaced labels, no shadows, no rounded cards. */
:root {
  --bg: #ffffff; --ink: #000000; --ink-2: #222222; --muted: #666666; --line: #dddddd; --line-2: #bbbbbb;
  --red: #e30613; --warn: #ffc400;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ── header + nav ─────────────────────────────────────────────────── */
.top { background: #fff; border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 30; }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 56px; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 21px; letter-spacing: -.02em; white-space: nowrap; display: inline-flex; align-items: flex-start; gap: 3px; }
.brand:hover { color: var(--ink); }
.brand-sq { width: 8px; height: 8px; background: var(--red); margin-top: 3px; }
.topnav { display: flex; gap: 0; margin-left: auto; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; user-select: none; }
.menu > summary::-webkit-details-marker { display: none; }
.topnav .navlink, .topnav .menu > summary { font-size: 16px; color: var(--ink); padding: 8px 12px; display: flex; align-items: center; gap: 7px; text-decoration: none; }
.topnav .menu > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.topnav .navlink:hover, .topnav .navlink.cur, .topnav .menu > summary:hover, .menu[open] > summary { background: var(--ink); color: #fff; }
.topnav .menu > summary.cur { font-weight: 700; }
.menu-pop { position: absolute; right: 0; top: 100%; background: #fff; border: 2px solid var(--ink); min-width: 340px; max-height: calc(100vh - 80px); overflow: auto; }
.menu-pop ul { list-style: none; margin: 0; padding: 0; }
.menu-pop li + li { border-top: 1px solid var(--line); }
.menu-pop a { display: grid; gap: 1px; padding: 9px 14px; text-decoration: none; color: var(--ink); }
.menu-pop a:hover, .menu-pop a[aria-current] { background: var(--ink); color: #fff; }
.menu-pop a:hover .md, .menu-pop a[aria-current] .md { color: #ccc; }
.menu-pop .mn { font-weight: 700; font-size: 16px; }
.menu-pop .md { font-size: 14px; color: var(--muted); line-height: 1.4; }
.menu-wide { min-width: 460px; }
.menu-pop .cols { display: grid; grid-template-columns: 1fr 1fr; }
.menu-pop .cols li { border-top: 1px solid var(--line); }
.allnav { display: none; margin-left: auto; }
.allnav > summary { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; padding: 8px 14px; border: 2px solid var(--ink); min-height: 42px; }
.allnav > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.sheet { position: fixed; left: 0; right: 0; top: 58px; max-height: calc(100vh - 58px); overflow: auto; background: #fff; border-bottom: 2px solid var(--ink); padding: 4px 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.sheet-h { margin: 14px 0 0; font-size: 15px; font-weight: 700; padding-bottom: 4px; border-bottom: 2px solid var(--ink); }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet a { display: block; padding: 10px 0; min-height: 44px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-size: 16px; }
.sheet a[aria-current] { font-weight: 700; }
@media (max-width: 900px) { .topnav { display: none; } .allnav { display: block; } }
@media (max-width: 420px) { .sheet { grid-template-columns: 1fr; } }

/* ── type ─────────────────────────────────────────────────────────── */
h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1.0; letter-spacing: -.035em; font-weight: 700; margin: 0; }
h2 { font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 22px 0 6px; font-weight: 700; }
.lede { color: var(--ink-2); margin: 12px 0 0; font-size: 19px; line-height: 1.45; max-width: 62ch; }
.lede p { margin: 0 0 8px; }
.hero { padding: 28px 0 22px; }
.crumbs { margin: 0 0 10px; font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 0; margin: 14px 0 0; font-size: 15px; }
.meta span { padding: 2px 12px; border-left: 1px solid var(--line-2); }
.meta span:first-child { padding-left: 0; border-left: 0; font-weight: 700; }
@media (max-width: 700px) { .hero { padding: 18px 0 16px; } .lede { font-size: 17px; } }

/* ── buttons ──────────────────────────────────────────────────────── */
.btn { appearance: none; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 700 16px/1.1 var(--sans); text-decoration: none;
       padding: 10px 16px; border-radius: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; touch-action: manipulation; }
.btn:hover { background: var(--ink); color: #fff; }
.btn[disabled] { opacity: .3; cursor: not-allowed; background: #fff; color: var(--ink); }
.btn.on { background: var(--ink); color: #fff; }
.btn-go { background: var(--ink); color: #fff; }
.btn-go:hover { background: var(--red); border-color: var(--red); }
.btn-xl { min-height: 64px; font-size: 22px; padding: 14px 28px; }
.btn-sm { padding: 6px 12px; min-height: 38px; font-size: 15px; }
.btn-quiet { border-color: var(--line-2); font-weight: 400; }
.btn-quiet:hover { border-color: var(--ink); }
.seg { display: inline-flex; flex-wrap: wrap; }
.seg .btn + .btn { margin-left: -2px; }
label.chk { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; color: var(--ink-2); cursor: pointer; }
input[type=checkbox] { accent-color: #000; width: 18px; height: 18px; }

/* ── generator ────────────────────────────────────────────────────── */
.gen { border-top: 6px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 14px 0 18px; }
.gen-modes { display: flex; flex-wrap: wrap; gap: 0; }
.gen-modes .btn { margin: 0 -2px -2px 0; }
.gen-card { padding: 22px 0 18px; min-height: 210px; }
.gen-k { margin: 0 0 6px; font-size: 16px; color: var(--muted); }
.gen-prompt { margin: 0; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; max-width: 24ch; }
.gen-style { margin: 14px 0 0; font-size: 19px; color: var(--ink-2); border-left: 6px solid var(--red); padding-left: 12px; max-width: 60ch; }
.gen-how { margin: 12px 0 0; font-size: 16px; }
.gen-how a { font-weight: 700; }
.gen-how a::after { content: " →"; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; padding: 4px 0 18px; border-bottom: 1px solid var(--ink); }
.gen-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.timer { padding-top: 14px; }
.timer-h { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.timer-lab { font-weight: 700; }
.timer-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 12px; }
.timer-num { font: 700 52px/1 var(--sans); letter-spacing: -.04em; min-width: 3.2ch; }
.timer.done .timer-num { color: var(--red); }
.progress { height: 6px; background: #e8e8e8; margin: 14px 0 0; }
.progress > div { height: 100%; width: 0; background: var(--ink); }
.timer.done .progress > div { background: var(--red); }
.gen-hist { margin-top: 14px; font-size: 15px; }
.gen-hist summary { cursor: pointer; font-weight: 700; }
.gen-hist ol { margin: 8px 0 0; padding-left: 22px; }
.gen-hist li { margin: 4px 0; }
@media (max-width: 700px) {
  .gen-card { min-height: 0; padding: 16px 0 14px; }
  .gen-prompt { font-size: 30px; }
  .gen-style { font-size: 17px; }
  .gen-actions .btn-xl { width: 100%; }
  .timer-num { font-size: 42px; }
}
/* small version beside idea lists */
.gen:not(.gen-big) { border-top-width: 4px; }
.gen:not(.gen-big) .gen-prompt { font-size: 26px; }
.gen:not(.gen-big) .gen-style { font-size: 16px; }
.gen:not(.gen-big) .gen-card { min-height: 0; }
.gen:not(.gen-big) .gen-actions .btn-xl { width: 100%; min-height: 54px; font-size: 19px; }
.gen:not(.gen-big) .timer-num { font-size: 40px; }
.gen:not(.gen-big) .gen-modes .btn { font-size: 14px; padding: 5px 9px; min-height: 34px; }

/* ── content blocks ───────────────────────────────────────────────── */
.copy { max-width: 760px; }
.block { margin: 56px 0 0; border-top: 2px solid var(--ink); padding-top: 12px; }
.block p, .block li { color: var(--ink-2); }
.block ul, .block ol { padding-left: 22px; }
.block li { margin: 6px 0; }
.wide { max-width: none; }
.more { margin: 16px 0 0; font-size: 16px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:first-of-type { border-top: 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 10px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq .ans p:first-child { margin-top: 0; }
.related { margin: 56px 0 64px; }
.journey { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.jrow { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.jrow:hover { color: var(--ink); background: #f3f3f3; }
.jrow:hover .jt { color: var(--red); }
.jt { font-weight: 700; }
.jd { color: var(--muted); font-size: 15px; }
@media (max-width: 560px) { .jrow { grid-template-columns: 1fr; gap: 2px; } }

/* list of idea lists (home) */
.rows { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.rowlink { display: grid; grid-template-columns: minmax(200px, 300px) 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.rowlink:hover { background: #f3f3f3; color: var(--ink); }
.rowlink:hover .rt { color: var(--red); }
.rt { font-weight: 700; font-size: 18px; }
.rd { color: var(--muted); font-size: 15px; }
.rn { font-size: 15px; }
@media (max-width: 640px) { .rowlink { grid-template-columns: 1fr auto; } .rd { grid-column: 1 / -1; grid-row: 2; } }

/* thumbnails of finished drawings */
.thumbs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); border-top: 2px solid var(--ink); border-left: 1px solid var(--line); }
.thumbs li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.thumbs a { display: grid; padding: 8px 10px 12px; text-decoration: none; height: 100%; }
.thumbs a:hover { background: #f6f6f6; color: var(--ink); }
.thumbs a:hover .tn { color: var(--red); }
.thumbs img { width: 100%; aspect-ratio: 1; display: block; }
.tn { font-weight: 700; font-size: 16px; line-height: 1.25; margin-top: 4px; }
.tm { font-size: 14px; color: var(--muted); }
@media (max-width: 420px) { .thumbs { grid-template-columns: 1fr 1fr; } .thumbs a { padding: 6px 8px 10px; } .tn { font-size: 15px; } }

/* ── idea list pages ──────────────────────────────────────────────── */
.toc { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 18px 0 0; font-size: 15px; }
.toc a { padding: 2px 12px; border-left: 1px solid var(--line-2); }
.toc a:first-child { padding-left: 0; border-left: 0; }
.ideas-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.ideas-side { position: sticky; top: 72px; }
.side-h { font-size: 19px; margin: 0 0 8px; }
.iblock { border-top: 2px solid var(--ink); padding-top: 12px; margin: 0 0 40px; }
.ilist { margin: 6px 0 0; padding-left: 44px; }
.ilist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.ilist li::marker { color: var(--muted); font-size: 15px; }
.it { font-weight: 700; display: block; }
.ih { display: block; color: var(--ink-2); font-size: 16px; }
.ihow { font-size: 15px; }
.ihow::after { content: " →"; }
@media (max-width: 960px) { .ideas-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; } .ideas-side { position: static; } }
@media (max-width: 560px) { .ilist { padding-left: 34px; } }

/* ── how-to viewer: the steps lead the page ────────────────────────── */
.hero-tight { padding-bottom: 14px; }
.lede-one { font-size: 18px; max-width: 70ch; }
.viewer { display: grid; grid-template-columns: minmax(0, 580px) minmax(0, 1fr); gap: 28px; border-top: 6px solid var(--ink); padding: 18px 0 22px; align-items: start; }
.vw-art { border: 1px solid var(--line); background: #fff; }
.vw-svg { display: block; width: 100%; height: auto; }
.vw-svg path { fill: none; stroke: #000; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.vw-svg .k-guide { stroke: #bdbdbd; stroke-width: 1.8; stroke-dasharray: 6 5; }
.vw-svg .k-fill { fill: #000; stroke-width: 1.5; }
.vw-svg .k-hatch { stroke-width: 1.6; }
.vw-svg .old { stroke: #6b6b6b; }
.vw-svg .k-fill.old { fill: #6b6b6b; stroke: #6b6b6b; }
.vw-svg .k-guide.old { stroke: #c9c9c9; }
.vw-svg .new { stroke: var(--red); stroke-width: 4; }
.vw-svg .k-fill.new { fill: var(--red); }
.vw-svg .k-guide.new { stroke: var(--red); stroke-width: 2.2; }
/* before the script runs: show step 1 in red */
.viewer:not(.js) .vw-svg path:not([data-s="1"]) { display: none; }
.viewer:not(.js) .vw-svg path[data-s="1"] { stroke: var(--red); }
.viewer:not(.js) .vw-ctrl, .viewer:not(.js) .vw-small { display: none; }
.vw-count { margin: 0; font-size: 18px; font-weight: 700; }
.vw-n { font-size: 30px; letter-spacing: -.02em; }
.vw-text { margin: 8px 0 18px; font-size: 21px; line-height: 1.4; min-height: 4.3em; }
.vw-ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.vw-ctrl .btn-go { min-width: 150px; }
.vw-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.vw-strip button { appearance: none; display: block; width: 100%; padding: 0; border: 2px solid var(--line-2); background: #fff; cursor: pointer; position: relative; }
.vw-strip button:hover { border-color: var(--ink); }
.vw-strip button[aria-current="step"] { border: 3px solid var(--ink); }
.vw-strip img { display: block; width: 100%; height: auto; }
.vw-strip span { position: absolute; left: 0; top: 0; background: var(--ink); color: #fff; font: 700 12px/1 var(--sans); padding: 3px 5px; }
.vw-small { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--red); }
@media (max-width: 860px) {
  .viewer { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 12px; }
  .vw-n { font-size: 24px; }
  .vw-text { font-size: 18px; min-height: 0; margin-bottom: 12px; }
  .vw-ctrl .btn { flex: 1 1 auto; }
  .vw-strip { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
}
/* the walk-through: one big image per step */
.walk { margin: 40px 0 0; border-top: 2px solid var(--ink); padding-top: 12px; }
.steps { list-style: none; padding: 0 !important; margin: 8px 0 0; }
.steps li { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 28px; padding: 22px 0; border-top: 1px solid var(--line); margin: 0; break-inside: avoid; align-items: start; }
.steps li:first-child { border-top: 0; }
.steps img { border: 1px solid var(--line); width: 100%; display: block; }
.st-t h3 { margin: 4px 0 8px; font-size: 24px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.st-n { display: inline-grid; place-items: center; width: 34px; height: 34px; background: var(--red); color: #fff; font-size: 18px; }
.fin .st-n { background: var(--ink); }
.st-t p { margin: 0; font-size: 19px; line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
@media (max-width: 760px) { .steps li { grid-template-columns: minmax(0, 1fr); gap: 10px; } .st-t h3 { font-size: 20px; } .st-t p { font-size: 17px; } }

/* ── text pages, footer ───────────────────────────────────────────── */
.page-text .copy { padding: 36px 16px 64px; }
.page-text h1 { margin-bottom: 10px; }
.foot { border-top: 6px solid var(--ink); background: #fff; padding: 28px 0 36px; font-size: 15px; color: var(--muted); margin-top: 72px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 2fr; gap: 24px; }
.foot-about p { margin: 0 0 8px; max-width: 40ch; }
.foot h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 8px; letter-spacing: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot-how ul { columns: 2; }
.foot li { margin: 4px 0; }
.foot a { color: var(--ink-2); }
.foot-brand { font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.legal { margin: 24px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ── print: just the steps ────────────────────────────────────────── */
@media print {
  .top, .foot, .viewer, .print-hide, .skip, .crumbs, .gen { display: none !important; }
  body { font-size: 12pt; }
  .block { margin-top: 12pt; }
  .steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8pt; }
  .steps li { display: block; border: 1px solid #ccc; padding: 5pt; }
  .steps img { width: 100%; }
  .st-t h3 { font-size: 11pt; margin: 3pt 0; } .st-t p { font-size: 9pt; } .st-n { width: 16pt; height: 16pt; font-size: 9pt; }
  .walk { border: 0; margin: 0; } .ver[hidden] { display: none !important; }
  .lede { font-size: 12pt; }
}
[id] { scroll-margin-top: 72px; }
.hlink { text-decoration: none; } .hlink:hover { color: var(--red); }

/* ── version tabs ── */
.vtabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 -6px; }
.vtabs .btn { margin: 0 -2px 0 0; display: grid; justify-items: start; gap: 2px; text-align: left; padding: 10px 18px; font-size: 18px; }
.vtabs .vt-n { font-size: 14px; font-weight: 400; }
.vtabs .btn.on .vt-n { color: #ddd; }
.ver + .ver { margin-top: 0; }
.steps .fin h3 { color: var(--ink); }
@media print { .vtabs { display: none !important; } }
