/* RID Web — v3 Visual Design Implementation (U1.10A)
   Design tokens from approved mockup v3 handoff.
   Form contract: all backend field names preserved from R2.2.
*/

:root {
  /* v3 primary tokens */
  --rid-blue:      #136FB7;
  --rid-blue-dark: #0A4F87;
  --rid-navy:      #07345F;
  --rid-navy-2:    #052A4D;
  --rid-ink:       #0E2237;
  --rid-muted:     #5E7080;
  --rid-line:      #D9E8F3;
  --rid-soft:      #F1F7FC;
  --rid-card:      #FFFFFF;
  --rid-success:   #15714E;
  --rid-success-bg:#E8F5EE;
  --white:         #ffffff;
  --danger:        #B42318;
  /* legacy aliases kept for thanks/404/diagnostic pages */
  --rid-brand:     #136FB7;
  --rid-deep:      #07345F;
  --rid-graphite:  #0E2237;
  --rid-cyan:      #36AECA;
  --rid-green:     #15714E;
  --rid-background:#F4F8FB;
  --rid-paper:     #FFFFFF;
  /* shadows */
  --shadow:      0 22px 58px rgba(7, 52, 95, .12);
  --shadow-card: 0 10px 28px rgba(7, 52, 95, .08);
}

/* ─── Reset ─── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--rid-ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "liga" 1, "kern" 1;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--rid-blue); color: var(--white); }

/* ─── Accessibility ─── */
.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  transform: translateY(-180%);
  border-radius: 0.5rem;
  background: var(--white);
  padding: 0.75rem 1rem;
  color: var(--rid-blue);
  font-weight: 800;
  box-shadow: var(--shadow);
}
.skip-link:focus { transform: translateY(0); }

/* ─── Layout ─── */
.container {
  width: min(100% - 3rem, 1200px);
  margin-inline: auto;
}
.narrow  { width: min(100% - 2rem, 820px); }
.center  { text-align: center; }

/* ─── Typography ─── */
h1, h2, h3, h4, p { margin-top: 0; }

h1, h2 {
  font-weight: 900;
  letter-spacing: -0.03em;
  hyphens: auto;
  overflow-wrap: break-word;
  line-height: 1.08;
}
h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  margin-bottom: 1.35rem;
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.625rem);
  margin-bottom: 1rem;
  line-height: 1.1;
}
h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(19, 111, 183, 0.13);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}
.main-nav {
  display: flex;
  gap: 1.75rem;
  color: var(--rid-ink);
  font-size: 0.9375rem;
  font-weight: 700;
}
.main-nav a:hover { color: var(--rid-blue); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}
.lang-switch {
  display: flex;
  background: var(--rid-soft);
  border: 1px solid var(--rid-line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-switch span {
  font-size: 0.75rem;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--rid-muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.lang-switch .lang-on {
  background: var(--white);
  color: var(--rid-blue);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ─── Buttons ─── */
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.375rem;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.9375rem;
  line-height: 1.2;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
  white-space: nowrap;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.button-primary {
  background: var(--rid-blue);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(19, 111, 183, .18);
}
.button-primary:hover { background: var(--rid-blue-dark); }
.button-secondary {
  border-color: var(--rid-line);
  background: var(--white);
  color: var(--rid-blue);
}
.button-secondary:hover { border-color: var(--rid-blue); }

/* header CTA smaller */
.header-cta { padding: 0.625rem 1.125rem; font-size: 0.875rem; }

/* ─── Eyebrow / Kicker ─── */
.eyebrow {
  display: inline-flex;
  margin: 0 0 1rem;
  border-radius: 999px;
  background: var(--rid-soft);
  padding: 0.35rem 0.875rem;
  color: var(--rid-blue);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.375rem;
  padding: 9px 16px;
  border: 1px solid var(--rid-line);
  background: var(--white);
  border-radius: 999px;
  color: var(--rid-blue);
  font-size: 0.875rem;
  font-weight: 800;
}
.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rid-blue);
  flex: 0 0 auto;
}

/* ─── Sections ─── */
.hero, .section { padding-block: 5rem; }
.section-white   { background: var(--white); }
.section-muted   { background: var(--rid-background); }
.section-dark-blue {
  background: linear-gradient(135deg, var(--rid-navy), var(--rid-navy-2));
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.section-dark-blue::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0, transparent 72%);
  pointer-events: none;
}

/* ─── Section intro ─── */
.section-intro {
  max-width: 800px;
  margin-bottom: 2.75rem;
}
.section-intro-center {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 2.75rem;
}
.section-intro p,
.section-intro-center p {
  color: var(--rid-muted);
  line-height: 1.75;
  max-width: 640px;
}
.section-intro-center p { margin-inline: auto; }
.section-dark-blue .section-intro-center p { color: rgba(255,255,255,.75); }
.section-dark-blue .section-intro-center h2,
.section-dark-blue .section-intro-center .eyebrow { color: var(--white); }
.section-dark-blue .eyebrow {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
}

/* ─── Hero ─── */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 3.625rem;
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-lead {
  color: var(--rid-muted);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.hero-note {
  margin-top: 1.75rem;
  padding-left: 1.125rem;
  border-left: 3px solid var(--rid-success);
  color: var(--rid-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Hero right: process preview card */
.hero-model-card {
  border: 1px solid var(--rid-line);
  border-radius: 1.5rem;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-model-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  background: var(--rid-blue);
  padding-inline: 1.25rem;
  color: var(--white);
  font-weight: 800;
  font-size: 0.9375rem;
}
.hero-model-badge {
  background: rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 900;
}
.hero-model-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  padding: 0.875rem;
}
.hero-model-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--rid-line);
  border-radius: 0.75rem;
  background: var(--rid-soft);
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.hero-model-step .step-dot {
  display: grid;
  width: 32px;
  height: 32px;
  margin-inline: auto;
  place-items: center;
  border-radius: 10px;
  background: var(--white);
  color: var(--rid-blue);
  font-size: 0.72rem;
  font-weight: 900;
  border: 1px solid var(--rid-line);
}
.hero-model-step strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--rid-ink);
  line-height: 1.25;
}
.hero-model-step p {
  margin: 0;
  color: var(--rid-muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

/* ─── Diagnostic Model Block ─── */
.diag-model-grid {
  display: grid;
  grid-template-columns: 1fr 0.96fr 1fr;
  gap: 1.125rem;
  align-items: stretch;
  margin-bottom: 2.25rem; /* was 1.5rem — gives timeline clear breathing room */
}

/* Center column: flex-column so diag-core-box fills remaining space after the label
   without the height:100% overflow bug that bled into the timeline below. */
.diag-col-center {
  display: flex;
  flex-direction: column;
}
.diag-col-center .diag-core-box {
  flex: 1;
}
.diag-col-label {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rid-muted);
  margin: 0 0 0.625rem;
}
.diag-card {
  background: var(--white);
  border: 1px solid var(--rid-line);
  border-radius: 1.125rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.625rem;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
}
.diag-card:last-child { margin-bottom: 0; }
.diag-card strong { font-size: 0.9375rem; font-weight: 700; }
.diag-card p { margin: 0; color: var(--rid-muted); font-size: 0.8125rem; line-height: 1.35; }

.diag-core-box {
  /* Softer gradient: starts at brand blue, eases to blue-dark — less heavy than pure navy */
  background: linear-gradient(160deg, var(--rid-blue) 0%, var(--rid-blue-dark) 55%, #073254 100%);
  border-radius: 1.5rem;
  border: 1px solid rgba(255,255,255,.12); /* subtle premium ring */
  padding: 1.375rem;
  color: var(--white);
  /* Reduced shadow spread — no longer bleeds aggressively into adjacent rows */
  box-shadow: 0 10px 28px rgba(8, 52, 95, .16), 0 0 0 1px rgba(255,255,255,.08);
  /* height / min-height removed — .diag-col-center flex:1 handles sizing correctly */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}
.diag-core-box strong {
  display: block;
  font-size: 1.125rem; /* slightly smaller — less domineering */
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.375rem;
}
.diag-core-sub {
  font-size: 0.8125rem;
  color: rgba(207, 226, 243, 0.85);
  margin-bottom: 0;
  line-height: 1.45;
}
.diag-core-steps {
  display: grid;
  gap: 0.5rem;
}
.diag-core-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.diag-core-step i {
  font-style: normal;
  color: rgba(185, 216, 241, 0.8);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Timeline (5 steps below diagnostic model) */
.diag-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.125rem;
  position: relative;
}
.diag-timeline::before {
  content: "";
  position: absolute;
  left: 34px;
  right: 34px;
  top: 19px;
  height: 2px;
  background: var(--rid-line);
  pointer-events: none;
}
.diag-titem {
  position: relative;
  background: var(--white);
  border: 1px solid var(--rid-line);
  border-radius: 1rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.diag-titem .tnum {
  width: 38px;
  height: 38px;
  border-radius: 0.875rem;
  background: var(--rid-soft);
  color: var(--rid-blue);
  display: grid;
  place-items: center;
  margin: 0 auto 0.625rem;
  font-weight: 900;
  font-size: 0.8rem;
  border: 1px solid var(--rid-line);
  position: relative;
  z-index: 2;
}
.diag-titem b { font-size: 0.8125rem; display: block; }

/* Metric cards */
.diag-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.diag-metric {
  padding: 1.125rem 1rem;
  border: 1px solid var(--rid-line);
  border-radius: 1.125rem;
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.diag-metric strong {
  display: block;
  font-size: 1.875rem;
  color: var(--rid-blue);
  font-weight: 900;
  line-height: 1;
}
.diag-metric span {
  display: block;
  font-size: 0.875rem;
  color: var(--rid-muted);
  line-height: 1.35;
  margin-top: 0.5rem;
}

/* ─── Process Section (5 columns) ─── */
.process-v3-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.process-v3-card {
  background: var(--white);
  border: 1px solid var(--rid-line);
  border-radius: 1.375rem;
  padding: 1.375rem;
  min-height: 178px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.process-v3-card .step-num {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--rid-soft);
  color: var(--rid-blue);
  font-size: 0.75rem;
  font-weight: 900;
  margin-bottom: 1.125rem;
  border: 1px solid var(--rid-line);
}
.process-v3-card h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; }
.process-v3-card p { margin: 0; color: var(--rid-muted); font-size: 0.9375rem; line-height: 1.5; }

/* ─── Results Section (dark-blue, 3×2) ─── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
}
.result-card {
  background: var(--white);
  border: 1px solid var(--rid-line);
  border-radius: 1.375rem;
  padding: 1.5rem;
  color: var(--rid-ink);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-card);
}
.result-card h3 {
  color: var(--rid-ink);
  font-size: 1.0625rem;
  margin-bottom: 0.625rem;
}
.result-card p {
  color: var(--rid-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0;
}

/* ─── Formats Section (4 columns) ─── */
.formats-v3-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.format-card {
  background: var(--white);
  border: 1px solid var(--rid-line);
  border-radius: 1.375rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
.format-num {
  display: block;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rid-blue);
  margin-bottom: 0.75rem;
}
.format-card h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; }
.format-card p { margin: 0; color: var(--rid-muted); font-size: 0.9375rem; line-height: 1.5; }

/* ─── Request Form Section ─── */
.request-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.25rem;
  align-items: start;
}
.request-lead {
  color: var(--rid-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* "What happens after" card */
.after-card {
  border: 1px solid var(--rid-line);
  border-radius: 1.625rem;
  background: var(--white);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  margin-top: 1.75rem;
}
.after-card-title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--rid-ink);
  margin-bottom: 1.125rem;
}
.after-steps { display: grid; gap: 0.875rem; margin-bottom: 1.25rem; }
.after-step {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  color: var(--rid-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}
.after-step span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--rid-soft);
  color: var(--rid-blue);
  font-size: 0.7rem;
  font-weight: 900;
  border: 1px solid var(--rid-line);
}
.after-step p { margin: 0; }
.contact-info {
  border-top: 1px solid var(--rid-line);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
}
.contact-info a {
  color: var(--rid-blue);
  font-weight: 800;
  font-size: 0.9375rem;
}
.contact-info span { color: var(--rid-muted); font-size: 0.9375rem; }

/* ─── Form (backend contract preserved exactly) ─── */
.request-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--rid-line);
  border-radius: 1.625rem;
  background: var(--white);
  box-shadow: var(--shadow);
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--rid-ink);
}
.field label span { color: var(--rid-blue); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--rid-line);
  border-radius: 0.75rem;
  background: var(--rid-soft);
  padding: 0.625rem 0.875rem;
  color: var(--rid-ink);
  outline: none;
  font-size: 0.9375rem;
}
.field textarea { resize: vertical; min-height: 44px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--rid-blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(19, 111, 183, .14);
}
.form-wide { grid-column: 1 / -1; }
.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--rid-muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.checkbox-label input { width: 18px; min-height: 18px; margin-top: 0.2rem; }
.checkbox-label a { color: var(--rid-blue); font-weight: 800; }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.field-error {
  margin: 0.375rem 0 0;
  color: var(--danger);
  font-size: 0.8125rem;
  font-weight: 700;
}
.field-note {
  margin: 0.375rem 0 0;
  color: var(--rid-muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.form-alert {
  margin: 0.375rem 0 0;
  border-left: 4px solid var(--danger);
  padding-left: 0.75rem;
  color: var(--rid-ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
}

/* ─── Footer ─── */
.site-footer {
  background: linear-gradient(135deg, var(--rid-navy), var(--rid-navy-2));
  color: #d9eaf6;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.8fr;
  gap: 2.5rem;
  padding-block: 3rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.footer-logo {
  height: 32px;
  width: auto;
  display: block;
}
.footer-text {
  max-width: 440px;
  line-height: 1.7;
  font-size: 0.9375rem;
  color: #cfe2f3;
}
.site-footer address,
.site-footer nav {
  display: grid;
  gap: 0.625rem;
  align-content: start;
  font-style: normal;
}
.footer-heading {
  margin-bottom: 0.25rem;
  color: var(--white);
  font-weight: 900;
  font-size: 0.875rem;
}
.site-footer a:hover { color: var(--white); }

/* ─── Thanks page ─── */
.thanks-page {
  min-height: 58vh;
  background: var(--rid-background);
  padding-block: 5rem;
}
.thanks-page h1 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
.thanks-page p:not(.eyebrow) {
  color: var(--rid-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}
.thanks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ─── 404 page ─── */
.error-page {
  min-height: 58vh;
  background: var(--rid-background);
  padding-block: 5rem;
}
.error-page h1 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
.error-page p:not(.eyebrow) {
  color: var(--rid-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ─── Legal / privacy page ─── */
.legal-page h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
.legal-content {
  margin: 2rem 0;
  color: var(--rid-muted);
  line-height: 1.8;
}
.legal-content h2 {
  margin-top: 2rem;
  color: var(--rid-ink);
  font-size: 1.25rem;
}
.legal-content a { color: var(--rid-blue); font-weight: 800; }

/* ─── Diagnostic form (r22-form.php) legacy styles ─── */
.diagnostic-page h1 { font-size: 2.4rem; }
.diagnostic-form { grid-template-columns: repeat(2, 1fr); }
.diagnostic-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  border: 1px solid var(--rid-line);
  border-radius: 0.75rem;
  padding: 1.2rem;
}
.diagnostic-section legend { padding-inline: 0.45rem; color: var(--rid-blue); font-weight: 900; }
.diagnostic-warning,
.diagnostic-message {
  border: 1px solid var(--rid-line);
  border-left: 4px solid var(--rid-green);
  border-radius: 0.5rem;
  background: var(--rid-paper);
  padding: 1rem;
}
.diagnostic-warning p,
.diagnostic-message p { margin: 0.5rem 0 0; color: var(--rid-muted); line-height: 1.65; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
.diagnostic-checkbox {
  border: 1px solid var(--rid-line);
  border-radius: 0.5rem;
  background: var(--white);
  padding: 0.7rem;
}

/* ─── Generated image containers ─── */

/* Section background to match the process image's light-blue canvas */
.section-process-img {
  background: #EAF2FB;
}

/*
 * Hero: no hard container — tablet blends with the hero gradient.
 * The tablet's own ambient shadow (baked into the image) provides visual depth.
 */
.hero-img-wrap {
  line-height: 0;
  position: relative;
}
.hero-img-wrap picture,
.hero-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
/* Vignette: fade into the hero's white → #f7fbff gradient */
.hero-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(255,255,255,.82) 0%, transparent 12%, transparent 88%, rgba(247,251,255,.82) 100%),
    linear-gradient(to bottom, rgba(255,255,255,.55) 0%, transparent 14%, transparent 84%, rgba(247,251,255,.55) 100%);
  pointer-events: none;
}

/*
 * Section image wrap — full container width, no hard border.
 * Vignette fades edge into the section background (white default).
 * Override --img-bg-fade with section-specific colour for seamless blending.
 */
.section-img-wrap {
  --img-bg-fade: 255, 255, 255;   /* white — for section-white */
  position: relative;
  width: 100%;
  margin-bottom: 2.5rem;
  border-radius: 1.25rem;
  overflow: hidden;
  line-height: 0;
}
.section-img-wrap picture,
.section-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
/* Vignette using the section-matched colour */
.section-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  rgba(var(--img-bg-fade),.90) 0%, transparent 8%, transparent 92%, rgba(var(--img-bg-fade),.90) 100%),
    linear-gradient(to bottom, rgba(var(--img-bg-fade),.65) 0%, transparent 11%, transparent 89%, rgba(var(--img-bg-fade),.65) 100%);
  pointer-events: none;
}

/* Process section: image on #EAF2FB — match vignette to that colour */
.section-process-img .section-img-wrap {
  --img-bg-fade: 234, 242, 251;
}

/* Results section: image on --rid-background (#F4F8FB) */
.section-img-wrap--muted {
  --img-bg-fade: 244, 248, 251;
}

/* ─── Responsive ─── */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-copy { max-width: none; }
  /* hero stacks under copy — cap width so it doesn't span full viewport */
  .hero-img-wrap { max-width: 680px; margin-inline: auto; }
  .diag-model-grid { grid-template-columns: 1fr; }
  /* diag-col-center becomes a natural block in single-column layout */
  .diag-col-center { display: block; }
  .process-v3-grid { grid-template-columns: repeat(3, 1fr); }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .formats-v3-grid { grid-template-columns: repeat(2, 1fr); }
  .request-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 760px) {
  .container, .narrow { width: min(100% - 1.25rem, 1200px); }
  .hero, .section { padding-block: 3.5rem; }
  .lang-switch { display: none; }
  .header-cta { padding-inline: 0.875rem; font-size: 0.8125rem; }
  .section-img-wrap { border-radius: 0.75rem; }
  .diag-timeline { grid-template-columns: repeat(3, 1fr); }
  .diag-timeline::before { display: none; }
  .diag-metrics { grid-template-columns: 1fr; }
  .process-v3-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .formats-v3-grid { grid-template-columns: 1fr; }
  .request-form { grid-template-columns: 1fr; }
  .form-actions .button,
  .hero-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
