/* Plainwell shared stylesheet. One design system, three brand themes.
   Theme is chosen by the class on <body>: brand-plainwell | brand-wellfitted | brand-keybrief */

/* ---------- Tokens: light (default) ---------- */
:root {
  --radius: 10px;
  --radius-sm: 6px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1080px;
  --measure: 64ch;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.4rem;
  --step-3: 1.85rem;
  --step-4: clamp(2.1rem, 5vw, 3.1rem);
  --good: #2f7d4f;
  --bad: #b3261e;
}

body.brand-plainwell {
  --bg: #f5f7f6; --surface: #ffffff; --ink: #1d2622; --muted: #56615b; --line: #dce2de;
  --accent: #2e6b55; --accent-ink: #ffffff; --accent-soft: #e3efe9; --link: #235a47;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --display-weight: 600; --display-case: none; --display-tracking: -0.01em;
}
body.brand-wellfitted {
  --bg: #f3f4f2; --surface: #ffffff; --ink: #1c2126; --muted: #56606b; --line: #d7dce0;
  --accent: #d98e04; --accent-ink: #1c2126; --accent-soft: #fbefd6; --link: #7f5200;
  --panel: #1f262d; --panel-ink: #f2f4f6;
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
  --display-weight: 700; --display-case: uppercase; --display-tracking: 0.01em;
}
body.brand-keybrief {
  --bg: #f5f6f8; --surface: #ffffff; --ink: #1b2433; --muted: #566074; --line: #dce0e7;
  --accent: #8f621a; --accent-ink: #ffffff; --accent-soft: #f3eadb; --link: #7a5214;
  --paper: #fffdf8;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --display-weight: 600; --display-case: none; --display-tracking: -0.01em;
}

/* ---------- Tokens: dark (system setting, unless the viewer chose light) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --good: #6cc28f; --bad: #f08a82; }
  :root:not([data-theme="light"]) body.brand-plainwell {
    --bg: #111614; --surface: #19201c; --ink: #e8edea; --muted: #9ba7a0; --line: #2a332e;
    --accent: #6fbf9f; --accent-ink: #0f1a15; --accent-soft: #1f3129; --link: #8fd3b6;
  }
  :root:not([data-theme="light"]) body.brand-wellfitted {
    --bg: #121518; --surface: #1b2025; --ink: #eef0f2; --muted: #9aa4ae; --line: #2c333a;
    --accent: #f2a516; --accent-ink: #15181b; --accent-soft: #33280f; --link: #f5bb4d;
    --panel: #0c0f12; --panel-ink: #eef0f2;
  }
  :root:not([data-theme="light"]) body.brand-keybrief {
    --bg: #10141b; --surface: #171d27; --ink: #e9ecf1; --muted: #9aa3b2; --line: #2a3240;
    --accent: #d9a54a; --accent-ink: #15110a; --accent-soft: #2e2615; --link: #e6bb6c;
    --paper: #1b212c;
  }
}
/* ---------- Tokens: dark (explicit choice) ---------- */
:root[data-theme="dark"] { color-scheme: dark; --good: #6cc28f; --bad: #f08a82; }
:root[data-theme="dark"] body.brand-plainwell {
  --bg: #111614; --surface: #19201c; --ink: #e8edea; --muted: #9ba7a0; --line: #2a332e;
  --accent: #6fbf9f; --accent-ink: #0f1a15; --accent-soft: #1f3129; --link: #8fd3b6;
}
:root[data-theme="dark"] body.brand-wellfitted {
  --bg: #121518; --surface: #1b2025; --ink: #eef0f2; --muted: #9aa4ae; --line: #2c333a;
  --accent: #f2a516; --accent-ink: #15181b; --accent-soft: #33280f; --link: #f5bb4d;
  --panel: #0c0f12; --panel-ink: #eef0f2;
}
:root[data-theme="dark"] body.brand-keybrief {
  --bg: #10141b; --surface: #171d27; --ink: #e9ecf1; --muted: #9aa3b2; --line: #2a3240;
  --accent: #d9a54a; --accent-ink: #15110a; --accent-soft: #2e2615; --link: #e6bb6c;
  --paper: #1b212c;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.2; }
body.brand-wellfitted h1, body.brand-wellfitted h2 { text-transform: var(--display-case); }
p { margin: 0; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: var(--measure); }
.eyebrow {
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- Header / footer ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 1.1rem; flex-wrap: wrap; align-items: center; font-size: var(--step--1); }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; padding-block: 2rem 2.5rem; font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: grid; gap: 0.75rem; }
.site-footer a { color: var(--muted); }
.legal-line { max-width: 90ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Sections ---------- */
section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 0.75rem; margin-bottom: 2rem; max-width: var(--measure); }
.grid-2 { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.ticks li::before { content: ""; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps li { counter-increment: step; display: grid; gap: 0.4rem; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: var(--bg); font-weight: 700; font-family: var(--font-display);
}
.note { font-size: var(--step--1); color: var(--muted); }

/* ---------- Pricing ---------- */
.price-card { display: grid; gap: 1rem; }
.price { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--step-4); line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--font-body); font-size: var(--step-0); font-weight: 500; color: var(--muted); }
.price-card.featured { border: 2px solid var(--accent); }
.badge { display: inline-block; font-size: var(--step--1); font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.75rem; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.faq summary { font-weight: 700; cursor: pointer; list-style-position: outside; }
.faq details p { margin-top: 0.6rem; color: var(--muted); max-width: var(--measure); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 0; display: grid; gap: 1rem; background: var(--surface); }
.form legend { font-weight: 700; padding-inline: 6px; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; }
.field .hint { font-size: var(--step--1); color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"], .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.field textarea { min-height: 110px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--bad); }
.error { color: var(--bad); font-size: var(--step--1); min-height: 0; }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.row-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.form-status.ok { border-color: var(--good); }
.form-status.fail { border-color: var(--bad); }
.required-mark { color: var(--bad); }

/* ---------- Plainwell (company) ---------- */
.pw-hero { padding-block: clamp(3rem, 8vw, 5.5rem); }
.pw-hero h1 { max-width: 18ch; }
.service-card { display: grid; gap: 0.75rem; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.service-card:hover { border-color: var(--accent); }
.service-card .go { color: var(--link); font-weight: 700; }
.service-card.soon { border-style: dashed; color: var(--muted); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; margin: 0; }
.details dt { font-weight: 600; }
.details dd { margin: 0; color: var(--muted); }

/* ---------- Wellfitted ---------- */
.wf-hero { background: var(--panel); color: var(--panel-ink); padding-block: clamp(2.5rem, 7vw, 5rem); border-top: 0; }
.wf-hero .lede { color: color-mix(in srgb, var(--panel-ink) 78%, transparent); }
.wf-hero .eyebrow { color: var(--accent); }
.wf-hero .btn.secondary { color: var(--panel-ink); border-color: color-mix(in srgb, var(--panel-ink) 35%, transparent); }
.wf-hero .grid-2 { align-items: center; }
.wf-hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); line-height: 0.98; }
.stripe-rule { height: 8px; background: repeating-linear-gradient(135deg, var(--accent) 0 14px, transparent 14px 28px); }
.phone {
  width: min(100%, 300px); margin-inline: auto; border-radius: 30px; padding: 12px;
  background: #0b0d10; border: 1px solid #333a42; box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
}
.phone-screen { border-radius: 20px; overflow: hidden; background: #ffffff; color: #1c2126; font-family: "Barlow", Arial, sans-serif; }
.ph-top { background: #243447; color: #fff; padding: 14px 14px 18px; display: grid; gap: 6px; }
.ph-name { font-family: "Barlow Condensed", Arial, sans-serif; font-weight: 700; font-size: 1.4rem; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.ph-sub { font-size: 0.8rem; opacity: 0.85; }
.ph-call { display: block; text-align: center; background: #f2a516; color: #15181b; font-weight: 700; padding: 10px; border-radius: 6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ph-body { padding: 12px 14px 16px; display: grid; gap: 8px; font-size: 0.82rem; }
.ph-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ph-tile { background: #eef1f4; border-radius: 6px; padding: 8px; font-weight: 600; }
.ph-trust { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-trust span { border: 1px solid #c9d1d9; border-radius: 999px; padding: 2px 8px; font-size: 0.72rem; }
.example-tag { text-align: center; font-size: var(--step--1); color: color-mix(in srgb, var(--panel-ink) 70%, transparent); margin-top: 10px; }
.check-table { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.check-table th, .check-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.check-table th { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.verdict { font-weight: 700; white-space: nowrap; }
.verdict.no { color: var(--bad); }
.verdict.yes { color: var(--good); }
.table-scroll { overflow-x: auto; }
.stat-quote { border-left: 4px solid var(--accent); padding-left: 1rem; }
.stat-quote strong { font-family: var(--font-display); font-size: var(--step-3); display: block; line-height: 1.05; }
.examples { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.examples .phone { box-shadow: none; }
.ownership { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 0.75rem; }

/* ---------- Keybrief ---------- */
.kb-hero { padding-block: clamp(2.5rem, 7vw, 5rem); }
.kb-hero h1 { max-width: 20ch; }
.key-rule { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.key-rule::after { content: ""; flex: 1; height: 1px; background: var(--accent); opacity: 0.6; }
.issue {
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2rem); display: grid; gap: 1.1rem; box-shadow: 0 1px 0 var(--line), 0 12px 30px rgb(20 30 50 / 0.08);
}
.issue-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 0.6rem; }
.issue-agency { font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); }
.issue-date { font-size: var(--step--1); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.issue-part { display: grid; gap: 0.35rem; }
.issue-part h3 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; }
.issue-part .src { font-size: var(--step--1); color: var(--muted); }
.dates { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.dates dt { font-weight: 700; font-variant-numeric: tabular-nums; }
.dates dd { margin: 0; }
.rent-figure { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.rent-figure strong { font-family: var(--font-display); font-size: var(--step-3); font-variant-numeric: tabular-nums; }
.issue-foot { border-top: 1px solid var(--line); padding-top: 0.8rem; font-size: var(--step--1); color: var(--muted); }
.not-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.not-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.not-list li::before { content: "\00D7"; font-weight: 700; color: var(--bad); font-size: 1.2rem; line-height: 1.3; }

/* ---------- Draft banner (preview only) ---------- */
.draft-banner { background: var(--accent-soft); border-bottom: 1px solid var(--accent); font-size: var(--step--1); }
.draft-banner .wrap { padding-block: 8px; }

/* ---------- Policy / terms pages ---------- */
.policy { max-width: 760px; display: grid; gap: 1.1rem; }
.policy h2 { font-size: var(--step-2); margin-top: 1.2rem; }
.policy ul, .policy ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.policy table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.policy th { color: var(--muted); font-weight: 600; }
body.brand-wellfitted .policy h1, body.brand-wellfitted .policy h2 { text-transform: none; }
