:root {
  color-scheme:light;
  --paper:#f5f2e9;
  --sheet:#fcfaf3;
  --ink:#23392e;
  --muted:#52655b;
  --line:#d8ddd0;
  --forest:#153729;
  --leaf:#dffa92;
  --chart:#29764b;
  --chart-peak:#244f37;
  --gutter:clamp(18px,4.6vw,76px);
  font-family:"DM Sans","PingFang SC","Hiragino Sans GB",system-ui,sans-serif;
  color:var(--ink);
  background:var(--paper);
  scroll-behavior:smooth;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
h1,h2,h3,p { margin:0; }
a { color:inherit; text-decoration:none; }
button,select,input { font:inherit; }
button,summary { cursor:pointer; }
button { color:inherit; }
:focus-visible { outline:2px solid #476f48; outline-offset:4px; }
.atlas-header {
  min-height:72px; display:flex; padding:12px var(--gutter); align-items:center; justify-content:space-between; gap:16px;
  background:var(--paper); border-bottom:1px solid var(--line);
}
.wordmark { display:flex; gap:11px; align-items:center; white-space:nowrap; font-weight:770; line-height:1.25; }
.wordmark small { display:block; letter-spacing:.16em; color:var(--muted); font:10px/1.4 "IBM Plex Mono",monospace; letter-spacing:.14em; }
.brand-mark { position:relative; width:25px; height:25px; border:1.4px solid currentColor; border-radius:50%; }
.brand-mark::before,.brand-mark::after { content:""; position:absolute; inset:calc(50% - .5px) -4px auto; height:1px; background:currentColor; }
.brand-mark::after { transform:rotate(90deg); }
.atlas-header nav { display:flex; align-items:center; justify-content:flex-end; gap:clamp(10px,2.2vw,26px); font-size:13px; }
.atlas-header nav a:hover,.report-nav a:hover { text-decoration:underline; text-underline-offset:5px; }
.year-field { display:flex; align-items:center; gap:8px; }
.year-field span { color:var(--muted); }
.year-field select,.outline { min-height:36px; padding:5px 9px; border:1px solid var(--line); background:var(--sheet); color:var(--ink); border-radius:5px; }
.share-button { min-height:38px; padding:8px 13px; border:1px solid transparent; border-radius:6px; color:#f5fae4; background:var(--forest); font-weight:720; white-space:nowrap; }
.share-button:hover { background:#23503b; }
.share-button:disabled { opacity:.52; cursor:wait; }
.report-hero { position:relative; isolation:isolate; min-height:clamp(355px,39vw,565px); overflow:hidden; display:grid; grid-template-rows:1fr auto;
  color:#fffbeb; background:radial-gradient(ellipse at 100% 8%,#48694e,transparent 72%),linear-gradient(160deg,#17372a,#17372a 30%,#294534);
}
.cover-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 51%; z-index:-3; }
.report-hero.has-cover::before { content:""; position:absolute; inset:0; z-index:-2;
  background:linear-gradient(90deg,rgba(12,28,21,.80),rgba(12,28,21,.50) 39%,rgba(12,28,21,.05) 90%),
    linear-gradient(0deg,rgba(10,25,18,.67),transparent 43%);
}
.hero-content { padding:clamp(36px,7vw,95px) var(--gutter) 26px; align-self:center; max-width:1050px; }
.eyebrow { display:flex; align-items:center; gap:10px; color:#eaffb3; font-size:13px; letter-spacing:.11em; font-weight:700; }
.eyebrow i { width:7px; height:7px; background:#dafd8c; border-radius:50%; }
.report-hero h1 { display:grid; gap:2px; margin:13px 0 18px; line-height:.93; letter-spacing:-.085em; }
.report-hero h1 > span { font-size:clamp(68px,13.5vw,202px); font-weight:780; }
.report-hero h1 > strong { font-size:clamp(31px,5.8vw,85px); letter-spacing:-.055em; line-height:1.14; font-weight:760; }
.report-hero h1 + p { color:#ecf2dc; font:clamp(13px,1.3vw,18px)/1.5 "IBM Plex Mono",monospace; }
.hero-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px var(--gutter) 19px; font-size:12px; }
.cover-control { display:inline-flex; align-items:center; min-height:36px; padding:5px 12px; background:rgba(16,39,25,.7); color:#fffbea; border:1px solid #c9dab2; border-radius:20px; white-space:nowrap; }
.cover-control:hover { background:#254e39; }
.paper { max-width:1650px; margin:auto; padding:0 var(--gutter); }
.metrics { display:grid; grid-auto-flow:column; grid-auto-columns:1fr; margin:0; border-bottom:1px solid var(--line); }
.metrics > div { display:grid; align-content:center; gap:8px; padding:clamp(15px,2.75vw,36px) clamp(10px,2.4vw,31px); border-left:1px solid var(--line); min-width:0; }
.metrics > div:first-child { padding-left:0; border-left:0; }
.metrics dd { margin:0; font-size:clamp(28px,5vw,70px); font-weight:760; letter-spacing:-.07em; line-height:1; }
.metrics dt { color:var(--muted); font-size:clamp(12px,1.3vw,16px); }
.report-nav { min-height:60px; padding:8px 0; display:flex; align-items:center; flex-wrap:wrap; gap:5px clamp(14px,3vw,42px); border-bottom:1px solid var(--line); font-weight:680; font-size:14px; }
.report-nav .inline-action { margin-left:auto; }
.inline-action { padding:5px 0; min-height:32px; color:var(--ink); font-size:13px; font-weight:700; border:0; background:none; text-align:left; }
.inline-action:hover,.place-name:hover { text-decoration:underline; text-underline-offset:4px; }
.chapter { margin:clamp(36px,6vw,82px) 0 0; scroll-margin-top:24px; }
.chapter-head { display:flex; justify-content:space-between; gap:12px; align-items:baseline; margin:0 0 17px; }
.chapter-head h2 { font-size:clamp(25px,3.4vw,47px); letter-spacing:-.05em; line-height:1.23; }
.tempo-grid { display:grid; grid-template-columns:minmax(0,2.5fr) minmax(245px,1fr); gap:14px; }
.plot-panel,.peak-panel,.place-panel { border:1px solid var(--line); border-radius:12px; background:var(--sheet); padding:clamp(14px,2vw,27px); min-width:0; }
.plot-panel header { display:flex; justify-content:space-between; gap:14px; align-items:center; }
.plot-panel header h3,.place-panel h3,.visits h3 { font-size:16px; }
.plot-panel header span { color:var(--muted); font-size:12px; }
.month-plot { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:2px; margin:22px 0 3px;
  background:repeating-linear-gradient(to bottom,var(--line) 0 1px,transparent 1px 25%); background-size:100% calc(100% - 24px); background-repeat:no-repeat; }
.month-mark { position:relative; display:grid; align-content:end; justify-items:center; min-width:0; border:0; padding:0; background:transparent; line-height:1; }
.bar-track { width:100%; height:clamp(100px,13vw,180px); display:flex; align-items:flex-end; justify-content:center; border-bottom:1px solid var(--line); }
.bar-track i { width:52%; max-width:32px; height:var(--height); background:var(--chart); border-radius:4px 4px 0 0; }
.month-mark.peak .bar-track i { background:var(--chart-peak); }
.month-mark.peak .month-tick { font-weight:800; }
.month-mark:hover .bar-track i,.month-mark:focus-visible .bar-track i { box-shadow:0 0 0 2px var(--ink); }
.month-tick { height:24px; display:grid; place-items:center; font:12px/1 "IBM Plex Mono",monospace; }
.tooltip { display:none; position:absolute; bottom:calc(100% + 7px); left:50%; transform:translateX(-50%); padding:7px 9px;
  color:#fffbed; border-radius:5px; background:#163728; white-space:nowrap; font-size:12px; z-index:3; pointer-events:none; }
.month-mark:hover .tooltip,.month-mark:focus-visible .tooltip,.calendar-dot:hover .tooltip,.calendar-dot:focus-visible .tooltip { display:block; }
.month-mark:first-child .tooltip { left:0; transform:none; }
.month-mark:last-child .tooltip { left:auto; right:0; transform:none; }
.peak-panel { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; background:#deead0; border-color:#cfdcc1; gap:11px; padding:clamp(18px,3.2vw,42px); }
.peak-panel p { font-size:15px; font-weight:760; }
.peak-panel strong { font-size:clamp(35px,5vw,72px); line-height:1.03; letter-spacing:-.07em; }
.peak-panel > span { font-size:14px; color:#435d47; }
.peak-panel .inline-action { margin-top:2px; }
.data-table { margin-top:13px; font-size:13px; color:var(--muted); }
.data-table summary { min-height:29px; padding-block:5px; }
.data-table table { border-collapse:collapse; width:100%; text-align:left; }
.data-table th,.data-table td { border-top:1px solid var(--line); padding:7px; }
.calendar { margin:12px 0 0; }
.calendar-scroll { overflow-x:auto; padding:32px 0 8px; }
.calendar-row { display:grid; grid-template-columns:30px repeat(31,minmax(15px,1fr)); gap:2px; min-width:580px; margin-bottom:2px; }
.calendar-row > span:first-child { display:grid; place-items:center; font:12px/1 "IBM Plex Mono",monospace; }
.calendar-dot { display:block; position:relative; aspect-ratio:1.15; min-width:0; border-radius:2px; background:#eceee5; border:1px solid #dfe4d7; padding:0; }
.calendar-dot.tone-1 { background:#92b198; }
.calendar-dot.tone-2 { background:#678f71; }
.calendar-dot.tone-3 { background:#3b6449; }
.calendar > p { padding-block:6px; }
.map-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(245px,1fr); gap:14px; }
.map-figure { position:relative; border-radius:12px; overflow:hidden; background:#e7eeeb; border:1px solid var(--line); min-width:0; }
.map-figure canvas { width:100%; height:clamp(205px,28vw,374px); display:block; cursor:crosshair; }
.map-figure p { position:absolute; bottom:8px; right:10px; padding:3px 6px; background:#f5f7ee; font-size:10px; }
.place-panel { align-self:stretch; }
.place-panel ol,.all-places,.visits ol { padding:0; margin:14px 0; list-style:none; }
.place-panel li,.all-places li,.visits li { display:flex; gap:10px; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); padding:5px 0; color:var(--muted); font-size:13px; }
.place-name { border:0; background:none; text-align:left; font-weight:700; color:var(--ink); padding:7px 0; }
.coverage { font-size:12px; color:var(--muted); line-height:1.6; }
.memory-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.memory-card { min-width:0; display:block; text-align:left; width:100%; padding:0; border-radius:10px; overflow:hidden; border:1px solid var(--line); background:var(--sheet); }
.memory-card img { width:100%; aspect-ratio:4/3; display:block; object-fit:cover; background:#d4dfce; }
.memory-card > span { display:grid; gap:6px; padding:12px; }
.memory-card strong { font-size:15px; line-height:1.25; overflow-wrap:anywhere; }
.memory-card small { font-size:12px; color:var(--muted); }
.memory-card:hover { border-color:#749077; }
.insight { margin-top:14px; display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px; border:1px solid var(--line); border-radius:9px; background:#e2e9d8; }
.insight h3 { font-size:17px; }
.insight p { margin-top:5px; font-size:13px; color:var(--muted); }
.visits { margin:25px 0 0; }
.visits li { display:grid; grid-template-columns:minmax(0,1fr) auto auto; }
.report-footer { display:flex; flex-wrap:wrap; align-items:flex-start; gap:10px 26px; margin:clamp(38px,6vw,85px) 0 0; padding:16px 0 45px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.report-footer summary { min-height:32px; padding-block:6px; }
.report-footer details p { max-width:55ch; margin-bottom:7px; line-height:1.6; }
.report-footer > a:last-child { margin-left:auto; }
.atlas-footer { display:flex; justify-content:center; flex-wrap:wrap; gap:10px 20px; padding:18px 20px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.atlas-footer a:hover { text-decoration:underline; }
.loading { min-height:270px; padding:40px var(--gutter); }
.loading p { margin-top:10px; }
.loading a { text-decoration:underline; }
dialog { padding:0; border:1px solid var(--line); border-radius:15px; background:var(--sheet); color:var(--ink); width:min(91vw,780px); max-height:90dvh; overflow:hidden; box-shadow:0 18px 65px #142a2560; }
dialog[open] { display:flex; flex-direction:column; }
dialog::backdrop { background:#10291f91; }
.dialog-head { display:flex; padding:15px 19px; justify-content:space-between; align-items:center; gap:15px; border-bottom:1px solid var(--line); }
.dialog-head h2 { font-size:clamp(17px,3vw,24px); overflow-wrap:anywhere; }
.dialog-head button { width:36px; height:36px; font-size:23px; line-height:1; border-radius:6px; border:1px solid var(--line); background:transparent; }
#dialog-content { min-height:0; overflow:auto; padding:16px 19px 20px; }
.album-top,.album-pages { display:flex; align-items:center; justify-content:space-between; gap:7px; color:var(--muted); margin-bottom:12px; font-size:13px; }
.album-pages { justify-content:center; margin:14px 0 0; }
.album-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:9px; }
.photo-tile { display:grid; gap:5px; padding:0 0 7px; min-width:0; text-align:left; border:1px solid var(--line); border-radius:7px; overflow:hidden; background:#fffdf5; }
.photo-tile img,.no-preview { width:100%; aspect-ratio:4/3; object-fit:cover; display:grid; place-items:center; background:#e8ebe0; }
.photo-tile > span:not(.no-preview),.photo-tile small { margin:0 7px; font-size:12px; overflow-wrap:anywhere; }
.no-preview { font-size:12px; color:var(--muted); }
.photo-tile small,.photo-meta,.share-hint,.empty { color:var(--muted); }
.photo-meta { margin-bottom:10px; }
.large-photo { display:block; width:100%; max-height:65dvh; object-fit:contain; border-radius:8px; background:#e8ebe0; }
.share-opt { display:flex; align-items:center; gap:7px; font-size:14px; padding:9px 0; }
#share-preview { display:block; width:min(100%,300px); aspect-ratio:4/5; background:#18372b; height:auto; margin:9px 0; }
#share-error { font-size:13px; color:var(--muted); }
.issues { padding-left:21px; overflow-wrap:anywhere; margin:0; }
.issues li { margin:5px 0; }
@media(max-width:760px) {
  .tempo-grid,.map-grid { grid-template-columns:minmax(0,1fr); }
  .memory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .year-field span { display:none; }
  .atlas-header { min-height:63px; }
}
@media(max-width:475px) {
  .atlas-header { flex-wrap:wrap; gap:9px; }
  .atlas-header nav { width:100%; justify-content:space-between; flex-wrap:wrap; }
  .atlas-header .share-button { font-size:12px; }
  .metrics { grid-auto-flow:row; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metrics > div { padding:13px 10px; }
  .metrics > div:nth-child(odd) { border-left:0; padding-left:0; }
  .metrics > div:nth-child(n+3) { border-top:1px solid var(--line); }
  .report-nav .inline-action { margin-left:0; }
  .insight { flex-wrap:wrap; }
  .visits li { grid-template-columns:minmax(0,1fr) auto; }
  .visits li time { grid-column:1/-1; grid-row:2; }
  .report-hero h1 > strong { font-size:clamp(24px,7vw,40px); }
}
@media(prefers-reduced-motion:reduce) { :root { scroll-behavior:auto; } }
@media(forced-colors:active) {
  .bar-track i { border:1px solid CanvasText; }
  .month-mark.peak .bar-track i,.calendar-dot.tone-3 { background:Highlight; forced-color-adjust:none; }
}

.multi-year { min-height:clamp(320px,33vw,470px); }
.multi-year .hero-content { padding-block-start:clamp(28px,4.5vw,60px); }
.multi-year h1 > span { font-size:clamp(49px,10vw,145px); }
.multi-year h1 > strong { font-size:clamp(30px,4.9vw,71px); }
#map { margin-top:clamp(24px,3.3vw,48px); }
#map .chapter-head { margin-bottom:6px; }
.atlas-intro { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 16px; margin:8px 0 14px; }
.atlas-intro p { font-weight:680; }
.atlas-intro span { font-size:13px; color:var(--muted); }
.atlas-tabs { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:12px; }
.atlas-tabs button { border:1px solid var(--line); border-radius:6px; background:var(--sheet); padding:8px 12px; font-size:13px; font-weight:660; }
.atlas-tabs button[aria-pressed="true"] { background:var(--forest); color:#f4fae8; border-color:var(--forest); }
.atlas-grid { grid-template-columns:minmax(0,2.05fr) minmax(258px,1fr); }
.atlas-map { height:clamp(375px,37vw,540px); position:relative; isolation:isolate; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#e7eeeb; }
.atlas-map canvas { width:100%; height:100%; display:block; cursor:grab; touch-action:pan-y; }
.atlas-map canvas:active { cursor:grabbing; }
#map-pins { position:absolute; inset:0; pointer-events:none; }
.atlas-pin { pointer-events:auto; position:absolute; display:grid; place-items:center; transform:translate(-50%,-50%); width:25px; height:25px;
  padding:0; border:0; background:none; color:#173d2b; z-index:0; }
.atlas-pin i,.atlas-legend i { width:11px; height:11px; border-radius:50%; background:#285a41; border:1.5px solid #fbfff4; box-shadow:0 0 0 1px #285a41; }
.atlas-pin.nearby i,.atlas-legend i.approx { background:#fffdf2; border:2px solid #285a41; box-shadow:none; }
.atlas-pin.coarse i,.atlas-legend i.coarse { border-radius:2px; }
.atlas-pin span { position:absolute; margin:12px 0 0 12px; border:1px solid #d3ddce;
  border-radius:3px; padding:1px 4px; background:#f7faf1; white-space:nowrap; font-size:11px; font-weight:720; pointer-events:none; }
.atlas-pin:hover,.atlas-pin:focus-visible { z-index:1; }
.atlas-pin:hover i,.atlas-pin:focus-visible i { outline:2px solid #285a41; outline-offset:2px; }
.atlas-zoom { position:absolute; top:9px; right:9px; display:grid; gap:4px; }
.atlas-zoom button { min-height:32px; padding:4px 8px; font-size:12px; }
.atlas-legend { position:absolute; bottom:8px; left:8px; display:flex; flex-wrap:wrap; gap:6px 13px; padding:6px 8px;
  max-width:calc(100% - 16px); border:1px solid #d5ded2; border-radius:5px; background:#fbfcf3; color:var(--muted); font-size:11px; pointer-events:none; }
.atlas-legend > span { display:flex; align-items:center; gap:6px; }
.atlas-legend i { width:8px; height:8px; }
.atlas-legend i.move { height:1px; width:14px; border:0; background:none; border-top:2px dashed #674533; box-shadow:none; border-radius:0; }
.atlas-panel { align-self:start; max-height:clamp(470px,44vw,625px); overflow:auto; }
.atlas-panel h4 { margin:16px 0 5px; font-size:13px; }
.atlas-rows { list-style:none; margin:10px 0; padding:0; }
.atlas-rows li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 8px; padding:7px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.atlas-rows li small,.place-count small,.migration-summary small { display:block; color:var(--muted); font-size:11px; }
.atlas-rows li small { margin-bottom:2px; }
.atlas-rows .place-name { padding:2px 0; min-height:24px; font-size:14px; }
.place-count { display:grid; align-content:center; justify-items:end; text-align:right; }
.place-count strong { color:var(--ink); font-variant-numeric:tabular-nums; }
.city-roles { display:flex; flex-wrap:wrap; align-items:center; gap:4px; grid-column:1/-1; }
.city-role { display:inline-flex; padding:2px 5px; border-radius:4px; font-size:11px; font-weight:680; color:#274632; background:#e3edde; }
.city-role.inferred { background:transparent; border:1px dashed #889f84; }
.marked-cities > div { display:flex; flex-wrap:wrap; gap:5px; align-items:center; }
.marked-cities button { margin-right:3px; }
.migration-summary p { padding:6px 0; font-size:14px; border-bottom:1px solid var(--line); }
.atlas-credit { margin-top:7px; }
.city-detail h3 { margin-top:14px; font-size:16px; }
.city-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.city-facts div { background:#e9ede1; border-radius:6px; padding:9px; }
.city-facts dt { font-size:12px; color:var(--muted); }
.city-facts dd { margin:4px 0 0; font-size:23px; font-weight:740; }
.city-detail .city-roles { margin-top:8px; }
.city-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:14px 0; }
.role-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0 0 10px; }
.role-options label { display:flex; gap:7px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:6px; background:#f4f5ec; cursor:pointer; }
.role-options input { accent-color:var(--forest); }
.discovery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.discovery-grid article { display:flex; flex-direction:column; align-items:flex-start; min-height:155px; padding:clamp(13px,2vw,24px); border:1px solid var(--line); border-radius:10px; background:var(--sheet); }
.discovery-grid article:first-child { background:#e4edd9; border-color:#d6e2c9; }
.discovery-grid h3 { font-size:clamp(17px,1.8vw,24px); font-weight:740; line-height:1.32; letter-spacing:-.03em; }
.discovery-grid p { margin:7px 0; font-size:12px; color:var(--muted); line-height:1.6; }
.discovery-grid button { margin-top:auto; min-height:28px; }
.more-stories { margin-top:10px; font-size:14px; }
.more-stories summary { width:fit-content; padding:9px 0; }
.year-table-scroll { overflow-x:auto; margin-top:10px; }
.year-table { width:100%; min-width:360px; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; }
.year-table th,.year-table td { padding:2px 7px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap; }
.year-table th:first-child { text-align:left; padding-left:0; }
.year-table thead th { padding-block:7px; color:var(--muted); }
@media(max-width:880px) {
  .atlas-grid { grid-template-columns:minmax(0,1fr); }
  .atlas-map { height:clamp(300px,70vw,480px); }
  .atlas-panel { max-height:none; }
  .discovery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:510px) {
  .discovery-grid { grid-template-columns:1fr; }
  .discovery-grid article { min-height:122px; }
  .atlas-legend { gap:6px 9px; font-size:10px; }
}
