/* ============================================================================
   Plotwright site — "graph paper & ink": a precision scientific-instrument look.
   Self-contained (SPEC/landing.md): no external fonts, no CDNs. All type resolves
   to bookish serifs (Charter/Iowan/Palatino/Georgia) with a mono "readout" face.
   ============================================================================ */

:root {
  /* paper & ink */
  --paper: #faf7f0;
  --paper-2: #f3efe4;
  --ink: #1b2026;
  --ink-2: #4a535e;
  --ink-3: #7d8794;
  /* the single structural accent + a rare "significant" highlight */
  --teal: #0f6d6b;
  --teal-dark: #0a4b49;
  --signal: #d8452f; /* used sparingly, like a significant data point */
  --line: #d9d2c2;
  --line-strong: #c3bba6;

  --serif:
    "Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --display: Georgia, "Times New Roman", "Charter", serif;
  --mono:
    "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --maxw: 1140px;
  --gap: clamp(1rem, 4vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background-color: var(--paper);
  /* faint graph-paper grid — the whole conceit, kept very quiet */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: -1px -1px;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint paper veil over the grid so text stays crisp */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(250, 247, 240, 0.4),
    rgba(250, 247, 240, 0.92)
  );
  pointer-events: none;
  z-index: -1;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ---- type ---- */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}
h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}
h3 {
  font-size: 1.3rem;
}
p {
  color: var(--ink-2);
}
a {
  color: var(--teal-dark);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
}

.lead {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--ink-2);
  max-width: 34ch;
}

/* ---- header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 240, 0.86);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line-strong);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand .mark {
  width: 26px;
  height: 26px;
  display: block;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav a {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
}
.nav a:hover {
  color: var(--teal-dark);
}
.nav a[data-cta] {
  color: var(--paper);
  background: var(--teal-dark);
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
}
.nav a[data-cta]:hover {
  background: var(--ink);
}
.nav-toggle {
  display: none;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 2px;
  border: 1px solid var(--teal-dark);
  background: var(--teal-dark);
  color: var(--paper);
  transition:
    transform 0.12s ease,
    background 0.15s ease;
}
.btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--teal-dark);
}
.btn--ghost:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.method-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
}

/* ---- hero ---- */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  margin: 0 0 1.2rem;
}
.hero .signal {
  color: var(--signal);
}
.hero-cta {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* the scientific-figure frame — the recurring motif */
.figure {
  margin: 0;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 10px;
  box-shadow:
    0 1px 0 var(--line),
    0 30px 50px -30px rgba(27, 32, 38, 0.35);
  position: relative;
}
.figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.figure figcaption {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.7rem 0.2rem 0.2rem;
  display: flex;
  justify-content: space-between;
}
.figure figcaption b {
  color: var(--teal);
  font-weight: 400;
}

/* ---- section scaffold ---- */
.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--line-strong);
}
.section-head {
  max-width: 46ch;
  margin-bottom: 3rem;
}
.section-head p {
  font-size: 1.1rem;
}

/* ---- "methods" numbered features ---- */
.methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.method {
  background: var(--paper);
  padding: 1.8rem;
}
.method .idx {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--signal);
}
.method h3 {
  margin: 0.6rem 0 0.5rem;
}
.method p {
  font-size: 0.98rem;
  margin: 0;
}

/* ---- trust strip ---- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  text-align: center;
}
.metric .n {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
}
.metric .k {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---- pricing ---- */
.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.plan {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 2rem;
}
.plan--featured {
  border-color: var(--teal-dark);
  border-width: 1.5px;
  position: relative;
}
.plan--featured::after {
  content: attr(data-badge);
  position: absolute;
  top: -1px;
  right: -1px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--teal-dark);
  padding: 0.3rem 0.7rem;
}
.plan .price {
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.plan .price span {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0;
}
.plan li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  font-size: 0.98rem;
  color: var(--ink-2);
  border-bottom: 1px dotted var(--line);
}
.plan li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-family: var(--mono);
}

/* ---- data tables (download / changelog) ---- */
.dtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.dtable th,
.dtable td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.dtable th {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-strong);
}
.dtable td.mono,
.dtable .hash {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  word-break: break-all;
}
.feed-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-3);
  padding: 1rem 0;
}

.os-pick {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.os-pick .detected {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.os-pick .detected b {
  color: var(--teal-dark);
}

/* ---- changelog entries ---- */
.log-entry {
  border-left: 2px solid var(--line-strong);
  padding: 0 0 2rem 1.6rem;
  margin-left: 0.4rem;
  position: relative;
}
.log-entry::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--teal);
  border-radius: 50%;
}
.log-entry .ver {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--teal-dark);
  font-weight: 700;
}
.log-entry .date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 0.6rem;
}
.log-entry pre {
  white-space: pre-wrap;
  font-family: var(--serif);
  color: var(--ink-2);
  font-size: 0.98rem;
  margin: 0.6rem 0 0;
}

/* ---- prose (legal, migration) ---- */
.prose {
  max-width: 68ch;
}
.prose h2 {
  margin-top: 2.4rem;
}
.prose p,
.prose li {
  color: var(--ink-2);
}

/* ---- migration campaign ---- */
.switch-hero-section {
  padding-top: clamp(3rem, 7vw, 6rem);
}
.switch-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}
.switch-hero .section-head {
  max-width: 52ch;
  margin: 0;
}
.switch-hero h1 {
  margin: 0 0 1.2rem;
}
.switch-hero .signal {
  color: var(--signal);
}
.migration-offer {
  border: 1.5px solid var(--teal-dark);
  background: rgba(250, 247, 240, 0.96);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  box-shadow: 18px 18px 0 rgba(15, 109, 107, 0.08);
}
.offer-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.offer-price {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.2rem;
  background: var(--paper);
}
.offer-price--plotwright {
  background: #edf5f1;
}
.offer-price span,
.offer-price small {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.offer-price strong {
  margin: 0.25rem 0 0.15rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--ink);
}
.saving-callout {
  margin: 1.1rem 0 0.6rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal-dark);
}
.source-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.switch-proof-strip {
  padding: 0;
  background: var(--ink);
  border: none;
}
.switch-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.switch-metrics div {
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  border-left: 1px solid #3b424a;
}
.switch-metrics div:last-child {
  border-right: 1px solid #3b424a;
}
.switch-metrics strong,
.switch-metrics span {
  display: block;
}
.switch-metrics strong {
  font-family: var(--display);
  font-size: 1.55rem;
  color: var(--paper);
}
.switch-metrics span {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #aeb7c1;
}
.migration-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.step-card {
  padding: 1.8rem;
  background: var(--paper);
}
.step-number {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--signal);
}
.step-card h3 {
  margin: 0.7rem 0 0.5rem;
}
.step-card p {
  margin: 0;
  font-size: 0.96rem;
}
.compatibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.compatibility-card {
  padding: 1.8rem;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}
.compatibility-card--strong {
  border-color: var(--teal-dark);
  background: #f3f7f3;
}
.compatibility-card h3 {
  margin: 0 0 1rem;
}
.compatibility-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-2);
}
.compatibility-card li + li {
  margin-top: 0.55rem;
}
.comparison-wrap {
  border: 1px solid var(--line-strong);
  background: var(--paper);
}
.migration-comparison {
  min-width: 700px;
}
.migration-comparison td strong {
  color: var(--teal-dark);
}
.comparison-source {
  max-width: 88ch;
  margin-top: 0.8rem;
}
.market-signal {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.8rem;
  border-left: 3px solid var(--signal);
  background: var(--paper-2);
}
.market-signal p {
  max-width: 70ch;
  margin: 0 0 0.6rem;
  font-size: 1.08rem;
}
.market-signal cite {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-style: normal;
}
.pilot-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.pilot-panel .eyebrow {
  color: #75cbc6;
}
.pilot-panel h2,
.pilot-panel p {
  margin-top: 0;
}
.pilot-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.9rem;
  text-align: center;
}
.pilot-actions .btn {
  justify-content: center;
}
.pilot-actions > a:not(.btn) {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #c7ccd3;
}

/* ---- optional AI workflow ---- */
.ai-workflow-section {
  background: #edf3f1;
}
.ai-workflow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}
.ai-workflow h2 {
  max-width: 16ch;
}
.ai-proof-list {
  display: grid;
  gap: 0;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.ai-proof-list li {
  display: grid;
  grid-template-columns: minmax(130px, 0.65fr) minmax(0, 1.35fr);
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-strong);
}
.ai-proof-list strong {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--teal-dark);
}
.ai-proof-list span {
  color: var(--ink-2);
  font-size: 0.92rem;
}
.ai-caveat {
  max-width: 72ch;
  margin-top: 1rem;
}
.ai-transcript {
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid #404852;
  background: var(--ink);
  box-shadow: 18px 18px 0 rgba(15, 109, 107, 0.12);
}
.ai-transcript-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #404852;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ai-transcript-head span {
  color: #75cbc6;
}
.ai-transcript-head b {
  color: #aeb7c1;
  font-weight: 500;
}
.ai-message {
  max-width: 88%;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #4b545f;
  color: #e8eaed;
  font-size: 0.94rem;
}
.ai-message--user {
  margin-left: auto;
  border-color: #4b8582;
  background: #123f3f;
}
.ai-tool-step {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-left: 2px solid var(--signal);
  background: #272e35;
  font-family: var(--mono);
  font-size: 0.68rem;
}
.ai-tool-step span {
  color: #ef9a87;
}
.ai-tool-step strong {
  color: #c7ccd3;
  font-weight: 500;
  text-align: right;
}

/* ---- statistical validation ---- */
.validation-hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}
.validation-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
}
.validation-hero h1 {
  margin: 0 0 1.2rem;
}
.validation-hero .signal {
  color: var(--signal);
}
.validation-readout {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--paper);
  background: var(--ink);
  border: 1px solid #3b424a;
  box-shadow:
    14px 14px 0 var(--paper-2),
    15px 15px 0 var(--line-strong);
}
.validation-readout p {
  margin: 0;
  color: #c7ccd3;
}
.validation-readout .eyebrow {
  color: #75cbc6;
}
.validation-number {
  margin-top: 0.4rem;
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 6.5rem);
  line-height: 0.95;
  color: var(--paper);
}
.validation-readout dl {
  margin: 2rem 0 0;
  border-top: 1px solid #4b545f;
}
.validation-readout dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #3b424a;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.validation-readout dt {
  color: #aeb7c1;
}
.validation-readout dd {
  margin: 0;
  color: var(--paper);
}
.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}
.benchmark-card {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(250, 247, 240, 0.82);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.benchmark-card > span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}
.benchmark-card h3 {
  margin: 0.65rem 0;
}
.benchmark-card p {
  min-height: 3.4rem;
  margin: 0 0 0.65rem;
}
.benchmark-card code {
  font-size: 0.8rem;
  color: var(--ink);
  white-space: nowrap;
}
.benchmark-card a {
  display: block;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.benchmark-card small {
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.65rem;
  line-height: 1.45;
}
.validation-scope {
  background: var(--paper-2);
}
.validation-scope-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 7vw, 6rem);
}
.validation-scope h2 {
  margin-top: 0;
}
.cta-band .btn--validation-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.cta-band .btn--validation-ghost:hover {
  background: var(--teal);
  border-color: var(--teal);
}

/* ---- evidence-backed scientific guides ---- */
.guide-hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}
.guide-hero h1 {
  max-width: 16ch;
  margin-bottom: 1rem;
}
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.4rem;
  margin-top: 1.5rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.guide-meta .guide-share {
  color: var(--teal);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.guide-meta .guide-share:hover {
  color: var(--ink);
}
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: start;
}
.guide-prose {
  min-width: 0;
  max-width: 760px;
}
.guide-prose h2 {
  margin-top: 2.8rem;
}
.guide-prose h3 {
  margin-top: 2rem;
}
.guide-prose li {
  margin-bottom: 0.55rem;
  color: var(--ink-2);
}
.guide-aside {
  position: sticky;
  top: 96px;
  padding: 1.4rem;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
}
.guide-aside h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}
.guide-aside a {
  display: block;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-decoration: none;
}
.guide-callout {
  margin: 2rem 0;
  padding: 1.2rem 1.35rem;
  background: #e7f0ed;
  border-left: 4px solid var(--teal);
}
.guide-callout strong {
  color: var(--ink);
}
.guide-warning {
  background: #f5e9e4;
  border-left-color: var(--signal);
}
.result-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.result-card {
  padding: 1.2rem;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
}
.result-card.correct {
  border-top: 4px solid var(--teal);
}
.result-card.wrong-design {
  border-top: 4px solid var(--signal);
}
.result-card span {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.result-card strong {
  display: block;
  margin: 0.45rem 0;
  font-family: var(--display);
  font-size: 1.35rem;
}
.result-card p {
  margin: 0;
  font-size: 0.9rem;
}
.guide-figure {
  margin: 2rem 0;
  padding: 1rem;
  background: #fffdf8;
  border: 1px solid var(--line-strong);
}
.guide-figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.guide-figure figcaption {
  margin-top: 0.75rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.68rem;
}
.paired-plot line,
.quartet-plot .fit {
  stroke: var(--teal);
  stroke-width: 1.5;
}
.paired-plot circle,
.quartet-plot circle {
  fill: var(--signal);
}
.paired-plot .axis,
.quartet-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1;
}
.paired-plot text,
.quartet-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.quartet-plot .panel {
  fill: var(--paper);
  stroke: var(--line-strong);
}
.dose-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.dose-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.dose-plot .midpoint {
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}
.dose-plot .curve {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
}
.dose-plot circle {
  fill: var(--signal);
  stroke: #fffdf8;
  stroke-width: 1.5;
}
.dose-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
}
.dose-plot .axis-label {
  font-size: 13px;
}
.dose-plot .annotation {
  fill: var(--signal);
  font-weight: 700;
}
.survival-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.survival-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.survival-plot .treated,
.survival-plot .control {
  fill: none;
  stroke-width: 3;
}
.survival-plot .treated {
  stroke: var(--teal);
}
.survival-plot .control {
  stroke: var(--signal);
}
.survival-plot .censor-marks line {
  stroke: var(--teal);
  stroke-width: 1.5;
}
.survival-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.survival-plot .axis-label {
  font-size: 13px;
}
.survival-plot .treated-label {
  fill: var(--teal);
  font-weight: 700;
}
.survival-plot .control-label {
  fill: var(--signal);
  font-weight: 700;
}
.survival-plot .risk-table text:first-child {
  font-weight: 700;
}
.roc-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.roc-plot .chance {
  stroke: var(--line-strong);
  stroke-width: 1.2;
  stroke-dasharray: 7 6;
}
.roc-plot .area {
  fill: rgba(15, 109, 107, 0.12);
}
.roc-plot .curve {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3;
}
.roc-plot .optimal-guide {
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}
.roc-plot circle {
  fill: var(--teal);
  stroke: #fffdf8;
  stroke-width: 1.5;
}
.roc-plot circle.optimal {
  fill: var(--signal);
  stroke: var(--signal);
  stroke-width: 3;
}
.roc-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.roc-plot .axis-label {
  font-size: 13px;
}
.roc-plot .annotation {
  fill: var(--signal);
  font-weight: 700;
}
.roc-plot .auc-label {
  fill: var(--teal);
  font-size: 18px;
  font-weight: 700;
}
.interaction-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.interaction-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.interaction-plot .oj,
.interaction-plot .vc {
  fill: none;
  stroke-width: 3;
}
.interaction-plot .oj {
  stroke: var(--teal);
}
.interaction-plot .vc {
  stroke: var(--signal);
}
.interaction-plot .oj-point {
  fill: var(--teal);
}
.interaction-plot .vc-point {
  fill: var(--signal);
}
.interaction-plot circle {
  stroke: #fffdf8;
  stroke-width: 1.5;
}
.interaction-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.interaction-plot .axis-label {
  font-size: 13px;
}
.interaction-plot .oj-label {
  fill: var(--teal);
  font-weight: 700;
}
.interaction-plot .vc-label,
.interaction-plot .annotation {
  fill: var(--signal);
  font-weight: 700;
}
.plantgrowth-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.plantgrowth-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.plantgrowth-plot circle {
  stroke: #fffdf8;
  stroke-width: 1.5;
  opacity: 0.92;
}
.plantgrowth-plot .ctrl {
  fill: var(--teal);
}
.plantgrowth-plot .trt1 {
  fill: var(--signal);
}
.plantgrowth-plot .trt2 {
  fill: #7869a7;
}
.plantgrowth-plot .mean {
  stroke-width: 4;
}
.plantgrowth-plot .ctrl-mean {
  stroke: var(--teal);
}
.plantgrowth-plot .trt1-mean {
  stroke: var(--signal);
}
.plantgrowth-plot .trt2-mean {
  stroke: #7869a7;
}
.plantgrowth-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.plantgrowth-plot .axis-label {
  font-size: 13px;
  font-weight: 700;
}
.rank-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.rank-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.rank-plot circle {
  stroke: #fffdf8;
  stroke-width: 1.5;
  opacity: 0.92;
}
.rank-plot .term {
  fill: var(--teal);
}
.rank-plot .early {
  fill: var(--signal);
}
.rank-plot .median {
  stroke-width: 4;
}
.rank-plot .term-median {
  stroke: var(--teal);
}
.rank-plot .early-median {
  stroke: var(--signal);
}
.rank-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.rank-plot .axis-label {
  font-size: 13px;
  font-weight: 700;
}
.correlation-choice-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.correlation-choice-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.correlation-choice-plot circle {
  fill: var(--teal);
  stroke: #fffdf8;
  stroke-width: 1.5;
  opacity: 0.94;
}
.correlation-choice-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.correlation-choice-plot .axis-label {
  font-size: 13px;
  font-weight: 700;
}
.agreement-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.agreement-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.agreement-plot circle {
  fill: var(--teal);
  stroke: #fffdf8;
  stroke-width: 1.5;
  opacity: 0.94;
}
.agreement-plot .bias {
  stroke: var(--teal);
  stroke-width: 2.5;
}
.agreement-plot .limit {
  stroke: var(--signal);
  stroke-width: 2;
  stroke-dasharray: 7 5;
}
.agreement-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.agreement-plot .axis-label,
.agreement-plot .line-label {
  font-size: 13px;
  font-weight: 700;
}
.agreement-plot .bias-label {
  fill: var(--teal);
}
.agreement-plot .limit-label {
  fill: var(--signal);
}
.contingency-choice-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
}
.contingency-choice-plot .heading,
.contingency-choice-plot .axis-label {
  font-size: 14px;
  font-weight: 700;
}
.contingency-choice-plot .cell {
  stroke: var(--line-strong);
  stroke-width: 1;
}
.contingency-choice-plot .correct-cell {
  fill: rgba(15, 109, 107, 0.09);
}
.contingency-choice-plot .error-cell {
  fill: rgba(216, 69, 47, 0.08);
}
.contingency-choice-plot circle {
  stroke: #fffdf8;
  stroke-width: 1.5;
}
.contingency-choice-plot .correct {
  fill: var(--teal);
}
.contingency-choice-plot .error {
  fill: var(--signal);
}
.contingency-choice-plot .count {
  font-weight: 700;
}
.contingency-choice-plot .expected {
  font-size: 11px;
}
.welch-choice-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.welch-choice-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.welch-choice-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.welch-choice-plot .axis-label {
  font-size: 13px;
  font-weight: 700;
}
.welch-choice-plot circle {
  stroke: #fffdf8;
  stroke-width: 1.5;
  opacity: 0.94;
}
.welch-choice-plot .small-group {
  fill: var(--teal);
}
.welch-choice-plot .large-group {
  fill: var(--signal);
}
.welch-choice-plot .mean {
  stroke-width: 3;
}
.welch-choice-plot .small-mean {
  stroke: var(--teal);
}
.welch-choice-plot .large-mean {
  stroke: var(--signal);
}
.welch-choice-plot .sd-bar,
.welch-choice-plot .sd-cap {
  stroke: var(--ink-2);
  stroke-width: 1.5;
}
.welch-choice-plot .group-label {
  font-size: 10px;
  font-weight: 700;
}
.errorbar-choice-plot .axis {
  stroke: var(--line-strong);
  stroke-width: 1.2;
}
.errorbar-choice-plot .grid {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.errorbar-choice-plot text {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
}
.errorbar-choice-plot .axis-label {
  font-size: 13px;
  font-weight: 700;
}
.errorbar-choice-plot circle {
  stroke: #fffdf8;
  stroke-width: 1.5;
  opacity: 0.94;
}
.errorbar-choice-plot .small-point {
  fill: var(--teal);
}
.errorbar-choice-plot .large-point {
  fill: var(--signal);
}
.errorbar-choice-plot .mean {
  stroke: var(--ink);
  stroke-width: 3;
}
.errorbar-choice-plot .sd-interval {
  stroke: #7869a7;
  stroke-width: 2;
}
.errorbar-choice-plot .sem-interval {
  stroke: var(--signal);
  stroke-width: 2;
}
.errorbar-choice-plot .ci-interval {
  stroke: var(--teal);
  stroke-width: 2;
}
.errorbar-choice-plot .group-label {
  font-size: 10px;
  font-weight: 700;
}
.errorbar-choice-plot .legend {
  font-weight: 700;
}
.errorbar-choice-plot .sd-label {
  fill: #7869a7;
}
.errorbar-choice-plot .sem-label {
  fill: var(--signal);
}
.errorbar-choice-plot .ci-label {
  fill: var(--teal);
}
.guide-equation {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
}
.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.guide-table th,
.guide-table td {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.guide-table th {
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.source-list {
  padding-left: 1.25rem;
}
.source-list li {
  margin-bottom: 0.8rem;
}
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.guide-card {
  display: block;
  padding: 1.35rem;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line-strong);
  text-decoration: none;
}
.guide-card:hover {
  border-color: var(--teal);
  transform: translateY(-1px);
}
.guide-card span {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.guide-card h3 {
  margin: 0.65rem 0;
}
.guide-card p {
  margin: 0;
  font-size: 0.92rem;
}

/* ---- consent-gated, first-party marketing measurement ---- */
.site-consent {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  width: min(680px, calc(100vw - 2rem));
  padding: 1rem 1.15rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid #4b545f;
  box-shadow: 0 18px 45px rgba(27, 32, 38, 0.28);
}
.site-consent p {
  margin: 0;
  color: #d8dce1;
  font-size: 0.88rem;
  line-height: 1.45;
}
.site-consent a {
  color: #75cbc6;
}
.site-consent__actions {
  display: flex;
  gap: 0.55rem;
}
.site-consent button {
  padding: 0.55rem 0.8rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid #7d8794;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.site-consent button[data-consent-accept] {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border: none;
}
.cta-band h2 {
  color: var(--paper);
}
.cta-band p {
  color: #c7ccd3;
}
.cta-band .btn {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.cta-band .btn:hover {
  background: var(--teal);
  color: var(--paper);
  border-color: var(--teal);
}

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--line-strong);
  padding: 3rem 0 2.5rem;
  background: var(--paper-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.footer-grid a {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.3rem 0;
}
.footer-grid a:hover {
  color: var(--teal-dark);
}
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
}
.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-3);
}
.footer-legal .attribution {
  font-size: 0.75rem;
  margin-top: 0.6rem;
}

/* ---- reveal on load ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.reveal.d1 {
  animation-delay: 0.08s;
}
.reveal.d2 {
  animation-delay: 0.16s;
}
.reveal.d3 {
  animation-delay: 0.24s;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero-grid,
  .plans,
  .switch-hero,
  .ai-workflow,
  .pilot-panel,
  .validation-hero-grid,
  .validation-scope-grid,
  .guide-layout {
    grid-template-columns: 1fr;
  }
  .guide-aside {
    position: static;
  }
  .migration-steps,
  .compatibility-grid {
    grid-template-columns: 1fr;
  }
  .methods {
    grid-template-columns: 1fr;
  }
  .benchmark-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav {
    display: none;
  }
  .nav.open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line-strong);
    padding: 1rem var(--gap);
  }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line-strong);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    color: var(--ink);
  }
}

@media (max-width: 520px) {
  .offer-prices,
  .switch-metrics {
    grid-template-columns: 1fr;
  }
  .ai-proof-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .ai-transcript-head,
  .ai-tool-step {
    align-items: flex-start;
    flex-direction: column;
  }
  .ai-tool-step strong {
    text-align: left;
  }
  .switch-metrics div,
  .switch-metrics div:last-child {
    border-right: 1px solid #3b424a;
    border-bottom: 1px solid #3b424a;
  }
  .migration-offer,
  .step-card,
  .compatibility-card {
    padding: 1.25rem;
  }
  .benchmark-grid {
    grid-template-columns: 1fr;
  }
  .result-comparison,
  .guide-cards {
    grid-template-columns: 1fr;
  }
  .site-consent {
    grid-template-columns: 1fr;
  }
}

/* wide-content horizontal scroll guard */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
