/* ==========================================================================
   Pennypoke, editorial paper-and-ink aesthetic
   Palette: warm brass + deep ink + cream paper
   Type: Fraunces (display, serif) + Inter (body, geometric sans)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Tokens ----------------------------------------------------------- */
:root {
  /* Surfaces */
  --paper:        #f6f0e4;   /* cream paper */
  --paper-deep:   #efe6d4;   /* slightly darker cream for inset */
  --paper-edge:   #e4d8bf;   /* paper shadow edge */
  --ink:          #1b1712;   /* near-black warm */
  --ink-soft:     #3d332a;   /* softer body ink */
  --ink-muted:    #6b5f50;   /* metadata, secondary */
  --ink-ghost:    #9b8c79;   /* tertiary */

  /* Brand */
  --brass:        #b8873a;   /* primary accent, money */
  --brass-deep:   #8f6823;   /* pressed / hover */
  --brass-soft:   #d9b67a;   /* surface tint */
  --copper:       #a84e26;   /* secondary warm accent */

  /* States */
  --success:      #4a6b3a;   /* olive green, not clinical */
  --success-tint: #e6ead8;
  --warning:      #a7751c;
  --danger:       #8c2f1f;
  --danger-tint:  #f1d9d4;

  /* Lines + shadow */
  --rule:         #d8c9ad;
  --rule-soft:    #e7ddc6;
  --shadow-sm:    0 1px 0 rgba(27,23,18,.04), 0 1px 2px rgba(27,23,18,.06);
  --shadow-md:    0 1px 0 rgba(27,23,18,.05), 0 8px 24px -12px rgba(27,23,18,.18);
  --shadow-lg:    0 2px 0 rgba(27,23,18,.06), 0 24px 48px -20px rgba(27,23,18,.22);

  /* Type */
  --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Scale (fluid where it matters) */
  --fs-display:   clamp(2.5rem, 5.5vw + 1rem, 4.75rem);  /* hero */
  --fs-h1:        clamp(2rem, 3vw + 1rem, 3rem);
  --fs-h2:        clamp(1.5rem, 1.2vw + 1rem, 2rem);
  --fs-h3:        1.25rem;
  --fs-body:      1.0625rem;  /* 17px base body */
  --fs-lead:      1.1875rem;  /* 19px subline */
  --fs-small:     0.9375rem;  /* 15px */
  --fs-micro:     0.8125rem;  /* 13px */

  /* Spacing, 8pt grid */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Layout */
  --max:      1200px;
  --max-text: 640px;

  /* Motion */
  --ease:     cubic-bezier(.2, .7, .2, 1);
  --dur:      180ms;
}

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink-soft);
  background: var(--paper);
  /* subtle paper grain using layered gradients, not images */
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(184,135,58,.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(168,78,38,.05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.08;
  font-variation-settings: "opsz" 48;
}
p { color: var(--ink-soft); }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--rule); transition: text-decoration-color var(--dur) var(--ease), color var(--dur) var(--ease); }
a:hover { text-decoration-color: var(--brass); color: var(--brass-deep); }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

::selection { background: var(--brass-soft); color: var(--ink); }

/* ---- Layout primitives ------------------------------------------------ */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-5); }
.wrap-text { max-width: var(--max-text); margin: 0 auto; padding: 0 var(--s-5); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---- Header ----------------------------------------------------------- */
.site-header {
  padding: var(--s-5) 0;
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 240, 228, 0.82);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand .mark {
  width: 26px; height: 26px;
  display: inline-block;
  background: var(--brass);
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 0 rgba(0,0,0,.08);
}
.brand .mark::after {
  content: "P";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.brand em { font-style: normal; color: var(--brass-deep); }

.site-nav { display: flex; gap: var(--s-5); align-items: center; }
.site-nav a { font-size: var(--fs-small); color: var(--ink-muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  font-weight: 500;
  font-size: var(--fs-small);
}
.nav-cta:hover { background: var(--brass-deep); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 8px 20px -10px rgba(27,23,18,.5);
}
.btn-primary:hover { background: var(--brass-deep); color: var(--paper); text-decoration: none; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { fill: currentColor; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); text-decoration: none; }

.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 10vw, 128px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(var(--s-6), 5vw, var(--s-9));
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  margin-bottom: var(--s-4);
}
.hero-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--brass);
}
.hero h1 {
  font-size: var(--fs-display);
  font-variation-settings: "opsz" 96;
  margin-bottom: var(--s-5);
  max-width: 13ch;
}
.hero h1 .ital { font-style: italic; color: var(--brass-deep); font-weight: 500; }
.hero .lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 38ch;
  margin-bottom: var(--s-6);
  line-height: 1.5;
}
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.hero-note { font-size: var(--fs-micro); color: var(--ink-muted); margin-top: var(--s-4); }
.hero-note strong { color: var(--ink-soft); font-weight: 500; }

/* chat mock */
.chat-mock {
  background: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--paper-edge);
  position: relative;
  transform: rotate(0.6deg);
  max-width: 420px;
  justify-self: end;
  width: 100%;
}
.chat-mock::before {
  content: "";
  position: absolute; inset: -18px -18px auto auto;
  width: 72px; height: 72px;
  background: radial-gradient(circle at 30% 30%, #e6c483, var(--brass) 60%, var(--brass-deep));
  border-radius: 50%;
  box-shadow: 0 8px 24px -8px rgba(184,135,58,.5), inset 0 2px 4px rgba(255,255,255,.3);
  z-index: -1;
}
.chat-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: var(--s-4);
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brass);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px; color: var(--ink);
}
.chat-name { font-weight: 600; color: var(--ink); font-size: var(--fs-small); }
.chat-status { font-size: var(--fs-micro); color: var(--ink-muted); }
.chat-msgs { display: flex; flex-direction: column; gap: var(--s-3); }
.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.4;
  animation: msg-in 0.5s var(--ease) both;
}
.msg-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 4px;
  animation-delay: 0.1s;
}
.msg-bot {
  align-self: flex-start;
  background: var(--paper-deep);
  color: var(--ink);
  border-bottom-left-radius: 4px;
  animation-delay: 0.35s;
}
.msg-bot .tag {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  padding: 2px 6px;
  background: rgba(184,135,58,.15);
  border-radius: 4px;
}
.msg-bot .amt { font-family: var(--font-mono); color: var(--brass-deep); font-weight: 600; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Section rhythm --------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section-head { margin-bottom: var(--s-7); }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  color: var(--brass-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-3);
  display: block;
}
.section-title {
  font-size: var(--fs-h1);
  max-width: 18ch;
  margin-bottom: var(--s-4);
  font-variation-settings: "opsz" 72;
}
.section-title .ital { font-style: italic; color: var(--brass-deep); font-weight: 500; }
.section-lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.5;
}

/* ---- How it works ----------------------------------------------------- */
.how {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(var(--s-6), 5vw, var(--s-8));
  align-items: start;
}
.how-steps { counter-reset: step; position: relative; }
.how-steps::before {
  content: ""; position: absolute;
  left: 20px; top: 12px; bottom: 12px;
  width: 1px; background: var(--rule);
}
.step {
  position: relative;
  padding-left: 64px;
  padding-bottom: var(--s-6);
  counter-increment: step;
}
.step:last-child { padding-bottom: 0; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: -2px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.step h3 {
  font-size: 1.375rem;
  font-family: var(--font-display);
  font-weight: 500;
  margin-bottom: var(--s-2);
  font-variation-settings: "opsz" 36;
}
.step p { color: var(--ink-soft); line-height: 1.55; }
.step code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--paper);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
  border: 1px solid var(--rule-soft);
}

/* ---- Why (compare panel) ---------------------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}
.compare {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  position: relative;
}
.compare h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--s-4);
  color: var(--ink);
  display: flex; align-items: center; gap: var(--s-2);
}
.compare.bad h3 { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--ink-muted); text-decoration-thickness: 1px; }
.compare.bad { background: transparent; border-style: dashed; }
.compare.good { background: #fff; border-color: var(--paper-edge); box-shadow: var(--shadow-md); }
.compare ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.compare li {
  font-size: var(--fs-small);
  color: var(--ink-soft);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.compare.bad li::before {
  content: "×"; position: absolute; left: 0; top: -1px;
  color: var(--ink-ghost); font-size: 18px; font-weight: 500;
}
.compare.good li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 10px; height: 6px;
  border-left: 2px solid var(--brass-deep);
  border-bottom: 2px solid var(--brass-deep);
  transform: rotate(-45deg);
}

/* ---- Trust strip (full bleed inset) ----------------------------------- */
.trust {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(56px, 8vw, 96px) 0;
}
.trust .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(var(--s-5), 5vw, var(--s-8));
  align-items: center;
}
.trust .section-eyebrow { color: var(--brass-soft); }
.trust h2 {
  color: var(--paper);
  font-size: var(--fs-h1);
  font-variation-settings: "opsz" 72;
  max-width: 14ch;
}
.trust h2 .ital { font-style: italic; color: var(--brass-soft); font-weight: 500; }
.trust p { color: #d9cfb8; font-size: var(--fs-lead); line-height: 1.55; max-width: 52ch; }
.trust p + p { margin-top: var(--s-4); }
.trust a { color: var(--brass-soft); text-decoration-color: var(--brass-deep); }
.trust a:hover { color: var(--paper); text-decoration-color: var(--paper); }
.trust .kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--brass-soft);
  display: inline-block;
  margin-top: var(--s-5);
  padding: 4px 10px;
  border: 1px solid rgba(217,182,122,.25);
  border-radius: 999px;
}

/* ---- Pricing ---------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-4);
  align-items: stretch;
}
.plan {
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.plan.featured {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.plan-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brass);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: inherit;
  margin-bottom: var(--s-2);
  font-variation-settings: "opsz" 36;
}
.plan .plan-desc { font-size: var(--fs-small); color: var(--ink-muted); margin-bottom: var(--s-5); }
.plan.featured .plan-desc { color: #c9b995; }
.plan .price {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
  color: inherit;
  margin-bottom: var(--s-5);
  letter-spacing: -0.02em;
}
.plan .price sup { font-size: 1.125rem; vertical-align: super; font-weight: 500; color: var(--brass-deep); }
.plan.featured .price sup { color: var(--brass-soft); }
.plan .price small {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0;
}
.plan.featured .price small { color: #c9b995; }
.plan ul {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: var(--s-2);
  flex: 1;
  border-top: 1px solid var(--rule-soft);
  padding-top: var(--s-5);
  margin-bottom: var(--s-5);
}
.plan.featured ul { border-top-color: rgba(217,182,122,.2); }
.plan li {
  font-size: var(--fs-small);
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
  color: var(--ink-soft);
}
.plan.featured li { color: #e4dcc6; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 7px;
  width: 10px; height: 6px;
  border-left: 2px solid var(--brass-deep);
  border-bottom: 2px solid var(--brass-deep);
  transform: rotate(-45deg);
}
.plan.featured li::before { border-color: var(--brass-soft); }
.plan .btn { width: 100%; margin-top: auto; }
.plan.featured .btn-primary { background: var(--brass); color: var(--ink); }
.plan.featured .btn-primary:hover { background: var(--brass-soft); color: var(--ink); }
.plan-fine { font-size: var(--fs-micro); color: var(--ink-ghost); margin-top: var(--s-3); text-align: center; }
.plan.featured .plan-fine { color: #9b8c79; }

/* ---- FAQ (prose list) ------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; }
.faq-item {
  padding: var(--s-5) 0;
  border-top: 1px solid var(--rule);
}
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  list-style: none;
  display: flex; justify-content: space-between; gap: var(--s-4);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  font-variation-settings: "opsz" 36;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink-muted);
  transition: transform var(--dur) var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .a { margin-top: var(--s-3); color: var(--ink-soft); max-width: 60ch; line-height: 1.6; }
.faq-item .a a { color: var(--brass-deep); text-decoration-color: var(--brass-soft); }

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  padding: var(--s-7) 0 var(--s-6);
  border-top: 1px solid var(--rule);
  margin-top: var(--s-7);
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--s-4);
}
.site-footer nav { display: flex; gap: var(--s-5); }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ==========================================================================
   app.html, success + upload
   ========================================================================== */
.app-main { padding: var(--s-7) 0 var(--s-8); }

.success-card {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-6) var(--s-6);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.success-mark {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--success-tint);
  display: grid; place-items: center;
  margin: 0 auto var(--s-5);
  animation: pop 0.4s var(--ease) both;
}
.success-mark svg { width: 32px; height: 32px; stroke: var(--success); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop {
  from { opacity: 0; transform: scale(.7); }
  to   { opacity: 1; transform: scale(1); }
}
.success-card h1 {
  font-size: 1.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  margin-bottom: var(--s-3);
  font-variation-settings: "opsz" 48;
}
.success-card .sub {
  color: var(--ink-muted);
  font-size: var(--fs-body);
  margin-bottom: var(--s-6);
  line-height: 1.55;
}
.success-card .close-note {
  font-size: var(--fs-micro);
  color: var(--ink-ghost);
  margin-top: var(--s-5);
}

/* Setup card */
.setup-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
}
.setup-card h1 {
  font-size: 1.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  margin-bottom: var(--s-2);
  font-variation-settings: "opsz" 48;
}
.setup-card .sub { color: var(--ink-muted); font-size: var(--fs-small); margin-bottom: var(--s-5); }
.form-field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-4); }
.form-field label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
}
.form-field input[type="text"],
.form-field input[type="url"] {
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  color: var(--ink);
  min-height: 48px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.form-field input:focus {
  outline: 0;
  border-color: var(--brass-deep);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(184,135,58,.15);
}
.form-help { font-size: var(--fs-micro); color: var(--ink-muted); }

/* Upload */
.app-header-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
  gap: var(--s-3);
}
.app-header-row h1 {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 500;
  color: var(--ink);
  font-variation-settings: "opsz" 48;
}
.usage-pill {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-muted);
  padding: 4px 10px;
  background: var(--paper-deep);
  border: 1px solid var(--rule-soft);
  border-radius: 999px;
}
.upload-zone {
  border: 2px dashed var(--rule);
  background: var(--paper-deep);
  border-radius: var(--r-lg);
  padding: clamp(40px, 8vw, 72px) var(--s-5);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.upload-zone:hover { border-color: var(--brass); background: #fff; }
.upload-zone.dragging { border-color: var(--brass-deep); background: #fff; transform: scale(1.005); }
.upload-zone input { display: none; }
.upload-icon {
  width: 48px; height: 48px;
  margin: 0 auto var(--s-4);
  color: var(--brass-deep);
}
.upload-zone p.label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: var(--s-2);
  font-variation-settings: "opsz" 36;
}
.upload-zone p.hint { font-size: var(--fs-small); color: var(--ink-muted); }

.processing {
  text-align: center;
  padding: var(--s-8) var(--s-5);
}
.processing .dot-pulse {
  display: inline-flex; gap: 6px; margin-bottom: var(--s-4);
}
.processing .dot-pulse span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brass);
  animation: dot 1.2s ease-in-out infinite;
}
.processing .dot-pulse span:nth-child(2) { animation-delay: 0.15s; }
.processing .dot-pulse span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}
.processing p { color: var(--ink-muted); font-size: var(--fs-small); }

.preview-card {
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  margin-top: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.preview-card h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--s-4);
  font-variation-settings: "opsz" 36;
}
.preview-card table {
  width: 100%;
  border-collapse: collapse;
}
.preview-card td {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: var(--fs-small);
  color: var(--ink);
  vertical-align: top;
}
.preview-card tr:last-child td { border-bottom: 0; }
.preview-card td:first-child {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-muted);
  width: 120px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 12px;
}
.preview-card .status-line {
  display: flex; align-items: center; gap: var(--s-2);
  margin-top: var(--s-5);
  padding: var(--s-3) var(--s-4);
  background: var(--success-tint);
  color: var(--success);
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
  font-weight: 500;
}
.preview-card .status-line svg { width: 16px; height: 16px; }
.preview-card .btn { margin-top: var(--s-5); }

.limit-card {
  max-width: 520px; margin: var(--s-5) auto 0;
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.limit-card h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: var(--s-3); font-weight: 500; font-variation-settings: "opsz" 36; }
.limit-card p { color: var(--ink-muted); margin-bottom: var(--s-5); }

.status { margin-top: var(--s-3); font-size: var(--fs-small); }
.status.ok { color: var(--success); }
.status.err { color: var(--danger); padding: var(--s-2) var(--s-3); background: var(--danger-tint); border-radius: var(--r-sm); }

/* ==========================================================================
   Long-form pages (privacy, terms)
   ========================================================================== */
.doc {
  max-width: 680px;
  margin: var(--s-7) auto;
  padding: 0 var(--s-5) var(--s-8);
}
.doc-header {
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s-6);
}
.doc h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--s-2);
  font-variation-settings: "opsz" 72;
}
.doc .meta { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--ink-muted); letter-spacing: 0.04em; text-transform: uppercase; }
.doc .intro {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  margin-bottom: var(--s-6);
  line-height: 1.6;
}
.doc h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: var(--s-7);
  margin-bottom: var(--s-3);
  font-variation-settings: "opsz" 36;
  display: flex; align-items: baseline; gap: var(--s-3);
}
.doc h2 .num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--brass-deep);
  font-weight: 500;
  min-width: 2.5ch;
}
.doc h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
  font-variation-settings: "opsz" 24;
}
.doc p {
  margin-bottom: var(--s-4);
  color: var(--ink-soft);
  max-width: 65ch;
}
.doc p strong { color: var(--ink); font-weight: 600; }
.doc ul, .doc ol {
  margin-bottom: var(--s-5);
  padding-left: var(--s-5);
  color: var(--ink-soft);
  max-width: 65ch;
}
.doc li { margin-bottom: var(--s-2); line-height: 1.6; }
.doc li strong { color: var(--ink); }
.doc a { color: var(--brass-deep); text-decoration-color: var(--brass-soft); }
.doc a:hover { color: var(--ink); }
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--s-5);
  font-size: var(--fs-small);
  background: #fff;
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-md);
  overflow: hidden;
}
.doc table th {
  background: var(--paper-deep);
  text-align: left;
  padding: var(--s-3) var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  border-bottom: 1px solid var(--rule);
}
.doc table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-soft);
  vertical-align: top;
}
.doc table tr:last-child td { border-bottom: 0; }
.doc .callout {
  background: var(--paper-deep);
  border-left: 3px solid var(--brass);
  padding: var(--s-4) var(--s-5);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: var(--s-5) 0;
  max-width: 65ch;
}
.doc .callout p { margin-bottom: 0; color: var(--ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .chat-mock { justify-self: stretch; max-width: 100%; transform: none; }
  .how-grid { grid-template-columns: 1fr; }
  .trust .wrap { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site-nav a.nav-link { display: none; }
  .wrap { padding: 0 var(--s-4); }
  .section { padding: 56px 0; }
  .hero { padding: 32px 0 56px; }
  .step { padding-left: 56px; }
  .step::before { width: 36px; height: 36px; }
  .how-steps::before { left: 18px; }
  .doc table { font-size: var(--fs-micro); }
  .doc table th, .doc table td { padding: var(--s-2) var(--s-3); }
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .msg { animation: none !important; opacity: 1 !important; transform: none !important; }
}
