:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #1d1b18;
  --ink-2: #5b5750;
  --line: #e4e0d8;
  --brand: #1a7f5a;
  --brand-ink: #ffffff;
  --brand-soft: #e3f3ec;
  --accent: #d9822b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --max: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141412;
    --surface: #1d1c1a;
    --surface-2: #252421;
    --ink: #f1efe9;
    --ink-2: #aaa59b;
    --line: #34322e;
    --brand: #3fbf8c;
    --brand-ink: #0d1f17;
    --brand-soft: #1b3229;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-2); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.center { text-align: center; }
.lede { font-size: 1.2rem; max-width: 640px; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.logo-mark { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.nav-links .btn-primary { color: var(--brand-ink); }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 16px; }
.hero-note { font-size: .9rem; color: var(--ink-2); }

/* Hero visual: sheet -> email with PDF */
.demo { position: relative; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.sheet { padding: 0; overflow: hidden; font-size: .82rem; }
.sheet-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sheet-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.sheet th { color: var(--ink-2); font-weight: 600; background: var(--surface-2); }
.sheet td:last-child { color: var(--brand); font-weight: 600; }
.sheet tr.hl td { background: var(--brand-soft); }
.mail {
  position: relative; margin: -18px 0 0 40px; padding: 18px 20px;
}
@media (max-width: 520px) { .mail { margin-left: 12px; } }
.mail .meta { font-size: .82rem; color: var(--ink-2); margin-bottom: 6px; }
.mail .subj { font-weight: 700; margin-bottom: 8px; }
.mail p { font-size: .92rem; margin-bottom: 12px; }
.attach {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); max-width: 300px;
}
.attach .pdf { width: 34px; height: 40px; border-radius: 4px; background: #d93a2b; color: #fff; font-size: .62rem; font-weight: 800; display: grid; place-items: center; }
.attach b { display: block; font-size: .88rem; }
.attach small { color: var(--ink-2); font-size: .78rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }

/* Logos / trust strip */
.strip { padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: center; color: var(--ink-2); font-size: .95rem; }
.strip b { color: var(--ink); }

/* Use cases */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 28px 0 32px; }
.tab {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.usecase { display: none; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.usecase.active { display: grid; }
@media (max-width: 800px) { .usecase.active { grid-template-columns: 1fr; } }
.usecase ul { padding-left: 1.1em; color: var(--ink-2); }
.usecase li { margin-bottom: 6px; }
.doc-preview { padding: 28px; text-align: center; }
.doc-preview .doc-title { font-family: Georgia, serif; font-size: 1.5rem; color: var(--ink); margin-bottom: 4px; }
.doc-preview .ph { font-family: ui-monospace, Menlo, monospace; font-size: .9rem; background: #fff3c4; color: #6b4f00; padding: 1px 6px; border-radius: 4px; }
@media (prefers-color-scheme: dark) { .doc-preview .ph { background: #4a3d10; color: #ffe08a; } }
.doc-preview p { margin: 10px 0; }
.doc-line { height: 8px; border-radius: 4px; background: var(--surface-2); margin: 8px auto; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 24px; }
.step .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 14px; }
.step p { font-size: .95rem; margin: 0; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; color: var(--ink); }

/* Features */
.alt { background: var(--surface-2); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { padding: 24px; }
.feature .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature p { font-size: .95rem; margin: 0; }

/* Pricing */
.billing-toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin: 20px 0 36px; }
.billing-toggle button { border: 0; background: transparent; color: var(--ink-2); padding: 8px 16px; border-radius: 999px; font: inherit; font-size: .92rem; cursor: pointer; }
.billing-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.billing-toggle .save { color: var(--accent); font-weight: 700; margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }
.plan { padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); position: relative; }
.plan.featured::before {
  content: "Most popular"; position: absolute; top: -12px; left: 24px;
  background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.plan h3 { margin-bottom: 4px; }
.price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.price small { font-size: 1rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.price-note { font-size: .85rem; min-height: 1.4em; margin-bottom: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; font-size: .95rem; color: var(--ink-2); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 12px; height: 7px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.plan li.no::before { border: 0; width: 10px; height: 2px; background: var(--line); transform: none; top: 15px; }
.plan .btn { justify-content: center; }
.fineprint { font-size: .85rem; margin-top: 24px; }

/* Trust */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .trust-grid { grid-template-columns: 1fr; } }
.perm { padding: 0; overflow: hidden; }
.perm-row { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.perm-row:last-child { border-bottom: 0; }
.perm-row .ic { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: .9rem; font-weight: 700; }
.perm-row b { display: block; font-size: .95rem; }
.perm-row span { font-size: .88rem; color: var(--ink-2); }
.perm-row.never .ic { background: #fde8e6; color: #c0392b; }
@media (prefers-color-scheme: dark) { .perm-row.never .ic { background: #3a1d1a; color: #ff8a7a; } }

/* FAQ */
.faq { max-width: 760px; margin: 40px auto 0; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ink-2); font-weight: 400; font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; }

/* CTA + footer */
.cta { text-align: center; }
.cta .card { padding: 56px 24px; background: var(--ink); border: 0; }
.cta h2 { color: var(--bg); }
.cta p { color: color-mix(in srgb, var(--bg) 75%, var(--ink)); }
footer { padding: 40px 0; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Legal pages */
.legal { max-width: 760px; padding: 56px 20px 80px; }
.legal h1 { font-size: 2.4rem; }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal p, .legal li { color: var(--ink); }
.legal li { margin-bottom: 6px; }
.legal .updated { color: var(--ink-2); }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 12px 0 20px; }
.legal th, .legal td { text-align: left; padding: 10px; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--surface-2); }
.callout { background: var(--brand-soft); border-radius: 10px; padding: 16px 18px; margin: 16px 0; }
.callout p { color: var(--ink); margin: 0; }

/* Upgrade page */
.email-field { max-width: 420px; margin: 28px auto 8px; text-align: left; }
.email-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.email-field input { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.email-field input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
#checkoutMsg { max-width: 420px; margin: 12px auto; text-align: left; }
.callout-error { background: #fde8e6; }
.callout-error p, .callout-error { color: #b3261e; }
.plans-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
@media (max-width: 900px) { .plans-2 { grid-template-columns: 1fr; } }
.plan button.btn { justify-content: center; width: 100%; font: inherit; font-weight: 600; }
.plan button.btn:disabled { opacity: .5; cursor: default; }
.plan.chosen { border: 2px solid var(--brand); }
.offer { max-width: 560px; margin: 16px auto 0; padding: 12px 16px; border-radius: 10px; background: #fff3d6; color: #6b4a00; font-weight: 600; }
@media (prefers-color-scheme: dark) { .offer { background: #3a2f12; color: #ffd98a; } }
.price-note s { opacity: .7; }
.code-field { max-width: 420px; margin: 24px auto 0; text-align: left; }
.code-field summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.code-field input { width: 100%; font: inherit; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-transform: uppercase; }
.hint-small { font-size: .85rem; margin: 6px 0 0; }
.announce { background: var(--ink); color: var(--bg); text-align: center; font-size: .9rem; padding: 9px 16px; }
.announce a { color: #ffd98a; font-weight: 700; margin-left: 6px; white-space: nowrap; }
.offer a { color: inherit; margin-left: 4px; white-space: nowrap; }

/* Templates page */
.hero-small { padding: 64px 0 40px; }
.hero-small h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.tpl-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.tpl-jump a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .92rem; }
.tpl-jump a:hover { border-color: var(--brand); }
.tpl { padding: 64px 0; scroll-margin-top: 72px; }
.tpl h2 { max-width: 820px; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-top: 28px; }
@media (max-width: 860px) { .tpl-grid { grid-template-columns: 1fr; } }
.tpl-preview { margin: 0; }
.tpl-preview figcaption { margin-top: 10px; font-size: .9rem; color: var(--ink-2); }
.page { background: #fff; color: #202124; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 6px;
  aspect-ratio: 210 / 297; padding: 9% 9%; font-family: Arial, sans-serif; font-size: clamp(9px, 1.1vw, 13px); overflow: hidden; }
.page.landscape { aspect-ratio: 297 / 210; padding: 6% 8%; border: 10px double #1a7f5a; }
.page.email-only { aspect-ratio: auto; padding: 32px; }
.page p { margin: .55em 0; color: #202124; }
.page .center { text-align: center; }
.page .green { color: #1a7f5a; }
.page .strong { font-weight: 700; }
.page .italic { font-style: italic; }
.page .d-title { font-size: 2.1em; font-weight: 800; letter-spacing: .02em; margin-bottom: .8em; }
.page .d-sub { font-size: 1.5em; font-weight: 700; }
.page .d-name { font-size: 2.4em; font-weight: 700; font-family: Georgia, serif; margin: .3em 0; }
.page .d-muted { color: #5f6368; }
.page .d-small { font-size: .85em; color: #5f6368; }
.page .d-sign { font-weight: 700; margin-top: 2.2em; }
.tpl-info h3 { margin-top: 22px; }
.tpl-info h3:first-child { margin-top: 0; }
.mailbox { padding: 16px 18px; }
.mailbox .meta { font-size: .85rem; color: var(--ink-2); }
.mailbox .subj { font-weight: 700; margin: 4px 0 8px; }
.mailbox .mailbody p, .mailbox .mailbody li { color: var(--ink-2); font-size: .95rem; margin: 0 0 8px; }
.mailbox .mailbody ul { padding-left: 1.2em; margin: 0 0 8px; }
.mailbox .mailbody a { color: var(--brand); }
.sheet-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mini-sheet { border-collapse: collapse; font-size: .85rem; min-width: 100%; }
.mini-sheet th, .mini-sheet td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.mini-sheet th { background: var(--surface-2); color: var(--ink-2); }
.steps-list { padding-left: 1.2em; color: var(--ink-2); margin-bottom: 20px; }
.steps-list li { margin-bottom: 6px; }
.tpl-grid > * { min-width: 0; } /* let the sample sheet scroll inside its box on phones */
.page.landscape { font-size: clamp(6px, 0.78vw, 10.5px); }
.page.landscape .d-title { margin-bottom: .4em; }
.page.landscape .d-sign { margin-top: 1.6em; }
@media (max-width: 860px) { .page.landscape { font-size: clamp(5.5px, 1.9vw, 11px); } }

/* Template gallery and template pages */
.tcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .tcard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tcard-grid { grid-template-columns: 1fr; } }
.tcard-web { display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden; transition: transform .12s ease, border-color .12s ease; }
.tcard-web:hover { transform: translateY(-2px); border-color: var(--brand); }
.thumb-wrap { background: var(--surface-2); padding: 18px; display: flex; justify-content: center; align-items: center; height: 230px; }
.page.thumb { height: 100%; width: auto; font-size: 5px; padding: 8% 9%; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.page.thumb.landscape { height: auto; width: 100%; border-width: 5px; font-size: 5px; }
.page.thumb.email-only { font-size: 9px; height: auto; }
.tcard-body { padding: 18px 20px 22px; }
.tcard-body .eyebrow { font-size: .72rem; margin-bottom: 6px; }
.tcard-body p { font-size: .95rem; margin: 6px 0 10px; }
.tcard-link { color: var(--brand); font-weight: 600; }
.h3 { font-size: 1.15rem; letter-spacing: -0.01em; margin: 0 0 .5em; }
.tpl-h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 900px; }
.crumbs { font-size: .9rem; margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.tpl-info .h3 { margin-top: 22px; }
.tpl-info .h3:first-child { margin-top: 0; }
.tpl-more { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .tpl-more { grid-template-columns: 1fr; } }
.tips { padding-left: 1.2em; color: var(--ink-2); }
.tips li { margin-bottom: 10px; }
.faq-tight { margin-top: 0; }
.others { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 20px 0 24px; }
.others .other { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; }
.others .other:hover { border-color: var(--brand); }

/* Get RowPost (before launch) */
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.btn-ghost-dark { background: transparent; color: var(--bg); border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent); }
.btn-ghost-dark:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); }
[hidden] { display: none !important; }
