:root {
  --ink: #f7f1e8;
  --muted: #aeb8be;
  --wine: #6f1424;
  --wine-bright: #a82b3e;
  --wine-deep: #240810;
  --night: #11111f;
  --plum: #2c2d48;
  --paper: #eee2cf;
  --gold: #efbc51;
  --gold-soft: #d9a842;
  --line: rgba(239, 188, 81, .22);
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --max: 1240px;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

html[lang="mk"] {
  --sans: "Noto Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --serif: "Noto Serif", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body { margin: 0; color: var(--ink); background: linear-gradient(138deg, #0b0b15 0%, #17172a 22%, #2c2d48 48%, #241a32 72%, #120c18 100%); background-attachment: fixed; font-family: var(--sans); line-height: 1.65; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 82% 8%, rgba(119, 43, 81, .25), transparent 34%), radial-gradient(circle at 8% 72%, rgba(79, 65, 122, .2), transparent 32%), radial-gradient(circle at 48% 42%, rgba(38, 31, 73, .18), transparent 45%), linear-gradient(120deg, transparent, rgba(239, 188, 81, .025)); z-index: -2; }
.page-noise { position: fixed; inset: 0; pointer-events: none; opacity: .18; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 100; padding: .65rem 1rem; background: var(--gold); color: #261006; transform: translateY(-160%); border-radius: 999px; font-weight: 800; }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.intro-splash { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 1.4rem; pointer-events: none; background: radial-gradient(circle at center, #2c2d48 0%, #171727 48%, #08080e 100%); transition: opacity .65s ease, visibility .65s ease; animation: splash-fallback .65s ease 1.05s forwards; }
.intro-splash.is-finished { opacity: 0; visibility: hidden; }
.intro-splash p { margin: 0; font: 500 clamp(2rem,5vw,4rem)/1 var(--serif); letter-spacing: -.04em; }
.intro-splash p span { color: var(--gold); font-style: italic; }
.splash-sun { position: relative; width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; animation: splash-spin 8s linear infinite; }
.splash-sun::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 32px rgba(239,188,81,.75); }
.splash-sun i { position: absolute; left: 50%; width: 32px; height: 1px; background: var(--gold); transform: rotate(calc(var(--i) * 45deg)) translateX(20px); transform-origin: 0 50%; }
.splash-sun i:nth-child(1){--i:0}.splash-sun i:nth-child(2){--i:1}.splash-sun i:nth-child(3){--i:2}.splash-sun i:nth-child(4){--i:3}.splash-sun i:nth-child(5){--i:4}.splash-sun i:nth-child(6){--i:5}.splash-sun i:nth-child(7){--i:6}.splash-sun i:nth-child(8){--i:7}
.splash-line { width: 220px; height: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.splash-line b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: splash-load 1s ease both; transform-origin: left; }

.site-header { position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, height .3s; }
.site-header.scrolled { height: 68px; background: rgba(15, 14, 28, .9); border-color: var(--line); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; letter-spacing: -.03em; }
.brand span:last-child { display: flex; align-items: baseline; gap: .28rem; }
.brand b { font-family: var(--serif); font-size: 1.22rem; }
.brand em { color: var(--gold); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; font-style: normal; font-weight: 800; }
.brand-mark { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; }
.brand-mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px var(--gold); }
.brand-mark i { position: absolute; width: 13px; height: 1px; background: var(--gold); transform: rotate(calc(var(--i) * 45deg)) translateX(10px); transform-origin: 0 50%; }
.brand-mark i:nth-child(1){--i:0}.brand-mark i:nth-child(2){--i:1}.brand-mark i:nth-child(3){--i:2}.brand-mark i:nth-child(4){--i:3}.brand-mark i:nth-child(5){--i:4}.brand-mark i:nth-child(6){--i:5}.brand-mark i:nth-child(7){--i:6}.brand-mark i:nth-child(8){--i:7}
.site-header nav { display: flex; align-items: center; gap: 1.5rem; }
.site-header nav > a { text-decoration: none; color: var(--muted); font-size: .82rem; font-weight: 700; }
.site-header nav > a:hover { color: var(--ink); }
.search-trigger { display: flex; align-items: center; gap: 1.2rem; border: 1px solid var(--line); padding: .55rem .65rem .55rem .9rem; border-radius: 999px; background: rgba(255,255,255,.035); cursor: pointer; font-size: .78rem; }
.mobile-menu { position: relative; display: none; }
.mobile-menu summary { min-height: 42px; display: grid; place-items: center; padding: 0 .85rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.035); cursor: pointer; list-style: none; font-size: .72rem; font-weight: 800; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary { color: #281307; background: var(--gold); }
.mobile-menu > div { position: absolute; top: calc(100% + .75rem); right: 0; min-width: 190px; display: grid; gap: .25rem; padding: .55rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(20,19,37,.98); box-shadow: var(--shadow); }
.mobile-menu > div a { padding: .7rem .8rem; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .82rem; font-weight: 700; }
.mobile-menu > div a:hover, .mobile-menu > div a:focus-visible { background: rgba(255,255,255,.07); }
kbd { border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.06); border-radius: 5px; padding: .08rem .35rem; color: var(--muted); font: inherit; }

main { min-height: 80vh; }
.loading-shell { min-height: 100vh; display: grid; place-content: center; text-align: center; }
.loading-shell h1 { font: 500 clamp(3rem, 9vw, 8rem)/.85 var(--serif); margin: .5rem 0; }
.eyebrow { margin: 0; color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; font-weight: 800; }
.shell { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }

.hero { position: relative; min-height: 96vh; display: flex; align-items: flex-end; overflow: clip; padding: 150px 0 86px; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,11,17,.95) 0%, rgba(7,16,25,.62) 53%, rgba(12,14,20,.16) 100%), linear-gradient(0deg, var(--night), transparent 38%); }
.hero-media { position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr .85fr; gap: 10px; transform: scale(1.03); opacity: .58; filter: saturate(.75) sepia(.08); }
.hero-media .hero-main { grid-row: span 2; background-position: center; }
.hero-media div { background-size: cover; background-position: center; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(111,14,28,.18), rgba(239,188,81,.09)); mix-blend-mode: color; }
.hero .shell { position: relative; z-index: 1; }
.hero-orbit { position: absolute; z-index: 1; right: 9vw; top: 18%; width: min(28vw,390px); aspect-ratio: 1; border: 1px solid rgba(239,188,81,.15); border-radius: 50%; pointer-events: none; animation: orbit-pulse 5s ease-in-out infinite; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; border: 1px solid rgba(239,188,81,.1); border-radius: 50%; inset: 16%; }.hero-orbit::after { inset: 34%; background: rgba(239,188,81,.025); }
.hero-copy { max-width: 760px; }
.hero h1 { margin: 1rem 0 1.4rem; font: 500 clamp(3.7rem, 8.7vw, 7.7rem)/.82 var(--serif); letter-spacing: -.065em; text-wrap: balance; }
.hero h1 .gold { color: var(--gold); font-style: italic; font-weight: 400; }
.hero-lede { max-width: 620px; margin: 0 0 2rem; color: #d6cbc3; font-size: clamp(1rem, 1.7vw, 1.28rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .72rem 1.15rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .8rem; font-weight: 800; cursor: pointer; background: transparent; }
.button.primary { color: #281307; background: var(--gold); border-color: var(--gold); }
.button:hover { transform: translateY(-2px); }
.hero-index { position: absolute; right: max(24px, calc((100vw - var(--max))/2)); bottom: 88px; z-index: 2; display: flex; align-items: center; gap: .7rem; color: var(--muted); writing-mode: vertical-rl; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.hero-index::before { content: ""; height: 70px; width: 1px; background: var(--gold); }

.section { padding: clamp(74px, 10vw, 140px) 0; }
.section-head { display: grid; grid-template-columns: .6fr 1.4fr; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.section-head h2 { margin: 0; font: 500 clamp(2.7rem, 5.5vw, 5rem)/.92 var(--serif); letter-spacing: -.045em; }
.section-head p:last-child { margin: 0; max-width: 570px; justify-self: end; color: var(--muted); }

.country-story { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem,8vw,8rem); align-items: start; }
.country-title { position: sticky; top: 115px; }
.country-title h2 { margin: .9rem 0 1.5rem; font: 500 clamp(3.2rem,6.5vw,6.2rem)/.88 var(--serif); letter-spacing: -.055em; }
.country-title h2 em { color: var(--gold); font-weight: 400; }
.country-title > p { color: var(--muted); max-width: 520px; }
.country-chapters article { display: grid; grid-template-columns: 44px 120px 1fr; gap: 1rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.country-chapters article:last-of-type { border-bottom: 1px solid var(--line); }
.country-chapters span { color: var(--gold); font-size: .7rem; font-weight: 800; }
.country-chapters h3 { margin: 0; font: 500 1.7rem/1 var(--serif); }
.country-chapters p { margin: 0; color: var(--muted); }
.country-source { display: grid; gap: .12rem; width: fit-content; margin-top: 2rem; padding: 1rem 1.15rem; border-left: 2px solid var(--gold); background: rgba(255,255,255,.025); }
.country-source span, .country-source small { color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; }
.country-citations { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.country-citations strong { width: 100%; font: 500 1.1rem var(--serif); }
.country-citations a { padding: .42rem .68rem; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .65rem; }
.country-facts-section { padding-top: 0; }
.country-facts-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.country-fact-card { position: relative; min-height: 260px; padding: 1.7rem; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); overflow: hidden; }
.country-fact-card::after { content: ""; position: absolute; right: -45px; bottom: -55px; width: 150px; aspect-ratio: 1; border: 1px solid rgba(239,188,81,.12); border-radius: 50%; box-shadow: 0 0 0 24px rgba(239,188,81,.025), 0 0 0 48px rgba(239,188,81,.018); pointer-events: none; }
.country-fact-card > span { color: var(--gold); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.country-fact-card h3 { margin: 1.35rem 0 .7rem; font: 500 1.8rem/1.05 var(--serif); }
.country-fact-card p { position: relative; z-index: 1; margin: 0 0 1.2rem; color: var(--muted); }
.country-fact-card .item-source { position: relative; z-index: 1; }

.atlas-panel { position: relative; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(300px,.75fr); background: linear-gradient(145deg, #2a2b47, #151526 58%, #24131f); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
.map-wrap { min-height: 650px; display: grid; place-items: center; padding: 3rem; background: radial-gradient(circle, rgba(109,86,151,.2), transparent 63%), linear-gradient(145deg,rgba(255,255,255,.018),transparent); }
.map-wrap svg { width: min(100%, 720px); overflow: visible; filter: drop-shadow(0 28px 40px rgba(0,0,0,.28)); }
.map-shape { fill: #342023; stroke: #9f7a38; stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .2s, transform .2s, filter .2s; transform-box: fill-box; transform-origin: center; }
.map-link:hover .map-shape, .map-link:focus .map-shape, .map-link.active .map-shape { fill: var(--wine-bright); filter: drop-shadow(0 0 7px rgba(239,188,81,.5)); transform: scale(1.018); }
.map-label { fill: #f6efe4; stroke: rgba(7,16,25,.95); stroke-width: 2.1px; paint-order: stroke fill; font: 700 7px/1 var(--sans); letter-spacing: -.03em; pointer-events: none; transition: fill .2s, transform .2s; transform-box: fill-box; transform-origin: center; }
.map-labels { animation: map-label-reveal .9s .25s both; }
.map-water { fill: none; stroke: rgba(117,179,195,.28); stroke-width: 3; stroke-linecap: round; pointer-events: none; }
.map-side { padding: 3.2rem 2.7rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.map-side h3 { font: 500 2.6rem/1 var(--serif); margin: .5rem 0 1rem; }
.map-side p { color: var(--muted); }
.map-hover { margin-top: 2.5rem; min-height: 150px; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.map-hover strong { display: block; font: 500 2rem/1 var(--serif); }
.map-hover span { color: var(--gold); font-size: .76rem; }

.fact-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { min-width: 0; padding: 2rem; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact strong { display: block; font: 500 clamp(2rem,4vw,4rem)/1 var(--serif); color: var(--gold); }
.fact span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }

.city-quick-nav { display: flex; gap: .45rem; overflow-x: auto; padding: 0 0 1.4rem; margin-bottom: 1.2rem; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.city-quick-nav button { flex: 0 0 auto; padding: .48rem .78rem; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.025); cursor: pointer; font-size: .69rem; font-weight: 700; }
.city-quick-nav button:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.city-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.1rem; }
.city-card { position: relative; min-height: 400px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.09); background: #10202a; text-decoration: none; isolation: isolate; }
.city-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,12,18,.98), rgba(7,18,25,.08) 72%); z-index: -1; }
.city-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: saturate(.62) sepia(.08); transition: transform .55s, filter .55s; }
.city-card:hover img { transform: scale(1.055); filter: saturate(.88); }
.city-card-content { position: absolute; inset: auto 1.5rem 1.35rem; }
.city-card-meta { display: flex; justify-content: space-between; color: var(--gold); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; }
.city-card h3 { margin: .45rem 0 .25rem; font: 500 2.1rem/1 var(--serif); }
.city-card p { margin: 0; color: #cbbfb8; font-size: .82rem; line-height: 1.45; }

.archive-callout { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); min-height: 580px; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: var(--paper); color: #25171a; }
.archive-collage { position: relative; min-width: 0; min-height: 500px; background: #5f1720; }
.archive-collage img { position: absolute; width: 52%; height: 56%; object-fit: cover; filter: sepia(.58) contrast(1.03); border: 8px solid #eee3d3; box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.archive-collage img:nth-child(1) { left: 8%; top: 10%; transform: rotate(-5deg); }
.archive-collage img:nth-child(2) { right: 6%; bottom: 8%; transform: rotate(5deg); }
.archive-copy { min-width: 0; padding: clamp(2.5rem,6vw,5rem); display: flex; flex-direction: column; justify-content: center; }
.archive-copy .eyebrow { color: var(--wine); }
.archive-copy h2 { margin: 1rem 0; font: 500 clamp(3rem,6vw,5.6rem)/.9 var(--serif); letter-spacing: -.05em; }
.archive-copy p { color: #5d4c4e; }

.source-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.source-item { display: block; padding: 1.5rem; background: #170e10; text-decoration: none; }
.source-item strong { display: block; }
.source-item span { color: var(--muted); font-size: .78rem; }
.source-item:hover strong { color: var(--gold); }

.city-hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; padding: 150px 0 75px; overflow: hidden; }
.city-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(.65); transform: scale(1.02); }
.city-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #071019 2%, rgba(7,16,25,.24) 75%), linear-gradient(90deg, rgba(5,12,18,.92), transparent 72%); }
.city-hero-wash { position: absolute; z-index: 1; inset: 0; background: radial-gradient(circle at 78% 35%, rgba(111,20,36,.16), transparent 30%); mix-blend-mode: screen; }
.city-hero .shell { position: relative; z-index: 1; }
.back-link { display: inline-flex; gap: .55rem; align-items: center; color: var(--muted); text-decoration: none; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.city-title-row { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.city-hero h1 { margin: 1.4rem 0 .4rem; font: 500 clamp(4rem,10vw,8.2rem)/.78 var(--serif); letter-spacing: -.065em; }
.city-native { color: var(--gold); font-size: clamp(1rem,2vw,1.5rem); }
.city-crest-wrap { display: grid; place-items: center; width: 128px; min-height: 144px; padding: 1rem; border: 1px solid var(--line); border-radius: 24px; background: rgba(5,12,18,.48); backdrop-filter: blur(16px); }
.city-crest { width: 100%; max-height: 116px; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(0,0,0,.45)); }
.city-subline { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2rem; color: #d6cbc4; }
.city-subline span { display: flex; align-items: center; gap: .5rem; }
.city-subline span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.city-body { padding: 80px 0 130px; }
.city-intro { display: grid; grid-template-columns: .7fr 1.3fr; gap: 4rem; padding-bottom: 70px; border-bottom: 1px solid var(--line); }
.city-intro h2 { margin: 0; font: 500 2.2rem/1 var(--serif); color: var(--gold); }
.city-intro .lead { margin: 0; font: 500 clamp(1.25rem,2.1vw,1.9rem)/1.42 var(--serif); color: #e5dcd4; }
.tabs { position: sticky; top: 67px; z-index: 10; display: flex; gap: .25rem; padding: 1rem 0; margin: 2rem 0 3rem; background: rgba(20,19,37,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.tab { flex: 0 0 auto; border: 0; padding: .65rem 1rem; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.tab.active { background: var(--gold); color: #271307; }
.tab-panel[hidden] { display: none; }
.known-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.known-card { min-height: 170px; padding: 1.5rem; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; background: linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012)); }
.known-card span { color: var(--gold); font-size: .68rem; font-weight: 700; }
.known-card p { margin: 2.2rem 0 0; font: 500 1.35rem/1.25 var(--serif); }
.people-head { margin-top: 6rem; }
.people-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.person-card { padding: 1.6rem; border-top: 1px solid var(--line); background: rgba(255,255,255,.018); }
.person-card > div { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(145deg,var(--wine),#1b3542); color: var(--gold); font-size: .72rem; font-weight: 700; }
.person-card h3 { margin: 1.2rem 0 .45rem; font: 500 1.45rem/1 var(--serif); }
.person-card p, .quiet-note { color: var(--muted); font-size: .83rem; }
.overview-prose { max-width: 920px; margin: 0; }
.overview-prose p:first-child::first-letter { float: none; margin: 0; color: inherit; font: inherit; }
.stats-head, .known-head { margin-top: 6rem; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; margin: 0; padding: 1px; background: var(--line); border-radius: 18px; overflow: hidden; }
.stat-card { min-height: 130px; padding: 1.35rem; background: linear-gradient(145deg,rgba(43,43,72,.98),rgba(22,19,35,.98)); }
.stat-card.wide { grid-column: 1 / -1; }
.stat-card dt { color: var(--gold); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.stat-card dd { margin: 1.25rem 0 0; font: 500 1.35rem/1.25 var(--serif); }
.facts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.fact-card { display: grid; grid-template-columns: 46px 1fr; gap: 1.1rem; padding: 1.5rem; border: 1px solid rgba(255,255,255,.09); border-radius: 18px; background: linear-gradient(145deg,rgba(49,47,78,.5),rgba(16,14,27,.68)); }
.fact-card > span { color: var(--gold); font-size: .7rem; font-weight: 800; }
.fact-card h3 { margin: 0 0 .65rem; font: 500 1.65rem/1.05 var(--serif); }
.fact-card p { margin: 0; color: #d5cbd2; font-size: .9rem; }
.item-source { display: inline-flex; margin-top: .9rem; color: var(--gold); font-size: .64rem; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.celebrity-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.celebrity-card { display: grid; grid-template-columns: 92px 1fr; gap: 1.25rem; min-height: 230px; padding: 1.35rem; border-top: 1px solid var(--line); background: linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.012)); }
.celebrity-portrait { width: 92px; height: 112px; display: grid; place-items: center; overflow: hidden; border-radius: 46px 46px 14px 14px; color: var(--gold); background: linear-gradient(150deg,var(--wine),#39345d); font-weight: 800; }
.celebrity-portrait img { width: 100%; height: 100%; object-fit: cover; }
.celebrity-type { margin: 0; color: var(--gold); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.celebrity-card h3 { margin: .35rem 0 .65rem; font: 500 1.55rem/1 var(--serif); }
.celebrity-card .celebrity-copy > p:not(.celebrity-type) { margin: 0; color: #d1c7cf; font-size: .84rem; }
.celebrity-card small { display: block; margin-top: .8rem; color: var(--muted); font-size: .7rem; }
.village-tools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; color: var(--muted); }
.village-tools label { display: grid; gap: .5rem; width: min(100%,460px); color: var(--gold); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.village-tools input { width: 100%; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: var(--ink); background: rgba(14,12,25,.68); outline: none; }
.village-tools input:focus { border-color: var(--gold); }
.village-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.village-card { min-height: 150px; padding: 1.2rem; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.022); }
.village-card[hidden] { display: none; }
.village-card h3 { margin: 0 0 .55rem; font: 500 1.25rem/1 var(--serif); }
.village-card p { margin: 0; color: var(--muted); font-size: .79rem; }
.monastery-head { margin-top: 7rem; }
.monastery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.monastery-card { min-height: 210px; padding: 1.6rem; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(circle at 100% 0,rgba(239,188,81,.08),transparent 45%),rgba(255,255,255,.018); }
.monastery-card h3 { margin: .7rem 0; font: 500 1.8rem/1 var(--serif); }
.monastery-card > p:not(.eyebrow) { color: var(--muted); }
.overview-image { position: relative; margin: 6rem 0 0; height: min(64vw,690px); border-radius: 24px; overflow: hidden; }
.overview-image img { width: 100%; height: 100%; object-fit: cover; }
.overview-image figcaption { position: absolute; left: 1rem; bottom: 1rem; padding: .55rem .8rem; border-radius: 999px; color: #f7f1e8; background: rgba(5,12,18,.75); backdrop-filter: blur(10px); font-size: .7rem; }
.reading-prose { max-width: 820px; margin: 0 auto; font: 400 clamp(1.15rem,1.7vw,1.42rem)/1.75 var(--serif); color: #e1d9d2; }
.reading-prose p { margin: 0 0 2rem; }
.reading-prose p:first-child::first-letter { float: left; margin: .12rem .55rem 0 0; color: var(--gold); font: 500 4.8rem/.68 var(--serif); }
.legacy-details { max-width: 900px; margin: 5rem auto 0; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(111,20,36,.06); }
.legacy-details summary { cursor: pointer; color: var(--gold); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.legacy-details .prose { margin-top: 2rem; }
.profile-sources { max-width: 900px; margin: 2rem auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.profile-sources h3 { width: 100%; margin: 0 0 .5rem; font: 500 1.3rem var(--serif); }
.profile-sources a { padding: .45rem .7rem; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .68rem; }
.history-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 5rem; }
.prose { max-width: 760px; }
.prose p { color: #d2c7c0; margin: 0 0 1.3rem; }
.prose p:first-child::first-letter { float: left; margin: .1rem .55rem 0 0; color: var(--gold); font: 500 4.7rem/.72 var(--serif); }
.editorial-note { position: sticky; top: 155px; align-self: start; padding: 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(114,15,28,.08); }
.editorial-note strong { color: var(--gold); }
.editorial-note p { margin: .6rem 0 0; color: var(--muted); font-size: .79rem; }
.media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.media-button { position: relative; display: block; aspect-ratio: 4/3; padding: 0; border: 0; border-radius: 13px; overflow: hidden; background: #261719; cursor: zoom-in; }
.media-button img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .4s; }
.media-button:hover img { transform: scale(1.04); filter: brightness(1.08); }
.media-button::after { content: "↗"; position: absolute; right: .7rem; bottom: .7rem; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(16,8,9,.75); }
.media-source { position: absolute; left: .7rem; bottom: .7rem; z-index: 2; padding: .35rem .55rem; border-radius: 999px; color: #241307; background: var(--gold); font-size: .59rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.empty-state { padding: 3rem; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }

.search-dialog { width: min(760px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: #1a192b; box-shadow: var(--shadow); }
.search-dialog::backdrop, .lightbox::backdrop { background: rgba(8,4,5,.78); backdrop-filter: blur(10px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); font-weight: 800; }
.dialog-top button { border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: .7rem; }
.search-field { display: block; padding: 1.3rem; }
.search-field input { width: 100%; padding: 1.1rem; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: var(--ink); background: #11101d; outline: none; font-size: 1.05rem; }
.search-field input:focus { border-color: var(--gold); }
.search-results { max-height: 420px; overflow: auto; padding: 0 .8rem .8rem; }
.search-summary { position: sticky; top: 0; z-index: 1; margin: 0; padding: .7rem .75rem; color: var(--muted); background: #1a192b; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.search-result { display: grid; grid-template-columns: 28px 48px 1fr auto; gap: .9rem; align-items: center; padding: .75rem; border-radius: 11px; text-decoration: none; }
.search-result:hover { background: rgba(239,188,81,.08); }
.search-rank { color: var(--gold); font-size: .64rem; font-weight: 800; }
.search-result img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.search-result small { display: block; color: var(--muted); }
.search-result > span:last-child { color: var(--gold); font-size: .72rem; }

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(9,5,6,.94); color: var(--ink); }
.lightbox figure { height: 100%; margin: 0; padding: 3rem 7rem; display: grid; place-items: center; grid-template-rows: minmax(0,1fr) auto; }
.lightbox img { max-height: calc(100vh - 8rem); max-width: 100%; object-fit: contain; box-shadow: 0 25px 80px rgba(0,0,0,.5); }
.lightbox figcaption { padding: .8rem; color: var(--muted); font-size: .75rem; }
.lightbox-close, .lightbox-nav { position: fixed; z-index: 2; border: 1px solid var(--line); border-radius: 50%; background: rgba(28,16,18,.75); cursor: pointer; }
.lightbox-close { top: 1.2rem; right: 1.2rem; width: 45px; height: 45px; font-size: 1.7rem; }
.lightbox-nav { top: 50%; width: 48px; height: 48px; transform: translateY(-50%); }
.lightbox-prev { left: 1.2rem; }.lightbox-next { right: 1.2rem; }

.noscript { width: min(calc(100% - 48px), 860px); margin: 0 auto; padding: 8rem 0; text-align: left; }
.noscript h1 { margin: .5rem 0 1rem; font: 500 clamp(3rem, 8vw, 7rem)/.9 var(--serif); }
.noscript h2 { margin-top: 2.5rem; font: 500 2rem var(--serif); }
.noscript p { color: var(--muted); line-height: 1.75; }
.noscript-cities { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0 2rem; }
.noscript-cities a { border: 1px solid var(--line); border-radius: 999px; padding: .45rem .75rem; color: var(--ink); }
.noscript-note { width: min(calc(100% - 48px), var(--max)); margin: 0 auto 4rem; color: var(--muted); text-align: center; }
.static-city figure { margin: 2rem 0; }
.static-city figure img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 18px; }
.static-media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.static-city .static-media-grid figure { min-width: 0; margin: 0; }
.static-city .static-media-grid img { display: block; aspect-ratio: 4/3; max-height: none; object-fit: cover; }
.static-media-grid figcaption { padding: .55rem .15rem 1rem; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.static-city dt { margin-top: 1rem; color: var(--gold); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.static-city dd { margin: .25rem 0 0; color: var(--muted); }
.static-city a { overflow-wrap: anywhere; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
main.page-enter { animation: page-enter .55s ease both; }

@keyframes splash-spin { to { transform: rotate(360deg); } }
@keyframes splash-load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes splash-fallback { to { opacity: 0; visibility: hidden; } }
@keyframes orbit-pulse { 0%,100% { transform: scale(.98); opacity: .55; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes map-label-reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes page-enter { from { opacity: .2; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .site-header nav > a { display: none; }
  .mobile-menu { display: block; }
  .search-trigger kbd { display: none; }
  .site-header nav { gap: .7rem; }
  .atlas-panel, .city-intro, .history-layout, .country-story { grid-template-columns: 1fr; }
  .archive-callout { grid-template-columns: minmax(0,1fr); }
  .country-title { position: static; }
  .map-wrap { min-height: 440px; padding: 1.5rem; }
  .map-side { border-left: 0; border-top: 1px solid var(--line); }
  .section-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .section-head p:last-child { justify-self: start; }
  .city-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .country-facts-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .known-grid, .people-grid, .stats-grid, .village-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .city-card { min-height: 360px; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editorial-note { position: static; }
  .hero-index { display: none; }
}

@media (max-width: 620px) {
  .site-header { height: 68px; padding-inline: 18px; }
  .brand em { display: none; }
  .shell { width: min(calc(100% - 32px), var(--max)); }
  .hero { min-height: 860px; padding-bottom: 55px; }
  .hero-media { grid-template-columns: 1fr; }
  .hero-media div:not(.hero-main) { display: none; }
  .hero h1 { font-size: clamp(3.45rem,17vw,5.4rem); }
  .map-wrap { justify-content: start; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .map-wrap svg { width: 680px; min-width: 680px; }
  .map-label { font-size: 8.5px; stroke-width: 2.6px; }
  .fact-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fact:nth-child(2) { border-right: 0; }.fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .city-grid, .source-grid { grid-template-columns: 1fr; }
  .country-facts-grid { grid-template-columns: 1fr; }
  .known-grid, .people-grid, .stats-grid, .facts-grid, .celebrity-grid, .village-grid, .monastery-grid { grid-template-columns: 1fr; }
  .stat-card.wide { grid-column: auto; }
  .country-chapters article { grid-template-columns: 34px minmax(0,1fr); }
  .country-chapters article h3 { grid-column: 2; grid-row: 1; }
  .country-chapters article p { grid-column: 2; grid-row: 2; }
  .city-card { min-height: 390px; }
  .archive-collage { min-height: 410px; }
  .city-title-row { display: block; }
  .city-title-row > div { min-width: 0; }
  .city-crest-wrap { width: 72px; min-height: 88px; padding: .6rem; margin-top: 1rem; border-radius: 16px; }
  .city-crest { width: 100%; margin: 0; max-height: 78px; }
  .city-hero h1 { max-width: 100%; font-size: clamp(2.75rem,14vw,4.4rem); overflow-wrap: break-word; }
  .tabs { overflow-x: auto; }
  .celebrity-card { grid-template-columns: 74px 1fr; }
  .celebrity-portrait { width: 74px; height: 94px; }
  .search-result { grid-template-columns: 24px 42px 1fr; }
  .search-result img { width: 42px; height: 42px; }
  .search-result > span:last-child { display: none; }
  .media-grid { grid-template-columns: 1fr; }
  .static-media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lightbox figure { padding: 4rem 1rem 7rem; }
  .lightbox-nav { top: auto; bottom: 1rem; }
}

@media (max-width: 460px) {
  .brand > span:last-child { display: none; }
  .site-header nav { gap: .45rem; }
  .search-trigger { width: 42px; min-height: 42px; padding: 0; justify-content: center; }
  .search-trigger span { display: none; }
  .search-trigger::before { content: "⌕"; font-size: 1.25rem; line-height: 1; }
  .fact { padding: 1.25rem 1rem; }
  .fact strong { font-size: clamp(1.5rem,8vw,1.8rem); }
  .fact span { overflow-wrap: anywhere; }
  .archive-copy { padding: 2rem 1.5rem; }
  .archive-copy h2 { font-size: clamp(2.25rem,12vw,3rem); overflow-wrap: anywhere; }
  .archive-copy .button { min-width: 0; max-width: 100%; white-space: normal; }
  .static-media-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .hero-copy > *, .city-hero .shell > * { animation: reveal .8s both; }
  .hero-copy > *:nth-child(2), .city-hero .shell > *:nth-child(2) { animation-delay: .08s; }
  .hero-copy > *:nth-child(3), .city-hero .shell > *:nth-child(3) { animation-delay: .16s; }
  .hero-copy > *:nth-child(4), .city-hero .shell > *:nth-child(4) { animation-delay: .24s; }
  .button, .city-card { transition: transform .25s; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .intro-splash { animation-delay: 0s !important; } .reveal { opacity: 1; transform: none; } }
