/* ==========================================================================
   Smart Review Weekly - site.css
   Hand-written, mobile-first. Custom properties carry the palette.
   Breakpoints: 480px, 768px, 1024px (min-width only).
   Naming: BEM (block__element--modifier).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0c0a2b;
  --text: #23263a;
  --muted: #575d72;
  --blue: #0b3fb3;
  --blue-dark: #082c80;
  --blue-soft: #eef3fd;
  --blue-line: #c6d6f6;
  --line: #e2e5ee;
  --white: #ffffff;

  --dark: #0d0e12;
  --dark-card: #151925;
  --dark-line: rgba(255, 255, 255, 0.09);
  --dark-text: #a9b0c2;
  --accent: #3b78f5;
  --accent-text: #7aa3ff;

  --font-head: "Inter", "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --col: 852px;
  --col-narrow: 720px;
  --gutter: 20px;
  --space-section: 56px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 6px 20px rgba(12, 10, 43, 0.07);
  --shadow-lift: 0 10px 26px rgba(11, 63, 179, 0.28);
  --ease: 0.2s ease;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --space-section: 72px;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-underline-offset: 3px;
  transition: color var(--ease);
}

a:hover {
  color: var(--blue-dark);
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--ink);
  margin: 0;
}

p {
  margin: 0 0 1.2em;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--white);
  font: 600 0.9375rem/1.2 var(--font-head);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

/* ---------- Page modifiers ---------- */
.page {
  min-height: 100vh;
}

.page--article .article__title {
  text-wrap: balance;
}

.page--doc .footer {
  margin-top: 64px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: min(100% - 2 * var(--gutter), var(--col));
  margin-inline: auto;
}

/* Document pages share the article column edge; the text measure is capped inside it */
.wrap--narrow .doc {
  max-width: var(--col-narrow);
}

/* ---------- Reading progress (enhanced by site.js) ---------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}

.progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ---------- Masthead ---------- */
.masthead {
  position: relative;
  z-index: 5;
  background: var(--white);
  box-shadow: var(--shadow);
}

.masthead__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 60px;
  padding-top: 4px;
  width: min(100% - 2 * var(--gutter), var(--col));
  margin-inline: auto;
}

.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  transition: opacity var(--ease);
}

.brand:hover {
  color: var(--ink);
  opacity: 0.85;
}

.brand__main {
  padding-right: 0.32em;
}

.brand__tag {
  padding: 0.3em 0.42em 0.26em;
  background: var(--blue);
  color: var(--white);
}

/* Mobile: the label sits on its own line under the wordmark */
.masthead__label {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  margin-bottom: 8px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.masthead__back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
}

.masthead__back:hover {
  color: var(--blue);
  text-decoration: underline;
}

@media (min-width: 480px) {
  .brand {
    font-size: 1.125rem;
  }

  .masthead__back {
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .masthead__inner {
    min-height: 84px;
  }

  .brand {
    font-size: 1.625rem;
  }

  .masthead__label {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    margin-bottom: 0;
    padding: 4px 11px;
    font-size: 0.6875rem;
  }
}

/* ---------- Article header ---------- */
.article {
  padding-bottom: 8px;
}

.article__head {
  padding-top: 22px;
}

.article__kicker {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.article__title {
  font-size: clamp(1.75rem, 1.15rem + 2.5vw, 3rem);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -0.022em;
}

.article__dek {
  margin: 18px 0 0;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.55;
  color: #3a3f55;
}

/* Hero image: square-cornered feature photo like the reference */
.hero {
  margin: 26px 0 0;
}

.hero__frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #d9dde8;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}

@media (min-width: 768px) {
  .hero {
    margin-top: 34px;
  }

  .hero__frame {
    aspect-ratio: 2.24 / 1;
  }
}

/* Byline row */
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 18px;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink);
}

.byline__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.byline__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.byline__name {
  font-weight: 700;
}

.byline__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #434860;
}

.byline__read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dotted currentColor;
  color: var(--ink);
}

.byline__icon {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

/* ---------- Article body ---------- */
.article__body {
  margin-top: 40px;
}

@media (min-width: 768px) {
  .article__body {
    margin-top: 52px;
  }
}

.lead {
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1em;
}

.article__section {
  margin-top: var(--space-section);
  scroll-margin-top: 16px;
}

.article__heading {
  font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.article__num {
  color: var(--blue);
  margin-right: 0.15em;
}

.article__body strong {
  color: var(--ink);
}

/* Plain lists: a few honest, scannable items */
.list {
  margin: 0 0 1.3em;
  padding: 0;
  list-style: none;
}

.list__item {
  position: relative;
  margin-bottom: 0.65em;
  padding-left: 1.5em;
}

.list__item::before {
  content: "";
  position: absolute;
  left: 0.25em;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--blue);
}

/* Takeaway box (summary near the top) */
.takeaway {
  margin: 32px 0 0;
  padding: 22px 20px 12px;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--blue-soft);
}

.takeaway__title {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

@media (min-width: 768px) {
  .takeaway {
    padding: 26px 32px 16px;
  }
}

/* ---------- Media: stills and loops ---------- */
.media {
  margin: 30px 0;
}

.media__frame {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #d9dde8;
}

.media__frame--photo {
  aspect-ratio: 3 / 2;
}

.media__frame--landscape {
  aspect-ratio: 40 / 21;
}

.media__frame--portrait {
  aspect-ratio: 21 / 40;
}

.media__asset {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__caption {
  margin: 10px 0 0;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.media--portrait {
  width: min(100%, 240px);
  margin-inline: auto;
}

/* ---------- Call to action (text-link treatment, like the reference) ---------- */
.cta {
  margin: 28px 0 0;
  padding-top: 4px;
}

.cta__lead {
  margin: 0 0 2px;
  font-weight: 600;
  color: var(--ink);
}

.cta__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-block: 8px;
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.cta__link::after {
  content: "\2192";
  display: inline-block;
  transition: transform var(--ease);
}

.cta__link:hover {
  color: var(--blue-dark);
}

.cta__link:hover::after {
  transform: translateX(4px);
}

/* Solid button (closing block) */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 26px;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn::after {
  content: "\2192";
  transition: transform var(--ease);
}

.btn:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.btn:hover::after {
  transform: translateX(4px);
}

.btn:focus-visible {
  outline-color: var(--ink);
}

@media (min-width: 480px) {
  .btn {
    display: inline-flex;
    width: auto;
  }
}

/* ---------- Comparison table (stacked blocks on mobile) ---------- */
.compare {
  margin: 26px 0 28px;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.compare__table,
.compare__body,
.compare__row {
  display: block;
  width: 100%;
}

.compare__head {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.compare__row {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare__aspect,
.compare__cell,
.compare__th {
  display: block;
  padding: 12px 16px;
  text-align: left;
}

.compare__aspect {
  background: var(--blue-soft);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
}

.compare__cell::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-head);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare__cell + .compare__cell {
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .compare__table {
    display: table;
    border-collapse: collapse;
  }

  .compare__head {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    display: table-header-group;
    white-space: normal;
  }

  .compare__body {
    display: table-row-group;
  }

  .compare__row {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .compare__th,
  .compare__aspect,
  .compare__cell {
    display: table-cell;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
  }

  .compare__th {
    background: var(--ink);
    color: var(--white);
    font-family: var(--font-head);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 0;
  }

  .compare__th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
  }

  .compare__th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
  }

  .compare__aspect {
    width: 24%;
  }

  .compare__cell::before {
    display: none;
  }

  .compare__cell + .compare__cell {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

/* ---------- Steps + portrait loop ---------- */
.steps-layout {
  display: grid;
  gap: 8px 40px;
  margin-top: 20px;
}

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

.steps__item {
  position: relative;
  margin-bottom: 28px;
  padding: 4px 0 0 56px;
  counter-increment: step;
  min-height: 44px;
}

.steps__item:last-child {
  margin-bottom: 0;
}

.steps__note {
  display: block;
  margin-top: 2px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

.steps__item::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 800;
}

.steps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: -24px;
  width: 2px;
  background: var(--blue-line);
}

@media (min-width: 768px) {
  .steps-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
    align-items: center;
    margin-bottom: 24px;
  }

  .steps-layout .media {
    margin: 0;
  }
}

/* ---------- FAQ accordion (dark band, rounded cards) ---------- */
.faq {
  margin-top: var(--space-section);
  padding: 56px 0 64px;
  background: var(--dark);
  color: var(--dark-text);
}

.faq__title {
  margin-bottom: 28px;
  color: var(--white);
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.018em;
  text-align: center;
}

.faq__accent {
  color: var(--accent-text);
}

.faq__list {
  display: grid;
  gap: 12px;
  width: min(100%, 760px);
  margin-inline: auto;
}

.faq__item {
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-lg);
  background: var(--dark-card);
  transition: border-color var(--ease), background var(--ease);
}

.faq__item:hover {
  border-color: rgba(122, 163, 255, 0.35);
}

.faq__item[open] {
  border-color: rgba(122, 163, 255, 0.45);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 18px 14px 20px;
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--white);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-lg);
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:focus-visible {
  outline-color: var(--accent-text);
  outline-offset: -3px;
}

.faq__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(59, 120, 245, 0.18);
  transition: transform 0.25s ease, background var(--ease);
}

.faq__icon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent-text);
  border-bottom: 2px solid var(--accent-text);
  transform: translateY(-2px) rotate(45deg);
}

.faq__item[open] .faq__icon {
  transform: rotate(180deg);
  background: rgba(59, 120, 245, 0.3);
}

.faq__a {
  padding: 0 20px 20px;
  font-size: 1rem;
  line-height: 1.65;
}

.faq__a p {
  margin: 0;
}

@media (min-width: 768px) {
  .faq {
    padding: 88px 0 96px;
  }

  .faq__q {
    padding: 18px 22px 18px 26px;
    font-size: 1.125rem;
  }

  .faq__a {
    padding: 0 26px 24px;
  }
}

/* ---------- Closing block ---------- */
.closing {
  margin-top: var(--space-section);
  padding: 28px 22px 30px;
  border-radius: var(--radius-lg);
  background: var(--blue-soft);
  border: 1px solid var(--blue-line);
}

.closing__title {
  margin-bottom: 14px;
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.875rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.closing__text {
  margin-bottom: 1.3em;
}

.closing__text:last-of-type {
  margin-bottom: 1.4em;
}

@media (min-width: 768px) {
  .closing {
    padding: 44px 48px 48px;
  }
}

/* ---------- Footer (publisher imprint) ---------- */
.footer {
  margin-top: var(--space-section);
  padding: 8px 0 56px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--muted);
}

.contact-info p {
  margin: 0;
}

.contact-info p:first-child {
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--ink);
}

.page-links {
  margin-top: 14px;
}

.page-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-links__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #3f455c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-links__link:hover {
  color: var(--blue);
}

.site-note {
  max-width: 62ch;
  margin: 6px 0 0;
}

/* ---------- Document pages (about / legal) ---------- */
.doc {
  padding: 34px 0 8px;
}

.doc__kicker {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.doc__title {
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc__meta {
  margin: 14px 0 0;
  font-family: var(--font-head);
  font-size: 0.875rem;
  color: var(--muted);
}

.doc__body {
  margin-top: 32px;
}

.doc__heading {
  margin: 40px 0 12px;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.doc__body a {
  font-weight: 600;
}
