:root {
  /* Political Drama Palette */
  --bg: #12100E;           /* Deep charcoal/earth */
  --panel: #1E1A17;        /* Warm dark brown-grey */
  --panel-alt: #2D2622;    /* Slightly lighter for cards */
  --border: #423832;       /* Distinct but warm border */
  --text: #F0E6D8;         /* Warm Ivory (AA+) */
  --text-dim: #B3A89D;     /* Muted Ash (AA) */
  --accent: #D95C27;       /* Dramatic Terracotta/Saffron */
  --accent-dim: #993B1F;   /* Deep Saffron */
  --positive: #559E6D;     /* Subdued green */
  --negative: #D14949;     /* Brick red */
  
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --base-size: 16px;
  
  /* Safe Area / Shell Tokens */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --nav-height: calc(64px + var(--sab));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--base-size);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

/* App Shell (Mobile First + Desktop Graceful Upgrade) */
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding: 0 1rem calc(var(--nav-height) + 2rem);
  background: var(--bg);
  box-shadow: 0 0 20px rgba(0,0,0,0.5); /* Defines edges on desktop */
}

/* Sticky Header */
.header-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(1rem + var(--sat)) 0 0.75rem;
  margin: 0 -1rem 1.25rem;
  padding-left: 1rem;
  padding-right: 1rem;
  background: rgba(18, 16, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

h1, h2, h3 { font-weight: 600; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h1 { font-size: 1.4rem; color: var(--text); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }

p { margin: 0.4rem 0; color: var(--text-dim); }

.portrait-thumb { line-height: 0; flex-shrink: 0; }
.portrait-thumb svg { display: block; border-radius: 8px; border: 1px solid var(--border); }
#portrait-preview { line-height: 0; }
#portrait-preview svg { display: block; border-radius: 12px; border: 1px solid var(--border); }

.header-bar .tag { color: var(--accent); font-size: 0.85rem; font-weight: 500; border: none; padding: 0; }

.disclaimer {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.card.clickable { cursor: pointer; transition: border-color 0.2s, transform 0.1s; }
.card.clickable:active { transform: scale(0.98); }
.card.clickable:hover { border-color: var(--accent-dim); }

button, .btn {
  font-family: var(--font);
  background: var(--accent);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s;
}
button:active { opacity: 0.8; }
button:disabled { background: var(--panel-alt); color: var(--text-dim); cursor: not-allowed; border: 1px solid var(--border); }
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.danger { background: var(--negative); color: #fff; }
button.btn-small { padding: 0.4rem 0.8rem; font-size: 0.85rem; width: auto; }

/* FB-050 — a .button-row groups adjacent CTAs with a real gap. It was never
   defined, so full-width (width:100%) stacked buttons touched edge-to-edge (e.g.
   the profile card's Save / Skip). Full-width children each wrap to their own row
   separated by the gap; auto-width buttons (.btn-small) sit inline with the same
   gap. Use .button-row.stack to force a single column. Used on ~8 screens. */
.button-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.button-row.stack { flex-direction: column; align-items: stretch; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.4rem; font-weight: 500; }
input[type="text"], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
}
input[type="range"] { width: 100%; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-dim);
  background: var(--panel);
  font-weight: 500;
}
.chip.selected { border-color: var(--accent); color: var(--accent); background: rgba(217,92,39,0.15); }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.metric { background: var(--panel); border-radius: 12px; padding: 0.8rem; border: 1px solid var(--border); }
.metric .label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 0.2rem; }
.metric .value { font-size: 1.2rem; font-weight: 700; color: var(--text); }

.urgency-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  display: inline-block;
  font-weight: 600;
}

.option-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  background: var(--panel-alt);
}
.option-card:active { border-color: var(--accent); background: var(--panel); }
.option-card .label { font-weight: 600; margin-bottom: 0.4rem; color: var(--text); }

.effect-tag {
  display: inline-block;
  font-size: 0.75rem;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  margin: 0.25rem 0.35rem 0 0;
  font-weight: 500;
}
.effect-tag.positive { color: var(--positive); border: 1px solid rgba(85, 158, 109, 0.4); background: rgba(85, 158, 109, 0.1); }
.effect-tag.negative { color: var(--negative); border: 1px solid rgba(209, 73, 73, 0.4); background: rgba(209, 73, 73, 0.1); }

.brief-mood { font-style: italic; color: var(--text); font-size: 1.05rem; line-height: 1.6; }
.brief-headlines { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.brief-headlines li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.brief-headlines li:last-child { border-bottom: none; }

.error-banner, .info-banner, .pacing-locked-banner {
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 500;
}
.error-banner { background: rgba(209, 73, 73, 0.15); border: 1px solid var(--negative); color: #FFA3A3; }
.info-banner { background: var(--panel); border: 1px solid var(--border); color: var(--text); border-left: 4px solid var(--text-dim); }
.pacing-locked-banner { background: rgba(217, 92, 39, 0.1); border: 1px solid var(--accent-dim); color: var(--accent); }

.return-brief { border-left: 4px solid var(--accent); }
.return-brief.return-brief-danger { border-left-color: var(--negative); }
.return-brief-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.return-brief-head button { flex: 0 0 auto; width: auto; padding: 0.4rem 0.8rem; }

.section-desc { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; margin: -0.15rem 0 1rem; }

.loading { color: var(--accent); font-weight: 500; padding: 3rem 0; text-align: center; font-size: 1.1rem; }

.result-panel { background: var(--panel); border-radius: 12px; padding: 1.2rem; margin: 1rem 0; border: 1px solid var(--border); }
.result-panel .flag { color: var(--accent); font-size: 0.9rem; font-weight: 600; text-transform: uppercase; }

.step-nav { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }
.step-nav button { flex: 1; }

/* In-Flow Tab Description */
.tab-description {
  margin: 0 0 1.5rem;
  padding: 1rem;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.tab-description p { margin: 0; font-size: 0.95rem; color: var(--text); line-height: 1.5; }
.tab-description .tab-options { margin: 0.6rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; color: var(--text-dim); }
.tab-description .tab-options li { margin: 0.3rem 0; }
.tab-description .tab-lag-note { margin-top: 0.6rem; font-size: 0.85rem; font-style: italic; color: var(--accent); }

.tag { display: inline-block; font-size: 0.8rem; color: var(--text-dim); border: 1px solid var(--border); border-radius: 6px; padding: 0.2rem 0.5rem; font-weight: 500; }
.tag.positive { color: var(--positive); border-color: rgba(85, 158, 109, 0.5); }
.tag.negative { color: var(--negative); border-color: rgba(209, 73, 73, 0.5); }
/* FB-048 — a re-surfaced profile prompt is required to advance the day. */
.tag.tag-required { color: var(--negative); border-color: rgba(209, 73, 73, 0.5); background: rgba(209, 73, 73, 0.08); }
.card.pc-mandatory { border-color: rgba(209, 73, 73, 0.55); }
.pc-required-note { color: var(--negative); font-weight: 500; margin-top: 0; }
.text-dim { color: var(--text-dim); font-size: 0.9rem; }

/* Data Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; white-space: nowrap; }
.data-table th { text-align: left; color: var(--text-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.6rem; border-bottom: 1px solid var(--border); }
.data-table td { padding: 0.8rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }

/* Progress Bars */
.approval-bar-track { display: inline-block; width: 80px; height: 10px; background: var(--bg); border-radius: 5px; overflow: hidden; vertical-align: middle; margin-right: 0.6rem; border: 1px solid var(--border); }
.approval-bar-fill { height: 100%; background: var(--accent); border-radius: 5px; }
.approval-bar-value { font-size: 0.9rem; color: var(--text); font-weight: 600; }

.roster-header { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.relationship-value { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.relationship-value.positive { color: var(--positive); }
.relationship-value.negative { color: var(--negative); }

.memory-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.memory-list li { font-size: 0.9rem; color: var(--text-dim); padding: 0.3rem 0 0.3rem 1rem; position: relative; }
.memory-list li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

input[type="file"] { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text-dim); border-radius: 8px; padding: 0.8rem; font-family: var(--font); font-size: 0.9rem; }

.manifesto-option { display: block; position: relative; padding: 0.5rem 0 0.5rem 2.5rem; }
.manifesto-option input[type="checkbox"] { position: absolute; left: 0.8rem; top: 0.8rem; width: 1.2rem; height: 1.2rem; accent-color: var(--accent); }
.manifesto-option.selected { background: rgba(217,92,39,0.1); border-radius: 8px; }

.checklist-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.5rem 0; color: var(--text-dim); font-size: 0.95rem; }
.checklist-row.done { color: var(--text); font-weight: 500; }
.checklist-mark { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--border); font-size: 0.85rem; flex-shrink: 0; }
.checklist-row.done .checklist-mark { border-color: var(--positive); color: var(--positive); background: rgba(85, 158, 109, 0.1); }

/* Bottom Navigation Shell (Mobile-First) */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(18, 16, 14, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: var(--sab);
  z-index: 100;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.5);
}
.app-bottom-nav a, .app-bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-dim);
  background: transparent;
  border: none;
  padding: 0.5rem 0;
  font-size: 0.7rem;
  font-weight: 600;
  height: 100%;
}
.app-bottom-nav a.active, .app-bottom-nav button.active { color: var(--accent); }
.app-bottom-nav svg { width: 24px; height: 24px; margin-bottom: 4px; stroke-width: 2; }

/* "More" Overflow Sheet */
.more-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.more-sheet-overlay.open { opacity: 1; pointer-events: auto; }
.more-sheet-content {
  background: var(--bg);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 1.5rem 1rem calc(2rem + var(--sab));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.more-sheet-overlay.open .more-sheet-content { transform: translateY(0); }
.more-sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.more-sheet-header h3 { margin: 0; font-size: 1.2rem; color: var(--text); }
.more-sheet-close { background: var(--panel-alt); color: var(--text); padding: 0.4rem; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.nav-group { margin-bottom: 1.5rem; }
.nav-group-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-dim); margin-bottom: 0.5rem; font-weight: 700; padding-left: 0.5rem; }
.nav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.nav-grid a {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-grid a.active { border-color: var(--accent); background: rgba(217,92,39,0.1); color: var(--accent); }

/* Band Gauge */
.adv-gauge { display: flex; gap: 4px; margin: 0.5rem 0 1rem; }
.adv-seg { flex: 1; text-align: center; padding: 0.5rem 0.25rem; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text-dim); font-size: 0.8rem; opacity: 0.6; }
.adv-seg.active { background: var(--accent-dim); border-color: var(--accent); color: var(--text); font-weight: 700; opacity: 1; }

@media (min-width: 600px) {
  #app {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    padding-bottom: calc(var(--nav-height) + 1rem);
    min-height: auto;
  }
  .header-bar { border-top-left-radius: 20px; border-top-right-radius: 20px; }
  .app-bottom-nav { max-width: 430px; margin: 0 auto; left: 0; right: 0; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; position: absolute; }
  .more-sheet-overlay { position: absolute; border-radius: 20px; overflow: hidden; }
}

/* FB-044 follow-up — restore rule blocks the mobile-first CSS swap dropped
   (persona popup FB-038, how-to-play/adv-seg-label FB-040, state-map FB-2C.1).
   These screens depend on them; pulled verbatim from the pre-FB-044 stylesheet. */
.persona-overlay {
  position: fixed; inset: 0; z-index: 1000; padding: 1rem;
  background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; }
.persona-modal { max-width: 520px; width: 100%; }
.persona-blurb { font-size: 1rem; line-height: 1.55; margin: 0.6rem 0 1.1rem; }
/* FB-040 — the tier-scoped "how to play" list in the Advancement tab. */
.how-to-play { line-height: 1.65; padding-left: 1.15rem; margin: 0.4rem 0 0; }
.how-to-play li { margin: 0.25rem 0; }
/* --- political map (task 2C.1) -------------------------------------------------------- */

.map-caption { font-size: 0.85rem; margin-bottom: 0.9rem; }
.state-map-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh; }
.state-map-outline {
  fill: var(--panel-alt);
  stroke: var(--border);
  stroke-width: 1.5; }
.map-legend { display: flex; flex-direction: column; gap: 0.4rem; }
.map-legend-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem; }
.map-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block; }
.map-legend-label { flex: 1; color: var(--text); }
.map-legend-count { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.adv-seg-label { white-space: nowrap; }


/* FB-046 — dashboard floating attention ring, skip-day subtext, and the
   first-few-resolutions consequence star pop-up. */
.attention-float {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--nav-height) + 0.75rem);
  z-index: 900;
  width: 62px; height: 62px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--panel); border: 2px solid var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  line-height: 1;
}
.attention-float-num { font-size: 1.15rem; font-weight: 700; color: var(--accent); }
.attention-float-den { font-size: 0.7rem; color: var(--text-dim); }
.attention-float-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-top: 2px; }
.skip-subtext { font-size: 0.8rem; color: var(--text-dim); margin: 0.5rem 0 0; line-height: 1.5; }

.consequence-list { margin: 0.75rem 0 1rem; }
.consequence-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.consequence-row:last-child { border-bottom: none; }
.consequence-dim { color: var(--text); }
.consequence-stars { font-size: 1.05rem; letter-spacing: 1px; white-space: nowrap; }
.consequence-stars.positive { color: var(--positive); }
.consequence-stars.negative { color: var(--negative); }
.consequence-stars-empty { color: var(--border); }
.consequence-teach { font-size: 0.85rem; color: var(--text-dim); line-height: 1.55; margin: 0 0 1.1rem; }


/* FB-045 — the landing career ladder (Student → PM), current start highlighted. */
.career-ladder { margin-top: 0.5rem; }
.ladder-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ladder-rung {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.7rem; border-radius: 8px;
  background: var(--panel-alt); border: 1px solid var(--border);
}
.ladder-rung.current { border-color: var(--accent); background: rgba(198, 106, 60, 0.12); }
.ladder-tier { font-size: 0.7rem; font-weight: 700; color: var(--text-dim); width: 1.6rem; }
.ladder-rung.current .ladder-tier { color: var(--accent); }
.ladder-label { color: var(--text); font-size: 0.92rem; }


/* FB-047 — Ground Work redesign: attention meter, grouped tappable action cards,
   cost chips, soft over-spend caution, and the shared toast. */
.cost-chip {
  display: inline-block; white-space: nowrap;
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(198, 106, 60, 0.5); border-radius: 999px;
  padding: 0.15rem 0.6rem; background: rgba(198, 106, 60, 0.08);
}
.gw-meter { margin-bottom: 0.75rem; }
.gw-meter-label { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.35rem; }
.gw-meter-label strong { color: var(--accent); }
.gw-meter-track { height: 8px; border-radius: 999px; background: var(--panel-alt); overflow: hidden; }
.gw-meter-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.gw-caution {
  font-size: 0.85rem; color: var(--negative);
  background: rgba(209, 73, 73, 0.08); border: 1px solid rgba(209, 73, 73, 0.35);
  border-radius: 8px; padding: 0.5rem 0.7rem; margin-bottom: 0.75rem;
}
.gw-group { margin-bottom: 1rem; }
.gw-group-label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent-dim, var(--text-dim)); font-weight: 700; margin: 0.25rem 0 0.4rem;
}
.gw-card {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--panel-alt); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.7rem 0.85rem; margin-bottom: 0.5rem; cursor: pointer;
  transition: border-color 0.12s ease, transform 0.05s ease;
}
.gw-card:hover { border-color: var(--accent); }
.gw-card:active { transform: scale(0.99); }
.gw-card.disabled { opacity: 0.5; cursor: not-allowed; }
.gw-card-name { font-weight: 600; color: var(--text); }
.gw-card-effect { font-size: 0.82rem; margin-top: 0.15rem; }
.gw-seg { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.4rem; }
.gw-seg select { margin-left: 0.3rem; }
.gw-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; flex-shrink: 0; }
.gw-need { font-size: 0.72rem; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-height) + 1rem); transform: translate(-50%, 1rem);
  z-index: 1100; max-width: 88vw;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--accent); border-radius: 10px;
  padding: 0.7rem 1rem; font-size: 0.9rem; line-height: 1.4;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- Phase 5G — National dashboard + Legacy screen -------------------------- */
.lede-card p { color: var(--text); font-size: 0.95rem; line-height: 1.5; }

.hemicycle { display: block; width: 100%; max-width: 430px; height: auto; margin: 0.5rem auto 0.25rem; }
.hemicycle circle { transition: opacity 0.2s; }

.hung-note {
  color: var(--accent); font-size: 0.85rem; font-weight: 500;
  background: rgba(217, 92, 39, 0.12); border-radius: 8px; padding: 0.4rem 0.6rem; margin: 0 0 0.4rem;
}

.bench-legend { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.4rem; }
.bench-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.bench-swatch { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.bench-name { flex: 1 1 auto; color: var(--text); }
.bench-seats { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.tag.tag-you { color: var(--accent); border: none; padding: 0 0 0 0.2rem; font-size: 0.75rem; }

/* Legacy verdict + diverging band meter */
.legacy-verdict { text-align: center; }
.legacy-band-name {
  font-size: 1.5rem; font-weight: 700; letter-spacing: 0.02em; text-transform: capitalize;
  margin-bottom: 0.3rem;
}
.legacy-headline { color: var(--text); font-size: 1rem; line-height: 1.5; margin: 0.3rem 0 0.7rem; }
.legacy-meta { display: flex; gap: 0.5rem; justify-content: center; }
.legacy-band-tag, .legacy-meta .tag { text-transform: capitalize; }

.legacy-meter {
  position: relative; height: 18px; border-radius: 9px; overflow: hidden;
  background: var(--panel-alt); border: 1px solid var(--border); margin-top: 0.3rem;
}
.legacy-band-seg { position: absolute; top: 0; bottom: 0; opacity: 0.45; }
.legacy-band-seg.active { opacity: 1; }
.legacy-marker {
  position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--text);
  box-shadow: 0 0 0 1px var(--bg); transform: translateX(-50%);
}
.legacy-meter-scale {
  display: flex; justify-content: space-between; color: var(--text-dim);
  font-size: 0.72rem; margin-top: 0.25rem;
}

/* Band colours, ruinous → historic (shared by the meter, the band name, the tag) */
.legacy-damaging { color: #c85450; }
.legacy-troubled { color: #cf7d4a; }
.legacy-middling { color: var(--text-dim); }
.legacy-constructive { color: #9aa84a; }
.legacy-consequential { color: #5aa06a; }
.legacy-transformational { color: var(--accent); }
.legacy-band-seg.legacy-damaging { background: #c85450; }
.legacy-band-seg.legacy-troubled { background: #cf7d4a; }
.legacy-band-seg.legacy-middling { background: #6b625a; }
.legacy-band-seg.legacy-constructive { background: #9aa84a; }
.legacy-band-seg.legacy-consequential { background: #5aa06a; }
.legacy-band-seg.legacy-transformational { background: var(--accent); }
