/* CrawlSpacePedia theme — Luís prototype language, self-hosted fonts only */
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4VF-Latin.woff2") format("woff2-variations"),
       url("../fonts/SourceSerif4VF-Latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  size-adjust: 103%;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3VF-Latin.woff2") format("woff2-variations"),
       url("../fonts/SourceSans3VF-Latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  size-adjust: 100%;
  ascent-override: 96%;
  descent-override: 20%;
  line-gap-override: 0%;
}

/* ==========================================================================
   CrawlSpacePedia — styles.css
   Design system: editorial bulletin (warm paper stock, forest green ink,
   hairline rules, numbered section bands).
   Mobile-first. No frameworks.
   ========================================================================== */

/* ---------------------------------- TOKENS -------------------------------- */
:root {
  /* surface & ink */
  --paper:        #F7F4ED;
  --paper-warm:   #FBF8F2;
  --ink:          #14201F;
  --ink-soft:     #3A4A46;

  /* brand */
  --forest:       #1E4A34;
  --forest-deep:  #12301F;
  --forest-light: #3C7A5B;

  /* supporting */
  --sage:         #E4EBE1;
  --sage-deep:    #CFDACB;
  --sage-mid:     #7FA88D;
  --neutral:      #5C6862;
  --amber:        #B85C12;  /* surfaces, icons, fills */
  --amber-ink:    #8F4409;  /* amber text on light paper */
  --amber-light:  #E8944A;  /* amber text on the dark band */
  --amber-soft:   #F4E3D2;

  /* derived */
  --rule:         rgba(20, 32, 31, .16);
  --rule-strong:  rgba(20, 32, 31, .32);
  --rule-dark:    rgba(247, 244, 237, .18);

  /* type */
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans:  "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --label: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* spacing scale */
  --sp-1: .35rem;
  --sp-2: .6rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2.25rem;
  --sp-6: 3.25rem;
  --sp-7: 4.75rem;
  --sp-8: 6.5rem;

  /* shape */
  --radius: 3px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 31, .05), 0 6px 18px rgba(20, 32, 31, .05);
  --shadow-md: 0 2px 4px rgba(20, 32, 31, .06), 0 18px 40px rgba(20, 32, 31, .10);

  --wrap: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.75rem);
  --header-h: 0px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -.012em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .85em; background: rgba(20,32,31,.06); padding: .1em .35em; border-radius: 2px; }

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

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

.skip-link {
  position: absolute; left: var(--sp-3); top: -100px; z-index: 200;
  background: var(--forest); color: #fff; padding: .75rem 1.1rem;
  font-family: var(--label); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  transition: top .18s ease;
}
.skip-link:focus { top: var(--sp-3); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------- SHARED TYPE ------------------------------ */
.kicker {
  font-family: var(--label);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: var(--sp-2);
}
.kicker--amber { color: var(--amber-ink); }
.kicker--rule {
  display: flex; align-items: center; gap: .75rem;
  color: var(--neutral);
}
.kicker--rule::before {
  content: ""; width: 34px; height: 2px; background: var(--amber); flex: none;
}

.meta {
  font-family: var(--label);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--neutral);
}
.meta__dot { margin-inline: .45rem; color: var(--rule-strong); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--label); font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .95rem 1.5rem; border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn--primary { background: var(--forest); color: #fff; }
.btn--primary:hover { background: var(--forest-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(20,32,31,.04); }
.btn--amber { background: var(--amber); color: #fff; }
.btn--amber:hover { background: #9c4c0d; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--label); font-size: .8rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--forest);
  padding-bottom: .3rem; border-bottom: 1px solid var(--rule-strong);
  transition: color .2s ease, border-color .2s ease;
}
.arrow-link svg { width: 18px; height: 18px; transition: transform .25s ease; }
.arrow-link:hover { color: var(--amber-ink); border-color: var(--amber); }
.arrow-link:hover svg { transform: translateX(4px); }

/* section band: numeral / title / link */
.band {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: var(--sp-2) var(--sp-4);
  border-top: 2px solid var(--ink);
  padding-top: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.band__num {
  font-family: var(--label); font-size: .72rem; font-weight: 700;
  letter-spacing: .2em; color: var(--amber-ink); padding-bottom: .45rem;
}
.band__title {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  letter-spacing: -.02em;
}
.band__link {
  grid-column: 1 / -1;
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--label); font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--neutral);
  padding-top: var(--sp-2);
  transition: color .2s ease;
}
.band__link svg { width: 16px; height: 16px; transition: transform .25s ease; }
.band__link:hover { color: var(--amber-ink); }
.band__link:hover svg { transform: translateX(4px); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--sage { background: var(--sage); }
.section__intro {
  max-width: 62ch; color: var(--ink-soft);
  margin-top: calc(var(--sp-5) * -1); margin-bottom: var(--sp-5);
  font-size: 1.02rem;
}
.section__more { margin-top: var(--sp-5); }

/* ------------------------------ IMAGE FRAMES ------------------------------ */
.media {
  position: relative;
  overflow: hidden;
  background-color: var(--sage-deep);
  background-image:
    repeating-linear-gradient(45deg, rgba(30,74,52,.10) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--sage), var(--sage-deep));
}
.media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
}
.media img.is-broken { opacity: 0; }
a:hover .media img { transform: scale(1.04); }

/* ================================ HEADER ================================== */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.utility {
  background: var(--forest-deep);
  color: var(--sage);
  overflow: hidden;
  max-height: 40px;
  transition: max-height .3s ease, opacity .3s ease;
}
.site-header.is-compact .utility { max-height: 0; opacity: 0; }
.utility__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 38px;
}
.utility__tag {
  font-family: var(--label); font-size: .68rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.utility__nav { display: none; gap: var(--sp-4); }
.utility__nav a {
  font-family: var(--label); font-size: .68rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--sage);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.utility__nav a:hover { color: #fff; border-color: var(--amber); }

.masthead { background: var(--paper); }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 68px;
}

.logo { display: inline-flex; align-items: center; gap: .6rem; flex: none; }
.logo__mark { width: 30px; height: 30px; color: var(--forest); flex: none; }
.logo__type {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.02rem, 4.4vw, 1.28rem);
  letter-spacing: -.02em; color: var(--ink); white-space: nowrap;
}
.logo__type-b { color: var(--forest); }

.primary-nav { display: none; }
.primary-nav ul { display: flex; align-items: center; gap: clamp(.9rem, 1.8vw, 1.7rem); }
.primary-nav a {
  font-family: var(--label); font-size: .78rem; font-weight: 500;
  letter-spacing: .04em; color: var(--ink-soft);
  padding-block: .4rem; border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.primary-nav a:hover { color: var(--ink); border-color: var(--rule-strong); }
.primary-nav a.is-accent { color: var(--amber-ink); font-weight: 700; }
.primary-nav a.is-accent:hover { border-color: var(--amber); }

.masthead__actions { display: flex; align-items: center; gap: .35rem; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; background: none; border: 1px solid transparent;
  border-radius: var(--radius); cursor: pointer; color: var(--ink);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--sage); border-color: var(--rule); }
.icon-btn[aria-expanded="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }

/* slim editorial rail */
.subnav { border-top: 1px solid var(--rule); background: var(--paper-warm); }
.subnav__inner {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: 44px;
}
.subnav__label {
  font-family: var(--label); font-size: .64rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--amber-ink);
  flex: none;
}
.subnav__links {
  display: flex; gap: var(--sp-4); overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-width: 0;
}
.subnav__links::-webkit-scrollbar { display: none; }
.subnav__links a {
  white-space: nowrap; font-size: .84rem; color: var(--ink-soft);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.subnav__links a:hover { color: var(--ink); border-color: var(--amber); }
.subnav__cta {
  display: none; align-items: center; gap: .45rem; flex: none;
  font-family: var(--label); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--forest);
}
.subnav__cta svg { width: 15px; height: 15px; }
.subnav__cta:hover { color: var(--amber-ink); }

/* search */
.search {
  position: relative;
  display: flex; align-items: stretch;
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(30,74,52,.13); }
.search__icon { width: 20px; height: 20px; color: var(--neutral); flex: none; }
.search__input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  padding: 1rem .75rem; font-size: .98rem;
}
.search__input::placeholder { color: var(--neutral); }
.search__submit {
  flex: none; border: 0; cursor: pointer;
  background: var(--forest); color: #fff;
  font-family: var(--label); font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding-inline: 1.15rem; border-radius: 0 2px 2px 0;
  transition: background-color .2s ease;
}
.search__submit:hover { background: var(--forest-deep); }

.search--hero { margin-top: var(--sp-4); }
.search--hero .search__icon { margin-left: 1rem; }
.search--panel { margin-block: var(--sp-3); }

.search__suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: #fff; border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-md); border-radius: var(--radius);
  overflow: hidden; max-height: 340px; overflow-y: auto;
}
.search__suggestions:empty { display: none; }
.suggestion {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .25rem 1rem;
  padding: .7rem 1rem; cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.suggestion:last-child { border-bottom: 0; }
.suggestion__title { font-family: var(--serif); font-size: 1rem; font-weight: 600; }
.suggestion__cat {
  font-family: var(--label); font-size: .62rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--neutral);
}
.suggestion[aria-selected="true"], .suggestion:hover { background: var(--sage); }
.suggestion[aria-selected="true"] .suggestion__title { color: var(--forest); }

.search-panel {
  border-top: 1px solid var(--rule);
  background: var(--sage);
  padding-block: var(--sp-2);
}

/* mobile nav */
.mobile-nav {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  padding: var(--sp-3) 0 var(--sp-4);
  max-height: calc(100vh - 120px); overflow-y: auto;
}
.mobile-nav__label {
  font-family: var(--label); font-size: .64rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--amber-ink);
  padding: var(--sp-3) var(--gutter) var(--sp-1);
}
.mobile-nav li a {
  display: block; padding: .8rem var(--gutter);
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600;
  border-bottom: 1px solid var(--rule);
}
.mobile-nav li a:hover { background: var(--sage); color: var(--forest); }

/* ================================= HERO =================================== */
.hero {
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(180deg, var(--paper-warm), var(--paper));
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem);
}
.hero__grid { display: grid; gap: clamp(2.25rem, 5vw, 3.5rem); }

.hero__title {
  font-size: clamp(2.35rem, 7vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -.028em;
  margin-bottom: var(--sp-3);
  text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--forest); }
.hero__dek {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--ink-soft); max-width: 46ch;
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }

.hero__index {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-5); padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
}
.hero__index li { display: flex; align-items: baseline; gap: .5rem; }
.hero__index-num {
  font-family: var(--label); font-size: .62rem; font-weight: 700;
  letter-spacing: .1em; color: var(--amber-ink);
  border: 1px solid var(--amber-soft); background: var(--amber-soft);
  padding: .12rem .34rem; border-radius: 2px;
}
.hero__index a {
  font-family: var(--label); font-size: .74rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
.hero__index a:hover { color: var(--forest); border-color: var(--forest); }

/* featured editorial card */
.feature {
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .3s ease, transform .3s ease;
}
.feature:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature__link { display: block; }
.media--feature { aspect-ratio: 16 / 10; }
.feature__flag {
  position: absolute; left: 0; bottom: 0;
  background: var(--amber); color: #fff;
  font-family: var(--label); font-size: .64rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  padding: .45rem .85rem;
}
.feature__body { padding: clamp(1.15rem, 2.4vw, 1.75rem); }
.feature__title {
  font-size: clamp(1.22rem, 2.1vw, 1.55rem);
  line-height: 1.18; margin-bottom: var(--sp-2);
}
.feature__dek { color: var(--ink-soft); font-size: .95rem; margin-bottom: var(--sp-3); }

/* ================================ TOPICS ================================== */
.topic-grid { display: grid; gap: var(--sp-4); }
.topic {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.topic:hover { border-color: var(--forest); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.topic a { display: flex; flex-direction: column; height: 100%; }
.media--topic { aspect-ratio: 3 / 2; }
.topic__body { position: relative; padding: 1.25rem 1.35rem 1.5rem; flex: 1; }
.topic__num {
  position: absolute; top: 1.2rem; right: 1.35rem;
  font-family: var(--label); font-size: .64rem; font-weight: 700;
  letter-spacing: .18em; color: var(--sage-deep);
}
.topic h3 { font-size: 1.2rem; margin-bottom: .45rem; padding-right: 2.2rem; }
.topic p { font-size: .92rem; color: var(--ink-soft); }
.topic__go {
  display: inline-flex; margin-top: var(--sp-3); color: var(--forest);
}
.topic__go svg { width: 22px; height: 22px; transition: transform .25s ease; }
.topic:hover .topic__go svg { transform: translateX(5px); }
.topic:hover .topic__go { color: var(--amber-ink); }

/* ================================= ADS ==================================== */
/* AdSense-ready placeholders. Keep clear of nav, buttons and tools.
   Swap .ad-slot__box for the AdSense <ins> unit when the account is live. */
.ad-slot { padding-block: clamp(1.5rem, 4vw, 2.75rem); }
.ad-slot--inline { margin-top: var(--sp-5); }
.ad-slot__label {
  font-family: var(--label); font-size: .6rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--neutral);
  text-align: center; margin-bottom: .5rem;
}
.ad-slot__box {
  border: 1px dashed var(--rule-strong);
  background: rgba(255, 255, 255, .45);
  min-height: 96px;
  display: grid; place-items: center;
  padding: 1rem; text-align: center;
  font-family: var(--label); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--neutral);
  border-radius: var(--radius);
}

/* ================================= TOOLS ================================== */
.tools {
  background: var(--forest-deep);
  color: var(--sage);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.tools h2, .tools h3 { color: var(--paper); }
.band--dark { border-top-color: rgba(247,244,237,.45); }
.band--dark .band__title { color: var(--paper); }
.band--dark .band__link { color: var(--sage-deep); }
.band--dark .band__link:hover { color: var(--amber-light); }

.tools__grid { display: grid; gap: clamp(2rem, 4vw, 3rem); }

/* calculator worksheet */
.calc {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 3vw, 2.15rem);
  box-shadow: var(--shadow-md);
  border-top: 5px solid var(--amber);
}
/* raised specificity so it beats the .tools h3 rule of the dark band */
.calc .calc__title { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: var(--sp-2); color: var(--ink); }
.calc__intro { color: var(--ink-soft); font-size: .95rem; margin-bottom: var(--sp-4); }

.calc__form { display: grid; gap: var(--sp-3); }
.field label {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--label); font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: .4rem;
}
.field__unit { color: var(--neutral); letter-spacing: .1em; }
.field input, .select select {
  width: 100%; background: #fff;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: .85rem 1rem; font-size: 1rem; font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .select select:focus {
  outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(30,74,52,.14);
}
.field input:focus-visible, .select select:focus-visible { outline: none; }
.field__hint { font-size: .78rem; color: var(--neutral); margin-top: .35rem; }
.field.is-invalid input { border-color: var(--amber); }

.select { position: relative; }
.select select { appearance: none; padding-right: 2.75rem; cursor: pointer; }
.select svg {
  position: absolute; right: 1rem; top: 50%; width: 18px; height: 18px;
  transform: translateY(-50%) rotate(90deg); pointer-events: none; color: var(--forest);
}
.calc__error {
  font-family: var(--label); font-size: .78rem; font-weight: 700;
  color: var(--amber-ink); letter-spacing: .02em;
}

.calc__result {
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 2px solid var(--ink);
}
.calc__result-label {
  font-family: var(--label); font-size: .66rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--neutral);
}
.calc__figure {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  line-height: 1.05; color: var(--forest);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin-block: .25rem;
  transition: opacity .25s ease;
}
.calc__figure.is-updating { opacity: .35; }
.calc__per { font-family: var(--label); font-size: .8rem; font-weight: 700; color: var(--amber-ink); letter-spacing: .04em; }
.calc__note { font-size: .78rem; color: var(--neutral); margin-top: var(--sp-3); max-width: 52ch; }

/* tool ledger */
.ledger { border-top: 1px solid var(--rule-dark); }
.ledger__item {
  display: grid; grid-template-columns: auto 1fr;
  gap: .35rem var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--rule-dark);
  align-items: start;
  transition: background-color .25s ease;
}
.ledger__item:hover { background: rgba(255,255,255,.045); }
.ledger__num {
  font-family: var(--label); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; color: var(--forest-light); padding-top: .35rem;
}
.ledger__body h3 { font-size: 1.12rem; color: var(--paper); margin-bottom: .25rem; }
.ledger__body p { font-size: .9rem; color: rgba(228,235,225,.75); max-width: 52ch; }
.ledger__cta {
  grid-column: 2; justify-self: start;
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--label); font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--amber-ink);
  padding-top: .35rem;
}
.ledger__cta svg { width: 15px; height: 15px; transition: transform .25s ease; }
.ledger__cta:hover { color: #fff; }
.ledger__cta:hover svg { transform: translateX(4px); }

/* =============================== GUIDES =================================== */
.guides__top { display: grid; gap: clamp(2rem, 4vw, 3rem); }

.story a { display: block; }
.story__title { font-size: 1.18rem; line-height: 1.2; margin-bottom: .45rem; transition: color .2s ease; }
.story__title--lead { font-size: clamp(1.6rem, 3.4vw, 2.35rem); line-height: 1.08; letter-spacing: -.02em; }
.story__excerpt { font-size: .94rem; color: var(--ink-soft); margin-bottom: var(--sp-2); }
.story a:hover .story__title { color: var(--forest); }
.story .kicker { margin-bottom: var(--sp-2); }

.media--lead { aspect-ratio: 3 / 2; margin-bottom: var(--sp-3); border-radius: var(--radius); }
.guides__stack { display: grid; gap: var(--sp-4); align-content: start; }
.story--stack { border-top: 1px solid var(--rule); padding-top: var(--sp-3); }
.story--stack a { display: grid; gap: var(--sp-3); }
.media--stack { aspect-ratio: 16 / 10; border-radius: var(--radius); }

.guides__list { margin-top: clamp(2rem, 4vw, 3rem); border-top: 2px solid var(--ink); }
.story--row { border-bottom: 1px solid var(--rule); }
.story--row a {
  display: grid; gap: var(--sp-3);
  padding-block: var(--sp-4);
  align-items: start;
}
.media--row { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.story--row__body .kicker { margin-bottom: .4rem; }
.story--row__meta { padding-top: .2rem; }

/* ============================== PROBLEMS ================================== */
.index-list { display: grid; gap: 0 clamp(2rem, 5vw, 4rem); }
.index-list__item { border-bottom: 1px solid var(--rule-strong); }
.index-list__item:first-child { border-top: 1px solid var(--rule-strong); }
.index-list__item a {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem .25rem;
  transition: background-color .2s ease, padding-left .25s ease;
}
.index-list__item a:hover { background: rgba(255,255,255,.6); padding-left: .65rem; }
.index-list__icon { flex: none; color: var(--forest); display: inline-flex; }
.index-list__icon svg { width: 22px; height: 22px; }
.index-list__name { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; flex: none; }
.index-list__leader {
  flex: 1 1 auto; min-width: 1rem;
  border-bottom: 2px dotted var(--rule-strong);
  transform: translateY(-3px);
}
.index-list__hint {
  display: none; font-size: .82rem; color: var(--neutral);
  flex: 0 1 auto; min-width: 0; max-width: 26ch;
}
.index-list__go { flex: none; color: var(--rule-strong); display: inline-flex; transition: color .2s ease, transform .25s ease; }
.index-list__go svg { width: 18px; height: 18px; }
.index-list__item a:hover .index-list__go { color: var(--amber-ink); transform: translateX(4px); }
.index-list__item a:hover .index-list__icon { color: var(--amber-ink); }

/* ================================= COSTS ================================== */
/* column-gap stays 0 so the heavy rules read as continuous ruled rows */
.cost-grid { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.cost { border-bottom: 2px solid var(--ink); padding-right: clamp(1rem, 2.5vw, 2rem); }
.cost a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: var(--sp-3);
  padding-block: var(--sp-3);
  transition: background-color .2s ease, padding-left .25s ease;
}
.cost a:hover { background: var(--sage); padding-left: .5rem; }
.cost__icon { flex: none; color: var(--amber-ink); display: inline-flex; padding-top: .2rem; }
.cost__icon svg { width: 22px; height: 22px; }
.cost h3 { font-size: 1.08rem; margin-bottom: .2rem; }
.cost p { font-size: .88rem; color: var(--ink-soft); }
.cost__go { color: var(--rule-strong); display: inline-flex; padding-top: .25rem; transition: color .2s ease, transform .25s ease; }
.cost__go svg { width: 18px; height: 18px; }
.cost a:hover .cost__go { color: var(--forest); transform: translateX(4px); }

/* ============================== EDUCATION ================================= */
.section--edu { background: var(--paper-warm); }
.edu__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }

.diagram {
  margin: 0;
  background: var(--sage);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.4vw, 1.75rem);
}
.diagram__cap {
  font-family: var(--label); font-size: .66rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--neutral);
  padding-bottom: var(--sp-3); margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule-strong);
}
.diagram__svg { width: 100%; height: auto; }
.diagram__marker circle { fill: var(--amber); }
.diagram__marker text { font-family: var(--label); font-size: 12px; font-weight: 700; fill: #fff; }
.diagram__note text {
  font-family: var(--label); font-size: 11px; font-weight: 500; fill: var(--ink-soft);
  paint-order: stroke; stroke: var(--sage); stroke-width: 4px; stroke-linejoin: round;
}
.diagram__note path { stroke: var(--amber); stroke-width: 1; }

.diagram__key {
  display: grid; gap: .5rem var(--sp-4); margin-top: var(--sp-4);
  padding-top: var(--sp-3); border-top: 1px solid var(--rule-strong);
}
.diagram__key li { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--ink-soft); }
.diagram__key-num {
  flex: none; display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--amber); color: #fff;
  font-family: var(--label); font-size: .66rem; font-weight: 700;
}

.edu__lead {
  font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.4; color: var(--ink); margin-bottom: var(--sp-3);
}
.edu__body > p + p { margin-top: var(--sp-3); color: var(--ink-soft); }
.edu__highlights { margin-block: var(--sp-5); border-top: 1px solid var(--rule-strong); }
.edu__highlights li {
  display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}
.edu__hl-icon { color: var(--forest); display: inline-flex; padding-top: .2rem; }
.edu__hl-icon svg { width: 24px; height: 24px; }
.edu__highlights h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.edu__highlights p { font-size: .9rem; color: var(--ink-soft); }

/* =============================== LATEST =================================== */
.latest-grid { display: grid; gap: 0; border-bottom: 1px solid var(--rule-strong); }
.latest { border-top: 1px solid var(--rule-strong); padding-right: clamp(1rem, 2.5vw, 2rem); }
.latest a { display: block; padding-block: var(--sp-3); transition: background-color .2s ease; }
.latest a:hover { background: var(--sage); }
.latest .kicker { margin-bottom: .35rem; }
.latest h3 { font-size: 1.1rem; line-height: 1.22; margin-bottom: .4rem; transition: color .2s ease; }
.latest a:hover h3 { color: var(--forest); }
.latest p { font-size: .9rem; color: var(--ink-soft); margin-bottom: .5rem; }

/* ============================== NEWSLETTER ================================ */
.newsletter {
  background: var(--sage-deep);
  border-block: 1px solid var(--rule-strong);
  padding-block: clamp(3rem, 7vw, 5rem);
}
.newsletter__inner { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: center; }
.newsletter__copy h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.1; letter-spacing: -.022em; margin-bottom: var(--sp-2);
  max-width: 18ch; text-wrap: balance;
}
.newsletter__copy p { color: var(--ink-soft); max-width: 48ch; }

.newsletter__field {
  display: flex; align-items: stretch; position: relative;
  background: #fff; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.newsletter__field:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(30,74,52,.14); }
.newsletter__icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--neutral); pointer-events: none; }
.newsletter__field input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  padding: 1rem 1rem 1rem 2.9rem; font-size: 1rem;
}
.newsletter__field .btn { flex: none; border-radius: 0 2px 2px 0; }
.newsletter__msg { font-size: .8rem; color: var(--ink-soft); margin-top: .6rem; }
.newsletter__msg.is-error { color: var(--amber-ink); font-weight: 600; }
.newsletter__msg.is-ok { color: var(--forest); font-weight: 600; }

/* ================================ FOOTER ================================== */
.site-footer {
  background: var(--forest-deep);
  color: var(--sage);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer__top { display: grid; gap: clamp(2rem, 4vw, 2.5rem); }
.logo--footer .logo__mark { color: var(--sage-deep); }
.logo--footer .logo__type { color: var(--paper); }
.logo--footer .logo__type-b { color: var(--forest-light); }
.footer__desc { font-size: .88rem; color: rgba(228,235,225,.75); margin-top: var(--sp-3); max-width: 40ch; }
.footer__tag {
  font-family: var(--label); font-size: .66rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--forest-light);
  margin-top: var(--sp-3);
}
.footer__col h2 {
  font-family: var(--label); font-size: .66rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--paper);
  padding-bottom: var(--sp-2); margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--rule-dark);
}
.footer__col li + li { margin-top: .45rem; }
.footer__col a { font-size: .88rem; color: rgba(228,235,225,.78); border-bottom: 1px solid transparent; }
.footer__col a:hover { color: #fff; border-color: var(--amber); }

.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-block: var(--sp-4);
  border-top: 1px solid var(--rule-dark);
  display: grid; gap: var(--sp-2);
}
.footer__bottom p { font-size: .8rem; color: rgba(228,235,225,.65); }
.footer__disclaimer { max-width: 92ch; }

/* ============================== MOTION ==================================== */
/* Reveals only hide when JS is available (html.js is set in the head),
   so content is never stranded behind an animation that did not run. */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .55s ease-out, transform .55s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* --------------------- CONTRAST-SAFE TEXT VARIANTS ------------------------ */
/* Amber works as a fill and an icon colour, but as small text it needs a
   darker variant on paper and a lighter one on the dark tools band. */
.band__num { color: var(--amber-ink); }
.band--dark .band__num { color: var(--amber-light); }
.kicker--amber { color: var(--amber-ink); }
.subnav__label, .mobile-nav__label { color: var(--amber-ink); }
.hero__index-num { color: var(--amber-ink); }
.calc__per, .calc__error { color: var(--amber-ink); }
.newsletter__msg.is-error { color: var(--amber-ink); }
.arrow-link:hover, .band__link:hover { color: var(--amber-ink); }
.ledger__num { color: var(--sage-mid); }
.ledger__cta { color: var(--amber-light); }
.band--dark .band__link:hover { color: var(--amber-light); }
.footer__tag { color: var(--sage-deep); }

/* ==========================================================================
   BREAKPOINTS  (min-width, mobile-first)
   ========================================================================== */

@media (min-width: 560px) {
  .search--hero { max-width: 560px; }
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index-list__item:nth-child(2) { border-top: 1px solid var(--rule-strong); }
  .index-list__item:nth-last-child(2) { border-bottom: 1px solid var(--rule-strong); }
  .diagram__key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  .masthead__inner { min-height: 76px; }
  .utility__nav { display: flex; }
  .subnav__cta { display: inline-flex; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story--stack a { grid-template-columns: 200px 1fr; align-items: start; }
  .story--row a { grid-template-columns: 220px 1fr auto; gap: var(--sp-4); align-items: start; }
  .story--row__meta { grid-column: 3; padding-top: 0; }
  .index-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
  .newsletter__inner { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .hero__lead { padding-right: clamp(1.5rem, 3vw, 3rem); border-right: 1px solid var(--rule); }
  .feature { position: sticky; top: 150px; }
  .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tools__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .guides__top { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .story--stack a { grid-template-columns: 1fr; }
  .index-list { column-gap: clamp(3rem, 6vw, 5rem); }
  .cost-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .edu__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); }
  .footer__brand { grid-column: auto; }
  .band { grid-template-columns: auto 1fr auto; align-items: baseline; }
  .band__link { grid-column: auto; padding-top: 0; }
  .band__num { padding-bottom: 0; }
}

/* Primary nav only appears once there is genuinely room for it;
   below this the rail + drawer carry navigation. */
@media (min-width: 1100px) {
  .primary-nav { display: block; }
  .primary-nav ul { gap: clamp(.8rem, 1.3vw, 1.35rem); }
  .primary-nav a { font-size: .76rem; }
  .icon-btn--menu { display: none; }
  .index-list__hint { display: block; }
}

@media (min-width: 1180px) {
  .story--row a { grid-template-columns: 260px 1fr 180px; }
  .diagram__key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   REFINEMENT LAYER
   One sans + one serif, sentence-case labels, flatter cards, motion kept to
   the hero, and a sticky header that costs less screen height.
   ========================================================================== */
:root {
  --sans:  "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --label: var(--sans);
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(20,32,31,.06);
  --shadow-md: 0 1px 3px rgba(20,32,31,.08), 0 12px 28px rgba(20,32,31,.09);
}
body { font-size: 1.0625rem; }
h1, h2, h3, h4 { font-optical-sizing: auto; letter-spacing: -.018em; }
.media { border-radius: 4px; }
a:hover .media img { transform: none; }

/* labels: sentence case, no tracking */
.kicker, .meta, .btn, .arrow-link, .band__link, .subnav__label, .subnav__cta,
.utility__tag, .utility__nav a, .mobile-nav__label, .suggestion__cat, .search__submit,
.field label, .calc__result-label, .diagram__cap, .footer__tag, .footer__col h2,
.ad-slot__label, .ad-slot__box, .skip-link, .feature__flag, .ledger__cta {
  text-transform: none; letter-spacing: 0; font-size: .9rem;
}
.kicker { font-weight: 600; color: var(--forest); }
.meta { font-weight: 400; }
.btn, .search__submit, .arrow-link, .band__link, .ledger__cta, .subnav__cta,
.subnav__label, .feature__flag, .field label, .footer__col h2 { font-weight: 600; }
.btn { font-size: 1rem; }
.utility__tag, .utility__nav a, .ad-slot__label, .ad-slot__box, .suggestion__cat { font-size: .8125rem; font-weight: 400; }

/* links: underline instead of trailing arrows; drop repeated decorative icons */
.arrow-link svg, .band__link svg, .ledger__cta svg, .subnav__cta svg,
.topic__go, .cost__go, .cost__icon, .index-list__go { display: none; }
.arrow-link, .band__link, .ledger__cta {
  border: 0; padding-bottom: 0;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
}

/* header: collapse the editorial rail along with the utility bar */
.site-header.is-compact .subnav { display: none; }

/* hero */
.hero { background: var(--paper); }
.hero__lead { padding-right: 0; border-right: 0; }
.hero__title { font-size: clamp(2.6rem, 7.4vw, 4.75rem); line-height: 1.02; letter-spacing: -.032em; max-width: 15ch; }
.hero__dek { font-size: clamp(1.1rem, 1.7vw, 1.3rem); max-width: 40ch; }
.feature, .feature:hover { box-shadow: none; transform: none; }
.btn--primary:hover { transform: none; }

/* section headers (numerals removed — the sections are not a sequence) */
.band { grid-template-columns: 1fr; border-top-width: 1px; }
.band__title { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
.guides__list { border-top-width: 1px; }

/* topics: unframed, so the images and headings carry the layout */
.topic { background: none; border: 0; border-radius: 0; }
.topic:hover { box-shadow: none; transform: none; }
.topic__body { padding: 1rem 0 0; }
.topic h3 { font-size: 1.35rem; padding-right: 0; }
.topic a:hover h3 { color: var(--forest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

/* lists: lighter rules, no sliding hover */
.cost-grid { border-top: 1px solid var(--rule-strong); }
.cost { border-bottom: 1px solid var(--rule-strong); }
.cost a { grid-template-columns: 1fr; }
.cost a:hover { padding-left: 0; }
.index-list__item a:hover { padding-left: .25rem; }

/* tools ledger without numerals */
.ledger__item { grid-template-columns: 1fr; }
.ledger__cta { grid-column: 1; }

/* motion: one orchestrated moment (the hero); everything else is static */
.js .reveal { opacity: 1; transform: none; }
.js .hero .reveal { opacity: 1; transform: none; }

@media (min-width: 960px) {
  .band { grid-template-columns: 1fr auto; }
  .band__link { grid-column: auto; }
}


/* ---- Theme adaptations (ads off, article rhythm, tables, trust) ---- */
.ad-slot { display: none !important; }

.hero__trust {
  margin-top: var(--sp-3);
  font-size: .9rem;
  color: var(--ink-soft);
  max-width: 42rem;
}
.hero__trust a { color: var(--forest); font-weight: 600; }

.topic__icon {
  width: 2rem; height: 2rem; color: var(--forest);
  margin-bottom: .65rem;
}
.topic__icon img, .topic__icon svg { width: 100%; height: 100%; display: block; }

.hero__motif {
  position: absolute; right: 0; bottom: 0; width: min(42vw, 320px);
  color: var(--forest); opacity: .14; pointer-events: none;
}
.hero { position: relative; overflow: hidden; }

/* How we build band (replaces Smart tools / calculator) */
.build-band {
  background: var(--forest-deep);
  color: var(--paper);
  padding: var(--sp-7) 0;
}
.build-band .kicker { color: var(--amber-light); }
.build-band h2 { color: var(--paper); }
.build-band p, .build-band li { color: rgba(247,244,237,.85); }
.build-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: 1fr;
  margin-top: var(--sp-5);
}
@media (min-width: 768px) {
  .build-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
.build-card {
  border: 1px solid var(--rule-dark);
  border-radius: var(--radius);
  padding: var(--sp-4);
  background: rgba(255,255,255,.03);
}
.build-card h3 { color: var(--paper); font-size: 1.15rem; margin-bottom: .4rem; }
.build-band .soon {
  margin-top: var(--sp-4);
  font-size: .85rem;
  color: rgba(247,244,237,.55);
  font-style: italic;
}

/* Article / prose */
.csp-article-layout {
  display: grid; gap: 2rem; padding: 2rem 0 3.5rem;
  grid-template-columns: minmax(0,1fr);
}
@media (min-width: 1024px) {
  .csp-article-layout {
    grid-template-columns: minmax(0, 42rem) 15rem;
    justify-content: center; column-gap: 2.5rem;
  }
}
.csp-prose { max-width: 42rem; color: var(--ink); line-height: 1.75; }
.csp-prose h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.85rem, 3.5vw, 2.4rem); line-height: 1.15;
  margin: 0 0 .75rem; color: var(--ink);
}
.csp-prose h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.45rem; margin: 2.4rem 0 .85rem; padding-top: .35rem;
  border-top: 2px solid var(--forest); color: var(--ink);
  scroll-margin-top: 6rem;
}
.csp-prose h2:first-of-type { margin-top: 1.5rem; }
.csp-prose h3 { font-family: var(--serif); font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.csp-prose p, .csp-prose ul, .csp-prose ol { margin: 0 0 1rem; }
.csp-prose a { color: var(--forest); }
.csp-meta { color: var(--neutral); font-size: .9rem; margin-bottom: 1rem; }

.csp-takeaways {
  background: var(--sage);
  border: 1px solid var(--sage-deep);
  border-left: 4px solid var(--forest);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0 1.5rem;
}
.csp-takeaways strong { display: block; font-family: var(--label); font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--forest); margin-bottom: .4rem; }
.csp-callout-safety {
  background: var(--amber-soft); border-left: 4px solid var(--amber);
  padding: 1rem 1.15rem; margin: 1.25rem 0; border-radius: var(--radius); color: var(--amber-ink);
}
.csp-callout-pro {
  background: #E8EEF6; border-left: 4px solid #2F5F9E;
  padding: 1rem 1.15rem; margin: 1.25rem 0; border-radius: var(--radius);
}
.csp-cost-disclosure {
  background: var(--paper-warm); border-left: 4px solid var(--forest);
  padding: .9rem 1rem; margin: 1rem 0 1.4rem; font-size: .95rem;
}
details.csp-sources {
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-warm); margin: 1.75rem 0;
}
.csp-sources__summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 700; color: var(--ink); list-style: none; }
.csp-sources__summary::-webkit-details-marker { display: none; }
.csp-sources__body { padding: 0 1.1rem 1.1rem; }

.csp-table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0; max-width: min(100%, var(--wrap));
  border: 1px solid var(--rule); border-radius: var(--radius);
}
.csp-table-scroll:focus-visible { outline: 3px solid var(--forest); outline-offset: 2px; }
.csp-prose .csp-table-scroll { max-width: 100%; }
/* Allow article tables to use wider shell when in full-bleed wrap under article */
.csp-content .csp-table-scroll { width: 100%; }
@media (min-width: 1024px) {
  .csp-article-layout .csp-table-scroll {
    max-width: calc(42rem + 15rem + 2.5rem);
  }
}
.csp-prose table {
  width: 100%; min-width: 36rem; border-collapse: separate; border-spacing: 0;
  font-size: .9rem; margin: 0; display: table; background: var(--paper);
}
.csp-prose th, .csp-prose td {
  border-bottom: 1px solid var(--rule); padding: .55rem .65rem;
  text-align: left; vertical-align: top;
}
.csp-prose thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--sage); color: var(--ink); font-weight: 700;
  box-shadow: 0 1px 0 var(--rule);
}
.csp-prose tbody tr:nth-child(even) td { background: rgba(228,235,225,.45); }
.csp-prose tbody td:first-child, .csp-prose thead th:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--paper);
  box-shadow: 1px 0 0 var(--rule);
}
.csp-prose thead th:first-child { z-index: 3; background: var(--sage); }
.csp-prose tbody tr:nth-child(even) td:first-child { background: #EEF3EB; }

.csp-breadcrumb { font-size: .875rem; color: var(--neutral); margin: 1rem 0 0; }
.csp-breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.csp-breadcrumb li:not(:last-child)::after { content: "›"; margin-left: .35rem; }
.csp-breadcrumb a { color: var(--neutral); text-decoration: none; }
.csp-toc {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem; background: var(--paper-warm); font-size: .9rem;
  position: sticky; top: 6rem;
}
.csp-toc strong { display: block; margin-bottom: .5rem; color: var(--ink); }
.csp-toc ul { margin: 0; padding-left: 1.1rem; }
.csp-toc a { color: var(--ink-soft); text-decoration: none; }
.csp-toc a:hover { color: var(--forest); }
.csp-hub-intro { background: var(--sage); border-bottom: 1px solid var(--rule); padding: 2rem 0 1.5rem; }
.csp-hub-intro h1 { font-family: var(--serif); margin: 0 0 .5rem; }
.csp-unpublished { font-style: normal; font-weight: inherit; color: inherit; }
.csp-footer__soon { margin-top: 1rem; font-size: .85rem; color: rgba(247,244,237,.55); font-style: italic; }
.site-footer .csp-footer__soon { color: rgba(247,244,237,.55); }
.footer__disclaimer { font-size: .88rem; color: rgba(247,244,237,.7); max-width: 36rem; margin-top: 1rem; line-height: 1.55; }

.csp-skip {
  position: absolute; left: -9999px;
}
.csp-skip:focus { left: 1rem; top: 1rem; z-index: 1000; background: var(--paper); padding: .5rem 1rem; }

/* Feature without external photo fallback */
.feature__media--svg {
  background: var(--sage);
  display: grid; place-items: center; min-height: 220px;
  color: var(--forest);
}
.feature__media--svg svg { width: 70%; max-width: 280px; opacity: .55; }

.latest-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.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;
}
.topics-grid, .costs-grid, .guides-layout, .guides-stack, .edu__grid {
  display:grid; gap: var(--sp-4);
}
.topics-grid { grid-template-columns: 1fr; }
@media (min-width: 768px) { .topics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .topics-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.costs-grid { grid-template-columns: 1fr; }
@media (min-width: 768px) { .costs-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.guides-layout { grid-template-columns: 1fr; }
@media (min-width: 1024px) {
  .guides-layout { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.menu-toggle {
  display:none; font:inherit; font-weight:700; background:transparent;
  border:1px solid var(--rule); padding:.45rem .75rem; border-radius:var(--radius); color:var(--ink);
}
@media (max-width: 899px) {
  .primary-nav, .subnav { display:none; }
  .menu-toggle { display:inline-flex; margin-left:auto; }
  .mobile-nav:not([hidden]) {
    display:block; background: var(--paper); border-top:1px solid var(--rule);
    padding: var(--sp-3) var(--gutter) var(--sp-4);
  }
  .mobile-nav ul { list-style:none; padding:0; margin:0; }
  .mobile-nav a { display:block; padding:.7rem 0; color:var(--ink); text-decoration:none; font-weight:600; border-bottom:1px solid var(--rule); }
}
@media (min-width: 900px) {
  .mobile-nav { display:none !important; }
}
.logo { display:inline-flex; align-items:center; gap:.5rem; color:var(--ink); text-decoration:none; font-weight:700; }
.logo__mark { width:1.75rem; height:1.75rem; }
.header__bar { display:flex; align-items:center; gap:1rem; min-height:3.5rem; }
.primary-nav .csp-nav { display:flex; flex-wrap:wrap; gap:.35rem 1rem; list-style:none; padding:0; margin:0 0 0 auto; }
.primary-nav a { color:var(--ink); text-decoration:none; font-weight:600; font-size:.92rem; }
.feature__media img { width:100%; height:auto; display:block; border-radius: var(--radius); }
.btn { display:inline-flex; align-items:center; gap:.35rem; padding:.7rem 1.1rem; border-radius:var(--radius); font-weight:700; text-decoration:none; border:1px solid transparent; }
.btn--primary { background:var(--forest); color:var(--paper); }
.btn--ghost { border-color:var(--rule-strong); color:var(--ink); background:transparent; }
.hero__search { display:flex; flex-wrap:wrap; gap:.5rem; margin: var(--sp-4) 0 var(--sp-2); max-width:32rem; }
.hero__search input { flex:1 1 12rem; padding:.7rem .9rem; border:1px solid var(--rule-strong); border-radius:var(--radius); background:var(--paper-warm); }
.hero__actions { display:flex; flex-wrap:wrap; gap:.75rem; margin-top: var(--sp-3); }

/* --- WP template compatibility aliases (round 3) --- */
.csp-container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.csp-section { padding: 3rem 0; }
.csp-section__title { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: 0 0 1.25rem; color: var(--ink); }
.csp-grid { display: grid; gap: 1rem; }
.csp-grid--2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.csp-grid--3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.csp-card { background: var(--paper-2, #FBF8F2); border: 1px solid var(--rule); border-radius: 12px; padding: 1.25rem; }
.csp-card h3 { font-family: var(--serif); margin: 0 0 .5rem; font-size: 1.15rem; }
.csp-card h3 a { color: inherit; text-decoration: none; }
.csp-card h3 a:hover { color: var(--forest); }
.csp-latest { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.csp-latest li { border-bottom: 1px solid var(--rule); padding-bottom: .75rem; }
.csp-ad-slot { display: none; } /* ads off: no visible reserved boxes */

/* Round 3 a11y fixes */
.logo--footer .logo__text { color: var(--paper); }
.logo--footer .logo__mark { filter: brightness(1.35); }
.csp-prose a { text-decoration: underline; text-underline-offset: 2px; }
.csp-prose a:hover { color: var(--forest-deep, #12301F); }
.csp-toc a { display: inline-block; padding: .35rem 0; min-height: 44px; line-height: 1.3; }
.csp-toc li + li { margin-top: 0; }


/* ===== Round 4 layout fixes ===== */
.subnav { border-top: 1px solid var(--rule); background: var(--paper-warm); }
.subnav .wrap.subnav__inner, .subnav__inner {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 44px; width: min(var(--wrap), 100%);
  margin-inline: auto; padding-inline: var(--gutter);
}
.subnav__label {
  font-family: var(--label); font-size: .64rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--amber-ink);
  flex: none;
}
.subnav__links {
  display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-width: 0;
}
.subnav__links::-webkit-scrollbar { display: none; }
.subnav__links a {
  white-space: nowrap; font-size: .84rem; color: var(--ink-soft);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  text-decoration: none;
}
.subnav__links a:hover { color: var(--ink); border-color: var(--amber); }
.subnav__cta {
  display: none; align-items: center; gap: .45rem; flex: none;
  font-family: var(--label); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--forest);
  text-decoration: none; white-space: nowrap;
}
@media (min-width: 900px) {
  .subnav__cta { display: inline-flex; }
}

/* Topic cards with media tile */
.topic-grid, .topics-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  list-style: none; padding: 0; margin: 0;
}
@media (min-width: 640px) {
  .topic-grid, .topics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 960px) {
  .topic-grid, .topics-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
.topic {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.topic > a.topic__link, .topic > a:first-child { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.topic:hover { border-color: var(--forest); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.media {
  background-color: #E4EBE1;
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 6px, rgba(197,212,196,.55) 6px, rgba(197,212,196,.55) 7px);
  position: relative; overflow: hidden;
}
.media--topic { aspect-ratio: 3 / 2; display: grid; place-items: center; }
.media--topic .media__icon { width: 48px; height: 48px; opacity: .9; }
.media--lead { aspect-ratio: 3 / 2; margin-bottom: 1rem; border-radius: var(--radius); display: grid; place-items: center; }
.media--stack { aspect-ratio: 16 / 10; border-radius: var(--radius); display: grid; place-items: center; }
.media--row { aspect-ratio: 16 / 10; border-radius: var(--radius); display: grid; place-items: center; min-width: 0; }
.media--lead .media__icon, .media--stack .media__icon { width: 56px; height: 56px; }
.media--row .media__icon { width: 36px; height: 36px; }
.topic__body { position: relative; padding: 1.25rem 1.35rem 1.5rem; flex: 1; }
.topic__body h3 { font-size: 1.15rem; margin: 0 0 .45rem; font-family: var(--serif); }
.topic__body p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.topic__icon { display: none; } /* replaced by media tile */

/* Guides essential layout */
.band { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--rule-strong); padding-top: 1.25rem; margin-bottom: 1.5rem; }
.band__title { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.band__link { font-size: .85rem; color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.guides__top { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 900px) {
  .guides__top { grid-template-columns: 1.35fr 1fr; align-items: start; }
}
.guides__stack { display: grid; gap: 1.25rem; align-content: start; }
.story--stack { border-top: 1px solid var(--rule); padding-top: 1rem; }
.story--stack a { display: grid; gap: 1rem; color: inherit; text-decoration: none; }
@media (min-width: 600px) {
  .story--stack a { grid-template-columns: 160px 1fr; align-items: start; }
}
.story--lead a { color: inherit; text-decoration: none; display: block; }
.story__title { font-family: var(--serif); font-size: 1.18rem; line-height: 1.2; margin: 0 0 .45rem; }
.story__title--lead { font-size: clamp(1.45rem, 2.5vw, 2.1rem); line-height: 1.08; letter-spacing: -.02em; }
.story__excerpt { font-size: .94rem; color: var(--ink-soft); margin: 0 0 .5rem; }
.guides__list { margin-top: clamp(1.5rem, 3vw, 2.5rem); border-top: 2px solid var(--ink); list-style: none; padding: 0; }
.story--row { border-bottom: 1px solid var(--rule); }
.story--row a {
  display: grid; gap: 1rem; padding-block: 1.25rem; align-items: start; color: inherit; text-decoration: none;
}
@media (min-width: 700px) {
  .story--row a { grid-template-columns: 140px 1fr; }
}
.problems-lite .topic { background: var(--paper-warm); border-color: transparent; box-shadow: none; }
.problems-lite .topic:hover { border-color: var(--forest); box-shadow: var(--shadow-sm); }
.problems-lite .media--topic { aspect-ratio: 2.2 / 1; }

/* Hero motif: no overlap with feature card */
.hero__motif { display: none; }
@media (min-width: 960px) {
  .hero__motif {
    display: block; position: absolute; left: 0; bottom: 0;
    width: min(28vw, 220px); opacity: .1; pointer-events: none;
    z-index: 0;
  }
  .hero__grid > * { position: relative; z-index: 1; }
}
.hero { position: relative; overflow: hidden; }

/* Tighten edu + costs */
.section--edu { padding-block: 2rem; }
.section--edu .edu__grid { gap: 1.25rem; }
.section--edu .edu__highlights { margin-block: 1rem; }
.costs-grid { gap: 1rem; }
.cost { padding-bottom: .85rem; }
.cost p { font-size: .86rem; }

/* Meta line */
.csp-meta { font-size: .9rem; color: var(--ink-soft); margin: 0 0 1rem; }
.csp-toc { max-width: 16rem; }
.csp-toc a { display: block; padding: .4rem 0; min-height: auto; line-height: 1.35; overflow-wrap: anywhere; }

/* Round 4 length budget */
.section { padding-block: clamp(1.75rem, 3vw, 2.5rem); }
.build-band { padding-block: clamp(1.75rem, 3vw, 2.5rem); }
.build-grid { margin-top: 1rem; }
.guides__list { margin-top: 1.25rem; }
.band { margin-bottom: 1rem; padding-top: 1rem; }
.hero { padding-block: clamp(1.75rem, 3.5vw, 2.75rem); }
.latest-grid { gap: 0; }
.latest-grid li { padding: .75rem 0; }

/* Round 4 length budget v2 */
.media--topic { aspect-ratio: 2.4 / 1; }
.media--topic .media__icon { width: 40px; height: 40px; }
.media--lead { aspect-ratio: 2.2 / 1; margin-bottom: .75rem; }
.media--stack { aspect-ratio: 2 / 1; }
.media--row { aspect-ratio: 1.6 / 1; }
.topic__body { padding: 1rem 1.1rem 1.15rem; }
.topic__body h3 { font-size: 1.05rem; }
.topic__body p { font-size: .86rem; }
.guides__top { gap: 1.25rem; }
.story--row a { padding-block: .85rem; }
.story__title--lead { font-size: clamp(1.25rem, 2vw, 1.75rem); }
.feature__dek { font-size: .9rem; }
.hero__dek { font-size: 1rem; }
.site-footer { padding-block: 2rem; }
.problems-lite .media--topic { aspect-ratio: 2.8 / 1; }


/* ===== Round 5 ===== */

/* Hero: keep title in left column; feature top-aligned; wider dek */
.hero__copy { min-width: 0; max-width: 100%; }
.hero__title {
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.028em;
  max-width: 100%;
  overflow-wrap: balance;
  hyphens: manual;
}
.hero__dek {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  max-width: 64ch;
  color: var(--ink-soft);
}
.hero__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  align-items: start;
}
@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    column-gap: clamp(1.5rem, 3vw, 2.75rem);
    align-items: start;
  }
  .hero__copy { padding-right: .25rem; }
  .feature { margin-top: 0; align-self: start; }
}
@media (min-width: 1280px) {
  .hero__title { font-size: clamp(2.4rem, 3.2vw, 3.25rem); }
}
@media (min-width: 1440px) {
  .hero__title { font-size: 3.15rem; }
}

/* Compact tinted icon tiles — no large pale media blocks */
.media--topic,
.media--lead,
.media--stack,
.media--row { display: none !important; }

.topic__tile {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  background: #E4EBE1;
  color: var(--forest);
}
.topic__tile img {
  width: 24px;
  height: 24px;
  display: block;
}

.topic {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.topic:hover {
  border-color: var(--forest);
  box-shadow: var(--shadow-sm);
  transform: none;
}
.topic > a.topic__link,
.topic > a:first-child {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  height: 100%;
  color: inherit;
  text-decoration: none;
  padding: .85rem .9rem 1rem;
}
.topic__head {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.topic__head h3 {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.25;
  margin: .15rem 0 0;
  padding-right: 0;
}
.topic__body { padding: 0; }
.topic p {
  font-size: .84rem;
  color: var(--ink-soft);
  margin: 0;
  
}

/* 2-column topic grid from 390 up */
.topic-grid,
.topics-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (max-width: 359px) {
  .topic-grid,
  .topics-grid { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  .topic-grid,
  .topics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
  .topic > a.topic__link { padding: 1rem 1.05rem 1.15rem; }
  .topic__head h3 { font-size: 1.12rem; }
  .topic p { font-size: .9rem; }
}

.problems-lite .topic { background: var(--paper-warm); border-color: transparent; }
.problems-lite .topic:hover { border-color: var(--forest); }

/* Essential / story cards: compact heads, no empty media */
.story__head {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .55rem;
}
.story--lead a { display: block; color: inherit; text-decoration: none; }
.story--stack a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.story--stack { border-top: 1px solid var(--rule); padding-top: 1rem; }
.story--row a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .85rem;
  align-items: start;
  padding-block: 1rem;
  color: inherit;
  text-decoration: none;
}
@media (min-width: 700px) {
  .story--row a { grid-template-columns: auto 1fr; }
}

/* Hide calculator footer chrome remnants */
.csp-footer__soon { display: none !important; }

/* Feature media radius already set; ensure LCP image can't overflow */
.feature__media { overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.feature__media img { width: 100%; height: auto; display: block; }


/* R5 CLS / LCP hardening */
.feature__media {
  aspect-ratio: 960 / 640;
  background: var(--sage);
}
.feature__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 640;
  object-fit: cover;
}
@media (max-width: 599px) {
  /* Stabilize stacked hero while webfonts swap */
  .hero__title {
    min-height: 3.4em;
  }
}

/* prose font CLS: reserve heading rhythm */
.csp-prose h1 { min-height: 1.15em; }

/* ===== Round 5b — narrow topic/essential card fixes ===== */

/* Titles must wrap; never clip in 2-col grids */
.topic__head,
.story__head,
.topic > a.topic__link,
.topic {
  min-width: 0;
}
.topic__head h3,
.topic h3,
.story__title,
.story__title--lead {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  min-width: 0;
  max-width: 100%;
}

/* Remove description clamps everywhere (no mid-word ellipses) */
.topic p,
.topic-grid .topic p,
.topics-grid .topic p,
.problems-lite .topic p {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
  text-overflow: unset;
}

/* Narrow (≤639): tile ABOVE title, 32px tile; hide descriptions → tight list grid */
@media (max-width: 639px) {
  .topic__tile {
    width: 32px;
    height: 32px;
    border-radius: 7px;
  }
  .topic__tile img {
    width: 18px;
    height: 18px;
  }
  .topic__head {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
  .topic__head h3 {
    font-size: .95rem;
    line-height: 1.22;
    margin: 0;
  }
  .topic > a.topic__link,
  .topic > a:first-child {
    padding: .7rem .75rem .8rem;
    gap: .35rem;
  }
  /* Chose: hide descriptions at narrow widths (title-only tight list). No new copy. */
  .topic-grid .topic p,
  .topics-grid .topic p,
  .problems-lite .topic p {
    display: none;
  }

  /* Essential cards: keep titles wrapping; stack tile above text */
  .story__head {
    flex-direction: column;
    align-items: flex-start;
    gap: .4rem;
  }
  .story--row a {
    grid-template-columns: 1fr;
    gap: .45rem;
  }
  .story--row .topic__tile {
    width: 32px;
    height: 32px;
  }
  .story__title,
  .story__title--lead {
    font-size: 1.05rem;
  }
  .story__title--lead {
    font-size: 1.25rem;
  }
}

/* Mid (640–1023): tile beside title but small; descriptions visible, no clamp */
@media (min-width: 640px) and (max-width: 1023px) {
  .topic__tile {
    width: 36px;
    height: 36px;
  }
  .topic__tile img {
    width: 20px;
    height: 20px;
  }
  .topic__head {
    flex-direction: row;
    align-items: flex-start;
    gap: .55rem;
  }
  .topic__head h3 {
    font-size: 1.02rem;
  }
  .topic p {
    font-size: .86rem;
  }
  .story__head {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Desktop ≥1024: comfortable tiles + full descriptions */
@media (min-width: 1024px) {
  .topic__tile {
    width: 44px;
    height: 44px;
  }
  .topic__tile img {
    width: 24px;
    height: 24px;
  }
  .topic__head {
    flex-direction: row;
  }
  .topic p {
    font-size: .9rem;
  }
}
