/* ==========================================================================
   FlightBrief — main.css
   Shared styles for every page. Header, nav and footer markup are injected
   by assets/js/site-nav.js, so style changes here apply site-wide.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c232d;
  --border: #2a323d;
  --text: #e6edf3;
  --muted: #8b96a3;
  --accent: #3fb6ff;      /* instrument blue */
  --accent-ink: #04121c;  /* text on accent */
  --accent-2: #f5b942;    /* caution amber */
  --ok: #3ddc84;
  --warn: #ff6b6b;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;

  --maxw: 1100px;
  --gutter: 20px;
  --header-h: 68px;

  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(rgba(63,182,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63,182,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 200;
}
.skip-link:focus { left: 8px; }

/* ---------- 3. Header & nav (injected by site-nav.js) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(13,17,23,.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo img { width: 32px; height: 32px; }
.logo .dot { color: var(--accent); }

.nav-wrap { display: flex; align-items: center; gap: 16px; }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .95rem;
  color: var(--muted);
}
.site-nav a:hover {
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent);
}

/* Dropdowns */
.site-nav .has-sub { position: relative; }
.site-nav .sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font: inherit;
  font-weight: 500;
  font-size: .95rem;
  color: var(--muted);
  cursor: pointer;
}
.site-nav .sub-toggle:hover,
.site-nav .has-sub.open > .sub-toggle { color: var(--text); background: var(--panel); }
.site-nav .sub-toggle.is-current { color: var(--accent); }
.site-nav .sub-toggle::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s;
}
.site-nav .has-sub.open > .sub-toggle::after { transform: rotate(-135deg) translateY(-1px); }

.site-nav .submenu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 250px;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.site-nav .has-sub.open > .submenu { display: flex; }

/* Status pill (shown while body has data-status="construction") */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-2);
  border: 1px solid rgba(245,185,66,.4);
  background: rgba(245,185,66,.08);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pill::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* Hamburger */
.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  cursor: pointer;
  position: relative;
}
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  position: absolute;
  left: 11px;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
  content: "";
}
.menu-toggle span { top: 19px; }
.menu-toggle span::before { left: 0; top: -6px; }
.menu-toggle span::after  { left: 0; top: 6px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 4. Main content ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px var(--gutter) 48px;
}

.eyebrow {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; }
h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.025em;
  margin-bottom: 20px;
}
h1 em { font-style: italic; font-weight: 300; color: var(--accent); }
h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }

p + p { margin-top: 1em; }

.hero { max-width: 720px; }
.lead {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 600px;
}

.section { margin-top: 56px; }

/* ---------- 5. Components ---------- */

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 48px 0 16px;
}
.tab {
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active,
.tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Tile grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.tile {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 500;
  font-size: .95rem;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
a.tile:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.tile small {
  display: block;
  font-weight: 400;
  font-size: .75rem;
  color: var(--muted);
  margin-top: 2px;
}
.tile.pending::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.05) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 3.2s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* Card */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }

/* Status log / changelog */
.log {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 720px;
}
.log h2 {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  padding: 14px 18px;
  margin: 0;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.log ul { list-style: none; }
.log li {
  display: flex;
  gap: 16px;
  padding: 12px 18px;
  font-size: .95rem;
  border-bottom: 1px solid var(--border);
}
.log li:last-child { border-bottom: 0; }
.log time {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.cta { margin-top: 40px; font-size: 1.05rem; color: var(--muted); }
.cta strong { color: var(--text); font-weight: 600; }

/* ---------- 6. Footer (injected by site-nav.js) ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- 7. Responsive ---------- */
@media (max-width: 860px) {
  .menu-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 10px var(--gutter) 16px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav-open .site-nav { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a, .site-nav .sub-toggle { width: 100%; padding: 12px 14px; justify-content: space-between; }

  .site-nav .submenu {
    position: static;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--border);
    border-radius: 0;
    margin: 2px 0 6px 14px;
    padding: 0 0 0 8px;
    background: none;
  }
}

@media (max-width: 560px) {
  main { padding-top: 40px; }
  .status-pill { display: none; }
  .log li { flex-direction: column; gap: 2px; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}

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

/* ==========================================================================
   8. Nav "Soon" items
   ========================================================================== */
.site-nav .nav-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  font-weight: 500;
  font-size: .95rem;
  color: #56606c;
  white-space: nowrap;
  cursor: default;
}
.site-nav .nav-soon em {
  font-style: normal;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 7px;
}

/* ==========================================================================
   9. Tool page components (forms, link cards, checklists, references, video)
   ========================================================================== */

/* Page header for tool pages */
.page-head { max-width: 760px; margin-bottom: 32px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.reg-quote {
  margin-top: 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-size: .92rem;
  font-style: italic;
}
.reg-quote strong { color: var(--text); font-style: normal; font-weight: 600; }

.section-head { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { color: var(--muted); font-size: .95rem; }

/* Form fields */
.field-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.field { flex: 1; min-width: 150px; }
.field label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color .15s;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field input::placeholder { color: #4b5562; font-weight: 400; letter-spacing: .02em; text-transform: none; }

/* Link cards (resource links with a category stripe) */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}
.link-card {
  --cat: var(--accent);
  display: block;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 14px 20px;
  color: var(--text);
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.link-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cat);
}
.link-card:hover { border-color: var(--cat); transform: translateY(-1px); text-decoration: none; }
.link-card h3 { font-size: .98rem; font-weight: 600; margin-bottom: 2px; }
.link-card p { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.link-card .tag {
  display: inline-block;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cat);
  margin-bottom: 6px;
}
.link-card.is-disabled { opacity: .55; }
.cat-weather  { --cat: var(--accent); }
.cat-airspace { --cat: var(--accent-2); }
.cat-atc      { --cat: var(--ok); }
.cat-obs      { --cat: #b48cff; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--cat); }

/* Progress bar */
.progress {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
  font-size: .85rem;
  color: var(--muted);
}
.progress-track { flex: 1; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  border-radius: 4px;
  transition: width .35s ease;
}
.progress-label { min-width: 42px; text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

/* Checklist groups */
.check-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.check-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: none;
  border: 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.check-head:hover { background: var(--panel-2); }
.check-head .code {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(63,182,255,.1);
  border-radius: 4px;
  padding: 3px 7px;
  font-variant-numeric: tabular-nums;
}
.check-head h3 { flex: 1; font-size: 1rem; margin: 0; }
.check-head .when { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.check-head .count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.check-head .count.done { color: var(--ok); }
.check-head .chev {
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s;
  margin-left: 4px;
}
.check-group.open .chev { transform: rotate(-135deg); }

.check-items { display: none; list-style: none; border-top: 1px solid var(--border); }
.check-group.open .check-items { display: block; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(42,50,61,.6);
  cursor: pointer;
  font-size: .93rem;
}
.check-item:last-child { border-bottom: 0; }
.check-item:hover { background: rgba(255,255,255,.02); }
.check-item input { position: absolute; opacity: 0; pointer-events: none; }
.check-item .box {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 1px;
  border: 2px solid #3b4552;
  border-radius: 5px;
  display: grid;
  place-items: center;
  transition: background .15s, border-color .15s;
}
.check-item .box::after {
  content: "";
  width: 5px; height: 10px;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(45deg) translate(-1px, -1px);
}
.check-item input:checked + .box { background: var(--ok); border-color: var(--ok); }
.check-item input:checked + .box::after { border-color: var(--accent-ink); }
.check-item input:checked ~ .text { color: var(--muted); text-decoration: line-through; text-decoration-color: #4b5562; }
.check-item input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Reference list */
.ref-list {
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.ref-list li { padding: 12px 18px; border-bottom: 1px solid var(--border); }
.ref-list li:last-child { border-bottom: 0; }
.ref-list a { font-weight: 600; font-size: .95rem; }
.ref-list p { font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* Video grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.video-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.video-embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card .info { padding: 12px 16px 14px; }
.video-card h3 { font-size: .95rem; margin-bottom: 4px; }
.video-card p { font-size: .8rem; color: var(--muted); line-height: 1.4; }

@media (max-width: 560px) {
  .field-row { flex-direction: column; align-items: stretch; }
  .field { min-width: 0; }
  .progress { flex-wrap: wrap; }
  .progress-track { flex-basis: 100%; order: 3; }
}

/* ==========================================================================
   10. Print — tool pages print just their checklist
   ========================================================================== */
.print-only { display: none; }
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .skip-link, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .check-group { border: 1px solid #bbb; background: #fff; break-inside: avoid; }
  .check-head { color: #000; padding: 8px 12px; }
  .check-head .chev { display: none; }
  .check-items { display: block !important; border-top: 1px solid #bbb; }
  .check-item { padding: 6px 12px; color: #000; border-bottom: 1px solid #eee; }
  .check-item .box { border-color: #777; }
  .check-item input:checked + .box { background: #2D8659; border-color: #2D8659; }
  .check-item input:checked ~ .text { color: #888; }
  .check-head .code { color: #000; background: none; padding: 0; }
}

/* ==========================================================================
   11. Shared tool-page helpers
   ========================================================================== */
.field input.plain { text-transform: none; letter-spacing: .01em; font-weight: 500; font-size: 1rem; }
.field input[type="date"] { color-scheme: dark; }
.small-note { font-size: .82rem; color: var(--muted); }
.src-note { margin-top: 40px; font-size: .8rem; color: var(--muted); }

/* Selectable pills (go / caution / no-go) */
.pill-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-opt {
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.pill-opt:hover { color: var(--text); border-color: #3b4552; }
.pill-opt[aria-pressed="true"].t-go      { color: var(--ok);       border-color: var(--ok);       background: rgba(61,220,132,.1); }
.pill-opt[aria-pressed="true"].t-caution { color: var(--accent-2); border-color: var(--accent-2); background: rgba(245,185,66,.1); }
.pill-opt[aria-pressed="true"].t-nogo    { color: var(--warn);     border-color: var(--warn);     background: rgba(255,107,107,.1); }

/* ==========================================================================
   12. PAVE checklist (pave.html)
   ========================================================================== */
.pave-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 32px 0 20px;
}
.pave-tab {
  --c: var(--accent);
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pave-tab:hover { border-color: #3b4552; }
.pave-tab[aria-selected="true"] { border-color: var(--c); background: var(--panel-2); box-shadow: inset 0 -3px 0 var(--c); }
.pave-tab .letter { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--c); }
.pave-tab .word { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pave-tab[aria-selected="true"] .word { color: var(--text); }
.pave-tab .meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pave-tab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.pave-tab[data-tier="go"] .dot      { background: var(--ok); }
.pave-tab[data-tier="caution"] .dot { background: var(--accent-2); }
.pave-tab[data-tier="nogo"] .dot    { background: var(--warn); }
.c-p { --c: var(--ok); }
.c-a { --c: var(--accent-2); }
.c-v { --c: var(--accent); }
.c-e { --c: var(--warn); }

.pave-panel[hidden] { display: none; }
.pave-panel .section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pave-panel .section-head .count { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pave-tip {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-left: 3px solid var(--c, var(--accent));
  background: var(--panel);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .88rem;
  color: var(--muted);
}

.pave-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.pave-item[data-tier="caution"] { border-color: rgba(245,185,66,.45); }
.pave-item[data-tier="nogo"]    { border-color: rgba(255,107,107,.5); }
.pave-item .q { font-weight: 500; margin-bottom: 12px; }
.pave-item .advice {
  display: none;
  margin-top: 12px;
  padding: 9px 12px;
  border-left: 3px solid var(--border);
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .88rem;
  color: var(--muted);
}
.pave-item .advice.show { display: block; }
.pave-item[data-tier="caution"] .advice { border-left-color: var(--accent-2); }
.pave-item[data-tier="nogo"] .advice    { border-left-color: var(--warn); }
.pave-next { margin-top: 8px; display: flex; justify-content: flex-end; }

/* Fixed verdict bar */
body.has-verdict main { padding-bottom: 40px; }
body.has-verdict .site-footer { padding-bottom: 96px; }
.verdict-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  padding: 0 var(--gutter) 14px;
  pointer-events: none;
}
.verdict-bar .inner {
  pointer-events: auto;
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(22,27,34,.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.verdict-bar .gauge { flex: 0 0 auto; width: 88px; height: 52px; }
.verdict-bar .verdict { flex: 1; min-width: 0; }
.verdict-bar .status { font-size: 1.15rem; font-weight: 800; letter-spacing: .01em; color: var(--muted); }
.verdict-bar .status[data-tier="go"]      { color: var(--ok); }
.verdict-bar .status[data-tier="caution"] { color: var(--accent-2); }
.verdict-bar .status[data-tier="nogo"]    { color: var(--warn); }
.verdict-bar .sub { font-size: .8rem; color: var(--muted); }
.verdict-bar .bar-actions { display: flex; gap: 8px; }
.verdict-bar .btn { padding: 8px 14px; font-size: .85rem; }

@media (max-width: 560px) {
  .pave-tabs { gap: 6px; }
  .pave-tab .word { font-size: .56rem; letter-spacing: .04em; }
  .verdict-bar .gauge { width: 64px; height: 38px; }
  .verdict-bar .inner { gap: 10px; padding: 10px 12px; }
  .verdict-bar .status { font-size: 1rem; }
  .verdict-bar #paveReset { display: none; }
}

/* ==========================================================================
   13. Hazardous Attitude Inventory (hazardous-attitudes.html)
   ========================================================================== */
.hai-view[hidden] { display: none; }
.hai-steps { padding-left: 20px; margin-bottom: 12px; }
.hai-steps li { margin-bottom: 6px; }

.choice-set { display: grid; gap: 10px; margin: 6px 0 18px; }
.choice {
  font: inherit;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.choice:hover { border-color: #3b4552; }
.choice[aria-checked="true"] { border-color: var(--accent); background: rgba(63,182,255,.07); }
.choice .radio { flex: 0 0 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2px solid #3b4552; }
.choice[aria-checked="true"] .radio { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--bg); background: var(--accent); }
.choice strong { display: block; font-weight: 600; }
.choice small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }

.hai-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.hai-top .eyebrow { margin: 0; }
.hai-bar { height: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 18px; }
.hai-bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--ok)); transition: width .25s; }
.hai-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(245,185,66,.4);
  border-radius: 999px;
  padding: 2px 8px;
}
.hai-scenario { font-size: 1.02rem; }
.hai-prompt { font-weight: 600; margin-top: 16px; }

.rank-opts { display: grid; gap: 10px; margin: 14px 0 8px; }
.rank-opt {
  font: inherit;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  min-height: 56px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rank-opt:hover { border-color: #3b4552; }
.rank-opt.ranked { border-color: var(--accent); background: rgba(63,182,255,.07); }
.rank-opt.implied { border-style: dashed; }
.rank-opt .badge {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #3b4552;
  color: var(--muted);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rank-opt.ranked .badge { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rank-opt .body { flex: 1; }
.rank-opt .ltr { font-weight: 700; margin-right: 4px; color: var(--muted); }
.rank-opt .rank-label { display: block; margin-top: 3px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hai-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hai-nav .right { display: flex; gap: 8px; }
.btn.link { border-color: transparent; background: transparent; color: var(--muted); }
.btn.link:hover { color: var(--text); filter: none; }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }

.hai-callout {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(245,185,66,.4);
  border-left: 4px solid var(--accent-2);
  background: rgba(245,185,66,.07);
  border-radius: var(--radius-lg);
}
.hai-callout h3 { color: var(--accent-2); margin-bottom: 6px; }
.hai-callout p { margin: 4px 0 0; }
.thought { font-style: italic; color: var(--muted); }

.score-bars { display: grid; gap: 14px; margin-top: 10px; }
.score-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.score-head .name { font-weight: 600; }
.score-head .name small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.score-head .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.score-head .val small { font-weight: 400; color: var(--muted); }
.score-track { height: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.score-fill { height: 100%; background: #4a5d75; border-radius: 6px; }
.score-row.is-top .name, .score-row.is-top .val { color: var(--accent-2); }
.score-row.is-top .score-fill { background: var(--accent-2); }

.att { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.att:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.att h3 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.att h3 .thought { font-weight: 400; font-size: .95rem; }
.att h3 .pts { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.att p { color: var(--muted); font-size: .93rem; margin-bottom: 8px; }
.antidote {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(61,220,132,.1);
  border: 1px solid rgba(61,220,132,.35);
  color: var(--ok);
  font-weight: 600;
  font-size: .9rem;
}

.card + .card { margin-top: 16px; }
.card details summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.score-table { border-collapse: collapse; width: 100%; font-size: .85rem; font-variant-numeric: tabular-nums; }
.score-table th, .score-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: center; }
.score-table th { font-weight: 600; color: var(--muted); }
.score-table th small { font-weight: 400; }
.score-table th:first-child, .score-table td:first-child { text-align: left; }
.score-table tfoot td { font-weight: 700; border-bottom: 0; }

/* ==========================================================================
   14. Print — PAVE and Hazardous Attitudes
   ========================================================================== */
@media print {
  body.has-verdict main { padding-bottom: 0; }
  body.has-verdict .site-footer { padding-bottom: 0; }
  .verdict-bar, .pave-tabs, .pave-next { display: none !important; }
  .pave-panel, .pave-panel[hidden] { display: block !important; margin-bottom: 14px; }
  .pave-panel .section-head h2 { font-size: 1.05rem; }
  .pave-tip, .pave-item, .card, .hai-callout { background: #fff; color: #000; border-color: #bbb; }
  .pave-item { padding: 8px 12px; margin-bottom: 6px; break-inside: avoid; }
  .pave-item .q { margin-bottom: 6px; font-size: .9rem; }
  .pill-opt { background: #fff; color: #555; border-color: #ccc; padding: 3px 10px; font-size: .78rem; }
  .pill-opt[aria-pressed="true"] { -webkit-print-color-adjust: exact; print-color-adjust: exact; font-weight: 700; }
  .pill-opt[aria-pressed="true"].t-go      { color: #1e7a46; border-color: #1e7a46; background: #e6f4ec; }
  .pill-opt[aria-pressed="true"].t-caution { color: #8a5a00; border-color: #b77a00; background: #fbf1dc; }
  .pill-opt[aria-pressed="true"].t-nogo    { color: #a12a24; border-color: #a12a24; background: #fbe6e5; }
  .pave-item .advice { background: #fff; color: #333; }
  .print-head { margin-bottom: 14px; }
  .print-head h1 { font-size: 1.5rem; margin-bottom: 4px; color: #000; }
  .print-head p { font-size: .85rem; color: #333; margin: 0; }
  .print-verdict { font-weight: 800; }

  .hai-callout h3, .score-row.is-top .name, .score-row.is-top .val { color: #8a5a00; }
  .card h2, .card h3, .att h3, .score-head .name { color: #000; }
  .att p, .thought, .src-note { color: #333; }
  .score-track { background: #fff; border-color: #bbb; }
  .score-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #8a9bb0; }
  .score-row.is-top .score-fill { background: #d99a1f; }
  .antidote { background: #fff; color: #1e7a46; border-color: #1e7a46; }
  .score-table th, .score-table td { border-color: #ccc; color: #000; }
  .card details > * { display: block; }
}
