/* SmartScopeClub app — mirrors the theme design tokens (smartscopedaily style.css) */
:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-xs: .75rem; --text-sm: .875rem; --text-base: 1rem; --text-lg: 1.125rem;
  --text-xl: 1.375rem; --text-2xl: clamp(1.6rem, 3.5vw, 2.1rem);
  --text-3xl: clamp(2rem, 5vw, 3rem); --text-hero: clamp(2.4rem, 6.5vw, 4.2rem);
  --leading-tight: 1.15; --leading-body: 1.65;
  --weight-body: 400; --weight-med: 500; --weight-bold: 650;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --radius-sm: 5px; --radius-md: 8px; --radius-lg: 12px; --radius-pill: 999px;
  --ease-out: cubic-bezier(.22,.8,.36,1); --dur-fast: 140ms; --dur-med: 260ms;
  --shadow-1: 0 1px 2px rgba(2,6,16,.35); --shadow-2: 0 16px 40px -12px rgba(2,6,16,.6);
  /* One measure for the whole application. The public pages carried the
     editorial theme's 1360px while the signed-in app sat at 1120px, so the
     two halves of the same site read as different widths. 1360 wins: it is
     what the content was designed against, and the app's own grids were
     already cramped at 1120 on a wide screen. */
  --content-w: 1360px; --narrow-w: 600px;
}
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  /* Neutral, cool near-black. Colour is used sparingly (accent = links / active). */
  /* Surfaces and borders are lifted well clear of the page background: the old
     values sat ~1.2:1 apart, which made cards and inputs invisible on a dark
     screen. Field borders now clear 3:1 (WCAG 1.4.11) against the field fill.
     Keep in sync with the theme's assets/app-parity.css. */
  --bg: #0a0a0e; --bg-deep: #060609; --surface: #16161d; --surface-2: #20202a;
  /* text-faint is real body copy (footer, captions, small print), so it has to
     clear 4.5:1 on the lightest surface it lands on, not just 3:1. */
  --text: #f3f3f6; --text-muted: #9d9da8; --text-faint: #8a8a96;
  --accent: #5b8cff; --accent-strong: #83a4ff; --accent-ink: #0a0a0e;
  --accent-deep: #5b8cff; --accent-deep-strong: #4d80f5; --border: #3a3a47;
  --border-strong: #565661;
  --ok: #4ade80; --ok-bg: #14331f; --warn: #fbbf24; --warn-bg: #33290c;
  --bad: #f87171; --bad-bg: #331a1c;
  --field-bg: #1c1c24; --field-border: #666671;
  --solid-bg: #fafafa; --solid-fg: #0a0a0e; --solid-bg-hover: #e7e7ea;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf8f3; --bg-deep: #f0ecdf; --surface: #fff; --surface-2: #f3efe4;
  --text: #201d2e; --text-muted: #4e4a63; --text-faint: #6c6884;
  --accent: #0b3d91; --accent-strong: #08316f; --accent-ink: #fff;
  --accent-deep: #0b3d91; --accent-deep-strong: #08316f; --border: #e0dcec;
  --ok: #1f7a45; --ok-bg: #e4f3ea; --warn: #8a6410; --warn-bg: #faf0d7;
  --bad: #9b2c2c; --bad-bg: #f8e3e3;
  --field-bg: #ffffff; --field-border: #b7bad6;
}
* { box-sizing: border-box; }
/* The [hidden] attribute must beat flex/grid display on the same element. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-weight: var(--weight-body);
  background: var(--bg); color: var(--text); line-height: var(--leading-body);
  font-size: var(--text-base);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* Ambient deep-space starfield behind all content, full-viewport at any size.
   Faint nebula clouds via CSS (show through the transparent canvas); stars drawn on the canvas. */
.starfield { position: fixed; inset: 0; z-index: -1; pointer-events: none; display: block;
  background:
    radial-gradient(60% 50% at 85% 8%, rgba(70,100,210,.08), transparent 60%),
    radial-gradient(55% 48% at 8% 88%, rgba(138,88,200,.06), transparent 60%),
    radial-gradient(45% 40% at 45% 55%, rgba(40,66,140,.045), transparent 70%); }
/* Sticky footer: main fills the viewport so the footer always sits at the bottom. */
main { flex: 1 0 auto; width: 100%; }
.site-foot { flex-shrink: 0; }
h1,h2,h3 { font-family: var(--font-display); font-weight: var(--weight-bold);
  line-height: var(--leading-tight); text-wrap: balance; margin: 0 0 var(--space-3); }
h1 { font-size: var(--text-3xl); } h2 { font-size: var(--text-2xl); } h3 { font-size: var(--text-xl); }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 var(--space-4); }
.wrap { max-width: var(--content-w); margin: 0 auto; padding-inline: var(--space-5); }
.narrow { max-width: var(--narrow-w); }
.muted { color: var(--text-muted); } .faint { color: var(--text-faint); }
.small { font-size: var(--text-sm); }

/* Header / nav */
/* Above the flash banner (60). The header owns the mobile drawer, and because
   a z-index on the header creates a stacking context, the drawer can never
   escape it: at 40 the banner covered the first entries of the open menu. */
.site-head { position: sticky; top: 0; z-index: 80; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.site-head .wrap { display: flex; align-items: center; gap: var(--space-5); height: 62px; }
.brand { color: var(--text); display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand__mark { display: block; flex: none; }
.brand__text { display: flex; flex-direction: column; font-family: var(--font-display);
  font-weight: var(--weight-bold); font-size: var(--text-lg); line-height: 1.05; }
.brand__sub { font-family: var(--font-body); font-weight: var(--weight-bold); font-size: 9.5px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--accent-strong); margin-top: 3px; }
.ic { display: inline-block; vertical-align: -0.16em; flex: none; }
.btn .ic, .chip .ic { margin-right: 2px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; }
.nav { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.nav a { color: var(--text-muted); font-size: var(--text-sm); font-weight: var(--weight-med);
  padding: 6px 10px; border-radius: var(--radius-sm); transition: color var(--dur-fast), background var(--dur-fast); }
.nav a:hover { color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--text) 5%, transparent); }
.nav a.is-active { color: var(--text); background: color-mix(in srgb, var(--text) 9%, transparent); }
.nav__sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; flex: none; }
.nav__acct { color: var(--text) !important; font-weight: 550; }
/* `.nav a` sets a muted colour for nav links, which was also repainting the
   filled call-to-action inside the nav: dark grey text on a near-white button,
   worst in the mobile drawer where it is full width and unmissable. Buttons
   keep their own colours. */
.nav a.btn-primary { color: var(--solid-fg); }
.nav a.btn-primary:hover { color: var(--solid-fg); }

/* Nav groups. Built on <details> so they open on tap and work with no
   JavaScript: a hover menu is unusable on the phones this ships to as a PWA,
   and the same markup has to collapse into a plain accordion inside the mobile
   drawer. Desktop styling turns the open panel into a dropdown; mobile leaves
   it in flow. */
.navgrp { position: relative; }
.navgrp > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  list-style: none; color: var(--text-muted); font-size: var(--text-sm); font-weight: var(--weight-med);
  padding: 6px 10px; border-radius: var(--radius-sm); user-select: none;
  transition: color var(--dur-fast), background var(--dur-fast); }
.navgrp > summary::-webkit-details-marker { display: none; }
.navgrp > summary:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.navgrp.is-active > summary { color: var(--text); background: color-mix(in srgb, var(--text) 9%, transparent); }
.navgrp[open] > summary .ic { transform: rotate(180deg); }
.navgrp > summary .ic { transition: transform var(--dur-fast); opacity: .7; }
.navgrp__menu { display: flex; flex-direction: column; gap: 2px; }
@media (min-width: 721px) {
  .navgrp__menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 190px;
    padding: 6px; background: var(--surface, #12131f); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 12px 32px rgb(0 0 0 / .45); }
  .navgrp__menu a { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-body); font-weight: 550; font-size: var(--text-sm); letter-spacing: .005em;
  padding: 8px 14px; border-radius: var(--radius-md); border: 1px solid var(--border); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
  background: var(--surface-2); color: var(--text); text-decoration: none; white-space: nowrap; line-height: 1.15; }
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--text) 5%, var(--surface-2)); border-color: var(--border-strong); }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent); }
/* Primary = flat light solid (crisp, modern), not a glossy blue. */
.btn-primary { background: var(--solid-bg); color: var(--solid-fg); border-color: transparent; font-weight: 600; }
.btn-primary:hover { background: var(--solid-bg-hover); border-color: transparent; }
.btn-accent { background: var(--accent); color: #fff; border-color: transparent; }
.btn-accent:hover { background: var(--accent-deep-strong); border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 5%, transparent);
  border-color: var(--border-strong); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: var(--text-xs); gap: 6px; }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 26%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent);
  border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; background: transparent;
  border: 1px solid var(--border); color: var(--text-muted); border-radius: var(--radius-md);
  width: 38px; height: 38px; cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast); }
.iconbtn:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 24%, transparent); }

/* Cards & surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-5); box-shadow: none; }
.card-2 { background: var(--surface-2); }
.grid { display: grid; gap: var(--space-5); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
/* Vertical only — must NOT reset the horizontal gutter from .wrap on `.section.wrap`. */
.section { padding-block: var(--space-7); }
hr.rule { border: 0; border-top: 1px solid var(--border); margin: var(--space-5) 0; }

/* Badges / chips */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs);
  font-weight: var(--weight-med); padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.chip.live { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.chip.upcoming { background: var(--ok-bg); color: var(--ok); }
.chip.ended, .chip.cancelled { background: var(--surface-2); color: var(--text-faint); }
.chip .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* Forms */
label { display: block; font-size: var(--text-sm); font-weight: var(--weight-med);
  margin: 0 0 6px; color: var(--text-muted); }
input, select, textarea { width: 100%; font-family: var(--font-body); font-size: var(--text-base);
  padding: 10px 12px; border-radius: var(--radius-md); border: 1.5px solid var(--field-border);
  background: var(--field-bg); color: var(--text); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:hover, select:hover, textarea:hover { border-color: var(--accent-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: var(--space-4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }

/* Hero */
.hero { padding: var(--space-8) 0 var(--space-7); }
.hero h1 { font-size: var(--text-hero); }
.hero .lede { font-size: var(--text-lg); color: var(--text-muted); max-width: 46ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: var(--text-xs);
  font-weight: var(--weight-bold); color: var(--accent-strong); margin-bottom: var(--space-3); }

/* Breadcrumb / back affordance for nested pages */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: var(--text-sm); color: var(--text-faint); margin-bottom: var(--space-4); }
.crumbs a { color: var(--text-muted); text-decoration: none; border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast); }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs__back { display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-left: -4px; margin-right: 2px; flex: none;
  border: 1px solid var(--border); }
.crumbs__back:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--text) 5%, transparent); }
.crumbs__sep { color: var(--text-faint); }
.crumbs__current { color: var(--text); font-weight: var(--weight-med);
  max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Flash */
.flashes { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 60;
  width: min(560px, 92vw); display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 10px 14px; border-radius: var(--radius-md); font-size: var(--text-sm);
  border: 1px solid var(--border); box-shadow: var(--shadow-2); background: var(--surface); }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }

/* Dashboard tiles (launcher) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-4); }
.tile { display: flex; flex-direction: column; gap: 10px; padding: var(--space-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--text); min-height: 168px;
  transition: border-color var(--dur-fast), background var(--dur-fast); }
.tile:hover { text-decoration: none; border-color: var(--border-strong);
  background: color-mix(in srgb, var(--text) 3%, var(--surface)); }
.tile__icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent); }
.tile__title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-bold); margin: 4px 0 0; }
.tile__desc { color: var(--text-muted); font-size: var(--text-sm); margin: 0; flex: 1; line-height: 1.5; }
.tile__meta { color: var(--text-faint); font-size: var(--text-xs); display: flex; align-items: center; gap: 6px; margin-top: auto; }
.tile__arrow { margin-left: auto; color: var(--text-faint); display: inline-flex;
  transition: transform var(--dur-fast), color var(--dur-fast); }
.tile:hover .tile__arrow { color: var(--text); transform: translateX(3px); }
.dash-section { margin-top: var(--space-7); }

/* Party card */
.party-card { display: flex; flex-direction: column; gap: var(--space-3); }
.party-card .title { font-family: var(--font-display); font-size: var(--text-lg); font-weight: var(--weight-bold); }
.party-meta { display: flex; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-sm); color: var(--text-muted); }

/* Chat */
.chat { display: flex; flex-direction: column; height: min(62vh, 560px); }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: var(--space-3); background: var(--bg-deep); border-radius: var(--radius-md); border: 1px solid var(--border); }
.msg { max-width: 78%; }
.msg .who { font-size: var(--text-xs); color: var(--accent-strong); font-weight: var(--weight-med); }
.msg .body { background: var(--surface-2); padding: 8px 12px; border-radius: var(--radius-md); }
.msg.me { align-self: flex-end; text-align: right; }
.msg.me .body { background: var(--accent-deep); color: var(--accent-ink); }
.msg.system { align-self: center; color: var(--text-faint); font-size: var(--text-xs); }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-disclaimer { display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-xs);
  color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px 11px; margin-bottom: 10px; line-height: 1.45; }
.chat-disclaimer .ic { flex: none; margin-top: 1px; color: var(--warn); }
.chat-muted { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--bad-bg); color: var(--bad); font-size: var(--text-sm); text-align: center; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.gallery-grid img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border); }

/* Target catalogue: category tabs + pickable cards. No typing required. */
.tb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-4); }
.tb-tab { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--weight-med);
  padding: 7px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  transition: color var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast); }
.tb-tab:hover { color: var(--text); border-color: var(--border-strong); }
.tb-tab.is-active { background: var(--solid-bg); color: var(--solid-fg); border-color: var(--solid-bg); }
.tb-tab__count { font-size: var(--text-xs); opacity: .75; }
.tb-tab.is-active .tb-tab__count { opacity: .6; }
.tb-group { margin-bottom: var(--space-5); }
.tb-group__title { font-family: var(--font-display); font-size: var(--text-base); margin: 0 0 2px; }
.tb-group__blurb { color: var(--text-faint); font-size: var(--text-sm); margin: 0 0 12px; }
.tb-group__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em;
  font-weight: var(--weight-bold); color: var(--accent-strong); margin: var(--space-4) 0 8px; }
.tb-group__label--down { color: var(--text-faint); }
.tb-group__hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.tb-pick.is-down { opacity: .72; }
.tb-pick.is-down .tb-pick__type { color: var(--text-faint); }
.tb-group__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.tb-pick { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.tb-pick__img { width: 42px; height: 42px; flex: none; object-fit: cover; border-radius: var(--radius-sm);
  background: var(--bg-deep); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-strong); }
.tb-pick__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; margin-right: auto; }
.tb-pick__name { font-weight: var(--weight-med); font-size: var(--text-sm); color: var(--text); }
.tb-pick__type { font-size: var(--text-xs); color: var(--accent-strong); }
.tb-pick__meta { font-size: var(--text-xs); color: var(--text-faint); }
.tb-pick__add { flex: none; }

/* Inline consent checkbox (signup clickwrap) */
.field-check { display: flex; align-items: flex-start; gap: 9px; color: var(--text-muted);
  line-height: var(--leading-normal, 1.55); cursor: pointer; }
.field-check input { margin-top: 2px; flex: none; accent-color: var(--accent); width: 16px; height: 16px; }

/* Footer — ported from the WordPress theme so both properties match. */
footer.site-foot { border-top: 1px solid var(--border); margin-top: var(--space-8);
  padding: var(--space-7) 0; color: var(--text-faint); font-size: var(--text-sm); }
.footer-brand { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.footer-brand img { display: block; }
.footer-brand strong { font-family: var(--font-display); font-size: var(--text-xl); color: var(--text); }
.footer-brand strong span { color: var(--text); }
.site-footer .attribution { margin-top: var(--space-4); font-size: var(--text-xs); line-height: 1.7; }
.footer-legal { margin-top: var(--space-3); display: flex; gap: var(--space-3); align-items: center; }
.footer-legal a { color: var(--text-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--text); text-decoration: underline; }

/* Mobile nav (hamburger) */
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm); width: 40px; height: 38px; font-size: 20px; cursor: pointer; }

/* Sky tools hub */
.sky-wrap { max-width: var(--content-w); }
.sky-controls { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; margin: var(--space-4) 0; }
.sky-controls__park { flex: 1 1 240px; min-width: 200px; }
.ssc-map { width: 100%; height: 60vh; min-height: 360px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden; background: var(--surface); }
.ssc-map--wide { height: 62vh; }
.sky-status { color: var(--text-muted); font-size: var(--text-sm); min-height: 1.2em; margin: var(--space-2) 0; }
.ssc-hub { margin-top: var(--space-5); }
.ssc-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: var(--space-4); }
.ssc-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted);
  font-family: var(--font-body); font-weight: var(--weight-med); font-size: var(--text-sm); padding: 10px 14px;
  cursor: pointer; white-space: nowrap; }
.ssc-tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.ssc-hub__h { font-size: var(--text-xl); }

/* Gate (login / create split) */
.gate { max-width: var(--content-w); margin: 0 auto; padding: var(--space-7) var(--space-5);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: center; min-height: 72vh; }
.gate h1 { font-size: var(--text-hero); }
.gate__points { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: flex; flex-direction: column; gap: 10px; }
.gate__points li { color: var(--text-muted); font-size: var(--text-base); display: flex; align-items: flex-start; gap: 10px; }
.gate__points .ic { color: var(--accent-strong); margin-top: 3px; }
.gate__forms { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-2); }
.gate__tabs { display: flex; gap: 6px; margin-bottom: var(--space-5); border-bottom: 1px solid var(--border); }
.gate__tab { flex: 1; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted);
  font-family: var(--font-body); font-weight: var(--weight-med); font-size: var(--text-base); padding: 10px; cursor: pointer; }
.gate__tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; gap: var(--space-6); padding-top: var(--space-6); min-height: auto; }
  .gate__intro h1 { font-size: var(--text-3xl); }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  /* The open drawer must sit above the flash banner (z-index 60), which is
     also fixed near the top: at 390px the two overlapped and the banner hid
     the first entries of the menu. */
  .nav { position: fixed; top: 62px; left: 0; right: 0; z-index: 70; flex-direction: column; align-items: stretch;
    gap: var(--space-2); background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--space-4); margin: 0; box-shadow: var(--shadow-2); display: none; max-height: calc(100vh - 62px); overflow-y: auto; }
  .nav.nav--open { display: flex; }
  .nav__sep { width: 100%; height: 1px; margin: var(--space-2) 0; }
  .nav a, .nav .btn, .nav form, .nav form .btn { width: 100%; text-align: center; justify-content: center; }
  .nav .iconbtn { width: 100%; }
  /* In the drawer a group is an accordion: full-width tap target, children
     indented under it, nothing overlaying anything. */
  .navgrp { width: 100%; }
  .navgrp > summary { width: 100%; justify-content: center; padding: 10px; }
  .navgrp__menu { padding: 4px 0 6px; border-left: 2px solid var(--border); margin: 2px 0 2px var(--space-3); }
  .navgrp__menu a { justify-content: center; gap: 8px; display: flex; align-items: center; }
  .site-head .wrap { gap: var(--space-3); }
  .grid.cols-2, .grid[style] { grid-template-columns: 1fr !important; }
  .field-row { grid-template-columns: 1fr; }
  .ssc-map, .ssc-map--wide { height: 56vh; min-height: 300px; }
  .chat { height: 60vh; }
  .hero, .section { padding-top: var(--space-6); padding-bottom: var(--space-6); }
  .spread { flex-wrap: wrap; }
}

@media (max-width: 460px) {
  .wrap { padding-inline: var(--space-4); }
  h1 { font-size: var(--text-2xl); }
  .sky-controls { flex-direction: column; align-items: stretch; }
  /* In a column, flex-basis is the MAIN axis (height); reset so the rows hug
     their content instead of each claiming a 240px-tall box. */
  .sky-controls__park { flex: 0 0 auto; width: 100%; min-width: 0; }
  .sky-controls .btn { width: 100%; }
}

/* ---------------------------------------------------------------------------
   Funnel + information-architecture layer
   First Light (the guided path), the nightly briefing, the tonight verdict,
   the mobile tab bar, and the small connective pieces they need.
   --------------------------------------------------------------------------- */

/* Context note: carries "the thing you were looking at" across a boundary. */
.ctx-note { display: flex; gap: 10px; align-items: flex-start; margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--text); font-size: var(--text-sm); line-height: 1.55; }
.ctx-note .ic { color: var(--accent-strong); flex: none; margin-top: 2px; }
.ctx-note--wide { margin: var(--space-5) 0; }

/* Optional-field reveal on the signup form. */
.reveal > summary { cursor: pointer; color: var(--text-muted); font-size: var(--text-sm);
  list-style: none; padding: 2px 0; }
.reveal > summary::-webkit-details-marker { display: none; }
.reveal > summary::before { content: "+ "; color: var(--text-faint); }
.reveal[open] > summary::before { content: "− "; }
.reveal > summary:hover { color: var(--text); }

.linkish { background: none; border: 0; padding: 0; color: var(--text-faint);
  text-decoration: underline; cursor: pointer; font: inherit; }
.linkish:hover { color: var(--text-muted); }

/* --- The verdict: tonight in one chip and one sentence --------------------- */
.verdict { display: flex; flex-direction: column; gap: 8px; padding: var(--space-5);
  border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface);
  margin: var(--space-4) 0; }
.verdict__call { display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: var(--weight-bold); }
.verdict__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); flex: none; }
.verdict__line { margin: 0; color: var(--text-muted); font-size: var(--text-base); line-height: 1.6; }
.verdict__stale { margin: var(--space-2) 0 0; color: var(--text-faint); font-size: var(--text-xs); }
.verdict--good { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.verdict--good .verdict__dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.verdict--fair { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.verdict--fair .verdict__dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); }
.verdict--poor { border-color: color-mix(in srgb, var(--bad) 34%, transparent); }
.verdict--poor .verdict__dot { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 16%, transparent); }
.verdict--loading .verdict__line, .verdict--unknown .verdict__line { color: var(--text-faint); }

/* --- Tonight: head + tab panels ------------------------------------------- */
.sky-head { margin-bottom: var(--space-3); }
.sky-active__name { margin: 0; }
/* Tonight is stacked, not tabbed: the sky viewer is the marquee feature and a
   tab hid it. Each block is separated by a hairline rule rather than chrome. */
.ssc-stack { display: flex; flex-direction: column; gap: var(--space-7); margin-top: var(--space-6); }
.ssc-block { scroll-margin-top: 80px; }
.ssc-block + .ssc-block { border-top: 1px solid var(--border); padding-top: var(--space-6); }
.ssc-block__head { margin-bottom: var(--space-4); }
.ssc-block__head h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: var(--text-xl); }
.ssc-block__head p { margin: 0; }
/* The sky canvas is the hero: give it room before anything else competes. */
.ssc-block--sky .ssc-sky__stage { min-height: 420px; }
@media (max-width: 720px) {
  .ssc-stack { gap: var(--space-6); }
  .ssc-block--sky .ssc-sky__stage { min-height: 300px; }
}

/* --- First Light ----------------------------------------------------------- */
.fl { border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: var(--radius-lg); padding: var(--space-5);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface));
  margin-bottom: var(--space-6); }
.fl__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.fl__title { margin: 2px 0 0; font-size: var(--text-xl); }
.fl__count { color: var(--text-faint); font-size: var(--text-xs); white-space: nowrap; padding-top: 4px; }
.fl__bar { height: 5px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--text) 10%, transparent);
  overflow: hidden; margin: var(--space-4) 0 var(--space-3); }
.fl__bar span { display: block; height: 100%; background: var(--accent);
  border-radius: inherit; transition: width var(--dur-med) var(--ease-out); }
.fl__blurb { margin: 0 0 var(--space-4); color: var(--text-muted); font-size: var(--text-sm); line-height: 1.6; max-width: 62ch; }
.fl__foot { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.fl__steps { list-style: none; display: flex; gap: var(--space-4); margin: 0; padding: 0; flex-wrap: wrap; }
.fl__step { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-xs); color: var(--text-faint); }
.fl__tick { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 10px; border: 1px solid var(--border); flex: none; }
.fl__step.is-done { color: var(--text-muted); }
.fl__step.is-done .fl__tick { background: color-mix(in srgb, var(--ok) 22%, transparent);
  border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.fl__step.is-next { color: var(--text); }
.fl__step.is-next .fl__tick { border-color: var(--accent); color: var(--accent-strong); }
.fl__skip { margin: 0 0 0 auto; }

/* --- The nightly briefing on Home ------------------------------------------ */
.brief { border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: var(--space-5); }
.brief__head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap; }
.brief__where { margin: 2px 0 0; font-size: var(--text-2xl); }
.brief__body .verdict { border: 0; background: transparent; padding: var(--space-4) 0 0; margin: 0; }
.brief__note { margin: var(--space-3) 0 0; }

.readnext { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); flex-wrap: wrap; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5); background: var(--surface); }
.readnext__t { margin: 2px 0 6px; font-family: var(--font-display); font-size: var(--text-lg); }
.readnext p { max-width: 60ch; margin: 0; }

.chip--lg { font-size: var(--text-sm); padding: 7px 12px; text-decoration: none; }
.chip--lg:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }

/* --- Mobile tab bar: the app should feel like an app when installed -------- */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: repeat(6, 1fr);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 9px 2px 7px; color: var(--text-faint); font-size: 10px;
    text-decoration: none; letter-spacing: .01em; }
  .tabbar a.is-active { color: var(--text); }
  .tabbar a.is-active .ic { color: var(--accent-strong); }
  /* Keep the last section clear of the bar. */
  body { padding-bottom: 64px; }
  .fl__foot { gap: var(--space-3); }
  .fl__skip { margin-left: 0; }
}

/* --- Offline field kit, push control, funnel admin ------------------------ */
.offline-kit__h { margin: 4px 0 6px; font-family: var(--font-display); font-size: var(--text-lg); }
.offline-kit__sub { margin: 0 0 var(--space-4); }
.offline-kit__bar { height: 5px; border-radius: var(--radius-pill); overflow: hidden;
  background: color-mix(in srgb, var(--text) 10%, transparent); margin-bottom: var(--space-3); }
.offline-kit__bar span { display: block; height: 100%; width: 0;
  background: var(--accent); transition: width var(--dur-fast) linear; }
.offline-kit__state { margin: 0 0 var(--space-3); color: var(--text-muted); }
.offline-kit__note { line-height: 1.55; }

.push-card { margin-bottom: var(--space-5);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }

.msg.queued { opacity: .62; }
.msg.queued .body { border-style: dashed; }

.funnel { margin-top: var(--space-6); display: flex; flex-direction: column; gap: 1px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--border); }
.funnel__row { display: grid; grid-template-columns: 180px 1fr 70px 140px; gap: var(--space-4);
  align-items: center; padding: var(--space-3) var(--space-5); background: var(--surface); }
.funnel__label { font-weight: var(--weight-med); font-size: var(--text-sm); }
.funnel__bar { height: 8px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.funnel__bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.funnel__n { text-align: right; font-variant-numeric: tabular-nums; font-weight: var(--weight-bold); }
.funnel__rate { color: var(--text-faint); font-size: var(--text-xs); text-align: right; }

@media (max-width: 720px) {
  .funnel__row { grid-template-columns: 1fr 60px; grid-template-areas: "label n" "bar bar" "rate rate"; }
  .funnel__label { grid-area: label; } .funnel__n { grid-area: n; }
  .funnel__bar { grid-area: bar; } .funnel__rate { grid-area: rate; text-align: left; }
}

/* ---------------------------- notification bell --------------------------- */
/* Flat surfaces, hairline borders, one accent for the unread state. The count
   badge is the one place a pill radius is right: it is a status chip. */

.notif { position: relative; display: flex; align-items: center; }
.notif__btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--text-muted); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out); }
.notif__btn:hover { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.notif__btn:active { transform: translateY(.5px); }
.notif__btn:focus-visible { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
.notif__btn[aria-expanded="true"] { background: var(--surface-2); border-color: var(--border); color: var(--text); }

.notif__dot { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink);
  font-size: 10px; font-weight: var(--weight-bold); line-height: 16px; text-align: center;
  font-variant-numeric: tabular-nums; }

.notif__panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: min(360px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.notif__head { 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); }
.notif__head strong { font-size: var(--text-sm); }
.notif__all { border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent;
  color: var(--text-muted); font: inherit; font-size: var(--text-xs); padding: 3px 8px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.notif__all:hover { border-color: var(--border-strong); color: var(--text); }

.notif__list { max-height: min(60vh, 420px); overflow-y: auto; }
.notif__empty { margin: 0; padding: var(--space-5) var(--space-4); color: var(--text-faint);
  font-size: var(--text-sm); line-height: 1.55; }

.notif__item { display: grid; grid-template-columns: 22px 1fr; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: background var(--dur-fast) var(--ease-out); }
.notif__item:last-child { border-bottom: 0; }
/* The whole row is an <a>, so the global a:hover underline would strike every
   line of it. The background change is the hover affordance. */
.notif__item:hover, .notif__item:hover * { text-decoration: none; }
.notif__item:hover { background: var(--surface-2); }
.notif__item.is-unread { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.notif__item.is-unread:hover { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.notif__item.is-unread .notif__title { font-weight: var(--weight-bold); }
.notif__icon { color: var(--accent-strong); font-size: var(--text-sm); line-height: 1.5; text-align: center; }
.notif__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif__title { font-size: var(--text-sm); line-height: 1.4; }
.notif__text { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; }
.notif__when { font-size: var(--text-xs); color: var(--text-faint); }
.notif__more { display: block; padding: var(--space-3) var(--space-4); text-align: center;
  font-size: var(--text-sm); border-top: 1px solid var(--border); }

/* Notification page: same rows, full width, no dropdown chrome. */
.notif-page { display: flex; flex-direction: column; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.notif-page .notif__item { border-bottom: 0; background: var(--surface); padding: var(--space-4) var(--space-5); }
.notif-page .notif__item.is-unread { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.notif-page .notif__item:hover { background: var(--surface-2); }

/* Mobile: the header bell is inside the collapsible nav, so it is unreachable
   without opening the hamburger. Hide it there and let the tabbar own alerts. */
@media (max-width: 720px) {
  .notif { display: none; }
  .tabbar__notif { position: relative; }
  .notif__dot--tab { position: absolute; top: 4px; right: 50%; margin-right: -18px; }
}

/* Exposure line on a plan card: a small caps label, not a glyph. */
.ssc-plan__explabel { display: inline-block; margin-right: 8px; font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint);
  font-weight: var(--weight-bold); }

/* --- Offline field kit ---------------------------------------------------- */
.kit { margin: var(--space-5) 0;
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border)); }
.kit__bar { height: 5px; margin-top: var(--space-3); border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--text) 10%, transparent); overflow: hidden; }
.kit__bar span { display: block; height: 100%; width: 0; background: var(--accent);
  border-radius: inherit; transition: width var(--dur-med) var(--ease-out); }
.kit__note { line-height: 1.5; max-width: 62ch; }
