:root {
  --bg: #f4f3ee;
  --surface: #fbfaf7;
  --paper: #ffffff;
  --ink: #15140f;
  --ink-2: #3a3933;
  --muted: #74726a;
  --line: #e3e1d9;
  --line-strong: #cfccc1;
  --accent: #1e3a2b;
  --accent-ink: #f4f3ee;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 1px rgba(21, 20, 15, .04), 0 12px 32px -12px rgba(21, 20, 15, .14);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--ink); color: var(--bg); }

.container { width: min(1160px, 100% - 48px); margin-inline: auto; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 243, 238, .86);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn { color: var(--bg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg);
  font: 500 14px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.nav-links a.btn-ghost { color: var(--ink); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Landing ---------- */
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 7vw, 92px); line-height: .98; letter-spacing: -.02em; margin: 18px 0 0;
}
.display em { font-style: italic; color: var(--accent); }
.lede { font-size: 18px; color: var(--ink-2); max-width: 520px; margin: 24px 0 0; }

.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero-cta { display: flex; gap: 12px; align-items: center; margin-top: 36px; flex-wrap: wrap; }
.hero-note { font-size: 13px; color: var(--muted); margin-top: 14px; }

.hero-visual { position: relative; max-width: 500px; justify-self: end; width: 100%; }
.hero-visual .sheet-fit { transform: rotate(1.5deg); }
.sheet-fit { position: relative; width: 100%; }
.sheet-fit > .sheet { position: absolute; top: 0; left: 0; }
.hero-visual .sheet-back {
  position: absolute; inset: 18px -14px -18px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; transform: rotate(-2deg);
}

.proof { padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 72px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.proof div { font-size: 13px; color: var(--muted); }
.proof strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.1; color: var(--ink); letter-spacing: -.01em; }

.section { padding: 112px 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 56px; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -.015em; margin: 12px 0 0; }
.section-head p { color: var(--ink-2); margin: 0; max-width: 440px; justify-self: end; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.feature { padding: 32px 32px 40px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.feature:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.feature:nth-child(3n) { padding-right: 0; }
.feature .num { font-family: var(--serif); font-size: 15px; color: var(--muted); }
.feature h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 28px 0 8px; }
.feature p { color: var(--ink-2); margin: 0; font-size: 14.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step::before { counter-increment: s; content: "0" counter(s); font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--accent); }
.step h3 { margin: 24px 0 6px; font-size: 16px; font-weight: 600; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 880px; }
.plan { border: 1px solid var(--line); border-radius: 14px; padding: 36px; background: var(--surface); display: flex; flex-direction: column; }
.plan.featured { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.plan.featured .muted, .plan.featured li { color: #c9c7bd; }
.plan.featured .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.plan-name { font-size: 14px; font-weight: 600; }
.price { font-family: var(--serif); font-size: 64px; line-height: 1; margin: 20px 0 4px; letter-spacing: -.02em; }
.price small { font-family: var(--sans); font-size: 14px; letter-spacing: 0; opacity: .7; }
.plan ul { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); flex: 1; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ""; flex: none; width: 14px; height: 1px; background: currentColor; margin-top: 11px; opacity: .6; }
.muted { color: var(--muted); }

.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 500; font-size: 16px; display: flex; justify-content: space-between; gap: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; color: var(--ink-2); max-width: 640px; }

.cta-band { background: var(--accent); color: var(--accent-ink); border-radius: 18px; padding: 72px 56px; display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.cta-band .h2 { margin: 0; max-width: 560px; }
.cta-band .btn { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }

.footer { padding: 48px 0 56px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer nav { display: flex; gap: 24px; }
.footer nav { flex-wrap: wrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.notice { padding: 12px 16px; border: 1px solid #b88e44; border-radius: 8px; background: #fff7e7; color: #60441b; font-size: 13px; overflow-wrap: anywhere; }
.notice-wrap { padding: 0 16px; flex: none; }
.notice-wrap .notice { margin: 8px 0; }
.notice-wrap:has([hidden]) .dismiss { display: none; }
.dismiss { font: inherit; margin-bottom: 8px; cursor: pointer; }
.legal-data { display: grid; grid-template-columns: minmax(100px, 1fr) 2fr; gap: 12px; }
.legal-data dt { font-weight: 600; }
.legal-data dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }

.prose { max-width: 680px; padding: 72px 0 96px; }
.prose h1 { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1; margin: 0 0 32px; letter-spacing: -.015em; }
.prose h2 { font-size: 17px; margin: 40px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }

.reveal { opacity: 1; transform: none; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Document (shared by landing + editor) ---------- */
.sheet {
  --doc-accent: #1e3a2b;
  background: var(--paper); color: #17160f;
  border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow);
  width: 794px; min-height: 1123px;
  padding: 60px 64px;
  font-size: 12.5px; line-height: 1.5;
  transform-origin: top left;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  font-family: var(--sans);
}
.doc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.doc-logo { max-height: 4.2em; max-width: 14em; object-fit: contain; margin-bottom: 1.2em; }
.doc-title { font-family: var(--serif); font-weight: 400; font-size: 3.4em; line-height: 1; letter-spacing: -.01em; margin: 0; }
.doc-meta { text-align: right; color: #6a685f; display: grid; gap: .2em; min-width: 0; overflow-wrap: anywhere; }
.doc-meta b { color: #17160f; font-weight: 500; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 2em; margin: 3.2em 0 2.6em; }
.doc-label { font-size: .82em; letter-spacing: .12em; text-transform: uppercase; color: #8a887e; margin-bottom: .6em; }
.doc-party { white-space: pre-line; color: #3a3933; }
.doc-title, .doc-party, .doc-notes, .doc-foot, .doc-table .desc { overflow-wrap: anywhere; min-width: 0; }
.doc-title { max-width: 390px; }
.doc-table { table-layout: fixed; }
.doc-table th:first-child { width: 43%; }
.doc-table .r { white-space: normal; overflow-wrap: anywhere; }
.doc-party strong { color: #17160f; font-weight: 600; display: block; }
.doc-table { width: 100%; border-collapse: collapse; }
.doc-table th { text-align: left; font-weight: 500; font-size: .82em; letter-spacing: .12em; text-transform: uppercase; color: #8a887e; padding: 0 0 .9em; border-bottom: 1px solid #17160f; }
.doc-table td { padding: 1em 0; border-bottom: 1px solid #ebe9e2; vertical-align: top; }
.doc-table .r { text-align: right; padding-left: 1em; white-space: normal; overflow-wrap: anywhere; }
.doc-table td.desc { padding-right: 1.5em; }
.doc-table td.desc small { display: block; color: #8a887e; font-size: .92em; margin-top: .15em; white-space: pre-line; }
.doc-totals { margin-left: auto; width: 46%; margin-top: 1.6em; display: grid; gap: .55em; }
.doc-totals div { display: flex; justify-content: space-between; gap: 1em; color: #3a3933; }
.doc-totals .grand { border-top: 1px solid #17160f; padding-top: .9em; margin-top: .4em; color: #17160f; font-size: 1.35em; font-weight: 600; }
.doc-notes { margin-top: auto; padding-top: 2.4em; display: grid; grid-template-columns: 1fr 1fr; gap: 2em; color: #3a3933; white-space: pre-line; }
.doc-foot { margin-top: 2em; padding-top: 1em; border-top: 1px solid #ebe9e2; display: flex; justify-content: space-between; gap: 1em; color: #8a887e; font-size: .9em; }
.doc-brand { color: #8a887e; text-decoration: none; }

/* Template: Modern */
.sheet.t-modern { padding: 0; }
.sheet.t-modern .doc-band { background: var(--doc-accent); color: var(--doc-accent-ink, #fff); padding: 60px 64px 44px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet.t-modern .doc-band .doc-meta, .sheet.t-modern .doc-band .doc-meta b { color: inherit; }
.sheet.t-modern .doc-body { padding: 0 64px 60px; display: flex; flex-direction: column; flex: 1; }
.sheet.t-modern .doc-table th { border-bottom-color: var(--doc-accent); color: var(--ink-2); }
.sheet.t-modern .doc-totals .grand { color: var(--ink); border-top-color: var(--doc-accent); }
.sheet.t-modern .doc-title { font-family: var(--sans); font-weight: 600; font-size: 2.6em; letter-spacing: -.03em; }

/* Template: Mono */
.sheet.t-mono { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; font-size: 11.5px; }
.sheet.t-mono .doc-title { font-family: inherit; font-size: 2.2em; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.sheet.t-mono .doc-table th { border-bottom: 1px dashed #17160f; }
.sheet.t-mono .doc-table td { border-bottom: 1px dashed #dedbd2; }
.sheet.t-mono .doc-totals .grand { border-top-style: dashed; color: var(--ink); }
.sheet.t-mono .doc-top { border-bottom: 2px solid var(--doc-accent); padding-bottom: 1.6em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; gap: 56px; }
  .hero-visual { justify-self: center; max-width: 440px; }
  .proof { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .section-head p { justify-self: start; }
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(3n + 1), .feature:nth-child(3n) { padding: 28px 0; border-left: 0; }
  .steps, .pricing { grid-template-columns: 1fr; }
  .nav-links .hide-sm { display: none; }
  .cta-band { padding: 48px 28px; }
}
