:root {
  --patina: #2E6B58;
  --patina-ink: #FFFFFF;
  --pine: #1E4034;
  --bg: #F2EFE7;
  --surface: #FBFAF5;
  --sunk: #E9E4D8;
  --ink: #1E1B16;
  --muted: #6B6459;
  --faint: #97907F;
  --line: #DED8CA;
  --brass: #A97C2F;
  --alert: #B4402F;
  --focus: #2E6B58;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --patina: #4E9E85;
    --patina-ink: #10231C;
    --pine: #9FC7BA;
    --bg: #14140F;
    --surface: #1C1B15;
    --sunk: #191811;
    --ink: #ECE7DB;
    --muted: #9A9080;
    --faint: #7B7362;
    --line: #333024;
    --brass: #C9A25A;
    --alert: #E0795F;
    --focus: #4E9E85;
  }
}
:root[data-theme="dark"] {
  --patina: #4E9E85;
  --patina-ink: #10231C;
  --pine: #9FC7BA;
  --bg: #14140F;
  --surface: #1C1B15;
  --sunk: #191811;
  --ink: #ECE7DB;
  --muted: #9A9080;
  --faint: #7B7362;
  --line: #333024;
  --brass: #C9A25A;
  --alert: #E0795F;
  --focus: #4E9E85;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.12; text-wrap: balance; margin: 0; }
em { font-style: italic; }
a { color: var(--patina); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: 940px; margin: 0 auto; padding-inline: clamp(1.15rem, 5vw, 2.5rem); }
section { padding-block: clamp(2.75rem, 6vw, 4rem); }

/* embrasure divider */
.embrasure { display: flex; justify-content: center; padding-block: 0; margin-block: -0.5rem; }
.embrasure::before {
  content: ""; width: 3px; height: 30px; border-radius: 3px;
  background: linear-gradient(var(--line), transparent);
}

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 0.85rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 30px; height: 30px; color: var(--patina); }
.brand .t { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.3rem; }
.brand .ar { font-family: "Amiri", serif; color: var(--muted); font-size: 0.95rem; }
.nav .links { display: flex; align-items: center; gap: 1.25rem; }
.nav .links a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav .links a:not(.btn):hover, .nav .links a:not(.btn)[aria-current="page"] { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; justify-content: center;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 0.7rem 1.3rem; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
/* fixed colours so the label stays high-contrast in both themes */
.btn-primary { background: #2E6B58; color: #FFFFFF; }
.btn-primary:hover { transform: translateY(-1px); background: #245648; color: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--patina); color: var(--patina); }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.92rem; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(3.5rem, 9vw, 6rem); }
.hero h1 { font-size: clamp(2.05rem, 5.2vw, 3.35rem); max-width: 19ch; }
.hero h1 em { color: var(--patina); font-style: italic; }
.hero .sub { margin: 1.5rem 0 0; font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted); max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.hero .trust {
  margin-top: 1.6rem; font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem; letter-spacing: 0.04em; color: var(--faint);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; align-items: center; }
.hero-mark {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--patina);
}
.hero-mark svg { width: 54%; height: 54%; }
.hero-mark .keystone { transform: translateY(-5px); animation: seat .55s cubic-bezier(.2,.9,.3,1) .35s both; }
@keyframes seat { to { transform: translateY(0); } }

/* ---------- sub-page header ---------- */
.pagehead { padding-top: clamp(2.75rem, 7vw, 4.5rem); padding-bottom: 0; }
.pagehead h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 20ch; }
.pagehead .lead { margin: 1.1rem 0 0; color: var(--muted); font-size: 1.05rem; max-width: 54ch; }

/* ---------- section head ---------- */
.shead { font-size: clamp(1.5rem, 3.6vw, 2rem); margin-bottom: 0.4rem; }
.sintro { color: var(--muted); max-width: 54ch; margin: 0 0 1.75rem; }

/* ---------- problem ---------- */
.problem ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.problem li { display: grid; grid-template-columns: 22px 1fr; gap: 0.9rem; font-size: 1.05rem; color: var(--ink); }
.problem li svg { width: 22px; height: 22px; color: var(--patina); margin-top: 0.28rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; border-top: 3px solid var(--patina); padding: 1.5rem; }
.step .n { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--faint); }
.step h3 { font-size: 1.15rem; margin: 0.5rem 0 0.55rem; }
.step p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- tier / comparison table ---------- */
.tiers { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tiers th, .tiers td { text-align: left; padding: 0.8rem 0.6rem; border-bottom: 1px solid var(--line); }
.tiers thead th { font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 500; }
.tiers td.c, .tiers th.c { text-align: center; width: 6rem; }
.tiers tbody tr:hover { background: var(--sunk); }
.yes { color: var(--patina); font-weight: 700; }
.no { color: var(--faint); }
.opt { font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; color: var(--brass); }
.tiers caption { caption-side: bottom; text-align: left; margin-top: 0.9rem; font-size: 0.84rem; color: var(--muted); }
.table-scroll { overflow-x: auto; }

/* ---------- billing toggle ---------- */
.billing { display: inline-flex; align-items: center; gap: 0.65rem; margin-top: 1.75rem; font-size: 0.92rem; color: var(--muted); }
.billing b { color: var(--ink); font-weight: 600; }
.billing .switch { position: relative; width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunk); cursor: pointer; padding: 0; flex: 0 0 auto; }
.billing .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--patina); transition: transform .16s ease; }
.billing .switch[aria-pressed="true"]::after { transform: translateX(20px); }
.billing .save { color: var(--patina); font-weight: 600; }

/* ---------- plan cards ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.25rem; align-items: stretch; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem; display: flex; flex-direction: column; gap: 0.85rem; height: 100%; }
.plan .btn { width: 100%; }
.plan.feature { border-color: var(--patina); box-shadow: 0 0 0 1px var(--patina) inset; }
.plan .badge { position: absolute; top: -0.68rem; left: 1.5rem; font-family: "IBM Plex Mono", monospace; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--patina-ink); background: var(--patina); padding: 0.2rem 0.6rem; border-radius: 999px; }
.plan .pname { font-family: "Fraunces", serif; font-weight: 500; font-size: 1.35rem; }
.plan .amt { font-size: 2rem; font-weight: 700; line-height: 1; }
.plan .amt.word { font-size: 1.4rem; }
.plan .amt .per { font-size: 0.82rem; font-weight: 400; color: var(--muted); }
.plan .amt-sub { font-size: 0.8rem; color: var(--muted); }
.plan .amt-sub.trial { color: var(--patina); font-weight: 600; margin-top: 0.15rem; }
.plan ul { list-style: none; margin: 0.3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 0.6rem; font-size: 0.9rem; color: var(--ink); }
.plan li svg { width: 16px; height: 16px; color: var(--patina); margin-top: 0.28rem; }
.plan .btn { margin-top: 0.4rem; }

/* ---------- honesty ---------- */
.honesty { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.honesty .wrap { display: grid; grid-template-columns: 1fr 150px; gap: 2.5rem; align-items: center; }
.honesty h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin-bottom: 0.75rem; }
.honesty p { margin: 0.75rem 0 0; color: var(--muted); max-width: 52ch; }
.honesty p strong { color: var(--ink); font-weight: 600; }
.honesty .alertmark { border: 1px solid var(--line); border-radius: 8px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--alert); background: var(--bg); }
.honesty .alertmark svg { width: 56%; height: 56%; }

/* ---------- privacy ---------- */
.privacy dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
.privacy dt { font-family: "Fraunces", serif; font-weight: 500; font-size: 1.1rem; margin-bottom: 0.3rem; }
.privacy dd { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- compact pricing (home) ---------- */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.price.feature { border-color: var(--patina); box-shadow: 0 0 0 1px var(--patina) inset; }
.price .name { font-family: "Fraunces", serif; font-weight: 500; font-size: 1.2rem; }
.price .amt { font-size: 1.5rem; font-weight: 700; }
.price .amt span { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.price .desc { font-size: 0.88rem; color: var(--muted); flex: 1; }
.price .btn { margin-top: 0.4rem; }
.prices-note { margin-top: 1.1rem; font-size: 0.85rem; color: var(--muted); }
.prices-note a { font-weight: 600; }

/* ---------- faq ---------- */
.faq { max-width: 680px; }
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; gap: 1.5rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--patina); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.92rem; max-width: 60ch; }

/* ---------- final cta ---------- */
.final { text-align: center; }
.final .card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: clamp(2rem, 6vw, 3.25rem);
  max-width: 620px; margin: 0 auto; position: relative;
}
.final .card::before {
  content: ""; position: absolute; left: 50%; top: -1px; width: 44%; height: 26px;
  border: 1px solid var(--line); border-bottom: none; border-radius: 999px 999px 0 0;
  transform: translate(-50%, -100%); background: var(--surface);
}
.final h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.final p { color: var(--muted); margin: 0.85rem auto 1.75rem; max-width: 44ch; }

/* ---------- notify form ---------- */
.nform { display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }
.nform label { font-size: 0.82rem; font-weight: 600; color: var(--ink); display: block; margin-bottom: 0.3rem; }
.nform input[type=email] {
  width: 100%; font: inherit; padding: 0.7rem 0.9rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.nform .choices { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nform .choices label {
  font-size: 0.85rem; font-weight: 500; margin: 0; padding: 0.4rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--muted);
}
.nform .choices input { position: absolute; opacity: 0; pointer-events: none; }
.nform .choices input:checked + span { color: var(--patina); }
.nform .choices label:has(input:checked) { border-color: var(--patina); background: color-mix(in srgb, var(--patina) 10%, transparent); }
.nform .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nform .fieldset { border: 0; padding: 0; margin: 0; }
.nform button { width: 100%; }
.nform .warn {
  font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: var(--alert);
  border: 1px dashed var(--alert); border-radius: 6px; padding: 0.5rem 0.7rem;
}
.nform .done { text-align: center; padding: 1rem 0; }
.nform .done p { color: var(--ink); font-weight: 500; margin: 0.5rem 0 0; }
.nform .done .sig { font-style: italic; color: var(--muted); font-weight: 400; font-family: "Fraunces", serif; }

/* ---------- dialog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 12px; padding: 0; max-width: 460px; width: calc(100% - 2rem);
  background: var(--surface); color: var(--ink); position: relative;
}
dialog::backdrop { background: rgba(12, 11, 8, 0.62); backdrop-filter: blur(2px); }
dialog .dwrap { padding: 1.75rem; }
dialog h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
dialog .lead { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.25rem; }
dialog .x { position: absolute; top: 0.75rem; right: 0.9rem; background: none; border: 0; font-size: 1.4rem; color: var(--muted); cursor: pointer; line-height: 1; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); background: var(--surface); }
footer .wrap { padding-block: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.watch {
  font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--alert);
  border-radius: 6px; padding: 0.7rem 0.9rem; max-width: 420px;
}
.watch .tag { color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.64rem; display: block; margin-bottom: 0.2rem; }
footer .cols { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: baseline; }
footer a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
footer a:hover { color: var(--patina); }
footer .fine { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: var(--faint); }

/* ---------- legal / long-form pages ---------- */
.legal { max-width: 720px; }
.updated {
  font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.08em; margin: 0.9rem 0 0;
}
.legal h2 {
  font-size: clamp(1.2rem, 2.8vw, 1.5rem); margin: 2.5rem 0 0.6rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal h3 { font-size: 1rem; margin: 1.5rem 0 0.4rem; }
.legal p, .legal li { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.legal p { margin: 0.75rem 0; max-width: 68ch; }
.legal ul, .legal ol { margin: 0.75rem 0; padding-left: 1.3rem; max-width: 68ch; }
.legal li { margin: 0.35rem 0; }
.legal a { color: var(--patina); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal .note {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--patina);
  border-radius: 6px; padding: 0.9rem 1.1rem; margin: 1.25rem 0;
}
.legal .note p { margin: 0.35rem 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.legal th, .legal td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink); font-weight: 600; }
.legal td { color: var(--muted); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mark .keystone { animation: none; transform: none; }
  .billing .switch::after { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 780px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { max-width: 260px; }
  .steps { grid-template-columns: 1fr; }
  .prices { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .privacy dl { grid-template-columns: 1fr; }
  .honesty .wrap { grid-template-columns: 1fr; }
  .honesty .alertmark { max-width: 140px; }
  .nform .row { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .brand .ar { display: none; }
  .nav .links { gap: 0.9rem; }
}
