.life-dashboard {
  --dashboard-bg: #f7f9fc;
  --panel: #ffffff;
  --panel-soft: #f4f8fb;
  --text: #071c32;
  --subtle: #587086;
  --line-strong: rgba(0, 42, 96, 0.2);
  --success: #399a08;
  --teal: #01a8a4;
  --danger: #e04e04;
  min-width: 0;
  background: var(--dashboard-bg);
}

.dashboard-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 44px rgba(0, 42, 96, 0.14);
}

.private-preview-banner {
  position: sticky;
  top: 72px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(0, 42, 96, 0.18);
  background: #fff1df;
  color: #71350f;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.private-preview-banner strong {
  color: var(--dark-blue);
  font-weight: 900;
  white-space: nowrap;
}

.private-preview-banner button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(0, 42, 96, 0.24);
  border-radius: 999px;
  background: #fff;
  color: var(--medium-blue);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  white-space: nowrap;
}

#browse { scroll-margin-top: 0; }

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(190px, 218px) minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  border-bottom: 1px solid var(--line);
}

.filter-rail,
.selected-panel {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.94);
}

.filter-rail {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}

.filter-head,
.view-toolbar,
.section-heading,
.story-detail-head,
.insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.filter-head h2 {
  margin: 0;
  color: var(--dark-blue);
  font-size: 1rem;
  line-height: 1;
  text-transform: uppercase;
}

.filter-fields { display: contents; }
.mobile-filter-toggle { display: none; }
.review-stage-summary { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.load-error h3 { margin-top: 0; }
.load-error .button { margin-top: 12px; }
#metricStrip[hidden] { display: none; }
.loading-state {
  width: 100%;
  padding: 32px 24px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--subtle);
  font-size: 1rem;
  line-height: 1.5;
}
.filter-rail :disabled, .view-toolbar :disabled { cursor: wait; opacity: 0.6; }

.text-button {
  border: 0;
  background: transparent;
  color: var(--medium-blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
}

.filter-rail label,
.view-toolbar label {
  display: grid;
  gap: 7px;
  margin-top: 22px;
}

.filter-rail label span,
.view-toolbar label span,
.field-label {
  color: var(--dark-blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}

.data-note {
  display: grid;
  gap: 12px;
  margin-top: 48px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.data-note strong {
  color: var(--dark-blue);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-note p {
  color: var(--subtle);
  font-size: 0.88rem;
}

.browse-pane {
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 38px) 42px;
}

.page-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.page-title h1 {
  max-width: 860px;
  color: var(--dark-blue);
  font-size: clamp(2.1rem, 3.3vw, 3.6rem);
}

.page-title .lead {
  margin-top: 14px;
  max-width: 860px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.title-mark {
  position: relative;
  width: 120px;
  height: 76px;
  color: var(--dark-blue);
}

.title-mark span {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.title-mark span:nth-child(1) {
  width: 68px;
  height: 68px;
  left: 0;
  top: 5px;
}

.title-mark span:nth-child(2) {
  width: 42px;
  height: 42px;
  left: 68px;
  top: 28px;
  background: var(--medium-blue);
}

.title-mark span:nth-child(3) {
  width: 24px;
  height: 24px;
  left: 96px;
  top: 0;
  background: var(--orange);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.dash-metric {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.dash-metric strong {
  color: var(--dark-blue);
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 1.62rem;
  line-height: 1;
}

.dash-metric span {
  color: var(--subtle);
  font-size: 0.82rem;
  font-weight: 800;
}

.view-toolbar {
  margin: 24px 0 16px;
}

.view-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.view-toolbar select {
  width: 170px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.segmented button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--dark-blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  background: var(--medium-blue);
  color: #fff;
}

.currency-toggle button.is-active {
  background: var(--dark-blue);
}

.story-list.is-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.story-card-button {
  position: relative;
  display: grid;
  grid-template-rows: 228px 1fr;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.story-card-button:hover,
.story-card-button:focus-visible,
.story-card-button.is-selected {
  transform: translateY(-2px);
  border-color: rgba(0, 95, 182, 0.5);
  box-shadow: var(--shadow);
  outline: 0;
}

.story-card-button.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--medium-blue);
  border-radius: var(--radius);
  pointer-events: none;
}

.portrait {
  display: block;
  background-image: var(--portrait-image, none);
  background-position: var(--portrait-focus, center);
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #e7e2d8;
  overflow: hidden;
}

.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--portrait-focus, center);
}

.story-card-button .portrait {
  min-height: 228px;
}

.story-open {
  display: inline-flex;
  width: fit-content;
  color: var(--medium-blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.card-body h3,
.selected-panel h2 {
  margin: 0;
  color: var(--dark-blue);
}

.meta-line,
.work-line,
.small-copy {
  color: var(--subtle);
  font-size: 0.86rem;
}

.earnings {
  display: flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  color: var(--dark-blue);
  font-weight: 900;
  white-space: nowrap;
}

.earnings strong {
  font-family: "Overpass", "Inter", sans-serif;
  max-width: 100%;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.earnings > span {
  flex: 0 0 auto;
  line-height: 1;
  white-space: nowrap;
}

.earnings.money-density-compact strong {
  font-size: 1.42rem;
}

.earnings.money-density-tight strong {
  font-size: 1.22rem;
}

.money-label,
.table-income,
.stat-money {
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.table-income .cur-pension {
  display: block;
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 800;
}

.mini-stage-bars {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.mini-stage-bars span {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.mini-stage-bars i {
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    var(--medium-blue) 0, var(--medium-blue) var(--labor),
    var(--teal) var(--labor), var(--teal) var(--total),
    rgba(0, 42, 96, 0.12) var(--total));
}

.mini-stage-bars b,
.mini-stage-bars em {
  color: var(--subtle);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.mini-stage-bars em {
  color: var(--dark-blue);
}

.mini-stage-bars .money-density-compact {
  font-size: 0.63rem;
}

.mini-stage-bars .money-density-tight {
  font-size: 0.58rem;
}

.empty-state {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--subtle);
  font-weight: 800;
}

.story-list.is-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 0.9fr 1.3fr 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row.header {
  background: var(--dark-blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.table-row button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--medium-blue);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.story-link {
  justify-self: start;
  color: var(--medium-blue);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.selected-panel {
  padding: 22px 22px 30px;
  border-left: 1px solid var(--line);
}

.selected-head {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.selected-head .portrait {
  width: 146px;
  aspect-ratio: 1 / 1.2;
  border-radius: var(--radius);
}

.selected-panel h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
}

.profile-facts {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.profile-facts p {
  color: var(--subtle);
  font-size: 0.94rem;
}

.panel-block {
  margin-top: 24px;
}

.panel-block h3 {
  font-size: 1.05rem;
}

.stage-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stage-card,
.stat-tile,
.insight-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.stage-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-left: 5px solid var(--medium-blue);
}

.stage-card:nth-child(2n) {
  border-left-color: var(--orange);
}

.stage-card:nth-child(3n) {
  border-left-color: var(--teal);
}

.stage-card strong {
  color: var(--dark-blue);
  font-size: 0.8rem;
}

.stage-card span {
  color: var(--subtle);
  font-size: 0.78rem;
}

.stage-card b {
  color: var(--dark-blue);
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 1.1rem;
}

.stage-card b.money-density-compact {
  font-size: 1rem;
}

.stage-card b.money-density-tight {
  font-size: 0.9rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stat-tile {
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 12px;
}

.stat-tile span {
  color: var(--subtle);
  font-size: 0.74rem;
  font-weight: 800;
}

.stat-tile strong {
  color: var(--dark-blue);
  font-size: 1rem;
}

.story-cta {
  width: 100%;
  margin-top: 18px;
  border-radius: 6px;
}

.story-detail,
.insights-section {
  background: #fff;
}

.story-detail {
  border-bottom: 1px solid var(--line);
}

.full-story-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.story-profile-card {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark-blue);
  color: #fff;
}

.story-profile-card .portrait {
  min-height: 380px;
}

.story-profile-card div {
  padding: 24px;
}

.story-profile-card h2,
.story-profile-card h3 {
  color: #fff;
}

.story-profile-card p {
  color: rgba(255, 255, 255, 0.78);
}

.life-stage-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.life-stage-list .stage-card {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: start;
}

.insights-section {
  background: var(--dark-blue);
  color: #fff;
}

.insights-section h2 {
  color: #fff;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.insight-card {
  min-height: 190px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.insight-card strong {
  display: block;
  color: var(--light-orange);
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 2rem;
  line-height: 1;
}

.insight-card h3 {
  margin-top: 14px;
  color: #fff;
  font-size: 1.1rem;
}

.insight-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
}

.story-page main {
  background: #fff;
}

.story-page-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1.26fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: stretch;
  min-height: min(640px, calc(100vh - 72px));
  padding: clamp(22px, 3.2vw, 42px) clamp(18px, 4vw, 64px);
  background: linear-gradient(135deg, #f4f8fb 0%, #fff 66%);
}

.story-portrait-frame {
  position: sticky;
  top: 96px;
  align-self: start;
  min-height: min(520px, calc(100vh - 132px));
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark-blue);
  box-shadow: var(--shadow);
}

.story-portrait-frame .portrait {
  width: 100%;
  height: 100%;
  min-height: min(520px, calc(100vh - 132px));
}

.story-hero-content {
  display: grid;
  align-content: center;
  gap: 20px;
  min-width: 0;
}

.story-crumb {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--medium-blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.life-dashboard button,
.life-dashboard select,
.life-dashboard summary {
  min-height: 32px;
  min-width: 32px;
}

.life-dashboard a:focus-visible,
.life-dashboard button:focus-visible,
.life-dashboard summary:focus-visible,
.life-dashboard select:focus-visible {
  outline: 3px solid var(--medium-blue);
  outline-offset: 3px;
}

.editorial-life-now header .editorial-current-title {
  color: var(--dark-blue);
  font-size: 1.2rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.map-legend a {
  display: inline-block;
  min-height: 24px;
}

.story-page-hero h1 {
  max-width: 840px;
  color: var(--dark-blue);
  font-size: clamp(3rem, 6vw, 6.2rem);
}

.story-page-hero .lead {
  max-width: 780px;
}

.story-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.story-hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--dark-blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.story-money-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding-top: 6px;
}

.story-money-row .earnings strong {
  font-size: 4.4rem;
}

.story-money-row .earnings.money-density-compact strong {
  font-size: 3.85rem;
}

.story-money-row .earnings.money-density-tight strong {
  font-size: 3.25rem;
}

.story-page-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.story-page-body {
  padding: clamp(28px, 5vw, 68px) clamp(18px, 4vw, 64px);
}

.story-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
  max-width: 1360px;
  margin: 0 auto;
}

.story-page-card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.story-page-card h2,
.story-page-card h3 {
  color: var(--dark-blue);
}

.story-page-card h2 {
  font-size: clamp(2rem, 3.8vw, 4.1rem);
  line-height: 1.02;
}

.story-page-card + .story-page-card {
  margin-top: 18px;
}

.income-path {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.path-stage {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) minmax(120px, auto);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.path-stage-age {
  display: grid;
  gap: 5px;
}

.path-stage-age strong,
.path-stage-main b,
.path-income {
  color: var(--dark-blue);
}

.path-stage-age strong {
  font-size: 0.84rem;
}

.path-stage-age span,
.path-stage-copy span {
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 700;
}

.path-stage-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.path-stage-copy {
  display: grid;
  gap: 4px;
}

.path-meter {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 42, 96, 0.1);
}

.path-meter i {
  display: block;
  width: var(--seg);
  height: 100%;
}

.path-meter .seg-labor {
  background: linear-gradient(90deg, var(--medium-blue), var(--light-blue));
}

.path-meter .seg-pension {
  background: var(--teal);
}

.path-income {
  justify-self: end;
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.path-income.money-density-compact {
  font-size: 1.04rem;
}

.path-income.money-density-tight {
  font-size: 0.94rem;
}

.path-income small {
  margin-left: 4px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.story-page-side {
  position: sticky;
  top: 96px;
}

.story-page-nav {
  display: grid;
  gap: 10px;
}

.story-page-nav a {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.story-page-nav a[aria-current="page"] {
  border-color: rgba(0, 95, 182, 0.6);
  box-shadow: 0 10px 24px rgba(0, 42, 96, 0.12);
}

.story-page-nav .portrait {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

@media (max-width: 1120px) {
  .dashboard-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .selected-panel {
    position: static;
    grid-column: 1 / -1;
    height: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .selected-panel {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
    gap: 22px;
  }

  .selected-panel .panel-block:first-of-type {
    margin-top: 0;
  }
}

@media (max-width: 1080px) {
  .dashboard-shell,
  .full-story-layout,
  .insight-grid,
  .story-page-hero,
  .story-page-grid {
    grid-template-columns: 1fr;
  }

  .filter-rail,
  .selected-panel,
  .story-profile-card,
  .story-portrait-frame,
  .story-page-side {
    position: static;
    height: auto;
  }

  .story-portrait-frame,
  .story-portrait-frame .portrait {
    min-height: 420px;
  }

  .filter-rail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .filter-head,
  .data-note {
    grid-column: 1 / -1;
  }

  .filter-rail label {
    margin-top: 0;
  }

  .story-list.is-gallery {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
  }

  .story-money-row .earnings strong {
    font-size: 3.2rem;
  }

  .story-money-row .earnings.money-density-compact strong {
    font-size: 2.9rem;
  }

  .story-money-row .earnings.money-density-tight strong {
    font-size: 2.45rem;
  }

  .stage-row,
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .private-preview-banner {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .private-preview-banner button {
    align-self: center;
    margin-top: 4px;
  }

  .dashboard-topbar nav {
    display: none;
  }

  .dashboard-topbar .mobile-menu {
    display: block;
  }

  .browse-pane {
    order: 2;
    padding: 24px 16px 36px;
  }

  .filter-rail {
    order: 1;
    padding: 12px 16px;
    gap: 0;
  }

  .filter-head h2 { display: none; }
  .life-dashboard .mobile-filter-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: white;
    color: var(--dark-blue);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .mobile-filter-toggle:focus-visible { outline: 3px solid var(--medium-blue); outline-offset: 3px; }
  #activeFilterCount:not(:empty) { margin-left: 5px; }
  .filter-rail .filter-fields { display: none; }
  .filter-rail.is-expanded .filter-fields { display: grid; gap: 16px; padding: 16px 0 4px; }
  #clearFilters { min-height: 44px; }

  .selected-panel {
    order: 3;
  }

  .page-title,
  .selected-panel,
  .selected-head,
  .section-heading,
  .life-stage-list .stage-card,
  .table-row {
    grid-template-columns: 1fr;
  }

  .view-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .view-toolbar label {
    display: grid;
    align-items: stretch;
  }

  .view-toolbar select,
  .segmented {
    width: 100%;
  }

  .title-mark {
    display: none;
  }

  .filter-rail,
  .story-list.is-gallery,
  .stage-row,
  .stat-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .selected-head .portrait {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .story-profile-card .portrait {
    min-height: 300px;
  }

  .story-portrait-frame,
  .story-portrait-frame .portrait {
    min-height: 360px;
  }

  .earnings {
    gap: 4px;
  }

  .earnings strong {
    font-size: 1.38rem;
  }

  .earnings.money-density-compact strong {
    font-size: 1.28rem;
  }

  .earnings.money-density-tight strong {
    font-size: 1.12rem;
  }

  .story-money-row {
    gap: 12px;
  }

  .story-money-row .earnings strong {
    font-size: 2.4rem;
  }

  .story-money-row .earnings.money-density-compact strong {
    font-size: 2.12rem;
  }

  .story-money-row .earnings.money-density-tight strong {
    font-size: 1.8rem;
  }

  .path-income.money-density-compact {
    font-size: 0.98rem;
  }

  .path-income.money-density-tight {
    font-size: 0.88rem;
  }

  .path-stage {
    grid-template-columns: 1fr;
  }

  .path-income {
    justify-self: start;
  }

  .table-row > *::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--subtle);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .table-row.header {
    display: none;
  }
}

@media (max-width: 360px) {
  .story-money-row .earnings strong {
    font-size: 2.16rem;
  }

  .story-money-row .earnings.money-density-compact strong {
    font-size: 1.9rem;
  }

  .story-money-row .earnings.money-density-tight strong {
    font-size: 1.62rem;
  }

  .story-money-row .earnings > span {
    font-size: 0.9rem;
  }
}

/* ---------------------------------------------------------------------------
   Life-story reframe components
   --------------------------------------------------------------------------- */

/* Lens toggle (Stories / Table) */
.segmented.lens-toggle {
  grid-template-columns: repeat(2, 1fr);
}

/* Browse layouts per lens */
.story-list.is-stories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 14px;
}

/* Placeholder portrait — neutral, non-branded. Used for no-photo and
   no-face-by-choice states (see .is-no-face for the deliberate-choice variant). */
.portrait.is-placeholder {
  display: grid;
  place-items: center;
  background-image: none;
  background: linear-gradient(150deg, #6f675b, #a49a89);
}

.portrait.is-no-face {
  background: linear-gradient(150deg, #5f6a63, #8d9a8f);
}

.portrait-initial {
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.94);
}

.portrait-noface-label {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.story-page-nav .portrait-initial {
  font-size: 1rem;
}

.story-portrait-frame .portrait-initial {
  font-size: clamp(3rem, 8vw, 6rem);
}

.not-found-card {
  max-width: 760px;
  margin: 0 auto;
}

/* Story gallery card additions */
.life-card .card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-quote {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--panel-soft);
}

.card-quote span {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--dark-blue);
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.42;
}

.card-quote cite {
  color: var(--subtle);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 800;
}

.card-income-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

/* No-income (unpaid) treatment */
.no-income {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--dark-blue);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

.no-income small {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: none;
}

.story-no-income {
  font-size: 1.6rem;
}

.story-no-income small {
  font-size: 0.8rem;
}

.mini-stage-bars i.is-unpaid {
  background: repeating-linear-gradient(90deg, rgba(0, 42, 96, 0.28) 0 4px, transparent 4px 8px);
}

/* Story page status row and dates */
.story-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* In their own words */
.words-card .story-detail-head {
  align-items: start;
}

.words-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.words-grid.quote-only {
  grid-template-columns: minmax(0, 1fr);
}

.word-card {
  display: grid;
  gap: 11px;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--medium-blue);
  border-radius: var(--radius);
  background: #fff;
}

.word-card:nth-child(2) {
  border-left-color: var(--orange);
}

.word-card:nth-child(3) {
  border-left-color: var(--teal);
}

.word-card:nth-child(4) {
  border-left-color: var(--light-orange);
}

.word-card blockquote {
  margin: 0;
  color: var(--dark-blue);
  font-size: 1.06rem;
  font-style: italic;
  line-height: 1.46;
}

/* Life today facts */
.life-today {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.fact-tile {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.fact-tile span {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-tile strong {
  color: var(--dark-blue);
  font-size: 1.05rem;
}

.contract-note {
  margin-top: 14px;
  color: var(--subtle);
  font-size: 0.96rem;
  font-style: italic;
}

/* Income path: unpaid + income note */
.income-note {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
}

.path-stage.is-unpaid {
  border-style: dashed;
  background: var(--panel-soft);
}

.path-income.is-unpaid {
  color: var(--subtle);
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
}

.stage-card.is-unpaid {
  border-left-color: var(--subtle);
}

.stage-card.is-unpaid b {
  color: var(--subtle);
}

/* Life-event flags on the income path */
.event-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 8px 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-left: 3px solid currentColor;
  background: rgba(0, 42, 96, 0.06);
  color: var(--subtle);
}

.event-flag.cat-family {
  color: #b5176b;
  background: rgba(181, 23, 107, 0.09);
}

.event-flag.cat-shock {
  color: var(--danger);
  background: rgba(224, 78, 4, 0.09);
}

.event-flag.cat-transition {
  color: #0c7b78;
  background: rgba(1, 168, 164, 0.12);
}

.drop-note {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  color: #b5176b;
  background: rgba(181, 23, 107, 0.1);
}

.income-breakdown {
  display: block;
  margin: 5px 0 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.68rem !important;
  font-weight: 700;
  white-space: nowrap;
  color: var(--subtle);
}

/* Pension pill + callout */
.pension-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.pension-pill.has {
  color: #0c6b41;
  background: rgba(57, 154, 8, 0.14);
}

.pension-pill.none {
  color: var(--danger);
  background: rgba(224, 78, 4, 0.13);
}

.pension-callout {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 18px 0 6px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border-left: 4px solid var(--teal);
  background: rgba(1, 168, 164, 0.08);
  font-size: 0.92rem;
  color: var(--text);
}

.pension-callout.none {
  border-left-color: var(--danger);
  background: rgba(224, 78, 4, 0.07);
}

.pension-callout-tag {
  flex: none;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0c7b78;
}

.pension-callout.none .pension-callout-tag {
  color: var(--danger);
}

.meter-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--subtle);
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 3px;
  margin-left: 6px;
}

.legend-swatch.labor {
  background: linear-gradient(90deg, var(--medium-blue), var(--light-blue));
}

.legend-swatch.pension {
  background: var(--teal);
}

@media (max-width: 1080px) {
  .words-grid {
    grid-template-columns: 1fr;
  }

  .life-today {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .story-list.is-stories {
    grid-template-columns: 1fr;
  }

  .life-today {
    grid-template-columns: 1fr;
  }

  .story-status-row {
    align-items: flex-start;
  }
}

/* ============================================================
   Thesis hero — the opening act, above the gallery
   ============================================================ */
.thesis-hero {
  background: linear-gradient(168deg, #f3f7fc 0%, #eef3f8 60%, #f6f1e9 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(28px, 4vw, 56px) clamp(18px, 4vw, 56px) clamp(20px, 3vw, 34px);
}

.thesis-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.thesis-copy h1 {
  margin: 8px 0 14px;
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  line-height: 1.04;
  letter-spacing: normal;
  color: var(--dark-blue);
}

.thesis-sub {
  margin: 0 0 22px;
  max-width: 56ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.55;
  color: var(--text);
}

.thesis-axes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.thesis-axes li {
  display: grid;
  gap: 2px;
  padding-left: 13px;
  border-left: 3px solid var(--orange);
}

.thesis-axes strong {
  font-size: 0.92rem;
  color: var(--dark-blue);
}

.thesis-axes span {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--subtle);
}

.thesis-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.thesis-pattern {
  display: grid;
  gap: 12px;
}

.pattern-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.pattern-card:hover {
  transform: translateY(-2px);
  border-color: var(--medium-blue);
  box-shadow: 0 12px 30px rgba(0, 42, 96, 0.12);
}

.pattern-card strong {
  font-size: 0.86rem;
  color: var(--dark-blue);
}

.pattern-card span {
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--subtle);
}

.pattern-spark {
  width: 100%;
}

.hero-spark {
  display: block;
  width: 100%;
  height: 72px;
}

.hero-spark path {
  vector-effect: non-scaling-stroke;
}

.spark-area {
  fill: rgba(0, 86, 179, 0.12);
  stroke: none;
}

.hero-spark.has-pension .spark-area {
  fill: rgba(1, 168, 164, 0.16);
}

.spark-total {
  fill: none;
  stroke: var(--medium-blue);
  stroke-width: 2;
  stroke-linejoin: round;
}

.hero-spark.has-pension .spark-total {
  stroke: var(--teal);
}

.spark-labor {
  fill: none;
  stroke: var(--dark-blue);
  stroke-width: 1.6;
  stroke-dasharray: 3 2;
  stroke-linejoin: round;
  opacity: 0.85;
}

.hero-spark circle {
  stroke: #fff;
  stroke-width: 1.5;
}

.hero-spark .dot-family { fill: #b5176b; }
.hero-spark .dot-shock { fill: var(--danger); }
.hero-spark .dot-transition { fill: var(--teal); }
.hero-spark .dot-other { fill: var(--medium-blue); }

.thesis-sample {
  max-width: 1180px;
  margin: clamp(20px, 3vw, 30px) auto 0;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  font-size: 0.84rem;
  font-style: italic;
  color: var(--subtle);
}

@media (max-width: 900px) {
  .thesis-inner {
    grid-template-columns: 1fr;
  }
  .thesis-axes {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Compare view — overlaid income-by-age trajectories
   ============================================================ */
.story-list.is-compare {
  display: block;
}

.compare-pane {
  display: grid;
  gap: 14px;
}

.compare-head p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.compare-head .small-copy {
  margin-top: 4px;
}

.ev-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--subtle);
}

.ev-key .dot,
.cmp-legend-item i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: none;
}

.ev-key .dot.family { background: #b5176b; }
.ev-key .dot.shock { background: var(--danger); }
.ev-key .dot.retire { background: var(--teal); }

.compare-chart {
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
}

.cmp-grid { stroke: rgba(0, 42, 96, 0.08); stroke-width: 1; }
.cmp-axis-line { stroke: var(--line-strong); stroke-width: 1; }
.cmp-axis-y { fill: var(--subtle); font-size: 11px; text-anchor: end; font-weight: 700; }
.cmp-axis-x { fill: var(--subtle); font-size: 11px; text-anchor: middle; font-weight: 700; }
.cmp-axis-title { fill: var(--subtle); font-size: 11px; text-anchor: middle; font-weight: 800; }

.cmp-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.cmp-line.faded {
  stroke-width: 1.3;
  opacity: 0.32;
}

.cmp-band {
  opacity: 0.16;
  stroke: none;
}

.cmp-median {
  fill: none;
  stroke-width: 3.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.compare-chart circle { vector-effect: non-scaling-stroke; }
.ev-dot-family { fill: #b5176b; stroke: #fff; stroke-width: 1.5; }
.ev-dot-shock { fill: var(--danger); stroke: #fff; stroke-width: 1.5; }
.ev-dot-transition { fill: var(--teal); stroke: #fff; stroke-width: 1.5; }

.compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.cmp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.cmp-legend-item small {
  color: var(--subtle);
  font-weight: 600;
}

/* ============================================================
   Photo gallery — multi-photo, face-optional
   ============================================================ */
.portrait {
  position: relative;
}

.illus-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(2px);
}

.story-portrait-frame {
  display: flex;
}

.story-gallery {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.story-portrait-frame .story-gallery-lead {
  flex: 1 1 auto;
  width: 100%;
  min-height: 320px;
  height: auto;
}

.story-gallery-caption {
  margin: 0;
  padding: 11px 16px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.22);
}

.story-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  background: rgba(0, 0, 0, 0.22);
}

.gallery-thumb {
  width: 50px;
  height: 50px;
  flex: none;
  padding: 0;
  border-radius: 9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-image: var(--portrait-image);
  background-position: var(--portrait-focus, center);
  background-size: cover;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.gallery-thumb:hover {
  transform: translateY(-1px);
}

.gallery-thumb.is-active {
  border-color: #fff;
}

/* ============================================================
   Place & migration — per-stage location + the journey thread
   ============================================================ */
.stage-place {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  margin-top: 3px;
}
.stage-place b {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--medium-blue);
}
.stage-place span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--subtle);
}

.journey-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 16px 0 2px;
  font-size: 0.9rem;
  color: var(--text);
}
.journey-tag {
  flex: none;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--medium-blue);
  background: rgba(0, 42, 96, 0.07);
  padding: 4px 10px;
  border-radius: 999px;
}
.journey-chips {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.journey-stop {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  font-weight: 800;
  color: var(--dark-blue);
}
.journey-stop small {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--subtle);
}
.journey-arrow {
  color: var(--medium-blue);
  font-weight: 900;
}

/* ============================================================
   World map view — explore & choose a story by place
   ============================================================ */
.story-list.is-map {
  display: block;
}
.map-pane {
  display: grid;
  gap: 14px;
}
.map-head p {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}
.world-map {
  width: 100%;
  height: auto;
  background: linear-gradient(180deg, #eef4fb 0%, #e7f0f8 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.wm-graticule {
  stroke: rgba(0, 42, 96, 0.1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.wm-equator {
  stroke: rgba(0, 42, 96, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
.wm-continent {
  fill: rgba(0, 42, 96, 0.18);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-anchor: middle;
}
.wm-tick {
  fill: var(--subtle);
  font-size: 9px;
  font-weight: 700;
}
.map-pin {
  cursor: pointer;
}
.map-pin .pin-dot {
  fill: var(--orange);
  stroke: #fff;
  stroke-width: 2;
  transition: r 0.12s ease;
}
.map-pin .pin-halo {
  fill: var(--orange);
  opacity: 0.18;
}
.map-pin .pin-label {
  fill: var(--dark-blue);
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 3px;
}
.map-pin:hover .pin-dot {
  r: 8;
}
.map-pin:hover .pin-label {
  fill: var(--orange);
}
.map-legend {
  font-size: 0.84rem;
  color: var(--subtle);
  font-weight: 600;
}

/* ============================================================
   Editorial-review stories — readable, but visibly not final
   ============================================================ */
.life-card.is-review-draft {
  border-color: rgba(224, 113, 42, 0.62);
  background: linear-gradient(180deg, #fffaf3 0%, #fff 44%);
  box-shadow: 0 14px 34px rgba(92, 56, 18, 0.1);
}

.life-card.is-review-draft:hover,
.life-card.is-review-draft:focus-visible {
  border-color: var(--orange);
}

.review-draft-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 27px;
  padding: 5px 10px;
  border: 1px solid rgba(224, 113, 42, 0.38);
  border-radius: 999px;
  background: #fff1df;
  color: #8b3f0f;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.review-draft-badge.is-private-preview {
  border-color: rgba(0, 95, 182, 0.35);
  background: #eaf5fc;
  color: var(--medium-blue);
}

.review-card-deck {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  line-height: 1.52;
}

.review-reported-income {
  display: grid;
  gap: 3px;
  color: var(--dark-blue);
}

.review-reported-income small {
  color: #8b3f0f;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-reported-income strong {
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.review-reported-income > span {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 700;
}

.review-stage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 4px;
}

.review-stage-strip span {
  padding: 5px 7px;
  border-radius: 4px;
  background: rgba(0, 42, 96, 0.06);
  color: var(--dark-blue);
  font-size: 0.66rem;
  font-weight: 800;
}

.review-table-label,
.review-table-income small {
  display: block;
  margin-top: 3px;
  color: #8b3f0f;
  font-size: 0.66rem;
  font-weight: 800;
}

.review-table-income {
  display: grid;
  color: var(--dark-blue);
  font-size: 0.82rem;
}

.review-compare-note {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-left: 3px solid var(--orange);
  background: #fff6ea;
  color: #6d3714;
  font-size: 0.82rem;
  font-weight: 700;
}

.review-draft-hero {
  background: linear-gradient(135deg, #fff4e6 0%, #f5f9fd 58%, #fff 100%);
}

.review-draft-hero .story-portrait-frame {
  background: #303d4a;
}

.review-status-note {
  color: #8b3f0f;
  font-size: 0.78rem;
  font-weight: 800;
}

.review-hero-income strong {
  font-size: clamp(2rem, 4vw, 4rem);
}

.review-story-body {
  background: #f8fafc;
}

.review-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  max-width: 1360px;
  margin: 0 auto 18px;
  padding: 16px 18px;
  border: 1px solid rgba(224, 113, 42, 0.36);
  border-radius: var(--radius);
  background: #fff6ea;
  color: #603416;
}

.review-banner strong {
  color: #8b3f0f;
}

.review-story-copy p,
.review-message-card p,
.review-handling-card p {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  line-height: 1.72;
}

.review-story-copy p:first-of-type::first-letter {
  float: left;
  margin: 0.08em 0.08em 0 0;
  color: var(--orange);
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 3.4em;
  font-weight: 800;
  line-height: 0.8;
}

.review-message-card {
  border-color: rgba(1, 168, 164, 0.3);
  background: linear-gradient(135deg, rgba(1, 168, 164, 0.08), #fff 62%);
}

.review-message-card p:last-child {
  margin-bottom: 0;
  color: var(--dark-blue);
  font-size: 1.18rem;
}

/* Editorial-review dataviz: chronology and reported amounts remain visually
   useful without putting unverified currencies on a shared numeric scale. */
.kind-paid {
  --review-kind: #0a4f8f;
  --review-kind-soft: #e8f1fa;
}

.kind-self-employed {
  --review-kind: #d7651c;
  --review-kind-soft: #fff0e4;
}

.kind-care {
  --review-kind: #b5176b;
  --review-kind-soft: #fbeaf3;
}

.kind-study {
  --review-kind: #7252a4;
  --review-kind-soft: #f0ebf8;
}

.kind-retirement {
  --review-kind: #087d79;
  --review-kind-soft: #e5f5f3;
}

.kind-mixed {
  --review-kind: #6d5b8c;
  --review-kind-soft: #f0ecf6;
}

.kind-other {
  --review-kind: #6d7782;
  --review-kind-soft: #edf0f3;
}

.review-viz-card {
  border-color: rgba(10, 79, 143, 0.24);
  background: linear-gradient(145deg, #fff 25%, #f5f9fd 100%);
}

.review-viz-method {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  margin-top: 20px;
  padding: 11px 13px;
  border-left: 4px solid var(--medium-blue);
  border-radius: 0 8px 8px 0;
  background: rgba(10, 79, 143, 0.06);
}

.review-viz-method strong {
  color: var(--dark-blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-viz-method span {
  color: var(--subtle);
  font-size: 0.8rem;
  line-height: 1.45;
}

.review-life-map {
  margin-top: 18px;
  padding: 20px 18px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.review-life-track {
  position: relative;
  height: 58px;
  border-bottom: 2px solid #acb8c5;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(0, 42, 96, 0.08) calc(25% - 1px) 25%);
}

.review-life-band {
  position: absolute;
  left: var(--review-left);
  top: 9px;
  width: var(--review-width);
  height: 38px;
  min-width: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--review-kind);
  box-shadow: 0 5px 12px rgba(0, 42, 96, 0.13);
  color: #fff;
}

.review-life-band.kind-mixed,
.review-mini-track i.kind-mixed,
.review-viz-legend i.kind-mixed {
  background: linear-gradient(135deg, #0a4f8f 0 48%, #b5176b 52% 100%);
}

.review-life-band.is-uncertain,
.review-mini-track i.is-uncertain {
  border: 2px dashed #8b3f0f;
  box-shadow: 0 0 0 2px #fff, 0 5px 12px rgba(0, 42, 96, 0.13);
}

.review-life-band b {
  font-size: 0.78rem;
  font-weight: 900;
}

.review-life-axis,
.review-mini-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.review-life-axis {
  padding-top: 7px;
}

.review-viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 13px;
}

.review-viz-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 800;
}

.review-viz-legend i {
  width: 15px;
  height: 10px;
  border-radius: 3px;
  background: var(--review-kind);
}

.review-viz-legend i.is-uncertain {
  border: 2px dashed #8b3f0f;
  background: #fff6ea;
}

.review-stage-key {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.review-stage-key-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--review-kind);
  border-radius: 8px;
  background: var(--review-kind-soft);
}

.review-stage-key-item.is-uncertain {
  border-style: dashed;
  border-top-style: solid;
}

.review-stage-number {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--review-kind);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.review-stage-key-item > div {
  display: grid;
  gap: 5px;
}

.review-stage-age {
  color: var(--review-kind);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-stage-key-item strong {
  color: var(--dark-blue);
  font-size: 0.9rem;
  line-height: 1.3;
}

.review-stage-key-item small {
  color: var(--subtle);
  font-size: 0.78rem;
  line-height: 1.42;
}

.review-stage-key-item em {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1df;
  color: #8b3f0f;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
}

.review-mini-viz {
  display: grid;
  gap: 4px;
  padding-top: 5px;
}

.review-mini-track {
  position: relative;
  height: 17px;
  border-bottom: 1px solid #acb8c5;
  background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(0, 42, 96, 0.08) calc(25% - 1px) 25%);
}

.review-mini-track i {
  position: absolute;
  left: var(--review-left);
  top: 2px;
  width: var(--review-width);
  height: 11px;
  min-width: 9px;
  border-radius: 3px;
  background: var(--review-kind);
}

.review-mini-viz > small {
  color: var(--subtle);
  font-size: 0.64rem;
  line-height: 1.35;
}

.review-amount-method {
  border-left-color: var(--orange);
  background: #fff8ef;
}

.review-amount-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}

.review-amount-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 190px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--review-amount-colour, var(--medium-blue));
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 42, 96, 0.06);
}

.review-amount-card.kind-historical {
  --review-amount-colour: #6f7780;
}

.review-amount-card.kind-current-work {
  --review-amount-colour: #0a4f8f;
}

.review-amount-card.kind-current-total {
  --review-amount-colour: #d7651c;
}

.review-amount-card.kind-current-pension {
  --review-amount-colour: #087d79;
}

.review-amount-card.kind-future-pension {
  --review-amount-colour: #7252a4;
}

.review-amount-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.review-amount-head > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--review-amount-colour);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.review-amount-head b {
  color: var(--review-amount-colour);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-amount-head em {
  padding: 3px 6px;
  border-radius: 999px;
  background: #edf4f9;
  color: var(--medium-blue);
  font-size: 0.61rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.review-amount-card.status-review .review-amount-head em {
  background: #fff1df;
  color: #8b3f0f;
}

.review-amount-card.status-future .review-amount-head em {
  background: #f0ebf8;
  color: #604289;
}

.review-amount-card > small {
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-amount-card > strong {
  color: var(--dark-blue);
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 1.05rem;
  line-height: 1.25;
}

.review-amount-card > p {
  margin: 0;
  color: var(--subtle);
  font-size: 0.76rem;
  line-height: 1.45;
}

.review-timeline {
  display: grid;
  gap: 0;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.review-timeline-item {
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) minmax(0, 1.7fr) minmax(120px, 0.55fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.review-timeline-item:last-child {
  border-bottom: 0;
}

.review-period {
  color: var(--medium-blue);
  font-size: 0.76rem;
  font-weight: 900;
}

.review-timeline-item h3 {
  margin: 0 0 5px;
  font-size: 1.02rem;
}

.review-timeline-item p {
  margin: 0;
  color: var(--subtle);
  font-size: 0.88rem;
  line-height: 1.5;
}

.review-timeline-item > strong {
  color: var(--dark-blue);
  font-size: 0.82rem;
}

.review-figures,
.review-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.review-figure,
.review-fact-grid > div {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.review-figure > span,
.review-fact-grid span {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-figure strong,
.review-fact-grid strong {
  color: var(--dark-blue);
  font-size: 0.96rem;
  line-height: 1.3;
}

.review-figure small {
  color: var(--subtle);
  line-height: 1.45;
}

.review-source-note {
  margin: 16px 0 0;
  color: var(--subtle);
  font-size: 0.8rem;
  font-weight: 700;
}

.review-consent-list {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.review-consent-list > div {
  display: grid;
  grid-template-columns: 0.65fr 1.35fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.review-consent-list > div:last-child {
  border-bottom: 0;
}

.review-consent-list dt {
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 800;
}

.review-consent-list dd {
  margin: 0;
  color: var(--dark-blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.review-questions-card {
  border-color: rgba(224, 113, 42, 0.34);
}

.review-question-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.review-question-list li {
  padding-left: 4px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.48;
}

.review-question-list li::marker {
  color: var(--orange);
  font-weight: 900;
}

.review-handling-card {
  background: #f3f6f9;
}

.review-story-body .story-page-side .story-page-card h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

@media (max-width: 760px) {
  .review-banner,
  .review-timeline-item {
    grid-template-columns: 1fr;
  }

  .review-figures,
  .review-fact-grid,
  .review-stage-key,
  .review-amount-map {
    grid-template-columns: 1fr;
  }

  .review-viz-method {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .review-life-map {
    padding-inline: 12px;
  }

  .review-consent-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Public CMS story: editorial reading first, structured facts second. */
.editorial-story-hero {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  min-height: min(660px, calc(100vh - 72px));
  background:
    radial-gradient(circle at 86% 18%, rgba(1, 168, 164, 0.12), transparent 28%),
    linear-gradient(135deg, #f7efe6 0%, #f5f9fd 58%, #fff 100%);
}

.editorial-story-hero .story-portrait-frame {
  min-height: min(560px, calc(100vh - 132px));
  background: #183955;
}

.editorial-story-hero .story-gallery-lead {
  min-height: min(500px, calc(100vh - 192px));
}

.editorial-story-hero .story-hero-content {
  align-content: space-between;
  padding-block: clamp(8px, 2vw, 28px);
}

.editorial-story-kicker {
  margin: 0 0 14px;
  color: #a64010;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editorial-story-hero .editorial-standfirst {
  max-width: 720px;
  color: #324f68;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.62;
}

.editorial-story-page {
  padding: clamp(34px, 6vw, 84px) clamp(18px, 4vw, 64px);
  background: #f4f7fa;
}

.editorial-reading-shell {
  display: grid;
  gap: clamp(28px, 5vw, 58px);
  max-width: 1180px;
  margin: 0 auto;
}

.editorial-narrative,
.editorial-life-now,
.editorial-life-path,
.editorial-other-stories {
  border: 1px solid rgba(0, 42, 96, 0.11);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 42, 96, 0.07);
}

.editorial-narrative {
  width: min(100%, 830px);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 70px);
}

.editorial-narrative h2,
.editorial-life-now h2,
.editorial-life-path h2,
.editorial-other-stories h2 {
  margin: 4px 0 0;
  color: var(--dark-blue);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
}

.editorial-narrative-copy {
  margin-top: clamp(24px, 4vw, 44px);
}

.editorial-narrative-copy p {
  margin: 0 0 1.25em;
  color: #172f44;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  line-height: 1.82;
}

.editorial-narrative-copy p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  color: var(--orange);
  font-family: "Overpass", "Inter", sans-serif;
  font-size: 3.35em;
  font-weight: 900;
  line-height: 0.76;
}

.editorial-life-now,
.editorial-life-path,
.editorial-other-stories {
  padding: clamp(26px, 5vw, 54px);
}

.editorial-life-now > header {
  display: grid;
  gap: 6px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.editorial-life-now > header > p:last-child,
.editorial-section-heading > p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.55;
}

.editorial-life-now-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: clamp(20px, 4vw, 42px);
  margin-top: 30px;
}

.editorial-current-copy h3 {
  margin: 0;
  color: var(--dark-blue);
  font-size: 1.25rem;
}

.editorial-current-copy > p {
  max-width: 680px;
  color: #324f68;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.72;
}

.editorial-current-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.editorial-current-facts span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border-radius: 10px;
  background: #f3f7fa;
}

.editorial-current-facts small,
.editorial-income-card > small,
.editorial-timeline-income small {
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.editorial-current-facts strong {
  color: var(--dark-blue);
  font-size: 0.92rem;
  line-height: 1.4;
}

.editorial-income-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 14px;
  background: var(--dark-blue);
  color: #fff;
}

.editorial-income-card .kicker {
  color: #8fe6e2;
}

.editorial-income-card > strong {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
}

.editorial-income-card > p:not(.kicker) {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
}

.editorial-income-card .pension-pill {
  justify-self: start;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.editorial-income-card > small {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.editorial-context-note {
  width: min(100%, 940px);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 42px);
  border-left: 7px solid var(--orange);
  border-radius: 0 14px 14px 0;
  background: #fff5e9;
  color: #603416;
}

.editorial-context-note > p:last-child {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.editorial-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.editorial-section-heading > p {
  max-width: 360px;
  text-align: right;
}

.editorial-life-map {
  margin-bottom: 34px;
  padding: 18px;
  border: 1px solid rgba(10, 79, 143, 0.18);
  border-radius: 14px;
  background: #f7fafc;
}

.editorial-life-map .review-viz-method {
  margin-top: 0;
}

.editorial-timeline {
  border-top: 1px solid var(--line);
}

.editorial-timeline-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr) minmax(180px, 0.34fr);
  gap: clamp(18px, 3vw, 34px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.editorial-timeline-item.is-current {
  margin-inline: -18px;
  padding-inline: 18px;
  border-radius: 12px;
  background: #fff6eb;
}

.editorial-timeline-period,
.editorial-timeline-income {
  display: grid;
  gap: 5px;
  align-content: start;
}

.editorial-timeline-period strong {
  color: var(--medium-blue);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.editorial-timeline-period span {
  color: var(--subtle);
  font-size: 0.82rem;
  line-height: 1.4;
}

.editorial-timeline-copy > p:first-child {
  margin: 0 0 6px;
  color: #a64010;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.editorial-timeline-copy h3 {
  margin: 0;
  color: var(--dark-blue);
  font-size: 1.2rem;
  line-height: 1.25;
}

.editorial-timeline-copy h3 + p {
  margin: 8px 0 0;
  color: #324f68;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

.editorial-timeline-copy small {
  display: block;
  margin-top: 10px;
  color: #6d3714;
  font-weight: 800;
}

.editorial-timeline-income {
  padding: 14px;
  border-radius: 10px;
  background: #eef4f8;
}

.editorial-timeline-income strong {
  color: var(--dark-blue);
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.editorial-source-note {
  max-width: 820px;
  margin: 24px 0 0;
  color: var(--subtle);
  font-size: 0.82rem;
  line-height: 1.6;
}

.editorial-other-stories .story-page-nav {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

@media (max-width: 900px) {
  .editorial-story-hero,
  .editorial-life-now-grid {
    grid-template-columns: 1fr;
  }

  .editorial-story-hero .story-portrait-frame {
    min-height: 420px;
  }

  .editorial-section-heading {
    align-items: start;
    flex-direction: column;
  }

  .editorial-section-heading > p {
    max-width: 680px;
    text-align: left;
  }

  .editorial-timeline-item {
    grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
  }

  .editorial-timeline-income {
    grid-column: 2;
  }

  .editorial-other-stories .story-page-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .editorial-story-page {
    padding-inline: 12px;
  }

  .editorial-narrative,
  .editorial-life-now,
  .editorial-life-path,
  .editorial-other-stories {
    padding: 24px 18px;
    border-radius: 12px;
  }

  .editorial-current-facts,
  .editorial-timeline-item {
    grid-template-columns: 1fr;
  }

  .editorial-timeline-income {
    grid-column: auto;
  }

  .editorial-timeline-item.is-current {
    margin-inline: -8px;
    padding-inline: 8px;
  }
}

/* Country collections and canonical published-story navigation */
.country-collections {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  padding: 24px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.country-collections h2 {
  margin: 3px 0 0;
  color: var(--dark-blue);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.country-collections nav,
.country-collection-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.country-collections nav a,
.country-collection-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--dark-blue);
  text-decoration: none;
}

.country-collections nav a:hover,
.country-collections nav a:focus-visible,
.country-collection-nav a:hover,
.country-collection-nav a:focus-visible,
.country-collection-nav a[aria-current="page"] {
  border-color: var(--medium-blue);
  background: var(--medium-blue);
  color: #fff;
}

.country-collections nav span {
  color: var(--subtle);
  font-size: 0.78rem;
}

.country-collections nav a:hover span,
.country-collections nav a:focus-visible span {
  color: inherit;
}

.story-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.story-breadcrumbs > span {
  color: var(--subtle);
}

.country-page-main {
  min-height: calc(100vh - 72px);
  background: linear-gradient(168deg, #f3f7fc 0%, #f7f9fc 42%, #fff 100%);
}

.country-page-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(38px, 7vw, 88px) clamp(18px, 4vw, 56px) 36px;
}

.country-page-hero h1 {
  max-width: 900px;
  margin: 10px 0 14px;
  color: var(--dark-blue);
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: normal;
}

.country-page-hero .lead {
  max-width: 760px;
  color: var(--subtle);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.country-collection-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 56px) 34px;
}

.country-story-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px clamp(18px, 4vw, 56px) 72px;
  border-top: 1px solid var(--line);
}

.country-story-section .section-heading h2 {
  margin: 3px 0 0;
  color: var(--dark-blue);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.country-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.country-story-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(0, 42, 96, 0.08);
}

.country-story-card > a {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr);
  min-height: 310px;
  color: inherit;
  text-decoration: none;
}

.country-story-card > a:hover,
.country-story-card > a:focus-visible {
  outline: 3px solid rgba(0, 95, 182, 0.25);
  outline-offset: -3px;
}

.country-story-visual {
  display: grid;
  place-items: center;
  min-height: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, #536a78, #8c9da7);
}

.country-story-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.country-story-initials {
  color: #fff;
  font-family: "Overpass", "Inter", sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
}

.country-story-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 24px;
}

.country-story-copy h3 {
  margin: 0;
  color: var(--dark-blue);
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
}

.country-story-copy .meta-line {
  color: var(--subtle);
  font-size: 0.82rem;
}

.country-story-copy > strong {
  color: var(--medium-blue);
  font-size: 0.9rem;
}

.country-story-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.country-story-copy .story-open {
  align-self: end;
  margin-top: 5px;
}

@media (max-width: 820px) {
  .country-collections,
  .country-story-grid {
    grid-template-columns: 1fr;
  }

  .country-story-card > a {
    grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .country-story-card > a {
    grid-template-columns: 1fr;
  }

  .country-story-visual {
    min-height: 220px;
  }

  .country-story-copy {
    padding: 20px;
  }
}
