/* BrewInsight — website chrome. Built entirely on the design-system tokens.
 * Cream + charcoal spine, forest lead accent, amber money hint, deep-green dark. */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-structure);
  font-size: var(--ui-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint paper grain over the cream */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

#root { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section { padding: var(--space-10) 0; }
.section--tight { padding: var(--space-9) 0; }

/* ---- Typography helpers ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  font-size: var(--ui-sm);
  color: var(--body-grey);
  line-height: 1;
}
.eyebrow::after {
  content: "";
  display: inline-block;
  width: 38px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.display {
  font-weight: var(--fw-black);
  font-size: clamp(40px, 6.2vw, 78px);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.h1 {
  font-weight: var(--fw-extrabold);
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-weight: var(--fw-extrabold);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-weight: var(--fw-bold);
  font-size: var(--ui-h2);
  line-height: 1.15;
  margin: 0;
}
.lead {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  text-wrap: pretty;
  max-width: 44ch;
}
.body { color: var(--text-muted); margin: 0; text-wrap: pretty; }

.accent { color: var(--forest); }
.accent-amber { color: var(--amber); }
.accent-lime { color: var(--lime); }

.aside {
  font-family: var(--font-annotation);
  font-weight: 700;
  font-size: 1.45em;
  color: var(--forest);
  line-height: 1;
}

/* ---- Site header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--track-grey);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 72px;
}
.brand-link { display: inline-flex; align-items: center; gap: 12px; }
.brand-link .mark { color: var(--forest); display: inline-flex; }
.brand-link .word {
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-wordmark);
  text-transform: uppercase;
  font-size: var(--ui-sm);
  color: var(--ink);
  padding-left: 0.34em;
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav__links { display: flex; align-items: center; gap: var(--space-6); }
.nav__link {
  font-weight: var(--fw-medium);
  font-size: var(--ui-base);
  color: var(--body-grey);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease-standard);
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: var(--fw-semibold); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--forest);
}

/* ---- Buttons (web scale; mirror DS Button) ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  font-family: var(--font-structure);
  font-weight: var(--fw-semibold);
  font-size: var(--ui-base);
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: filter var(--dur-fast) var(--ease-standard);
}
.btn:hover { filter: brightness(0.94); }
.btn:active { filter: brightness(0.88); }
.btn--forest { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.btn--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn--lime { background: var(--lime); color: var(--deep-green); border-color: var(--lime); }
.btn--amber { background: var(--amber); color: var(--paper); border-color: var(--amber); }
.btn--lg { font-size: var(--ui-lg); padding: 16px 30px; }
.btn .ico { width: 18px; height: 18px; }

/* ---- Cards ---- */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
  border: 1px solid color-mix(in srgb, var(--track-grey) 70%, transparent);
}
.feature-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--forest) 10%, var(--paper));
  color: var(--forest);
  margin-bottom: var(--space-4);
}
.feature-ico svg { width: 24px; height: 24px; }

.grid { display: grid; gap: var(--space-5); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---- Corner-bracket frame device ---- */
.framed { position: relative; }
.framed > .corner {
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none;
}
.framed > .corner.tl { top: 0; left: 0; border-top: 2px solid var(--frame-line); border-left: 2px solid var(--frame-line); }
.framed > .corner.tr { top: 0; right: 0; border-top: 2px solid var(--frame-line); border-right: 2px solid var(--frame-line); }
.framed > .corner.bl { bottom: 0; left: 0; border-bottom: 2px solid var(--frame-line); border-left: 2px solid var(--frame-line); }
.framed > .corner.br { bottom: 0; right: 0; border-bottom: 2px solid var(--frame-line); border-right: 2px solid var(--frame-line); }

/* ---- Dark (deep-green) surface ---- */
.dark {
  background: var(--deep-green);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}
.dark .lead, .dark .body { color: var(--text-on-dark-muted); }
.dark .eyebrow { color: var(--dark-text); }

/* ---- Pill / source badge (web) ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--ui-xs);
  line-height: 1;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}
.pill--source { color: var(--forest); border: 2px solid var(--forest); background: transparent; }
.pill--source .lbl { font-weight: var(--fw-extrabold); }
.pill--soft { background: color-mix(in srgb, var(--forest) 12%, var(--paper)); color: var(--forest); }
.pill--amber { background: color-mix(in srgb, var(--amber) 14%, var(--paper)); color: var(--amber); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--track-grey);
  padding: var(--space-8) 0 var(--space-7);
  margin-top: var(--space-8);
}
.site-footer__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.site-footer .meta { color: var(--body-grey); font-size: var(--ui-sm); }
.site-footer .word {
  font-weight: var(--fw-semibold);
  letter-spacing: var(--track-wordmark);
  text-transform: uppercase;
  font-size: var(--ui-lg);
  color: var(--ink);
}
.footer-nav { display: flex; gap: var(--space-5); margin-top: var(--space-3); }
.footer-nav a { color: var(--body-grey); font-size: var(--ui-sm); }
.footer-nav a:hover { color: var(--ink); }

/* ---- Misc ---- */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.muted { color: var(--text-muted); }

ul.check { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
ul.check li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.4; }
ul.check li .ck { color: var(--forest); flex: 0 0 auto; margin-top: 1px; }
.dark ul.check li .ck { color: var(--lime); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: var(--space-9) 0; }
}
@media (max-width: 680px) {
  .nav__links { gap: var(--space-4); }
  .nav .btn { display: none; }
  .nav__link { font-size: var(--ui-sm); }
  .container { padding: 0 var(--space-5); }
}
@media (max-width: 480px) {
  .nav__links { gap: var(--space-3); }
}

/* =====================================================================
 * HOMEPAGE REDESIGN — patterns adapted onto the BrewInsight brand
 *   Hero          → Shopify  (outcome-led, one dominant action per band)
 *   What you get  → Airtable (structured insight modules w/ data fragments)
 *   Sample board  → Airtable (working-tool: tiles, table, chips, actions)
 * Everything below is built only from design-system tokens.
 * ===================================================================== */

/* ---- Hero: Shopify conversion rhythm ---- */
.hero-cta { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.hero-cta .text-cta {
  font-weight: var(--fw-semibold);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  border-bottom: 2px solid var(--track-grey);
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.hero-cta .text-cta:hover { border-color: var(--forest); }
.hero-proof {
  display: flex; align-items: center; gap: var(--space-3);
  color: var(--body-grey); font-size: var(--ui-sm);
}
.hero-proof .dot { width: 4px; height: 4px; border-radius: 999px; background: var(--sketch-detail); }

/* ---- Airtable insight modules ---- */
.modules { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.module {
  background: var(--surface-card);
  border: 1px solid var(--track-grey);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.module__head { display: flex; align-items: center; gap: var(--space-3); }
.module__ico {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--forest) 10%, var(--paper));
  color: var(--forest);
}
.module__ico svg { width: 20px; height: 20px; }
.module__title { font-weight: var(--fw-bold); font-size: var(--ui-lg); color: var(--ink); }
.module__body { color: var(--text-muted); font-size: var(--ui-sm); margin: 0; }
/* the data "fragment" each module carries — Airtable's product-UI-in-a-card move */
.frag {
  margin-top: auto;
  background: var(--surface-sunken);
  border: 1px solid var(--track-grey);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.frag__label {
  font-size: var(--ui-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--body-grey);
}
.frag-rating { display: flex; align-items: baseline; gap: var(--space-3); }
.frag-rating .num { font-weight: var(--fw-black); font-size: 30px; color: var(--ink); line-height: 1; letter-spacing: -0.01em; }
.frag-rating .stars { color: var(--amber); letter-spacing: 1px; font-size: var(--ui-sm); }
.frag-rating .meta { color: var(--body-grey); font-size: var(--ui-xs); }
/* trend chips (rising / cooling) */
.trend-chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 5px 10px; border-radius: var(--radius-pill);
  font-size: var(--ui-xs); font-weight: var(--fw-semibold);
  background: color-mix(in srgb, var(--forest) 10%, var(--paper));
  color: var(--forest);
}
.trend-chip svg { width: 13px; height: 13px; }
.trend-chip.is-cool { background: color-mix(in srgb, var(--body-grey) 12%, var(--paper)); color: var(--body-grey); }
.trend-chip.is-amber { background: color-mix(in srgb, var(--amber) 14%, var(--paper)); color: var(--amber); }
.chip-wrap { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* benchmark bar */
.bench { display: flex; flex-direction: column; gap: 8px; }
.bench__track { position: relative; height: 8px; border-radius: 999px; background: var(--soft-sage); }
.bench__fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--forest); }
.bench__mark { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; }
.bench__row { display: flex; justify-content: space-between; font-size: var(--ui-xs); color: var(--body-grey); }
/* signature (dark) module — Airtable's voltage card, BrewInsight deep-green */
.module--signature {
  background: var(--deep-green);
  border-color: var(--dark-2);
}
.module--signature .module__title { color: var(--paper); }
.module--signature .module__body { color: var(--text-on-dark-muted); }
.module--signature .module__ico { background: rgba(136,192,72,0.14); color: var(--lime); }
.module--signature .frag { background: rgba(255,255,255,0.04); border-color: var(--dark-2); }
.module--signature .frag__label { color: var(--dark-text); }
.act-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.act-list li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--ui-sm); color: var(--paper); line-height: 1.35; }
.act-list .ck { color: var(--lime); flex: 0 0 auto; margin-top: 1px; }
.act-list .ck svg { width: 16px; height: 16px; }

/* ---- Airtable sample dashboard (the working-tool showcase) ---- */
.dash-wrap { margin-top: var(--space-7); }
.dash {
  background: var(--surface-card);
  border: 1px solid var(--track-grey);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-lg);
  overflow: hidden;
}
.dash__chrome {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--track-grey);
  background: var(--surface-sunken);
}
.dash__dots { display: flex; gap: 6px; }
.dash__dots i { width: 10px; height: 10px; border-radius: 999px; background: var(--track-grey); display: inline-block; }
.dash__title { font-weight: var(--fw-semibold); color: var(--ink); font-size: var(--ui-sm); }
.dash__title .muted { color: var(--body-grey); font-weight: var(--fw-medium); }
.dash__chrome .spacer { flex: 1; }
.dash__body { padding: var(--space-5); display: grid; gap: var(--space-5); }
/* toolbar: filter chips */
.dash__toolbar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: var(--ui-xs); font-weight: var(--fw-semibold);
  border: 1px solid var(--track-grey); background: var(--paper); color: var(--body-grey);
}
.chip svg { width: 13px; height: 13px; }
.chip.is-active { border-color: var(--forest); color: var(--forest); background: color-mix(in srgb, var(--forest) 8%, var(--paper)); }
.chip .x { color: var(--sketch-detail); }
.dash__toolbar .spacer { flex: 1; }
/* stat tiles */
.dash__tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.tile {
  border: 1px solid var(--track-grey); border-radius: var(--radius-md);
  padding: var(--space-4); background: var(--paper);
  display: flex; flex-direction: column; gap: 4px;
}
.tile__label { font-size: var(--ui-xs); color: var(--body-grey); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: 0.08em; }
.tile__fig { display: flex; align-items: baseline; gap: 8px; }
.tile__fig .v { font-weight: var(--fw-black); font-size: 26px; color: var(--ink); line-height: 1; letter-spacing: -0.01em; }
.tile__delta { font-size: var(--ui-xs); font-weight: var(--fw-semibold); display: inline-flex; align-items: center; gap: 3px; }
.tile__delta.up { color: var(--forest); }
.tile__delta.down { color: var(--amber); }
.tile__delta svg { width: 12px; height: 12px; }
/* dashboard split: table + side panel */
.dash__split { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-5); align-items: start; }
.dash__pane-label {
  font-size: var(--ui-xs); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--body-grey);
  margin-bottom: var(--space-3); display: flex; align-items: center; justify-content: space-between;
}
/* reviews table */
.dtable-wrap { border: 1px solid var(--track-grey); border-radius: var(--radius-md); overflow: hidden; }
.dtable { width: 100%; border-collapse: collapse; font-size: var(--ui-sm); }
.dtable thead th {
  text-align: left; font-size: var(--ui-xs); font-weight: var(--fw-semibold);
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--body-grey);
  padding: 10px 12px; background: var(--surface-sunken); border-bottom: 1px solid var(--track-grey);
}
.dtable tbody td { padding: 11px 12px; border-bottom: 1px solid var(--track-grey); color: var(--ink); vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: none; }
.dtable .src { font-size: var(--ui-xs); font-weight: var(--fw-bold); letter-spacing: 0.04em; color: var(--body-grey); }
.dtable .stars { color: var(--amber); letter-spacing: 1px; white-space: nowrap; }
.theme-tag {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--radius-pill);
  font-size: var(--ui-xs); font-weight: var(--fw-semibold);
  background: var(--surface-sunken); color: var(--body-grey); border: 1px solid var(--track-grey);
}
.sent { display: inline-flex; align-items: center; gap: 6px; font-size: var(--ui-xs); font-weight: var(--fw-semibold); }
.sent .d { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto; }
.sent.pos { color: var(--forest); } .sent.pos .d { background: var(--forest); }
.sent.neu { color: var(--sage); }   .sent.neu .d { background: var(--sage); }
.sent.watch { color: var(--amber); }.sent.watch .d { background: var(--amber); }
/* side panels */
.dash-panel { border: 1px solid var(--track-grey); border-radius: var(--radius-md); padding: var(--space-4); background: var(--paper); }
.dash-panel + .dash-panel { margin-top: var(--space-4); }
.trend-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 8px 0; }
.trend-row + .trend-row { border-top: 1px solid var(--track-grey); }
.trend-row .name { font-size: var(--ui-sm); color: var(--ink); font-weight: var(--fw-medium); }
.rec { display: flex; gap: 10px; padding: 10px 0; }
.rec + .rec { border-top: 1px solid var(--track-grey); }
.rec__mark { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 999px; background: color-mix(in srgb, var(--forest) 12%, var(--paper)); color: var(--forest); display: inline-flex; align-items: center; justify-content: center; }
.rec__mark svg { width: 13px; height: 13px; }
.rec__text { font-size: var(--ui-sm); color: var(--ink); line-height: 1.4; }
.rec__text .src-note { display: block; color: var(--body-grey); font-size: var(--ui-xs); margin-top: 2px; }
.dash__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  flex-wrap: wrap; padding-top: var(--space-2);
}
.illustrative {
  font-family: var(--font-annotation); font-weight: 700; font-size: 1.15em;
  color: var(--body-grey); line-height: 1;
}

/* ---- Responsive for the redesigned homepage ---- */
@media (max-width: 900px) {
  .dash__split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .modules { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .dash__tiles { grid-template-columns: 1fr; }
  .dtable-wrap { overflow-x: auto; }
  .dtable { min-width: 460px; }
  .dash__body { padding: var(--space-4); }
}

/* ---- Mobile navigation (hamburger) ---- */
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--track-grey);
  border-radius: var(--radius-md);
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle svg { width: 22px; height: 22px; }
.nav__mobile { display: none; }

@media (max-width: 820px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__mobile {
    display: block;
    max-height: 0;
    overflow: hidden;
    background: var(--paper);
    border-bottom: 1px solid var(--track-grey);
    transition: max-height var(--dur-base) var(--ease-standard);
  }
  .nav__mobile.is-open { max-height: 78vh; }
  .nav__mobile .container {
    display: flex;
    flex-direction: column;
    padding-top: var(--space-2);
    padding-bottom: var(--space-5);
  }
  .nav__mobile-link {
    padding: 15px 2px;
    font-weight: var(--fw-medium);
    font-size: var(--ui-lg);
    color: var(--body-grey);
    border-bottom: 1px solid var(--track-grey);
  }
  .nav__mobile-link[aria-current="page"] { color: var(--ink); font-weight: var(--fw-semibold); }
  .nav__mobile-cta { margin-top: var(--space-4); width: 100%; }
}

/* ---- Small-phone hardening (applies site-wide) ---- */
.footer-nav { flex-wrap: wrap; }
@media (max-width: 520px) {
  /* never let a wide media element force horizontal scroll */
  img, svg, table, pre, iframe { max-width: 100%; }
  /* tighten the universal gutter on the smallest screens */
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  /* stat-row / 3-up grids that still used .grid-3 collapse fully */
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  /* eyebrows are inline-flex + heavily tracked uppercase — long ones (e.g.
   * "Insights for café owners") can't wrap and force the page wide. Tighten
   * tracking/size on phones and allow the dash to wrap. */
  .eyebrow { font-size: var(--ui-xs); letter-spacing: 0.12em; flex-wrap: wrap; }
  /* let grid/flex cells shrink below their content's intrinsic width */
  .hero-grid > *, .modules > *, .grid > *, .dash__split > * { min-width: 0; }
}
@media (max-width: 620px) {
  /* footer: stack columns, wrap the link row */
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .site-footer__inner > div:last-child { align-items: flex-start !important; text-align: left; }
  .footer-nav { gap: var(--space-2) var(--space-4); }
  /* long source pills wrap instead of forcing width */
  .pill--source { white-space: normal; text-align: center; }
}

/* ---- Overflow safety + responsive media (site-wide) ---- */
/* Guarantee no horizontal scroll anywhere. `clip` (not hidden) keeps the
 * sticky header working while removing residual sub-pixel overflow. */
html { overflow-x: clip; }
/* Charts/SVGs scale down to their container instead of forcing width.
 * Non-icon SVGs (the TrendChart, hardcoded width="460") are forced to the
 * container width; lucide icons keep their fixed size. */
svg:not(.lucide) { max-width: 100%; }
.hero-card svg:not(.lucide), .dash svg:not(.lucide) { width: 100%; height: auto; }
/* Dashboard: let grid/flex children shrink so the wide reviews table
 * scrolls inside its own wrapper rather than forcing the card wider. */
.dash__body, .dash__split > * { min-width: 0; }

@media (max-width: 600px) {
  /* DS components (Eyebrow, SourceBadge, footer wordmark) set letter-spacing
   * INLINE and can't wrap, so heavily-tracked labels overflow narrow cards.
   * Tighten inline tracking on phones so they fit. */
  [style*="letter-spacing"] { letter-spacing: 0.06em !important; }
  /* let card header rows + dashboard chrome wrap instead of clipping */
  .hero-card .row { flex-wrap: wrap; row-gap: 10px; }
  .dash__chrome { flex-wrap: wrap; row-gap: 10px; }
  .dash__chrome .spacer { display: none; }
}
