/* =========================================================================
   Skytable — site components
   Loads after tokens.css (the design system's tokens and .type-* classes)
   and base.css (its element defaults and dark sections), both generated from
   design-system/. Everything here is built from those tokens: no colour,
   font, radius or shadow is written as a raw value, and spacing comes from
   --space-*, --band-* and --page-gutter. `yarn check:css` fails the build
   otherwise. Where the approved design handoff specifies a value the scale
   doesn't have, the line carries a "design:" note saying so.

   Colours are role tokens (--text-*, --surface-*, --border-*, --rule,
   --action-*), so anything inside data-theme="dark" switches on its own.
   ========================================================================= */

/* ---------- Shared bits ---------- */

/* A column, so the footer sits at the bottom of the window on short pages.
   <main> stays out of layout: pages' sections are direct children of <body>. */
body { min-height: 100vh; display: flex; flex-direction: column; }
.main { display: contents; }

/* Keyboard-only "skip to content" link, invisible until focused. */
.skip-link {
  position: absolute; left: -9999px; z-index: 200;
  padding: var(--space-2) var(--space-4);
  background: var(--action-primary); color: var(--action-primary-text);
  border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

/* Spam honeypot (Honeypot.astro): off-screen, not display:none, so naive
   bots still fill it. */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* A row of buttons. */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }

/* ---------- Button (ds/Button.astro) ----------
   Geometry from the design system's Button.jsx: 48px tall, 40px compact,
   14px text at 500 on a 16px line. */
.btn {
  box-sizing: border-box; height: 48px; padding: 0 var(--space-6);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font: var(--text-type-small); font-weight: 500; line-height: 16px;
  border-radius: var(--radius); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease;
}
.btn--primary { border: none; color: var(--action-primary-text); background-color: var(--action-primary); }
.btn--primary:hover { color: var(--action-primary-text); background-color: var(--action-primary-hover); }
.btn--secondary { border: 1px solid var(--border-control); color: var(--text-heading); background-color: transparent; }
.btn--secondary:hover { color: var(--text-heading); background-color: var(--action-secondary-hover); }
.btn--compact { height: 40px; padding: 0 var(--space-5); }

/* ---------- Eyebrow (ds/Eyebrow.astro) ---------- */
.eyebrow { display: inline-block; color: var(--text-heading); padding-bottom: var(--space-1); border-bottom: 2px solid var(--gold); }
.eyebrow--secondary { color: var(--text-accent); padding-bottom: 0; border-bottom: none; }

/* ---------- Card (ds/Card.astro) ----------
   On dark: no fill, no shadow, just the outline. */
.card {
  background: var(--surface-raised); color: var(--text-body);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: var(--space-5); box-shadow: var(--shadow-card);
}
.card--flat, [data-theme="dark"] .card { box-shadow: none; }

/* ---------- Panel (ds/Panel.astro) ---------- */
.panel { background: var(--surface-page); color: var(--text-body); padding: var(--band-snug) var(--page-gutter); }
.panel--warm { background: var(--surface-warm); }
.panel__inner { max-width: var(--content-width); margin: 0 auto; }

/* ---------- Hairline (ds/Hairline.astro) ---------- */
.hairline { border: none; border-top: 1px solid var(--rule); margin: 0; }
.hairline--block { margin: var(--space-5) 0; }

/* The hidden attribute always wins over a component's own display value
   (tour panels, questions, menus, the modal). */
[hidden] { display: none !important; }

/* Visually hidden, still read by screen readers. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Page scroll locks while the phone nav or the invite modal is open. */
body.nav-open, body.modal-open { overflow: hidden; }

/* ---------- Logo ----------
   Heights from the design system: header 30px (33px ≤1040px), footer 60px. */
.brand { display: flex; align-items: center; min-height: 44px; color: var(--text-heading); text-decoration: none; }
.brand:hover { color: var(--text-heading); }
.brand__logo { display: block; height: 30px; width: auto; }
.brand--footer .brand__logo { height: 60px; }
@media (max-width: 1040px) { .site-header .brand__logo { height: 33px; } }
/* Narrow phones: at 33px the wordmark, the invite button and the menu
   button don't fit on one line, so the wordmark drops to 24px (the design
   system's minimum is 20px). Awaiting Amy's approval of the phone header. */
@media (max-width: 480px) { .site-header .brand__logo { height: 24px; } }

/* ---------- Text link (TextLink.astro) ----------
   Small type at 500, heading colour, the arrow after it, a 44px hit area. */
.text-link {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px;
  font: var(--text-type-small); font-weight: 500; color: var(--text-heading); text-decoration: none;
}
.text-link:hover { color: var(--text-accent); }

/* ---------- Check-marked list ---------- */
.checks { margin: 0; padding: var(--space-1) 0 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.checks li { display: flex; align-items: flex-start; gap: var(--space-3); color: var(--text-body); }
.checks__icon { flex: none; margin-top: 2px; color: var(--text-accent); } /* design: icon nudge to the first line */

/* ---------- Product frame (ProductFrame.astro) ----------
   The placeholder for a product screenshot: skeleton rows in a ruled frame. */
.frame { height: 400px; display: flex; flex-direction: column; overflow: hidden; background: var(--surface-raised); border: 1px solid var(--rule); border-radius: var(--radius); }
.frame--hero { height: 389px; }
.frame__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-soft); }
.frame__title { font-weight: 600; color: var(--text-heading); }
.frame__badge { color: var(--ink); background: var(--lavender); border-radius: var(--radius); padding: 2px var(--space-2); } /* design: badge padding */
.frame__rows { flex: 1; min-height: 0; padding: var(--space-1) var(--space-4); }
.frame__row { display: grid; grid-template-columns: 2fr 1fr 1fr 56px; gap: var(--space-4); align-items: center; height: 44px; border-bottom: 1px solid var(--border-soft); }
.frame--hero .frame__row { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 72px; height: 48px; }
.frame .frame__row--head { height: 36px; border-bottom-color: var(--rule); }
.frame__bar-head { height: 6px; border-radius: var(--radius); background: var(--stone); }
.frame__bar-cell { height: 8px; border-radius: var(--radius); background: var(--border-soft); }
.frame__chip { height: 20px; border-radius: var(--radius); }
.frame__chip--lavender { background: var(--lavender); }
.frame__chip--pebble { background: var(--border-soft); }
.frame__chip--gold { background: var(--gold); }
/* Skeleton bar widths (data-w on the bars), as in the design files. */
[data-w="40%"] { width: 40%; }
[data-w="45%"] { width: 45%; }
[data-w="46%"] { width: 46%; }
[data-w="50%"] { width: 50%; }
[data-w="52%"] { width: 52%; }
[data-w="55%"] { width: 55%; }
[data-w="56%"] { width: 56%; }
[data-w="58%"] { width: 58%; }
[data-w="60%"] { width: 60%; }
[data-w="62%"] { width: 62%; }
[data-w="64%"] { width: 64%; }
[data-w="66%"] { width: 66%; }
[data-w="70%"] { width: 70%; }
[data-w="72%"] { width: 72%; }
[data-w="78%"] { width: 78%; }
[data-w="84%"] { width: 84%; }
[data-w="100%"] { width: 100%; }
.frame__content { flex: 1; min-height: 0; display: flex; }
.frame__content .frame__rows { flex: 1; min-width: 0; }
.frame__side { flex: 0 0 34%; max-width: 220px; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); border-left: 1px solid var(--border-soft); }
.frame__side-row { display: flex; align-items: center; gap: var(--space-2); }
.frame__avatar { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--border-soft); }
.frame__side-bar { flex: 1; }
.frame__side-chip { flex: none; width: 40px; }
.frame__shot { flex: 1; min-height: 0; }
.frame__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* =========================================================================
   Header (Header.astro), sticky
   ========================================================================= */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface-page); border-bottom: 1px solid var(--rule); }
.site-header__bar {
  min-height: 72px; padding: var(--space-3) var(--page-gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-6);
}
.site-header__left { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); }
.site-header__right { display: flex; align-items: center; gap: var(--space-3); }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.site-nav__item { position: relative; }
.site-nav__link {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3);
  color: var(--text-heading); text-decoration: none;
  gap: 6px; /* design: label to caret */
}
.site-nav__link:hover, .site-nav__link[aria-expanded="true"], .site-nav__link.is-current { color: var(--text-accent); }
.site-nav__caret { color: var(--text-disabled); }
.site-nav__signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); color: var(--text-heading); text-decoration: none; }
.site-nav__signin:hover { color: var(--text-accent); }
.site-nav__signin--panel { display: none; }

/* Menus open 6px under their button, left edges aligned. */
.menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5);
  background: var(--surface-raised); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.menu[hidden] { display: none; }
.menu--wide { width: min(600px, calc(100vw - 48px)); }
.menu--medium, .menu--narrow { gap: 0; padding: var(--space-3) var(--space-5); }
.menu--medium { width: min(280px, calc(100vw - 48px)); }
.menu--narrow { width: min(220px, calc(100vw - 48px)); }
.menu__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--space-5) var(--space-6); }
.menu__group { display: flex; flex-direction: column; gap: var(--space-1); }
.menu__group-label { padding-bottom: var(--space-2); }
.menu__item { display: flex; align-items: center; min-height: 44px; color: var(--text-heading); text-decoration: none; }
.menu__item:hover, .menu__item.is-current { color: var(--text-accent); }
.menu__item--described { flex-direction: column; align-items: flex-start; justify-content: center; min-height: 52px; gap: 2px; } /* design: title to description */
.menu__item-title { font-weight: 500; }
.menu__item-desc { color: var(--text-secondary); }
.menu__footer { padding-top: var(--space-3); border-top: 1px solid var(--border-soft); }

/* Phone menu button (≤900px): two lines that cross when open. */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: var(--space-2);
  width: 44px; height: 44px; padding: 0; background: transparent; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-heading); transition: transform .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

/* Phones: the logo and "Request an invite" stay; the nav becomes a
   full-width panel under the bar, menus listed open-able in place. */
@media (max-width: 900px) {
  .site-header__bar { flex-wrap: nowrap; gap: var(--space-2); }
  .site-header__right { gap: var(--space-2); }
  .nav-toggle { display: flex; }
  .site-header__right .site-nav__signin { display: none; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - 72px); overflow-y: auto;
    padding: var(--space-2) var(--page-gutter) var(--space-5);
    background: var(--surface-page); border-bottom: 1px solid var(--rule);
  }
  .site-nav.is-open { display: flex; }
  .site-nav__item, .site-nav > .site-nav__link { border-bottom: 1px solid var(--border-soft); }
  .site-nav__link { width: 100%; justify-content: space-between; padding: 0; font: var(--text-type-body); }
  .menu, .menu--wide, .menu--medium, .menu--narrow { position: static; width: auto; padding: 0 0 var(--space-4); background: none; border: 0; box-shadow: none; }
  .site-nav__signin--panel { display: flex; padding: 0; }
}

/* =========================================================================
   Footer (Footer.astro): a dark section
   ========================================================================= */
.site-footer { margin-top: auto; background: var(--surface-page); color: var(--text-body); }
.site-footer__body { padding: var(--band-snug) var(--page-gutter) var(--space-6); }
.site-footer__inner { max-width: var(--content-width); margin: 0 auto; }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-7) var(--space-8); }
.site-footer__brand { flex: 1 1 260px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.site-footer__tagline { max-width: 280px; color: var(--text-secondary); }
.site-footer__cols { flex: 3 1 560px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: var(--space-6); }
.site-footer__col { display: flex; flex-direction: column; align-items: flex-start; }
.site-footer__heading { padding-bottom: var(--space-3); }
.site-footer__link { color: var(--text-body); text-decoration: none; padding: 6px 0; } /* design: footer link spacing */
.site-footer__link:hover { color: var(--text-accent); }
.site-footer__link[aria-current="page"] { color: var(--text-heading); }
.site-footer__bottom {
  margin-top: var(--space-7); min-height: 56px; border-top: 1px solid var(--border-soft);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5);
  color: var(--text-secondary);
}

/* =========================================================================
   Invite form (InviteForm.astro) and invite modal (InviteModal.astro)
   ========================================================================= */
.invite-form { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.invite-form__row { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); max-width: 100%; }
.invite-form__input {
  width: 320px; max-width: 100%; height: 48px; padding: 0 var(--space-4);
  color: var(--text-heading); background: var(--surface-raised);
  border: 1px solid var(--border-control); border-radius: var(--radius);
}
.invite-form__input::placeholder { color: var(--text-disabled); }
.invite-form__note, .invite-form__message { color: var(--text-secondary); }
.invite-form__message:empty { display: none; }
.invite-form__message.is-error { color: var(--text-heading); }

.invite-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--space-5); }
.invite-modal[hidden] { display: none; }
.invite-modal__backdrop { position: absolute; inset: 0; background: var(--surface-backdrop); }
.invite-modal__dialog {
  position: relative; width: 100%; max-width: 28rem; max-height: calc(100vh - var(--space-7)); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-6); color: var(--text-body);
  background: var(--surface-raised); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.invite-modal__close {
  position: absolute; top: var(--space-3); right: var(--space-3); padding: var(--space-1) var(--space-2);
  font: var(--text-type-title); color: var(--text-secondary); background: none; border: 0; cursor: pointer;
}
.invite-modal__close:hover { color: var(--text-heading); }
.invite-modal .invite-form, .invite-modal .invite-form__row { align-items: stretch; justify-content: flex-start; }
.invite-modal .invite-form__input { flex: 1 1 12rem; width: auto; }

/* =========================================================================
   Sections
   ========================================================================= */

/* ---------- Hero B (sections/HeroB.astro) ---------- */
.hero-b { padding: var(--band-default) var(--page-gutter) var(--band-snug); }
.hero-b .panel__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-8); }
.hero-b__stack { width: 100%; max-width: 1120px; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); text-align: center; }
/* The rotating headline. Scales with the screen so each phrase stays on one line. */
.hero-b__lines {
  margin: 0; display: grid; grid-template-columns: auto 11em; justify-content: center; text-align: left;
  font: var(--text-type-display); line-height: 1.1; letter-spacing: -0.01em; color: var(--text-heading);
  font-size: clamp(20px, 5vw, 56px); /* design: rotating headline scales with the screen */
  column-gap: 0.28em; /* design: space after "Turn" and "into" */
}
.hero-b__window { display: block; height: 1.1em; clip-path: inset(0 -50vw -0.14em 0); }
.hero-b__reel { display: block; }
.hero-b__reel.is-rolling { transition: transform .6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hero-b__reel--second.is-rolling { transition-delay: .12s; }
.hero-b__phrase { display: block; height: 1.5em; white-space: nowrap; font-weight: 500; }
.hero-b__payoff { max-width: 960px; padding-top: var(--space-2); text-wrap: balance; }
.hero-b .invite-form { padding-top: var(--space-2); }
.hero-b__figure { width: 100%; max-width: 1120px; margin: 0; }

/* ---------- Feature row (sections/SectionFeatureRow.astro) ---------- */
.feature-row { padding: var(--band-snug) var(--page-gutter); }
.feature-row__inner {
  max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center;
  gap: 40px 80px; /* design: feature row gaps */
}
.feature-row__inner--reverse { flex-direction: row-reverse; }
.feature-row__copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.feature-row__copy h3 { text-wrap: balance; }
.feature-row__visual { flex: 1 1 420px; min-width: 0; }

/* ---------- Closing call to action (sections/SectionCTA.astro) ---------- */
.cta-band { padding: var(--band-default) var(--page-gutter); }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6) var(--space-8); }
.cta-band__copy { flex: 1 1 480px; max-width: 720px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.cta-band__copy h2 { text-wrap: balance; }
.cta-band__actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.cta-band__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.cta-band__note { color: var(--text-secondary); }

/* ---------- Centred section intro (shared) ----------
   Eyebrow, H2 and an optional lead, centred, up to 760px. */
.section-intro { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }
.section-intro h2 { padding-top: var(--space-2); text-wrap: balance; }

/* Tables that scroll sideways in their own box on small screens. */
.table-scroll { overflow-x: auto; }

/* ---------- Plan cards (sections/SectionPricingPlans.astro) ---------- */
.plans { padding: var(--band-default) var(--page-gutter) var(--band-snug); }
.plans .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: 56px; } /* design: intro to cards */
.plans__intro { align-self: center; max-width: 880px; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); text-align: center; }
.plans__intro h1 { text-wrap: balance; }
.plans__body { display: flex; flex-direction: column; align-items: center; gap: var(--space-6); }
.plans__grid { align-self: stretch; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-items: start; gap: var(--space-5); }
.plan__tab-space { height: 32px; }
.plan__tab {
  height: 36px; display: flex; align-items: center; justify-content: center;
  font-weight: 500; color: var(--ink); background: var(--lavender); border-radius: var(--radius) var(--radius) 0 0;
  margin-bottom: -4px; padding-bottom: var(--space-1); /* design: the tab tucks 4px under the card */
}
.plan__body { display: flex; flex-direction: column; align-items: flex-start; }
.plan__fit { margin-top: var(--space-2); min-height: 41px; }
.plan__price { margin-top: var(--space-5); color: var(--text-heading); }
.plan__unit { margin-top: var(--space-1); min-height: 41px; }
.plan__note { margin-top: var(--space-1); min-height: 17px; color: var(--text-secondary); }
.plan__cta { margin-top: 20px; } /* design: price block to button */
.plan__alt { min-height: 44px; margin-top: var(--space-1); display: flex; align-items: center; }
.plan__features {
  align-self: stretch; margin-top: var(--space-4); border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: var(--space-3);
  padding-top: 20px; /* design: rule to list */
}
.plan__list-heading { font-weight: 600; color: var(--text-heading); }
.plan__checks { padding-top: 0; gap: 10px; } /* design: feature list spacing */
.plan__addon { padding-top: var(--space-1); min-height: 17px; color: var(--text-secondary); }

/* ---------- Logo strip (sections/SectionLogoStrip.astro) ----------
   Full bleed: no content cap, the cells run edge to edge. */
.logo-strip { padding: 0; }
.logo-strip .panel__inner { max-width: none; }
.logo-strip__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); color: var(--text-secondary); }
.logo-strip__label, .logo-strip__cell { min-height: 88px; display: flex; align-items: center; }
.logo-strip__label { padding: var(--space-4) var(--page-gutter); color: var(--text-heading); }
.logo-strip__cell { padding: var(--space-4) var(--space-5); justify-content: center; border-left: 1px solid var(--rule); }

/* ---------- Plan comparison table (sections/SectionPlanTable.astro) ---------- */
.plan-table { padding: var(--band-default) var(--page-gutter); }
.plan-table .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: var(--space-7); }
.plan-table__body { display: flex; flex-direction: column; gap: var(--space-4); }
.plan-table__table { width: 100%; min-width: 760px; border-collapse: collapse; color: var(--text-body); }
.plan-table__table th, .plan-table__table td { text-align: left; border-bottom: 1px solid var(--border-soft); }
.plan-table__table thead th { height: 64px; padding: 0 var(--space-4); font-weight: 600; color: var(--text-heading); border-bottom-color: var(--rule); }
.plan-table__table thead .plan-table__feature-col { width: 32%; padding-left: 0; font-weight: 500; color: var(--text-secondary); }
.plan-table__plan-col { width: 17%; }
.plan-table__group th { padding: var(--space-6) 0 var(--space-3); }
.plan-table__table tbody th[scope="row"] { height: 52px; padding: 0 var(--space-4) 0 0; font-weight: 400; color: var(--text-heading); }
.plan-table__table td { padding: 0 var(--space-4); }
.plan-table__table .is-featured { background: var(--surface-raised); }
.plan-table__yes { display: block; color: var(--text-accent); }
.plan-table__no { display: block; color: var(--text-secondary); }
.plan-table__footnote { max-width: 760px; color: var(--text-secondary); }

/* ---------- Link row (sections/SectionLinkRow.astro) ---------- */
.link-row { padding: var(--band-snug) var(--page-gutter); }
.link-row__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) var(--space-8); }
.link-row__title { flex: 1 1 320px; text-wrap: balance; }
.link-row__cols { flex: 2.4 1 560px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: var(--space-5) var(--space-7); }
.link-row__col { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.link-row__link {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px;
  font: var(--text-type-body); font-weight: 500; color: var(--text-heading); text-decoration: none;
}
.link-row__link:hover { color: var(--text-accent); }

/* ---------- Questions (sections/SectionFAQ.astro) ---------- */
.faq { padding: var(--band-default) var(--page-gutter); }
.faq__inner {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 48px 80px; /* design: intro to list */
}
.faq__intro { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.faq__title { padding-top: var(--space-2); text-wrap: balance; }
.faq__list { flex: 1.6 1 480px; min-width: 0; display: flex; flex-direction: column; }
.faq__item { border-bottom: 1px solid var(--border-soft); }
.faq__question {
  appearance: none; cursor: pointer; width: 100%; min-height: 64px; padding: 0;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  text-align: left; font-weight: 500; color: var(--text-heading); background: transparent; border: 0;
}
.faq__question:hover { color: var(--text-accent); }
.faq__question .icon { flex: none; }
.faq__question[aria-expanded="true"] .icon__vertical { opacity: 0; }
.faq__answer {
  max-width: 640px; color: var(--text-body);
  padding-bottom: 20px; /* design: answer to rule */
}

/* ---------- Numbered list (NumberedItem.astro): steps, careers values ---------- */
.numbered { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 40px var(--space-7); } /* design: row gap */
.numbered__item { display: flex; flex-direction: column; align-items: stretch; }
.numbered__number { padding: var(--space-5) 0 var(--space-4); color: var(--text-heading); }
.numbered__text { padding-top: var(--space-2); }
.numbered__link { align-self: flex-start; padding-top: var(--space-2); }

/* ---------- Three steps (sections/SectionSteps.astro) ---------- */
.steps { padding: var(--band-default) var(--page-gutter); }
.steps .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: 56px; } /* design: intro to steps */

/* ---------- Text block (sections/SectionText.astro) ---------- */
.text-block { padding: var(--band-default) var(--page-gutter); }
.text-block__inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-6) var(--space-9); }
.text-block__head { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.text-block__title { padding-top: var(--space-2); text-wrap: balance; }
.text-block__body { flex: 1.4 1 420px; min-width: 0; max-width: 680px; display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-2); }

/* ---------- Card grid (sections/SectionFeatureGrid.astro) ---------- */
.card-grid { padding: var(--band-default) var(--page-gutter); }
.card-grid .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: 56px; } /* design: intro to cards */
.card-grid__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--space-5); }
.card-grid__card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.card-grid__label { padding-bottom: var(--space-2); }

/* ---------- Page opening (About) ---------- */
.page-opening { padding: var(--band-default) var(--page-gutter); }
.page-opening .panel__inner { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--space-5); }
.page-opening__title { max-width: 960px; text-wrap: balance; }
.page-opening__body { max-width: 720px; display: flex; flex-direction: column; gap: var(--space-4); padding-top: var(--space-2); }

/* ---------- Photo slot (placeholder until photos arrive) ---------- */
.photo-slot {
  height: 220px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary);
  background: var(--surface-raised); border: 1px solid var(--border-soft); border-radius: var(--radius);
  flex: 1 1 280px;
}
.photo-slot--wide { flex: 2 1 560px; }
.photo-slot--hero { height: 440px; border-color: var(--rule); }

/* ---------- Careers ---------- */
.careers-opening { padding: var(--band-default) var(--page-gutter); }
.careers-opening__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-7) var(--space-8); }
.careers-opening__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.careers-opening__copy h1 { text-wrap: balance; }
.careers-opening__lead { max-width: 520px; }
.careers-opening__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-2); }
.careers-opening__visual { flex: 1 1 480px; min-width: 0; }

.careers-values { padding: var(--band-default) var(--page-gutter); }
.careers-values__inner {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 48px 80px; /* design: intro to values */
}
.careers-values__intro { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.careers-values__title { padding-top: var(--space-2); text-wrap: balance; }
.careers-values__list { flex: 1.8 1 520px; min-width: 0; }

.careers-photos { padding: var(--band-default) var(--page-gutter); }
.careers-photos .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: var(--space-7); }
.careers-photos__intro { max-width: 720px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.careers-photos__title { padding-top: var(--space-2); text-wrap: balance; }
.careers-photos__grid { display: flex; flex-wrap: wrap; gap: var(--space-4); }

.careers-roles { padding: var(--band-default) var(--page-gutter); }
.careers-roles__inner { max-width: 880px; margin: 0 auto; }
.careers-roles .card { padding: var(--space-7); }
.careers-roles__card { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }
.careers-roles__title { padding-top: var(--space-2); text-wrap: balance; }
.careers-roles__text { max-width: 600px; }
.careers-roles__button { padding-top: var(--space-2); }
.careers-roles__email { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Inner page hero (sections/SectionPageHero.astro) ---------- */
.page-hero { padding: var(--band-default) var(--page-gutter); }
.page-hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-7) var(--space-8); }
.page-hero__copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.page-hero__copy h1 { text-wrap: balance; }
.page-hero__lead { max-width: 520px; }
.page-hero__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-2); }
.page-hero__visual { flex: 1 1 480px; min-width: 0; }

/* ---------- Figures band (sections/SectionStats.astro) ---------- */
.stats { padding: var(--band-snug) var(--page-gutter); }
.stats__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-items: center;
  gap: 40px var(--space-7); /* design: row gap */
}
.stats__item { display: flex; flex-direction: column; gap: var(--space-2); padding-left: var(--space-5); border-left: 1px solid var(--border-soft); }
.stats__figure { color: var(--text-accent); }
.stats__caption { max-width: 300px; color: var(--text-body); }

/* ---------- Integrations (sections/SectionIntegrations.astro) ---------- */
.integrations { padding: var(--band-default) var(--page-gutter); }
.integrations__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 48px 80px; /* design: intro to tiles */
}
.integrations__intro { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.integrations__title { padding-top: var(--space-2); text-wrap: balance; }
.integrations__grid { flex: 1.4 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: var(--space-4); }
.integrations__tile { height: 96px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); background: var(--surface-raised); border: 1px solid var(--border-soft); border-radius: var(--radius); }

/* ---------- Testimonial (sections/SectionTestimonial.astro) ---------- */
.testimonial { padding: var(--band-default) var(--page-gutter); }
.testimonial__figure { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); }
.testimonial__quote { margin: 0; color: var(--text-heading); text-align: center; text-wrap: pretty; }
.testimonial__by { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3) var(--space-5); }
.testimonial__person { display: flex; align-items: center; gap: var(--space-3); }
.testimonial__photo { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--border-soft); }
.testimonial__who { display: flex; flex-direction: column; }
.testimonial__name { font-weight: 500; color: var(--text-heading); }
.testimonial__role, .testimonial__logo { color: var(--text-secondary); }
.testimonial__divider { width: 1px; height: 32px; background: var(--border-soft); }

/* ---------- Next page link (sections/SectionNextLink.astro) ---------- */
.next-link { padding: 0; }
.next-link .panel__inner { max-width: none; }
.next-link__body { padding: var(--space-6) var(--page-gutter); }
.next-link__link {
  max-width: var(--content-width); margin: 0 auto; min-height: 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5);
  color: var(--text-heading); text-decoration: none;
}
.next-link__link:hover { color: var(--text-accent); }
.next-link__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-5); }
.next-link__label { color: var(--text-accent); }

/* ---------- Product tour (sections/SectionDemo.astro) ---------- */
.tour { padding: var(--band-default) var(--page-gutter); }
.tour .panel__inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; } /* design: section rhythm */
.tour__body { width: 100%; max-width: 1120px; display: flex; flex-direction: column; gap: var(--space-5); }
.tour__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2) var(--space-6); }
.tour__tab {
  appearance: none; background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  min-height: 48px; padding: 0 var(--space-1); font-weight: 500; color: var(--text-secondary);
}
.tour__tab:hover { color: var(--text-heading); }
.tour__tab[aria-selected="true"] { color: var(--text-heading); border-bottom-color: var(--gold); }
.frame--tour { height: 480px; }
.frame--tour .frame__row { grid-template-columns: 2fr 1fr 1fr 1fr 56px; }
.frame--tour .frame__bar { flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.tour__note { color: var(--text-secondary); }
.tour__side { flex-basis: 30%; max-width: 300px; gap: var(--space-3); }
.tour__bubble {
  align-self: flex-end; width: 84%; padding: var(--space-3); display: flex; flex-direction: column; background: var(--oat); border-radius: var(--radius);
  gap: 6px; /* design: chat bubble lines */
}
.tour__line { height: 8px; border-radius: var(--radius); background: var(--pebble); }
.tour__point { display: flex; align-items: center; gap: var(--space-2); }
.tour__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.tour__prompt {
  margin-top: auto; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  color: var(--text-secondary); border: 1px solid var(--border-control); border-radius: var(--radius);
  padding: 0 var(--space-2) 0 var(--space-3);
}
.tour__send { flex: none; width: 24px; height: 24px; border-radius: var(--radius); background: var(--ink); }
.tour__avatar { background: var(--oat); }
.tour__role { flex: none; width: 56px; }
.tour__cta { display: flex; justify-content: center; }

/* ---------- Template gallery (sections/SectionTemplates.astro) ---------- */
.templates { padding: var(--band-default) var(--page-gutter); }
.templates .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: var(--space-7); }
.templates__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-7); }
.templates__intro { max-width: 720px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.templates__title { padding-top: var(--space-2); text-wrap: balance; }
.templates__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-5); }
.templates .card { padding: var(--space-4); }
.templates__card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
.templates__preview {
  align-self: stretch; height: 132px; margin-bottom: var(--space-3); padding: var(--space-2) var(--space-3);
  background: var(--surface-page); border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.templates__row { display: grid; gap: var(--space-2); align-items: center; height: 28px; border-bottom: 1px solid var(--border-soft); }
.templates__preview--bars-chip .templates__row { grid-template-columns: 2fr 1fr 32px; }
.templates__preview--three-bars .templates__row { grid-template-columns: 1fr 1fr 1fr; }
.templates__preview--square-bars .templates__row { grid-template-columns: 16px 2fr 1fr; }
.templates__preview--bar-chip-bar .templates__row { grid-template-columns: 2fr 32px 1fr; }
.templates__bar { height: 6px; border-radius: var(--radius); background: var(--border-soft); }
.templates__chip { height: 12px; border-radius: var(--radius); }
.templates__square { width: 12px; height: 12px; border-radius: var(--radius); }

/* ---------- Spec list (sections/SectionSpecList.astro) ---------- */
.spec-list { padding: var(--band-default) var(--page-gutter); }
.spec-list__inner {
  max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center;
  gap: 40px; /* design: intro to list */
}
.spec-list__list { margin: 0; display: flex; flex-direction: column; }
.spec-list__row { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-6); padding: var(--space-4) 0; }
.spec-list__label { flex: 0 0 200px; font-weight: 600; color: var(--text-heading); }
.spec-list__text { flex: 1 1 320px; margin: 0; color: var(--text-body); }

/* ---------- Comparison table (sections/SectionComparison.astro) ---------- */
.comparison { padding: var(--band-default) var(--page-gutter); }
.comparison .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: var(--space-7); }
.comparison__intro { max-width: 720px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.comparison__title { padding-top: var(--space-2); text-wrap: balance; }
.comparison__table { width: 100%; min-width: 720px; border-collapse: collapse; color: var(--text-body); }
.comparison__table th, .comparison__table td { text-align: left; border-bottom: 1px solid var(--border-soft); }
.comparison__table thead th { width: 22%; padding: var(--space-4); font-weight: 500; color: var(--text-secondary); border-bottom-color: var(--rule); }
.comparison__table thead .comparison__capability-col { width: 34%; padding-left: 0; }
.comparison__table thead .comparison__us { font-weight: 600; color: var(--text-heading); }
.comparison__table tbody th { height: 56px; padding: 0 var(--space-4) 0 0; font-weight: 500; color: var(--text-heading); }
.comparison__table td { padding: 0 var(--space-4); color: var(--text-secondary); }
.comparison__us { background: var(--surface-raised); }
.comparison__yes { display: block; color: var(--text-accent); }

/* ---------- Plans teaser (sections/SectionPlans.astro) ---------- */
.plans-teaser { padding: var(--band-default) var(--page-gutter); }
.plans-teaser .panel__inner { display: flex; flex-direction: column; justify-content: center; gap: 56px; } /* design: intro to cards */
.plans-teaser__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: var(--space-5); }
.plans-teaser .card { padding: var(--space-6); }
.plans-teaser__card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.plans-teaser__name-row { align-self: stretch; min-height: 26px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.plans-teaser__price { display: flex; flex-direction: column; gap: var(--space-1); }
.plans-teaser__amount { color: var(--text-heading); }
.plans-teaser__unit { color: var(--text-secondary); }
.plans-teaser__fit { min-height: 51px; }
.plans-teaser__cta { padding: var(--space-2) 0 var(--space-3); }
.plans-teaser__checks { align-self: stretch; border-top: 1px solid var(--border-soft); gap: 10px; padding-top: 20px; } /* design: feature list spacing */

/* Short centred notice: 404, thank-you. */
.notice { text-align: center; padding-top: var(--band-default); padding-bottom: var(--band-default); }
.notice .actions { justify-content: center; }
.notice__title { margin-top: var(--space-5); text-wrap: balance; }
.notice__title:first-child { margin-top: 0; }
.notice__lead { margin: var(--space-5) auto 0; max-width: 32rem; }

/* =========================================================================
   Legal documents (privacy, terms, dpa, rup, subprocessors, accessibility)
   A header band, then a sticky "On this page" list beside the text.
   Behaviour (scroll-spy, phone toggle, back to top): public/js/main.js.
   ========================================================================= */
.doc-head { padding: var(--band-snug) var(--page-gutter); border-bottom: 1px solid var(--rule); }
.doc-head__inner { max-width: var(--content-width); margin: 0 auto; }
.doc-head__title { margin-top: var(--space-5); }
.doc-head__updated { margin-top: var(--space-4); color: var(--text-secondary); }

.doc { padding: var(--band-snug) var(--page-gutter) var(--band-default); }
.doc__grid { max-width: var(--content-width); margin: 0 auto; display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--band-snug); align-items: start; }
.doc__grid--single { grid-template-columns: minmax(0, 1fr); }

/* "On this page" */
.doc-toc { position: sticky; top: var(--space-9); display: flex; flex-direction: column; gap: var(--space-1); }
.doc-toc__title { color: var(--text-secondary); margin-bottom: var(--space-3); padding-left: var(--space-3); }
.doc-toc__link {
  font: var(--text-type-small); color: var(--text-body); text-decoration: none;
  padding: var(--space-2) var(--space-3); border-left: 2px solid transparent;
}
.doc-toc__link:hover, .doc-toc__link.is-active { color: var(--text-heading); background: var(--surface-warm); border-left-color: var(--gold); }
.doc-toc__link.is-active { font-weight: 500; }
.doc-toc__toggle { display: none; }

/* The text: a reading measure, design system type. Long bare URLs wrap. */
.doc-body { max-width: 45rem; overflow-wrap: anywhere; }
.doc-body [id] { scroll-margin-top: var(--space-9); }
.doc-body h2 { font: var(--text-type-title); margin: 0 0 var(--space-4); }
.doc-body h3 { font: var(--text-type-subtitle); margin: var(--space-5) 0 var(--space-3); }
.doc-body p, .doc-body li { font: var(--text-type-body); }
.doc-body p { margin: 0 0 var(--space-4); }
.doc-body p:last-child { margin-bottom: 0; }
.doc-body strong { color: var(--text-heading); font-weight: 600; }
.doc-body ul { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
.doc-body ul li { margin-bottom: var(--space-2); }
.doc-body ul li::marker { color: var(--text-accent); }
.doc-section { margin-top: var(--band-tight); }
.doc-body__intro { font: var(--text-type-lead); }
.doc-body__note { margin-top: var(--band-tight); padding-top: var(--space-5); border-top: 1px solid var(--border-soft); color: var(--text-secondary); }

/* Numbered list: each number in a Lavender badge (the design system's badge fill). */
.doc-body ol { margin: 0 0 var(--space-4); padding: 0; list-style: none; counter-reset: doc-ol; display: flex; flex-direction: column; gap: var(--space-3); }
.doc-body ol li { position: relative; counter-increment: doc-ol; padding-left: var(--space-7); }
.doc-body ol li::before {
  content: counter(doc-ol); position: absolute; left: 0; top: 0;
  min-width: var(--space-6); padding: 0 var(--space-2); text-align: center;
  font: var(--text-type-small); font-weight: 500; color: var(--ink); background: var(--lavender); border-radius: var(--radius);
}

/* Contact details, a "please note" callout, and all-caps clauses. */
.doc-card, .doc-callout { margin: var(--space-6) 0; padding: var(--space-5); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.doc-card { background: var(--surface-raised); }
.doc-callout { background: var(--surface-warm); }
.doc-card__label { display: block; margin-bottom: var(--space-2); color: var(--text-secondary); }
.doc-callout .doc-card__label { color: var(--text-accent); }
.doc-card__name { color: var(--text-heading); font-weight: 600; }
.doc-callout p { margin: 0; }
.doc-caps p { font: var(--text-type-small); color: var(--text-secondary); }

/* Tables: subprocessors, and the DPA's key/value annex. */
.doc-table-wrap { margin: var(--space-6) 0; overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); }
.doc-table { width: 100%; border-collapse: collapse; font: var(--text-type-small); }
.doc-table th { text-align: left; vertical-align: top; color: var(--text-heading); font-weight: 600; padding: var(--space-3) var(--space-4); }
.doc-table thead th { background: var(--surface-warm); border-bottom: 1px solid var(--border-soft); }
.doc-table td { vertical-align: top; color: var(--text-body); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-soft); }
.doc-table tbody tr:last-child td, .doc-table tbody tr:last-child th { border-bottom: none; }
.doc-table td:first-child { color: var(--text-heading); font-weight: 500; }
.doc-table:not(.doc-table--kv) td:last-child { white-space: nowrap; color: var(--text-secondary); }
.doc-table--kv tbody th { width: 30%; border-bottom: 1px solid var(--border-soft); }
.doc-table__logo { display: inline-block; vertical-align: middle; margin-right: var(--space-2); }

/* Back to top (phones, long documents; main.js adds it). */
.doc-top { display: none; }
/* =========================================================================
   Phones (≤900px, the design system's type breakpoint)
   ========================================================================= */
@media (max-width: 900px) {
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }

  /* Legal documents: "On this page" collapses behind a toggle above the text. */
  .doc__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .doc-toc { position: static; border: 1px solid var(--border-soft); border-radius: var(--radius); padding: var(--space-2); }
  .doc-toc__title { display: none; }
  .doc-toc__toggle {
    display: block; width: 100%; text-align: left; cursor: pointer;
    font: var(--text-type-small); font-weight: 500; color: var(--text-heading);
    background: none; border: 0; padding: var(--space-2) var(--space-3);
  }
  .doc-toc__link { display: none; }
  .doc-toc.is-open .doc-toc__link { display: block; }
  .doc-top {
    position: fixed; right: var(--page-gutter); bottom: var(--space-5); z-index: 40;
    width: 44px; height: 44px; font: var(--text-type-body); cursor: pointer;
    color: var(--text-heading); background: var(--surface-raised);
    border: 1px solid var(--border-control); border-radius: var(--radius);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .doc-top.is-visible { display: block; opacity: 1; pointer-events: auto; }}
