/* =========================================================================
   AHOM-RMC · Canadian Relocation Corridors Dashboard
   Editorial / premium / Canada-specific.
   ========================================================================= */

:root {
  /* Brand palette */
  --cream: #f5efe4;
  --cream-2: #efe7d7;
  --cream-3: #e7dcc7;
  --paper: #fbf7ee;
  --ink: #1d1a17;
  --ink-2: #2a2622;
  --ink-3: #4a423b;
  --muted: #6b6358;
  --faint: #a59b8c;
  --rule: #d8ccb4;
  --rule-strong: #b9a987;

  --burgundy: #7a1f2b;
  --burgundy-deep: #5b1620;
  --burgundy-tint: #f1d9dc;

  --gold: #b08a3e;
  --gold-deep: #8a6a26;
  --gold-tint: #ecdcb6;

  --teal: #2c5d56;
  --teal-tint: #cfddd9;

  --pine: #38543b;
  --pine-tint: #d3ddcf;

  --maple: #b1442b;
  --maple-tint: #f0d4c8;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Source Serif Pro", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 0 rgba(29, 26, 23, 0.04);
  --shadow-md: 0 12px 28px -16px rgba(29, 26, 23, 0.18),
    0 2px 8px -4px rgba(29, 26, 23, 0.08);

  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--burgundy);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 160ms ease;
}
a:hover {
  color: var(--burgundy-deep);
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* =========================================================================
   Masthead
   ========================================================================= */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 239, 228, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover {
  color: var(--burgundy);
  text-decoration: none;
}
.brand__mark {
  width: 32px;
  height: 32px;
  color: var(--burgundy);
}
.brand__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.01em;
}
.brand__tagline {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.masthead__nav {
  display: flex;
  gap: 22px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.masthead__nav a {
  color: var(--ink-2);
}
.masthead__nav a:hover {
  color: var(--burgundy);
  text-decoration: none;
}
@media (max-width: 880px) {
  .masthead__nav {
    display: none;
  }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  border-bottom: 1px solid var(--rule);
  padding: clamp(56px, 7vw, 96px) var(--gutter) clamp(48px, 6vw, 80px);
  background:
    radial-gradient(1200px 480px at 88% -10%, rgba(122, 31, 43, 0.1), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(176, 138, 62, 0.12), transparent 60%),
    var(--cream);
}
.hero__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
}
@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 600;
  margin: 0 0 22px;
}
.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--burgundy);
  display: inline-block;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--ink);
}
.hero__title--accent {
  font-style: italic;
  color: var(--burgundy);
  font-weight: 500;
}
.hero__lede {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-3);
  max-width: 60ch;
  margin: 0 0 28px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
}
.panel-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--rule);
  align-items: baseline;
}
.panel-row:first-child {
  padding-top: 0;
}
.panel-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.panel-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.panel-value {
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 500;
}

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--burgundy-tint);
  color: var(--burgundy-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill--moderate {
  background: var(--pine-tint);
  color: var(--pine);
}
.pill--high {
  background: var(--gold-tint);
  color: var(--gold-deep);
}
.pill--very-high {
  background: var(--burgundy-tint);
  color: var(--burgundy-deep);
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease,
    transform 160ms ease;
  background: transparent;
}
.btn--primary {
  background: var(--burgundy);
  color: var(--paper);
  border-color: var(--burgundy);
}
.btn--primary:hover {
  background: var(--burgundy-deep);
  border-color: var(--burgundy-deep);
  color: var(--paper);
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover {
  background: var(--paper);
  border-color: var(--ink-3);
}
.btn--inverse {
  background: transparent;
  color: var(--paper);
  border-color: rgba(245, 239, 228, 0.5);
}
.btn--inverse:hover {
  background: rgba(245, 239, 228, 0.12);
  border-color: var(--paper);
  color: var(--paper);
  text-decoration: none;
}
.btn--large {
  padding: 16px 26px;
  font-size: 15px;
}

/* =========================================================================
   Section primitives
   ========================================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 6vw, 88px) var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.section--tight {
  padding-top: clamp(40px, 4vw, 56px);
  padding-bottom: clamp(40px, 4vw, 56px);
}
.section__head {
  max-width: 760px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 12px;
  font-weight: 500;
}
.kicker--inverse {
  color: var(--gold-tint);
}
.section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: var(--ink);
}
.section__lede {
  font-size: 17px;
  color: var(--ink-3);
  max-width: 65ch;
  margin: 0;
}

/* =========================================================================
   Corridor cards
   ========================================================================= */
.corridor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.corridor-card {
  position: relative;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 160ms ease, transform 160ms ease,
    box-shadow 200ms ease, background 160ms ease;
}
.corridor-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.corridor-card.is-active {
  background: linear-gradient(180deg, var(--paper) 0%, var(--cream-2) 100%);
  border-color: var(--burgundy);
  box-shadow: 0 0 0 1px var(--burgundy) inset;
}
.corridor-card.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--burgundy);
  border-radius: var(--radius) 0 0 var(--radius);
}
.corridor-card__route {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.corridor-card__route .arrow {
  color: var(--burgundy);
  margin: 0 4px;
  font-style: normal;
}
.corridor-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.corridor-card__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.corridor-card__desc {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
}

/* =========================================================================
   Lens tabs
   ========================================================================= */
.lens-tabs {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--paper);
}
.lens-tab {
  padding: 12px 22px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-right: 1px solid var(--rule);
  transition: background 160ms ease, color 160ms ease;
}
.lens-tab:last-child {
  border-right: 0;
}
.lens-tab:hover {
  background: var(--cream-2);
}
.lens-tab.is-active {
  background: var(--burgundy);
  color: var(--paper);
}
.lens-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
}
.lens-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.lens-card p {
  margin: 0;
  color: var(--ink-3);
}
.lens-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lens-card li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.lens-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 1px;
  background: var(--burgundy);
}
@media (max-width: 800px) {
  .lens-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}

/* =========================================================================
   System comparison
   ========================================================================= */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.system-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.system-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
}
.system-card__icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-2);
  border-radius: 50%;
  color: var(--burgundy);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.system-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.005em;
}
.system-card__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
  align-items: baseline;
}
.system-card__role {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* =========================================================================
   Crossing tasks
   ========================================================================= */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.task-chip {
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  font: inherit;
  cursor: pointer;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 160ms, background 160ms;
}
.task-chip:hover {
  border-color: var(--rule-strong);
  background: var(--cream-2);
}
.task-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.task-chip__num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
}
.task-chip.is-active .task-chip__num {
  color: var(--gold-tint);
}
.task-chip__name {
  font-size: 14px;
  font-weight: 600;
}
.task-detail {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--burgundy);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.task-detail h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.task-detail p {
  margin: 0 0 12px;
  color: var(--ink-3);
}
.task-detail__official {
  background: var(--cream-2);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.task-detail__official h4 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 10px;
}
.task-detail__official ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.task-detail__official a {
  color: var(--burgundy);
  word-break: break-word;
}
@media (max-width: 800px) {
  .task-detail {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}

/* =========================================================================
   Intensity bars
   ========================================================================= */
.intensity {
  display: grid;
  gap: 14px;
}
.intensity__row {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  gap: 16px;
  align-items: center;
}
@media (max-width: 720px) {
  .intensity__row {
    grid-template-columns: 1fr 56px;
  }
  .intensity__row .intensity__label {
    grid-column: 1 / -1;
  }
}
.intensity__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.intensity__track {
  height: 10px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.intensity__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--burgundy) 100%);
  border-radius: 999px;
  transform-origin: left center;
  transition: width 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
.intensity__value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
   Timeline
   ========================================================================= */
.timeline-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.progress {
  flex: 1 1 280px;
  height: 6px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.progress__bar {
  height: 100%;
  width: 0%;
  background: var(--burgundy);
  transition: width 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.progress__count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.stage {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}
.stage__when {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.005em;
}
.stage__count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.stage__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stage__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  padding: 6px 6px 6px 0;
  border-radius: var(--radius);
  user-select: none;
  font-size: 14px;
  color: var(--ink-2);
  transition: background 120ms ease;
}
.stage__item:hover {
  background: var(--cream-2);
}
.stage__check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 3px;
  margin-top: 2px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  transition: background 120ms, border-color 120ms;
}
.stage__check::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 1.5px solid var(--paper);
  border-bottom: 1.5px solid var(--paper);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.stage__item.is-done {
  color: var(--muted);
}
.stage__item.is-done .stage__check {
  background: var(--burgundy);
  border-color: var(--burgundy);
}
.stage__item.is-done .stage__check::after {
  opacity: 1;
}
.stage__item.is-done .stage__label {
  text-decoration: line-through;
  text-decoration-color: var(--rule-strong);
}

/* =========================================================================
   Cities
   ========================================================================= */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.city-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: border-color 160ms ease, transform 160ms ease;
}
.city-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-2px);
  text-decoration: none;
}
.city-card__province {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.city-card__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.city-card__note {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
}
.city-card__status {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.city-card__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* =========================================================================
   Resources
   ========================================================================= */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.resource {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  transition: border-color 160ms ease, transform 160ms ease;
}
.resource:hover {
  text-decoration: none;
  border-color: var(--rule-strong);
  transform: translateY(-2px);
}
.resource[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.85;
}
.resource[aria-disabled="true"]:hover {
  transform: none;
}
.resource__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.resource__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}
.resource__desc {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
}
.resource__meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 600;
}
.resource[aria-disabled="true"] .resource__meta {
  color: var(--muted);
}

/* =========================================================================
   Sources
   ========================================================================= */
.sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
  counter-reset: src;
}
.sources li {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--ink-2);
  position: relative;
  counter-increment: src;
}
.sources li::before {
  content: counter(src, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold-deep);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 6px;
}
.sources a {
  word-break: break-word;
  font-size: 13px;
  display: inline-block;
  margin-top: 6px;
  color: var(--burgundy);
}

/* =========================================================================
   CTA
   ========================================================================= */
.cta {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 8vw, 112px) var(--gutter);
  background-image:
    radial-gradient(800px 400px at 90% 10%, rgba(122, 31, 43, 0.6), transparent 60%),
    radial-gradient(700px 360px at 0% 100%, rgba(176, 138, 62, 0.18), transparent 65%);
}
.cta__inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--paper);
}
.cta__lede {
  font-size: 18px;
  color: rgba(245, 239, 228, 0.78);
  max-width: 60ch;
  margin: 0 auto 32px;
}
.cta__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  background: var(--cream-2);
  border-top: 1px solid var(--rule);
  padding: 32px var(--gutter);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 720px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer__line {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer__note {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 0;
  max-width: 70ch;
}

/* =========================================================================
   Toast
   ========================================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 80;
  max-width: 90vw;
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =========================================================================
   Print
   ========================================================================= */
@media print {
  .masthead,
  .lens-tabs,
  .hero__actions,
  .cta__actions,
  .toast,
  .skip-link {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .hero,
  .section,
  .cta,
  .footer {
    border-color: #ccc;
    background: #fff !important;
    color: #000 !important;
    page-break-inside: avoid;
  }
  .corridor-card,
  .system-card,
  .stage,
  .lens-card,
  .task-detail,
  .resource,
  .city-card,
  .sources li,
  .hero__panel {
    border-color: #ccc !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}
