:root {
  --paper: #ffffff;
  --ink: #1a1f36;
  --ink-soft: #4a5160;
  --line: #788092;
  --rule: #d9dde6;
  --cobalt: #2346c8;
  --cobalt-deep: #18329a;
  --cad: #f5b700;
  --wash: #eef1fa;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 var(--body); }
img, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--cobalt); text-underline-offset: 3px; }
a:hover { color: var(--cobalt-deep); }
:focus-visible { outline: 3px solid var(--cad); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.01em; margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800; margin-top: 0.3em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* header / footer */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px var(--gutter); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.3rem/1 var(--display); }
.site-head nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-head nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.site-head nav a:hover { color: var(--cobalt); text-decoration: underline; }
.site-foot { margin-top: 96px; background: var(--ink); color: #e6e8f0; }
.foot-inner { max-width: 1180px; margin: 0 auto; padding: 48px var(--gutter); }
.brand-foot { display: flex; align-items: center; gap: 10px; font: 800 1.2rem var(--display); margin: 0 0 8px; }
.brand-foot svg path:first-child { fill: var(--cad); }
.brand-foot svg path:nth-child(2), .brand-foot svg text { stroke: #e6e8f0; fill: #e6e8f0; }
.brand-foot svg path:nth-child(2) { fill: none; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 20px 0; }
.site-foot a { color: #fff; }
.fine { font-size: 0.85rem; color: #b5bacb; max-width: 70ch; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent; font: 700 1rem/1.1 var(--body); text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-deep); color: #fff; }
.btn-primary:disabled { background: #9aa6d8; cursor: wait; }
.btn-lg { min-height: 56px; padding: 12px 30px; font-size: 1.1rem; }
.btn-quiet { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; color: #fff; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--cobalt); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:disabled { color: var(--line); cursor: default; }

/* hero: the painted/outline split image is the signature */
.hero { max-width: 1180px; margin: 0 auto; padding: 40px var(--gutter) 24px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin: 0 0 18px; max-width: 13ch; }
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { margin: 0; position: relative; }
.hero-art img { border-radius: 6px; box-shadow: 0 0 0 1px var(--rule), 14px 14px 0 var(--cad); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 24px; }
  .hero-art img { box-shadow: 0 0 0 1px var(--rule), 8px 8px 0 var(--cad); }
}

/* tool */
.tool { max-width: 1180px; margin: 24px auto 0; padding: 0 var(--gutter); scroll-margin-top: 12px; }
.landing .tool { width: min(1180px, 100vw); position: relative; left: 50%; transform: translateX(-50%); margin: 28px 0; }
.tool-start { text-align: center; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 24px; border: 2px dashed var(--line); border-radius: 12px; background: var(--wash); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--cobalt); background: #e3e8fb; }
.drop:focus-within { outline: 3px solid var(--cad); }
.drop-title { font: 800 1.6rem var(--display); color: var(--cobalt); }
.drop-sub { color: var(--ink-soft); max-width: 46ch; }
.drop-note { font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.tool-start .link-btn { margin-top: 12px; }
.tool-work { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
.controls { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 22px; padding: 22px; border: 1px solid var(--rule); border-radius: 12px; }
.ctl label { display: flex; justify-content: space-between; font-weight: 700; }
.ctl output { font: 800 1.1rem var(--display); color: var(--cobalt); }
.ctl input[type=range] { width: 100%; accent-color: var(--cobalt); margin: 8px 0 4px; }
.ctl select { width: 100%; margin-top: 6px; min-height: 44px; font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.hint { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; }
.dl-more { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; }
.stage-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.stage-tabs button { font: 700 0.95rem var(--body); padding: 8px 16px; border-radius: 999px; border: 1px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; }
.stage-tabs button[aria-selected=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.stage-canvas { position: relative; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: #fff; min-height: 200px; }
.stage-canvas canvas { width: 100%; }
.busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(255,255,255,.88); font-weight: 700; }
.busy-bar { width: min(320px, 70%); height: 8px; border-radius: 99px; background: var(--wash); overflow: hidden; }
.busy-bar i { display: block; height: 100%; width: 0; background: var(--cobalt); transition: width .2s; }
.stage-meta { color: var(--ink-soft); margin: 10px 0; }
.palette { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.palette li { display: grid; grid-template-columns: 28px 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; font-size: 0.92rem; padding: 4px 0; }
.palette .sw { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.palette .num { grid-row: span 2; font: 800 1.1rem var(--display); text-align: center; }
.palette .hex { color: var(--line); font-size: 0.8rem; }
@media (max-width: 860px) {
  .tool-work { grid-template-columns: 1fr; }
  .controls { position: static; order: 2; }
}

/* supplies kit + amazon */
.kit { margin-top: 40px; padding: 28px; border-radius: 12px; background: var(--wash); }
.kit h2 { margin-top: 0; }
.amz-grid { margin: 24px 0; }
.amz-grid h3 { margin: 0 0 12px; font-size: 1.1rem; }
.amz-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.amz-loading { min-height: 120px; }
.amz-item { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--ink); }
.amz-item:hover { border-color: var(--cobalt); color: var(--ink); }
.amz-item .amz-img img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.amz-title { font-size: 0.9rem; line-height: 1.35; }
.amz-cta { font-weight: 700; color: var(--cobalt); margin-top: auto; }
.amz-note { font-size: 0.78rem; color: var(--ink-soft); margin: 8px 0 0; }
.amz-more { display: inline-block; margin-top: 8px; font-weight: 700; }
.amz-card { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; margin: 24px 0; padding: 18px; border: 1px solid var(--rule); border-radius: 12px; }
.amz-card .amz-img { display: block; aspect-ratio: 1; background: var(--wash); border-radius: 8px; overflow: hidden; }
.amz-card .amz-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.amz-card p { margin: 0 0 8px; }
.amz-name { font: 700 1.15rem/1.3 var(--display); }
.amz-name a { color: var(--ink); text-decoration: none; }
.amz-why { color: var(--ink-soft); font-size: 1rem; }
.amz-card .amz-cta { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 18px; border-radius: 999px; background: var(--cad); color: var(--ink); text-decoration: none; }
.amz-card .amz-cta:hover { background: #ffcb2e; }
@media (max-width: 560px) { .amz-card { grid-template-columns: 96px 1fr; gap: 14px; padding: 14px; } }

/* how it works: real sequence, numbers styled like pattern numbers inside outlined shapes */
.how { max-width: 1180px; margin: 72px auto 0; padding: 0 var(--gutter); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { border-top: 2px solid var(--ink); padding-top: 16px; }
.step-n { display: inline-grid; place-items: center; width: 52px; height: 44px; border: 1.5px solid var(--line); border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%; font: 500 1.2rem var(--body); color: var(--ink-soft); }
.steps h3 { margin: 14px 0 6px; }
.steps p { margin: 0; color: var(--ink-soft); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

.gift { margin: 80px 0 0; background: var(--cad); }
.gift-inner { max-width: 1180px; margin: 0 auto; padding: 56px var(--gutter); }
.gift h2 { margin-top: 0; max-width: 18ch; font-size: clamp(2rem, 4vw, 3rem); }
.gift p { max-width: 56ch; font-size: 1.12rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 40px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 0; } }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--rule); }
.link-list a { display: block; padding: 12px 0; font-weight: 700; text-decoration: none; color: var(--ink); }
.link-list a:hover { color: var(--cobalt); }
.faq { max-width: var(--measure); margin-top: 32px; }
.faq h3 { margin-top: 1.4em; }

.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cards a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: var(--cobalt); }
.card-t { font: 700 1.2rem/1.25 var(--display); }
.card-d { color: var(--ink-soft); font-size: 0.95rem; }

/* articles */
.prose { max-width: var(--measure); margin: 0 auto; padding: 24px var(--gutter) 0; }
.prose h2 { margin-top: 1.8em; }
.prose li { margin: 0.3em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose blockquote { margin: 1.5em 0; padding-left: 18px; border-left: 4px solid var(--cad); color: var(--ink-soft); }
.crumbs { font-size: 0.9rem; color: var(--ink-soft); }
.meta { color: var(--ink-soft); margin: -4px 0 4px; }
.disclose { font-size: 0.88rem; color: var(--ink-soft); padding: 10px 14px; background: var(--wash); border-radius: 8px; }
.cta { margin: 32px 0; padding: 24px 26px; border-radius: 12px; background: var(--ink); color: #fff; }
.cta p { margin: 0 0 12px; color: #d9dcea; }
.cta .cta-title { font: 800 1.45rem/1.2 var(--display); color: #fff; }
.cta .btn-primary { background: var(--cad); color: var(--ink); }
.cta .btn-primary:hover { background: #ffcb2e; }
.related { max-width: var(--measure); margin: 56px auto 0; padding: 0 var(--gutter); }
.related ul { padding-left: 1.2em; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.prose h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
body { overflow-x: clip; }
@media (max-width: 560px) { .palette { grid-template-columns: repeat(2, minmax(0, 1fr)); } .palette li { grid-template-columns: 24px 24px 1fr; } .palette .sw { width: 24px; height: 24px; } }
