/* ==========================================================================
   Clear Review - main.css
   Mobile-first. Breakpoints: 480px, 768px, 1024px.
   Layout: CSS Grid with named areas (story / rail).
   ========================================================================== */

:root {
  --masthead: #073346;
  --masthead-ink: #ffffff;
  --masthead-muted: #b9ccd5;
  --page: #eff1f5;
  --card: #ffffff;
  --ink: #0b1620;
  --text: #1f2a33;
  --muted: #52616b;
  --teal: #176a89;
  --teal-deep: #0f4a63;
  --tint: #e6f0f4;
  --green: #2a7d34;
  --green-deep: #1f6228;
  --signal: #66c27a;
  --rule: #dde3e9;

  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-ui: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --pad: 16px;
  --radius: 3px;
  --masthead-h: 52px;
  --rail-bar-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--masthead-h) + 16px);
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

body.has-rail {
  padding-bottom: var(--rail-bar-h);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal-deep);
  text-underline-offset: 3px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover {
  color: var(--teal);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.assistive {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -80px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 8px;
  color: #fff;
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--masthead);
  color: var(--masthead-ink);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1160px;
  min-height: var(--masthead-h);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--masthead-ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.masthead__brand:hover {
  color: #ffffff;
  opacity: 0.85;
}

.masthead__brand:focus-visible {
  outline-color: #fff;
}

.masthead__label {
  color: var(--masthead-muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.masthead__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- Page grid ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "story";
  max-width: 1160px;
  margin-inline: auto;
}

.story {
  --inset: var(--pad);
  background: var(--card);
  overflow-x: clip;
}

/* ---------- Story: head ---------- */

.story__head {
  padding: 20px var(--inset) 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--ink);
}

.breadcrumb ol::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  background: var(--teal);
}

.breadcrumb li + li::before {
  content: ">";
  margin-right: 8px;
  color: var(--muted);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #0f2c3d;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.story__title {
  margin: 4px 0 16px;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.story__dek {
  max-width: 62ch;
  margin: 0 0 20px;
  color: #33414b;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.story__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--teal);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.story__meta svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 14px;
  padding-bottom: 20px;
}

.byline__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  background: var(--masthead);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.byline__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.byline__text strong {
  color: var(--ink);
  font-weight: 600;
}

.byline__read {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.story__hero {
  margin: 0;
}

.story__hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 62%;
  background: var(--tint);
}

/* ---------- Story: body ---------- */

.story__body {
  padding: 28px var(--inset) 44px;
}

.story__body > :first-child {
  margin-top: 0;
}

.story__body p {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
}

.story__body strong {
  color: var(--ink);
  font-weight: 600;
}

.story__body .takeaway {
  margin: 1.75rem 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.375rem);
  font-weight: 700;
  line-height: 1.45;
}

.story__body .takeaway strong {
  font-weight: 700;
}

.story__body h2 {
  margin: 2.75rem 0 1rem;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.875rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.kicker {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--teal);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.verdict {
  color: var(--teal-deep);
}

.story__body ul {
  margin: 0 0 1.5rem;
  padding: 0 0 0 1.25rem;
}

.story__body ul li {
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
  font-size: 1.0625rem;
}

.story__body ul li::marker {
  color: var(--teal);
}

/* Numbers strip (data-driven beat, no card) */

.story__body .numbers {
  display: grid;
  margin: 1.75rem 0 2rem;
  padding: 0;
  list-style: none;
  border-top: 3px solid var(--ink);
}

.story__body .numbers li {
  margin: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.numbers__value {
  display: block;
  color: var(--teal-deep);
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.numbers__label {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Steps */

.steps {
  margin: 1.5rem 0 1.75rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 0 0 0 3.5rem;
  counter-increment: step;
  font-size: 1.0625rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--masthead);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
}

.steps__title {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Myth / reality summary */

.verdicts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 1.5rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}

.verdicts dt,
.verdicts dd {
  margin: 0;
  font-size: 1rem;
}

.verdicts dt {
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.6;
}

.verdicts dd {
  padding: 0.15rem 0 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

/* Figures */

.story__figure {
  margin: 2.25rem calc(var(--inset) * -1);
}

.story__figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  background: var(--tint);
}

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: #10202a;
}

.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story__figure figcaption {
  padding: 0.65rem var(--inset) 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* CTA */

.cta-row {
  margin: 1.75rem 0 0.5rem;
}

.cta-row p {
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button::after {
  content: "\2192";
  transition: transform 0.2s ease;
}

.cta-button:hover {
  background: var(--green-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 98, 40, 0.28);
}

.cta-button:hover::after {
  transform: translateX(3px);
}

.cta-button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Rail (mobile: fixed bottom bar) ---------- */

.rail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--card);
  border-top: 1px solid var(--rule);
  box-shadow: 0 -8px 24px rgba(7, 51, 70, 0.12);
  transition: transform 0.3s ease;
}

.js .rail:not(.is-visible) {
  transform: translateY(110%);
}

.rail__title,
.rail__toc,
.rail__summary {
  display: none;
}

.rail .cta-button {
  min-height: 52px;
}

/* ---------- Footer ---------- */

.page-footer {
  max-width: 1160px;
  margin-inline: auto;
  padding: 32px var(--pad) 40px;
  color: #4a5862;
  font-size: 0.8125rem;
  line-height: 1.65;
}

.page-footer .entity {
  margin-bottom: 0.75rem;
}

.page-footer .entity p {
  margin: 0;
}

.page-footer .entity strong {
  color: #2d3b45;
  font-weight: 600;
}

.nav_legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0 0 0.75rem;
}

.nav_legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #2c4453;
  text-decoration: underline;
}

.nav_legal a:hover {
  color: var(--teal);
}

.closing_note {
  max-width: 64ch;
  margin: 0;
}

/* ---------- Legal / text pages ---------- */

.page--single {
  max-width: 1160px;
}

.story__body h3 {
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.15rem;
  line-height: 1.35;
}

.story--text .story__body h2 {
  margin-top: 2.25rem;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
}

.story--text .story__head {
  padding-bottom: 0.25rem;
}

.story--text .story__body {
  padding-top: 20px;
}

/* ==========================================================================
   >= 480px
   ========================================================================== */

@media (min-width: 480px) {
  .cta-button {
    width: auto;
    min-width: 300px;
  }

  .rail .cta-button {
    width: 100%;
  }

  .story__dek {
    font-size: 1.125rem;
  }
}

/* ==========================================================================
   >= 768px
   ========================================================================== */

@media (min-width: 768px) {
  :root {
    --pad: 24px;
  }

  .story {
    --inset: 40px;
  }

  .page {
    padding: 28px var(--pad) 0;
  }

  .story__head {
    padding-top: 20px;
  }

  .breadcrumb {
    margin-left: -20px;
  }

  .story__body {
    padding-top: 36px;
  }

  .story__body h2 {
    margin-top: 3.25rem;
  }

  .story__body .numbers {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .story__body .numbers li {
    padding: 1.1rem 1.25rem 1.1rem 0;
    border-bottom: 0;
    border-right: 1px solid var(--rule);
  }

  .story__body .numbers li + li {
    padding-left: 1.25rem;
  }

  .story__body .numbers li:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .verdicts {
    grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  }

  .verdicts dt,
  .verdicts dd {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    border-top: 1px solid var(--rule);
  }

  .story__figure {
    margin-block: 2.75rem;
  }

  .page-footer {
    padding-inline: var(--pad);
  }
}

/* ==========================================================================
   >= 1024px
   ========================================================================== */

@media (min-width: 1024px) {
  body.has-rail {
    padding-bottom: 0;
  }

  .page {
    grid-template-columns: minmax(0, 1fr) 341px;
    grid-template-areas: "story rail";
    gap: 10px;
    align-items: start;
    padding-top: 40px;
  }

  .page--single {
    grid-template-columns: minmax(0, 860px);
    grid-template-areas: "story";
  }

  .story {
    grid-area: story;
  }

  .rail {
    grid-area: rail;
    position: sticky;
    top: calc(var(--masthead-h) + 16px);
    z-index: 1;
    max-height: calc(100vh - var(--masthead-h) - 32px);
    overflow-y: auto;
    padding: 24px 22px 22px;
    border-top: 0;
    box-shadow: none;
  }

  .js .rail:not(.is-visible) {
    transform: none;
  }

  .rail__title,
  .rail__toc,
  .rail__summary {
    display: block;
  }

  .rail__title {
    margin: 0 0 0.25rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #c9d1d8;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.3;
  }

  .rail__toc {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
  }

  .rail__toc li {
    border-bottom: 1px solid var(--rule);
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease;
  }

  .rail__toc li.is-current {
    border-left-color: var(--teal);
    background: var(--tint);
  }

  .rail__toc a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0.25rem 0.6rem;
    color: #0f2c3d;
    font-size: 0.875rem;
    line-height: 1.4;
    text-decoration: none;
  }

  .rail__toc a:hover {
    color: var(--teal);
    text-decoration: underline;
  }

  .rail__summary {
    margin: 1.25rem 0 0;
    padding: 0;
  }

  .rail__summary div {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .rail__summary dt {
    color: var(--teal);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .rail__summary dd {
    margin: 0.1rem 0 0;
    color: #25323c;
    font-family: var(--font-head);
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .rail .cta-button {
    min-width: 0;
  }

  .story__body {
    padding-bottom: 56px;
  }
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
