/* ==========================================================================
   BizoNow — editorial design system
   Hand-written, dependency-free. Works offline and on any static host.
   ========================================================================== */

:root {
  --bg: #fcfbf8;
  --bg-alt: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --ink: #14181f;
  --ink-soft: #333c47;
  --muted: #5c6673;
  --line: #e5e1d8;
  --line-strong: #d3cec2;
  --brand: #0e5b4a;
  --brand-strong: #0a4438;
  --brand-soft: #e6f2ee;
  --brand-ink: #f6fbf9;
  --signal: #c2410c;
  --signal-soft: #fdf0e7;
  --ok: #0f7a52;
  --warn: #a15c07;
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.04), 0 12px 32px -18px rgba(20, 24, 31, 0.25);
  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1180px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  --bg: #0e1217;
  --bg-alt: #131820;
  --surface: #161b23;
  --surface-2: #1b212a;
  --ink: #ecebe5;
  --ink-soft: #cdd3da;
  --muted: #99a3ae;
  --line: #262e38;
  --line-strong: #364150;
  --brand: #4fd1a5;
  --brand-strong: #7ee0bf;
  --brand-soft: #12291f;
  --brand-ink: #08120e;
  --signal: #f0b357;
  --signal-soft: #2a2113;
  --ok: #4fd1a5;
  --warn: #f0b357;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }

a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1em; }

.icon { width: 20px; height: 20px; flex: none; }
.icon--xs { width: 15px; height: 15px; }
.icon--lg { width: 26px; height: 26px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.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 {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: var(--brand-ink); padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

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

/* ---------------------------------------------------------------- ticker */
.ticker {
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 0.835rem;
}
.ticker__inner { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0; }
.ticker p { margin: 0; opacity: 0.95; }
.ticker strong { font-weight: 650; }
.ticker__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-ink) 22%, transparent);
  flex: none;
}
.ticker__link {
  margin-left: auto; color: var(--brand-ink); font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--brand-ink) 45%, transparent);
}
.ticker__link:hover { color: var(--brand-ink); border-bottom-color: var(--brand-ink); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 1.2rem; padding: 0.7rem 0; }

.brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.16rem; text-decoration: none; color: inherit; }
.brand__logo { display: block; height: 31px; width: auto; }
.brand__logo--dark { display: none; }
html[data-theme="dark"] .brand__logo--light { display: none; }
html[data-theme="dark"] .brand__logo--dark { display: block; }
.brand__tag { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.02em; white-space: nowrap; }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  display: block; padding: 0.45rem 0.7rem; border-radius: 999px;
  color: var(--ink-soft); text-decoration: none; font-size: 0.94rem; font-weight: 500;
}
.nav__list a:hover { background: var(--surface-2); color: var(--ink); }
.nav__list a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); font-weight: 620; }

.site-header__tools { display: flex; align-items: center; gap: 0.35rem; }
.iconbtn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid transparent; border-radius: 10px; background: transparent;
  color: var(--ink-soft); cursor: pointer; padding: 0;
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn__moon { display: none; }
html[data-theme="dark"] .iconbtn__sun { display: none; }
html[data-theme="dark"] .iconbtn__moon { display: grid; }
.iconbtn--menu { display: none; }
.burger { display: grid; gap: 4px; width: 18px; }
.burger i { display: block; height: 2px; background: currentColor; border-radius: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.7rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.88rem; }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-strong); }
.btn--link { padding: 0; background: none; color: var(--brand); }
.btn--block { width: 100%; }

/* ------------------------------------------------------------- search ui */
.search-overlay {
  position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, #0b0f14 55%, transparent);
  backdrop-filter: blur(3px); padding: 8vh 1.25rem 2rem; overflow-y: auto;
}
.search-overlay[hidden] { display: none; }
.search-overlay__panel {
  width: min(100%, 720px); margin-inline: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.search-overlay__bar { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-overlay__bar input {
  flex: 1; border: 0; background: none; font: inherit; font-size: 1.05rem; color: var(--ink); padding: 0.35rem 0;
}
.search-overlay__bar input:focus { outline: none; }
.search-overlay__bar kbd {
  font-family: var(--font-mono); font-size: 0.72rem; border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 0.15rem 0.4rem; color: var(--muted);
}
.search-overlay__results { max-height: 62vh; overflow-y: auto; padding: 0.5rem; }
.search-overlay__hint, .search-overlay__empty { color: var(--muted); font-size: 0.92rem; padding: 0.9rem 0.8rem; margin: 0; }
.search-hit { display: block; padding: 0.7rem 0.8rem; border-radius: var(--radius-sm); text-decoration: none; color: inherit; }
.search-hit:hover, .search-hit.is-active { background: var(--surface-2); }
.search-hit__title { font-weight: 620; color: var(--ink); display: flex; align-items: center; gap: 0.45rem; }
.search-hit__desc { font-size: 0.88rem; color: var(--muted); margin-top: 0.15rem; }
.search-hit__kicker { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-strong); background: var(--brand-soft); border-radius: 5px; padding: 0.1rem 0.35rem; font-weight: 700; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 3.4rem 0 3rem; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -10% -60% 55%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 14%, transparent), transparent);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: start; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 0 0.9rem;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; color: var(--brand-strong);
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.35rem); margin-bottom: 0.6rem; }
.hero__dek { font-size: 1.14rem; color: var(--ink-soft); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.5rem 0 1.6rem; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 0.35rem 1.3rem; list-style: none; padding: 0; margin: 0; font-size: 0.88rem; color: var(--muted); }
.hero__proof li { display: flex; align-items: center; gap: 0.4rem; }
.hero__proof .icon { color: var(--ok); }

.hero__panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.hero__panel h2 { font-size: 1.06rem; margin-bottom: 0.2rem; }
.hero__panel > p { font-size: 0.88rem; color: var(--muted); }
.pathlist { list-style: none; margin: 0.9rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.pathlist a {
  display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: inherit;
  background: var(--surface-2);
}
.pathlist a:hover { border-color: var(--brand); background: var(--brand-soft); }
.pathlist .icon { color: var(--brand); margin-top: 0.15rem; }
.pathlist b { display: block; font-size: 0.96rem; }
.pathlist span { font-size: 0.84rem; color: var(--muted); }

/* ------------------------------------------------------------- sections */
.section { padding: 3.2rem 0; border-bottom: 1px solid var(--line); }
.section--alt { background: var(--bg-alt); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.8rem; }
.section__head h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin: 0 0 0.25rem; }
.section__head p { margin: 0; color: var(--muted); max-width: 62ch; font-size: 0.97rem; }
.section__more { white-space: nowrap; font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 0.3rem; }

.grid { display: grid; gap: 1.15rem; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; text-decoration: none; color: inherit; height: 100%;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.card__kicker {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--brand-strong);
}
.card h3 { font-size: 1.16rem; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.card__meta { margin-top: auto; padding-top: 0.6rem; font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.card--feature { background: linear-gradient(180deg, var(--brand-soft), var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.card__icon { color: var(--brand); }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem;
}
.stat b { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.1; }
.stat span { font-size: 0.84rem; color: var(--muted); }

/* -------------------------------------------------------------- toolbox */
.tool-card { display: grid; gap: 0.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.tool-card__head { display: flex; align-items: center; gap: 0.7rem; }
.tool-card__head .icon { color: var(--brand); }
.tool-card h3 { margin: 0; font-size: 1.12rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.tool-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.9rem; }

/* ------------------------------------------------------------- glossary */
.glossary-search { position: relative; max-width: 460px; margin-bottom: 1.6rem; }
.glossary-search input {
  width: 100%; padding: 0.75rem 1rem 0.75rem 2.6rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem;
}
.glossary-search .icon { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.glossary-group { margin-bottom: 2rem; }
.glossary-group__letter {
  font-family: var(--font-display); font-size: 1.35rem; color: var(--brand-strong);
  border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; margin-bottom: 0.9rem;
}
.term { padding: 0.85rem 0; border-bottom: 1px dashed var(--line); }
.term:last-child { border-bottom: 0; }
.term dt { font-weight: 650; font-size: 1.02rem; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.term dt .tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-strong); background: var(--brand-soft); border-radius: 5px; padding: 0.1rem 0.4rem; font-family: var(--font-sans); }
.term dd { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* --------------------------------------------------- filters & lookups */

/* ---------------------------------------------------------------- media */
.media { display: block; overflow: hidden; }
.media img { display: block; width: 100%; height: 100%; }
.media--card {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface-2) 65%, #f3ecdf 100%);
  border-bottom: 1px solid var(--line);
}
.media--card img { object-fit: cover; object-position: center 62%; }
.card--media { padding: 0; overflow: hidden; }
.card--media:hover .media--card img { transform: scale(1.015); }
.media--card img { transition: transform 0.4s ease; }
.card__body { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
.card--media .card__meta { margin-top: auto; }

.band { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.band img { display: block; width: 100%; height: auto; }
.band__caption {
  margin: 0; padding: 0.85rem 1.2rem; border-top: 1px solid var(--line);
  font-size: 0.86rem; color: var(--muted); background: var(--surface-2);
}
.band--soft { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.band--wide img { max-height: 400px; object-fit: cover; object-position: center 50%; }

.page-art {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--bg) 92%);
  overflow: hidden;
}
.page-art img { display: block; width: min(100%, 1600px); margin-inline: auto; }
.page-art--tight img { max-height: none; }

.section--leaf { position: relative; }
.section--leaf::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("/assets/img/pattern-botanical.svg");
  background-size: 320px 320px;
  background-position: right -40px top -20px;
  opacity: 0.85; pointer-events: none;
}
.section--leaf > .wrap { position: relative; }

/* The illustrations are drawn in a light "paper plate" palette, so in dark mode
   they keep a light backing rather than being dimmed into the background. */
html[data-theme="dark"] .media--card,
html[data-theme="dark"] .band,
html[data-theme="dark"] .page-art {
  background: linear-gradient(135deg, #f6f4ee 0%, #eef1ec 58%, #f7f0e7 100%);
}
html[data-theme="dark"] .band__caption { background: #eceae3; color: #4a5259; }
.filterbar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.6rem; }
.chipbtn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.42rem 0.85rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font: inherit; font-size: 0.86rem;
  cursor: pointer;
}
.chipbtn:hover { border-color: var(--brand); color: var(--brand-strong); }
.chipbtn.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 620; }
.chipbtn span { opacity: 0.72; font-size: 0.8em; }

.ing-list { display: grid; gap: 1rem; }
.ing {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; scroll-margin-top: 6rem;
}
.ing__head { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.ing__head h3 { margin: 0; font-size: 1.16rem; }
.ing__aliases { font-size: 0.86rem; color: var(--muted); margin: 0 0 0.8rem; }
.ing__fields { margin: 0; display: grid; gap: 0.7rem; }
.ing__fields > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0.9rem; }
.ing__fields dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 0.15rem; }
.ing__fields dd { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.ing__caution { border-top: 1px dashed var(--line); padding-top: 0.7rem; }
.ing__caution dt { color: var(--warn); }

.cert-group { margin-bottom: 2.6rem; }
.cert-group__head { margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.6rem; }
.cert-group__head h2 { font-size: 1.4rem; margin: 0 0 0.2rem; }
.cert-group__head p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.cert {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; scroll-margin-top: 6rem;
}
.cert h3 { margin: 0 0 0.15rem; font-size: 1.1rem; }
.cert__full { font-size: 0.86rem; color: var(--muted); margin: 0 0 0.4rem; }
.cert__issuer { display: flex; align-items: center; gap: 0.35rem; font-size: 0.84rem; color: var(--muted); margin: 0 0 0.8rem; }
.cert__fields { margin: 0; display: grid; gap: 0.6rem; font-size: 0.92rem; }
.cert__fields dt { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cert__fields dd { margin: 0.15rem 0 0; color: var(--ink-soft); }
.cert__proves dt { color: var(--ok); }
.cert__not dt { color: var(--signal); }

.market {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; scroll-margin-top: 6rem;
}
.market__head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.market__head h2 { margin: 0; font-size: 1.3rem; }
.market__flag {
  display: inline-grid; place-items: center; width: 40px; height: 30px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em;
}
.market__fields { margin: 0; display: grid; gap: 0.8rem; }
.market__fields > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0.9rem; }
.market__fields dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 0.15rem; }
.market__fields dd { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.market__fields ul { margin: 0; padding-left: 1.1rem; }
.market__fields li { margin-bottom: 0.25rem; }
.market__watch { border-top: 1px dashed var(--line); padding-top: 0.7rem; }
.market__watch dt { color: var(--warn); }
.market__authority { margin: 0.9rem 0 0; font-size: 0.86rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }

.checkgroup { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.9rem 1rem 0.4rem; margin: 0 0 0.9rem; }
.checkgroup legend { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-strong); padding: 0 0.4rem; }
.checkgroup__weight { color: var(--muted); font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.checkitem { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 0.6rem; align-items: start; padding: 0.4rem 0; font-size: 0.93rem; color: var(--ink-soft); cursor: pointer; }
.checkitem input { margin: 0.2rem 0 0; width: 16px; height: 16px; accent-color: var(--brand); }

/* ---------------------------------------------------------------- prose */
/* A `.wrap.prose` section keeps the full grid width so tables have room, while
   the reading text is capped at a comfortable measure inside it. */
.wrap.prose { max-width: none; }
.wrap.prose > p,
.wrap.prose > ul,
.wrap.prose > ol,
.wrap.prose > h2,
.wrap.prose > h3,
.wrap.prose > blockquote,
.wrap.prose > .lede,
.wrap.prose > .callout,
.wrap.prose > .takeaways,
.wrap.prose > .faq,
.wrap.prose > .related,
.wrap.prose > .filterbar,
.wrap.prose > .glossary-search { max-width: 72ch; }
.wrap.prose > .table-scroll { max-width: min(100%, 1040px); }
.prose { max-width: 72ch; }
.prose > p:first-of-type { font-size: 1.08rem; color: var(--ink-soft); }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.78rem); margin: 2.4rem 0 0.7rem; scroll-margin-top: 6rem; }
.prose h3 { font-size: 1.16rem; margin: 1.8rem 0 0.5rem; scroll-margin-top: 6rem; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--brand); }
.prose strong { font-weight: 660; }
.prose code {
  font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 0.08em 0.35em;
}
.prose blockquote {
  margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.1rem; border-left: 3px solid var(--brand);
  color: var(--ink-soft); font-family: var(--font-display); font-size: 1.1rem;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.table-scroll { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; min-width: 520px; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 650; font-size: 0.85rem; letter-spacing: 0.02em; }
tbody tr:last-child td { border-bottom: 0; }
td code, th code { white-space: nowrap; }

/* -------------------------------------------------------------- article */
.article { padding: 2rem 0 3.2rem; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

.article__head { max-width: 78ch; margin-bottom: 2rem; }
.article__head h1 { font-size: clamp(1.95rem, 4vw, 2.8rem); margin-bottom: 0.55rem; }
.dek { font-size: 1.13rem; color: var(--ink-soft); margin: 0 0 1rem; }
.meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0; font-size: 0.84rem; color: var(--muted); }
.meta__item { display: inline-flex; align-items: center; gap: 0.35rem; }

.article__grid { display: grid; gap: 2.6rem; }
.article__grid--with-aside { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.article__aside { position: sticky; top: 5.5rem; display: grid; gap: 1rem; }

/* The body column takes the full grid width so tables have room, while the
   reading text stays at a comfortable measure. */
.article__body { max-width: none; }
.article__body > p,
.article__body > ul,
.article__body > ol,
.article__body > h2,
.article__body > h3,
.article__body > blockquote,
.article__body > .callout,
.article__body > .takeaways,
.article__body > .faq,
.article__body > .related { max-width: 72ch; }
.article__body > .table-scroll { max-width: 100%; }

.aside-cta {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem;
  background: var(--surface-2);
}
.aside-cta__kicker {
  display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.5rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-strong);
}
.aside-cta__text { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 0.8rem; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.toc__title { display: flex; align-items: center; gap: 0.45rem; font-family: var(--font-sans); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); margin: 0 0 0.6rem; }
.toc ol { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; }
.toc li { margin-bottom: 0.35rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }

.takeaways {
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  border-radius: var(--radius); padding: 1.3rem 1.4rem; margin: 0 0 2rem;
}
.takeaways h2 { font-size: 1.05rem; margin: 0 0 0.6rem; font-family: var(--font-sans); letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.82rem; color: var(--brand-strong); }
.takeaways ul { margin: 0; padding-left: 1.2rem; }
.takeaways li { margin-bottom: 0.4rem; color: var(--ink-soft); font-size: 0.96rem; }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--brand); background: var(--surface); border-radius: var(--radius-sm); padding: 1rem 1.15rem; margin: 1.6rem 0; }
.callout--warn { border-left-color: var(--warn); background: var(--signal-soft); }
.callout--tip { border-left-color: var(--ok); }
.callout__title { display: flex; align-items: center; gap: 0.45rem; font-weight: 680; margin: 0 0 0.35rem; font-size: 0.95rem; }
.callout__body > :last-child { margin-bottom: 0; }
.callout__body { font-size: 0.95rem; }

.faq { margin-top: 2.5rem; }
.faq h2 { font-size: 1.45rem; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  cursor: pointer; padding: 0.9rem 0; font-weight: 600; font-size: 1.02rem; list-style: none;
  display: flex; align-items: center; gap: 0.6rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before { content: "+"; color: var(--brand); font-family: var(--font-mono); font-size: 1.15rem; line-height: 1; width: 1rem; }
.faq__item[open] summary::before { content: "–"; }
.faq__answer { padding: 0 0 1rem 1.6rem; color: var(--ink-soft); font-size: 0.96rem; }
.faq__answer p { margin: 0 0 0.7rem; }

.related { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.related h2 { font-size: 1.2rem; }

/* ------------------------------------------------------------ newsletter */
.newsletter { background: var(--brand); color: var(--brand-ink); padding: 2.6rem 0; }
.newsletter__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2.2rem; align-items: center; }
.newsletter .eyebrow { color: color-mix(in srgb, var(--brand-ink) 85%, transparent); }
.newsletter h2 { color: var(--brand-ink); font-size: clamp(1.4rem, 2.6vw, 1.95rem); margin-bottom: 0.4rem; }
.newsletter p { color: color-mix(in srgb, var(--brand-ink) 88%, transparent); margin-bottom: 0.5rem; }
.newsletter__small { font-size: 0.85rem; opacity: 0.85; margin: 0; }
.newsletter__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; }
.newsletter__form input {
  padding: 0.8rem 1rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand-ink) 30%, transparent);
  background: color-mix(in srgb, var(--brand-ink) 12%, transparent); color: var(--brand-ink); font: inherit;
}
.newsletter__form input::placeholder { color: color-mix(in srgb, var(--brand-ink) 62%, transparent); }
.newsletter__form .btn--primary { background: var(--brand-ink); color: var(--brand-strong); }
.newsletter__form .btn--primary:hover { background: #fff; color: var(--brand-strong); }
.newsletter__status { grid-column: 1 / -1; margin: 0; font-size: 0.87rem; min-height: 1.2rem; }
.newsletter__form--soon { display: grid; gap: 0.7rem; justify-items: start; }
.newsletter__form--soon .newsletter__small { margin: 0; display: flex; gap: 0.45rem; align-items: center; }
.newsletter__status[data-state="error"] { color: #ffd9c7; }
.newsletter__status[data-state="ok"] { color: #d6fff0; }

/* ---------------------------------------------------------------- cards */
.hub-hero { padding: 2.6rem 0 2rem; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.hub-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 0.4rem; }
.hub-hero p { max-width: 68ch; color: var(--ink-soft); margin-bottom: 0; }

.list-rows { display: grid; gap: 0.9rem; }
.rowitem {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; text-decoration: none; color: inherit;
}
.rowitem:hover { border-color: var(--brand); }
.rowitem__num { font-family: var(--font-display); font-size: 1.3rem; color: var(--brand); }
.library-desk { display: grid; gap: 0.7rem; }
.library-desk__items { padding-left: 3.6rem; }
.library-desk .rowitem__num {
  font-family: var(--font-sans); display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong);
}
.rowitem h3 { margin: 0 0 0.15rem; font-size: 1.05rem; }
.rowitem p { margin: 0; font-size: 0.9rem; color: var(--muted); }
.rowitem .icon { color: var(--muted); }

/* --------------------------------------------------------------- forms */
.form-grid { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.88rem; font-weight: 620; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.7rem 0.85rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.95rem;
}
.field__hint { font-size: 0.8rem; color: var(--muted); }

/* -------------------------------------------------------- calculators */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.calc__panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.calc__panel h2 { font-size: 1.1rem; font-family: var(--font-sans); letter-spacing: 0.01em; }
.calc__fields { display: grid; gap: 0.9rem; }
.calc__field { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 0.7rem; align-items: center; }
.calc__field label { font-size: 0.92rem; }
.calc__field input, .calc__field select {
  padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: 0.95rem; text-align: right;
}
.calc__field select { text-align: left; }
.calc__field .field__hint { grid-column: 1 / -1; margin: -0.35rem 0 0; }
.calc__out { display: grid; gap: 0.5rem; }
.calc__line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px dashed var(--line); font-size: 0.95rem; }
.calc__line span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.calc__line--total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 0.3rem; padding-top: 0.7rem; font-size: 1.08rem; }
.calc__line--total span:last-child { font-family: var(--font-display); font-size: 1.35rem; }
.calc__note { font-size: 0.82rem; color: var(--muted); margin: 0.9rem 0 0; }
.calc__panel .divider { margin: 1.1rem 0; }
.meter { height: 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: 0.35rem 0 0.6rem; }
.meter span { display: block; height: 100%; background: var(--brand); width: 0; transition: width 0.25s ease; }
.pill { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.78rem; font-weight: 650; background: var(--brand-soft); color: var(--brand-strong); }
.pill--warn { background: var(--signal-soft); color: var(--warn); }

/* --------------------------------------------------------------- footer */

/* -------------------------------------------------------------- sponsor */
.sponsor__badge {
  display: inline-block; padding: 0.18rem 0.6rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--signal) 45%, transparent);
  background: var(--signal-soft); color: var(--signal);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.sponsor__badge--sm { font-size: 0.62rem; padding: 0.12rem 0.45rem; letter-spacing: 0.1em; }
.sponsor__head { max-width: 72ch; margin-bottom: 1.6rem; }
.sponsor__head h2 { margin: 0.6rem 0 0.4rem; font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
.sponsor__head p { margin: 0; color: var(--ink-soft); }
.sponsor__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.sponsor__card {
  position: relative; display: grid; gap: 0.25rem; padding: 1.15rem 1.25rem 1.3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.sponsor__card:hover { border-color: var(--signal); transform: translateY(-2px); box-shadow: var(--shadow); }
.sponsor__kind {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.sponsor__card strong { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.2; }
.sponsor__domain { font-family: var(--font-mono); font-size: 0.78rem; color: var(--brand-strong); }
.sponsor__blurb { font-size: 0.88rem; color: var(--muted); margin-top: 0.2rem; }
.sponsor__arrow { color: var(--signal); margin-top: 0.5rem; }
.sponsor__note {
  display: flex; align-items: flex-start; gap: 0.4rem;
  margin: 1.3rem 0 0; font-size: 0.82rem; color: var(--muted); max-width: 78ch;
}

.sponsor-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.sponsor-strip__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.2rem; padding: 0.7rem 0;
}
.sponsor-strip__label { display: flex; align-items: center; gap: 0.55rem; margin: 0; font-size: 0.84rem; color: var(--muted); }
.sponsor-strip__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; list-style: none; margin: 0; padding: 0; }
.sponsor-strip__links a {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  font-size: 0.84rem; font-weight: 620; color: var(--ink-soft); text-decoration: none;
}
.sponsor-strip__links a:hover { color: var(--signal); text-decoration: underline; }
.sponsor-strip__links a span {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}

.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 2.8rem 0 1.6rem; margin-top: 0; }
.footer__top { display: grid; grid-template-columns: 1.7fr repeat(4, minmax(0, 1fr)); gap: 1.6rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.footer__blurb { font-size: 0.9rem; color: var(--muted); margin: 0.8rem 0 0.6rem; max-width: 42ch; }
.footer__note { font-size: 0.83rem; color: var(--muted); display: flex; gap: 0.4rem; align-items: flex-start; margin: 0; }
.brand--footer .brand__logo { height: 27px; }
.footer__title { font-family: var(--font-sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.7rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer__col a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.footer__col a:hover { color: var(--brand); text-decoration: underline; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; padding-top: 1.2rem; font-size: 0.82rem; color: var(--muted); }
.footer__bottom p { margin: 0; display: flex; align-items: center; gap: 0.35rem; }

/* -------------------------------------------------------------- progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; background: transparent; }
.progress[hidden] { display: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--signal); }

/* ------------------------------------------------------------ utilities */
.center { text-align: center; }
.stack { display: grid; gap: 1rem; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.chip-list a {
  display: inline-block; padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 0.87rem; text-decoration: none; color: var(--ink-soft);
}
.chip-list a:hover { border-color: var(--brand); color: var(--brand-strong); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .article__grid--with-aside { grid-template-columns: 1fr; }
  .article__aside { position: static; }
  .footer__top { grid-template-columns: 1fr 1fr 1fr; gap: 1.6rem; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .nav { display: none; }
  .iconbtn--menu { display: inline-grid; }
  .site-header__cta { display: none; }
  .site-header.is-open .nav {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 0.6rem 0 1rem;
    box-shadow: var(--shadow);
  }
  .site-header.is-open .nav__list { flex-direction: column; gap: 0.1rem; }
  .site-header.is-open .nav__list a { border-radius: var(--radius-sm); padding: 0.7rem 1.25rem; font-size: 1rem; }
  .site-header.is-open .nav__list a[aria-current="page"] { background: transparent; color: var(--brand); }
  .ticker__link { display: none; }
  .ticker { font-size: 0.79rem; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  .grid--3, .grid--2, .stat-row, .calc { grid-template-columns: 1fr; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .newsletter__inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .rowitem { grid-template-columns: 34px minmax(0, 1fr); }
  .rowitem .icon { display: none; }
  .calc__field { grid-template-columns: 1fr; }
  .calc__field input, .calc__field select { text-align: left; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .ing__fields > div, .market__fields > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .ing__fields dt, .market__fields dt { padding-top: 0.5rem; }
  .sponsor__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 1.6rem, var(--wrap)); }
  .footer__top { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: 1fr; }
  .brand__tag { display: none; }
  .newsletter__form { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .ticker, .newsletter, .site-footer, .progress, .search-overlay { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article__body { max-width: none; }
}

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