/* ── tokens ──────────────────────────────────────────────────────────────
   Light is the base. Dark redefines tokens only, in both the un-stamped
   (system) case and the explicitly-stamped case, so all three viewer states
   resolve as a complete set. No component styles live inside a theme block. */
:root {
  --ground:  #f6f7f9;
  --surface: #ffffff;
  --ink:     #14181f;
  --muted:   #5b6572;
  --faint:   #8a929d;
  --line:    #dde1e7;
  --rule:    #c8ced7;
  --accent:  #a63028;

  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: "Cascadia Mono", "SF Mono", ui-monospace, Consolas, "Roboto Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:  #101318;
    --surface: #171b22;
    --ink:     #e8ebf0;
    --muted:   #99a3b0;
    --faint:   #6f7885;
    --line:    #262c36;
    --rule:    #333b47;
    --accent:  #e0655a;
  }
}
:root[data-theme="dark"] {
  --ground:  #101318;
  --surface: #171b22;
  --ink:     #e8ebf0;
  --muted:   #99a3b0;
  --faint:   #6f7885;
  --line:    #262c36;
  --rule:    #333b47;
  --accent:  #e0655a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 2rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 6vw, 4rem);
}

/* ── masthead ─────────────────────────────────────────────────────────── */
.mast { display: flex; flex-direction: column; gap: 1.25rem; }

.wordmark {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0;
}
.wordmark .zr { color: var(--accent); }

.mast-rule {
  height: 2px;
  background: var(--ink);
  width: 100%;
}

.thesis {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0;
  max-width: 34ch;
  text-wrap: balance;
}

/* ── section furniture: a legend sitting on a hairline, like a form ────── */
section { display: flex; flex-direction: column; gap: 1rem; }

.legend {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
  font-weight: 400;
}
.legend::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

p { margin: 0; max-width: 64ch; }
p + p { margin-top: 0.9rem; }
.muted { color: var(--muted); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── the product block, shaped like the fieldset it fills ─────────────── */
.product {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 1.6rem 1.5rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.product-legend {
  position: absolute;
  top: -0.62rem;
  left: 1.1rem;
  background: var(--surface);
  padding: 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.product h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  margin: -0.4rem 0 0;
}

/* status reads from the word and the border, never from hue alone */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  border: 1px solid var(--rule);
  padding: 0.2rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.status::before {
  content: "";
  width: 0.42rem; height: 0.42rem;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

.price {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: var(--ink);
  padding-top: 0.2rem;
  border-top: 1px solid var(--line);
  margin-top: 0.2rem;
}
.price .note { color: var(--faint); }

/* ── principles: numbered only because they are not a sequence ─────────── */
.principles { display: flex; flex-direction: column; gap: 1.4rem; }
.principle { display: flex; flex-direction: column; gap: 0.35rem; }
.principle h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0;
}

/* ── contact ──────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(6.5rem, max-content) 1fr;
  gap: 0.55rem 1.5rem;
  align-items: baseline;
}
.contact-grid dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.contact-grid dd { margin: 0; }

footer {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
footer .mono { font-family: var(--mono); font-size: 0.78rem; }

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

/* ── prose pages: terms, refunds ──────────────────────────────────────── */
.doc { display: flex; flex-direction: column; gap: 2rem; }

.doc h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.doc section { gap: 0; }

.doc ul { margin: 0.7rem 0 0; padding-left: 1.15rem; max-width: 64ch; }
.doc li { margin-bottom: 0.45rem; }
.doc li::marker { color: var(--faint); }

.updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Back-link doubles as the page's breadcrumb; no separate nav bar needed
   on a site this small. */
.back {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.back:hover { text-decoration: underline; }

/* ── APPENDED 2026-08-13: product + vertical pages ────────────────────────
   Additive only. Nothing above this line was changed, so index / terms /
   refunds render exactly as they did before. */

/* Inline code in prose (permission names, storage APIs). Sized down because
   monospace runs large next to the body face. */
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.05em 0.35em;
  border-radius: 2px;
}

/* Sub-headline under the masthead thesis. Wider measure than .thesis so the
   two do not read as the same weight of statement. */
.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0;
}

/* ── the three steps ──────────────────────────────────────────────────────
   Numbered by the list, not by hand, so the markup stays the source of
   order. The number sits in the gutter as a mono figure. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0 0.9rem;
  align-items: baseline;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  border-top: 1px solid var(--rule);
  padding-top: 0.35rem;
}
.steps h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
}
.steps li > div, .steps li > h3 { grid-column: 2; }
.steps li > p { grid-column: 2; }

/* ── permission table, as a definition list so it reflows on a phone ────── */
.perms {
  display: grid;
  grid-template-columns: minmax(7rem, max-content) 1fr;
  gap: 0.7rem 1.4rem;
  align-items: baseline;
  margin: 0.4rem 0 1rem;
}
.perms dt { font-family: var(--mono); font-size: 0.82rem; }
.perms dd { margin: 0; max-width: 58ch; }
@media (max-width: 34rem) {
  .perms { grid-template-columns: 1fr; gap: 0.25rem; }
  .perms dd { margin-bottom: 0.8rem; }
}

/* ── vertical index: a link and the repetition it removes ───────────────── */
.vlist {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.vlist li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.9rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.vlist li:first-child { border-top: 1px solid var(--line); }
.vlist a { font-weight: 600; text-decoration: none; }
.vlist a:hover { text-decoration: underline; }
.vlist span { color: var(--muted); font-size: 0.92rem; }

/* ── the call to action ───────────────────────────────────────────────────
   Bordered like the product fieldset, because it is the same object: the
   place the page asks for something. */
.cta {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
}
.cta-line { margin: 0.2rem 0; }
.cta-btn {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 0.65rem 1.3rem;
  letter-spacing: 0.01em;
}
.cta-btn:hover { background: var(--accent); color: var(--surface); }
.cta-note { font-size: 0.88rem; color: var(--muted); }

/* ── vertical pages: the portal roll-call ─────────────────────────────────
   Named destinations, set in mono so they read as a list of systems rather
   than as prose. */
.portals {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.portals li {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  padding: 0.25rem 0.6rem;
  color: var(--muted);
}

/* The one-line summary of the loop this vertical repeats all day. */
.loop {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  border-left: 3px solid var(--rule);
  padding-left: 1rem;
  margin: 0;
  max-width: 44ch;
  text-wrap: balance;
}

/* Screenshot slot.
   Empty, it is a quiet one-line caption — NOT a large dashed hole. These
   pages ship before the screenshots exist, and a big empty box reads to a
   prospect as an unfinished site rather than as a note to ourselves.
   It takes the full 16:10 shape only once a real image is inside it. */
.shot {
  border: 1px dashed var(--rule);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.9rem 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.shot:has(img) {
  aspect-ratio: 16 / 10;
  border-style: solid;
  padding: 0;
}
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The one clause a reader must not skim past. Marked by a rule and a label,
   not by colour alone. */
.callout {
  border-left: 3px solid var(--accent);
  padding: 0.15rem 0 0.15rem 1rem;
  margin-top: 0.9rem;
  max-width: 64ch;
}
.callout .label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
