/* ============================================================
   FCL WEBSITE UPGRADE OPTIONS — deliverable + site shell stylesheet
   ============================================================
   INDEX
     1.  Fonts               @font-face
     2.  Theme variables      :root
     3.  Base / reset         *, html, body, .page
     4.  Masthead             .mast
     5.  Section headers      h2, .eyebrow-row, .eyebrow, .rule
     6.  Body text            p, .lead, strong, .muted, a
     7.  Callout              .note
     8.  Tables               table, .tag, .num, .caption
     9.  Upgrade items        .item, .status-pill, .group-title
     10. Priority block       .priority-block
     11. Sign-off             .signoff
     12. Print                @page, @media print
     13. Back to top          .back-to-top
     14. Navbar               .navbar, .kebab-menu
     15. Dark mode             [data-theme="dark"] :root token overrides
     16. Guide hub             .guide-list, .guide-card, .contact-cta (index.html)

   Brand notes:
     - Teal #39bcbe + dark teal-navy #004e65 are FCL's real accent/heading
       colors, pulled from flatheadcountylibrary.org's live computed styles
       (not guessed).
     - Raleway (variable weight, self-hosted in ./fonts/) is the real site's
       heading font, and a free Google Font (OFL-licensed), safe to
       redistribute in this document.
     - The site's body-copy font, Eagle-Book, is a separately-licensed
       custom font — NOT embedded here since Frostbyte doesn't hold a
       redistribution license for it. Body text uses a plain serif fallback
       instead; swap in Eagle-Book only if/when FCL confirms Frostbyte can
       use it here.
   Inlined into each HTML file at build time so the PDFs are self-contained.
   ============================================================ */

/* -------------------- 1. Fonts -------------------- */

@font-face {
  font-family: 'Raleway';
  src:
    url('fonts/Raleway-Variable.ttf') format('truetype-variations'),
    url('fonts/Raleway-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Raleway-Regular';
  src: url('fonts/Raleway-Regular.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Raleway-Bold';
  src: url('fonts/Raleway-Bold.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Raleway-Black';
  src: url('fonts/Raleway-Black.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

/* -------------------- 2. Theme variables -------------------- */

:root {
  /* Deliverable palette */
  --teal: #39bcbe;
  --teal-dark: #004e65;
  --teal-soft: #2a8f91;
  --gold: #c99a3e; /* warm accent for callouts, kept distinct from teal so tags/notes don't blend into headings */
  --gold-ink: #96721f;
  --ink: #16232b;
  --ink-soft: #52646d;
  --paper: #ffffff;
  --paper-warm: #f2f8f8;
  --line: #dbe8e8;
  --good: #2f6b4f;
  --gap: #9c4a41;
  --good-bg: #e4efe8;
  --gap-bg: #f4e5e3;
  --rule: #a9c0c6; /* .rule divider color */
  /* Fixed-dark chip background (badge circle, table header row, .ref column
     text) paired with --white text — deliberately does NOT flip in dark mode,
     unlike --teal-dark below which is used for headings/text and does. */
  --surface-accent: #004e65;
  /* Menu/dropdown panel surface (kebab-menu, settings-dropdown) — separate
     from --white so dropdown backgrounds can go dark while --white stays a
     fixed "always white" token for text drawn on --surface-accent chips. */
  --surface: #ffffff;
  --head: 'Raleway', Helvetica, Arial, sans-serif; /* FCL's real heading/nav font */
  --serif: Georgia, 'Times New Roman', serif; /* body-copy fallback — see Eagle-Book note above */
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Navbar palette — ported as-is from fcl-webguides/styles.css so this
     deliverable can sit inside the guides site shell */
  --orange: #f15b34;
  --navy: #004e65;
  --text: #57595c;
  --white: #ffffff;
  --bg-light: #f2f2f2;
  --border: #e2e2e2;
  --font-bold: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-lg: 24px;
  --text-sm: 0.9rem;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* -------------------- 3. Base / reset -------------------- */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.55;
  background: var(--paper);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 25px;
}

/* -------------------- 4. Masthead -------------------- */

.mast {
  border-bottom: 3px solid var(--teal-dark);
  padding-bottom: 18px;
  margin-bottom: 26px;
}

.mast .brand {
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--teal-dark);
}

.mast .brand .mark {
  color: var(--teal);
}

.mast h1 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 800;
  color: var(--teal-dark);
  font-size: 30px;
  line-height: 1.15;
  margin: 12px 0 6px;
  text-wrap: balance;
}

.mast .sub {
  font-family: 'Raleway-Regular', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: var(--ink-soft);
}

.mast .prep {
  font-family: 'Raleway-Regular', Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 5px;
  letter-spacing: 0.05em;
}

/* -------------------- 5. Section headers -------------------- */

/* Each .section-page is its own printed page */
.section-page {
  page-break-before: always;
  break-before: page;
  padding-top: 8px;
}

.section-page:first-of-type {
  page-break-before: avoid;
  break-before: avoid;
}

section {
  margin: 0 0 30px;
}

h2 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-size: 24px;
  color: var(--teal-dark);
  margin: 0 0 4px;
  font-weight: 700;
}

/* Eyebrow: icon/number badge stacked above a centered label. The
   .priority-block override below restores the original left-aligned row
   layout for the "Where to Start" callout specifically. */
.eyebrow-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0 0 25px;
  text-align: center;
}

.eyebrow-row .badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-accent);
  color: var(--white);
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* Plus badge is drawn with CSS bars, not a text glyph — a text "+"
   reads visibly thinner than the ★ badge at the same font-size. */
.eyebrow-row .badge.plus {
  font-size: 0;
}

.eyebrow-row .badge.plus::before,
.eyebrow-row .badge.plus::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 1px;
}

.eyebrow-row .badge.plus::before {
  width: 10px;
  height: 2px;
}

.eyebrow-row .badge.plus::after {
  width: 2px;
  height: 10px;
}

.eyebrow {
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 26px 0;
}

/* -------------------- 6. Body text -------------------- */

p {
  margin: 0 0 12px;
  font-size: 14px;
}

.lead {
  font-size: 15px;
}

strong {
  color: var(--ink);
}

.muted {
  color: var(--ink-soft);
}

a {
  color: var(--teal-soft);
}

/* -------------------- 7. Callout -------------------- */

.note {
  background: var(--paper-warm);
  border-left: 3px solid var(--teal);
  padding: 12px 16px;
  font-size: 13.5px;
  margin: 0 0 16px;
}

.note strong {
  color: var(--teal-dark);
}

/* -------------------- 8. Tables -------------------- */

.table-wrap {
  width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}

th,
td {
  border: 1px solid var(--line);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface-accent);
  color: var(--white);
  font-family: var(--head);
  font-weight: 700;
  font-size: 11.5px;
}

thead th.ref {
  background: var(--gold);
  color: var(--surface-accent);
}

th.rowhead {
  background: var(--paper-warm);
  font-family: var(--mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 3px;
}

.tag.good {
  background: var(--good-bg);
  color: var(--good);
}

.tag.gap {
  background: var(--gap-bg);
  color: var(--gap);
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.caption {
  font-size: 10.5px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* -------------------- 9. Upgrade items -------------------- */

.item {
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 15px 20px 20px;
  margin: 0 0 20px;
  background: var(--paper);
}

.item.bundle {
  border-color: var(--teal);
  border-width: 2px;
  background: var(--paper-warm);
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.item-head h3 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--teal-dark);
  margin: 0;
}

.item .kick {
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--gold-ink);
  text-transform: uppercase;
}

.item .est {
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  text-align: right;
}

.item .est b {
  color: var(--teal-dark);
  font-size: 13px;
}

.item p.body {
  margin: 10px 0 0;
  font-size: 13px;
}

.item .why {
  margin: 10px 0 0;
  padding: 9px 13px;
  background: var(--paper-warm);
  border-left: 3px solid var(--gold);
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-soft);
}

.item .why b {
  color: var(--teal-dark);
  font-style: normal;
}

.status-pill {
  display: inline-block;
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid var(--teal-dark);
  color: var(--teal-dark);
}

.status-pill.monthly {
  border-color: var(--gold);
  color: var(--gold-ink);
}

.group-title {
  font-family: var(--head);
  font-size: 15px;
  color: var(--teal-dark);
  margin: 22px 0 3px;
  font-weight: 700;
}

.group-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

/* -------------------- 10. Priority block -------------------- */

/* "Where to Start" callout on page 1 */
.priority-block {
  background: var(--paper-warm);
  border-left: 4px solid var(--teal);
  padding: 14px 18px;
  margin: 14px 0 18px;
}

.priority-block .eyebrow-row {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  margin: 0 0 4px;
}

.priority-block p {
  margin: 0;
  font-size: 13.5px;
  font-style: italic;
  color: var(--ink-soft);
}

/* -------------------- 11. Sign-off -------------------- */

.signoff {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}

/* -------------------- 12. Print -------------------- */

@page {
  size: letter;
  margin: 0.6in 0.55in;
}

@media print {
  .page {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .item,
  table,
  .note,
  .priority-block {
    break-inside: avoid;
  }

  h2,
  .group-title {
    break-after: avoid;
  }

  thead {
    display: table-header-group;
  }
}

/* -------------------- 13. Back to top -------------------- */

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--surface-accent);
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 55;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover {
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none !important;
  }
}

@media print {
  .back-to-top {
    display: none;
  }
}

/* -------------------- 14. Navbar -------------------- */
/* Ported as-is from fcl-webguides/styles.css so this deliverable can sit
   inside the guides site shell. */

.navbar {
  --nav-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

/* hide-on-scroll (driven by scripts/ui.js toggling .is-hidden) */
.navbar.is-hidden {
  transform: translateY(-100%);
}

.navbar__brand {
  position: relative;
  height: 100%;
  width: 190px;
}

.navbar__brand img {
  position: absolute;
  width: 190px;
  top: -2px;
  left: -18px;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  background: var(--bg-light);
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
}

.kebab-btn svg,
.settings-btn svg {
  fill: var(--text);
  stroke: none;
}

/* Login/logout button — icon + text, unlike the icon-only .icon-btn
   siblings, since auth state is worth naming outright rather than leaving
   to a tooltip. */
.navbar__auth-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-family: var(--font-bold);
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.navbar__auth-btn:hover {
  background: var(--bg-light);
}

.navbar__auth-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.navbar__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-bold);
  font-size: var(--text-sm);
}

.navbar__links a {
  display: inline-flex;
  width: 100%;
  align-items: center;
  color: var(--text);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.navbar__links a:hover {
  color: var(--navy);
  background: var(--bg-light);
  text-decoration: none;
}

.navbar__links a.active {
  color: var(--orange);
  text-decoration: none;
}

/* Marks the guide matching the current page inside the Guides dropdown /
   mobile kebab menu — same "you are here" role as .active above, just
   scoped to dropdown items instead of top-level nav links. */
.nav-dropdown-item.is-current,
.kebab-menu a.is-current {
  color: var(--orange);
}

.nav-dropdown-item.is-current:hover,
.kebab-menu a.is-current:hover {
  color: var(--orange);
}

/* ---- Guides dropdown (placeholder nested pages) ---- */
.nav-dropdown-wrap {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  padding: var(--space-xs) var(--space-sm);
  border: none;
  background: none;
  border-radius: var(--radius);
  font-family: var(--font-bold);
  font-size: var(--text-sm);
  line-height: inherit;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown-trigger:hover {
  color: var(--navy);
  background: var(--bg-light);
}

.chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.25s var(--nav-ease);
}

.nav-dropdown-wrap.open .chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  min-width: 260px;
  padding: var(--space-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px) scale(0.96);
  transform-origin: top center;
  transition: opacity 0.2s ease, transform 0.25s var(--nav-ease), visibility 0.2s ease;
  z-index: 60;
}

.nav-dropdown-wrap.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.nav-dropdown-item {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-bold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown-item:hover {
  background: var(--bg-light);
  color: var(--orange);
}

/* Visibly-marked placeholder items — not live links yet, so they must not
   read as normal or broken. pointer-events: none + tabindex="-1" in markup
   keep them fully inert for mouse and keyboard alike. */
.is-placeholder,
.nav-dropdown-item.is-placeholder {
  color: var(--ink-soft);
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.is-placeholder:hover,
.nav-dropdown-item.is-placeholder:hover {
  background: none;
  color: var(--ink-soft);
  transform: none;
}

.coming-soon-tag {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.kebab-btn {
  display: none;
}

.kebab-menu {
  display: flex;
  position: absolute;
  top: calc(100% + 8px);
  right: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: var(--space-xs);
  min-width: 250px;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.25s var(--nav-ease), visibility 0.2s ease;
  z-index: 60;
}

.kebab-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.kebab-menu a {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-bold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.kebab-menu a:hover {
  background: var(--bg-light);
  text-decoration: none;
  color: var(--orange);
}

.kebab-menu__divider {
  height: 1px;
  margin: var(--space-xs) var(--space-sm);
  background: var(--border);
}

.kebab-menu__header {
  padding: 4px var(--space-sm) 6px;
  font-family: var(--font-bold);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  opacity: 0.7;
}

/* ---- Settings (Appearance) dropdown — desktop kebab ---- */
.settings-wrap {
  position: relative;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  padding: var(--space-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.25s var(--nav-ease), visibility 0.2s ease;
  z-index: 60;
}

.settings-wrap.open .settings-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.settings-dropdown-header {
  padding: var(--space-xs) var(--space-sm) 6px;
  font-family: var(--font-bold);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  opacity: 0.7;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-xs) var(--space-sm);
  border: none;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease;
}

.settings-item:hover {
  background: var(--bg-light);
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.settings-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--bg-light);
  color: var(--text);
  flex-shrink: 0;
}

.settings-item-icon svg {
  width: 16px;
  height: 16px;
}

.settings-item-label {
  display: block;
  font-family: var(--font-bold);
  font-size: var(--text-sm);
  color: var(--text);
}

.settings-item-sublabel {
  display: block;
  margin-top: 1px;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 12px;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--nav-ease);
}

.toggle-switch.active {
  background: var(--orange);
}

.toggle-switch.active::after {
  transform: translateX(18px);
}

@media (prefers-reduced-motion: reduce) {
  .navbar,
  .icon-btn,
  .navbar__links a,
  .kebab-menu,
  .kebab-menu a,
  .settings-dropdown,
  .toggle-switch,
  .toggle-switch::after,
  .nav-dropdown,
  .chevron,
  .nav-dropdown-item {
    transition: none !important;
  }
}

@media (max-width: 780px) {
  .navbar__links {
    display: none;
  }

  .settings-wrap {
    display: none;
  }

  .navbar__auth-btn--logout {
    display: none;
  }

  .kebab-btn {
    display: inline-flex;
  }
}

@media print {
  .navbar,
  .kebab-btn {
    display: none;
  }
}

/* -------------------- 15. Dark mode -------------------- */
/* Applied via data-theme="dark" on <html>, set pre-paint by the inline
   no-flash <head> script and toggled by scripts/ui.js. Re-points the same
   semantic vars used everywhere above, so navbar/content/footer all pick up
   dark styling automatically without per-selector overrides.

   Color inventory (light → dark), decided before writing any rules below:
     --teal        #39bcbe → #4fd0d2  accent (brand mark, note/bundle borders)
     --teal-dark   #004e65 → #7fd4e6  HEADINGS/TEXT role (mast, h2, item
                                      titles, note/why strongs, group-title,
                                      status-pill, navbar hover) — lightened
                                      because most of its ~9 uses are text,
                                      not background
     --teal-soft   #2a8f91 → #5cc9cc  body links
     --gold        #c99a3e → #d9ac55  why-callout border, .ref column bg
     --gold-ink    #96721f → #d9ad55  kick labels, monthly status-pill text
     --ink         #16232b → #e8edf0  body text
     --ink-soft    #52646d → #9db0ba  muted/secondary text
     --paper       #ffffff → #10181d  page background
     --paper-warm  #f2f8f8 → #17232a  note/why/priority/bundle/rowhead panels
     --line        #dbe8e8 → #2a3a42  table + signoff borders
     --good        #2f6b4f → #6fcf9e  "good" tag text
     --gap         #9c4a41 → #e08277  "gap" tag text
     --good-bg     #e4efe8 → #1c3327  "good" tag background
     --gap-bg      #f4e5e3 → #33201d  "gap" tag background
     --rule        #a9c0c6 → #3a4d54  section-divider <hr>
     --orange      #f15b34 → #ff7a54  active link / toggle-switch accent
     --navy        #004e65 → #7fd4e6  navbar link hover text (same role as
                                      --teal-dark, same source value)
     --text        #57595c → #c7d0d4  navbar icon/link base text
     --bg-light    #f2f2f2 → #1f2b31  navbar/menu hover background
     --border      #e2e2e2 → #2a3940  navbar/menu borders
     --surface-accent  #004e65 → #004e65  UNCHANGED — badge/thead/.ref chip
                                      backgrounds paired with fixed --white
                                      text; these are small fixed-dark chips,
                                      not page surface, so they don't invert
     --surface     #ffffff → #1a262c  kebab-menu / settings-dropdown panels
     --white       #ffffff → #ffffff  UNCHANGED — fixed white text drawn on
                                      --surface-accent chips (badge, thead) */
[data-theme="dark"] {
  --teal: #4fd0d2;
  --teal-dark: #7fd4e6;
  --teal-soft: #5cc9cc;
  --gold: #d9ac55;
  --gold-ink: #d9ad55;
  --ink: #e8edf0;
  --ink-soft: #9db0ba;
  --paper: #10181d;
  --paper-warm: #17232a;
  --line: #2a3a42;
  --good: #6fcf9e;
  --gap: #e08277;
  --good-bg: #1c3327;
  --gap-bg: #33201d;
  --rule: #3a4d54;
  --orange: #ff7a54;
  --navy: #7fd4e6;
  --text: #c7d0d4;
  --bg-light: #1f2b31;
  --border: #2a3940;
  --surface: #1a262c;
}

/* -------------------- 16. Guide hub (index.html) -------------------- */
/* index.html's landing/hub layout: a list of guide-cards linking out to
   each standalone guide document (website-upgrade-options.html today,
   more over time). Reuses the same tokens as the .item/.priority-block
   deliverable styling above so hub and guide pages read as one system,
   and picks up dark mode for free since every color here is a semantic
   var already re-pointed in section 15. */

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0 28px;
}

/* Top-level landing tiles (FCL Dev / FCL Upgrades) — same card language
   as .guide-card below, but larger and side-by-side since these are the
   two primary destinations rather than a growing reference list. */
.hub-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0 28px;
}

@media (max-width: 640px) {
  .hub-tiles {
    grid-template-columns: 1fr;
  }
}

.hub-tile {
  display: block;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 20px 22px;
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hub-tile:hover {
  border-color: var(--teal-dark);
  background: var(--paper-warm);
  box-shadow: 0 8px 20px rgba(0, 78, 101, 0.16), 0 2px 6px rgba(0, 78, 101, 0.1);
  transform: translateY(-3px);
}

.hub-tile h3 {
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--teal-dark);
  margin: 0 0 6px;
}

.hub-tile p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.hub-tile .tag {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--surface-accent);
}

.guide-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 16px 20px;
  background: var(--paper);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.guide-card:hover {
  border-color: var(--teal-dark);
  background: var(--paper-warm);
  box-shadow: 0 8px 20px rgba(0, 78, 101, 0.16), 0 2px 6px rgba(0, 78, 101, 0.1);
  transform: translateY(-3px);
}

/* Coming-soon guide cards reuse the generic .is-placeholder treatment
   (opacity, inert pointer-events) but need their own hover reset since
   .guide-card:hover is declared later in the file and would otherwise
   win over the earlier .is-placeholder:hover rule at equal specificity. */
.guide-card.is-placeholder:hover {
  border-color: var(--line);
  background: var(--paper);
  box-shadow: none;
  transform: none;
}

.guide-card__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.guide-card__body h3 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--teal-dark);
  margin: 0 0 4px;
}

.guide-card__body p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.contact-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  background: var(--paper-warm);
  border-left: 4px solid var(--gold);
  padding: 18px 20px;
  margin: 28px 0 0;
}

.contact-cta h3 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--teal-dark);
  margin: 0 0 4px;
}

.contact-cta p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.btn-cta {
  flex-shrink: 0;
  display: inline-block;
  background: var(--surface-accent);
  color: var(--white);
  font-family: 'Raleway-Bold', Helvetica, Arial, sans-serif;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn-cta:hover {
  opacity: 0.85;
}

/* Reveal-on-scroll (ui.js toggles .is-visible via IntersectionObserver).
   Scoped to .js so a [data-reveal] element stays visible if JS never runs.
   Unlike nsp-webguides' source (which reveals once and stops observing),
   this toggles both ways: fades/scales out again if scrolled back above
   it, not just a one-time entrance — a deliberate deviation, not a gap. */
.js [data-reveal] {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
