/* ============================================================================
   BASE — reset, typography, the reading measure
   ========================================================================= */

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

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

body {
  margin: 0;
  background: var(--ll-white);
  color: var(--ll-ink);
  font-family: var(--ll-sans);
  font-size: var(--fs-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Photography is rectangular everywhere. The only radius on this site is on
   buttons and inputs, where it is functional. */
img { border-radius: 0; }

a { color: var(--ll-accent); text-underline-offset: 3px; }
a:hover { color: var(--ll-accent-deep); }

:focus-visible { outline: 2px solid var(--ll-accent); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--ll-serif);
  font-weight: 600;
  color: var(--ll-ink);
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

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

.ll-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ll-ink); color: var(--ll-white);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-small); font-weight: 600; text-decoration: none;
}
.ll-skip:focus { left: var(--sp-4); top: var(--sp-4); color: var(--ll-white); }

/* ---------------------------------------------------------------------------
   HEADLINE SCALE
   Three weights total: Source Serif 4 600, Inter 400, Inter 600.
   Inter 500 and Source Serif 400 are deliberately not loaded — each extra
   weight is another file on the critical path and the hierarchy holds without
   them.
   ------------------------------------------------------------------------ */

.ll-h1 {
  font-size: var(--fs-h1);
  line-height: 1.14;
  letter-spacing: -0.018em;
  max-width: 22ch;
  margin: 0 0 var(--sp-4);
}

.ll-dek {
  font-family: var(--ll-sans);
  font-size: var(--fs-dek);
  line-height: 1.55;
  color: var(--ll-ink-2);
  max-width: 46ch;
  margin: 0 0 var(--sp-5);
}

/* ---------------------------------------------------------------------------
   PROSE
   Text is capped at the measure; images run to the full column width. That
   difference is the editorial asymmetry in the approved design, and it is the
   single detail worth protecting if anything here gets value-engineered.
   ------------------------------------------------------------------------ */

.ll-prose > * { max-width: var(--ll-measure); }
.ll-prose > figure,
.ll-prose > .wp-block-image,
.ll-prose > .alignwide,
.ll-prose > .wp-block-table,
.ll-prose > .is-style-ll-takeaways,
.ll-prose > .is-style-ll-pin,
.ll-prose > .ll-ad { max-width: 100%; }

.ll-prose p { margin: 0 0 var(--sp-5); }
.ll-prose p:last-child { margin-bottom: 0; }

/* 64px above an H2 against 24px between paragraphs is what makes a long guide
   feel sectioned rather than continuous. It is the load-bearing spacing
   decision on the whole page. */
.ll-prose h2 {
  font-size: var(--fs-h2);
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: var(--sp-8) 0 var(--sp-4);
  scroll-margin-top: var(--sp-5);
}
.ll-prose h3 {
  font-size: var(--fs-h3);
  line-height: 1.35;
  margin: var(--sp-6) 0 var(--sp-3);
  scroll-margin-top: var(--sp-5);
}
.ll-prose > *:first-child { margin-top: 0; }

.ll-prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--ll-accent) 40%, transparent);
}
.ll-prose a:hover { text-decoration-color: var(--ll-accent-deep); }

.ll-prose ul, .ll-prose ol { margin: 0 0 var(--sp-5); padding-left: 22px; }
.ll-prose li { margin-bottom: var(--sp-3); }
.ll-prose li::marker { color: var(--ll-muted); }
.ll-prose strong { font-weight: 600; }

/* ---------------------------------------------------------------------------
   FIGURES AND CAPTIONS
   No shadows, no borders, no overlays. A hairline rule above the caption does
   the separating.
   ------------------------------------------------------------------------ */

figure { margin: 0 0 var(--sp-5); }

.ll-prose figure,
.ll-prose .wp-block-image { margin: var(--sp-6) 0; }

figcaption,
.wp-element-caption,
.ll-caption {
  font-family: var(--ll-sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ll-muted);
  text-align: left;
  padding-top: var(--sp-2);
  margin-top: var(--sp-2);
  border-top: 1px solid var(--ll-rule);
}

.ll-credit__sep { color: var(--ll-rule-2); padding-inline: 6px; }

/* ---------------------------------------------------------------------------
   TYPE SCALE STEPS UP WITH THE VIEWPORT
   ------------------------------------------------------------------------ */

@media (min-width: 620px) {
  :root {
    --fs-body: 18px;
    --fs-dek:  19px;
    --fs-h2:   26px;
    --fs-h3:   19px;
    --fs-h1:   40px;
    --fs-pull: 25px;
  }
}

@media (min-width: 1000px) {
  :root {
    --fs-h1: 46px;
    --fs-h2: 28px;
    --fs-h3: 21px;
  }
  .ll-h1 { max-width: 20ch; }
}

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