/* Departure Labs — homepage stylesheet. Self-contained: no framework, no reset library. */

/* Self-hosted from public/fonts/ (see decisions.md) -- only the weights this
   file actually uses: Space Grotesk 600, Figtree 400/600/700. Each file's
   internal name-table metadata varies per weight ("Space Grotesk SemiBold",
   "Figtree Bold", etc.); font-family/font-weight here are what the browser
   actually matches on, so all four resolve correctly under the two family
   names --font-heading/--font-body reference below regardless of that. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/SpaceGrotesk-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Figtree-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Figtree-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Figtree-700.woff2') format('woff2');
}

:root {
  /* roles */
  --color-bg: #f5f7f7;
  --color-surface: #ffffff;
  --color-text: #101619;
  --color-accent: #ce1808;
  --color-accent-2: #5d666d;
  --color-divider: color-mix(in srgb, #101619 14%, transparent);

  /* logo only — the brand mark's own navy, distinct from the site accent.
     The mark's other color (the period) IS the site accent now — see the
     "orange ramp" below and decisions.md — so there is no separate
     --logo-teal-equivalent token anymore; .nav-brand-teal below just
     consumes --color-accent-700 directly. */
  --logo-navy: #0b2137;

  /* neutral ramp */
  --color-neutral-100: #f7f8f8;
  --color-neutral-200: #eceeef;
  --color-neutral-300: #d8dcde;
  --color-neutral-400: #b0b7bb;
  --color-neutral-500: #868f95;
  --color-neutral-600: #656e74;
  --color-neutral-700: #4a5257;
  --color-neutral-800: #2f363a;
  --color-neutral-900: #1a2023;

  /* orange ramp — same hue as the mark's period (#f62c1a, this is --color-accent-500
     unmodified). 700 is a darkened shade tuned so it clears 4.5:1 contrast both
     as a background under white button text AND as text on --color-bg; the raw
     500 fails both (3.97:1 / 3.69:1) — see decisions.md. */
  --color-accent-100: #f5ebea;
  --color-accent-200: #f0cfcc;
  --color-accent-300: #ed9e97;
  --color-accent-400: #ee5c4f;
  --color-accent-500: #f62c1a;
  --color-accent-600: #e71b09;
  --color-accent-700: #ce1808;
  --color-accent-800: #9d1306;
  --color-accent-900: #6c0d04;

  /* steel ramp */
  --color-accent-2-100: #f4f5f6;
  --color-accent-2-200: #e6e8ea;
  --color-accent-2-300: #ced2d5;
  --color-accent-2-400: #a9afb4;
  --color-accent-2-500: #7f878d;
  --color-accent-2-600: #616a70;
  --color-accent-2-700: #495157;
  --color-accent-2-800: #32383d;
  --color-accent-2-900: #1e2327;

  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Figtree", system-ui, sans-serif;

  --space-1: 4.4px;  --space-2: 8.8px;  --space-3: 13.2px; --space-4: 17.6px;
  --space-5: 22px;   --space-6: 26.4px; --space-7: 30.8px; --space-8: 35.2px;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #101619 10%, transparent);
  --shadow-md: 0 4px 14px color-mix(in srgb, #101619 12%, transparent);
  --shadow-lg: 0 16px 40px color-mix(in srgb, #101619 16%, transparent);

  --leading: 28px;
  --half: 14px;
  --edge: clamp(20px, 5vw, 72px);
  --measure: 58ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--color-bg); color: var(--color-text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55; font-weight: 400;
  text-wrap: pretty; overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: var(--color-accent-200); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--edge); }

/* — nav — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) max(var(--edge), calc((100% - 1200px) / 2 + var(--edge)));
  border-bottom: 1px solid var(--color-neutral-300);
}
.nav-brand {
  display: flex; align-items: center; gap: var(--space-2);
  margin-right: auto;
}
/* The "DL." glyph is wide (1380x684 viewBox, ~2:1), unlike the near-square D
   monogram it replaced. */
.nav-brand-mark { width: 54px; height: 27px; }
.nav-brand-word {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; letter-spacing: -0.015em;
}
.nav-brand-navy { color: var(--logo-navy); }
.nav-brand-teal { color: var(--color-accent-700); }
.nav a { color: inherit; text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--color-accent-700); }
@media (max-width: 480px) { .nav a.nav-secondary { display: none; } }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--color-text);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}
.btn-primary,
.btn-primary:link, .btn-primary:visited, .btn-primary:hover, .btn-primary:active {
  color: #ffffff; text-decoration: none;
}
.btn-primary { background: var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-ghost { color: var(--color-accent-700); }
.btn-ghost:hover { background: var(--color-accent-100); }
.btn-ghost:active { background: var(--color-accent-200); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* — kicker — */
.kicker {
  display: block; font-size: 13px; line-height: var(--half);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
  color: var(--color-accent-700); margin-bottom: var(--leading);
  /* Now an <h2> (was a <span>) so it can carry real heading semantics --
     see decisions.md. The shared h1-h6 rule sets font-family: var(--font-
     heading) (Space Grotesk); every other property it sets is already
     overridden above, but font-family wasn't, so without this line the
     kicker would silently render in the heading font instead of the body
     font it always has. */
  font-family: var(--font-body);
}

/* — hero — */
.hero { padding: calc(2.5 * var(--leading)) 0 calc(1.5 * var(--leading)); }
.display {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(34px, 4vw, 56px); line-height: clamp(38px, 4.3vw, 61px);
  letter-spacing: -0.015em; margin: 0; max-width: 18ch;
}
.display .line { display: block; }
.hero .sub {
  font-size: 17px; line-height: var(--leading); max-width: var(--measure);
  margin: var(--leading) 0 0;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}
/* .hero .row removed with the hero CTA pair — the nav already carries both
   "Book an intro call" (#contact) and "How it works" (#how). */

/* — pull quote — */
.quote { padding: calc(1.25 * var(--leading)) 0 calc(1.5 * var(--leading)); }
.quote blockquote {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(21px, 2.1vw, 27px); line-height: calc(1.4 * var(--leading));
  letter-spacing: -0.02em; max-width: 32ch; margin: 0; text-indent: -0.33em;
}
@media (max-width: 720px) { .quote blockquote { text-indent: 0; } }
.quote figcaption {
  font-size: 15.5px; line-height: var(--leading); margin-top: var(--half);
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
/* Sits between the H1 and the hero's sub paragraph now, inside .hero's own
   padding — the standalone .quote top/bottom padding above would double up
   with .hero's, so this overrides to a single in-between gap instead. */
.hero-quote { padding: var(--leading) 0 0; }

/* — stat row — */
.bed {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--leading) clamp(20px, 3vw, 44px);
  padding: var(--leading) 0 calc(2 * var(--leading));
}
/* Numeral and label sit side by side, baseline-aligned, so the label reads
   as a caption *of* the number rather than a block stacked under it. The
   middle stat lists one step per line; packing all three into a single
   sentence wrapped into a ragged three-line run-on. */
.seed {
  border-top: 1px solid var(--color-neutral-300);
  padding: var(--half) 0 0;
  display: flex; align-items: baseline; gap: var(--space-3);
}
.stat-num {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(28px, 2.8vw, 40px); line-height: var(--leading);
  font-variant-numeric: tabular-nums; margin: 0; color: var(--color-text);
  /* No min-width: each of the three stats is its own grid column, so there's
     nothing for a shared left edge to line up against — a fixed 2ch box just
     left dead space after "1" and "3" (1 digit narrower than the box) that
     "30" (exactly 2 digits) didn't have, making its gap to the label look
     tighter than the other two. Sizing to content makes the flex gap the
     only space between numeral and label, for all three. */
  flex: 0 0 auto;
}
.stat-label {
  font-size: 13px; line-height: var(--half);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
  /* Wide enough that "Days to see how you like it" (27 characters) stays on
     one line — 22ch wrapped it, stranding "like it" on its own row below
     where the other two captions sit. */
  max-width: 30ch; margin: 0;
}
/* The 3-step breakdown reads as a sub-list under the "Simple steps" caption,
   not a peer of it — smaller, indented, no bullets, lowercase (the caption
   above it already carries the uppercase/tracked treatment). */
.stat-sublist {
  list-style: none; margin: var(--space-2) 0 0; padding: 0 0 0 var(--space-3);
  font-size: 14.5px; line-height: 1.5; letter-spacing: normal; text-transform: none;
  border-left: 1px solid var(--color-neutral-300);
}
.stat-sublist li + li { margin-top: 2px; }
@media (max-width: 760px) { .bed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* — statement — */
.statement { padding: var(--leading) 0 calc(1.5 * var(--leading)); }
.statement h2 {
  font-size: clamp(24px, 2.6vw, 33px); line-height: calc(1.5 * var(--leading));
  max-width: 34ch; margin: 0;
}
.statement h2 .line { display: block; }
.statement p {
  font-size: 17px; line-height: var(--leading); max-width: var(--measure);
  margin: var(--leading) 0 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

/* — how it works — */
.features { padding: calc(1.5 * var(--leading)) 0; }
.feature {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: var(--leading) clamp(24px, 4vw, 72px); align-items: baseline;
  padding: calc(0.75 * var(--leading)) 0;
}
.f-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 23px; line-height: var(--leading); margin: 0;
}
.f-copy {
  font-size: 15.5px; line-height: var(--leading); max-width: 52ch; margin: 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
@media (max-width: 880px) { .feature { grid-template-columns: minmax(0, 1fr); } }

/* — where we've worked — */
.split { padding: calc(1.25 * var(--leading)) 0 var(--leading); }
/* Shares its size with .domains-title (declared together below) so the two
   cannot drift apart. Margins stay separate: .split-title opens the section
   directly under the kicker, .domains-title breaks up content beneath it. */
.split-title { margin: 0; }
.split-copy .note {
  font-size: 15.5px; line-height: var(--leading); max-width: var(--measure);
  margin: var(--leading) 0 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.split-title, .domains-title { font-size: 23px; }
.domains-title { margin: calc(1.5 * var(--leading)) 0 0; }
.domains {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin: var(--leading) 0 0; padding: 0; list-style: none; max-width: 62ch;
}
.domains li {
  font-size: 13px; line-height: var(--half); letter-spacing: 0.02em; white-space: nowrap;
  color: var(--color-neutral-800); background: var(--color-neutral-200);
  border-radius: var(--radius-sm); padding: 7px 11px;
}

/* — contact — */
.close { padding: var(--leading) 0 calc(2 * var(--leading)); }
/* .patch keeps its class only for the descendant selectors below — only
   .booking-embed reads as a framed card now. The heading, sub copy, and
   legacy-form fallback sit directly on the page background like every
   other section, instead of being nested inside a second box around
   content that isn't the scheduler. */
/* Was `.patch h3` while this heading was an <h3>. It is the contact
   section's own heading, so it is an <h2> like every other section title;
   the nested .legacy-form-title stays an <h3> under it. Note the old
   selector (0,1,1) also outranked .legacy-form-title (0,1,0) and forced
   that subheading to 24px, overriding its own 20px rule — scoping this to
   h2 lets that rule finally apply. */
.patch h2 { font-size: 24px; line-height: var(--leading); margin: 0; }
.patch .sub {
  font-size: 15.5px; line-height: var(--leading); max-width: var(--measure);
  margin: var(--leading) 0 0;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
/* — booking embed (CloudMeet) — */
.booking-embed {
  margin: calc(1.5 * var(--leading)) auto 0;
  /* CloudMeet's own card is a fixed 650/920/700px depending on step (default
     / date-and-time-selected / details-form), never wider than ~920px. Left
     at 100% of the section, the container was ~1056px on a typical desktop
     viewport — over 400px wider than the card ever gets — leaving equal dead
     gutters either side of it. Capped just above the widest step so the card
     is never clipped, while still comfortably above CloudMeet's own 768px
     desktop/mobile breakpoint (the iframe's own width, not ours, decides
     which layout CloudMeet renders). */
  max-width: 960px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg);
  /* The scheduler paints its own light ground; clip it to the panel's radius
     so the iframe corners don't square off the card. */
  overflow: hidden;
  background: var(--color-neutral-100);
}
.booking-embed iframe {
  display: block;
  width: 100%;
  /* A cross-origin frame cannot report its own height, so these are measured
     against the tallest step of the real booking flow rather than guessed.
     Loaded with ?embed=1, which drops the scheduler's full-viewport-height and
     vertical centering — without it the widget stretches to fill whatever
     height is set here and floats in dead space.

     Desktop: 601px for date+time, 604px for the details form. The time column
     scrolls internally rather than growing, so a busy day does not change this.
     Mobile lays out differently: the calendar step is the tall one at ~982px,
     while the details form is ~646px. */
  height: 620px;
  border: 0;
}
@media (max-width: 640px) {
  .booking-embed iframe { height: 1000px; }
}

/* — legacy contact form (progressive disclosure) — */
.legacy-toggle { margin-top: var(--leading); }
.legacy-toggle-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15.5px;
  line-height: var(--leading);
  color: var(--color-accent-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 140ms ease;
}
.legacy-toggle-btn:hover { color: var(--color-accent-600); }
.legacy-form {
  margin-top: var(--leading);
  padding-top: var(--leading);
  border-top: 1px solid var(--color-neutral-300);
}
/* Collapsed only once site.js has confirmed the toggle works, so the form
   stays reachable if JavaScript never runs. */
.legacy-form[hidden] { display: none; }
.legacy-form-title { font-size: 20px; line-height: var(--leading); margin: 0; }

.contact-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--leading) var(--space-4); max-width: 720px;
  margin-top: calc(1.5 * var(--leading));
}
.field-wide, .contact-actions { grid-column: 1 / -1; }
/* Off-screen, not display:none — some bots specifically skip hidden /
   display:none fields but still fill genuinely-present ones. */
.field-hp {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 12px; font: inherit; font-size: 14px;
  color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { resize: vertical; min-height: calc(3.5 * var(--leading)); }
.contact-actions { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.contact-note {
  font-size: 13px; line-height: var(--leading); margin: 0;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
@media (max-width: 640px) { .contact-form { grid-template-columns: 1fr; } }

/* — footer — */
footer {
  padding: calc(1.5 * var(--leading)) 0;
  font-size: 13px; line-height: var(--leading);
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}

/* — legal pages (privacy, terms) — */
/* Long-form prose, unlike the rest of the site's short marketing copy, so
   this gets its own measure and heading rhythm rather than reusing e.g.
   .feature's two-column row layout. */
.legal {
  max-width: var(--measure);
  padding: calc(2 * var(--leading)) 0 calc(1.5 * var(--leading));
}
.legal-title { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: var(--space-2); }
.legal-updated {
  font-size: 13px; margin: 0 0 var(--leading);
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.legal h2 {
  font-size: 19px; margin: calc(1.5 * var(--leading)) 0 var(--space-2);
}
.legal h2:first-of-type { margin-top: var(--leading); }
.legal p, .legal li { font-size: 15.5px; line-height: var(--leading); }
.legal ul { margin: 0 0 var(--space-3); padding-left: 1.2em; }
.legal li { margin-bottom: var(--space-1); }
.legal-back { margin-top: calc(1.5 * var(--leading)); }

/* — admin dashboard (/admin) — */
/* Layout and chart types ported from Campsite Prep's analytics dashboard;
   accent color is this site's own --color-accent-700 (petrol) rather than
   that project's green, so it reads as a Departure Labs page. */
.admin-body { background: var(--color-neutral-100); }
.admin-wrap { padding: calc(1.5 * var(--leading)) var(--edge) calc(2 * var(--leading)); max-width: 1200px; }
.admin-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--leading);
}
.admin-title { font-size: 22px; margin: 0; }
/* Shown only when the request's hostname starts with "dev." — disappears on
   its own once the real production domain goes live, no code change needed
   at that point (see decisions.md's dev->prod checklist). */
.admin-env-pill {
  display: inline-block; vertical-align: middle; margin-left: var(--space-2);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 999px;
  /* Same accent-100/700/800 combination as .admin-custom-range-active below,
     not an unrelated amber -- was a hardcoded Tailwind-amber triple
     (#fef3c7/#92400e/#fde68a) with no relation to this file's own tokens.
     Contrast checked, not assumed: text 7.1:1, border 4.78:1 against the
     accent-100 background (WCAG needs 4.5:1 / 3:1 respectively). */
  background: var(--color-accent-100); color: var(--color-accent-800); border: 1px solid var(--color-accent-700);
}
.admin-subtitle { font-size: 13px; margin: 4px 0 0; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.admin-header-actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); }
.admin-presets { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.admin-preset {
  padding: 6px 12px; font-size: 13px; font-weight: 600; border-radius: var(--radius-md);
  border: 1px solid var(--color-neutral-300); background: var(--color-surface);
  color: var(--color-text); text-decoration: none; transition: border-color 140ms ease;
}
.admin-preset:hover { border-color: var(--color-neutral-400); color: var(--color-text); }
.admin-preset-active, .admin-preset-active:hover {
  background: var(--color-accent-700); border-color: var(--color-accent-700); color: #fff;
}
.admin-custom-range {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  border: 1px solid var(--color-neutral-300); border-radius: var(--radius-md);
  background: var(--color-surface); font-size: 13px;
}
.admin-custom-range-active { border-color: var(--color-accent-700); background: var(--color-accent-100); }
.admin-custom-label { font-weight: 600; color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.admin-custom-range input[type='date'] { font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--color-text); }
.admin-custom-range button {
  font: inherit; font-size: 13px; font-weight: 600; padding: 3px 10px; border: 0;
  border-radius: var(--radius-sm); background: var(--color-accent-700); color: #fff; cursor: pointer;
}
.admin-custom-range button:hover { background: var(--color-accent-600); }
.admin-signout { font-size: 13px; color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.admin-warning {
  /* Same accent-100/700/800 combination as .admin-env-pill above -- see its
     comment. Was the same hardcoded amber triple. */
  background: var(--color-accent-100); border: 1px solid var(--color-accent-700); color: var(--color-accent-800);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: 13.5px;
  margin-bottom: var(--leading);
}
.admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--leading); }
.admin-card {
  background: var(--color-surface); border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg); padding: var(--space-5); margin-bottom: var(--leading);
}
.admin-metrics .admin-card { margin-bottom: 0; }
.admin-metric-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: color-mix(in srgb, var(--color-text) 45%, transparent); margin: 0 0 4px; }
.admin-metric-value { font-size: 26px; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.admin-metric-sub { font-size: 12.5px; color: color-mix(in srgb, var(--color-text) 50%, transparent); margin: 4px 0 0; }
.admin-section-title { font-size: 14px; font-weight: 600; margin: 0 0 var(--space-1); }
.admin-section-sub { font-weight: 400; color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.admin-section-desc { font-size: 13px; color: color-mix(in srgb, var(--color-text) 50%, transparent); margin: 0 0 var(--space-3); }
.admin-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.admin-grid-2 .admin-card, .admin-grid-4 .admin-card { margin-bottom: var(--leading); }
.admin-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 900px) { .admin-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .admin-grid-2, .admin-grid-4, .admin-metrics { grid-template-columns: 1fr; } }
.admin-empty { font-size: 13px; color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.admin-footnote { font-size: 12.5px; color: color-mix(in srgb, var(--color-text) 45%, transparent); }

.admin-barchart { display: flex; flex-direction: column; gap: var(--space-2); }
.admin-bar-row { display: flex; align-items: center; gap: var(--space-3); font-size: 13px; }
.admin-bar-label { width: 140px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: color-mix(in srgb, var(--color-text) 75%, transparent); }
.admin-bar-track { flex: 1; height: 18px; background: var(--color-neutral-200); border-radius: var(--radius-sm); overflow: hidden; }
.admin-bar-fill { height: 100%; background: var(--color-accent-700); border-radius: var(--radius-sm); }
.admin-bar-count { width: 90px; flex-shrink: 0; text-align: right; font-size: 12.5px; color: color-mix(in srgb, var(--color-text) 50%, transparent); }
/* The 4-up device/browser/OS/language row is much narrower per card than the
   2-up rows above — the same fixed label/count widths there clipped the
   percentage ("2 (40%" cut off mid-digit). */
.admin-grid-4 .admin-bar-label { width: 72px; }
.admin-grid-4 .admin-bar-count { width: 64px; font-size: 12px; }

.admin-daychart { padding-bottom: var(--space-6); }
/* The plot reserves a fixed left gutter for the rotated "Sessions" label and
   the tick values; .admin-daychart-labels (the x axis) is padded to match so
   its dates stay aligned with the plot area rather than the card edge. */
.admin-daychart-plot { position: relative; padding-left: 46px; }
.admin-daychart-ylabel {
  position: absolute; left: 0; top: 50%; transform: rotate(-90deg) translate(50%, 0); transform-origin: left center;
  font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.admin-daychart-yaxis { position: absolute; left: 16px; top: 0; height: 176px; width: 26px; }
.admin-daychart-tick {
  position: absolute; right: 0; transform: translateY(-50%); font-size: 10px; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.admin-daychart-grid { position: absolute; left: 46px; right: 0; top: 0; height: 176px; pointer-events: none; }
.admin-daychart-grid span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--color-neutral-200); }
.admin-daychart-area { position: relative; height: 176px; }
.admin-daychart-svg { width: 100%; height: 176px; overflow: visible; display: block; }
.admin-daychart-labels { position: relative; height: 16px; padding-left: 46px; }
.admin-daychart-labels span { position: absolute; transform: translateX(-50%); font-size: 10px; color: color-mix(in srgb, var(--color-text) 45%, transparent); white-space: nowrap; }
/* Invisible hover column per data point. ::before is the marker dot and
   ::after the tooltip; both sit at --y (the point's own height) so they pin to
   the data rather than following the cursor. */
.admin-daychart-hit { position: absolute; top: 0; bottom: 0; }
.admin-daychart-hit::before {
  content: ''; position: absolute; left: 50%; top: var(--y);
  width: 7px; height: 7px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--color-accent-700); box-shadow: 0 0 0 2px var(--color-surface);
  opacity: 0; transition: opacity 90ms ease;
}
.admin-daychart-hit::after {
  content: attr(data-label); position: absolute; left: 50%; top: var(--y);
  transform: translate(-50%, calc(-100% - 10px));
  padding: 4px 8px; border-radius: var(--radius-sm); white-space: nowrap;
  background: var(--color-text); color: var(--color-surface); font-size: 11px; line-height: 1.3;
  opacity: 0; pointer-events: none; transition: opacity 90ms ease;
}
.admin-daychart-hit.is-start::after { left: 0; transform: translate(0, calc(-100% - 10px)); }
.admin-daychart-hit.is-end::after { left: 100%; transform: translate(-100%, calc(-100% - 10px)); }
.admin-daychart-hit:hover::before, .admin-daychart-hit:hover::after { opacity: 1; }
.admin-daychart-bars { display: flex; align-items: flex-end; gap: 2px; height: 176px; }
.admin-daybar { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.admin-daybar-fill { width: 100%; background: var(--color-accent-700); border-radius: 2px 2px 0 0; min-height: 0; }
.admin-daybar-count { font-size: 9px; color: color-mix(in srgb, var(--color-text) 55%, transparent); margin-bottom: 2px; }
.admin-daybar-label { position: absolute; top: 100%; margin-top: 4px; font-size: 9px; color: color-mix(in srgb, var(--color-text) 45%, transparent); white-space: nowrap; transform: rotate(45deg); transform-origin: top left; }
