:root {
  --ink: #0d1730;
  --ink-soft: #34415f;
  --paper: #f5f7fb;
  --white: #ffffff;
  --line: #ccd3e2;
  --line-dark: #25324e;
  --accent: #ff6a3d;
  --accent-dark: #d84820;
  --mint: #b9f4df;
  --blue: #2962ff;
  --shadow: 0 24px 60px rgba(13, 23, 48, 0.12);
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(rgba(13, 23, 48, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 23, 48, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--white);
  padding: .7rem 1rem;
  border-radius: 8px;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--accent);
  font-weight: 900;
}

nav { display: flex; gap: 1.4rem; }
nav a { color: var(--ink-soft); font-size: .92rem; font-weight: 700; text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--accent-dark); }

main { overflow: hidden; }

.intro {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0 3rem;
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 4rem;
  align-items: end;
}

.eyebrow, .step-label {
  margin: 0 0 .8rem;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; letter-spacing: -.045em; line-height: 1.02; }
h1 { max-width: 780px; font-size: clamp(3.2rem, 7vw, 6.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }

.lede { max-width: 670px; margin: 1.5rem 0; color: var(--ink-soft); font-size: 1.2rem; }

.proof-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.proof-row span {
  padding: .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 700;
}

.signal-card {
  position: relative;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--mint);
  transform: rotate(1.5deg);
  box-shadow: 8px 8px 0 var(--ink);
}

.signal-number { display: block; font-size: 3.3rem; font-weight: 900; letter-spacing: -.06em; }
.signal-card p { margin: .4rem 0 1.2rem; font-weight: 700; }
.signal-card a { font-size: .84rem; font-weight: 800; }

.tool-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 6rem;
  border: 1px solid var(--line-dark);
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.tool-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.2rem;
  border-bottom: 1px solid var(--line);
}

.tool-heading > p { max-width: 340px; margin: 0; color: var(--ink-soft); }
.calculator-grid { display: grid; grid-template-columns: 1.15fr .85fr; }
.input-panel, .result-panel { padding: 2.2rem; }
.input-panel { border-right: 1px solid var(--line); }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-pair.compact { margin-top: .2rem; }
.field-row { margin-bottom: 1.2rem; }
.field-row label { display: block; margin-bottom: .45rem; color: var(--ink-soft); font-size: .88rem; font-weight: 800; }

input, select, textarea {
  width: 100%;
  border: 1px solid #aab4c8;
  border-radius: 11px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input, select { min-height: 48px; padding: .7rem .85rem; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(41, 98, 255, .15); }

.input-suffix { position: relative; }
.input-suffix input { padding-right: 2.7rem; }
.input-suffix span { position: absolute; top: 50%; right: .9rem; transform: translateY(-50%); color: var(--ink-soft); font-weight: 800; }

.check-row { display: flex; gap: .75rem; align-items: flex-start; color: var(--ink-soft); font-size: .94rem; font-weight: 700; cursor: pointer; }
.check-row input { width: 20px; min-height: 20px; height: 20px; margin-top: .15rem; accent-color: var(--blue); }
.field-note { margin: .8rem 0 0; color: #66718a; font-size: .8rem; }

.result-panel { background: var(--ink); color: var(--white); }
.result-kicker { margin: 0; color: #aebbd7; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.result-total { display: block; margin: .3rem 0 1.5rem; color: var(--mint); font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -.06em; line-height: 1; }
.result-breakdown { margin: 0 0 1.6rem; }
.result-breakdown div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #31405f; }
.result-breakdown dt { color: #bdc8dd; }
.result-breakdown dd { margin: 0; font-weight: 800; }
.result-breakdown .result-grand { margin-top: .4rem; border-bottom: 0; color: var(--white); font-size: 1.08rem; }
.result-breakdown .result-grand dt { color: var(--white); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.button:hover:not([aria-disabled="true"]) { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: #1a2847; }
.button-secondary { width: 100%; border-color: #596783; background: transparent; color: var(--white); }
.button-secondary:hover { background: #182440; }
.button-accent { width: 100%; margin-top: 1.4rem; background: var(--accent); color: var(--ink); }
.button-accent:hover { background: #ff805d; }
.button[aria-disabled="true"] { cursor: not-allowed; opacity: .66; }
.copy-status { min-height: 1.3rem; margin: .55rem 0 0; color: #8fa3c9; font-size: .82rem; }

.generator { display: grid; grid-template-columns: .8fr 1.2fr; border-top: 1px solid var(--line); }
.generator-form, .message-panel { padding: 2.2rem; }
.generator-form h2 { margin-bottom: 1.5rem; font-size: clamp(1.9rem, 3vw, 2.7rem); }
.message-panel { border-left: 1px solid var(--line); background: #eef1f7; }
.message-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .7rem; color: var(--ink-soft); font-size: .85rem; font-weight: 800; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 900; cursor: pointer; }
textarea { min-height: 360px; padding: 1.2rem; resize: vertical; line-height: 1.65; }

.pack-section {
  background: var(--ink);
  color: var(--white);
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 5rem;
  align-items: center;
  padding: 6rem max(2rem, calc((100vw - 1180px) / 2));
}
.step-label.inverse { color: var(--mint); }
.pack-copy p:not(.step-label) { max-width: 680px; color: #c8d2e5; font-size: 1.08rem; }
.pack-list { margin: 2rem 0 0; padding: 0; list-style: none; }
.pack-list li { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid #2f3d59; }
.pack-list li span { color: var(--accent); font-size: 1.8rem; font-weight: 900; }
.price-card { padding: 2rem; border: 1px solid #53617d; border-radius: var(--radius); background: #182440; }
.price-card p { margin: 0; color: #c8d2e5; font-weight: 800; }
.price-card strong { display: block; margin: .4rem 0 0; font-size: 4rem; letter-spacing: -.06em; }
.price-card > span, .price-card small { display: block; color: #aebbd7; }
.price-card small { margin-top: .8rem; }
.price-card .price-reassurance { padding-top: .8rem; border-top: 1px solid #53617d; line-height: 1.5; }

.faq-section {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6rem 0 0;
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 4rem;
  align-items: start;
}
.faq-section h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.7rem); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); padding: 1.15rem 0; }
.faq-list summary { cursor: pointer; font-weight: 850; font-size: 1.05rem; }
.faq-list p { margin: .8rem 0 .25rem; color: var(--ink-soft); }

.sources-section { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 6rem 0; }
.sources-section > div:first-child { display: grid; grid-template-columns: .4fr 1fr; align-items: end; margin-bottom: 2rem; }
.source-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.source-cards article { padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.75); }
.source-cards strong { font-size: 1.1rem; }
.source-cards p { color: var(--ink-soft); }
.source-cards a { color: var(--blue); font-weight: 800; }
.legal-note { max-width: 800px; margin: 1.7rem 0 0; color: #66718a; font-size: .86rem; }

footer {
  padding: 2.5rem max(1rem, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  background: var(--white);
}
.footer-brand { font-size: .92rem; }
footer p { color: var(--ink-soft); font-size: .9rem; }
.footer-links { display: flex; gap: .5rem; color: var(--ink-soft); font-size: .82rem; }

.article-shell {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0 6rem;
}
.article-header { margin-bottom: 3rem; }
.article-header h1 { max-width: 840px; font-size: clamp(3rem, 7vw, 5.4rem); }
.article-header .lede { max-width: 760px; }
.article-meta { color: #66718a; font-size: .88rem; font-weight: 700; }
.article-body { font-size: 1.08rem; }
.article-body h2 { margin: 3.5rem 0 1rem; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.article-body h3 { margin: 2.2rem 0 .7rem; font-size: 1.35rem; }
.article-body p, .article-body li { color: var(--ink-soft); }
.article-body li + li { margin-top: .55rem; }
.article-body a { color: var(--blue); font-weight: 800; }
.article-callout {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 16px;
  background: var(--mint);
  box-shadow: 6px 6px 0 var(--ink);
}
.article-callout strong { display: block; margin-bottom: .4rem; font-size: 1.1rem; }
.template-card { margin: 1.2rem 0; border: 1px solid var(--line); border-radius: 16px; background: var(--white); overflow: hidden; }
.template-card header { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: #eef1f7; }
.template-card header strong { color: var(--ink); }
.template-card pre { margin: 0; padding: 1.3rem; white-space: pre-wrap; color: var(--ink-soft); font: inherit; line-height: 1.65; }
.inline-cta { margin: 3.5rem 0; padding: 2rem; border-radius: var(--radius); background: var(--ink); color: var(--white); }
.inline-cta h2 { margin-top: 0; color: var(--white); }
.inline-cta p { color: #c8d2e5; }
.inline-cta .button { margin-top: .5rem; background: var(--accent); color: var(--ink); }
.legal-page { width: min(900px, calc(100% - 2rem)); }
.legal-page .article-header { margin-bottom: 2rem; }
.legal-page .article-header h1 { margin-bottom: .8rem; }
.legal-document { font-size: 1rem; line-height: 1.72; }
.legal-document section { padding: 2rem 0; border-top: 1px solid var(--line); }
.legal-document section:last-child { border-bottom: 1px solid var(--line); }
.legal-document h2 { margin: 0 0 1rem; font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
.legal-document p { max-width: 78ch; }

@media (max-width: 900px) {
  .intro, .calculator-grid, .generator, .pack-section { grid-template-columns: 1fr; }
  .intro { gap: 2.5rem; padding-top: 3.5rem; }
  .signal-card { max-width: 430px; transform: none; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .message-panel { border-left: 0; border-top: 1px solid var(--line); }
  .pack-section { gap: 3rem; }
  .faq-section { grid-template-columns: 1fr; gap: 2rem; }
  .sources-section > div:first-child { grid-template-columns: 1fr; gap: .6rem; }
  .source-cards { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; gap: .5rem; }
  .footer-links { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .site-header { min-height: 70px; }
  nav a:not(:first-child) { display: none; }
  h1 { font-size: clamp(3rem, 16vw, 4.3rem); }
  .tool-heading { align-items: flex-start; flex-direction: column; }
  .tool-heading, .input-panel, .result-panel, .generator-form, .message-panel { padding: 1.35rem; }
  .field-pair { grid-template-columns: 1fr; gap: 0; }
  .pack-section { padding-top: 4rem; padding-bottom: 4rem; }
  .result-total { font-size: 3.3rem; }
  .proof-row { gap: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
