/* The same "Drafting" tokens as the desktop app: paper and ink, red only where a dimension is drawn. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #eceeec; --rail: #f4f5f3; --panel: #fafaf9; --panel-2: #e7e9e6; --inset: #f0f1ef; --line: #d6d9d6; --grid: #dfe2df;
  --text: #16181a; --muted: #565b61; --faint: #666b71;
  --accent: #16181a; --on-accent: #fafaf9; --dim: #c2352a;
  --ok: #2f7d4f; --warn: #9a6208;
  --shade: #d4d8dc; --edge: #5b6168;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101113; --rail: #131517; --panel: #16181a; --panel-2: #1d2023; --inset: #0e0f11; --line: #292c2f; --grid: #1f2225;
  --text: #e9e9e6; --muted: #a3a7ac; --faint: #8a8e93;
  --accent: #e9e9e6; --on-accent: #101113; --dim: #ff7260;
  --ok: #6cc08b; --warn: #e0a95a;
  --shade: #a9afb6; --edge: #0b0c0d;
}
:root {
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  --wrap: 75rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 0.9375rem/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 0.5rem 0.8rem; z-index: 50; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* top bar, like the desktop app's rail: brand, links, theme */
.bar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--rail) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 1.4rem; height: 3.4rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 650; font-size: 1.1rem; letter-spacing: -0.01em; }
.mark { width: 1.5rem; height: 1.5rem; display: block; }
.mark-paper { display: none; }
:root[data-theme="dark"] .mark-ink { display: none; }
:root[data-theme="dark"] .mark-paper { display: block; }
.bar nav { display: flex; gap: 1.2rem; margin-left: auto; }
.bar nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.bar nav a:hover { color: var(--text); }
.theme { width: 2rem; height: 2rem; border: 0; border-radius: 0.5rem; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.theme:hover { background: var(--panel-2); color: var(--text); }
@media (max-width: 40rem) { .bar nav a:not(.keep) { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: 600 0.9375rem var(--sans); text-decoration: none; cursor: pointer;
  padding: 0.6rem 1.1rem; border-radius: 0.5rem; font-size: 0.9375rem; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent);
}
.btn:hover { opacity: 0.88; }
.btn.quiet { background: transparent; color: var(--text); border-color: var(--line); }
.btn.quiet:hover { background: var(--panel-2); opacity: 1; }
.btn.small { padding: 0.35rem 0.8rem; font-size: 0.9rem; }

/* hero */
.hero { padding: clamp(2.5rem, 5vw, 5rem) 0 clamp(3rem, 5vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr); gap: 3rem; align-items: center; }
h1 { font-size: clamp(2.4rem, 3.4vw + 1rem, 3.5rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; margin: 0 0 1.2rem; text-wrap: balance; }
.lede { font-size: 1.125rem; color: var(--muted); max-width: 32rem; margin: 0 0 1.8rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.fine { margin: 1.4rem 0 0; color: var(--faint); font-size: 0.92rem; max-width: 30rem; }
@media (max-width: 56rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 2.2rem; } .hero { padding-top: 2.2rem; } }

/* hero: a real photo and the model made from it, one drag apart */
.reveal { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; }
.reveal-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #dde1e7; --pos: 50%; touch-action: pan-y; }
.r-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.r-model { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.r-model img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.r-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fafaf9; box-shadow: 0 0 0 1px rgba(22,24,26,0.35); pointer-events: none; }
.r-knob { position: absolute; top: 50%; left: 50%; width: 2.4rem; height: 2.4rem; margin: -1.2rem 0 0 -1.2rem; border-radius: 50%; background: #fafaf9; box-shadow: 0 0 0 1px rgba(22,24,26,0.35), 0 2px 8px rgba(0,0,0,0.3); }
.r-knob::before, .r-knob::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -5px; border: 5px solid transparent; }
.r-knob::before { left: 6px; border-right-color: #16181a; border-left: 0; }
.r-knob::after { right: 6px; border-left-color: #16181a; border-right: 0; }
.r-tag { position: absolute; top: 0.8rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: rgba(22,24,26,0.78); color: #fafaf9; font-size: 0.85rem; font-weight: 600; pointer-events: none; }
.r-tag-l { left: 0.8rem; } .r-tag-r { right: 0.8rem; transition: opacity .2s; }
.r-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.reveal-stage:has(.r-range:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.reveal-cap { padding: 0.8rem 1.1rem; border-top: 1px solid var(--line); color: var(--muted); }
.reveal-cap b { color: var(--text); font-weight: 600; }
/* sections */
section { padding: clamp(4rem, 7vw, 7rem) 0; border-top: 1px solid var(--line); }
section.tint { background: var(--rail); }
h2 { font-size: clamp(1.8rem, 2.4vw + 0.8rem, 2.8rem); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 0.9rem; font-weight: 680; text-wrap: balance; }
.sub { color: var(--muted); max-width: 41.25rem; margin: 0 0 2.6rem; font-size: 1.0625rem; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

/* pipeline: a real sequence, so numbered; rows with hairlines, no cards */
.pipe { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); }
.pipe li { display: grid; grid-template-columns: 3rem 11rem minmax(0, 1fr) 13rem; gap: 1.2rem; align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.pipe .n { font: 600 0.95rem var(--mono); color: var(--dim); }
.pipe h3 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.pipe p { margin: 0; color: var(--muted); }
.pipe .out { font: 0.88rem var(--mono); color: var(--faint); text-align: right; }
@media (max-width: 56rem) {
  .pipe li { grid-template-columns: 2.2rem minmax(0, 1fr); row-gap: 0.25rem; }
  .pipe p, .pipe .out { grid-column: 2; text-align: left; }
}
/* what you can make: the request, then its status */
.ask { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); }
.ask li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) 9.5rem; gap: 1.2rem; align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.ask h3 { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }
.ask q { font: 1rem var(--mono); quotes: "\201C" "\201D"; color: var(--text); }
.ask p { margin: 0.3rem 0 0; color: var(--muted); }
.ask .st { justify-self: end; }
@media (max-width: 56rem) { .ask li { grid-template-columns: minmax(0, 1fr); row-gap: 0.3rem; } .ask .st { justify-self: start; } }
/* two ways in, one panel: neither side is the 'main' one */
.ways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 0.9rem; background: var(--panel); overflow: hidden; }
.way { padding: 1.8rem 1.8rem 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.way + .way { border-left: 1px solid var(--line); }
.way-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.way h3 { margin: 0; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.15; }
.way > p { margin: 0; color: var(--muted); font-size: 1.0625rem; }
.way dl { margin: 0; border-top: 1px solid var(--line); }
.way dl div { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.way dt { color: var(--faint); font-weight: 600; font-size: 0.9rem; }
.way dd { margin: 0; }
.way .btn { align-self: flex-start; margin-top: auto; }
.ways-foot { margin: 1.2rem 0 0; color: var(--muted); max-width: 46rem; }
@media (max-width: 56rem) { .ways { grid-template-columns: minmax(0, 1fr); } .way + .way { border-left: 0; border-top: 1px solid var(--line); } }
details.under { margin-top: 1.6rem; border: 1px solid var(--line); border-radius: 0.7rem; background: var(--panel); }
details.under summary { cursor: pointer; padding: 0.8rem 1.1rem; font-weight: 600; }
details.under p { margin: 0; padding: 0 1.1rem 1rem; color: var(--muted); max-width: 46rem; }

/* result */
.result { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 2.4rem; align-items: start; }
.viewport { background: #dde1e7; border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; position: relative; aspect-ratio: 4 / 3; }
.viewport img { position: absolute; width: 190%; max-width: none; left: -43%; top: -42%; display: block; }
.viewport figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 0.5rem 0.9rem; background: color-mix(in srgb, #fafaf9 82%, transparent); color: #3a3f44; font: 0.82rem var(--mono); border-top: 1px solid #c9ced3; }
.names { border: 1px solid var(--line); border-radius: 0.9rem; background: var(--panel); }
.names h3 { margin: 0; padding: 0.8rem 1.1rem; font-size: 0.95rem; color: var(--faint); font-weight: 600; border-bottom: 1px solid var(--line); }
.names dl { margin: 0; }
.names div { display: grid; grid-template-columns: 8.4rem minmax(0, 1fr); gap: 1rem; padding: 0.7rem 1.1rem; border-bottom: 1px solid var(--line); }
.names div:last-child { border-bottom: 0; }
.names dt { font: 600 0.92rem var(--mono); }
.names dd { margin: 0; color: var(--muted); font-size: 0.95rem; }
.result .after { margin: 1.2rem 0 0; color: var(--muted); }
@media (max-width: 56rem) { .result { grid-template-columns: minmax(0, 1fr); } }

/* numbers as a comparison table, limits beside each figure */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--panel); }
table.cmp { width: 100%; border-collapse: collapse; }
.cmp th, .cmp td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp thead th { font-size: 0.9rem; color: var(--faint); font-weight: 600; background: var(--rail); }
.cmp td.num { font: 600 1.05rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp td.before { color: var(--muted); font-weight: 500; }
.cmp td.why { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 44rem) {
  .cmp thead { position: absolute; left: -999px; }
  .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; }
  .cmp tr { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
  .cmp tr:last-child { border-bottom: 0; }
  .cmp th, .cmp td { border: 0; padding: 0; }
  .cmp tbody th { font-size: 1.05rem; margin-bottom: 0.35rem; }
  .cmp td.num { display: inline-block; margin-right: 0.9rem; }
  .cmp td.before::after { content: " before"; font: 0.82rem var(--sans); color: var(--faint); }
  .cmp td.why { margin-top: 0.4rem; }
}
.limits { margin: 1.6rem 0 0; padding: 1rem 1.2rem; border-left: 3px solid var(--warn); background: var(--panel); border-radius: 0 0.5rem 0.5rem 0; color: var(--muted); max-width: 46rem; }
.limits strong { color: var(--text); }

/* proof: photo beside model */
.proof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 3rem; }
.frame { margin: 0; border: 1px solid var(--line); border-radius: 0.9rem; overflow: hidden; background: var(--panel); }
.frame .pic { aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.frame figcaption { padding: 0.65rem 1rem; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }
.frame figcaption b { color: var(--text); font-weight: 600; }
.ph { display: grid; place-items: center; text-align: center; color: var(--faint); font: 0.9rem var(--mono); padding: 1rem;
  background: repeating-linear-gradient(135deg, transparent 0 11px, var(--line) 11px 12px), var(--inset); }
.pic img { position: absolute; width: 160%; height: auto; max-width: none; left: -27%; top: -11%; display: block; }
.pic.light { background: #dde1e7; }
@media (max-width: 44rem) { .proof { grid-template-columns: minmax(0, 1fr); } }

/* signup (placeholder: not connected to anything) */
form.signup { display: grid; gap: 0.8rem; max-width: 28rem; }
.field { display: grid; gap: 0.3rem; }
.field label { font-size: 0.92rem; font-weight: 600; }
.field input, .field select { font: 1rem var(--sans); color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.6rem 0.75rem; width: 100%; }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-msg { margin: 0; min-height: 1.4rem; color: var(--ok); font-weight: 600; font-size: 0.95rem; }

/* files */
.files { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.file { border: 1px solid var(--line); background: var(--panel); border-radius: 0.7rem; padding: 1rem 1.1rem; }
.file b { display: block; font: 600 1rem var(--mono); margin-bottom: 0.3rem; }
.file span { color: var(--muted); font-size: 0.93rem; }
@media (max-width: 56rem) { .files { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 32rem) { .files { grid-template-columns: minmax(0, 1fr); } }

/* access */
.access { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.where { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--panel); }
.where li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); }
.where li:last-child { border-bottom: 0; }
.st { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--warn); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.st.now { color: var(--ok); }
.st::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: currentColor; }
@media (max-width: 56rem) { .access { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; } }

/* footer: a drawing title block */
footer { border-top: 1px solid var(--line); padding: 2rem 0 2.6rem; background: var(--rail); }
.tb { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; border: 1px solid var(--text); font-size: 0.9rem; }
.tb > div { padding: 0.55rem 0.8rem; border-right: 1px solid var(--text); }
.tb > div:last-child { border-right: 0; }
.tb small { display: block; color: var(--faint); font-size: 0.78rem; margin-bottom: 0.1rem; }
.tb .mono { font-weight: 600; }
.foot-note { margin: 1rem 0 0; color: var(--faint); font-size: 0.88rem; }
@media (max-width: 44rem) { .tb { grid-template-columns: 1fr 1fr; } .tb > div { border-bottom: 1px solid var(--text); } .tb > div:nth-child(2n) { border-right: 0; } .tb > div:nth-last-child(-n+2) { border-bottom: 0; } }

/* footer */
footer .foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin: 0 0 2rem; }
footer h2 { font-size: 0.9rem; font-weight: 600; color: var(--faint); margin: 0 0 0.6rem; letter-spacing: 0; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
footer ul a { color: var(--muted); text-decoration: none; }
footer ul a:hover { color: var(--text); text-decoration: underline; }
footer .about { color: var(--muted); max-width: 22rem; margin: 0.4rem 0 0; }
.foot-bottom { margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 1.5rem; color: var(--faint); font-size: 0.88rem; }
@media (max-width: 44rem) { footer .foot-cols { grid-template-columns: 1fr 1fr; } footer .foot-cols > div:first-child { grid-column: 1 / -1; } }

/* text pages: support, privacy, terms, 404 */
.page { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 6rem); }
.page .wrap { max-width: 46rem; }
.page h1 { font-size: clamp(2rem, 3vw + 1rem, 2.8rem); margin-bottom: 0.6rem; }
.page .updated { color: var(--faint); margin: 0 0 2rem; }
.page h2 { font-size: 1.35rem; margin: 2.2rem 0 0.5rem; letter-spacing: -0.015em; }
.page p, .page li { color: var(--muted); font-size: 1.0625rem; }
.page p { margin: 0 0 1rem; }
.page ul.plain { padding-left: 1.2rem; margin: 0 0 1rem; }
.page a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.page .draft { border-left: 3px solid var(--warn); background: var(--panel); border-radius: 0 0.5rem 0.5rem 0; padding: 0.9rem 1.1rem; margin: 0 0 2rem; }
.page .draft p { margin: 0; }
.faq { border-top: 1px solid var(--text); margin-top: 1rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 1.0625rem; }
.faq details p { margin: 0.6rem 0 0; }
.contact-box { border: 1px solid var(--line); border-radius: 0.9rem; background: var(--panel); padding: 1.3rem 1.4rem; margin: 1.4rem 0 0; }
.contact-box .big { font: 600 1.15rem var(--mono); color: var(--text); word-break: break-all; }
