/* =========================================================================
   TAIGA BIOACTIVES — Website UI kit layout styles
   Requires ../../colors_and_type.css and ../../taiga.css (loaded by index.html).
   ========================================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg1); font-family: var(--font-body); }
a { color: inherit; }

.site { min-height: 100vh; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 24px; }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9,26,12,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; cursor: pointer; }
.brand .word { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-size: 26px; line-height: 1; color: #fff; }
.brand .word-accent { color: var(--detail, #55bb55); }
.nav-links { display: flex; gap: 2px; margin-left: 8px; }
.nav-link {
  padding: 9px 14px; border-radius: var(--r-pill); font-size: 0.95rem; font-weight: 500;
  color: var(--fg2); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover { color: var(--fg1); }
.nav-link.active { color: var(--fg1); background: rgba(255,255,255,0.07); }
.nav-cta { margin-left: auto; }

/* burger toggle — hidden on desktop, shown ≤900px */
.nav-burger {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--r-pill); color: var(--fg1); cursor: pointer;
  padding: 0;
}
.nav-burger:hover { border-color: var(--line-strong); }

/* mobile slide-down sheet */
.nav-sheet {
  position: fixed; inset: 0; top: 0; z-index: 49;
  background: rgba(5,15,7,0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.nav-sheet.open { opacity: 1; pointer-events: auto; }
.nav-sheet-inner {
  position: absolute; left: 0; right: 0; top: 0;
  background: var(--forest-800, #091a0c);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px 24px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-12px);
  transition: transform var(--dur) var(--ease);
  max-height: 100vh; overflow-y: auto;
}
.nav-sheet.open .nav-sheet-inner { transform: none; }
/* sheet header: brand + always-visible close (×) */
.nav-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px; margin-bottom: 8px;
}
.nav-sheet-close {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--r-pill); color: var(--fg1); cursor: pointer; padding: 0;
}
.nav-sheet-close:hover { border-color: var(--line-strong); }
.nav-sheet-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 14px; min-height: 52px;
  border-radius: var(--r-md, 14px);
  color: var(--fg1); text-decoration: none; cursor: pointer;
  font-size: 1.15rem; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.nav-sheet-link:last-of-type { border-bottom: 0; }
.nav-sheet-link.active { background: rgba(255,255,255,0.07); }
.nav-sheet-link svg { opacity: 0.45; }
.nav-sheet-cta { width: 100%; justify-content: center; margin-top: 16px; }

/* ---------------- Forest backdrop ---------------- */
.backdrop { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.backdrop .ambient {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 62% 38%, rgba(220,150,70,0.20) 0%, rgba(220,150,70,0) 60%),
    radial-gradient(90% 80% at 50% 30%, #13351c 0%, #0c2412 45%, #071409 80%);
}
.backdrop .ambient.cool {
  background:
    radial-gradient(80% 70% at 50% 20%, #11331c 0%, #0a1f0f 50%, #050f07 90%);
}
.backdrop .hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0.42;                 /* sit under text; gradient + scrim do the rest */
  mix-blend-mode: luminosity;    /* tint photo into the forest palette */
  z-index: 0;
}
.backdrop .treeline { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; opacity: 0.55; }
/* photo filling a card / tall media block */
.media-tall .hero-photo, .card-media .hero-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 0;
}

/* ---------------- Oil dripping from fir needles (home hero) ----------------
   The needle macro photo shows brighter so the drops read as real oil.
   Each .drop forms near the top (a needle tip), swells, then trails down. */
.backdrop.is-drip .hero-photo { opacity: 0.62; mix-blend-mode: normal; }
.oil-drips {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
}
.oil-drips .drop {
  position: absolute;
  left: var(--x);
  top: 30%;                     /* needle-tip line where drops are born */
  width: 11px; height: 14px;
  margin-left: -5.5px;
  border-radius: 60% 60% 65% 65% / 75% 75% 60% 60%; /* teardrop */
  background:
    radial-gradient(40% 35% at 38% 30%, rgba(255,255,255,0.85), transparent 60%),
    linear-gradient(180deg, #e7b75a 0%, #cf8a2d 45%, #a8631c 100%);
  box-shadow: 0 0 10px rgba(231,183,90,0.5), 0 0 2px rgba(255,230,170,0.8);
  filter: saturate(1.1);
  opacity: 0;
  transform-origin: top center;
  animation: oil-drip var(--dur, 4.6s) var(--d, 0s) cubic-bezier(.55,.05,.7,1) infinite;
}
/* faint wet trail the drop leaves behind */
.oil-drips .drop::after {
  content: ""; position: absolute; left: 50%; top: -2px; transform: translateX(-50%);
  width: 2.5px; height: 0; border-radius: 2px;
  background: linear-gradient(180deg, rgba(231,183,90,0), rgba(231,183,90,0.45));
}
/* Dark extract variant — deep amber/brown drop, matching the real CO₂ extract color */
.backdrop.is-dark.is-drip .oil-drips .drop {
  background:
    radial-gradient(40% 35% at 38% 28%, rgba(255,224,170,0.55), transparent 60%),
    linear-gradient(180deg, #7a4a16 0%, #5a300d 45%, #381c06 100%);
  box-shadow: 0 0 9px rgba(120,70,20,0.55), 0 0 2px rgba(80,45,12,0.9);
  filter: saturate(1.05);
}
.backdrop.is-dark.is-drip .oil-drips .drop::after {
  background: linear-gradient(180deg, rgba(90,48,13,0), rgba(90,48,13,0.5));
}
@keyframes oil-drip {
  0%   { opacity: 0; transform: translateY(0) scaleY(0.5) scaleX(0.7); }
  10%  { opacity: 1; transform: translateY(0) scaleY(1) scaleX(1); }      /* swell on the tip */
  22%  { opacity: 1; transform: translateY(2px) scaleY(1.25) scaleX(0.92); } /* stretch before release */
  85%  { opacity: 1; transform: translateY(58vh) scaleY(1) scaleX(0.85); }   /* fall */
  100% { opacity: 0; transform: translateY(70vh) scaleY(0.9) scaleX(0.8); }  /* fade out */
}
@media (prefers-reduced-motion: reduce) {
  .oil-drips { display: none; }
}
.backdrop .scrim { position: absolute; inset: 0; background: var(--scrim-bottom); }
.backdrop .grain { position:absolute; inset:0; opacity:.05; mix-blend-mode:overlay;
  background-image: radial-gradient(rgba(255,255,255,.6) .5px, transparent .5px);
  background-size: 4px 4px; }

/* ---------------- Hero ---------------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; padding-bottom: 72px; padding-top: 120px; }
/* home hero: block vertically centered, text still left-aligned */
.hero.hero-center { align-items: center; }
.hero.hero-center .hero-inner { padding-top: 120px; padding-bottom: 120px; }
.hero h1 { margin: 18px 0 0; max-width: 14ch; }
.hero .sub { margin: 22px 0 0; max-width: 46ch; }
.hero .cta-row { display: flex; gap: 14px; align-items: center; margin-top: 34px; flex-wrap: wrap; }

/* ---- Hero text legibility over bright photo (droplets / sun-lit needles) ----
   A soft dark scrim anchored to the text column + brighter, shadowed copy so
   the headline and lead never wash out on the centered drip hero. */
.hero.hero-center::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(115% 90% at 28% 50%,
              rgba(5,15,7,0.66) 0%, rgba(5,15,7,0.42) 45%, rgba(5,15,7,0.12) 78%);
}
.hero .sub { color: rgba(255,255,255,0.80); text-shadow: 0 1px 12px rgba(5,15,7,0.85); }
.hero h1 { text-shadow: 0 2px 22px rgba(5,15,7,0.80), 0 1px 3px rgba(5,15,7,0.7); }
/* tag pill: give it its own dark base so white text holds over bright needles */
.hero .tag-pill {
  background: linear-gradient(rgba(9,26,12,0.55), rgba(9,26,12,0.55)), var(--berry-tint);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* ---------------- Sections ---------------- */
.section { padding: 96px 0; position: relative; }
.section.tight { padding: 64px 0; }
/* When a section is ALSO a wrap container, `.section{padding:_ 0}` would wipe out
   the wrap's horizontal padding (same specificity, declared later) and the text
   ends up flush against the screen edge. Restore the side padding explicitly. */
.section.wrap, .section.wrap-wide { padding-left: 24px; padding-right: 24px; }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head p { color: var(--fg2); margin: 16px 0 0; font-size: var(--lead-size); line-height: 1.5; }

/* ---------------- Trust strip ---------------- */
.trust { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 44px 0; }
.trust .cell { text-align: left; }

/* ---------------- Grids ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }

/* product card */
.pcard { display: flex; flex-direction: column; overflow: hidden; cursor: pointer; }
.pcard .media { position: relative; aspect-ratio: 4/3; display: flex; align-items: flex-start; justify-content: space-between; padding: 16px; }
.pcard .media .glow { position:absolute; inset:0; background: radial-gradient(60% 60% at 50% 60%, rgba(85,187,85,0.14), transparent 70%); }
/* dark scrim along the top so the category badge stays legible over bright needles.
   Sits ABOVE the cover photo (z-index 1) but BELOW the badge/logo (z-index 2). */
.pcard .media::before,
.card-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,15,7,0.62) 0%, rgba(5,15,7,0.18) 34%, rgba(5,15,7,0) 60%);
}
/* lift only the badge + logo above the scrim — NOT the cover photo (it must stay
   position:absolute/inset:0 so it fills the media box; do not make it relative) */
.pcard .media .badge, .card-media .badge,
.pcard .media > img[width], .card-media > img[width] { position: relative; z-index: 2; }
.pcard .media .badge, .card-media .badge {
  background: rgba(9,26,12,0.82);
  border-color: rgba(85,187,85,0.45);
  color: var(--fir-200, #c9f2c9);
  text-shadow: 0 1px 4px rgba(5,15,7,0.7);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.pcard .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .body .name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.4rem; }
.pcard .body .active { font-size: 0.8125rem; color: var(--detail); font-weight: 600; letter-spacing: 0.02em; }
.pcard .body .ben { color: var(--fg2); font-size: 0.95rem; line-height: 1.5; }
.pcard .body .link { margin-top: auto; color: var(--fg1); font-weight: 600; font-size: 0.95rem; display:inline-flex; gap:7px; padding-top: 8px; }

/* value props */
.value { padding: 28px; display:flex; flex-direction:column; gap: 14px; height: 100%; }
.value .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--forest-700); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; color: var(--detail); }
.value h3 { margin: 0; }
.value p { margin: 0; color: var(--fg2); font-size: 0.95rem; line-height: 1.55; }

/* logos strip */
.logos { display:flex; align-items:center; justify-content:space-between; gap: 32px; flex-wrap: wrap; opacity: .85; }
.logos .lg { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 1.15rem; color: var(--fg2); }

/* CTA block */
.cta-block { position: relative; overflow:hidden; border-radius: var(--r-xl); padding: 80px 56px; text-align: center; }
.cta-block .inner { position: relative; z-index: 2; display: inline-flex; flex-direction: column; align-items: center; gap: 26px; }

/* ---------------- Footer ---------------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg3); margin: 0 0 16px; font-weight: 600; }
.footer a { display:block; color: var(--fg2); text-decoration: none; font-size: 0.95rem; padding: 5px 0; cursor:pointer; }
.footer a:hover { color: var(--fg1); }
.footer-bottom { display:flex; justify-content: space-between; align-items:center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--fg3); font-size: 0.8125rem; }

/* ---------------- Filter chips ---------------- */
.chips { display:flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.chip-f { padding: 9px 18px; border-radius: var(--r-pill); border:1px solid var(--line); background: transparent; color: var(--fg2); font-size: 0.9rem; font-weight: 500; cursor:pointer; font-family: var(--font-body); transition: all var(--dur) var(--ease); }
.chip-f:hover { color: var(--fg1); border-color: var(--line-strong); }
.chip-f.active { background: var(--fg1); color: var(--forest-800); border-color: var(--fg1); }

/* ---------------- Steps ---------------- */
.steps { display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.step { padding: 28px; display:flex; flex-direction: column; gap: 12px; }
.step .num { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--detail); letter-spacing: -0.03em; line-height: 1; }
.step h3 { margin: 0; }
.step p { margin: 0; color: var(--fg2); font-size: 0.95rem; line-height: 1.5; }

/* ---------------- Tables ---------------- */
.ctable { width: 100%; border-collapse: collapse; }
/* horizontal gap between columns so cells never touch; last column flush-right */
.ctable th, .ctable td { text-align: left; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; vertical-align: top; }
.ctable th:last-child, .ctable td:last-child { padding-right: 0; }
.ctable th { color: var(--fg3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; white-space: nowrap; }
.ctable td { color: var(--fg1); }
.ctable td.dim { color: var(--fg2); }

/* ---------------- Misc ---------------- */
.divider { height: 1px; background: var(--line); border: 0; }
.media-tall { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 420px; }
.timeline { display:flex; gap: 0; flex-wrap: wrap; }
.tl-item { flex: 1; min-width: 180px; padding: 24px 24px 24px 0; border-top: 2px solid var(--line); position: relative; }
.tl-item .yr { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--detail); letter-spacing: -0.02em; }
.tl-item p { margin: 8px 0 0; color: var(--fg2); font-size: 0.9rem; line-height: 1.5; }

/* Grid items default to min-width:auto and refuse to shrink below their
   content, which lets a wide table push the whole page sideways. Force grid
   children to be allowed to shrink so .scroll-x can clamp to the column and
   scroll the table inside it instead. */
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }

.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  /* edge fade hints there is more table to scroll to on narrow screens */
  scrollbar-width: thin;
}
.scroll-x .ctable { min-width: 560px; }   /* keep columns readable; scroll on narrow screens */
/* slim, always-visible scrollbar so the swipe affordance is obvious on mobile */
.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.scroll-x::-webkit-scrollbar-track { background: transparent; }

/* "Swipe →" caption — JS adds .is-scrollable only when the table actually
   overflows its container, so the hint never appears on desktop where it fits.
   Rendered as a ::before pill above the table on narrow screens. */
@media (max-width: 720px) {
  .scroll-x.is-scrollable::before {
    content: "Swipe the table sideways →";
    display: block;
    color: var(--fg3); font-size: 0.78rem;
    margin-bottom: 10px;
  }
}

/* =========================================================================
   AURORA — northern-lights backdrop for the hero
   Adapted from Aceternity UI "Aurora Background" to plain CSS + the brand
   forest palette. Drifting green light over #091a0c; one instance per page.
   ========================================================================= */
.aurora {
  position: absolute;
  inset: -40%;            /* overscan so drift never bares the edges */
  z-index: 1;             /* above .backdrop ambient, below hero content (z2) */
  pointer-events: none;
  filter: blur(10px);
  opacity: 0.55;
  mix-blend-mode: screen; /* light adds on the dark forest base */
  --aurora: repeating-linear-gradient(100deg,
      #55bb55 8%, #2f8a3a 18%, #6fce6f 28%, #1d4220 38%, #55bb55 48%);
  --mask: radial-gradient(80% 60% at 50% 0%, #000 35%, transparent 78%);
  background-image: var(--aurora);
  background-size: 220% 200%;
  background-position: 50% 50%;
  -webkit-mask-image: var(--mask);
          mask-image: var(--mask);
  will-change: background-position;
  animation: aurora-drift 26s linear infinite;
}
@keyframes aurora-drift {
  from { background-position: 50% 50%; }
  to   { background-position: 350% 50%; }
}

/* =========================================================================
   REVEAL WORDS — staggered word-by-word entrance (motion-primitives idea,
   driven by the existing IntersectionObserver, no library).
   ========================================================================= */
.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
  will-change: opacity, transform;
}
.reveal-words.in .word { opacity: 1; transform: none; }

/* =========================================================================
   SHIFT CARD — product card reveals extra detail on hover
   (Cult UI "Shift Card" idea, rebuilt as fade/slide — NO scale, NO 3D tilt,
   to honour the restrained premium tone.)
   ========================================================================= */
.pcard { transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.pcard .shift-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transform: translateY(6px);
  transition: grid-template-rows var(--dur) var(--ease),
              opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.pcard .shift-detail > .shift-inner {
  overflow: hidden;
  min-height: 0;
  color: var(--fg2);
  font-size: 0.9rem;
  line-height: 1.55;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 0;
}
.pcard:hover .shift-detail,
.pcard:focus-within .shift-detail {
  grid-template-rows: 1fr;
  opacity: 1;
  transform: none;
}
.pcard:hover .shift-detail > .shift-inner,
.pcard:focus-within .shift-detail > .shift-inner { padding-top: 12px; }
/* lift the "View product" link to the bottom only until detail expands */
.pcard:hover .media .glow,
.pcard:focus-within .media .glow { opacity: 1; }
.pcard .media .glow { transition: opacity var(--dur) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none; opacity: 0.32; }
  .reveal-words .word { opacity: 1; transform: none; transition: none; }
  .pcard .shift-detail { transition: none; }
}

/* ===================== Responsive ===================== */

/* Switch to burger before the inline menu gets cramped / wraps to 2 lines */
@media (max-width: 1100px) {
  .nav-links, .nav-cta { display: none; }      /* desktop nav + inline CTA hidden */
  .nav-burger { display: inline-flex; }         /* burger takes over */
}

/* Tablet / small laptop */
@media (max-width: 900px) {
  .grid-3, .grid-4, .trust, .steps, .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .media-tall { min-height: 320px; }
}

/* Phones */
@media (max-width: 560px) {
  /* one column everywhere */
  .grid-3, .grid-4, .trust, .steps, .footer-grid { grid-template-columns: 1fr; }

  /* more breathing room between stacked items */
  .grid-3, .grid-4, .steps { gap: 28px; }
  .trust { gap: 30px; padding: 36px 0; }
  .grid-2 { gap: 24px; }

  /* tighten oversized vertical rhythm so content doesn't "float" */
  .section { padding: 52px 0; }
  .section.tight { padding: 36px 0; }
  .section.wrap, .section.wrap-wide { padding-left: 20px; padding-right: 20px; }
  .section-head { max-width: 100%; margin-bottom: 32px; }

  /* hero: shorter, less dead space before content */
  .hero { min-height: auto; }
  .hero-inner { padding-top: 92px; padding-bottom: 48px; }
  .hero.hero-center .hero-inner { padding-top: 96px; padding-bottom: 56px; }
  .hero .cta-row { flex-direction: column; align-items: stretch; }
  .hero .cta-row .btn { width: 100%; justify-content: center; }

  /* CTA block: kill the huge fixed side padding that squeezed the copy */
  .cta-block { padding: 44px 22px; }

  /* cards / value props: trim inner padding so text isn't cramped */
  .pcard .body { padding: 18px; }
  .value { padding: 20px 18px; gap: 12px; }
  .value .ic { width: 42px; height: 42px; }
  .step { padding: 22px 18px; }
  .media-tall { min-height: 260px; }

  /* tables: smaller type + horizontal scroll wrapper handles width */
  .ctable th, .ctable td { font-size: 0.85rem; padding: 12px 0; }

  /* timeline → single column with even spacing */
  .tl-item { min-width: 100%; padding: 20px 0; }

  /* footer: stack the bottom line, wrap long links */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer a { overflow-wrap: anywhere; }
  .logos { justify-content: center; gap: 18px 24px; }

  /* tap targets ≥44px on touch */
  .btn-sm { padding: 13px 20px; }
  .chip-f { padding: 12px 18px; }
  .footer a { padding: 10px 0; }

  /* long pill buttons must not overflow the viewport — trim side padding,
     allow wrapping, and cap to container width */
  .btn-lg { padding: 15px 22px; }
  .btn { max-width: 100%; white-space: normal; text-align: center; }
}

/* Extra-narrow phones: pull container side padding in a touch */
@media (max-width: 380px) {
  .wrap, .wrap-wide { padding: 0 18px; }
}

/* Reveal fallback — if the observer never fires (very slow device / no-JS-ish),
   reduced-motion users still see all content immediately. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------- Applications: clickable sector squares ---------------- */
/* sector-card is a <button> styled as a .card.value; reset the UA chrome. */
button.sector-card {
  font: inherit; color: inherit; appearance: none; -webkit-appearance: none;
  background: var(--surface); margin: 0;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
button.sector-card:hover { transform: translateY(-2px); }
button.sector-card:focus-visible { outline: 2px solid var(--detail); outline-offset: 3px; }
button.sector-card .link { color: var(--detail); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
button.sector-card.is-open { box-shadow: 0 0 0 1px var(--detail), 0 18px 40px -22px rgba(0,0,0,.6); }

/* Expanded protocol panel — sits inside the sector grid, spanning the full row
   so it appears directly under the tapped card (mobile) or below the row
   (desktop). */
.protocol-panel {
  grid-column: 1 / -1;
  margin-top: 4px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 36px;
  animation: panel-in .35s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .protocol-panel { padding: 22px; border-radius: 20px; }
}
