:root {
  --paper: #F7F0E6;
  --paper-strong: #FFFDF8;
  --paper-soft: #F2E5D2;
  --ink: #2D3436;
  --muted: #636E72;
  --quiet: #7B807F;
  --navy: #08152C;
  --forest: #536A4D;
  --brass: #B8956A;
  --brass-dark: #8D6B3C;
  --line: #E4D4BD;
  --white: #FFFFFF;
  --error: #A73E2B;
  --success: #356B45;
  --shadow: 0 24px 80px rgba(74, 54, 27, .14);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, .76), rgba(247, 240, 230, 1) 420px),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.62;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 240, 230, .9);
  border-bottom: 1px solid rgba(228, 212, 189, .82);
  backdrop-filter: blur(18px);
}

.nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font: 700 1.38rem var(--serif);
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(8, 21, 44, .14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 650;
}

.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--navy); }

.btn {
  appearance: none;
  border: 0;
  min-height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  font: 750 .95rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 14px 34px rgba(8, 21, 44, .18);
}

.btn-primary:hover { background: #11264A; }

.btn-ghost {
  background: rgba(255, 253, 248, .62);
  color: var(--navy);
  border: 1.5px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--brass-dark);
  background: rgba(255, 253, 248, .9);
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0 62px;
  border-bottom: 1px solid var(--line);
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, .98fr);
  gap: 52px;
  align-items: start;
}

.eyebrow {
  color: var(--brass-dark);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 18px;
}

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(2.45rem, 5vw, 4.2rem);
  max-width: 760px;
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.8rem);
  margin-bottom: 18px;
}

h3 {
  font-size: 1.22rem;
  margin-bottom: 10px;
}

.lede {
  color: var(--muted);
  font-size: 1.13rem;
  max-width: 680px;
  margin: 20px 0 26px;
}

.hero-bullets,
.included-list {
  display: grid;
  gap: 12px;
  color: var(--ink);
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.hero-bullets li,
.included-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
}

.hero-bullets li::before,
.included-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--forest);
  margin-top: 10px;
  box-shadow: 0 0 0 6px rgba(83, 106, 77, .12);
}

.trust-line {
  color: var(--quiet);
  font-size: .92rem;
  margin-top: 16px;
}

.builder-shell,
.preview-card,
.panel,
.scenario-card,
.success-card {
  background: rgba(255, 253, 248, .94);
  border: 1px solid rgba(228, 212, 189, .96);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.builder-shell {
  position: sticky;
  top: 94px;
  padding: 26px;
}

.builder-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.builder-step-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.step-count,
.builder-meta [data-step-count],
.scenario-badge {
  color: var(--brass-dark);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 800;
}

.builder-time-note {
  color: var(--quiet);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scenario-badge {
  color: var(--quiet);
  text-align: right;
}

.progress-track {
  height: 4px;
  background: var(--paper-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 16.66%;
  background: var(--forest);
  transition: width .35s var(--ease);
}

.builder-step { display: none; }

.builder-step.active {
  display: block;
  animation: rise .32s var(--ease);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.builder-step h2 {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.12rem, 2vw, 1.32rem);
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.helper {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: .95rem;
}

label {
  display: block;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 16px;
  font: 500 1rem/1.55 var(--sans);
}

textarea::placeholder { color: #8B8175; }

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

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.prompt-chip {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .84);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 11px;
  font: 700 .82rem var(--sans);
  cursor: pointer;
}

.prompt-chip:hover,
.prompt-chip:focus-visible,
.prompt-chip.selected {
  border-color: var(--forest);
  background: rgba(83, 106, 77, .1);
}

.prompt-chip:disabled {
  cursor: default;
  opacity: .78;
}

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 14px 15px;
  font: 700 .96rem var(--sans);
  cursor: pointer;
}

.choice:hover,
.choice.selected {
  border-color: var(--forest);
  background: rgba(83, 106, 77, .1);
  color: var(--navy);
}

.risk-grid .choice,
.goal-grid .choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
}

.risk-grid .choice::before,
.goal-grid .choice::before {
  content: "";
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.6px solid #B9A98F;
  background: var(--paper-strong);
  margin-top: 2px;
}

.risk-grid .choice.selected::before,
.goal-grid .choice.selected::before {
  background:
    linear-gradient(135deg, transparent 44%, var(--white) 45%, var(--white) 55%, transparent 56%),
    linear-gradient(45deg, transparent 36%, var(--white) 37%, var(--white) 49%, transparent 50%),
    var(--forest);
  border-color: var(--forest);
}

.builder-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.error {
  min-height: 24px;
  color: var(--error);
  font-size: .9rem;
  margin-top: 14px;
}

.privacy-note,
.guardrail {
  color: var(--quiet);
  font-size: .84rem;
  margin-top: 18px;
}

.guardrail {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.preview-card {
  display: none;
  padding: 28px;
  margin-top: 28px;
  color: var(--ink);
}

.preview-card.visible { display: block; }

.preview-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.preview-section p { margin: 0; color: var(--muted); }

.preview-section h3 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: .84rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brass-dark);
  margin-bottom: 8px;
}

.locked-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.locked-list li::before {
  content: "Locked";
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(83, 106, 77, .1);
  color: var(--forest);
  font-weight: 800;
  font-size: .72rem;
  padding: 2px 8px;
  margin-right: 9px;
}

.preview-card .btn-primary { margin-top: 20px; }

.checkout-microcopy,
.unlock-copy {
  color: var(--quiet);
  font-size: .88rem;
  line-height: 1.5;
  margin: 12px 0 0;
}

.unlock-copy {
  color: var(--muted);
  margin-top: 18px;
}

.section { padding: 64px 0; }

.section-lede {
  color: var(--muted);
  max-width: 680px;
  margin: -6px 0 0;
}

.content-grid,
.trust-grid,
.pdf-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.panel { padding: 34px; }
.panel p, .panel li { color: var(--muted); }

.trust-section {
  background: rgba(255, 253, 248, .42);
  border-bottom: 1px solid var(--line);
}

.trust-grid {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 42px;
}

.trust-grid article p,
.pdf-preview-grid p {
  color: var(--muted);
  max-width: 620px;
}

.trust-points {
  display: grid;
  gap: 14px;
}

.trust-points div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  padding: 18px;
}

.trust-points strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}

.trust-points p {
  color: var(--muted);
  margin: 0;
}

.question-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  padding: 34px;
  box-shadow: var(--shadow);
}

.question-panel > p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.question-list p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 229, 210, .32);
  color: var(--navy);
  padding: 14px;
  font-weight: 750;
}

.pdf-preview-grid {
  align-items: center;
  gap: 44px;
}

.pdf-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  padding: 12px;
  box-shadow: var(--shadow);
}

.pdf-figure img {
  width: 100%;
  border-radius: 6px;
}

.pdf-figure figcaption {
  color: var(--quiet);
  font-size: .82rem;
  line-height: 1.45;
  margin-top: 10px;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.scenario-card {
  padding: 22px;
  text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.scenario-card:hover {
  transform: translateY(-3px);
  border-color: rgba(83, 106, 77, .5);
  box-shadow: 0 22px 58px rgba(74, 54, 27, .12);
}

.scenario-card span {
  color: var(--brass-dark);
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.scenario-card h3 {
  margin-top: 10px;
  font-size: 1.2rem;
}

.scenario-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.sample-section {
  background: rgba(255, 253, 248, .38);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.sample-card,
.sample-callout,
.sample-scenario-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.sample-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 22px;
}

.sample-card > span {
  color: var(--brass-dark);
  font-weight: 800;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.sample-card h3 {
  margin-top: 10px;
}

.sample-card p,
.sample-scenario-card p {
  color: var(--muted);
}

.sample-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--muted);
  margin: 10px 0 20px;
}

.sample-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.sample-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
}

.sample-callout h2 {
  margin-bottom: 8px;
}

.sample-callout p {
  color: var(--muted);
  margin: 0;
}

.sample-hero {
  padding-bottom: 58px;
}

.sample-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, .72fr);
  gap: 42px;
  align-items: start;
}

.sample-microcopy,
.sample-after-preview {
  color: var(--quiet);
  font-size: .9rem;
}

.sample-after-preview a {
  color: var(--navy);
  font-weight: 800;
}

.hero-actions,
.sample-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.sample-scenario-card {
  padding: 26px;
}

.sample-scenario-card dl {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.sample-scenario-card dl div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.sample-scenario-card dt {
  color: var(--brass-dark);
  font-weight: 800;
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sample-scenario-card dd {
  color: var(--ink);
  margin: 3px 0 0;
  font-weight: 700;
}

.sample-section-heading {
  justify-content: space-between;
  margin-bottom: 18px;
}

.sample-pdf-viewer {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.sample-preview-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  padding: 22px;
  box-shadow: var(--shadow);
}

.sample-preview-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.sample-preview-column h3 {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.35;
  color: var(--navy);
}

.sample-preview-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 229, 210, .24);
  padding: 14px;
}

.sample-preview-block strong {
  display: block;
  color: var(--brass-dark);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sample-preview-block p {
  color: var(--muted);
  margin: 0;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.faq p { color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  color: var(--muted);
  font-size: .9rem;
  background: var(--paper-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr .9fr .9fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 12px;
}

footer h3 {
  font: 800 .78rem var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass-dark);
  margin: 0 0 12px;
}

footer a:not(.brand) {
  display: block;
  color: var(--ink);
  text-decoration: none;
  margin: 8px 0;
  font-weight: 650;
}

footer p {
  margin: 0;
  max-width: 420px;
}

.success-wrap {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 80px 24px;
}

.success-card {
  max-width: 680px;
  padding: 36px;
  text-align: center;
}

.success-card p { color: var(--muted); }

@media (max-width: 960px) {
  .tool-hero,
  .sample-detail-hero,
  .content-grid,
  .trust-grid,
  .pdf-preview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .builder-shell { position: static; }
  .scenario-grid,
  .sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sample-callout { align-items: flex-start; flex-direction: column; }
  .sample-preview-panel { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 32px, 1160px); }
  .nav-links a:not(.btn) { display: none; }
  .hero { padding-top: 54px; }
  .builder-shell,
  .panel,
  .preview-card,
  .success-card { padding: 20px; }
  .question-list { grid-template-columns: 1fr; }
  .builder-actions { flex-direction: column-reverse; }
  .builder-actions .btn { width: 100%; }
  .scenario-grid,
  .sample-grid { grid-template-columns: 1fr; }
  .sample-pdf-viewer { min-height: 520px; }
  .sample-card-actions .btn,
  .hero-actions .btn,
  .sample-section-heading .btn { width: 100%; }
}
