@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/outfit/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/figtree/figtree-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Raleway — the CLA display face (claupc.org). --display names it; this is the
   one place it loads, so every page that links relay-tokens.css gets it.
   Only the heading weights Relay uses. */
/* (Raleway @import removed: Outfit replaced it as --display.) */

/* ═══════════════════════════════════════════════════════════════════════════
   CLA Relay — unified token set + component patterns
   Paste the :root block into any page's inline <style>, then set --accent
   for that module. Everything below reads var(--accent, #00C9A7).

   No build step. No framework. Dark only. Token names preserved from today.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Ground ─────────────────────────────────────────────────────────────
     Unchanged names. The change is the WASH: every module now sits on the
     same CLA-navy ground (was a per-module mud: #2a1f0a amber, #1a2e1a lime).
     Accent lives in components, not in the wallpaper. */
  --ground0:#070B13;
  --ground1:#0B1220;               /* was #0D1117 — navy-leaning CLA ground */

  --cla-blue:#006BA6;              /* P307C */
  --cla-navy:#003A70;              /* P654C */
  --cla-light:#8DB9CA;             /* P550C */
  --cla-slate:#506372;             /* P5405C */

  /* ── Ink ────────────────────────────────────────────────────────────── */
  --ink:#F3F1EA;
  --muted:#96A2B2;                 /* was #8C97A6 — +contrast for direct sun */
  --faint:#808B9A;                 /* ≥4.5:1 on every surface text sits on: ground (5.4),
                                      a glass panel (5.4), a panel over the top glow (4.6),
                                      an amber-tinted card (4.7). #67717F was 3.8 / 3.2. */

  /* ── Surfaces ───────────────────────────────────────────────────────── */
  --glass:rgba(255,255,255,.09);
  --glass-2:rgba(255,255,255,.16);
  --panel:rgba(16,20,30,.58);
  --surface-solid:#181A20;   /* an opaque panel colour, for dialogs and menus that float over other content */
  --panel2:rgba(255,255,255,.03);
  --panel3:rgba(255,255,255,.06);
  --field:rgba(2,6,14,.42);

  /* ── Type ───────────────────────────────────────────────────────────── */
  --display:"Outfit",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --sans:"Figtree",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,"Cascadia Mono",monospace;

  /* ── Spacing scale (was ad hoc per page) ────────────────────────────── */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px;

  /* ── Shape ──────────────────────────────────────────────────────────── */
  --r-sm:10px; --r:14px; --r-lg:18px; --r-pill:100px;

  /* ── Touch ──────────────────────────────────────────────────────────── */
  --tap:44px;                      /* minimum hit target, everywhere */

  /* ── Stage width — one scale. Pages that are genuinely a different shape
     (the home launcher grid, the two-pane inbox) override these two. ──── */
  --stage:500px; --stage-wide:880px;

  /* ── Accent — each module overrides this one line ───────────────────── */
  --accent:#00C9A7;                /* Relay core teal */
  --accent-ink:#0A1410;            /* text on a filled accent button */

  /* ── Status (shared, never accent-tinted) ───────────────────────────── */
  --ok:#6EE7B7; --warn:#FBBF24; --bad:#FCA5A5;
}

/* Module accents — one line per page.
   .m-service   { --accent:#e879a9; --accent-ink:#2A0E1B; }
   .m-host      { --accent:#f59e0b; --accent-ink:#1A1408; }
   .m-kidz      { --accent:#f59e0b; --accent-ink:#1A1408; }
   .m-rundown   { --accent:#f59e0b; --accent-ink:#1A1408; }
   .m-cleaning  { --accent:#84cc16; --accent-ink:#16210A; }
   .m-meetings  { --accent:#8b7cf6; --accent-ink:#130E2A; }
   .m-inbox     { --accent:#0ea5e9; --accent-ink:#04202E; }
   .m-guests    { --accent:#0f9d76; --accent-ink:#04211A; }
*/

/* ── Shell ──────────────────────────────────────────────────────────────
   One wash for every module. html paints the iOS overscroll gutter. */
html {
  background-color: var(--ground1);
  color-scheme: dark;
  min-height: 100%;
  scrollbar-width: none;
  background-image:
    radial-gradient(150% 92% at 50% 0%, #16365F 0%, rgba(19,45,80,.55) 34%, rgba(11,18,32,0) 74%),
    radial-gradient(95% 55% at 100% 100%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 55%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-attachment: fixed;
}
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--sans);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--ground1);
  background-image: inherit;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(var(--s4), env(safe-area-inset-top)) max(var(--s4), env(safe-area-inset-right))
           max(var(--s4), env(safe-area-inset-bottom)) max(var(--s4), env(safe-area-inset-left));
}
@media (display-mode: standalone) {
  body { padding-top: calc(env(safe-area-inset-top, 0px) + var(--s5)); }
}

.stage { width: 100%; max-width: var(--stage); position: relative; z-index: 1; }
/* 768px to match the rail tier in relay-shell.css. On pages that load the
   shell, its `.stage { max-width: var(--stage-max) }` supersedes the width
   below (shell loads last); --stage-wide remains the answer for pages that
   have no rail. */
@media (min-width: 768px) and (min-height: 500px) {
  /* --s5 top, not --s7. With a rail carrying the page identity, 48px of dead
     space above the title just pushed the first row of real content down;
     24px reads as a margin rather than a gap. Bottom keeps a little more so
     the last card doesn't sit flush against the viewport edge. */
  body { padding: var(--s5) var(--s6) var(--s6); }
  .stage { max-width: var(--stage-wide); }
}

/* ── Mobile landscape ───────────────────────────────────────────────────
   A phone on its side is ~390px tall with browser chrome on top of that.
   The portrait layout spends most of it on padding and a page title, so
   trim the vertical chrome and let the content have the screen. Keyed on
   height, not orientation alone, so a short desktop window benefits too. */
@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding-top: max(var(--s3), env(safe-area-inset-top));
    padding-bottom: max(var(--s3), env(safe-area-inset-bottom));
  }
  .topbar { margin-bottom: var(--s2); }
  .topbar h1 { font-size: 15px; }
  .section-label { margin: var(--s3) 0 var(--s2); }
  .card { padding: var(--s3); margin-bottom: var(--s2); }
  /* 30px of icon plus a 48px block of padding is most of the viewport. */
  .empty:not(.pill) { padding: var(--s4) var(--s3); gap: var(--s2); }
  .empty i { font-size: 22px; }
}

/* ── Topbar — preserved 1fr / auto / 1fr grid ───────────────────────── */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: var(--s3); margin-bottom: var(--s4);
}
.topbar .back { justify-self: start; }
.topbar .topbar-action, .topbar .icon-chip { justify-self: end; }
.topbar h1 {
  font-family: var(--display); font-size: 17px; font-weight: 700;
  letter-spacing: -.01em; text-align: center; white-space: nowrap;
}
.back {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: var(--tap); padding: 0 14px 0 11px;
  font-family: var(--sans); font-size: 13px; font-weight: 650; color: var(--ink);
  background: var(--panel3); border: 1px solid var(--glass-2);
  border-radius: var(--r-pill); cursor: pointer; text-decoration: none;
  -webkit-appearance: none; appearance: none;
}
.back .ti { font-size: 16px; color: var(--accent); }
.back:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.back:active { transform: scale(.98); }

.icon-chip {
  width: var(--tap); height: var(--tap); border-radius: var(--r-pill);
  display: grid; place-items: center; cursor: pointer; font-size: 18px;
  color: var(--muted); background: var(--panel2); border: 1px solid var(--glass);
  -webkit-appearance: none; appearance: none;
}
.icon-chip:hover { color: var(--ink); border-color: var(--glass-2); background: var(--panel3); }

/* ── Eyebrow / section label ────────────────────────────────────────── */
.eyebrow, .section-label {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--muted);
}
.section-label { margin: var(--s5) 0 var(--s3); }

/* ── Card — ONE treatment. Neutral panel; accent is a signal, not a skin.
   Use .card--accent only for the one thing on screen that needs action. */
.card {
  padding: var(--s4); border-radius: var(--r); margin-bottom: var(--s3);
  background: var(--panel); border: 1px solid var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.card--accent {
  background: color-mix(in srgb, var(--accent) 9%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}
.card--tap {
  display: block; width: 100%; text-align: left; cursor: pointer;
  color: var(--ink); font-family: var(--sans);
  -webkit-appearance: none; appearance: none;
}
.card--tap:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); margin-bottom: var(--s2);
}
.card-head h2 { font-family: var(--display); font-size: 15px; font-weight: 700; }
.card-title { font-size: 15px; font-weight: 650; }
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: var(--s1); line-height: 1.4; }

/* ── List row ───────────────────────────────────────────────────────── */
.row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s3); padding: var(--s3) 0; min-height: var(--tap);
  border-top: 1px solid var(--glass); font-size: 13.5px;
}
.row:first-of-type { border-top: 0; }
.row-label {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: 0;
  color: var(--muted); margin-bottom: 2px;
}
.row-name { font-weight: 650; }
.row-name.open { color: var(--faint); font-weight: 500; font-style: italic; }
.row-detail { color: var(--muted); font-size: 12px; margin-top: 2px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent-text-62,color-mix(in srgb, var(--accent) 62%, var(--mix-text, white)));
}

/* ── Status text (shared colours — never the accent) ────────────────── */
.status {
  flex: none; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0;
  text-align: right;
}
.status.confirmed, .status.done { color: var(--ok); }
.status.pending, .status.needs_followup { color: var(--warn); }
.status.declined, .status.open { color: var(--bad); }
.status.not_needed, .status.not_requested { color: var(--faint); font-style: italic; }

/* ── Pill / tag ─────────────────────────────────────────────────────── */
.pill {
  display: inline-block; font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: 0; text-transform: none; padding: 3px 10px;
  border-radius: var(--r-pill);
  color: var(--accent-text-55,color-mix(in srgb, var(--accent) 55%, var(--mix-text, white)));
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.pill.empty { color: var(--faint); background: var(--panel2); border-color: var(--glass); }
.pill.full  { color: var(--ok); background: rgba(16,185,129,.13); border-color: rgba(16,185,129,.3); }
.pill.warn  { color: var(--warn); background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.3); }
/* Emitted by Host Team (part-filled) and Cleaning (flex week) — a half-staffed
   week must not read the same as a finished one. */
.pill.partial { color: var(--warn); background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.3); }
.pill.flex { color: var(--muted); background: rgba(var(--wash),.05); border-color: var(--glass); font-style: italic; }

/* ── Tabs — segmented, compact filter control ────────────────────────
   Flex with a content basis, NOT equal columns. Relay's filter labels are
   wildly uneven ("Needs follow-up" beside "All"), and these strips often
   live in a 340–380px list pane, so forcing every tab to 1fr gave each one
   ~86px and truncated the long ones even on a 1440px desktop.

   `flex: 1 1 auto` starts each tab at its natural width and shares the
   leftover space on top, so labels stay whole and the strip still fills the
   bar. Shrink and ellipsis remain as a last resort for a pane narrower than
   the labels themselves.

   Visually it's a raised pill on a recessed track: the strip is darker than
   the surface it sits on, the selected tab is lighter and casts a small
   shadow. The previous treatment outlined the active tab in accent, which
   put a hard stroke next to the container's own border and read as a box
   inside a box. Here the pill stays neutral and the accent lives in the
   label — which also sidesteps the olive cast that amber and lime pick up
   when mixed into a light fill. */
.tabs {
  display: flex; align-items: stretch;
  gap: 2px; padding: 3px; margin-bottom: var(--s4);
  background: rgba(var(--sh), .22);
  border: 1px solid rgba(var(--wash), .05);
  border-radius: var(--r);
  box-shadow: inset 0 1px 2px rgba(var(--sh), .28);
}
.tabs button {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-height: 30px; padding: 0 var(--s3); border: none;
  /* Nest inside the track's radius instead of guessing at it. */
  border-radius: calc(var(--r) - 4px);
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: -.01em;
  background: transparent; color: var(--muted); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.tabs button:hover:not(.active) { background: rgba(var(--wash), .045); color: var(--ink); }
.tabs button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: -2px;
}
.tabs button.active {
  background: rgba(var(--wash), .10);
  color: var(--accent-text-55,color-mix(in srgb, var(--accent) 55%, var(--mix-text, white)));
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(var(--sh), .35), inset 0 1px 0 rgba(var(--wash), .08);
}
@media (prefers-reduced-motion: reduce) { .tabs button { transition: none; } }
/* Buy back horizontal room on small phones so three or four filters still
   read as words rather than ellipses. */
@media (max-width: 430px) {
  .tabs { gap: 2px; padding: 2px; }
  .tabs button { padding: 0 var(--s2); font-size: 12px; }
}
/* Thumbs need more than 30px; pointers don't. */
@media (pointer: coarse) {
  .tabs button { min-height: 38px; }
}

/* ── Buttons — 46px, pill-or-12px, one filled per screen ───────────── */
.btn {
  width: 100%; min-height: 46px; padding: 0 var(--s4); margin-top: var(--s2);
  display: flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--sans); font-size: 15px; font-weight: 650;
  color: var(--accent-ink); background: var(--accent);
  border: none; border-radius: var(--r); cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.btn:hover { background: var(--accent-text-88,color-mix(in srgb, var(--accent) 88%, var(--mix-text, white))); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sec { background: var(--panel3); color: var(--ink); border: 1px solid var(--glass-2); }
.btn.sec:hover { background: transparent; border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid rgba(239,68,68,.32); }

/* ── Fields — 16px input text (no iOS zoom), 44px tall ─────────────── */
.field { margin-bottom: var(--s3); }
.field label {
  display: block; font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: 0;
  text-transform: none; color: var(--paint, var(--muted)); margin-bottom: var(--s2);
}
.field input, .field textarea, .field select {
  width: 100%; min-height: var(--tap); padding: 11px var(--s3);
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: var(--field); border: 1px solid var(--glass); border-radius: var(--r-sm);
  min-width: 0;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}
.field-hint { font-size: 11.5px; color: var(--faint); margin-top: var(--s1); line-height: 1.35; }

/* ── Banner ─────────────────────────────────────────────────────────── */
.banner {
  padding: var(--s3); border-radius: var(--r-sm); margin-bottom: var(--s3);
  font-size: 12.5px; line-height: 1.45; color: var(--muted);
  background: var(--panel2); border: 1px solid var(--glass);
}
.banner strong { color: var(--ink); }
.banner.ok   { color: #A7E8C9; background: rgba(16,185,129,.10); border-color: rgba(16,185,129,.28); }
.banner.ok strong { color: var(--ok); }
.banner.warn { color: var(--t-amber,#F0C078); background: rgba(217,119,6,.12); border-color: rgba(217,119,6,.32); }
.banner.warn strong { color: var(--warn); }
.banner.err  { color: var(--bad); background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); }

/* ── Empty state — ONE treatment for every module ──────────────────── */
/* :not(.pill) — a `.pill.empty` (an unfilled slot badge) also matches .empty,
   and would otherwise inflate into a full-width empty-state block. */
.empty:not(.pill) {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s3); padding: var(--s6) var(--s4); text-align: center;
  grid-column: 1 / -1;   /* an empty state is never one card in a card grid */
}
.empty i { font-size: 30px; color: color-mix(in srgb, var(--accent) 45%, var(--faint)); }
.empty-title { font-family: var(--display); font-size: 15px; font-weight: 650; color: var(--ink); }
.empty-sub { font-size: 13px; color: var(--muted); max-width: 30ch; line-height: 1.5; }
.empty .btn { width: auto; min-width: 180px; }

/* ── Desktop / tablet — 860px. Below this, nothing changes.
   .app-shell / .rail / .two-pane are the shell from Relay Refresh 1c; the
   shipped pages still use their own back-button layout, so these are the
   target, not yet in use. Same for .card--accent, .card--tap and the
   .empty-title / .empty-sub pair. ──────────────────────────────────── */
@media (min-width: 860px) {
  .app-shell {
    display: grid; grid-template-columns: 236px minmax(0, 1fr);
    gap: var(--s5); align-items: start;
  }
  .rail {
    position: sticky; top: var(--s5);
    padding: var(--s3); border-radius: var(--r-lg);
    background: var(--panel); border: 1px solid var(--glass);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .rail a {
    display: flex; align-items: center; gap: var(--s3);
    min-height: var(--tap); padding: 0 var(--s3); border-radius: var(--r-sm);
    font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none;
  }
  .rail a:hover { background: var(--panel2); color: var(--ink); }
  .rail a.active {
    background: color-mix(in srgb, var(--accent) 16%, var(--panel3)); color: var(--ink);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
  }
  .rail a .ti { font-size: 18px; color: color-mix(in srgb, var(--accent) 60%, var(--muted)); }
  /* Only a rail replaces the back button — standalone pages keep theirs. */
  .app-shell .rail .topbar, .app-shell .topbar .back { display: none; }
  .two-pane { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: var(--s4); }
}

/* iOS Safari gives native date/time fields a fixed minimum width, a taller box, and centered
   text, so they overflow their column. Keep them inside the layout like other inputs. */
input[type="date"], input[type="time"], input[type="datetime-local"] {
  min-width: 0; max-width: 100%;
  -webkit-appearance: none; appearance: none;
}
input::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
