/* ==========================================================================
   The Wire - stylesheet
   Mobile-first. Breakpoints: 480px, 768px, 1024px.
   Naming: BEM (block__element--modifier)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #111111;
  --text: #222222;
  --muted: #666666;
  --rule: #dcdcdc;
  --rule-strong: #bdbdbd;
  --paper: #ffffff;
  --band-green: #e9f3eb;
  --band-warm: #f6f2eb;
  --band-dark: #131a15;
  --accent: #1e7b3a;
  --accent-dark: #155d2b;
  --label-bg: #fbe9d7;
  --label-ink: #8a4a14;
  --tan: #8a5a1f;
  --focus: #0b5cad;

  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;

  --col: 720px;
  --gutter: 16px;
  --radius: 6px;
  --radius-sm: 4px;
  --band-pad: 36px;
}

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

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

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

body {
  margin: 0;
  border-top: 4px solid #d8d8d8;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  body {
    font-size: 1.0625rem;
  }
}

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

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: 100%;
  max-width: calc(var(--col) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose p {
  margin: 0 0 1.05em;
}

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

/* ---------- Reading progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}

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

/* ---------- Masthead ---------- */
.masthead {
  border-bottom: 4px double var(--ink);
  background: var(--paper);
}

.masthead__inner {
  width: 100%;
  max-width: calc(var(--col) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 12px var(--gutter) 0;
}

.masthead__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.masthead__date {
  margin: 0;
  color: var(--muted);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.masthead__label {
  flex: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--label-bg);
  color: var(--label-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.masthead__title {
  display: block;
  margin: 10px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(2.25rem, 1.5rem + 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.masthead__title:hover {
  color: var(--accent-dark);
}

.masthead__tagline {
  margin: 6px 0 0;
  padding-bottom: 16px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.875rem;
  font-style: italic;
  text-align: center;
}

@media (min-width: 768px) {
  .masthead__inner {
    padding-top: 14px;
  }

  .masthead__date,
  .masthead__label {
    font-size: 0.75rem;
  }

  .masthead__tagline {
    padding-bottom: 18px;
  }
}

/* ---------- Story header ---------- */
.story__head {
  padding-top: 26px;
}

.story__kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.story__title {
  margin: 10px 0 14px;
  color: var(--ink);
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.17;
}

.story__dek {
  margin: 0 0 20px;
  color: #444444;
  font-size: clamp(1.0625rem, 0.98rem + 0.6vw, 1.25rem);
  font-style: italic;
  line-height: 1.55;
}

.story__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin: 0;
  color: #555555;
  font-size: 0.875rem;
  line-height: 1.5;
}

.story__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-weight: 700;
}

.story__author {
  color: var(--ink);
  font-weight: 700;
}

.story__meta::before {
  content: "\00B7";
  margin: 0 7px;
}

.prose .story__lead {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
}

.story__heading {
  margin: 44px 0 14px;
  color: var(--ink);
  font-size: clamp(1.125rem, 1rem + 0.75vw, 1.375rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.27;
  text-transform: uppercase;
}

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

  .story__heading {
    margin-top: 56px;
  }
}

/* ---------- Figures ---------- */
.figure {
  margin: 26px 0;
}

.figure__media {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #e7e4df;
}

.figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--hero {
  margin: 24px 0 10px;
}

.figure--hero .figure__media,
.figure--wide .figure__media {
  aspect-ratio: 3 / 2;
}

.figure--hero .figure__media img {
  object-position: 50% 62%;
}

.figure--video {
  width: min(100%, 260px);
  margin: 0 auto;
}

.figure--video .figure__media {
  aspect-ratio: 21 / 40;
}

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

.figure__caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

@media (min-width: 1024px) {
  .figure--wide {
    margin-inline: -56px;
  }
}

/* ---------- Pull quote ---------- */
.pullquote {
  margin: 22px 0 28px;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent);
}

.pullquote p {
  margin: 0;
  color: #333333;
  font-size: clamp(1.0625rem, 0.98rem + 0.5vw, 1.1875rem);
  font-style: italic;
  line-height: 1.55;
}

/* ---------- Inline link CTA ---------- */
.link-cta {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link-cta:hover {
  color: var(--accent-dark);
  text-decoration-color: currentColor;
}

/* ---------- Steps + split (how it works) ---------- */
.split {
  display: grid;
  gap: 26px;
  margin: 22px 0 28px;
}

.split__text {
  min-width: 0;
}

.split__media {
  min-width: 0;
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: minmax(0, 1fr) 232px;
    gap: 36px;
    align-items: start;
  }

  .split .figure--video {
    width: 100%;
    margin: 0;
  }
}

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

.steps__item {
  position: relative;
  margin: 0 0 22px;
  padding-left: 52px;
  counter-increment: step;
}

.steps__item::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 700;
}

.steps__title {
  display: block;
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.steps__text {
  display: block;
  margin: 0;
}

/* ---------- Table (serif, hairline rules) ---------- */
.table-wrap {
  margin: 26px 0;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.table__caption {
  padding-bottom: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.table__label,
.table__value {
  padding: 13px 0;
  border-top: 1px solid var(--rule-strong);
  vertical-align: top;
  text-align: left;
}

.table__label {
  width: 36%;
  padding-right: 14px;
  color: var(--tan);
  font-weight: 700;
}

.table__value {
  font-weight: 400;
}

.table tbody tr:last-child .table__label,
.table tbody tr:last-child .table__value {
  border-bottom: 1px solid var(--rule-strong);
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #faf8f4;
}

@media (min-width: 768px) {
  .table {
    font-size: 1.0625rem;
  }

  .table__label {
    width: 28%;
    padding-right: 24px;
  }

  .table__label,
  .table__value {
    padding-top: 15px;
    padding-bottom: 15px;
  }
}

/* ---------- Bands ---------- */
.band {
  margin: 44px 0;
  padding: var(--band-pad) 0;
}

.band--warm {
  background: var(--band-warm);
}

.band .story__heading:first-child {
  margin-top: 0;
}

/* ---------- Comparison columns ---------- */
.compare {
  display: grid;
  gap: 26px;
  margin: 24px 0 26px;
}

.compare__title {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compare__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compare__item {
  position: relative;
  margin: 0 0 13px;
  padding-left: 28px;
  line-height: 1.55;
}

.compare__item::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.compare__list--easy .compare__item::before {
  background: var(--accent);
}

.compare__list--slow .compare__item::before {
  border: 2px solid var(--tan);
}

@media (min-width: 768px) {
  .compare {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .compare__col {
    padding-right: 28px;
  }

  .compare__col + .compare__col {
    padding-right: 0;
    padding-left: 32px;
    border-left: 1px solid var(--rule-strong);
  }
}

/* ---------- Call to action ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--accent);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cta::after {
  content: "\2192";
  margin-left: 10px;
  transition: transform 0.2s ease;
}

.cta:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

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

.cta:active {
  transform: translateY(0);
}

.cta-band {
  margin: 44px 0;
  padding: 34px 0;
  background: var(--band-green);
}

.cta-band__title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.25;
}

.cta-band__text {
  margin: 0 0 20px;
  color: #2c2c2c;
}

.cta-band--center {
  text-align: center;
}

.cta-band--final {
  margin-bottom: 0;
  padding: 48px 0 52px;
  background: var(--band-dark);
  text-align: center;
}

.cta-band--final .cta-band__title {
  color: #ffffff;
}

.cta-band--final .cta-band__text {
  color: #d7ddd9;
}

.cta-band--final .cta:focus-visible {
  outline-color: #ffffff;
}

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

  .cta-band--center .cta,
  .cta-band--final .cta {
    min-width: 320px;
  }
}

@media (min-width: 768px) {
  .cta-band {
    padding: 44px 0;
  }

  .cta-band--final {
    padding: 64px 0 68px;
  }

  .cta-band__inner--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 32px;
    align-items: center;
  }

  .cta-band__inner--split .cta-band__text {
    margin-bottom: 0;
  }

  .cta-band__inner--split .cta-band__copy {
    min-width: 0;
  }
}

/* ---------- Footer (publisher imprint) ---------- */
.page-footer {
  margin-top: 0;
  padding: 44px 0 56px;
  background: transparent;
  color: #595959;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.page-footer__contact-info p {
  margin: 0;
}

.page-footer__contact-info .page-footer__name {
  margin-bottom: 2px;
  color: #3a3a3a;
  font-weight: 700;
}

.page-footer__page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 18px 0 14px;
}

.page-footer__page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #3a3a3a;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.page-footer__page-links a:hover {
  color: var(--accent-dark);
}

.page-footer__page-links a[aria-current="page"] {
  font-weight: 700;
  text-decoration: none;
}

.page-credit {
  max-width: 62ch;
  margin: 0;
  color: #595959;
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ---------- Legal / info pages ---------- */
.legal {
  padding-top: 28px;
  padding-bottom: 28px;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal__back:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.legal__title {
  margin: 6px 0 8px;
  color: var(--ink);
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.legal__meta {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 0.875rem;
}

.legal__heading {
  margin: 34px 0 10px;
  color: var(--ink);
  font-size: clamp(1.125rem, 1.05rem + 0.5vw, 1.3125rem);
  font-weight: 700;
  line-height: 1.3;
}

.legal__list {
  margin: 0 0 1.05em;
  padding-left: 1.3em;
}

.legal__list li {
  margin-bottom: 0.5em;
}

.legal__address {
  margin: 0 0 1.05em;
  font-style: normal;
}

.legal .link-cta {
  font-weight: 400;
}

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