/* First Digest - shared stylesheet
   Mobile-first. Base rules target a 360px screen; wider layouts layer on at 480 / 768 / 1024. */

:root {
  --navy: #12305a;
  --navy-deep: #0c2347;
  --ink: #151515;
  --text: #2a2a2a;
  --muted: #5a5a5a;
  --line: #e2e2de;
  --soft: #f6f6f3;
  --warm: #f8f3ea;
  --warm-line: #ece2d0;
  --blue-soft: #eef3fa;
  --blue-line: #a9bddb;
  --green: #17803a;
  --green-deep: #116530;
  --green-soft: #eaf6ed;
  --green-line: #2f9e52;
  --focus: #1d5fd1;
  --font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  overflow-wrap: break-word;
}

.page { min-height: 100vh; }
.page--legal { background: #fff; }

/* room for the sticky bar so it never covers the footer */
.page--article { padding-bottom: 92px; }

h1, h2, h3, p, ul, ol, figure, table, dl, dd { margin: 0; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); }
[x-cloak] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- Masthead + label ---------- */

.masthead {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px 14px;
}
.masthead__name {
  display: inline-block;
  padding: 6px 0;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.masthead__name:hover { opacity: 0.85; }
.masthead__name:focus-visible { outline-color: #fff; }
.masthead__tag {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: #c9d6ea;
}

.label-bar {
  background: #efefef;
  border-bottom: 1px solid #dcdcdc;
  padding: 6px 16px;
  text-align: center;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #555;
}

/* ---------- Layout column ---------- */

.wrap {
  width: 100%;
  max-width: 716px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Article head ---------- */

.byline {
  margin: 24px 0 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.headline {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}

.dek {
  margin: 0 0 24px;
  font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.3125rem);
  line-height: 1.6;
  font-weight: 700;
  color: #262626;
}

/* ---------- Media ---------- */

.media { margin: 0 0 28px; }
.media__frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 8px;
  background: #dde4ec;
}
.media__frame--hero { aspect-ratio: 4 / 3; }
.media__frame--wide { aspect-ratio: 1880 / 991; }
.media__frame img,
.media__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media__frame video { object-position: 50% 42%; }
.media figcaption {
  margin-top: 8px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #656565;
}

/* ---------- Article typography ---------- */

:where(.article, .closer) p {
  margin: 0 0 1.15em;
}

.article h2,
.closer h2 {
  margin: 56px 0 18px;
  font-size: clamp(1.4375rem, 1.1rem + 1.4vw, 1.875rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.006em;
  color: var(--ink);
}

.article h2 + p { margin-top: 0; }

/* ---------- Yardstick (three-question test) ---------- */

.yardstick {
  margin: 0 0 1.6em;
  padding: 18px 18px 8px;
  background: var(--blue-soft);
  border: 2px dashed var(--blue-line);
  border-radius: 8px;
}
.yardstick__title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--navy-deep);
}
.yardstick__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.yardstick__list li {
  padding: 12px 0;
  border-top: 1px solid #d2ddee;
  font-size: 1rem;
  line-height: 1.55;
}
.yardstick__list strong { color: var(--navy); }

/* ---------- Comparison table (stacked on mobile) ---------- */

.compare { margin: 0 0 8px; }

.compare table {
  display: block;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.compare thead {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.compare tbody { display: block; }
.compare tr {
  display: block;
  margin: 0 0 12px;
  padding: 12px 16px 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.compare tr.is-pick {
  background: var(--green-soft);
  border: 2px solid var(--green-line);
}
.compare th,
.compare td {
  display: block;
  padding: 0 0 10px;
  text-align: left;
  font-weight: 400;
}
.compare tbody th {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}
.compare td::before {
  content: attr(data-label);
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Call to action ---------- */

.cta {
  margin: 30px 0 34px;
  text-align: center;
}
.cta__lead {
  margin: 0 0 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}
.cta__note {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 58px;
  padding: 14px 20px;
  background: var(--green);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 6px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  background: var(--green-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(17, 101, 48, 0.28);
}
.btn:active { transform: translateY(0); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); }
.btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.btn--sm {
  min-height: 48px;
  padding: 10px 16px;
  font-size: 0.9375rem;
}

/* ---------- Option panels ---------- */

.panel {
  margin: 0 0 16px;
  padding: 20px 18px 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.panel--warm { background: var(--warm); border-color: var(--warm-line); }
.panel--win {
  background: var(--green-soft);
  border: 2px solid var(--green-line);
  padding-top: 19px;
}
.panel__label {
  margin: 0 0 6px !important;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #666;
}
.panel--win .panel__label { color: var(--green-deep); }
.panel__title {
  margin: 0 0 10px;
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}
.panel__lead {
  margin: 0 0 12px !important;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.panel--win .panel__lead { color: var(--green-deep); }
:where(.panel) p { font-size: 1rem; line-height: 1.6; }
.panel__best { font-weight: 400; }
.panel__best strong { color: var(--navy-deep); }

/* ---------- Lists ---------- */

.checklist {
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
}
.checklist li {
  position: relative;
  margin: 0 0 14px;
  padding-left: 38px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 9px;
  top: calc(0.2em + 4px);
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.steps {
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  margin: 0;
  padding: 4px 0 30px 52px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 4px;
  width: 2px;
  background: #cfd9e8;
}
.steps li:last-child { padding-bottom: 4px; }
.steps li:last-child::after { display: none; }

.needs {
  margin: 0 0 1.5em;
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--navy);
}
.needs__title {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.needs ul { margin: 0; padding: 0; list-style: none; }
.needs li { margin: 0 0 6px; }

.tradeoffs {
  margin: 0 0 1.5em;
  padding: 0 0 0 1.25em;
}
.tradeoffs li { margin: 0 0 14px; padding-left: 4px; }
.tradeoffs li::marker { color: var(--navy); font-weight: 700; }

/* ---------- FAQ accordion ---------- */

.faq {
  margin: 0 0 1.5em;
  border-top: 1px solid var(--line);
}
.faq__item { border-bottom: 1px solid var(--line); }
.faq__h { margin: 0; font-size: inherit; }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: 14px 4px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  color: var(--navy);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.faq__q:hover { background: var(--blue-soft); color: var(--navy-deep); }
.faq__icon {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--navy);
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease;
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item.is-open .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__a { padding: 0 4px 6px; }
.faq__a p { margin: 0 0 1em; font-size: 1rem; line-height: 1.6; }

/* ---------- Closing band ---------- */

.closer {
  margin-top: 64px;
  padding: 48px 0 56px;
  background: var(--blue-soft);
}
.closer h2 { margin-top: 0; }
.closer .cta { margin-bottom: 0; }

/* ---------- Sticky bar ---------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(12, 35, 71, 0.1);
}
.sticky-cta__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 716px;
  margin: 0 auto;
}
.sticky-cta__text {
  display: none;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}
.sticky-cta .btn { flex: 1 1 auto; }

/* ---------- Footer (publisher imprint) ---------- */

.page-footer {
  width: 100%;
  max-width: 716px;
  margin: 0 auto;
  padding: 56px 16px 44px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #566070;
}
.page-footer__org { margin: 0 0 14px; }
.page-footer__org p { margin: 0; }
.page-footer__org strong { color: #3d4757; }
.page-footer__legal-links { margin: 0 0 12px; }
.page-footer__legal-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.page-footer__legal-links a {
  display: inline-block;
  padding: 12px 0;
  color: #3d4757;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.page-footer__legal-links a:hover { color: var(--navy); }
.about-line { margin: 0; }

/* ---------- Legal / about pages ---------- */

.legal { padding-top: 28px; padding-bottom: 8px; }
.legal__back {
  display: inline-block;
  margin: 0 0 18px;
  padding: 10px 0;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}
.legal__back:hover { text-decoration: underline; }
.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.375rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.legal__meta {
  margin: 0 0 28px;
  font-size: 0.875rem;
  color: var(--muted);
}
.legal h2 {
  margin: 36px 0 12px;
  font-size: clamp(1.1875rem, 1.05rem + 0.7vw, 1.4375rem);
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
}
.legal p { margin: 0 0 1.1em; }
.legal ul { margin: 0 0 1.2em; padding-left: 1.25em; }
.legal li { margin: 0 0 8px; }

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

@media (min-width: 480px) {
  .masthead { padding-left: 20px; padding-right: 20px; }
  .wrap { padding: 0 20px; }
  .page-footer { padding-left: 20px; padding-right: 20px; }
  .panel { padding: 22px 22px 10px; }
  .panel--win { padding: 21px 21px 10px; }
  .sticky-cta__text { display: block; flex: 1 1 auto; }
  .sticky-cta .btn { flex: 0 0 auto; }
}

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

@media (min-width: 768px) {
  body { font-size: 1.125rem; }
  .masthead { padding: 14px 24px 16px; }
  .masthead__name { font-size: 1.625rem; }
  .byline { margin-top: 28px; font-size: 1rem; }
  .media__frame--hero { aspect-ratio: 3 / 2; }
  .article h2 { margin-top: 72px; }
  .closer h2 { margin-top: 0; }

  .compare table {
    display: table;
    border: 1px solid var(--line);
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 0.9375rem;
  }
  .compare thead {
    position: static;
    display: table-header-group;
    width: auto; height: auto;
    overflow: visible;
    clip: auto;
  }
  .compare tbody { display: table-row-group; }
  .compare tr {
    display: table-row;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .compare tr.is-pick { background: var(--green-soft); border: 0; }
  .compare th,
  .compare td {
    display: table-cell;
    padding: 14px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
  }
  .compare thead th {
    background: var(--navy);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 0;
  }
  .compare tbody tr:last-child th,
  .compare tbody tr:last-child td { border-bottom: 0; }
  .compare tbody th { font-size: 0.9375rem; }
  .compare tr.is-pick th { color: var(--green-deep); }
  .compare td::before { content: none; }

  .cta { margin: 36px 0 40px; }
  .btn { font-size: 1.125rem; min-height: 62px; }
  .btn--sm { font-size: 0.9375rem; min-height: 50px; padding: 10px 22px; }

  .panel { padding: 26px 28px 12px; margin-bottom: 20px; }
  .panel--win { padding: 25px 27px 12px; }
  .panel__title { font-size: 1.25rem; }
  :where(.panel) p { font-size: 1.0625rem; }

  .closer { margin-top: 80px; padding: 64px 0 72px; }
  .page-footer { padding-top: 72px; padding-bottom: 56px; font-size: 0.8125rem; }
  .legal { padding-top: 40px; }
}

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

@media (min-width: 1024px) {
  .masthead { padding-left: 28px; padding-right: 28px; }
  .headline { margin-bottom: 20px; }
  .media { margin-bottom: 32px; }
  .faq__q { font-size: 1.125rem; }
  .sticky-cta__text { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
