/* ==========================================================================
   Firefighter Shift-Pay Budget System
   Design System (premium dashboard aesthetic)
   ========================================================================== */

:root{
  /* First Alarm Financial: New Core Palette (see DECISIONS.md). Four colors
     define the brand -- Ink Black, Warm Bone, Oxblood, Burnt Orange -- and
     make up ~70-80% of what's on screen. Everything else supports those.
     Never redefine --red-600/--gold-500 (danger/warning semantics, used
     for alerts, over-budget states, category limits) to match branding;
     they get their own mapping onto Firehouse Red / Antique Gold below,
     kept visually distinct from --accent so "danger" never silently means
     "on brand." */
  --ink-black:#11110f;
  --warm-bone:#f2e8d5;
  --paper-cream:#e3d3b7;
  --oxblood:#7d211c;
  --oxblood-deep:#59170f;
  --firehouse-red:#a63428;
  --burnt-orange:#c85a24;
  --antique-gold:#c28a3a;
  --workwear-brown:#5b4030;
  --faded-ink:#5d5a52;
  --warm-gray:#b9ad9a;

  --navy-950:#11110f;
  --navy-900:#1b1815;
  --navy-800:#262019;
  --navy-700:#362d22;
  --navy-600:#4c3c2c;
  --navy-500:#5b4030;
  --slate-400:#b9ad9a;
  --slate-300:#c9bfae;
  --slate-200:#ded6c6;
  --slate-100:#f2e8d5;
  --paper-0:#f2e8d5;
  --paper-50:#e3d3b7;
  --paper-100:#d9c6a0;

  --red-600:#a63428;
  --red-500:#c2493a;
  --red-100:#f4dcd5;
  --gold-500:#c28a3a;
  --gold-100:#f3e4c8;
  --green-600:#1c8a52;
  --green-500:#25a866;
  --green-100:#e1f6ea;
  --amber-600:#8c5f22;
  --amber-100:#f3e4c8;
  --blue-600:#3e6280;
  --blue-100:#dce4e9;
  --income-teal:#0d9488;

  /* Brand accent -- Oxblood dominant, Burnt Orange used sparingly for CTAs/
     active states/important data, Antique Gold reserved for one or two
     small heritage accents at most. */
  --brand-accent: var(--oxblood);
  --brand-accent-deep: var(--oxblood-deep);
  --brand-accent-2: var(--burnt-orange);
  --brand-accent-2-light: var(--burnt-orange);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  /* Public site + dashboard app shell. Scoped via .landing/.auth-shell/
     .app-shell rather than overriding --font-sans globally, so the bare
     system stack above stays the ultimate fallback if webfonts fail. */
  --font-sans-public: "Libre Franklin", var(--font-sans);
  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;

  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:18px;
  --radius-xl:24px;

  --shadow-sm:0 1px 2px rgba(17,17,15,.07), 0 1px 1px rgba(17,17,15,.05);
  --shadow-md:0 6px 16px rgba(17,17,15,.09), 0 2px 6px rgba(17,17,15,.06);
  --shadow-lg:0 16px 40px rgba(17,17,15,.16), 0 4px 12px rgba(17,17,15,.09);

  --bg-app: var(--paper-50);
  --bg-surface: var(--paper-0);
  --bg-surface-2: var(--paper-100);
  --bg-sidebar: var(--ink-black);
  --text-primary: var(--ink-black);
  --text-secondary: var(--faded-ink);
  --text-muted:#8c8371;
  --text-on-dark: var(--warm-bone);
  --border-subtle:#e4d9c4;
  --border-strong: var(--warm-gray);
  --accent: var(--brand-accent);
  --accent-2: var(--brand-accent-2);
  --focus-ring: 0 0 0 3px rgba(125,33,28,.3);
  --transition-fast:120ms ease;
  --transition-med:220ms cubic-bezier(.4,0,.2,1);
  --transition-slow:520ms cubic-bezier(.16,1,.3,1);
  --ease-out-expo:cubic-bezier(.16,1,.3,1);
}

:root[data-theme="dark"]{
  --bg-app: var(--navy-950);
  --bg-surface: var(--navy-900);
  --bg-surface-2: var(--navy-800);
  --text-primary: var(--slate-100);
  --text-secondary: var(--slate-300);
  --text-muted: var(--slate-400);
  --border-subtle: var(--navy-700);
  --border-strong: var(--navy-600);
  --shadow-md:0 6px 20px rgba(0,0,0,.4);
  --shadow-lg:0 20px 48px rgba(0,0,0,.5);
  --red-100: rgba(166,52,40,.18);
  --gold-100: rgba(194,138,58,.18);
  --green-100: rgba(37,168,102,.16);
  --amber-100: rgba(194,138,58,.18);
  --blue-100: rgba(62,98,128,.24);
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg-app: var(--navy-950);
    --bg-surface: var(--navy-900);
    --bg-surface-2: var(--navy-800);
    --text-primary: var(--slate-100);
    --text-secondary: var(--slate-300);
    --text-muted: var(--slate-400);
    --red-100: rgba(166,52,40,.18);
    --gold-100: rgba(194,138,58,.18);
    --green-100: rgba(37,168,102,.16);
    --amber-100: rgba(194,138,58,.18);
    --blue-100: rgba(62,98,128,.24);
    --border-subtle: var(--navy-700);
    --border-strong: var(--navy-600);
    --shadow-md:0 6px 20px rgba(0,0,0,.4);
    --shadow-lg:0 20px 48px rgba(0,0,0,.45);
  }
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font-sans);
  background:var(--bg-app);
  color:var(--text-primary);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  transition:background var(--transition-med), color var(--transition-med);
}
h1,h2,h3,h4,h5{ margin:0 0 .4em; font-weight:700; letter-spacing:-.01em; }
h1{ font-size:1.7rem; }
h2{ font-size:1.3rem; }
h3{ font-size:1.05rem; }
p{ margin:0 0 .8em; color:var(--text-secondary); }
a{ color:var(--accent); text-decoration:none; }
button{ font-family:inherit; }
::selection{ background:var(--red-100); }

.mono{ font-family:var(--font-mono); }
.text-muted{ color:var(--text-muted); }
.text-secondary{ color:var(--text-secondary); }
.text-pos{ color:var(--green-600); }
.text-neg{ color:var(--red-600); }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* ---------------------------------------------------------------------- */
/* App shell                                                               */
/* ---------------------------------------------------------------------- */
.app-shell{
  display:grid;
  grid-template-columns:264px 1fr;
  min-height:100vh;
}
.sidebar{
  background:var(--bg-sidebar);
  color:var(--text-on-dark);
  padding:22px 16px 16px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 10px 20px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:14px;
}
.brand-badge{
  width:54px;height:54px;
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.brand-badge svg{ width:22px;height:22px; }
/* The logo mark carries its own gradient and transparent background, so it
   sits directly on the surface rather than inside a coloured tile. */
.brand-mark{ width:100%; height:100%; object-fit:contain; display:block; }
.brand-text .brand-title{ font-weight:800; font-size:.95rem; color:#fff; letter-spacing:.01em; }
.brand-text .brand-sub{ font-size:.7rem; color:var(--slate-300); text-transform:uppercase; letter-spacing:.08em; }

.nav-group{ margin-bottom:6px; }
.nav-label{
  font-size:.68rem; text-transform:uppercase; letter-spacing:.09em;
  color:var(--slate-400); padding:14px 12px 6px;
  font-weight:700;
}
.nav-link{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:9px 12px; border-radius:10px;
  color:var(--slate-200); font-size:.87rem; font-weight:600; font-family:inherit;
  cursor:pointer; background:none; border:1px solid transparent; text-align:left; user-select:none;
  transition:background var(--transition-fast), color var(--transition-fast);
}
.nav-link .ico{ width:18px; height:18px; flex-shrink:0; opacity:.85; }
.nav-link:hover{ background:rgba(255,255,255,.06); color:#fff; }
.nav-link:focus-visible{ box-shadow:var(--focus-ring); outline:none; }
.nav-link.active{
  /* Same flat oxblood as the marketing site's primary buttons (see
     .landing .btn-primary), so the sidebar, the app's most visible element
     on every screen, reads as the same brand as the public site. No
     gradient, per the design brief: solid, simple, confident. */
  background:var(--brand-accent);
  color:#fff;
  box-shadow:0 4px 12px rgba(125,33,28,.3);
}
.sidebar-footer{
  margin-top:auto; padding:14px 12px 4px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:.72rem; color:var(--slate-400);
}

.main-col{ display:flex; flex-direction:column; min-width:0; }
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:16px 28px;
  background:var(--bg-surface);
  border-bottom:1px solid var(--border-subtle);
  position:sticky; top:0; z-index:20;
}
.topbar-title{ display:flex; align-items:center; gap:12px; }
.topbar-title h1{ margin:0; }
.topbar-title .crumb{ font-size:.78rem; color:var(--text-muted); font-weight:600; text-transform:uppercase; letter-spacing:.06em; }
.topbar-actions{ display:flex; align-items:center; gap:10px; }
.btn.sidebar-toggle{ display:none; }
.sidebar-toggle svg{ width:20px; height:20px; }
.sidebar-backdrop{ display:none; }

.view-container{ padding:26px 28px 60px; max-width:1400px; width:100%; margin:0 auto; }
.view{ display:none; animation:fadeIn .25s ease; }
.view.active{ display:block; }
@keyframes fadeIn{ from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;} }

/* ---------------------------------------------------------------------- */
/* Grid + cards                                                           */
/* ---------------------------------------------------------------------- */
.grid{ display:grid; gap:18px; }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:1200px){ .grid-4{grid-template-columns:repeat(2,1fr);} .grid-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width:760px){
  .grid-4,.grid-3,.grid-2{grid-template-columns:1fr;}
  .app-shell{grid-template-columns:1fr;}
  .sidebar{
    position:fixed; top:0; left:0; height:100vh; width:270px; max-width:82vw;
    z-index:60; transform:translateX(-100%);
    transition:transform var(--transition-med);
    box-shadow:var(--shadow-lg);
  }
  .sidebar.open{ transform:translateX(0); }
  .btn.sidebar-toggle{ display:inline-flex; }
  .sidebar-backdrop{
    display:block; position:fixed; inset:0; background:rgba(8,12,20,.55);
    z-index:50; opacity:0; pointer-events:none; transition:opacity var(--transition-med);
  }
  .sidebar-backdrop.open{ opacity:1; pointer-events:auto; }
}
@media (max-width:760px) and (prefers-reduced-motion:reduce){
  .sidebar, .sidebar-backdrop{ transition:none; }
}

.card{
  background:var(--bg-surface);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:20px;
  box-shadow:var(--shadow-sm);
  transition:box-shadow var(--transition-med);
}
.card.hover-raise:hover{ box-shadow:var(--shadow-md); }
.card-header{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:14px; gap:10px; }
.card-header h2,.card-header h3{ margin:0; }
.card-sub{ font-size:.8rem; color:var(--text-muted); margin-top:2px; }
.card-flush{ padding:0; overflow:hidden; }

.stat-card{ position:relative; overflow:hidden; }
.stat-card .stat-label{ font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); padding-right:50px; }
.stat-card .stat-value{ font-size:1.9rem; font-weight:800; margin:6px 0 2px; letter-spacing:-.02em; }
.stat-card .stat-delta{ font-size:.8rem; font-weight:600; }
.stat-card .stat-icon{
  position:absolute; right:16px; top:16px; width:38px; height:38px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
}
.stat-icon.red{ background:var(--red-100); color:var(--red-600); }
.stat-icon.gold{ background:var(--gold-100); color:var(--amber-600); }
.stat-icon.green{ background:var(--green-100); color:var(--green-600); }
.stat-icon.blue{ background:var(--blue-100); color:var(--blue-600); }
:root[data-theme="dark"] .stat-icon.red,body:not([data-force-light]) [data-theme="dark"] .stat-icon.red{ background:rgba(224,41,63,.15); }

/* ---------------------------------------------------------------------- */
/* Dashboard home: Today's Briefing / Financial Snapshot / goal rings     */
/* ---------------------------------------------------------------------- */
.briefing-card{
  position:relative; overflow:hidden; padding-top:22px;
}
.briefing-card::before{
  content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background:var(--brand-accent);
}
.briefing-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:2px; }
.briefing-eyebrow{ font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin-bottom:4px; }
.briefing-card h1{ margin-bottom:0; }
.briefing-lines{ margin-top:16px; padding-top:14px; border-top:1px solid var(--border-subtle); display:flex; flex-direction:column; gap:9px; }
.briefing-line{ display:flex; align-items:baseline; gap:10px; font-size:.9rem; color:var(--text-secondary); }
.briefing-dot{ width:6px; height:6px; border-radius:50%; background:var(--accent-2); flex-shrink:0; transform:translateY(-2px); }

.snapshot-hero{
  background:var(--bg-surface-2); border:1px solid var(--border-subtle);
  border-radius:var(--radius-xl); padding:20px;
}
.snapshot-hero-head{ display:flex; align-items:baseline; gap:10px; margin-bottom:14px; }
.snapshot-hero-head h2{ margin:0; }
.snapshot-hero-sub{ font-size:.8rem; color:var(--text-muted); }
.snapshot-hero .stat-card{ background:var(--bg-surface); }

.goal-ring-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.goal-ring-item{ text-align:center; }
.goal-ring-chart{ position:relative; width:76px; height:76px; margin:0 auto 8px; }
.ring-wrap{ position:relative; margin:0 auto; }
.ring-center{
  position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; pointer-events:none;
}
.ring-value{ font-size:.92rem; font-weight:800; color:var(--text-primary); }
.ring-caption{ font-size:.6rem; color:var(--text-muted); font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.goal-ring-name{ font-size:.84rem; font-weight:700; color:var(--text-primary); }
.goal-ring-amt{ font-size:.76rem; color:var(--text-muted); }
@media (max-width:520px){ .goal-ring-grid{ grid-template-columns:1fr 1fr; } }

/* ---------------------------------------------------------------------- */
/* Buttons + inputs                                                       */
/* ---------------------------------------------------------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; border-radius:10px; font-size:.86rem; font-weight:700;
  border:1px solid transparent; cursor:pointer; white-space:nowrap;
  transition:all var(--transition-fast);
}
.btn:focus-visible{ box-shadow:var(--focus-ring); outline:none; }
/* Solid oxblood everywhere -- auth pages, dashboard, and .landing (which
   overrides this further down only for its own box-shadow tint) all read
   as one brand now. No gradient, per the design brief. */
.btn-primary{ background:var(--brand-accent); color:#fff; box-shadow:0 4px 12px rgba(125,33,28,.28); }
.btn-primary:hover{ background:var(--brand-accent-deep); transform:translateY(-1px); }
.btn-secondary{ background:var(--bg-surface-2); color:var(--text-primary); border-color:var(--border-strong); }
.btn-secondary:hover{ background:var(--border-subtle); }
.btn-ghost{ background:transparent; color:var(--text-secondary); }
.btn-ghost:hover{ background:var(--bg-surface-2); }
.btn-gold{ background:linear-gradient(135deg,var(--gold-500),#c88a1f); color:#fff; }
.btn-danger{ background:var(--red-100); color:var(--red-600); }
.btn-danger:hover{ background:var(--red-600); color:#fff; }
.btn-sm{ padding:6px 11px; font-size:.78rem; border-radius:8px; }
.btn-icon{ width:36px; height:36px; padding:0; border-radius:9px; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

label{ display:block; font-size:.78rem; font-weight:700; color:var(--text-secondary); margin-bottom:5px; }
.field{ margin-bottom:14px; }
.field-hint{ font-size:.74rem; color:var(--text-muted); margin-top:4px; }
.save-status{ font-size:.74rem; font-weight:700; margin-left:10px; }
.save-status.saving{ color:var(--text-muted); }
.save-status.saved{ color:var(--green-600); }
.save-status.error{ color:var(--red-600); }
.field-error{ font-size:.74rem; color:var(--red-600); margin-top:4px; font-weight:600; display:none; }
.field.has-error .field-error{ display:block; }
.field.has-error input,.field.has-error select{ border-color:var(--red-500); background:var(--red-100); }

input[type="text"],input[type="number"],input[type="date"],input[type="email"],input[type="password"],
select,textarea{
  width:100%; padding:10px 12px; border-radius:10px;
  border:1.5px solid var(--border-strong); background:var(--bg-surface);
  color:var(--text-primary); font-size:.88rem; font-family:inherit;
  transition:border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea{ resize:vertical; min-height:70px; }
input:focus,select:focus,textarea:focus{ outline:none; border-color:var(--accent); box-shadow:var(--focus-ring); }
input::placeholder{ color:var(--text-muted); }
.input-group{ position:relative; }
.input-group .prefix{ position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-weight:600; font-size:.86rem; }
.input-group input{ padding-left:26px; }
.input-row{ display:flex; gap:12px; }
.input-row > *{ flex:1; }
@media (max-width:520px){ .input-row{ flex-direction:column; gap:14px; } }

.toggle{ display:inline-flex; border:1px solid var(--border-strong); border-radius:10px; overflow:hidden; }
.toggle button{ border:none; background:var(--bg-surface); color:var(--text-secondary); padding:8px 14px; font-size:.8rem; font-weight:700; cursor:pointer; }
.toggle button.active{ background:var(--navy-900); color:#fff; }
:root[data-theme="dark"] .toggle button.active{ background:var(--red-600); }

/* ---------------------------------------------------------------------- */
/* Tables                                                                  */
/* ---------------------------------------------------------------------- */
table{ width:100%; border-collapse:collapse; font-size:.86rem; }
th{ text-align:left; font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); padding:9px 12px; border-bottom:1px solid var(--border-subtle); }
td{ padding:10px 12px; border-bottom:1px solid var(--border-subtle); color:var(--text-primary); }
tr:last-child td{ border-bottom:none; }
tbody tr{ transition:background var(--transition-fast); }
tbody tr:hover{ background:var(--bg-surface-2); }
td.num{ text-align:right; font-variant-numeric:tabular-nums; }
th.num{ text-align:right; }
.table-scroll{ overflow-x:auto; }

/* ---------------------------------------------------------------------- */
/* Badges, pills, progress                                                */
/* ---------------------------------------------------------------------- */
.badge{ display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:99px; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.badge-red{ background:var(--red-100); color:var(--red-600); }
.badge-green{ background:var(--green-100); color:var(--green-600); }
.badge-gold{ background:var(--gold-100); color:var(--amber-600); }
.badge-blue{ background:var(--blue-100); color:var(--blue-600); }
.badge-gray{ background:var(--bg-surface-2); color:var(--text-muted); }

.progress{ height:10px; border-radius:99px; background:var(--bg-surface-2); overflow:hidden; position:relative; }
.progress-bar{ height:100%; border-radius:99px; background:linear-gradient(90deg,var(--red-600),var(--gold-500)); transition:width .5s cubic-bezier(.4,0,.2,1); }
.progress-bar.green{ background:linear-gradient(90deg,#1c8a52,#25a866); }
.progress-bar.blue{ background:linear-gradient(90deg,#2461c4,#5a8de0); }
.progress-bar.warn{ background:linear-gradient(90deg,#b9760a,#e3a733); }
.progress-bar.over{ background:linear-gradient(90deg,#c8102e,#8c0c20); }
.progress-label{ display:flex; justify-content:space-between; font-size:.78rem; margin-bottom:6px; font-weight:600; color:var(--text-secondary); }

.chip{ display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:8px; background:var(--bg-surface-2); font-size:.76rem; font-weight:700; color:var(--text-secondary); border:1px solid var(--border-subtle); }

/* ---------------------------------------------------------------------- */
/* Calendar                                                                */
/* ---------------------------------------------------------------------- */
.calendar-toolbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:10px; }
.calendar-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:10px; }
.calendar-dow{ text-align:center; font-size:.7rem; font-weight:800; text-transform:uppercase; color:var(--text-muted); padding-bottom:4px; letter-spacing:.05em; }
.cal-day{
  min-height:104px; border-radius:14px; border:1px solid var(--border-subtle);
  padding:10px; cursor:pointer; position:relative; background:var(--bg-surface);
  transition:transform var(--transition-fast), box-shadow var(--transition-fast);
  display:flex; flex-direction:column; gap:5px;
}
.cal-day:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.cal-day:focus-visible{ outline:none; box-shadow:var(--focus-ring); }
.cal-day.outside{ opacity:.35; }
.cal-day .d-num{ font-size:.82rem; font-weight:800; }
.cal-day.is-shift{ background:linear-gradient(160deg,var(--red-100),var(--bg-surface)); border-color:var(--red-500); }
.cal-day.is-kelly{ background:linear-gradient(160deg,var(--gold-100),var(--bg-surface)); border-color:var(--gold-500); }
.cal-day.is-off{ }
.cal-day.is-today{ box-shadow:0 0 0 2px var(--accent) inset; }
.cal-tags{ display:flex; flex-wrap:wrap; gap:4px; margin-top:auto; }
.cal-tag{ font-size:.6rem; font-weight:800; padding:3px 7px; border-radius:7px; text-transform:uppercase; letter-spacing:.03em; border:1px solid transparent; color:var(--tag-light); }
.cal-day-status{ font-size:.62rem; font-weight:800; color:var(--tag-light); }
.cal-day-status.cal-day-removed{ color:var(--text-muted); text-decoration:line-through; }
:root[data-theme="dark"] .cal-tag, :root[data-theme="dark"] .cal-day-status{ color:var(--tag-dark); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .cal-tag, :root:not([data-theme="light"]) .cal-day-status{ color:var(--tag-dark); } }
.cal-day.has-outside-income{ box-shadow:0 0 0 2px var(--income-teal,#0d9488) inset; }
/* Corner stack: outside-income flag, payday, and bill-due badges all sit
   here, top-right, rather than tinting the whole day cell -- a day can be
   a payday AND have a bill due without the two competing for the same
   attention as a full-cell highlight. */
.cal-day-corner{ position:absolute; top:6px; right:6px; display:flex; flex-direction:column; align-items:flex-end; gap:3px; z-index:1; }
.cal-day-income-flag{ width:8px; height:8px; border-radius:50%; background:var(--income-teal,#0d9488); align-self:flex-end; }
.cal-badge-pay, .cal-badge-bill{ font-weight:800; letter-spacing:.02em; color:#fff; border-radius:5px; padding:2px 6px; line-height:1.4; white-space:nowrap; }
.cal-badge-pay{ background:var(--green-600); font-size:.72rem; text-transform:uppercase; }
.cal-badge-bill{ background:var(--red-600); font-size:.78rem; }
.cal-day-corner .cal-badge-pay, .cal-day-corner .cal-badge-bill{ font-size:.56rem; padding:1px 5px; }
.cal-day-notes{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
button.cal-badge-bill{ border:none; cursor:pointer; font-family:inherit; }
button.cal-badge-bill:hover{ filter:brightness(1.1); }

/* Legend: collapsed by default (16 entry types is a lot to read at once),
   reusing the same <details>/<summary> pattern as the landing FAQ. */
.cal-legend-details{ margin-top:14px; }
.cal-legend-details > summary{
  list-style:none; cursor:pointer; display:inline-flex; align-items:center; gap:6px;
  font-size:.78rem; font-weight:700; color:var(--text-secondary); padding:4px 0;
}
.cal-legend-details > summary::-webkit-details-marker{ display:none; }
.cal-legend-details > summary .chev{ transition:transform var(--transition-med); color:var(--text-muted); }
.cal-legend-details[open] > summary .chev{ transform:rotate(180deg); }
.cal-legend{ display:flex; flex-direction:column; gap:8px; font-size:.78rem; color:var(--text-secondary); margin-top:10px; }
.cal-legend-group{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:baseline; }
.cal-legend-group-label{ font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); min-width:132px; }
.cal-legend .dot{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:middle; }

/* Entry list rows inside the "Add calendar entry" modal */
.entry-row{ display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border-subtle); }
.entry-row:last-of-type{ border-bottom:none; }
.entry-row .entry-dot{ width:10px; height:10px; border-radius:3px; flex-shrink:0; }
.entry-row .entry-main{ flex:1; min-width:0; }
.entry-row .entry-title{ font-weight:700; font-size:.85rem; display:flex; align-items:center; gap:6px; }
.entry-row .entry-sub{ font-size:.74rem; color:var(--text-muted); }
.entry-badge{ font-size:.6rem; font-weight:800; padding:1px 6px; border-radius:5px; text-transform:uppercase; letter-spacing:.03em; border:1px solid transparent; color:var(--tag-light); }
:root[data-theme="dark"] .entry-badge{ color:var(--tag-dark); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .entry-badge{ color:var(--tag-dark); } }
.entry-job-tag{ font-size:.68rem; font-weight:700; color:var(--text-muted); margin-left:auto; }

/* Job filter chips above the calendar grid */
.cal-job-filters{ padding-top:2px; }
.chip-toggle{ cursor:pointer; opacity:.55; }
.chip-toggle.active{ opacity:1; border-color:var(--accent); }
.chip-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; flex-shrink:0; }

/* ---------------------------------------------------------------------- */
/* Modal + toast                                                          */
/* ---------------------------------------------------------------------- */
.overlay{
  position:fixed; inset:0; background:rgba(8,12,20,.55); display:none; align-items:center; justify-content:center; z-index:100; padding:20px; backdrop-filter:blur(2px);
  opacity:0; transition:opacity var(--transition-med);
}
.overlay.open{ display:flex; }
.overlay.open.visible{ opacity:1; }
.modal{
  background:var(--bg-surface); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); width:100%; max-width:520px; max-height:88vh; overflow-y:auto; padding:24px;
  transform:translateY(10px) scale(.98); opacity:0; transition:transform var(--transition-med), opacity var(--transition-med);
}
.overlay.open.visible .modal{ transform:none; opacity:1; }
@media (prefers-reduced-motion:reduce){
  .overlay, .modal{ transition:none; }
}
.modal.modal-lg{ max-width:760px; }
.modal-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.modal-close{ background:none; border:none; cursor:pointer; color:var(--text-muted); font-size:1.3rem; line-height:1; padding:4px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }

.toast-stack{ position:fixed; bottom:22px; right:22px; display:flex; flex-direction:column; gap:10px; z-index:200; }
.toast{ background:var(--navy-950); color:#fff; padding:12px 18px; border-radius:12px; font-size:.85rem; font-weight:600; box-shadow:var(--shadow-lg); display:flex; align-items:center; gap:10px; animation:toastIn .25s ease; }
.toast.success{ background:linear-gradient(135deg,#1c8a52,#136339); }
.toast.error{ background:linear-gradient(135deg,var(--red-600),#8c0c20); }
@keyframes toastIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }

/* ---------------------------------------------------------------------- */
/* Tabs                                                                    */
/* ---------------------------------------------------------------------- */
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--border-subtle); margin-bottom:18px; overflow-x:auto; }
.view-save-status-row{ display:flex; justify-content:flex-end; min-height:18px; margin-bottom:2px; }
.tab-btn{ background:none; border:none; padding:10px 16px; font-size:.86rem; font-weight:700; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; }
.tab-btn:hover{ color:var(--text-primary); }
.tab-btn.active{ color:var(--accent); border-color:var(--accent); }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation:fadeIn .2s ease; }

/* ---------------------------------------------------------------------- */
/* Setup wizard                                                            */
/* ---------------------------------------------------------------------- */
.wizard-overlay{ position:fixed; inset:0; background:var(--bg-app); z-index:300; display:flex; align-items:center; justify-content:center; padding:24px; }
.wizard-shell{ width:100%; max-width:720px; }
.wizard-steps{ display:flex; gap:8px; margin-bottom:22px; }
.wizard-steps .step-dot{ flex:1; height:5px; border-radius:99px; background:var(--border-subtle); }
.wizard-steps .step-dot.done{ background:var(--accent); }
.wizard-steps .step-dot.current{ background:var(--gold-500); }
.wizard-card{ background:var(--bg-surface); border-radius:var(--radius-xl); box-shadow:var(--shadow-lg); padding:34px; border:1px solid var(--border-subtle); }
.wizard-nav{ display:flex; justify-content:space-between; margin-top:26px; }
.option-tile{
  border:1.5px solid var(--border-strong); border-radius:14px; padding:14px; cursor:pointer;
  transition:all var(--transition-fast); display:flex; flex-direction:column; gap:4px;
}
.option-tile:hover{ border-color:var(--accent); }
.option-tile:focus-visible{ outline:none; box-shadow:var(--focus-ring); }
.option-tile.selected{ border-color:var(--accent); background:var(--red-100); box-shadow:0 0 0 1px var(--accent); }
:root[data-theme="dark"] .option-tile.selected{ background:rgba(224,41,63,.12); }
.option-tile .opt-title{ font-weight:800; font-size:.9rem; }
.option-tile .opt-desc{ font-size:.76rem; color:var(--text-muted); }

/* ---------------------------------------------------------------------- */
/* Misc utility                                                            */
/* ---------------------------------------------------------------------- */
.flex{ display:flex; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; }
.flex-gap{ display:flex; gap:10px; align-items:center; }
.flex-wrap{ flex-wrap:wrap; }
.mt-0{margin-top:0;} .mt-1{margin-top:8px;} .mt-2{margin-top:16px;} .mt-3{margin-top:24px;}
.mb-0{margin-bottom:0;} .mb-1{margin-bottom:8px;} .mb-2{margin-bottom:16px;}
.w-full{ width:100%; }
.divider{ height:1px; background:var(--border-subtle); margin:18px 0; border:none; }
.empty-state{ text-align:center; padding:40px 20px; color:var(--text-muted); }
.empty-state svg{ width:48px; height:48px; opacity:.4; margin-bottom:10px; }
.icon-btn-row{ display:flex; gap:6px; }
.section-help{ background:var(--blue-100); border:1px solid rgba(36,97,196,.25); color:var(--blue-600); border-radius:12px; padding:12px 14px; font-size:.8rem; margin-bottom:16px; font-weight:600; }
.section-help.gold{ background:var(--gold-100); color:var(--amber-600); border-color:rgba(227,167,51,.35); }
.section-help.red{ background:var(--red-100); color:var(--red-600); border-color:rgba(200,16,46,.3); }

.chart-wrap{ width:100%; position:relative; }
.chart-wrap svg{ width:100%; height:auto; display:block; }
.legend-row{ display:flex; flex-wrap:wrap; gap:14px; margin-top:12px; font-size:.78rem; }
.legend-row .dot{ width:10px; height:10px; border-radius:3px; display:inline-block; margin-right:6px; }

/* Chart hover feedback: segment dimming and a small floating tooltip,
   shared by the donut/bar/line renderers in charts.js. Kept deliberately
   understated (opacity and radius changes only, no motion or resizing that
   could shift layout) per the project's design constitution. */
.donut-chart circle.donut-segment{ transition:opacity var(--transition-fast); cursor:default; }
.bar-rect{ transition:opacity var(--transition-fast); cursor:default; }
.line-point{ transition:r var(--transition-fast); cursor:default; }
.line-guide{ stroke:var(--border-strong); stroke-width:1; pointer-events:none; opacity:0; transition:opacity var(--transition-fast); }
.line-guide.visible{ opacity:1; }
.chart-tooltip{
  position:absolute; pointer-events:none; z-index:5;
  background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:8px;
  padding:6px 10px; box-shadow:var(--shadow-md);
  font-size:.76rem; font-weight:700; color:var(--text-primary);
  white-space:nowrap; opacity:0; transition:opacity var(--transition-fast);
  transform:translate(-50%,-100%);
}
.chart-tooltip.visible{ opacity:1; }
.chart-tooltip .tt-label{ font-size:.68rem; font-weight:600; color:var(--text-muted); margin-bottom:1px; }

.kpi-row{ display:flex; gap:22px; flex-wrap:wrap; }
.kpi{ min-width:140px; }
.kpi .kpi-label{ font-size:.72rem; color:var(--text-muted); text-transform:uppercase; font-weight:700; letter-spacing:.04em; }
.kpi .kpi-value{ font-size:1.35rem; font-weight:800; }

.list-row{ display:flex; align-items:center; justify-content:space-between; padding:12px 8px; margin:0 -8px; border-radius:8px; border-bottom:1px solid var(--border-subtle); gap:12px; transition:background var(--transition-fast); }
.list-row:last-child{ border-bottom:none; }
.list-row:hover{ background:var(--bg-surface-2); }
.list-row .lr-main{ display:flex; flex-direction:column; }
.list-row .lr-title{ font-weight:700; font-size:.87rem; }
.list-row .lr-sub{ font-size:.76rem; color:var(--text-muted); }
.list-row .lr-actions{ display:flex; gap:6px; }
.list-row.job-row-primary{ background:var(--bg-surface-2); border-radius:8px; margin:0 -8px 4px; border-bottom:none; box-shadow:inset 3px 0 0 var(--accent); }
.job-color-dot{ width:12px; height:12px; border-radius:50%; flex-shrink:0; }
.color-swatch{ width:26px; height:26px; border-radius:50%; border:2px solid transparent; cursor:pointer; padding:0; }
.color-swatch.active{ border-color:var(--text-primary); box-shadow:0 0 0 2px var(--bg-surface); }
.paystub-card table{ font-size:.85rem; }
.payday-group-card{ border-color:var(--accent); border-width:1.5px; }

@media print{
  .sidebar,.topbar-actions,.btn,.nav-link{ display:none !important; }
  .app-shell{ grid-template-columns:1fr; }
  .card{ box-shadow:none; border:1px solid #ccc; break-inside:avoid; }
}

/* ---------------------------------------------------------------------- */
/* Auth pages (login / register / password reset)                        */
/* ---------------------------------------------------------------------- */
.auth-shell{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:24px; background:var(--bg-app);
}
.auth-card{
  width:100%; max-width:420px; background:var(--bg-surface);
  border:1px solid var(--border-subtle); border-radius:var(--radius-xl);
  box-shadow:var(--shadow-lg); padding:36px;
}
.auth-brand{ display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.auth-brand .brand-badge{ width:56px;height:56px;display:flex;align-items:center;justify-content:center;flex-shrink:0; }
.auth-brand .brand-badge svg{ width:22px;height:22px; }
.auth-brand-title{ font-weight:800; font-size:1rem; }
.auth-foot{ text-align:center; margin-top:18px; font-size:.85rem; color:var(--text-muted); }
.auth-foot a{ font-weight:700; }
.auth-alert{ border-radius:12px; padding:12px 14px; font-size:.85rem; font-weight:600; margin-bottom:16px; display:none; }
.auth-alert.show{ display:block; }
.auth-alert.error{ background:var(--red-100); color:var(--red-600); border:1px solid rgba(200,16,46,.25); }
.auth-alert.success{ background:var(--green-100); color:var(--green-600); border:1px solid rgba(37,168,102,.25); }
.auth-alert.info{ background:var(--blue-100); color:var(--blue-600); border:1px solid rgba(36,97,196,.25); }
.auth-divider{ display:flex; align-items:center; gap:10px; margin:18px 0; color:var(--text-muted); font-size:.78rem; }
.auth-divider::before,.auth-divider::after{ content:""; flex:1; height:1px; background:var(--border-subtle); }

/* ---------------------------------------------------------------------- */
/* Onboarding (onboarding.html) + license access (license.html)          */
/* ---------------------------------------------------------------------- */
.verify-icon{
  width:56px;height:56px;border-radius:50%;margin:8px auto 16px;
  display:flex;align-items:center;justify-content:center;
  background:var(--green-100); color:var(--green-600);
}
.verify-icon svg{ width:28px;height:28px; }

.ob-loading{ text-align:center; color:var(--text-muted); }
.spinner{
  width:32px;height:32px;margin:0 auto 14px;border-radius:50%;
  border:3px solid var(--border-subtle); border-top-color:var(--accent);
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .spinner{ animation-duration:2s; } }

.ob-progress{ margin-bottom:22px; }
.ob-progress-track{ height:6px; border-radius:999px; background:var(--bg-surface-2); overflow:hidden; }
.ob-progress-fill{
  height:100%; width:25%; border-radius:999px;
  background:linear-gradient(90deg,var(--accent-2),var(--accent));
  transition:width var(--transition-med);
}
.ob-step-count{ font-size:.74rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--text-muted); margin-top:8px; }
.ob-step-title{ font-size:1.25rem; margin:0 0 4px; }
.ob-step-sub{ font-size:.86rem; color:var(--text-muted); margin-bottom:20px; }
.ob-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.ob-actions{ display:flex; justify-content:space-between; gap:12px; margin-top:26px; }
.ob-actions .btn-primary{ min-width:150px; }

.ob-options{ display:flex; flex-direction:column; gap:10px; }
.ob-option{
  display:flex; align-items:flex-start; gap:12px; padding:14px 16px; cursor:pointer;
  border:1.5px solid var(--border-subtle); border-radius:var(--radius-md);
  background:var(--bg-surface); transition:border-color var(--transition-fast), background var(--transition-fast);
}
.ob-option:hover{ border-color:var(--border-strong); background:var(--bg-surface-2); }
.ob-option.selected{ border-color:var(--accent); background:var(--red-100); }
:root[data-theme="dark"] .ob-option.selected{ background:rgba(200,16,46,.14); }
.ob-option input{ margin-top:3px; flex-shrink:0; accent-color:var(--accent); }
.ob-option-body{ display:flex; flex-direction:column; gap:2px; }
.ob-option-title{ font-weight:700; font-size:.9rem; color:var(--text-primary); }
.ob-option-desc{ font-size:.79rem; color:var(--text-muted); }
.ob-options-compact .ob-option{ padding:12px 14px; }

.ob-toggle{ display:flex; gap:8px; margin-bottom:18px; }
.ob-toggle-btn{
  flex:1; padding:10px 14px; border-radius:var(--radius-md); cursor:pointer;
  border:1.5px solid var(--border-subtle); background:var(--bg-surface);
  font-weight:700; font-size:.85rem; color:var(--text-secondary);
  transition:border-color var(--transition-fast), color var(--transition-fast);
}
.ob-toggle-btn.active{ border-color:var(--accent); color:var(--accent); background:var(--red-100); }
:root[data-theme="dark"] .ob-toggle-btn.active{ background:rgba(200,16,46,.14); }

.lic-tier{
  border:1px solid var(--border-subtle); border-radius:var(--radius-lg);
  padding:20px; background:var(--bg-surface);
}
.lic-tier-active{ border-color:var(--accent); box-shadow:0 4px 16px rgba(200,16,46,.12); }
.lic-tier-soon{ opacity:.72; }
.lic-tier-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.lic-tier-name{ font-weight:800; font-size:.98rem; }
.lic-tier-sub{ font-size:.79rem; color:var(--text-muted); margin-top:2px; }
.lic-badge{
  flex-shrink:0; font-size:.68rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  padding:4px 9px; border-radius:999px; background:var(--bg-surface-2); color:var(--text-muted);
}
.lic-badge-available{ background:var(--green-100); color:var(--green-600); }
.lic-divider{
  display:flex; align-items:center; gap:12px; margin:26px 0 18px;
  font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted);
}
.lic-divider::before,.lic-divider::after{ content:""; flex:1; height:1px; background:var(--border-subtle); }
.lic-tier-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
/* The 3-up placeholder cards are too narrow for a side-by-side name/badge,
   so stack them there instead of squeezing the copy into a column. */
.lic-tier-grid .lic-tier-head{ flex-direction:column; align-items:flex-start; gap:8px; }
.lic-tier-grid .lic-badge{ order:-1; }
.lic-foot-actions{ display:flex; justify-content:center; gap:8px; margin-top:6px; }

@media (max-width:620px){
  .ob-grid-2{ grid-template-columns:1fr; }
  .lic-tier-grid{ grid-template-columns:1fr; }
}

/* ---------------------------------------------------------------------- */
/* Public-site typography + scroll reveal (marketing + pre-login pages)   */
/* ---------------------------------------------------------------------- */
.landing, .auth-shell, .app-shell{ font-family:var(--font-sans-public); }

/* Anton (a single-weight display face), used only for the single biggest
   headline moment on a page (the hero), never for body copy, dense UI
   text, or section-level headings -- those use --font-head (Oswald)
   instead, so boldness is spent in one place, not scattered. */
.display{
  font-family:var(--font-display);
  font-weight:400;
  font-style:normal;
  text-transform:uppercase;
  letter-spacing:.005em;
}

/* Scroll reveal, built as progressive enhancement rather than hide-then-
   rescue: [data-reveal] elements are plain and visible by default. Only
   once FBS.Reveal (landing.js) has confirmed IntersectionObserver support
   and the user doesn't prefer reduced motion does it add .reveal-ready to
   <html> and .reveal-pending to each element -- so there is no window
   where content depends on JS succeeding to become visible at all. */
html.reveal-ready [data-reveal].reveal-pending{
  opacity:0;
  transform:translateY(18px);
  transition:opacity var(--transition-slow), transform var(--transition-slow);
}
html.reveal-ready [data-reveal].is-visible{ opacity:1; transform:none; }

/* Staggered group variant: [data-reveal-group] wraps [data-reveal-item]
   children that fade in together with a short cascade, driven purely by
   nth-child delays (no per-item JS bookkeeping needed). */
html.reveal-ready [data-reveal-item].reveal-pending{
  opacity:0;
  transform:translateY(18px);
  transition:opacity var(--transition-slow), transform var(--transition-slow);
}
html.reveal-ready [data-reveal-item].reveal-pending:nth-child(1){ transition-delay:0ms; }
html.reveal-ready [data-reveal-item].reveal-pending:nth-child(2){ transition-delay:90ms; }
html.reveal-ready [data-reveal-item].reveal-pending:nth-child(3){ transition-delay:180ms; }
html.reveal-ready [data-reveal-item].reveal-pending:nth-child(4){ transition-delay:270ms; }
html.reveal-ready [data-reveal-item].reveal-pending:nth-child(5){ transition-delay:360ms; }
html.reveal-ready [data-reveal-item].reveal-pending:nth-child(6){ transition-delay:450ms; }
html.reveal-ready [data-reveal-item].is-visible{ opacity:1; transform:none; }

/* ---------------------------------------------------------------------- */
/* Public marketing site (index.html): Heritage Firehouse system          */
/* ---------------------------------------------------------------------- */
/* Flat oxblood/brass heritage palette, scoped to the public marketing
   site so the dashboard's own app-shell scoping (below) is independent.
   No gradients anywhere in this scope, per the design brief. */
.landing{
  /* Pin every token the rules below read to fixed, light-mode values,
     regardless of the visitor's OS light/dark preference. The dashboard
     app-shell is a themeable interface; this marketing page is a
     deliberately sequenced brand narrative (see the section-tone system
     right below) and its chapters must never get silently rewritten by
     prefers-color-scheme -- before this, a dark-mode visitor saw the whole
     page shift to the dashboard's navy dark theme, which nothing here was
     ever designed against. */
  --bg-app: var(--paper-50);
  --bg-surface: var(--paper-0);
  --bg-surface-2: var(--paper-100);
  --text-primary: var(--ink-black);
  --text-secondary: var(--faded-ink);
  --text-muted:#8c8371;
  --border-subtle:#e4d9c4;
  --border-strong: var(--warm-gray);

  /* Section-tone system (design brief: "controlled section color system").
     Four backgrounds plus one sparingly-used accent, aliased straight onto
     the existing New Core Palette -- no new colors invented. Apply exactly
     one .section-* class per full-bleed section to set its rhythm; nothing
     else in the page should reach for a raw color when placing a section. */
  --tone-ink-bg: var(--ink-black);
  --tone-ink-text: var(--warm-bone);
  --tone-ink-text-muted: rgba(242,232,213,.68);
  --tone-paper-bg: var(--warm-bone);
  --tone-canvas-bg: var(--paper-cream);
  --tone-oxblood-bg: var(--oxblood);
  --tone-oxblood-text: var(--warm-bone);
  --tone-oxblood-text-muted: rgba(242,232,213,.75);
  --signal: var(--burnt-orange);

  background:var(--bg-app); color:var(--text-primary);
  --nav-h:72px;
  padding-top:var(--nav-h);
  position:relative;
}

/* Paper and Canvas keep the same dark ink body text as the page default,
   only the background tone changes -- Ink and Oxblood invert to light
   text, and hand a couple of generic components (used inside sections of
   any tone) their muted variant so a future section can drop them into a
   dark chapter without a bespoke override. Kept from the first landing
   pass, still used for the 2-3 genuine dark bands (beta band, final CTA,
   footer) -- just no longer the page's full-bleed alternation device,
   see the rule-line system below. */
.section-paper{ background:var(--tone-paper-bg); }
.section-canvas{ background:var(--tone-canvas-bg); }
.section-ink{ background:var(--tone-ink-bg); color:var(--tone-ink-text); }
.section-oxblood{ background:var(--tone-oxblood-bg); color:var(--tone-oxblood-text); }
.section-ink .landing-kicker{ color:var(--signal); }
.section-oxblood .landing-kicker{ color:var(--tone-oxblood-text); }
.section-ink .landing-section-head p{ color:var(--tone-ink-text-muted); }
.section-oxblood .landing-section-head p{ color:var(--tone-oxblood-text-muted); }

/* Paper grain: a little more present than the first pass (.05 vs .035),
   since it now has to read across a much larger uniform-paper canvas
   instead of alternating color bands -- still restrained enough to be
   perceived, not consciously noticed, per the brief. */
.landing::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none; opacity:.05; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.landing-container{ max-width:1140px; margin:0 auto; padding:0 24px; position:relative; z-index:1; }
.landing-container.wide{ max-width:1280px; }

/* Rule-line system: the reference's actual structuring device is thick/
   thin black horizontal rules and bordered panels, not alternating
   full-bleed color fills (that was the first pass's approach). These are
   the reusable primitives every catalog/comparison/strip component below
   builds on. */
.rule-thick{ border-top:3px solid var(--ink-black); }
.rule-thin{ border-top:1px solid var(--border-strong); }

/* Masthead nav: permanently solid (a catalog masthead doesn't fade away
   on scroll the way a modern SaaS nav does), so it also never needs to
   negotiate contrast against a hero that's now light, not dark. */
.landing-nav{
  position:fixed; top:0; left:0; right:0; z-index:40; height:var(--nav-h);
  display:flex; align-items:center;
  background:var(--ink-black);
  border-bottom:3px solid var(--oxblood);
}
.landing .btn-primary{
  background:var(--brand-accent); box-shadow:0 4px 12px rgba(125,33,28,.28);
}
.landing .btn-primary:hover{ background:var(--brand-accent-deep); }
.landing-nav-row{ display:flex; align-items:center; justify-content:space-between; padding:14px 24px; max-width:1140px; width:100%; margin:0 auto; }
.landing-brand{ display:flex; align-items:center; gap:10px; color:#fff; font-family:var(--font-head); font-weight:600; font-size:1.05rem; letter-spacing:.01em; text-transform:uppercase; }
.landing-brand .brand-badge{ width:50px;height:50px;display:flex;align-items:center;justify-content:center;flex-shrink:0; }
.landing-menu{ display:flex; align-items:center; gap:28px; }
.landing-menu a{ color:var(--slate-300); font-weight:600; font-size:.88rem; }
.landing-menu a:hover{ color:var(--brand-accent-2-light); }
.landing-menu-actions{ display:flex; align-items:center; gap:10px; margin-left:8px; }
.landing-menu-actions a.btn{ padding:8px 16px; font-size:.85rem; }
.nav-toggle{
  display:none; width:38px; height:38px; border-radius:9px; border:1px solid rgba(255,255,255,.15);
  background:transparent; color:#fff; align-items:center; justify-content:center; cursor:pointer;
}
.nav-toggle svg{ width:20px; height:20px; }

/* Poster hero: warm paper background with black/oxblood display type,
   matching the reference's actual hero (light, not a dark cinematic
   wash) -- the badge-crest below is where the page's dark visual weight
   concentrates instead. */
.landing-hero{
  position:relative; padding:calc(var(--nav-h) + 56px) 24px 64px;
  background:var(--tone-paper-bg); color:var(--text-primary);
  border-bottom:3px solid var(--ink-black);
}
.hero-grid{
  display:grid; grid-template-columns:1.2fr .8fr; gap:56px; align-items:center;
  max-width:1140px; margin:0 auto; position:relative; z-index:1;
}
.hero-media{ position:absolute; inset:0; z-index:0; overflow:hidden; }
.hero-media-video, .hero-media-poster{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center;
}
.landing-hero h1{
  font-family:var(--font-display); font-weight:400; text-transform:uppercase;
  font-size:clamp(2.4rem, 4.8vw, 4rem); line-height:1.02; margin:0 0 20px; letter-spacing:.005em;
}
.hero-line{ display:block; }
.landing-hero h1 .accent{ color:var(--brand-accent); }
.landing-hero p.lead{ font-size:1.06rem; max-width:520px; margin:0 0 30px; color:var(--text-secondary); }

@keyframes heroRise{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:none; } }
.hero-line, .landing-hero p.lead, .landing-hero .landing-cta-row, .hero-trust-row{
  animation:heroRise .7s var(--ease-out-expo) both;
}
.hero-line:nth-of-type(1){ animation-delay:.08s; }
.hero-line:nth-of-type(2){ animation-delay:.20s; }
.landing-hero p.lead{ animation-delay:.34s; }
.landing-hero .landing-cta-row{ animation-delay:.46s; }
.hero-trust-row{ animation-delay:.58s; }
@media (prefers-reduced-motion: reduce){
  .hero-line, .landing-hero p.lead, .landing-hero .landing-cta-row, .hero-trust-row{
    animation:none; opacity:1; transform:none;
  }
}
.landing-cta-row{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.landing-cta-row .btn{ padding:13px 26px; font-size:.95rem; }
.landing-hero .btn-secondary{ background:var(--bg-surface); border-color:var(--text-primary); }

/* Trust row: folded directly into the hero (matching the reference) as
   three compact callouts under the CTAs, rather than a separate dark
   strip component. */
.hero-trust-row{ display:flex; flex-wrap:wrap; gap:22px 30px; margin-top:36px; padding-top:24px; border-top:1px solid var(--border-strong); }
.hero-trust-item{ display:flex; gap:10px; align-items:flex-start; max-width:220px; }
.hero-trust-item svg{ width:18px; height:18px; flex-shrink:0; color:var(--brand-accent); margin-top:2px; }
.hero-trust-item strong{ display:block; font-family:var(--font-head); font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.02em; margin-bottom:2px; }
.hero-trust-item span{ font-size:.78rem; color:var(--text-secondary); }

/* Badge crest: the page's concentrated dark visual anchor, built from the
   existing brand mark plus simple SVG framing -- an original shield
   medallion, not an invented mascot. */
.badge-crest{
  width:clamp(190px,20vw,240px); aspect-ratio:1; margin:0 auto; position:relative;
  display:flex; align-items:center; justify-content:center; border-radius:50%;
  background:var(--ink-black); border:3px solid var(--ink-black);
  box-shadow:0 0 0 5px var(--tone-paper-bg), 0 0 0 8px var(--oxblood), 0 0 0 9px var(--ink-black);
}
.badge-crest img{ width:56%; height:56%; object-fit:contain; filter:brightness(0) invert(1); }
.badge-crest-ribbon{
  margin-top:22px; text-align:center; font-family:var(--font-head); font-size:.72rem; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; color:var(--text-primary);
}
.badge-crest-ribbon span{ display:block; color:var(--text-muted); font-size:.66rem; letter-spacing:.1em; margin-top:4px; font-weight:600; }
@media (max-width:900px){
  .hero-grid{ grid-template-columns:1fr; gap:36px; text-align:center; }
  .landing-hero .landing-cta-row{ justify-content:center; }
  .hero-trust-row{ justify-content:center; }
  .hero-trust-item{ max-width:none; }
  .landing-hero p.lead{ margin-left:auto; margin-right:auto; }
}

.landing-section{ padding:76px 0; }
.landing-section-head{ max-width:640px; margin:0 auto 44px; text-align:center; }
.landing-section-head.left{ margin-left:0; text-align:left; }
.landing-kicker{ font-family:var(--font-mono); font-size:.72rem; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color:var(--brand-accent); margin-bottom:10px; }
.landing-section-head h2{ font-family:var(--font-head); font-weight:700; text-transform:uppercase; font-size:clamp(1.5rem,2.6vw,2.2rem); margin:0 0 12px; letter-spacing:.005em; }
.landing-section-head p{ margin:0; color:var(--text-secondary); }

/* Screenshot frame: the "technical catalog insert" treatment for every
   real (or placeholder) product screenshot on the page -- thin black
   keyline, a small uppercase mono caption bar, oxblood corner ticks.
   Replaces the softly-shadowed device-frame from the first pass, which
   read as modern product photography rather than a printed plate. */
.screenshot-frame{ position:relative; border:2px solid var(--ink-black); background:var(--tone-paper-bg); }
.screenshot-frame::before, .screenshot-frame::after{ content:""; position:absolute; width:16px; height:16px; pointer-events:none; }
.screenshot-frame::before{ top:-2px; left:-2px; border-top:2px solid var(--oxblood); border-left:2px solid var(--oxblood); }
.screenshot-frame::after{ bottom:-2px; right:-2px; border-bottom:2px solid var(--oxblood); border-right:2px solid var(--oxblood); }
.screenshot-frame-cap{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:8px 14px; border-bottom:2px solid var(--ink-black); background:var(--tone-canvas-bg);
  font-family:var(--font-mono); font-size:.64rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
}
.screenshot-frame-body{ aspect-ratio:16/10; }
.screenshot-frame.frame-sm .screenshot-frame-body{ aspect-ratio:4/3; }
.media-placeholder{
  display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden;
  background:var(--tone-canvas-bg); color:var(--brand-accent);
}
.media-placeholder svg{ opacity:.4; width:22%; height:22%; }

/* Comparison section layout: the ×/✓ panel beside its screenshot frame. */
.comparison-layout{ display:grid; grid-template-columns:1fr 1.1fr; gap:40px; align-items:start; }
@media (max-width:900px){ .comparison-layout{ grid-template-columns:1fr; } }

/* Editorial comparison: a bordered two-column ×/✓ spec panel, replacing
   the story-beat asymmetric copy+photo layout from the first pass. */
.editorial-comparison{ display:grid; grid-template-columns:1fr 1fr; border:2px solid var(--ink-black); }
.editorial-comparison-col{ padding:30px; }
.editorial-comparison-col.no{ border-right:2px solid var(--ink-black); background:var(--tone-canvas-bg); }
.editorial-comparison-col h3{ font-family:var(--font-head); text-transform:uppercase; font-weight:700; font-size:1rem; margin:0 0 18px; letter-spacing:.01em; }
.editorial-comparison-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:13px; }
.editorial-comparison-col li{ display:flex; gap:10px; align-items:flex-start; font-size:.9rem; }
.editorial-comparison-col .mark{ font-weight:800; flex-shrink:0; }
.editorial-comparison-col.no li{ color:var(--text-secondary); }
.editorial-comparison-col.no .mark{ color:var(--text-muted); }
.editorial-comparison-col.yes .mark{ color:var(--oxblood); }
@media (max-width:760px){
  .editorial-comparison{ grid-template-columns:1fr; }
  .editorial-comparison-col.no{ border-right:none; border-bottom:2px solid var(--ink-black); }
}

/* Numbered catalog columns (Pay -> Rotation -> Plan): static panels, not
   a carousel -- the brief explicitly asks for the carousel to be
   replaced with this. */
.stage-columns{ display:grid; grid-template-columns:repeat(3,1fr); gap:0; border:2px solid var(--ink-black); }
.stage-col{ padding:28px; border-right:2px solid var(--ink-black); }
.stage-col:last-child{ border-right:none; }
.stage-num{ font-family:var(--font-display); font-weight:400; font-size:1.8rem; color:var(--oxblood); line-height:1; margin-bottom:10px; }
.stage-col h3{ font-family:var(--font-head); text-transform:uppercase; font-weight:700; font-size:.98rem; margin:0 0 8px; }
.stage-col p{ font-size:.86rem; color:var(--text-secondary); margin:0 0 18px; }
@media (max-width:900px){
  .stage-columns{ grid-template-columns:1fr; }
  .stage-col{ border-right:none; border-bottom:2px solid var(--ink-black); }
  .stage-col:last-child{ border-bottom:none; }
}

/* Product spotlight: one large screenshot-frame with small annotation
   chips at the corners, used for the Shift Calendar spotlight. */
.spotlight-grid{ display:grid; grid-template-columns:.85fr 1.15fr; gap:48px; align-items:center; }
.spotlight-grid.reverse{ grid-template-columns:1.15fr .85fr; }
.spotlight-grid.reverse .spotlight-copy{ order:2; }
.spotlight-copy h2{ font-family:var(--font-head); font-weight:700; text-transform:uppercase; font-size:clamp(1.5rem,2.6vw,2rem); line-height:1.2; margin:0 0 14px; }
.spotlight-copy p{ font-size:.98rem; color:var(--text-secondary); margin:0 0 20px; }
.spotlight-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.spotlight-chip{
  font-family:var(--font-mono); font-size:.68rem; font-weight:600; letter-spacing:.03em; text-transform:uppercase;
  padding:5px 10px; border:1px solid var(--text-primary); color:var(--text-primary);
}
@media (max-width:900px){
  .spotlight-grid, .spotlight-grid.reverse{ grid-template-columns:1fr; gap:32px; }
  .spotlight-grid.reverse .spotlight-copy{ order:0; }
}

/* Feature catalog: a vertical-rule-divided strip reading as categories in
   a product catalog, replacing the icon-card feature-list grid. */
.feature-catalog{ display:grid; grid-template-columns:repeat(6,1fr); border-top:2px solid var(--ink-black); border-bottom:2px solid var(--ink-black); }
.feature-catalog-item{ padding:24px 18px; border-right:1px solid var(--border-strong); }
.feature-catalog-item:last-child{ border-right:none; }
.feature-catalog-item .f-icon{ width:26px; height:26px; color:var(--brand-accent); margin-bottom:14px; }
.feature-catalog-item .f-icon svg{ width:100%; height:100%; }
.feature-catalog-item h3{ font-family:var(--font-head); text-transform:uppercase; font-size:.8rem; font-weight:700; margin:0 0 6px; letter-spacing:.01em; }
.feature-catalog-item p{ font-size:.76rem; color:var(--text-secondary); margin:0; }
@media (max-width:900px){
  .feature-catalog{ grid-template-columns:repeat(3,1fr); }
  .feature-catalog-item:nth-child(3n){ border-right:none; }
}
@media (max-width:600px){
  .feature-catalog{ grid-template-columns:repeat(2,1fr); }
  .feature-catalog-item:nth-child(3n){ border-right:1px solid var(--border-strong); }
  .feature-catalog-item:nth-child(2n){ border-right:none; }
}

/* Beta brand band: one of the page's few genuine dark bands. */
.beta-band{ text-align:center; padding:8px; }
.beta-band-stamp{
  display:inline-flex; align-items:center; padding:5px 14px; border:1.5px solid var(--tone-oxblood-text);
  font-family:var(--font-head); font-size:.7rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  margin-bottom:18px; color:var(--tone-oxblood-text);
}
.beta-band h2{ margin:0 0 12px; }
.beta-band p{ max-width:600px; margin:0 auto 26px; color:var(--tone-oxblood-text-muted); }
.beta-band-list{ display:flex; flex-wrap:wrap; justify-content:center; gap:24px 36px; list-style:none; margin:0; padding:0; font-size:.86rem; font-weight:600; }
.beta-band-list li{ display:flex; align-items:center; gap:8px; }
.beta-band-list svg{ width:16px; height:16px; flex-shrink:0; }

/* Department teaser: a compact vintage-ad style band. */
.dept-teaser{ border:2px solid var(--ink-black); padding:36px; text-align:center; max-width:720px; margin:0 auto; }
.dept-teaser h2{ margin:0 0 10px; }
.dept-teaser p{ color:var(--text-secondary); margin:0 auto 20px; max-width:520px; }

/* Field-manual instruction panel: numbered rule-bordered rows instead of
   floating cards. */
.field-manual-steps{ border-top:2px solid var(--ink-black); }
.field-manual-step{ display:flex; gap:20px; align-items:flex-start; padding:22px 0; border-bottom:2px solid var(--ink-black); }
.field-manual-num{
  font-family:var(--font-display); font-weight:400; font-size:1.6rem; color:var(--oxblood);
  flex-shrink:0; width:52px; line-height:1;
}
.field-manual-step h3{ font-family:var(--font-head); text-transform:uppercase; font-weight:700; font-size:.98rem; margin:0 0 4px; }
.field-manual-step p{ font-size:.88rem; color:var(--text-secondary); margin:0; }
@media (max-width:640px){ .field-manual-step{ gap:14px; } }

.faq-list{ max-width:760px; margin:0 auto; }
.faq-item{ border-bottom:1px solid var(--border-strong); padding:2px 0; }
.faq-item summary{
  list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between;
  padding:14px 4px; font-weight:700; font-size:.92rem;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary .chev{ transition:transform var(--transition-med); flex-shrink:0; margin-left:12px; color:var(--text-muted); }
.faq-item[open] summary .chev{ transform:rotate(180deg); }
.faq-item .faq-answer{ padding:0 4px 16px; color:var(--text-secondary); font-size:.86rem; }

/* Contact strip: a single condensed horizontal bar, replacing the old
   full-width boxed contact-card section. */
.contact-strip{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px;
  border:2px solid var(--ink-black); padding:22px 28px;
}
.contact-strip p{ margin:0; font-size:.92rem; }
.contact-strip strong{ display:block; font-family:var(--font-head); text-transform:uppercase; font-size:.78rem; letter-spacing:.06em; margin-bottom:2px; }

.landing-cta-band{
  color:var(--tone-ink-text); text-align:center; padding:60px 24px;
  background:var(--tone-ink-bg); border-top:3px solid var(--oxblood);
}
.landing-cta-band h2{ color:var(--tone-ink-text); margin:0 0 10px; font-family:var(--font-head); font-weight:700; text-transform:uppercase; font-size:clamp(1.3rem,2.2vw,1.8rem); }
.landing-cta-band p{ color:var(--tone-ink-text-muted); margin:0 0 26px; }
.landing-cta-band .btn-secondary{ background:rgba(255,255,255,.08); color:var(--tone-ink-text); border-color:rgba(255,255,255,.25); }
.landing-cta-band .btn-secondary:hover{ background:rgba(255,255,255,.15); }

/* Heritage footer: same dark band, plus a boxed heritage stamp. */
.landing-footer{ background:var(--tone-ink-bg); color:var(--tone-ink-text-muted); padding:52px 24px 28px; }
.landing-footer-grid{ display:grid; grid-template-columns:1.2fr repeat(3,1fr) auto; gap:32px; max-width:1140px; margin:0 auto; align-items:start; }
.landing-footer h4{ color:var(--tone-ink-text); font-family:var(--font-head); font-weight:600; font-size:.76rem; text-transform:uppercase; letter-spacing:.06em; margin:0 0 14px; }
.landing-footer ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.landing-footer a{ color:var(--tone-ink-text-muted); font-size:.86rem; }
.landing-footer a:hover{ color:var(--brand-accent-2-light); }
.landing-footer-brand p{ color:var(--tone-ink-text-muted); font-size:.84rem; max-width:280px; }
.heritage-stamp{
  border:1.5px solid var(--tone-ink-text-muted); padding:14px 18px; text-align:center;
  font-family:var(--font-head); font-size:.7rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--tone-ink-text); white-space:nowrap;
}
.landing-footer-bottom{
  max-width:1140px; margin:36px auto 0; padding-top:20px; border-top:1px solid rgba(255,255,255,.12);
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px;
  font-size:.78rem; color:var(--tone-ink-text-muted);
}

@media (max-width:900px){
  .landing-footer-grid{ grid-template-columns:1fr 1fr; }
  .landing-footer-grid > .heritage-stamp{ grid-column:1 / -1; justify-self:start; }
}
@media (max-width:720px){
  .landing-menu{
    position:absolute; top:100%; left:0; right:0; flex-direction:column; align-items:stretch;
    background:var(--ink-black); border-bottom:3px solid var(--oxblood); padding:10px 24px 18px;
    gap:4px; display:none;
  }
  .landing-menu.open{ display:flex; }
  .landing-menu-actions a.btn{ text-align:center; }
  .landing-menu a{ padding:10px 0; border-bottom:1px solid rgba(255,255,255,.06); }
  .landing-menu-actions{ margin-left:0; margin-top:10px; flex-direction:column; align-items:stretch; }
  .nav-toggle{ display:flex; }
  .landing-footer-grid{ grid-template-columns:1fr; }
}
