/*
 * Legion AI — Obsidian design system (WS4, 2026-07-01)
 *
 * One token system, two themes. html.dark is the default ("obsidian":
 * near-black, never pure black); html.light inverts the same structure.
 * The anti-flicker IIFE in each page's <head> sets the class before paint.
 *
 * Type system (site-wide, exactly two families):
 *   --font-display  Fraunces  — headlines + industry index names only
 *   --font-body     Inter     — everything else
 *
 * Accent discipline:
 *   --accent        violet — interactive elements ONLY (primary buttons,
 *                   focus rings, active states, links on hover)
 *   --value         green  — customer value figures ONLY (hours, dollars)
 * Nothing else gets color. No cyan, no gold, no per-section palettes.
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,450;9..144,550;9..144,650&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

html.dark {
  color-scheme: dark;
  --bg:            #0b0d12;
  --bg-raised:     #12151c;
  --bg-overlay:    #171b24;
  --line:          rgba(255, 255, 255, 0.08);
  --line-strong:   rgba(255, 255, 255, 0.16);
  --text:          #f2f3f5;
  --text-2:        #9aa1ac;
  --text-3:        #838d9b; /* 5.8:1 on --bg (a11y pass 2026-07-20; was #5c6470 at 3.3:1) */
  --accent:        #8b74ff;
  --accent-strong: #7c5cff;
  --accent-ink:    #ffffff;
  --accent-soft:   rgba(139, 116, 255, 0.12);
  --value:         #34d399;
  --danger:        #f87171;
  --shadow:        0 12px 32px rgba(0, 0, 0, 0.45);
}

html.light {
  color-scheme: light;
  --bg:            #f7f8fa;
  --bg-raised:     #ffffff;
  --bg-overlay:    #ffffff;
  --line:          rgba(22, 24, 29, 0.10);
  --line-strong:   rgba(22, 24, 29, 0.22);
  --text:          #16181d;
  --text-2:        #5a6270;
  --text-3:        #5f6774; /* 5.4:1 on --bg (a11y pass 2026-07-20; was #8a919c at 3.0:1) */
  --accent:        #6d4aff;
  --accent-strong: #5c38f0;
  --accent-ink:    #ffffff;
  --accent-soft:   rgba(109, 74, 255, 0.09);
  --value:         #047857; /* 5.5:1 on white (a11y pass 2026-07-20; was #059669 at 3.8:1) */
  --danger:        #dc2626;
  --shadow:        0 12px 32px rgba(22, 24, 29, 0.08);
}

:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  /* Data face (2026-07-20): counts, hours, dollars — the "spec" side of the
     translator — always render in mono. This is the site's data texture. */
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1080px;
}

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

/* The HTML `hidden` attribute applies display:none at browser-default
   priority, so ANY class that sets display (e.g. .field { display: flex })
   silently defeats it. This rule makes `hidden` always win (2026-07-21 —
   found via the AI-usage panel showing before "Yes" was clicked). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body.obsidian {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ─── Type scale ───────────────────────────────────────────────────────────── */

.t-display {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
}
.t-h2 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
}
.t-h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.125rem; line-height: 1.35; margin: 0; }
.t-body { font-size: 1rem; color: var(--text-2); }
.t-small { font-size: 0.875rem; color: var(--text-2); }
.t-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.t-value { color: var(--value); font-variant-numeric: tabular-nums; }
.t-data {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ─── Brand lockup — product wordmark with owner credit ───────────────────── */

.ob-brand { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.ob-brand .ob-brand-by { align-self: flex-end; padding-bottom: 3px; }
.ob-logo { height: 26px; width: auto; flex: 0 0 auto; display: block; }
.ob-logo-chat { fill: var(--bg); stroke: currentColor; }
.ob-logo-lines { stroke: currentColor; }
.ob-logo-bot { stroke: var(--accent); }
.ob-logo-bot-fill { fill: var(--accent); }
.ob-brand-by {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@media (max-width: 560px) { .ob-brand-by { display: none; } }

/* ─── Hero starter row — the homepage's one action ─────────────────────────
   Industry dropdown + Analyze button side by side (2026-07-20; replaced the
   full industry grid and the example strip — one clear next step). */

.starter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 8px;
}
.starter-dd { flex: 1 1 280px; max-width: 420px; }
.starter-dd .select-btn { height: 100%; min-height: 52px; font-size: 1rem; }
.quiet-link { color: var(--text-3); text-decoration: none; }
.quiet-link:hover { color: var(--accent); }

/* Industry line icons (2026-07-20): single-color strokes, logo language. */
.dd-item-main { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.dd-item-main .ind-glyph { color: var(--accent); flex: 0 0 auto; }

/* Curved "start here" arrow beside the hero CTA (2026-07-20). Decorative
   only (aria-hidden); hidden on small screens where it has no room. */
.starter-arrow { color: var(--accent); align-self: center; margin-left: 4px; margin-top: -18px; flex: 0 0 auto; }
.starter-arrow-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--accent);
  align-self: flex-start;
  margin-left: -34px;
  margin-top: -14px;
  transform: rotate(-6deg);
  white-space: nowrap;
}
@media (max-width: 860px) { .starter-arrow, .starter-arrow-note { display: none; } }

/* ─── Adoption-gap stats + scroll reveal (2026-07-20) ──────────────────────
   Sections with .reveal start slightly low and transparent; home.js flips
   .in via IntersectionObserver as they scroll into view (Linear-style).
   Children stagger. No motion under prefers-reduced-motion. */

.gap-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gap-stat {
  background: var(--bg-raised);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.4s ease, background 0.2s ease, transform 0.2s ease;
}
/* Hover interactivity (2026-07-20, Linear-style): cards acknowledge the
   mouse — slight lift, surface shift, number takes the accent. */
.gap-stat:hover { background: var(--bg-overlay); transform: translateY(-2px); }
.gap-stat:hover .gap-num { color: var(--accent); }
.gap-num {
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  transition: color 0.2s ease;
}
.hero-sub-strong { color: var(--text); font-weight: 600; }

/* Reveal: quick and shallow — sections must never read as blank page while
   the visitor approaches them (2026-07-20 tuning after team's screenshots). */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.4s ease, transform 0.4s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal .gap-stat { opacity: 0; transform: translateY(8px); }
.reveal.in .gap-stat { opacity: 1; transform: translateY(0); }
.reveal.in .gap-stat:nth-child(2) { transition-delay: 0.08s; }
.reveal.in .gap-stat:nth-child(3) { transition-delay: 0.16s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal .gap-stat { opacity: 1; transform: none; transition: none; }
}

/* ─── Layout primitives ───────────────────────────────────────────────────── */

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ─── Buttons — one hierarchy, one radius, real states ────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
  user-select: text;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent); }

.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { border-color: var(--text-3); background: var(--accent-soft); }

.btn-ghost { background: transparent; color: var(--text-2); padding: 12px 12px; }
.btn-ghost:hover:not(:disabled) { color: var(--text); }

.btn-lg { padding: 16px 28px; font-size: 1.0625rem; border-radius: 12px; }
.btn-sm { padding: 8px 14px; font-size: 0.8125rem; }

/* ─── Nav ─────────────────────────────────────────────────────────────────── */

.ob-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.ob-nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.ob-brand {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.ob-nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ob-nav a.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.ob-nav a.nav-link:hover { color: var(--text); }

/* Nav-scoped button hardening: legacy pages define their own .btn-primary /
   .btn-secondary (gradients) later in the cascade — the shared nav's buttons
   must not inherit page-local button skins (Item 4, 2026-07-02). */
.ob-nav .btn-primary {
  background: var(--accent-strong);
  background-image: none;
  color: var(--accent-ink);
  border: 1px solid transparent;
  box-shadow: none;
}
.ob-nav .btn-primary:hover:not(:disabled) { background: var(--accent); transform: none; }
.ob-nav .btn-secondary {
  background: transparent;
  background-image: none;
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.ob-nav .btn-ghost { background: transparent; color: var(--text-2); border: none; }

.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.9375rem;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Always-visible group: primary CTA + (mobile-only) hamburger. Sits after
   .ob-nav-links in source order; margin-left:auto lives on .ob-nav-links
   above 720px (pushing this whole trailing group right) and moves onto this
   element itself once .ob-nav-links is pulled out of flow (mobile below). */
.ob-nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-account, .nav-appearance { display: flex; align-items: center; }
.nav-section-label { display: none; }
.ob-nav a[aria-current="page"].nav-link { color: var(--text); background: var(--bg-raised); }
.ob-nav a:focus-visible, .ob-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-menu-toggle { display: none; } /* shown only under the 720px breakpoint below */

/* ─── Nav — mobile (Item, 2026-08-13) ───────────────────────────────────────
   Root cause of the 603px-wide document at 375px viewport: .ob-nav-links laid
   out every link + both auth buttons + the theme toggle in one unwrapping
   row with no breakpoint. Fix: below 720px (this codebase's existing
   breakpoint — obsidian-bg.css, analyze.html's .journey grid) the brand and
   the primary CTA stay put in the top row; everything else — About,
   Developer network, the auth links, and the theme toggle — collapses into
   #ob-nav-links, a disclosure panel opened by the hamburger
   (#nav-menu-toggle, wired in nav.js). Nothing is silently hidden: every
   link that was reachable before is still reachable, one tap behind the
   menu button. */
@media (max-width: 720px) {
  .ob-nav-inner { height: auto; min-height: 56px; padding: 8px 12px; position: relative; gap: 8px; }

  /* Brand shrinks (logo stays, "by Legion AI" already drops at 560px above)
     so it and the CTA both fit the top row down to a 320px viewport without
     the document ever exceeding the viewport width. */
  .ob-brand { font-size: 0.8125rem; gap: 6px; padding: 8px 0; }
  .ob-logo { height: 20px; }

  .ob-nav-actions { margin-left: auto; gap: 6px; }
  /* font-size (not just padding) needs to be pinned here: about.html defines
     its own page-local .btn-primary (for its contact-form CTA, unrelated to
     nav) at equal specificity to theme.css's .btn-sm, and source order let
     it win font-size on the nav CTA too — the same "page-local button skin
     leaking into the nav" problem .ob-nav .btn-primary already guards
     against for color below, just not for size. This selector's extra class
     (.ob-nav-actions .btn-sm) outranks any single-class page-local rule. */
  .ob-nav-actions .btn-sm { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 10px; font-size: 0.8125rem; line-height: 1.2; }

  .ob-nav .nav-menu-toggle { display: inline-flex; width: auto; min-width: 56px; padding: 0 10px; font: inherit; font-size: 0.8125rem; font-weight: 600; }
  /* Tap targets ≥44px in the smaller dimension (theme toggle now lives
     inside the panel below, but shares this class with the hamburger). */
  .theme-toggle { width: 44px; height: 44px; font-size: 1.0625rem; }

  /* display:none/flex (not a height/opacity animation) — a disclosure panel
     that pops open with no motion at all is the simplest thing that can't
     get this wrong, and it trivially satisfies "respect
     prefers-reduced-motion" since there is no animation to reduce. It also
     keeps the collapsed links out of the tab order for free (unlike
     visibility/opacity tricks, which still leave a display:flex element
     focusable). */
  .ob-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 12px 16px 16px;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
  .ob-nav-links.is-open { display: flex; }

  .ob-nav a.nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 10px;
    font-size: 0.9375rem;
  }

  .nav-account { display: flex; flex-direction: column; align-items: stretch; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
  .nav-section-label { display: block; padding: 0 10px 6px; color: var(--text-2); font-size: 0.75rem; font-weight: 600; }
  .nav-appearance { justify-content: space-between; margin-top: 12px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
  .nav-appearance .nav-section-label { padding: 0; font-size: 0.9375rem; }
  #nav-auth { flex-direction: column; align-items: stretch; margin-top: 0; }
  #nav-auth a, #nav-auth button, #nav-auth .is-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 10px;
    font-size: 0.9375rem;
    width: 100%;
    min-height: 44px;
  }

  .ob-nav-links > .theme-toggle { align-self: flex-start; margin-top: 8px; }
}

/* ─── Forms ───────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.field-hint { font-size: 0.8125rem; color: var(--text-3); }

.input, .textarea, .select-btn {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.15s ease;
}
.input:hover, .textarea:hover, .select-btn:hover { border-color: var(--line-strong); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }

/* ─── Cards / panels ──────────────────────────────────────────────────────── */

.panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ─── Industry index (signature element) ──────────────────────────────────── */

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.index-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  transition: background 0.15s ease;
  position: relative;
}
.index-cell:hover { background: var(--accent-soft); }
.index-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 1; }
.index-name {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 1.1875rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.index-meta {
  font-size: 0.75rem;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.index-cell .index-go { opacity: 0; transition: opacity 0.15s ease; color: var(--accent); font-weight: 600; }
.index-cell:hover .index-go, .index-cell:focus-visible .index-go { opacity: 1; }
/* Industry name + its sub-sector examples grouped at the top of the tile so the
   meta row still sits at the bottom (2026-07-03 grid pass). */
.index-title { display: flex; flex-direction: column; gap: 5px; }
.index-examples {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-3);
  font-family: var(--font-body, inherit);
  font-weight: 400;
  letter-spacing: 0;
}
/* The "Request an industry" tile that fills the grid's empty corner. */
.index-cell-request { cursor: pointer; text-align: left; font: inherit; width: 100%; }
.index-cell-request .index-name { color: var(--accent); }
.index-cell-request .index-go { opacity: 1; }

/* Request-an-industry modal (native <dialog>). */
.modal {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-raised);
  color: var(--text);
  max-width: 560px;
  width: calc(100% - 32px);
  padding: 24px;
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); font-size: 1.5rem; line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

/* ─── Searchable dropdown (analyze page) ──────────────────────────────────── */

.dd { position: relative; }
.select-btn { text-align: left; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.select-btn .chev { color: var(--text-3); }
.dd-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 30;
  background: var(--bg-overlay);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* display:flex above would defeat the UA's [hidden]{display:none} — the JS
   toggles the hidden attribute, so it must actually win (Bug 1, 2026-07-02) */
.dd-panel[hidden] { display: none; }
.dd-search {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
}
.dd-search:focus { outline: none; }
.dd-list { overflow-y: auto; padding: 6px; margin: 0; list-style: none; }
.dd-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.dd-item .count { color: var(--text-3); font-size: 0.8125rem; }
.dd-item:hover, .dd-item.active { background: var(--accent-soft); }
.dd-empty { padding: 14px; color: var(--text-3); font-size: 0.875rem; }

/* Copy protection (2026-07-23, team): the analysis output is the product —
   nothing on the site is selectable/copyable EXCEPT what the user types.
   Applied on <body>; inputs/textareas re-enable selection below. */
body { -webkit-user-select: text; -moz-user-select: text; user-select: text; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; -moz-user-select: text; user-select: text; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
}

/* ─── Utility ─────────────────────────────────────────────────────────────── */

.stack-4 { display: flex; flex-direction: column; gap: 4px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--text-3); }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.ob-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; }
.ob-footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
.ob-footer a { color: var(--text-3); text-decoration: none; font-size: 0.8125rem; }
.ob-footer a:hover { color: var(--text-2); }

/* ─── Password show/hide (login page, 2026-09-15) ────────────────────────────
   /js/login.js wraps every password input in .pw-field and puts a .pw-toggle
   button after it. The wrapper takes over the input's bottom margin so the
   button can centre on the box itself; the input gets right padding so typed
   text never runs under the eye. State is drawn off aria-pressed, which the
   script flips together with the input type. */
.pw-field { position: relative; margin-bottom: 1rem; }
.auth-form .pw-field input { margin-bottom: 0; padding-right: 2.75rem; }
.pw-toggle {
  position: absolute;
  top: 0; bottom: 0; right: 0.35rem;
  width: 2.1rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s ease;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle:focus { outline: none; }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pw-toggle svg { display: block; }
.pw-toggle .pw-toggle-slash { display: none; }
.pw-toggle[aria-pressed="true"] .pw-toggle-slash { display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .index-grid { grid-template-columns: 1fr 1fr; }
  .index-cell { min-height: 92px; padding: 14px; }
  .index-name { font-size: 1.0625rem; }
}


/* Signed-in address beside Sign out (2026-09-15): muted, one line, full address in the tooltip. */
.nav-user { color: var(--text-2); font-size: 0.85rem; white-space: nowrap; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
@media (max-width: 720px) { .nav-menu-open .nav-user, .nav-user { max-width: 100%; } }

/* Signed-in address right of the primary button (2026-09-15); below 720px the copy inside the menu shows instead. */
.nav-user-slot { display: inline-flex; align-items: center; }
@media (max-width: 720px) { .ob-nav-actions .nav-user { display: none; } }
@media (min-width: 721px) { #nav-auth .nav-user { display: none; } }
/* Legal line on every page: operator, place, and the two policies. */
.legal-line { flex-basis: 100%; width: 100%; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; }
.site-footer .legal-line { border-top: 0; padding-top: 0; margin: 0; }

.site-version { flex-basis: 100%; width: 100%; margin: 6px 0 0; padding: 0; font-size: 0.75rem; color: var(--text-2); }

@media (max-width: 360px) {
  .ob-nav .ob-brand { font-size: 0.6875rem; gap: 4px; }
  .ob-nav .ob-logo { height: 18px; }
  .ob-nav-inner { gap: 6px; }
  .ob-nav-actions { gap: 4px; }
  .ob-nav-actions .btn-sm { padding-inline: 8px; }
}
