/* ODINT phone edition (loaded with media="(max-width: 540px)").
   The phone is composed, not shrunk: one full-bleed cover story, image-led banners
   with copy on white beneath them, one-line lists and a globe that stays in its frame.
   Selectors carry a :root prefix where older desktop-first phone rules compete. */

:root{--gutter:20px}
html{scroll-padding-top:76px}
body{font-size:14px}

/* Type scale: display 34 / title 30 / section 27 / item 18 / body 14 / label 9 */
h2{font-size:27px;line-height:1.08;letter-spacing:-.03em}
:root .section-top{display:block;margin-bottom:18px}
:root .section-top h2{font-size:27px;margin-top:10px}
:root .section-top .eyebrow{font-size:9px}
:root .section-top>.eyebrow{display:none}
:root .section-top .underlink{margin-top:10px;font-size:11px;min-height:36px;gap:14px}

/* Masthead */
:root .masthead{height:60px;gap:12px}
:root .masthead nav{top:60px}
:root .brand img{width:112px;height:auto}
:root .header-actions{gap:12px}
:root .donate{min-height:36px;padding:8px 12px;font-size:11px}

/* Home: the cover story is the one bold moment. */
:root .hero{display:block;position:relative;min-height:0;overflow:hidden;background:var(--black)}
:root .hero-visual{position:relative;display:block;height:min(66svh,540px);min-height:430px;padding:0}
:root .hero-visual::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(to top,rgba(0,0,0,.92) 0%,rgba(0,0,0,.6) 36%,rgba(0,0,0,0) 64%),linear-gradient(to bottom,rgba(0,0,0,.5) 0%,rgba(0,0,0,0) 16%)}
:root .visual-toolbar{display:none}
:root .art-stage{position:absolute;inset:0;margin:0;min-height:0;height:auto;background:var(--black)}
:root .art-stage img,:root .art-stage img.is-portrait,:root .art-stage img.is-ojeda{width:100%;height:100%;min-height:0;max-width:none;max-height:none;padding:0;object-fit:cover;object-position:50% 22%;background:var(--black)}
:root .hero-visual figcaption{position:absolute;top:14px;left:var(--gutter);z-index:2;padding:0;font:9px/1.4 var(--mono);letter-spacing:.06em;color:var(--white)}
:root .hero-visual figcaption #visual-caption{display:none}
:root .hero-visual figcaption span:last-child{display:block}
:root .carousel-controls{position:absolute;top:6px;right:var(--gutter);z-index:2;padding:0}
:root .carousel-controls button{min-height:36px;padding:4px 0;border:0;font-size:9px;color:var(--white);text-decoration:underline;text-underline-offset:4px}
:root .hero-copy{position:absolute;left:0;right:0;bottom:0;z-index:2;display:block;padding:0 var(--gutter) 22px}
:root .hero-kicker{font-size:9px;gap:6px}
:root .hero-kicker #feature-region{display:inline;margin-left:4px;padding-left:10px}
:root .hero h1,:root .hero h1.is-long{font-size:34px;line-height:1;letter-spacing:-.04em;margin:12px 0 10px;max-width:none}
:root #hero-dek{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-width:none;padding:0;font-size:13px;line-height:1.5;color:rgba(255,255,255,.86)}
:root .hero-actions{display:flex;margin-top:14px}
:root .hero .button{min-height:40px;padding:10px 16px;font-size:12px}
:root .hero-meta{display:none}

/* The three featured stories become a one-line index under the cover. */
:root .story-rail{display:block;padding:0;border-bottom:1px solid var(--black)}
:root .story-tab{display:flex;flex-direction:row;align-items:baseline;gap:10px;width:100%;min-height:46px;padding:12px var(--gutter);border:0;border-top:1px solid var(--line)}
:root .story-tab:first-child{border:0}
:root .story-tab .eyebrow{flex:0 0 92px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .story-title{min-width:0;max-width:none;padding:0;font-size:16px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .story-tab.is-active::before{top:0;bottom:0;left:0;right:auto;width:3px;height:auto}

/* "A wider field of view": swipeable cards that bleed to the screen edge. */
:root .story-collection{padding-block:34px 6px}
:root .story-collection .section-top h2{font-size:27px}
:root .collection-reel{gap:14px;margin-inline:calc(-1 * var(--gutter));padding-inline:var(--gutter);padding-bottom:14px}
:root .collection-item{flex:0 0 68%;min-width:0}
:root .collection-item figure{aspect-ratio:4/3;height:auto}
:root .collection-item figcaption{font-size:8px;padding:4px 7px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .collection-item>.eyebrow{font-size:9px;margin:10px 0 5px}
:root .collection-item h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:18px;line-height:1.2}

/* Atlas: a globe that stays in its frame, turned by hand, never flown. */
:root .homepage-atlas{padding-top:18px}
:root .odint-atlas{border:0;background:transparent}
:root .globe-toolbar{display:block;padding:0 0 12px;border:0}
:root .globe-toolbar .eyebrow,:root .globe-toolbar button{display:none}
:root .globe-toolbar p{max-width:none;margin:0;font:17px/1.25 var(--serif)}
:root .globe-hint{display:block;margin-top:5px;font:10px/1.5 var(--mono);color:var(--gray)}
:root .globe-workspace{display:block}
:root .globe-stage,:root .homepage-atlas .globe-stage{height:310px;margin-inline:calc(-1 * var(--gutter))}
:root .globe-coordinate,:root #globe-status,:root .globe-route-panel,:root .globe-journey,:root .globe-help,:root .globe-advanced,:root .globe-scope{display:none!important}
:root .odint-atlas .maplibregl-ctrl-scale,:root .odint-atlas .maplibregl-ctrl-group{display:none}
:root .globe-controls{display:flex!important;top:auto;bottom:10px;left:10px;right:auto;overflow:visible}
:root .globe-controls button{display:none}
:root .globe-controls [data-map-action="world"]{display:block;min-height:34px;min-width:0;padding:7px 11px;font-size:9px}
:root .globe-country-panel,:root .homepage-atlas .globe-country-panel{display:flex;flex-direction:column;max-height:none;padding:16px 0 0;border:0}
:root .globe-search-label,:root #globe-country-search,:root #globe-country-matches{display:none!important}
:root .globe-country-panel #country-details{padding-top:0;border:0}
:root .globe-tally,:root .homepage-atlas .globe-tally{margin-bottom:2px;font-size:9px}
:root .globe-country-panel .globe-records a,:root .homepage-atlas .globe-records a{padding:11px 0;font:16px/1.3 var(--serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .globe-records small,:root .homepage-atlas .globe-records small{margin-bottom:3px;font-size:8px}
:root .globe-country-panel .underlink,:root .homepage-atlas .globe-country-panel .underlink{min-height:40px;margin-top:8px;font-size:12px}

/* Search boxes: one bordered instrument, fields sized to avoid iOS focus zoom. */
:root .archive-section{margin-top:56px}
:root .archive-tools{grid-template-columns:1fr 1fr;border:1px solid var(--black)}
:root .archive-search{grid-column:1/-1;display:flex;align-items:center;gap:10px;min-height:48px;padding:0 12px;border-bottom:1px solid var(--black)}
:root .archive-search input{padding:12px 0;font-size:16px}
:root .archive-tools>label:not(:first-child){border-left:0}
:root .archive-tools>label:nth-child(3){border-left:1px solid var(--black)}
:root .archive-tools select{min-height:46px;padding:10px;font-size:15px}
:root .results-line{padding:12px 0;font-size:9px}
:root .result-row>.eyebrow{font-size:9px}
:root .result-row h3{font-size:19px;line-height:1.2}
:root .load-more{padding:14px;font-size:12px}

/* Infrastructure register, support and tip strip */
:root .host-section{gap:16px;margin-block:56px}
:root .host-section h2{margin:10px 0;font-size:24px}
:root .host-section p{font-size:13px}
:root .host-section .eyebrow,:root .support-content .eyebrow,:root .tip-strip .eyebrow,:root .story-collection .eyebrow{font-size:9px}
:root .host-input input,:root .full-search-field input{font-size:16px}
:root .support-scene{display:flex;flex-direction:column;min-height:0;background:var(--white);color:var(--black);border-top:1px solid var(--black)}
:root .support-scene figure{position:relative;inset:auto;order:-1;height:180px;overflow:hidden}
:root .support-scene img{position:static;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center}
:root .support-content{width:100%;min-height:0;padding:22px var(--gutter) 32px;display:block}
:root .support-content h2{margin:10px 0 12px;font-size:30px}
:root .support-content h2 br{display:none}
:root .support-content p:not(.eyebrow){max-width:none;margin-bottom:18px;font-size:14px;line-height:1.55}
:root .support-content .button-white{background:var(--black);border-color:var(--black);color:var(--white)}
:root .tip-strip{padding-block:32px}
:root .tip-strip h2{margin-top:10px;font-size:24px}

/* Investigation register page */
:root .section-workspace{padding-block:28px 40px}
:root .status-filter{flex-wrap:nowrap;gap:6px;margin:12px calc(-1 * var(--gutter)) 0;padding-inline:var(--gutter);overflow-x:auto;scrollbar-width:none}
:root .status-filter::-webkit-scrollbar{display:none}
:root .status-filter button{flex:0 0 auto;min-height:38px;padding:8px 10px;font-size:9px}
:root .status-filter #directory-reset{margin-left:0;border:0}
:root .result-counter{margin:14px 0;font-size:9px}
/* Country collections, case files and host search */
:root .country-records{padding-block:30px 0}
:root .country-records .section-top h2{font-size:27px}
:root .country-record-entry{gap:4px;padding:14px 0}
:root .country-record-entry h3{font-size:19px;line-height:1.2}
:root .country-record-entry p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:12px}
:root .full-search-field input{padding:13px 12px}

/* Reading pages */
:root .reader-shell{grid-template-columns:minmax(0,1fr);gap:18px;padding-block:22px 36px}
:root .chapter-rail,:root .reading-column{min-width:0}
:root .chapter-rail>p{margin-bottom:8px;font-size:9px}
:root .chapter-rail nav{flex-wrap:nowrap;gap:18px;max-height:none;margin-inline:calc(-1 * var(--gutter));padding-inline:var(--gutter);overflow-x:auto;scrollbar-width:none}
:root .chapter-rail nav::-webkit-scrollbar{display:none}
:root .chapter-rail nav a{max-width:none;min-height:36px;white-space:nowrap;font-size:11px}
:root .reader-identity{margin-bottom:18px;padding-bottom:14px}
:root .legacy-content{font-size:15px;line-height:1.65}
:root .legacy-content p,:root .legacy-content li{text-align:left}
:root .legacy-content h1{font-size:28px;line-height:1.08}
:root .legacy-content h2{font-size:24px;line-height:1.12}
:root .legacy-content h3{font-size:19px;line-height:1.2}
:root .next-section{padding-block:30px}
:root .next-section h2{font-size:24px}
:root .legacy-content .scene--dark{padding:22px 20px}
:root .legacy-content .scene--dark>*{padding-block:4px}
:root .legacy-content .scene--dark p{font-size:15px;line-height:1.6}
:root .story-tab:hover{background:transparent;color:var(--black)}
:root .story-tab:hover .eyebrow{color:inherit}
:root .story-tab.is-active .eyebrow{color:var(--red)}

/* Narrow phones: the masthead must never push the page sideways. */
body{overflow-x:clip}
@media(max-width:360px){:root .brand img{width:96px}:root .header-actions{gap:8px}:root .donate{padding:7px 9px}}

/* Banners: the title sits inside the image, legible on a dark fade. Text-only pages stay on paper. */
:root .page-marquee{display:flex;flex-direction:column;min-height:0;overflow:hidden;background:var(--paper);color:var(--black);border-bottom:1px solid var(--black)}
:root .page-marquee .marquee-copy{display:block;width:auto;min-height:0;max-width:none;margin:0;padding:26px var(--gutter);border:0}
:root .page-marquee h1{margin:10px 0;font-size:32px;line-height:1.04;letter-spacing:-.035em;overflow-wrap:break-word}
:root .page-marquee .marquee-summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;max-width:none;padding:0;border:0;font-size:14px;line-height:1.5}
:root .page-marquee .marquee-actions{margin-top:10px;gap:16px}
:root .page-marquee .marquee-actions .button{display:none}
:root .page-marquee .text-action{min-height:36px;padding:6px 0;font-size:11px;text-decoration:underline;text-underline-offset:4px}
:root .page-marquee--source{position:relative;justify-content:flex-end;min-height:clamp(360px,60svh,470px);isolation:isolate;background:var(--black);color:var(--white);border:0}
:root .page-marquee--source::after{content:"";display:block;position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(to top,rgba(0,0,0,.94) 0%,rgba(0,0,0,.66) 36%,rgba(0,0,0,.08) 68%),linear-gradient(to bottom,rgba(0,0,0,.45) 0%,rgba(0,0,0,0) 20%)}
:root .page-marquee--source figure{position:absolute;inset:0;z-index:auto;display:block;height:auto;aspect-ratio:auto;margin:0;padding:0;background:var(--black)}
:root .page-marquee--source figure img{position:static;width:100%;height:100%;max-height:none;object-fit:cover;object-position:50% 30%;transform:none}
:root .page-marquee--source figcaption{position:absolute;top:12px;left:var(--gutter);right:auto;bottom:auto;z-index:2;display:block;max-width:calc(100% - 2 * var(--gutter));padding:0;background:none;color:rgba(255,255,255,.8);font:8px/1.4 var(--mono);text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .page-marquee--source figcaption a{color:inherit}
:root .page-marquee--source .marquee-copy{position:relative;z-index:2;padding:0 var(--gutter) 24px}
:root .page-marquee--source .marquee-summary{-webkit-line-clamp:2;font-size:13px;color:rgba(255,255,255,.86)}
:root .page-marquee--source .text-action{color:var(--white)}

/* Register rows: a lead story, then thumbnails; a touch turns the row black. */
:root .result-row,:root .illustrated-row{margin-inline:calc(-1 * var(--gutter));padding-inline:var(--gutter);transition:background-color .15s,color .15s}
:root .result-row:active,:root .illustrated-row:active{background:var(--black);color:var(--white)}
:root .result-row:active .save-button svg{stroke:var(--white)}
:root .result-row{grid-template-columns:84px minmax(0,1fr) 32px;gap:4px 12px;padding-block:14px;align-items:start}
:root .result-thumb{display:block;grid-column:1;grid-row:1/span 2;width:84px;height:84px;overflow:hidden;background:var(--paper)}
:root .result-thumb img{width:100%;height:100%;object-fit:cover;filter:grayscale(1);transition:filter .35s ease}
:root .result-row>.eyebrow{grid-column:2;grid-row:1;padding:0;font-size:8px}
:root .result-row .record-status{display:inline;margin:0 0 0 8px;font-size:8px}
:root .result-row>div:not(.record-location){grid-column:2;grid-row:2}
:root .result-row .save-button{grid-column:3;grid-row:1/span 2;width:32px}
:root .result-row h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:18px;line-height:1.2}
:root .result-row p{display:none}
:root .result-row:first-child{grid-template-columns:minmax(0,1fr) 32px;padding-top:0;border-top:0}
:root .result-row:first-child .result-thumb{grid-column:1/-1;grid-row:1;width:auto;height:auto;aspect-ratio:16/9;margin:0 calc(-1 * var(--gutter)) 10px}
:root .result-row:first-child>.eyebrow{grid-column:1;grid-row:2}
:root .result-row:first-child>div:not(.record-location){grid-column:1;grid-row:3}
:root .result-row:first-child .save-button{grid-column:2;grid-row:2/span 2}
:root .result-row:first-child h3{font-size:24px}
:root .result-row:first-child p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:6px;font-size:13px;line-height:1.5}
:root .illustrated-row{grid-template-columns:96px minmax(0,1fr);gap:14px;padding-block:16px;align-items:start}
:root .row-art{grid-column:auto;width:96px;height:96px}
:root .row-credit,:root .illustrated-row p,:root .row-read,:root .row-bookmark{display:none}
:root .illustrated-row .eyebrow{display:block;font-size:8px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .illustrated-row h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin:6px 0 0;font-size:18px;line-height:1.2}
:root .illustrated-row:first-child{grid-template-columns:minmax(0,1fr);gap:10px;border-top:0}
:root .illustrated-row:first-child .row-art{width:auto;height:auto;aspect-ratio:16/9;margin-inline:calc(-1 * var(--gutter))}
:root .illustrated-row:first-child h3{font-size:24px}
:root .illustrated-row:first-child p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:6px;font-size:13px;line-height:1.5}

/* Atlas country chooser: chips for the most documented countries, a sheet for all of them. */
/* The native select stays as the fallback until globe.js has rendered the chips. */
:root .has-chooser .globe-country-panel>label[for="country-select"],:root .has-chooser .globe-country-panel #country-select{display:none}
:root .globe-country-panel #country-select{min-height:46px;margin:0 0 12px;padding:10px 12px;border:1px solid var(--black);font:16px/1.3 var(--sans)}
:root .has-chooser .globe-chooser{display:block;margin-bottom:16px}
:root .globe-chooser>.eyebrow{margin-bottom:8px;font-size:9px}
:root .globe-chips{display:flex;flex-wrap:wrap;gap:6px}
:root .globe-chips button{display:inline-flex;align-items:baseline;gap:7px;min-height:38px;padding:8px 12px;border:1px solid var(--black);background:var(--white);font-size:13px}
:root .globe-chips small{font:9px var(--mono);color:var(--red)}
:root .globe-chips button[aria-pressed="true"]{background:var(--black);color:var(--white)}
:root .globe-chips button[aria-pressed="true"] small{color:var(--white)}
:root .globe-all{min-height:40px;margin-top:8px;padding:0;font-size:12px;text-decoration:underline;text-underline-offset:4px}
:root .globe-country-panel #country-details{padding-top:14px;border-top:1px solid var(--black)}
:root .country-sheet{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:78svh;margin:0;padding:0;border:0;border-top:2px solid var(--black)}
:root .country-sheet[open]{display:flex;flex-direction:column}
:root .country-sheet .dialog-top{padding:12px var(--gutter)}
:root .country-sheet .dialog-top h2{font-size:22px}
:root .country-sheet input{flex:none;width:auto;min-height:44px;margin:12px var(--gutter);padding:10px 12px;border:1px solid var(--black);font-size:16px}
:root .country-sheet-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-auto-rows:auto;align-content:start;flex:1 1 auto;min-height:0;column-gap:14px;padding:0 var(--gutter) 24px;overflow-y:auto;overscroll-behavior:contain}
:root .country-sheet-grid button{display:flex;flex-direction:column;align-items:flex-start;min-height:52px;padding:8px 0;border-top:1px solid var(--line);text-align:left;font:16px/1.2 var(--serif)}
:root .country-sheet-grid button span{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .country-sheet-grid small{margin-top:3px;font:8px var(--mono);text-transform:uppercase;letter-spacing:.06em}
:root .country-sheet-grid button[aria-pressed="true"]{color:var(--red)}

/* Atlas page index: the most documented countries as map plates, then every country. */
:root .country-leaders{display:block;margin-top:34px}
:root .country-leaders>.eyebrow{margin-bottom:10px;font-size:9px}
:root .country-leader-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
:root .country-leader-grid a{display:block;border:1px solid var(--black);background:var(--white);transition:background-color .15s,color .15s}
:root .country-leader-grid a:active{background:var(--black);color:var(--white)}
:root .country-leader-grid img{display:block;width:100%;aspect-ratio:1;object-fit:cover;background:var(--paper);border-bottom:1px solid var(--black)}
:root .country-leader-grid strong{display:block;padding:9px 10px 0;font:400 18px/1.15 var(--serif)}
:root .country-leader-grid span{display:block;padding:3px 10px 10px;font:8px var(--mono);text-transform:uppercase;letter-spacing:.06em}
:root .country-directory{margin-top:30px}
:root .country-directory>label{font-size:9px}
:root .country-directory>input{min-height:46px;margin:8px 0 14px;padding:11px 12px;border:1px solid var(--black);font-size:16px}
:root .country-index{grid-template-columns:1fr 1fr;column-gap:16px}
:root .country-index>a{flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-height:52px;padding:8px 0;font:16px/1.2 var(--serif)}
:root .country-index>a>span:first-child{max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root .country-index .eyebrow{font-size:8px}

/* Case files: the register is a title list; the image waits on the case page. */
:root .case-register-row{grid-template-columns:1fr;gap:6px;min-height:0;margin-inline:calc(-1 * var(--gutter));padding:22px var(--gutter)}
:root .case-register-row img,:root .case-register-copy small{display:none}
:root .case-register-id{font-size:10px}
:root .case-register-copy strong{font-size:28px;line-height:1.05}
:root .case-register-row:active{background:var(--black);color:var(--white)}
