/* Sorted site shell — "the carbonless copy form" identity.
   Clean + light is a locked brand decision (docs/decisions.md 2026-07-08).
   The subject is commerce paperwork: waybills, invoices, multi-part forms.
   Converting a file IS making a carbon copy in another format — so the page
   is the form. Near-black carries the preprinted structure (heavy zone rules,
   boxed fields); carbon blue is the ink your data gets written in; red is
   correction ink, warnings only. Display face is DIN-flavored (Bahnschrift —
   ships with Windows; Avenir Next Condensed on Mac) because DIN is the
   letterform of shipping labels. No webfonts: the "nothing leaves your
   browser" claim stays literally true. */

:root {
  --paper: #fbfcfd;        /* cool paper white — not cream */
  --surface: #ffffff;
  --ink: #171b21;
  --muted: #5a6270;        /* ~6:1 on paper */
  --blue: #2036c8;         /* carbon-copy blue — ~8.5:1 on white */
  --blue-deep: #17278f;
  --blue-wash: #eef1fa;
  --red-ink: #a03123;      /* correction ink — warnings only, ~7:1 on white */
  --red-wash: #faeeea;
  --rule: #d9dde5;
  --rule-mid: #b8bfcc;
  --radius: 3px;           /* forms are square-cornered */
  --max: 1080px;
  --display: Bahnschrift, "Avenir Next Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
}

::selection { background: #d5ddf5; }

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 87.5%;
  line-height: 1.06;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  margin: 0 0 0.6rem;
}
h2 {
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 2.8rem 0 0.6rem;
  border-top: 3px solid var(--ink);   /* form-zone rule: each h2 opens a zone */
  padding-top: 12px;
}
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em; margin: 1.4rem 0 0.35rem; }
p { margin: 0.5rem 0; }
a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Prose zones span the full form width — a real multi-part form's section
   rules run edge to edge. Only running text is held to a readable measure;
   grids, tables, and the FAQ use the width structurally. */
.prose { max-width: none; }
.prose > p, .prose > ul, .prose > ol:not(.steps) { max-width: 70ch; }

/* long explainer paragraphs run two-up like contract fine print; the 34ch
   floor collapses them back to one column on narrow screens.
   (orphans/widows control column breaks in Chrome/Firefox; Safari has never
   implemented them and just breaks wherever — cosmetic, known.) */
.prose > p.cols {
  max-width: none;
  columns: 2 34ch;
  column-gap: 48px;
  orphans: 2;
  widows: 2;
}

/* FAQ: question/answer pairs laid out like form fields, two-up when the
   paper is wide enough. min(320px, 100%) keeps narrow phones from
   overflowing the grid track. */
.faq {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 10px 44px;
  margin: 14px 0 0;
}
.faq .qa { border-top: 1px solid var(--rule-mid); padding: 12px 2px 6px; }
/* odd question counts: the last one spans the full row — never a dead cell
   beside it (1/-1 is also harmless in the single-column mobile grid) */
.faq .qa:last-child:nth-child(odd) { grid-column: 1 / -1; }
.faq .qa h3 { margin: 0 0 0.35rem; }
.faq .qa p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* mono kicker above heroes — a filled square, like a ticked form checkbox */
.eyebrow {
  font: 600 0.72rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin: 0 0 0.9rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--blue);
  margin-right: 9px;
  vertical-align: 0;
}

/* boxed indicia chip — the "POSTAGE PAID" square on printed mail */
.tag {
  display: inline-block;
  font: 700 0.66rem/1.35 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 5px 9px;
  text-align: center;
}

/* the signature: a rubber stamp. One per page, always the privacy claim. */
.stamp {
  display: inline-block;
  /* paints above later positioned siblings (e.g. the dropzone it overlaps
     on tool cards) — a stamp sits on top of the paper, never under it */
  z-index: 1;
  border: 4px double var(--blue);
  border-radius: 2px;
  color: var(--blue);
  background: var(--paper);
  font: 700 0.7rem/1.5 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 7px 14px;
  transform: rotate(-2.5deg);
  opacity: 0.92;
  /* No delay, no fill mode, and the keyframes never drop below the base
     opacity: browsers defer animations in background/throttled tabs, and a
     deferred `backwards` fill would leave the stamp invisible. The press-in
     is cosmetic; the stamp must be visible even if it never runs. */
  animation: stamp-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes stamp-in {
  from { opacity: 0.4; transform: rotate(-2.5deg) scale(1.35); }
  to   { opacity: 0.92; transform: rotate(-2.5deg) scale(1); }
}

/* ---------- header: the form's letterhead ---------- */

.site-header { border-bottom: 3px solid var(--ink); background: var(--surface); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  min-height: 58px; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px;
}
.brand {
  font: 700 1.25rem/1 var(--display);
  font-stretch: 87.5%;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.brand .dot { color: var(--blue); }
.header-note {
  font: 500 0.7rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

/* ---------- hero ---------- */

.hero { padding: 54px 0 12px; }
.hero .lede { color: var(--muted); font-size: 1.12rem; max-width: 58ch; }
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: center;
}
@media (max-width: 880px) { .hero-split { grid-template-columns: 1fr; gap: 26px; } }

/* ---------- transformation diagram (decorative, aria-hidden) ----------
   Structure encodes the transformation: the Etsy side is a dashed, loose
   box (unstructured for Shopify's purposes); the Shopify side is a solid,
   heavy-ruled table (structured). Blue marks the data — your entries. */

.xform { margin: 0; font-family: var(--mono); font-size: 0.76rem; }
.xform .xf-label {
  font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  margin: 0 0 6px; font-weight: 700; color: var(--muted);
}
.xf-in {
  background: var(--surface);
  border: 1.5px dashed var(--rule-mid);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.xf-in-row { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--ink); }
.xf-in-row .xf-flat { color: var(--blue); font-weight: 700; }
.xf-join {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted);
  padding: 9px 4px 9px 22px;
  font-size: 0.68rem;
}
.xf-join::before {
  content: "";
  width: 1px; height: 26px;
  border-left: 2px dashed var(--rule-mid);
  margin-right: -4px;
}
.xf-out {
  background: var(--surface);
  border: 1px solid var(--rule-mid);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
}
.xf-out .xf-label { padding: 9px 12px 0; }
.xf-vrow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  padding: 7px 12px;
  border-top: 1px solid var(--rule);
}
.xf-vrow .xf-opt { color: var(--muted); }
.xf-vrow .xf-price { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.xf-note { color: var(--muted); font-size: 0.72rem; margin: 8px 2px 0; font-family: var(--sans); }

/* ---------- cards & buttons ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rule-mid);
  border-radius: var(--radius);
  padding: 24px;
}

.btn {
  display: inline-block;
  border: 1px solid var(--blue-deep);
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 18px;
  font: 600 1rem/1.5 var(--sans);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--blue-deep); color: #fff; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-quiet {
  background: var(--surface);
  color: var(--blue-deep);
  border: 1px solid var(--rule-mid);
}
/* .btn and .btn-quiet co-occur on the same element (app.js Apply button):
   hover must redeclare color, or .btn:hover's white text wins the cascade. */
.btn-quiet:hover { background: var(--blue-wash); color: var(--blue-deep); }

/* ---------- homepage pieces ---------- */

.tool-card-link {
  display: block;
  position: relative;
  border-top: 3px solid var(--ink);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.tool-card-link:hover {
  border-color: var(--blue);
  box-shadow: 4px 4px 0 var(--blue-wash);
  transform: translate(-1px, -1px);
}
.tool-no {
  position: absolute;
  top: 10px; right: 14px;
  font: 600 0.64rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tool-card-head {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  align-items: center;
  margin: 4px 0 6px;
}
.tool-card-link h3 {
  margin: 0;
  font-family: var(--display);
  font-stretch: 87.5%;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.tool-card-link p { margin: 0 0 12px; color: var(--muted); font-size: 0.97rem; max-width: 62ch; }
.tool-meta {
  font: 500 0.72rem/1.6 var(--mono);
  color: var(--muted);
  letter-spacing: 0.03em;
}
.tool-meta .go { color: var(--blue-deep); font-weight: 700; }

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  padding: 0; margin: 14px 0 0;
  list-style: none;
}
.principles li {
  border-top: 1px solid var(--rule-mid);
  padding: 12px 2px 0;
}
.principles .k {
  display: block;
  font: 700 0.68rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-bottom: 6px;
}
.principles p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- data tables (landing-page guides) ---------- */

.datatable-scroll { overflow-x: auto; margin: 14px 0; }
.datatable {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--rule-mid);
}
.datatable th {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  font: 700 0.66rem/1.6 var(--mono);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
  text-align: left;
  padding: 8px 10px;
}
.datatable td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.datatable .col { font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; }
.datatable .yes { color: var(--blue-deep); font-weight: 700; }
.datatable .no { color: var(--red-ink); font-weight: 700; }

/* ---------- shared small pieces ---------- */

.privacy-line {
  display: flex; gap: 8px; align-items: baseline;
  color: var(--muted); font-size: 0.9rem;
}
.privacy-line strong { color: var(--ink); }

/* footer: the tear-off stub */
.footer {
  margin-top: 76px;
  border-top: 2px dashed var(--rule-mid);
  padding: 26px 0 44px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer a { color: var(--muted); }

ul.checks { padding-left: 1.2rem; }
ul.checks li { margin: 0.35rem 0; }

/* small screens: tighter card frames and hero air, same structure */
@media (max-width: 480px) {
  .card { padding: 16px 14px; }
  .hero { padding: 36px 0 8px; }
  h2 { margin-top: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
