/* ============================================================
   Retype — document studio design system
   Interface: Inter · Data: IBM Plex Mono
   ============================================================ */

:root {
  --paper: #f7f9fc;
  --paper-warm: #edf1f7;
  --paper-card: #ffffff;
  --ink: #101827;
  --ink-soft: #445066;
  --ink-faint: #718096;
  --line: #dce3ed;
  --line-strong: #bec9d8;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --green: #15805d;
  --green-soft: #e7f7f0;
  --shadow-card: 0 1px 2px rgba(16, 24, 39, 0.04), 0 12px 30px -18px rgba(16, 24, 39, 0.24);
  --shadow-lift: 0 4px 12px rgba(16, 24, 39, 0.06), 0 22px 48px -22px rgba(37, 99, 235, 0.24);
  --shadow-page: 0 3px 8px rgba(16, 24, 39, 0.1), 0 28px 56px -22px rgba(16, 24, 39, 0.32);
  --font-display: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-text: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --ease-out: cubic-bezier(0.2, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.025) 1px, transparent 1px),
    radial-gradient(ellipse 85% 55% at 90% -10%, rgba(37, 99, 235, 0.1), transparent 62%);
  background-size: 32px 32px, 32px 32px, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(37, 99, 235, 0.2); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 0.5rem; }

/* ---------- Wordmark ---------- */

.wordmark {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { font-style: normal; font-weight: 450; }
.wordmark i { color: var(--accent); font-style: normal; }
.wordmark-sm { font-size: 1.2rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem var(--gutter);
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.landing-page .site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  padding-inline: max(
    var(--gutter),
    calc((100vw - 82rem) / 2 + var(--gutter))
  );
}

.landing-page .site-header > .wordmark {
  justify-self: start;
}
.landing-page .site-header > .header-actions {
  justify-self: end;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-right: auto;
}

.landing-page .site-nav {
  align-items: center;
  justify-self: center;
  margin-right: 0;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-nav a:focus-visible,
.nav-btn:focus-visible,
.wordmark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0.2rem 0;
  font: 500 0.92rem/1.6 var(--font-text);
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-btn:hover { color: var(--ink); border-bottom-color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.credits-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: 600 0.95rem/1 var(--font-text);
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s var(--ease-out), box-shadow 0.14s ease, background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: wait; transform: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(16, 24, 39, 0.08), 0 9px 22px -10px rgba(37, 99, 235, 0.75);
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(16, 24, 39, 0.08), 0 14px 28px -12px rgba(37, 99, 235, 0.8);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-outline:hover { border-color: var(--accent); background: rgba(37, 99, 235, 0.04); color: var(--accent-deep); }

.btn-quiet { background: transparent; color: var(--ink-soft); padding-inline: 0.9rem; }
.btn-quiet:hover { color: var(--ink); }
.btn-quiet .arrow { transition: transform 0.15s ease; }
.btn-quiet:hover .arrow { transform: translateX(3px); }

.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }
.btn-sm { padding: 0.6rem 1.05rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Type ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.kicker-rule { width: 2rem; height: 1px; background: var(--accent); flex: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 680;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.9rem);
  line-height: 1.06;
  margin-bottom: 1.25rem;
}
h1 em { font-style: normal; font-weight: 680; color: var(--accent); }

h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; font-weight: 680; }

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.support { color: var(--ink-soft); max-width: var(--measure); margin: 0.25rem 0 0; }

/* Prose links (body copy, legal pages, FAQ answers) */
.prose a,
.legal-page a,
.support a,
.faq-item p a,
.scope-footnote a,
.fineprint a,
.modal-hint a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.prose a:hover,
.legal-page a:hover,
.support a:hover,
.faq-item p a:hover,
.scope-footnote a:hover,
.fineprint a:hover,
.modal-hint a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.legal-page a:focus-visible,
.support a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 7vh, 6rem) var(--gutter) clamp(3rem, 6vh, 5rem);
  max-width: 82rem;
  margin: 0 auto;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2rem; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  list-style: none;
  margin: 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.hero-facts strong { color: var(--ink); font-weight: 600; }
.hero-facts .trust-badge { padding: 0; border-top: none; }

.status {
  min-height: 1.5em;
  margin: 1.25rem 0 0;
  font-weight: 550;
  font-size: 0.95rem;
}
.status[data-kind="err"] { color: var(--accent-deep); }
.status[data-kind="ok"] { color: var(--green); }
.status[data-kind="busy"] { color: var(--ink-soft); }
.status[data-kind="busy"]::before {
  content: "";
  display: inline-block;
  width: 0.85em; height: 0.85em;
  margin-right: 0.5em;
  vertical-align: -0.08em;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Demo: before/after pages ---------- */

.demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  perspective: 1200px;
}

.page {
  position: relative;
  margin: 0;
  aspect-ratio: 17 / 22;
  border-radius: 4px;
  padding: clamp(1.1rem, 2.4vw, 1.9rem);
  padding-top: clamp(2.4rem, 4vw, 3rem);
  box-shadow: var(--shadow-page);
  overflow: hidden;
}

.page-tag {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-faint);
  background: rgba(253, 251, 246, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
}
.page-tag-accent { color: var(--green); border-color: rgba(47, 107, 79, 0.35); }

/* Before: warm photographed page with blurry ink bars */
.page-scan {
  background:
    radial-gradient(ellipse 120% 80% at 30% 20%, rgba(255, 255, 255, 0.5), transparent 50%),
    linear-gradient(112deg, #e5d8bd, #d9c9a8 55%, #cbb890);
  transform: rotate(-2.2deg);
}
.scan-body { display: flex; flex-direction: column; gap: 9.5%; height: 100%; padding-top: 4%; }
.scan-line {
  display: block;
  height: 4.2%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(52, 44, 30, 0.78), rgba(52, 44, 30, 0.6));
  filter: blur(1.1px);
}
.scan-line.indent { margin-left: 8%; }
.w97 { width: 97%; } .w95 { width: 95%; } .w94 { width: 94%; }
.w92 { width: 92%; } .w90 { width: 90%; } .w88 { width: 88%; }
.w86 { width: 86%; } .w60 { width: 60%; }
.scan-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.34) 50%, transparent 60%);
  pointer-events: none;
}

/* After: crisp typed page */
.page-typed {
  background: var(--paper-card);
  transform: rotate(1.4deg);
  border: 1px solid var(--line);
}
.typed-body {
  height: 100%;
  padding-top: 2%;
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(0.56rem, 1.15vw, 0.8rem);
  line-height: 2.05;
  color: #262219;
}
.typed-body p { margin: 0; white-space: nowrap; overflow: hidden; }
.typed-body p:first-child::first-letter { font-weight: 640; }

.qc-chip {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(47, 107, 79, 0.3);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}
.qc-dot {
  width: 0.5em; height: 0.5em;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.demo-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
}
.demo-arrow-label {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 340;
  font-size: 0.95rem;
}

/* ---------- Strip ---------- */

.strip {
  border-block: 1px solid var(--line);
  background: var(--paper-warm);
  padding: 1.1rem var(--gutter);
  text-align: center;
}
.strip p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.strip strong { color: var(--ink); }

/* ---------- Sections ---------- */

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vh, 6rem) var(--gutter) 0;
}

.section-head { max-width: 46rem; margin-bottom: 2.5rem; }

.section-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2rem;
}

.section-footnote { margin-top: 1.75rem; }

/* Inner-page hero (guide, legal, about) */
.page-hero { padding-bottom: clamp(1.5rem, 4vh, 2.5rem); }
.page-hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  max-width: 20ch;
}
.page-hero + .section-card { margin-top: 0; }
.legal-meta {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.section-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(3.5rem, 8vh, 6rem);
  box-shadow: var(--shadow-card);
}
.section-card h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.6rem;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s var(--ease-out);
}
.step:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.step-no {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.step h3 { margin: 0.6rem 0 0.5rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- Forms ---------- */

.form { display: flex; flex-direction: column; gap: 1.1rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field > label,
.field-label {
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}
.label-hint { font-weight: 400; color: var(--ink-faint); font-size: 0.8rem; }

.field input[type="email"],
.field input[type="password"],
.field textarea {
  font: 400 1rem/1.4 var(--font-text);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  resize: vertical;
}
.field input[type="email"],
.field input[type="password"] { min-height: 3rem; }
.field textarea { min-height: 7rem; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }

/* Dropzone */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  padding: 1.9rem 1rem;
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--accent);
  background: #f1f6ff;
}
.dropzone:has(input:focus-visible) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.dropzone.has-file { border-style: solid; border-color: var(--green); background: var(--green-soft); }
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone-icon { color: var(--accent); }
.dropzone.has-file .dropzone-icon { color: var(--green); }
.dropzone-text { font-weight: 550; font-size: 0.95rem; color: var(--ink); }
.dropzone-hint { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--ink-faint); }

.fineprint { margin: 0; font-size: 0.8rem; color: var(--ink-faint); }
.form-msg { margin: 0; min-height: 1.4em; font-size: 0.92rem; font-weight: 550; color: var(--ink-soft); }
.form-msg[data-kind="err"] { color: var(--accent-deep); }
.form-msg[data-kind="ok"] { color: var(--green); }

.checklist {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.checklist li { padding-left: 1.5rem; position: relative; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ---------- Pricing ---------- */

.packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.pack {
  display: flex;
  flex-direction: column;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.5rem;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pack:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.pack-featured {
  border-color: var(--ink);
  border-width: 1.5px;
  box-shadow: var(--shadow-card);
}

.pack-flag {
  position: absolute;
  top: -0.8rem;
  left: 1.25rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-card);
  background: var(--accent);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
}

.pack h3 { font-size: 1.05rem; }

.pack-price {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 3rem;
  line-height: 1;
  margin: 0.75rem 0 0.25rem;
  letter-spacing: -0.02em;
}
.currency { font-size: 0.55em; vertical-align: 0.5em; margin-right: 0.05em; color: var(--ink-faint); }

.pack-meta { margin: 0 0 1.35rem; color: var(--ink-soft); font-size: 0.92rem; }
.pack-meta strong { color: var(--accent-deep); }
.pack-action { margin-top: auto; }

.pack-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  flex: 1;
}

.pricing-note {
  margin: 2rem auto 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.92rem;
  max-width: 40rem;
}
.pricing-note strong { color: var(--ink-soft); }

/* ---------- Scope ---------- */

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.scope-col {
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--line);
}
.scope-yes { background: var(--green-soft); border-color: rgba(47, 107, 79, 0.25); }
.scope-no { background: var(--paper-warm); }

.scope-col h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.scope-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  font-size: 0.85rem;
  flex: none;
}
.scope-yes .scope-mark { background: var(--green); color: #fff; }
.scope-no .scope-mark { background: var(--line-strong); color: var(--ink-soft); }

.scope-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}
.scope-col li { padding-left: 1.1rem; position: relative; }
.scope-col li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 0.35rem; height: 0.35rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.4;
}

.scope-footnote {
  margin: 1.5rem 0 0;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 46rem;
}

.faq-item {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 0;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 500;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item p .nav-btn {
  font-size: inherit;
  vertical-align: baseline;
}

/* ---------- Ownership / footer ---------- */

.ownership {
  text-align: center;
  padding-bottom: clamp(3rem, 7vh, 5rem);
}
.ownership .support { margin-inline: auto; }

/* Quiet automation trust line — reads as a caption, not a box */
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
  max-width: none;
}
.trust-badge::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--green);
  flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}

.site-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
}
.site-footer-legal {
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
}
.footer-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
}
.footer-main .trust-seal {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.9rem 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-card);
  box-shadow: 0 1px 2px rgba(16, 24, 39, 0.04);
  text-decoration: none;
  transition: border-color 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), transform 0.15s var(--ease-out);
}
.footer-main .trust-seal:hover {
  border-color: rgba(21, 128, 93, 0.35);
  box-shadow: 0 1px 2px rgba(16, 24, 39, 0.04), 0 0 0 3px var(--green-soft);
  transform: translateY(-1px);
}
.trust-seal-icon {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--green);
  flex: none;
}
.trust-seal-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1.15;
}
.trust-seal-text strong {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.trust-seal-text span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}
@media (max-width: 720px) {
  .footer-main .trust-seal {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}
.footer-legal {
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.82rem;
  line-height: 1.6;
}
.footer-legal p { margin: 0 0 0.25rem; }
.footer-legal a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer-legal a:hover { color: var(--ink); }
.footer-tag {
  margin: 0;
  margin-right: auto;
  color: var(--ink-faint);
  font-size: 0.88rem;
  font-family: var(--font-text);
  font-weight: 500;
}
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a:not(.wordmark) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
}
.site-footer a:not(.wordmark):hover { color: var(--ink); }

.legal-page { padding-bottom: 4rem; max-width: 46rem; }
.legal-page h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal-page > .lede { margin-top: 1rem; margin-bottom: 0; }
.legal-page > .scope-grid { margin-top: 2.5rem; }
.legal-block { margin-top: 2.5rem; }
.legal-block h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.legal-block p { color: var(--ink-soft); }
.legal-block ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}
.legal-block li + li { margin-top: 0.6rem; }
.legal-block li::marker { color: var(--accent); }
.legal-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.legal-links li + li { margin-top: 0.6rem; }
.legal-note {
  margin-top: 2.75rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper-card);
  box-shadow: var(--shadow-card);
}
.legal-note p { margin: 0; color: var(--ink-soft); }

/* ---------- Auth visibility ---------- */

body:not(.is-authed) .authed-only { display: none !important; }
body.is-authed .guest-only { display: none !important; }

/* ---------- Workspace page ---------- */

.ws-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.5rem) var(--gutter) clamp(3rem, 8vh, 5rem);
  min-height: 60vh;
}

.ws-gate {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vh, 5rem) 0;
}

.ws-gate-card {
  width: min(28rem, 100%);
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-card);
}
.ws-gate-card h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 0.5rem 0 0.25rem; }
.ws-gate-card .form { margin-top: 1.5rem; }
.ws-gate-card > .fineprint { margin-top: 1rem; }
.ws-gate-card .fineprint a { color: var(--accent-deep); }

.ws-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.ws-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-top: 0.4rem; }

.ws-balance-card {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  padding: 0.85rem 1.15rem;
  box-shadow: var(--shadow-card);
}
.ws-balance-num {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}
.ws-balance-label {
  margin: 0 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.ws-upload { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.ws-upload .ws-card { max-width: 42rem; }

.ws-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: var(--shadow-card);
}
.ws-card h2 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.ws-card .form { margin-top: 1.25rem; }
.ws-card .modal-hint { margin: 0; }
.ws-card .status { margin-top: 0.75rem; min-height: 1.4em; }

.ws-jobs { margin-top: clamp(2.5rem, 6vh, 4rem); }
.ws-jobs h2 { font-size: 1.25rem; margin-bottom: 1rem; }

.ws-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--ink-faint);
}
.ws-empty p { margin: 0; }

.ws-table-wrap { overflow-x: auto; }

.jobs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.92rem;
}
.jobs-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}
.jobs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.jobs-table tbody tr { transition: background-color 0.12s ease; }
.jobs-table tbody tr:hover { background: var(--paper); }
.jobs-table tr:last-child td { border-bottom: none; }
.jobs-credits { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500; }

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.badge-ok { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.badge-err { color: var(--accent-deep); border-color: var(--accent); }
.badge-busy { color: var(--ink-soft); }
.badge-free { color: var(--ink-faint); }

/* ---------- Coming-soon pack ---------- */

.pack-soon {
  opacity: 0.55;
  filter: saturate(0.4);
  pointer-events: none;
  user-select: none;
}
.pack-flag-soon { background: var(--ink-faint); }
.pack-price-alt { font-size: 1.2rem; color: var(--ink-faint); margin-left: 0.1rem; }

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s var(--ease-out);
}
.feature:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.feature h3 {
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
  padding-left: 1.1rem;
  position: relative;
}
.feature h3::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Modals ---------- */

.modal {
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(90vh, 60rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--paper-card);
  color: var(--ink);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: 0 8px 24px rgba(16, 24, 39, 0.12), 0 32px 80px -24px rgba(16, 24, 39, 0.38);
  overscroll-behavior: contain;
}
.modal-wide { width: min(58rem, calc(100vw - 2rem)); }

.modal::backdrop {
  background: rgba(16, 24, 39, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal[open] { animation: modal-in 0.22s cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.modal-head h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.modal-head .kicker { margin-bottom: 0.6rem; }

.modal .form { margin-top: 1.25rem; }
.modal > .support { margin-top: 0.25rem; }
.modal .btn-block { margin-top: 0.25rem; }
.modal > .btn-block { margin-top: 1.25rem; }
.modal > .authed-only { margin-top: 1.25rem; }
.modal > .authed-only .btn-row { margin-top: 1rem; }
.modal .fineprint { text-align: center; }
.modal .trust-badge { justify-content: center; }

.modal-hint {
  margin: -0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
  line-height: 1.55;
}

.modal-close {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.modal-close:hover { color: var(--ink); border-color: var(--ink); }
.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.modal-close:active { transform: scale(0.94); }

.modal .packs { gap: 1rem; }
.modal .pack { padding: 1.4rem 1.25rem 1.25rem; }
.modal .pack-price { font-size: 2.4rem; }
.modal .pricing-note { margin-top: 1.25rem; }
.modal .status { min-height: 1.4em; }

/* ---------- Scroll life ---------- */

/* .reveal is only added via JS (and only when motion is OK),
   so content stays visible without JS / with reduced motion. */
.reveal {
  opacity: 1;
  transform: translateY(10px);
  transition:
    transform 0.45s var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}
.reveal.in-view { opacity: 1; transform: none; }

.reveal .kicker-rule {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) calc(var(--stagger, 0) * 90ms + 0.15s);
}
.reveal.in-view .kicker-rule { transform: scaleX(1); }

body.is-scrolled .site-header {
  box-shadow: 0 8px 28px -16px rgba(16, 24, 39, 0.24);
}
.site-header { transition: box-shadow 0.25s ease; }

/* Blinking caret after "retyped." in the hero headline */
.hero h1 em::after {
  content: "";
  display: inline-block;
  width: 0.06em;
  height: 0.78em;
  margin-left: 0.1em;
  vertical-align: -0.04em;
  background: var(--accent);
  animation: caret-blink-bg 1.1s step-end infinite;
}
@keyframes caret-blink-bg { 50% { opacity: 0; } }

/* Scroll parallax on the demo pages (vars driven by JS) */
.page-scan {
  transform: rotate(calc(-2.2deg + var(--tilt, 0deg))) translateY(var(--drift, 0px));
}
.page-typed {
  transform: rotate(calc(1.4deg - var(--tilt, 0deg))) translateY(calc(var(--drift, 0px) * -1));
}

/* Retyping animation: bridge the pages, then read and type line by line */
.demo.is-typing {
  --line-dur: 0.72s;
}

.demo.is-typing .demo-arrow path {
  stroke-dasharray: 60;
  animation: draw-demo-arrow 0.55s ease-out 0.05s both;
}
.demo.is-typing .demo-arrow-label {
  animation: reveal-demo-label 0.4s ease-out 0.35s both;
}
@keyframes draw-demo-arrow {
  from { stroke-dashoffset: 60; opacity: 0.2; }
  to { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes reveal-demo-label {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.demo.is-typing .scan-line {
  animation: scan-read var(--line-dur) ease-out forwards;
  animation-delay: var(--line-delay, 0.72s);
}
@keyframes scan-read {
  0% { opacity: 1; box-shadow: none; }
  30% { opacity: 0.95; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
  100% { opacity: 0.35; box-shadow: none; }
}

.demo.is-typing .typed-body p {
  width: 0;
  border-right: 2px solid transparent;
  animation:
    type-line var(--line-dur) steps(26, end) forwards,
    caret-live var(--line-dur) step-end forwards;
  animation-delay: var(--line-delay, 0.72s);
}
.demo.is-typing .typed-body p:last-child {
  animation:
    type-line var(--line-dur) steps(26, end) forwards,
    caret-blink 1.1s step-end infinite;
  animation-delay:
    var(--line-delay, 0.72s),
    var(--line-delay, 0.72s);
}
@keyframes type-line { from { width: 0; } to { width: 100%; } }
@keyframes caret-live {
  0%, 84% { border-right-color: var(--accent); }
  85%, 100% { border-right-color: transparent; }
}
@keyframes caret-blink {
  0%, 100% { border-right-color: var(--accent); }
  50% { border-right-color: transparent; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .demo { max-width: 34rem; }
  .steps { grid-template-columns: 1fr; }
  .packs { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }
  .pack-featured { order: -1; }
  .section-card { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .landing-page .site-header {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
  }
  .landing-page .site-nav { display: none; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .site-header { gap: 0.75rem; }
  .site-header .header-actions { margin-left: auto; }
  .site-header .btn-sm { min-height: 2.65rem; }
  .ws-page .site-header { flex-wrap: wrap; }
  .ws-page .header-actions { gap: 0.35rem; }
  .ws-page .header-actions .btn-sm { padding-inline: 0.7rem; }
  .credits-pill { max-width: 9rem; }
  .demo { grid-template-columns: 1fr; }
  .demo-arrow { margin: 0; }
  .demo-arrow svg { transform: rotate(90deg); }
  .page {
    width: 100%;
    max-width: 15.5rem;
    margin-inline: auto;
    padding: 0.95rem;
    padding-top: 2.45rem;
  }
  .page-scan {
    transform: rotate(-1.2deg);
  }
  .page-typed {
    transform: rotate(0.8deg);
  }
  .typed-body {
    font-size: 0.64rem;
    line-height: 1.72;
  }
  .btn-lg { width: 100%; }
  .cta-row { flex-direction: column; }
  .section-cta { flex-direction: column; align-items: stretch; }
  .feature-grid { grid-template-columns: 1fr; }
  .modal .packs { grid-template-columns: 1fr; }
  .footer-main { gap: 1rem; }
  .site-footer nav { gap: 1rem 1.25rem; }
  .site-footer nav a,
  .site-footer nav .nav-btn { padding-block: 0.35rem; }
  .jobs-table { font-size: 0.86rem; }
  .jobs-table th, .jobs-table td { padding: 0.6rem 0.75rem; }
}
