:root {
  /* Panah palette — dark maroon / cream / dusty rose, per the approved Figma mock. */
  --bg: #f3e7cb;
  --surface: #ffffff;
  --surface-accent: #c9a79a;
  --header-bg: #5a0e16;
  --ink: #4a0c12;
  --ink-soft: #8b5a4a;
  --border: #e0cfa8;
  --primary: #5a0e16;
  --primary-dark: #3f0a0f;
  --accent: #c9a79a;
  --cream-ink: #f3e7cb;
  --focus: #a9614a;
  --radius: 20px;
  --radius-sm: 12px;

  /* Status/semantic colors — retinted to sit inside the warm palette while
     staying mutually distinguishable (functional, not decorative). */
  --status-good-bg: #dce3c0;
  --status-good-text: #46592b;
  --status-warn-bg: #f0d9a0;
  --status-warn-text: #7a5a1a;
  --status-critical-bg: #f3d9ce;
  --status-critical-text: #b23a26;
  --status-neutral-bg: #ead9ae;
  --status-neutral-text: #5a0e16;
  --urgent: #b23a26;
  --urgent-bg: #f3d9ce;
  --normal-bg: #ead9ae;

  /* Analytics chart tokens — validated per the dataviz skill's six checks
     (see the commit that added analytics.js for the exact runs). Sequential
     = magnitude (one hue). Ordinal = lifecycle stage, monotone light->dark.
     Status = fixed, reserved meaning, always paired with a label. Left as
     the originally validated hues — chart marks need real chroma/contrast,
     which is a different job than this page's decorative palette. */
  --viz-sequential: #2a78d6;
  --viz-sequential-wash: rgba(42, 120, 214, 0.1);
  --viz-ordinal-1: #86b6ef;
  --viz-ordinal-2: #5598e7;
  --viz-ordinal-3: #2a78d6;
  --viz-ordinal-4: #1c5cab;
  --viz-critical: #d03b3b;
  --viz-muted-mark: #52514e;
  --viz-grid: #e1e0d9;

  --font-display: "Poppins", sans-serif;
  --font-body: "Nunito", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: var(--primary); }

h1, h2, h3, .brand, button, .btn, .btn-secondary {
  font-family: var(--font-display);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
/* Opt a specific section back into full window width (minus padding) —
   used below the landing page's hero, which stays capped. */
.container-wide {
  max-width: none;
}

header.site {
  background: var(--header-bg);
  color: var(--cream-ink);
}
header.site .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  position: relative;
}

/* Hamburger button — only ever visible below the mobile breakpoint (see
   below). Kept in the normal desktop CSS (not nested in the media query)
   so a plain, unqualified `.nav-toggle` here loses no cascade fights: it's
   `display: none` until the media query turns it on. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cream-ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.site-nav.nav-left { justify-self: start; }
.site-nav.nav-right { justify-self: end; }
.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--cream-ink);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.85;
  padding: 6px 2px;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover {
  opacity: 1;
  color: var(--accent);
}
.site-nav a:hover::after { transform: scaleX(1); }

/* "Services" nav dropdown — click-to-open (not hover), matching the
   spec ask directly rather than the more common hover pattern, so it
   behaves the same on touch devices too. */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  position: relative;
  background: none;
  border: none;
  padding: 6px 2px;
  margin: 0;
  font: inherit;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream-ink);
  opacity: 0.85;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  user-select: none;
}
.nav-dropdown-toggle,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus,
.nav-dropdown-toggle:active,
.nav-dropdown-toggle:focus-visible {
  background: transparent;
  outline: none;
  box-shadow: none;
  border: none;
}
.nav-dropdown-toggle:hover { opacity: 1; color: var(--accent); }
/* Caret moved to ::before so ::after is free for the same underline
   treatment .site-nav a::after uses elsewhere in this nav. */
.nav-dropdown-toggle::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s ease;
  order: 1; /* keep the caret visually after the "Services" text */
}
.nav-dropdown.open .nav-dropdown-toggle::before { transform: rotate(180deg); }
.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-dropdown-toggle:hover::after,
.nav-dropdown.open .nav-dropdown-toggle::after {
  transform: scaleX(1);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 8px;
  min-width: 190px;
  z-index: 20;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; flex-direction: column; }
/* Hover-to-open, mouse/trackpad only — (hover: hover) excludes touchscreens,
   where hover doesn't really exist and would otherwise "stick" open after a
   tap. Touch/keyboard still gets the click-toggle from nav.js regardless. */
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown-menu { display: flex; flex-direction: column; }
}
.nav-dropdown-menu a {
  color: var(--ink);
  opacity: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--bg); color: var(--primary); }
.nav-dropdown-menu a::after { display: none; } /* no underline-on-hover inside the menu */

/* On mobile, the whole nav is already stacked inside the open hamburger
   panel — an absolutely positioned floating menu there would either clip
   or float weirdly, so let it lay out inline instead, matching the rest
   of the stacked mobile nav. */
@media (max-width: 640px) {
  /* .nav-dropdown itself needs to be a centered flex column on mobile —
     without this, its box only shrinks to fit whichever child is widest
     (the toggle button when closed, the longer menu links once open), and
     since that box is what gets centered by the parent nav, the "Services"
     button visibly shifted sideways every time the menu opened/closed.
     Centering it directly here keeps the toggle anchored in place
     regardless of the menu's width. Confirmed live: toggle moved ~58px
     before this fix. */
  .nav-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    align-items: center;
    display: none;
    overflow: hidden;
  }
  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
    animation: dropdownOpen 0.2s ease;
  }
  .nav-dropdown-menu a { color: var(--cream-ink); padding: 8px 0; }
  .nav-dropdown-menu a:hover { background: none; color: var(--accent); }
}

@keyframes dropdownOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.site-nav .hint { color: var(--cream-ink); opacity: 0.85; font-weight: 600; font-size: 0.88rem; font-family: var(--font-body); }

.brand-block { justify-self: center; text-align: center; }
.brand {
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: 0.02em;
  color: var(--cream-ink);
  text-decoration: none;
  display: block;
  line-height: 1;
}
.brand-tagline {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--cream-ink);
  opacity: 0.85;
  margin-top: 6px;
}

/* The 3-column desktop header grid (nav-left | brand | nav-right) doesn't
   have room on a phone-width screen for 6 nav links total plus a 40px
   brand — each 1fr nav column was too narrow for its links, so they wrapped
   onto multiple lines and inflated the header to ~250px tall. Even after
   stacking the columns and shrinking things down, two rows of nav links
   still read as cramped/busy on a real phone — so instead, collapse both
   nav-left and nav-right behind a hamburger button (public/js/nav.js
   toggles `.nav-open` on header.site) and only the brand shows by default.
   This block must stay AFTER the base header/.brand/.site-nav rules above —
   same-specificity selectors (e.g. plain `.brand`) resolve ties by source
   order regardless of being inside @media, so placing this earlier let the
   later base rules silently win on mobile and override it. Confirmed live:
   moving it here was required before the breakpoint took effect at all. */
@media (max-width: 640px) {
  header.site .container {
    grid-template-columns: 1fr;
    justify-items: center;
    /* Symmetric padding on purpose — the button below is position:absolute
       (out of grid flow), so it doesn't need padding reserved for it. Giving
       it extra right padding here instead visually shoved the centered
       brand text off-center toward the left, confirmed live. */
    padding: 14px 16px;
    gap: 6px;
  }
  .nav-toggle {
    display: flex;
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
  }
  header.site.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  header.site.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  header.site.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .brand-block { order: -1; }
  .brand { font-size: 1.9rem; }
  .brand-tagline { font-size: 0.72rem; }

  /* Both nav groups stay collapsed until header.site gets .nav-open (set by
     public/js/nav.js on hamburger click). Selector specificity here matches
     the base `.site-nav { display: flex; }` rule, and this comes later in
     the file, so `display: none` wins by source order as intended. */
  .site-nav.nav-left, .site-nav.nav-right {
    display: none;
    justify-self: stretch;
    width: 100%;
  }
  header.site.nav-open .site-nav.nav-left,
  header.site.nav-open .site-nav.nav-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    animation: dropdownOpen 0.2s ease;
  }
  .site-nav a {
    padding: 10px 0;
    font-size: 1rem;
  }
}

main { padding: 48px 0 40px; }

.hero {
  text-align: center;
  padding: 12px 0 8px;
}

/* Entrance + scroll-reveal animations. Wrapped in prefers-reduced-motion so
   motion-sensitive users just see the final state immediately — .reveal's
   opacity:0 base state only exists inside this query, so nothing depends on
   JS running for them to see content. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .hero-text h1, .hero-text p, .hero-text .lead-strong, .hero-visual {
    opacity: 0;
    animation: heroIn 0.7s ease forwards;
  }
  .hero-text h1 { animation-delay: 0.05s; }
  .hero-text p { animation-delay: 0.2s; }
  .hero-text .lead-strong { animation-delay: 0.35s; }
  .hero-visual { animation-delay: 0.25s; }

  /* Animation-based (not transition-based) on purpose: .feature-card
     already owns `transition: transform, box-shadow` for its hover lift —
     a transition-based reveal on the same `transform` property would
     collide (same specificity, last rule in the cascade wins the whole
     shorthand). A keyframe animation runs independently of `transition`
     and hands `transform` back to the normal cascade once it finishes, so
     the fast hover lift keeps working on cards that also reveal-in. */
  @keyframes revealIn {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .reveal { opacity: 0; }
  .reveal.is-visible { animation: revealIn 0.6s ease forwards; }

  .feature-grid .reveal:nth-child(1).is-visible { animation-delay: 0s; }
  .feature-grid .reveal:nth-child(2).is-visible { animation-delay: 0.1s; }
  .feature-grid .reveal:nth-child(3).is-visible { animation-delay: 0.2s; }
}
.hero h1 { font-size: 3.1rem; margin-bottom: 18px; color: var(--ink); }
/* Plain page headings (Submit a report, Check your report status, etc.) —
   otherwise fall back to the browser's unstyled default h1 size. */
main h1 { font-size: 2.3rem; margin: 0 0 18px; color: var(--ink); }
.hero p { color: var(--ink); max-width: 62ch; margin: 0 auto; font-size: 1.02rem; }
.hero .lead-strong { font-weight: 800; margin-top: 22px; font-size: 1.05rem; }

/* Two-column hero: text left, illustrated panels right. */
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 44px;
  padding: 20px 0 40px;
}
.hero-text { text-align: left; }
.hero-text h1 { text-align: left; line-height: 1.15; }
.hero-text p { text-align: left; margin: 0; max-width: 46ch; }
.hero-text .lead-strong { text-align: left; }

.hero-visual {
  position: relative;
  height: 320px;
}
.hero-panel {
  position: absolute;
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-panel svg { width: 100%; height: 100%; display: block; padding: 22px; box-sizing: border-box; }
.hero-panel-main {
  top: 0;
  left: 0;
  width: 76%;
  height: 72%;
  background: var(--surface-accent);
}
.hero-panel-accent {
  bottom: 0;
  right: 0;
  width: 54%;
  height: 50%;
  background: #ddc3b6;
  box-shadow: 0 6px 18px rgba(58, 12, 15, 0.14);
}

@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-text, .hero-text h1, .hero-text p, .hero-text .lead-strong { text-align: center; margin-left: auto; margin-right: auto; }
  .hero-visual { height: 260px; margin-top: 12px; }
}

.section-divider {
  border: none;
  border-top: 1px solid var(--primary);
  opacity: 0.35;
  margin: 36px 0;
}
.section-divider-hero { margin-top: 12px; } /* .hero-split already carries its own bottom padding, so less extra margin is needed here — the net visual gap still lands lower than before. */
/* Zero the gap on the side facing the stat-banner, so its images touch the line directly. */
.section-divider-tight-bottom { margin-bottom: 0; }
.section-divider-tight-top { margin-top: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.card-grid .card { margin: 0; }

/* About page's founder signature card — a proper card, not a plain
   signature line, per feedback that the plain text version looked bare. */
/* An <a>, so it's clickable anywhere in the card (not just the photo) to
   Arisha's LinkedIn — same hover-lift as .feature-card on the landing page,
   for a consistent "this is clickable" feel across the site. */
.founder-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 12px 0 24px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(58, 12, 15, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.founder-card:hover, .founder-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 12px 22px rgba(58, 12, 15, 0.22);
}
.founder-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.founder-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--ink);
}
.founder-role {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-top: 4px;
}
.founder-badge {
  display: inline-block;
  margin-top: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}
.founder-quote {
  margin: 6px 0 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

.card-grid h3 { margin-top: 0; color: var(--ink); }

.about-story-card p { font-size: 1.02rem; }

/* Feature card — the clickable two-tone blocks on the landing page: a
   maroon title strip over a dusty-rose body, lifting on hover. */
.feature-card {
  display: block;
  background: var(--surface-accent);
  border-radius: var(--radius);
  overflow: hidden; /* clips the title strip to the card's rounded top corners */
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(58, 12, 15, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover, .feature-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 12px 22px rgba(58, 12, 15, 0.22);
}
.feature-card h3 {
  margin: 0;
  background: var(--primary);
  color: var(--cream-ink);
  font-size: 1.05rem;
  padding: 14px 20px;
  text-align: center;
}
.feature-card p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  padding: 18px 20px 8px;
  text-align: center;
  opacity: 0.9;
}
.feature-card-cta {
  display: block;
  text-align: center;
  padding: 4px 20px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.feature-card:hover .feature-card-cta {
  opacity: 1;
  transform: translateX(3px);
}

/* Frames .feature-grid as an explicit "pick one" choice, not passive info
   cards, per feedback that the cards read as flashcards rather than
   actionable buttons. */
.feature-grid-heading {
  text-align: center;
  color: var(--ink);
  font-size: 1.3rem;
  margin: 0 0 4px;
}
.feature-grid-subheading {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0 0 20px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 32px 0;
}
.feature-grid.single-row-2 { grid-template-columns: repeat(2, 1fr); }
/* Same grid-template-columns as .feature-grid so this single card's width
   matches the three above it exactly, not just approximately — placed in
   the middle column to stay visually centered. */
.feature-grid-center {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 22px 0;
}
.feature-grid-center .feature-card { grid-column: 2; }
@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid-center { grid-template-columns: 1fr; }
  .feature-grid-center .feature-card { grid-column: 1; }
}

.notice {
  background: var(--surface-accent);
  border: none;
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 0.92rem;
  color: var(--ink);
  margin: 20px 0;
}
.notice.crisis {
  background: var(--surface-accent);
  color: var(--ink);
}
.notice.crisis strong { font-weight: 800; }

/* Color-coded verdict on where-to-report.html — makes the "does this apply
   to you" answer visually obvious, not just something you have to read
   carefully to catch (confirmed live: every wording still said "NCCIA" by
   name, which read as "always suggesting NCCIA" at a glance without color). */
.notice.tone-good { background: var(--status-good-bg); color: var(--status-good-text); }
.notice.tone-warn { background: var(--status-warn-bg); color: var(--status-warn-text); }
.notice.tone-critical { background: var(--status-critical-bg); color: var(--status-critical-text); }

/* Small pill actions living inside a .notice — e.g. the unclaimed-
   institution warning's "Where else can I report this?" link. A plain
   underlined link there read as weirdly small/lost against the notice's
   dusty-rose background, so these are solid, button-shaped instead. */
.notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.chip-btn, .chip-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.chip-btn {
  background: var(--primary);
  color: var(--cream-ink);
  border: none;
}
.chip-btn:hover { background: var(--primary-dark); }
.chip-link {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--primary);
}
.chip-link:hover { background: var(--bg); }

.stat-banner {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  align-items: stretch; /* images stretch to the full row height instead of a capped aspect-ratio box */
  gap: 32px;
  margin: 0; /* touches the section-divider-tight-* lines directly above/below with no gap */
  min-height: 540px;
}
.stat-banner-image {
  overflow: hidden;
}
.stat-banner-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stat-banner-text {
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-banner-text h2 {
  font-size: 2.6rem;
  color: var(--primary);
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0 0 20px;
}
.stat-banner-text p {
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.5;
}
.stat-source {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.56rem;
  margin: 6px 0 0;
}
@media (max-width: 860px) {
  .stat-banner { grid-template-columns: 1fr; min-height: 0; }
  .stat-banner-image { aspect-ratio: 16 / 9; }
  /* Phone view shows one wider version of the artwork above and below the text
     (the two desktop paintings are portrait and read oddly once stacked).
     Swapped with a background image so the desktop markup stays untouched. */
  #stat-image-left, #stat-image-right { background: url("../images/stat-main.png") center / cover no-repeat; }
  #stat-image-left img, #stat-image-right img { visibility: hidden; }
}

label {
  display: block;
  font-weight: 700;
  margin: 16px 0 6px;
  font-size: 0.92rem;
  color: var(--ink);
}
.hint { color: var(--ink-soft); font-size: 0.85rem; }
label .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.82rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; }
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a0e16' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}
.checkbox-row label { margin: 0; font-weight: 400; }
.checkbox-row input { width: auto; }

button, .btn, .btn-secondary {
  display: inline-block;
  background: var(--primary);
  color: var(--cream-ink);
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { background: var(--primary-dark); }
button:disabled { background: #c7b6ab; cursor: not-allowed; }
/* .btn-secondary is meant to stand alone (not paired with .btn in markup),
   so it needs the base button styling above included in its own selector —
   an element with only class="btn-secondary" used to fall through to plain
   underlined link styling with just a thin border, missing all the layout/
   spacing/decoration rules (confirmed live on legal.html's "See all
   categories" link). */
.btn-secondary { background: var(--surface); color: var(--primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }

.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(74, 12, 18, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.option-list-item::after {
  content: "\2192"; /* → */
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1.1rem;
  opacity: 0.45;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.option-list-item:hover {
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 4px 14px rgba(74, 12, 18, 0.1);
  transform: translateY(-1px);
}
.option-list-item:hover::after { opacity: 1; transform: translateX(3px); }

.status-msg { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 0.92rem; }
.status-msg.error { background: var(--status-critical-bg); color: var(--status-critical-text); }
.status-msg.success { background: var(--status-good-bg); color: var(--status-good-text); }

.tracking-id {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--surface-accent);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  text-align: center;
  margin: 16px 0;
  color: var(--ink);
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--ink-soft); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr.row-link { cursor: pointer; }
tr.row-link:hover { background: var(--bg); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge.normal { background: var(--status-neutral-bg); color: var(--status-neutral-text); }
.badge.urgent { background: var(--status-critical-bg); color: var(--status-critical-text); }
.badge.status-new { background: var(--status-neutral-bg); color: var(--status-neutral-text); }
.badge.status-under_review { background: var(--status-warn-bg); color: var(--status-warn-text); }
.badge.status-escalated { background: var(--status-critical-bg); color: var(--status-critical-text); }
.badge.status-resolved { background: var(--status-good-bg); color: var(--status-good-text); }

.filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters select { width: auto; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

footer.site {
  padding: 26px 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 400;
  text-align: center;
}
.footer-copyright {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.85;
}
.footer-copyright a { color: inherit; text-decoration: underline; }

.form-actions { margin-top: 24px; display: flex; gap: 10px; }

.evidence-list { list-style: none; padding: 0; }
.evidence-list li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }

.history-list { list-style: none; padding: 0; margin: 0; }
.history-list li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.history-list li:last-child { border-bottom: none; }
.history-list .meta { color: var(--ink-soft); font-size: 0.8rem; }

/* --- Analytics / charts --- */

.range-filter { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.range-filter button {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.85rem;
}
.range-filter button:hover { background: var(--bg); }
.range-filter button.active { background: var(--primary); color: var(--cream-ink); border-color: var(--primary); }

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-tile .stat-label { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 6px; font-family: var(--font-body); }
.stat-tile .stat-value { font-size: 1.9rem; font-weight: 800; color: var(--ink); line-height: 1; font-family: var(--font-display); }

.chart-card { margin: 20px 0; }
.chart-card h3 { margin: 0 0 2px; color: var(--ink); }
.chart-card .chart-subtitle { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 16px; font-family: var(--font-body); }
.chart-card .empty-state { color: var(--ink-soft); font-size: 0.9rem; padding: 20px 0; text-align: center; }

.bar-chart-row {
  display: grid;
  grid-template-columns: minmax(80px, 160px) 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px; /* the 2px surface gap between adjacent bars */
}
.bar-chart-row .bar-label { font-size: 0.85rem; color: var(--ink); text-align: right; }
.bar-chart-row .bar-value { font-size: 0.85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; min-width: 2ch; }
.bar-track { position: relative; height: 24px; }
.bar-track svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bar-track rect { cursor: pointer; }
.bar-track rect:hover, .bar-track rect:focus { opacity: 0.85; outline: none; }

.trend-chart-wrap { position: relative; }
.trend-chart-wrap svg { display: block; width: 100%; height: auto; }

.viz-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--ink);
  color: var(--cream-ink);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.viz-tooltip.visible { opacity: 1; }
.viz-tooltip .tooltip-value { font-weight: 700; font-size: 0.95rem; }
.viz-tooltip .tooltip-label { color: #e2d6c2; }

.table-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  font-family: var(--font-body);
  font-weight: 600;
}
.chart-table { display: none; margin-top: 10px; }
.chart-table.visible { display: block; }
.chart-table table { font-size: 0.85rem; }

/* "Where to report this" section under a Know Your Rights result (legal.js). */
.report-where { margin-top: 36px; }
.report-where h2 { margin: 0 0 6px; }
.report-where-intro { color: var(--ink-soft); margin: 0 0 4px; }
.report-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin: 16px 0;
}
.report-channel { margin: 0; display: flex; flex-direction: column; }
.report-channel h3 { margin: 0 0 8px; font-size: 1.1rem; }
.report-channel p { margin: 0 0 14px; font-size: 0.93rem; }
.report-channel-contacts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.report-channel-phone { color: var(--ink); text-decoration: none; font-size: 0.92rem; overflow-wrap: anywhere; }
.report-channel-phone strong { color: var(--primary); }
.report-channel-phone:hover strong { text-decoration: underline; }
.report-channel-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.report-channel-links .btn-secondary { padding: 9px 14px; font-size: 0.85rem; }
.report-where .notice.crisis a { color: inherit; font-weight: 800; }

/* report.html option chooser: three full-width rows, each opening its own
   page (report.html?to=...). */
.report-lead { color: var(--ink-soft); margin: 0 0 22px; font-size: 1rem; }
.route-cards { display: flex; flex-direction: column; gap: 18px; margin-bottom: 12px; }
/* Two-tone rectangles in the landing page card shape: dusty-rose title strip
   over a white body. */
.route-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(58, 12, 15, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.route-card:hover,
.route-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 12px 22px rgba(58, 12, 15, 0.22);
}
.route-card-title {
  margin: 0;
  background: var(--surface-accent);
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  padding: 16px 24px;
  text-align: center;
}
.route-card-body { padding: 16px 28px 18px; text-align: center; }
.route-card-text {
  margin: 0 auto 10px;
  max-width: 640px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.6;
  opacity: 0.9;
}
.route-card-cta {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.route-card:hover .route-card-cta { opacity: 1; transform: translateX(4px); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes routeCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
  /* animation only sets the entrance; "backwards" fill hands transform back
     to the hover transition once it finishes */
  .route-card { animation: routeCardIn 0.5s ease backwards; }
  .route-card:nth-child(2) { animation-delay: 0.08s; }
  .route-card:nth-child(3) { animation-delay: 0.16s; }
  .report-route-panel:not([hidden]), #report-form:not([hidden]) { animation: routeCardIn 0.45s ease backwards; }
}

.route-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}
.route-back svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.route-back:hover svg { transform: translateX(-3px); }
.report-route-panel h1 { margin-top: 0; }
.report-route-panel .report-channel-links { margin-top: 0; }

@media (max-width: 560px) {
  .route-card-title { font-size: 1.12rem; padding: 14px 18px; }
  .route-card-body { padding: 14px 18px 16px; }
  .route-card-text { font-size: 0.93rem; }
}


/* Site footer: a proper three-column footer on the site's maroon, instead of
   the single grey sentence it used to be. */
footer.site {
  background: var(--header-bg);
  color: var(--cream-ink);
  text-align: left;
  padding: 40px 0 20px;
  margin-top: 0; /* the maroon block is its own separation, no cream gap needed */
  font-size: 0.88rem;
}
/* Footer spans wider than the 960px reading column so the columns do not sit
   in a narrow strip with large empty margins on a wide screen. */
footer.site .container { max-width: 1240px; padding: 0 40px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}
/* Hairlines between the columns, so the three blocks read as one footer
   rather than three stray lists floating in the maroon. */
.footer-links, .footer-contact {
  border-left: 1px solid rgba(243, 231, 203, 0.18);
  padding-left: 48px;
}
.footer-brand h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  color: var(--cream-ink);
}
.footer-brand p {
  margin: 0;
  max-width: 46ch;
  line-height: 1.6;
  opacity: 0.85;
}
.footer-links h4, .footer-contact h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  margin: 0 0 14px;
  color: var(--accent);
}
.footer-links a, .footer-contact a {
  display: block;
  color: var(--cream-ink);
  text-decoration: none;
  opacity: 0.85;
  padding: 4px 0;
  overflow-wrap: anywhere;
}
.footer-links a:hover, .footer-contact a:hover { opacity: 1; text-decoration: underline; }
/* The per-page line ("this is not legal advice", etc.) */
.footer-note {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(243, 231, 203, 0.22);
  text-align: center;
  opacity: 0.8;
  font-size: 0.84rem;
}
.footer-note a { color: var(--cream-ink); }
.footer-copyright {
  margin-top: 14px;
  padding-top: 0;
  border-top: none;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}
.footer-copyright a { color: inherit; text-decoration: underline; }

@media (max-width: 760px) {
  footer.site { padding-top: 34px; }
  /* back to the page's own side padding on phones */
  footer.site .container { padding: 0 24px; }
  /* Stacked columns read better centred, matching the rest of the phone
     layout, instead of a left-aligned list down one edge. */
  footer.site { text-align: center; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-links, .footer-contact { border-left: none; padding-left: 0; }
  .footer-brand p { max-width: none; margin-inline: auto; font-size: 0.95rem; }
  .footer-brand h3 { font-size: 1.6rem; }
  .footer-links a, .footer-contact a { font-size: 0.95rem; padding: 6px 0; }
  .footer-links h4, .footer-contact h4 { font-size: 1.1rem; }
}

/* Classes that set display (flex rows, inline-flex links) would otherwise
   override the hidden attribute the report page toggles. */
[hidden] { display: none !important; }
