.journey { padding:0; min-width:0; background:#faf9f3; }
.story-hero {--cover-green:#10281e;position:relative;isolation:isolate;display:grid;align-items:end;min-height:min(70vh,650px);background:var(--cover-green);color:white}
.cover-title {z-index:1;padding:clamp(2rem,6vw,6rem)}
.cover-photo {position:absolute;inset:0;margin:0}
.cover-photo img {display:block;width:100%;height:100%;object-fit:cover;object-position:80% 55%}
.cover-photo::after {content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--cover-green),rgba(16,40,30,.88) 12%,rgba(16,40,30,.38) 38%,transparent 65%)}
@media(max-width:720px){.story-hero{min-height:clamp(320px,55svh,500px)}.cover-title{padding:1.5rem}.cover-photo img{object-position:80% center}.cover-photo::after{background:linear-gradient(0deg,var(--cover-green),rgba(16,40,30,.68) 22%,transparent 62%)}}
.story-hero .eyebrow {color:var(--atlas-immigration-gold)}.story-hero h1 {color:inherit;max-width:15ch;font:normal clamp(2.1rem,3.7vw,4.5rem)/.97 var(--atlas-font);letter-spacing:-.055em;margin:.3em 0}
.story-hero a {color:white;text-underline-offset:.4em}.story-body{padding:clamp(1.25rem,4vw,4.5rem);padding-top:clamp(1.25rem,2.5vw,2.5rem)}
.story-body>.intro{font:normal clamp(1.25rem,2.4vw,2rem)/1.4 var(--atlas-font);max-width:46ch;margin-bottom:clamp(1.5rem,2.5vw,2.5rem);color:#263c31}
.cover-title>.issue-ornament{width:clamp(48px,5vw,76px);height:auto;object-fit:contain;margin:0;filter:drop-shadow(0 1px 2px #091d16)}
.chapter-nav{position:sticky;top:0;z-index:2;display:flex;flex-wrap:wrap;gap:.5rem;background:#faf9f3f7;border-block:1px solid #bcc7bb;padding:.35rem clamp(.75rem,1.8vw,1.5rem);box-sizing:border-box}
.chapter-nav a{font-size:.88rem;margin:0;color:#254439}.trail{list-style:none;padding:0;margin:0}.trail li{display:grid;grid-template-columns:minmax(6rem,1fr) minmax(0,2.6fr);align-items:start;gap:2rem;padding:clamp(2.5rem,6vw,6rem) 0;border-bottom:1px solid #c7cdbf;scroll-margin-top:5rem}
.folio{font:normal clamp(3rem,6vw,6.5rem)/1 var(--atlas-font);letter-spacing:-.06em;color:var(--atlas-immigration-gold)}
.question,.proposal .eyebrow{color:#263c31;font-weight:700}.journey h2{font:normal clamp(1.8rem,3.2vw,3.3rem)/1.07 var(--atlas-font);margin:.38em 0}.trail a,.story-body>a{display:inline-block;margin-top:1rem;color:#285c48;text-underline-offset:.2em}
.finding,.proposal{padding:clamp(1.5rem,4vw,4rem);margin-block:2rem}.finding{background:#1e392e;color:#fff}.proposal{background:#efe5cd;scroll-margin-top:4rem}.proposal h3{margin:1.4rem 0 .4rem}.journey section p{max-width:65ch}
@media(max-width:700px){.trail li{grid-template-columns:1fr;gap:.6rem}.chapter-nav{gap:0}.chapter-nav a{padding:.55rem}}
@media(prefers-reduced-motion:no-preference){@supports(animation-timeline:view()){.folio{animation:ink-in linear both;animation-timeline:view();animation-range:entry 0% entry 100%}@keyframes ink-in{from{opacity:.35;transform:translateY(1rem)}to{opacity:1;transform:none}}}}
.hero-credit{font-size:.75rem;margin-top:1.2rem;color:#edece6}

@media(min-width:721px){
  .sidebar { --join-gap:23px; }
  .sidebar .issue-nav a[aria-current=page] { position:relative; border-radius:4px 0 0 4px; background:#10281e; color:white; }
  .sidebar .issue-nav:not(.animated-issue-nav) a[aria-current=page]::after,
  .sidebar .issue-selection::after {
    content:""; position:absolute; left:100%; top:-12px; bottom:-12px;
    width:var(--join-gap); pointer-events:none;
    background:
      radial-gradient(circle at left top, transparent 11.5px, #10281e 12.5px) right top / 12px 12px no-repeat,
      linear-gradient(#10281e,#10281e) center / 100% calc(100% - 24px) no-repeat,
      radial-gradient(circle at left bottom, transparent 11.5px, #10281e 12.5px) right bottom / 12px 12px no-repeat;
  }

}
@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}

@media(min-width:721px) and (max-width:1000px){.sidebar{--join-gap:13px}}

.pilot-position {margin:0 0 1.5rem;padding:1rem 0;border-block:1px solid #c7cbbf}.pilot-position summary {cursor:pointer;font-weight:700}.pilot-position p {max-width:none;line-height:1.65;margin-top:.75rem}

#issuance-chart svg{display:block;width:100%;height:auto}.trail li>div{min-width:0}.trail .folio{font-size:clamp(2rem,4vw,4rem)}

.research-index{margin:1.25rem 0}.research-index summary,.research-data summary{cursor:pointer;font-weight:600}
.research-index ol{columns:2;padding-inline-start:1.5rem}.research-index li{break-inside:avoid}
.research-chapter{border-top:1px solid #bcc7bb;padding:clamp(1.75rem,4vw,4rem) 0;scroll-margin-top:5rem}
.research-chapter>p{margin:1rem 0;font-size:1.125rem}.research-data{margin-top:1.5rem}
.research-data iframe{display:block;width:100%;height:75vh;border:1px solid #bcc7bb;margin:1rem 0;background:#faf9f3}
@media(max-width:650px){.research-index ol{columns:1}}

.topic-panel,.pilot-position p {font-family:var(--atlas-small-font)}
.story-body :is(h2,h3,.folio) {font-family:var(--atlas-font)}
.chapter-nav a[aria-current]{color:#163c30;background:#e3ece5;box-shadow:inset 0 -2px #285c48}.topic-panel{scroll-margin-top:5rem}.country-figure{display:flex;align-items:center;gap:2rem;flex-wrap:wrap;margin:1.5rem 0}.country-figure figcaption{font-family:var(--atlas-small-font)}#country-pie{width:min(14rem,100%);aspect-ratio:1;border-radius:50%}

.position-row{position:relative;margin-bottom:1.5rem}
.position-row .pilot-position{margin:0}
.position-row summary{padding-right:6rem}
.glossary-link{position:absolute;right:0;top:1rem;font:600 .875rem/1.6 var(--atlas-small-font);color:#285c48;text-underline-offset:.22em}
.chapter-nav a{transition:background-color .24s,color .24s,box-shadow .24s}
@media(prefers-reduced-motion:reduce){.chapter-nav a{transition:none}}

.topic-panel{padding-top:clamp(1rem,2vw,1.5rem)}
.topic-panel>.research-chapter:first-child{padding-top:0;border-top:0}
.topic-panel>.research-chapter:first-child>:first-child,.topic-panel>h2:first-child{margin-top:0}
#term-dialog{width:min(38rem,92vw);max-height:80vh;padding:0;border:1px solid #a9b8ae;border-radius:6px;background:#faf9f3;color:#10281e}
#term-dialog::backdrop{background:#10281e99}
#term-dialog header{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;background:#faf9f3;padding:.8rem 1.3rem;border-bottom:1px solid #bcc7bb}
#term-dialog h2{margin:0;font-size:1.5rem}#term-dialog button{padding:.35rem .65rem;cursor:pointer}
.term-body{padding:0 1.3rem 1rem;font-family:var(--atlas-small-font)}.term-body dt{margin-top:1rem}.term-body dd{margin:.2rem 0 0}

.visa-comparison h3 {margin:2rem 0 .75rem}

.source-line a {margin-inline:0}
.source-line {word-spacing:normal}
.intro:has(.opening-question) {max-width:none}
@media (min-width:75rem) {
  .opening-question {display:block}
}

.visa-month {display:grid;grid-template-columns:5.3em minmax(0,1fr) 5em;align-items:center;gap:.4rem;margin:.55rem 0;font-variant-numeric:tabular-nums}
.visa-month b {text-align:right}
.visa-month .resident-bar {height:1.65rem}
.visa-legend {display:flex;gap:.45rem 1rem;flex-wrap:wrap;margin-bottom:1rem}
.visa-legend i {display:inline-block;width:.7em;height:.7em;border-radius:50%;margin-right:.35em}
.monthly-visas output {margin-top:.8rem}

.visa-comparison .population-sources {max-width:none;white-space:nowrap;overflow-x:auto}
.visa-comparison .population-chart {border-radius:2rem;overflow:hidden}
.population-chart .resident-bar {border-radius:999px;clip-path:inset(0 round 999px)}
.population-chart .resident-bar button:first-child {border-radius:999px 0 0 999px}
.population-chart .resident-bar button:last-child {border-radius:0 999px 999px 0}

.population-chart .resident-key {margin-bottom:0}

#country-pie path {cursor:pointer;transition:filter .15s,transform .15s}
#country-pie path.active {filter:brightness(1.2) drop-shadow(0 0 2px #455f4e);transform:scale(1.045)}
#country-legend button {display:block;text-align:left;font:inherit;padding:.3rem .55rem;border:0;border-left:.5rem solid var(--ink);background:transparent;cursor:pointer;color:inherit}
#country-legend button.active {background:#e4ece2}

.research-chapter .source-line a, #country-source a {font-size:.8125rem;font-weight:400;color:#4d655b}

.country-period {display:flex;flex-wrap:wrap;gap:.7rem}
.country-period label {display:grid;gap:.2rem;font:inherit}

.country-figure {padding:clamp(.75rem,2vw,2rem);border:1px solid #ced7ca;border-radius:1.25rem;background:radial-gradient(ellipse at 18% 45%,#e4ecdc,#faf9f3 65%)}
#country-pie {position:relative;width:min(18rem,100%);flex-shrink:0}
#country-pie svg {width:100%;height:100%}
#country-pie path {stroke:#faf9f3;stroke-width:1.2}
.ring-value {position:absolute;inset:0;display:grid;align-content:center;text-align:center;pointer-events:none}
.ring-value strong {font:normal 2rem var(--atlas-font)}
.ring-value span {font-family:var(--atlas-small-font);font-size:.85rem}
#country-legend button {padding:.45rem .8rem;margin:.12rem 0}

#research-visas .visa-trend-note {font-size:.8125rem;line-height:1.4;color:#506257}

/* Native controls share typography, spacing and focus treatment across chapters. */
body .topic-panel select {
  font: 400 .85rem/1.4 var(--atlas-small-font);
  color: #244d42;
  background-color: #fffef9;
  border: 1px solid #adbdb0;
  border-radius: .35rem;
  padding: .45rem .65rem;
  max-width: 100%;
  cursor: pointer;
}
body .topic-panel details > summary {
  font: 400 .8rem/1.45 var(--atlas-small-font);
  color: #244d42;
  cursor: pointer;
}
.topic-panel :is(select,summary):focus-visible {
  outline: 2px solid var(--atlas-immigration-gold);
  outline-offset: 3px;
}
#crime .crime-figure{background:#f3f5ed;border:1px solid #c7d0c2;border-radius:1rem;padding:clamp(.8rem,2vw,1.5rem);margin:1rem 0}
.crime-readout{display:block;min-height:1.5em;margin-top:.35rem;font: .85rem/1.5 var(--atlas-small-font)}
.crime-figure svg{width:100%;max-width:54rem;height:auto}.crime-figure svg text{font:11px var(--atlas-small-font);fill:#244d42}
.crime-figure circle:focus{outline:2px solid #244d42}
.crime-key span{display:inline-block}.crime-key i{display:inline-block;width:.7em;height:.7em;border-radius:50%;margin-right:.35em}
#crime details{margin:.75rem 0}#crime h3{margin-top:1.75rem}#crime select{max-width:100%}
.crime-key span{margin-right:.75rem}
#crime .table-wrap{overflow-x:auto;max-width:100%}
#crime .crime-key{font: .85rem/1.5 var(--atlas-small-font);margin-top:.65rem}
.crime-country{display:flex;align-items:center;flex-wrap:wrap;gap:1rem}
.crime-country svg{width:min(15rem,100%)}.crime-country .atlas-key{display:grid}
.crime-country .atlas-key button{text-align:left}.crime-country output{flex-basis:100%;min-height:1em}
.crime-country path:is(:hover,:focus-visible){filter:brightness(1.18)}

.crime-country path{cursor:pointer;transition:transform .18s,filter .18s;transform-origin:100px 100px}
.crime-country path.country-selected{transform:scale(1.045);filter:brightness(1.12) drop-shadow(0 1px 2px #344c3f66)}
.crime-country button.country-selected{background:#e1eadd;border-radius:.25rem}
@media(prefers-reduced-motion:reduce){.crime-country path{transition:none}}

#crime .crime-country{border:0;background:transparent;box-shadow:none;padding:.75rem 0;gap:clamp(1rem,4vw,3rem)}
.crime-ring{position:relative;width:min(18rem,100%)}
.crime-country .crime-ring svg{display:block;width:100%;overflow:visible}
.crime-country .atlas-key button{border-left:.45rem solid var(--ink);padding:.45rem .8rem;border-radius:0}
.crime-country .atlas-key button::before{display:none}

#crime .annual-sentencing svg text{font-size:9.5px}

#crime .annual-sentencing{max-width:46rem;margin:1rem auto;border:0;background:transparent;padding:.5rem 0}
#crime .annual-sentencing svg{display:block;width:100%}
#crime .crime-country .crime-readout{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:721px){.sidebar .issue-nav a[aria-current=page]{--issue-selection-color:#10281e}}
.chapter-nav.immigration-topic-nav a:is(:hover,:focus-visible,[aria-current]){
  color:#503914;background:color-mix(in srgb,var(--atlas-immigration-gold) 18%,#faf9f3);
  box-shadow:inset 0 -2px var(--atlas-immigration-gold)
}
