/* Layout: an archive reading room. Photo first, a museum label under every image,
   archive numbers in mono. Dark room by default, stone-grey daylight theme. */
:root {
  /* 2026-10-17: the owner wants the whole site on a white background (no dark theme) */
  --bg: #ffffff;
  --surface: #f6f5f3;
  --raise: #ffffff;
  --line: #e4e1dc;
  --fg: #221d18;
  --muted: #6c6358;
  --accent: #b4611b;
  --accent-ink: #ffffff;
  --flag-red: #c8463c;
  --flag-blue: #3d5fa8;
  --shadow: 0 10px 30px rgba(40,30,20,.12);
  --display: "Noto Serif Armenian", "Noto Serif", Georgia, serif;
  --body: "Noto Sans Armenian", "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 6px;
  --mat-filter: blur(22px) brightness(.97) saturate(.6) opacity(.5);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); }
body { font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; text-wrap: balance; margin: 0; }
.wrap { max-width: 1600px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.brand b { font-family: var(--display); font-size: 1.05rem; display: block; line-height: 1.1; white-space: nowrap; }
.brand small { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; display: block; }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a { padding: 6px 10px; border-radius: var(--r); color: var(--muted); font-size: .92rem; }
.nav a.on, .nav a:hover { color: var(--fg); background: var(--surface); }
.langs { display: flex; gap: 2px; margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.langs button { border: 0; background: none; padding: 4px 9px; border-radius: 999px; font-size: .78rem; font-family: var(--mono); color: var(--muted); }
.langs button.on { background: var(--accent); color: var(--accent-ink); }
@media (min-width: 900px) { .nav { display: flex; } .langs { margin-left: 8px; } }

/* Bottom tabs on phones */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabs a { display: grid; justify-items: center; gap: 2px; font-size: .66rem; color: var(--muted); padding: 4px 0; min-width: 0; }
.tabs a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabs a.on { color: var(--accent); }
.tabs svg { width: 22px; height: 22px; }
main { padding-bottom: 96px; }
@media (min-width: 900px) { .tabs { display: none; } main { padding-bottom: 48px; } }

/* Sections */
.sec { padding-block: 28px 8px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-h h2 { font-size: 1.35rem; }
.sec-h a { color: var(--accent); font-size: .9rem; white-space: nowrap; }
.eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.lead { color: var(--muted); max-width: 62ch; margin: 0; }
.page-h { padding-block: 26px 4px; display: grid; gap: 8px; }
.page-h h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.back { color: var(--muted); font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }

/* Hero: photo of the day */
.hero { display: grid; gap: 20px; padding-block: 22px 8px; }
.hero-img { position: relative; display: block; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); aspect-ratio: 4 / 5; max-height: 72vh; max-width: 100%; }
.hero-img img { width: 100%; height: 100%; }
.hero-txt { display: grid; gap: 12px; align-content: center; min-width: 0; }
.hero-txt h1 { font-size: clamp(1.7rem, 4.6vw, 2.8rem); }
.hero-txt p { margin: 0; color: var(--muted); }
@media (min-width: 760px) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; } }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .95rem; width: fit-content; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

/* Museum label */
.label { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.label b { color: var(--fg); font-weight: 500; }

/* Rails and grids */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
@media (min-width: 640px) { .rail { grid-auto-columns: minmax(300px, 23%); } }   /* pictures never smaller than 300px on tablets/desktops */
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }

.card { display: grid; gap: 8px; min-width: 0; }
.card .ph { border-radius: var(--r); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 5; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
/* Uniform frame for originals of any shape: the whole photo stays visible,
   the empty space is filled with a dimmed, blurred copy of the same photo. */
.mat { position: relative; isolation: isolate; }
.mat::before { content: ""; position: absolute; inset: -30px; z-index: -1; background: var(--src) center / cover no-repeat; filter: var(--mat-filter); }
.mat > img { position: relative; object-fit: contain !important; }
.card:hover .ph img { transform: scale(1.03); }
.card h3 { font-size: .98rem; font-weight: 500; font-family: var(--body); line-height: 1.35; }
.card .label { font-size: .7rem; }

/* Collection tiles */
.tile { position: relative; display: block; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); }
.tile img { width: 100%; height: 100%; filter: saturate(.85); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,8,6,.85)); }
.tile div { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; color: #f3ece1; display: grid; gap: 2px; }
.tile b { font-family: var(--display); font-size: 1.05rem; line-height: 1.2; }
.tile small { font-family: var(--mono); font-size: .72rem; opacity: .8; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }
.chip.on { border-color: var(--accent); color: var(--accent); }
.chip i { font-style: normal; font-family: var(--mono); color: var(--muted); font-size: .75rem; margin-left: 6px; }

/* Places */
.regions { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.region { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.region .thumb { width: 110px; }
.region b { font-family: var(--display); display: block; }
.region small { color: var(--muted); font-size: .8rem; display: block; }

/* Timeline */
.timeline { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.era { position: relative; padding: 0 0 26px 22px; display: grid; gap: 10px; }
.era::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.era h3 { font-size: 1.15rem; }
.era .range { font-family: var(--mono); color: var(--muted); font-size: .8rem; }
.era .strip { display: flex; gap: 8px; overflow-x: auto; }
.era .strip .thumb { width: 80px; }

/* Item page */
.item { display: grid; gap: 22px; padding-block: 18px 8px; }
@media (min-width: 900px) { .item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .item .viewer { position: sticky; top: 76px; } }
.viewer { display: grid; gap: 10px; }
.frame { background: var(--surface); border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; max-height: 78vh; max-width: 100%; cursor: zoom-in; }
.frame img { width: 100%; height: 100%; }
.thumb { display: block; flex: none; overflow: hidden; border-radius: 4px; background: var(--surface); aspect-ratio: 4 / 5; }
.thumb img { width: 100%; height: 100%; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); width: fit-content; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: .85rem; color: var(--muted); }
.seg button.on { background: var(--raise); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.article { display: grid; gap: 14px; min-width: 0; }
.article h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.article .body p { margin: 0 0 1em; max-width: 64ch; }
.meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: .9rem; }
.meta dt { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.meta dd { margin: 0; }
.note { font-size: .82rem; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(8,6,5,.94); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) var(--gutter-r) max(16px, env(safe-area-inset-bottom, 0px)) var(--gutter); }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb button { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); background: #f3ece1; color: #111; border: 0; border-radius: 999px; padding: 6px 14px; }

/* Forms */
form { display: grid; gap: 14px; max-width: 620px; }
label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
input, textarea { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; width: 100%; }
textarea { min-height: 120px; resize: vertical; }
.ok { padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--accent); color: var(--fg); background: var(--surface); }

.search-box { position: relative; }
.search-box input { padding-left: 40px; font-size: 1.05rem; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.empty { color: var(--muted); padding: 28px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stats div { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; background: var(--surface); }
.stats b { font-family: var(--display); font-size: 1.6rem; display: block; font-variant-numeric: tabular-nums; }
.stats small { color: var(--muted); }
.foot { border-top: 1px solid var(--line); margin-top: 36px; padding-block: 20px; color: var(--muted); font-size: .82rem; display: grid; gap: 6px; }
.flagline { height: 3px; background: linear-gradient(90deg, var(--flag-red) 0 33.3%, var(--flag-blue) 33.3% 66.6%, var(--accent) 66.6%); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- Standalone site additions (the prototype relied on the artifact page reset) ---- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
[hidden] { display: none !important; }
.langs a { padding: 4px 9px; border-radius: 999px; font-size: .78rem; font-family: var(--mono); color: var(--muted); }
.langs a.on { background: var(--accent); color: var(--accent-ink); }
.page-h .lead { margin-top: 2px; }
.region { color: inherit; }
.timeline .era h3 a:hover, .sec-h a:hover { text-decoration: underline; }
.btn[data-saved="1"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.results-count { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.nav a { white-space: nowrap; }
/* one-line top menu: search and saved as icons, short tagline line */
.nav { flex-wrap: nowrap; align-items: center; }
/* main menu: a bit larger, black, bold, all capitals */
.nav a { color: #111; font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; padding: 6px 12px; }
.nav a.on, .nav a:hover { color: var(--accent); background: transparent; }
@media (min-width: 900px) and (max-width: 1439px) { .nav a { font-size: .9rem; padding: 6px 8px; letter-spacing: .01em; } }
@media (min-width: 900px) and (max-width: 1099px) { .nav a { font-size: .8rem; padding: 6px 6px; } }
.brand small { white-space: nowrap; text-transform: none; letter-spacing: .02em; font-size: .74rem; }
/* header across the full width: logo far left, menu in the middle, search / saved / language far right */
.top .wrap { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; }
.top .brand { justify-self: start; }
.top .nav { justify-self: center; margin: 0; }
.tools { justify-self: end; display: flex; align-items: center; gap: 4px; grid-column: 3; }
.tools .nico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); }
.tools .nico:hover, .tools .nico.on { color: var(--fg); background: var(--surface); }
.tools .nico svg { width: 20px; height: 20px; }
.tools .lang-dd { margin-left: 6px; }
@media (max-width: 899px) { .top .wrap { grid-template-columns: minmax(0, 1fr) auto; } .tools { grid-column: 2; } }
@media (min-width: 900px) and (max-width: 1439px) { .brand small { display: none; } }
@media (min-width: 900px) and (max-width: 1060px) { .nav .nhome { display: none; } .nav a { padding: 6px 8px; } }
/* Region page place filter */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.filterbar label { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.filterbar select { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 1rem; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.filterbar .results-count { margin-left: auto; }
.grid .card[hidden] { display: none !important; }
/* Gallery of several pictures per item */
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(10,8,6,.55); color: #f3ece1; font-size: 28px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.gal-nav.prev { left: 8px; } .gal-nav.next { right: 8px; }
.gal-nav:hover { background: rgba(10,8,6,.8); }
.gal-count { position: absolute; right: 10px; bottom: 10px; z-index: 2; font-family: var(--mono); font-size: .75rem; color: #f3ece1; background: rgba(10,8,6,.55); padding: 3px 8px; border-radius: 999px; }
.gthumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gthumb { flex: none; width: 90px; aspect-ratio: 4 / 5; border-radius: 4px; border: 2px solid transparent; padding: 0; background: var(--surface); cursor: pointer; }
.gthumb > img { width: 100%; height: 100%; }
.gthumb.on { border-color: var(--accent); }
.card .ph { position: relative; }
.card .badge { position: absolute; top: 6px; right: 6px; z-index: 2; font-family: var(--mono); font-size: .72rem; color: #f3ece1; background: rgba(10,8,6,.6); padding: 2px 7px; border-radius: 999px; }
/* History chapters */
.hlist { display: grid; gap: 10px; }
.hchap { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.hchap:hover { border-color: var(--accent); }
.hchap .thumb { width: 160px; }
.htxt { display: grid; gap: 4px; min-width: 0; }
.htxt .range { font-family: var(--mono); font-size: .74rem; color: var(--accent); }
.htxt b { font-family: var(--display); font-size: 1.1rem; line-height: 1.25; }
.htxt small { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.hbody .body p { margin: 0 0 1.1em; max-width: 68ch; font-size: 1.05rem; line-height: 1.75; }
.reading { margin: 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 6px; max-width: 68ch; }
.pn { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---- Home page (2026-10-17): ornamented intro instead of one big photo ---- */
.intro { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg); }
.intro-in { display: grid; justify-items: center; text-align: center; gap: 14px; padding-block: 44px 26px; }
.intro-logo { width: 96px; height: 96px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.3)); }
.intro h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); letter-spacing: .01em; }
.intro h1::after { content: ""; display: block; width: 84px; height: 3px; margin: 14px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--flag-red) 0 33.3%, var(--flag-blue) 33.3% 66.6%, var(--accent) 66.6%); }
.intro-lead { margin: 0; max-width: 58ch; color: var(--muted); font-size: 1.05rem; }
.intro-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.intro-btns .btn svg { width: 18px; height: 18px; }
.istats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 6px; }
.istats div { display: grid; justify-items: center; }
.istats b { font-family: var(--display); font-size: 1.7rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.istats small { color: var(--muted); font-size: .8rem; }
/* moving strip of small thumbnails: small size keeps old scans looking good */
.mq { overflow: hidden; padding: 4px 0 22px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-t { display: flex; gap: 10px; width: max-content; animation: mq 140s linear infinite; }
.mq:hover .mq-t { animation-play-state: paused; }
.mq-i { flex: none; height: 150px; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.mq-i img { height: 100%; width: auto; object-fit: cover; filter: sepia(.15) saturate(.9); transition: filter .3s; }
.mq-i:hover img { filter: none; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (min-width: 760px) { .mq-i { height: 220px; } }
@media (prefers-reduced-motion: reduce) { .mq-t { animation: none; } .mq { overflow-x: auto; } }

/* history chapters on the home page */
.chrail { grid-auto-columns: minmax(170px, 62%); }
@media (min-width: 640px) { .chrail { grid-auto-columns: minmax(300px, 24%); } }
.chc { display: grid; gap: 6px; align-content: start; padding: 8px 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.chc:hover { border-color: var(--accent); }
.chc .ph { display: block; border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; }
.chc .ph img { width: 100%; height: 100%; }
.chc .range { font-family: var(--mono); font-size: .72rem; color: var(--accent); padding-inline: 4px; }
.chc b { font-family: var(--display); font-size: 1.02rem; line-height: 1.25; padding-inline: 4px; }

/* period cards */
.eracards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.erac { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "r t" "b t" "s t"; gap: 2px 12px; align-items: center;
  padding: 14px 14px 14px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.erac::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.erac:hover { border-color: var(--accent); }
.erac .range { grid-area: r; font-family: var(--mono); font-size: .74rem; color: var(--accent); }
.erac b { grid-area: b; font-family: var(--display); font-size: 1.08rem; line-height: 1.25; }
.erac small { grid-area: s; color: var(--muted); font-size: .8rem; }
.erath { grid-area: t; display: flex; }
.erath span { width: 64px; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; border: 2px solid var(--surface); margin-left: -14px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.erath span:first-child { margin-left: 0; }
.erath img { width: 100%; height: 100%; }

/* follow us + send a photo */
.bands { display: grid; gap: 12px; }
@media (min-width: 760px) { .bands { grid-template-columns: 1fr 1fr; } }
.band { display: grid; gap: 8px; align-content: start; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.band b { font-family: var(--display); font-size: 1.2rem; }
.band > span { color: var(--muted); }
.socs { display: flex; flex-wrap: wrap; gap: 8px; }
.soc { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); font-size: .9rem; transition: background .2s, color .2s, border-color .2s; }
.soc svg { width: 20px; height: 20px; flex: none; }
.soc.facebook svg { color: #1877f2; } .soc.instagram svg { color: #d6297a; } .soc.youtube svg { color: #ff0000; } .soc.tiktok svg { color: var(--fg); }
.soc:hover { color: #fff; border-color: transparent; }
.soc.facebook:hover { background: #1877f2; } .soc.instagram:hover { background: #d6297a; } .soc.youtube:hover { background: #e00000; } .soc.tiktok:hover { background: #111; }
.soc:hover svg { color: #fff; }
.soc.sm { padding: 7px; border-radius: 50%; } .soc.sm span { display: none; } .soc.sm svg { width: 18px; height: 18px; }

/* language menu with flags */
.lang-dd { position: relative; flex: none; }
.lang-dd summary { list-style: none; display: flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); cursor: pointer; font-family: var(--mono); font-size: .8rem; user-select: none; }
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary:hover { border-color: var(--accent); }
.lang-dd .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .2s; }
.lang-dd[open] .chev { transform: rotate(180deg); }
.flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 170px; display: grid; padding: 6px;
  background: var(--raise); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.lang-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: .92rem; }
.lang-menu a:hover { background: var(--surface); }
.lang-menu a.on { color: var(--accent); font-weight: 600; }

/* big cards for regions and periods */
.bigcs { display: grid; gap: 16px; }
@media (min-width: 760px) { .bigcs { grid-template-columns: 1fr 1fr; } }
.bigc { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.bigc-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.bigc-img img { width: 100%; height: 100%; transition: transform .6s ease; }
.bigc:hover .bigc-img img { transform: scale(1.03); }
.bigc-txt { display: grid; gap: 10px; padding: 16px 18px 18px; align-content: start; }
.bigc-txt h2 { font-size: 1.45rem; }
.bigc-txt h2 a:hover { color: var(--accent); }
.bigc-txt p { margin: 0; color: var(--muted); line-height: 1.55; }
.bigc-th { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.bigc-th a { aspect-ratio: 1; border-radius: 5px; overflow: hidden; }
.bigc-th img { width: 100%; height: 100%; }
.chips.sm { gap: 6px; }
.chips.sm .chip { font-size: .78rem; padding: 3px 10px; }
.chip.chl { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.chip.chl svg { width: 14px; height: 14px; flex: none; }
.chip { max-width: 100%; }
.chip.chl:hover { background: var(--accent); color: var(--accent-ink); }
/* timeline of periods with big cards */
.tl2 .era { padding-bottom: 30px; gap: 8px; }
.tl2 .era > .range { font-size: .95rem; color: var(--accent); }
@media (min-width: 900px) { .tl2 .bigc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .tl2 .bigc-img { aspect-ratio: auto; min-height: 100%; } }

/* About page: same plain cards as the numbers above */
.h2s { font-size: 1.2rem; }
.feats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.feat { display: grid; gap: 6px; align-content: start; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
a.feat:hover { border-color: var(--accent); }
.feat b { font-family: var(--display); font-size: 1.05rem; }
.feat span { color: var(--muted); font-size: .9rem; }
/* home page blocks laid out so rows are always full (symmetric) */
.grid.g10 { grid-template-columns: repeat(2, minmax(0, 1fr)); }                 /* 10 latest: 5 rows of 2 ... */
@media (min-width: 1100px) { .grid.g10 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }   /* ... or 2 rows of 5 */
.eracards { grid-template-columns: minmax(0, 1fr); }                          /* 6 periods: 1, 2 or 3 per row */
@media (min-width: 700px) { .eracards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .eracards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.regions.r6 { grid-template-columns: minmax(0, 1fr); }                        /* 6 regions: 1, 2, 3 or 6 per row */
@media (min-width: 640px) { .regions.r6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .regions.r6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .regions.r6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* phones: brand and language switch must fit side by side */
@media (max-width: 480px) {
  .top .wrap { gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand b { font-size: .95rem; }
  .brand small { display: none; }
  .lang-dd summary { padding: 5px 8px; gap: 5px; }
  .tools .nico { width: 32px; height: 32px; }
  .hchap { grid-template-columns: 110px minmax(0, 1fr); } .hchap .thumb { width: 110px; }
  .region { grid-template-columns: 90px minmax(0, 1fr); } .region .thumb { width: 90px; }
  .tools .lang-dd { margin-left: 2px; }
  .tabs a { font-size: .6rem; }
}

/* footer */
.foot { justify-items: center; text-align: center; gap: 12px; }   /* footer centred: social icons, then logo + name, then links */
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }
.foot .socs { justify-content: center; }
