/* ============================================================
   TAVROSKHID — ТавроСхід · Modern editorial redesign (v3)
   Светлая редакционная тема: степной воздух, бумага, скифское золото.
   Шрифти: Lora (серифні заголовки), Onest (текст/UI),
   Unbounded (лого), Piazzolla (свідчення/цитати).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Onest:wght@400;500;600;700&family=Unbounded:wght@600;800&family=Piazzolla:ital,opsz,wght@0,8..30,400;0,8..30,500;1,8..30,400&display=swap&subset=cyrillic,latin-ext');

:root {
  /* фон */
  --bg: #F4F1EA;
  --bg-2: #ECE8DE;
  --panel: #FFFDF8;
  --panel-2: #F6F1E7;
  --line: #D8D2C6;
  --line-soft: #E7E1D6;
  /* текст */
  --ink: #17232C;
  --ink-2: #46535C;
  --muted: #6F7981;
  --faint: #90979C;
  /* акценты */
  --gold: #C69220;
  --gold-2: #8D6407;
  --gold-deep: #B98A28;
  --teal: #216B7D;
  --teal-2: #2F8092;
  --clay: #C15A34;
  --steppe: #7E9152;
  /* прочее */
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body: 'Onest', system-ui, 'Segoe UI', sans-serif;
  --font-logo: 'Unbounded', 'Arial Black', sans-serif;
  --font-serif: 'Piazzolla', Georgia, serif;
  --maxw: 1240px;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22,35,44,.06), 0 18px 50px rgba(22,35,44,.12);
  --head-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(900px 520px at 92% -12%, rgba(47,128,146,.10), transparent 68%),
    radial-gradient(760px 480px at -8% 22%, rgba(198,146,32,.09), transparent 66%),
    var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); }
::selection { background: rgba(198,146,32,.28); color: var(--ink); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.hidden { display: none !important; }

/* плёночное зерно поверх всего фона */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
/* контент над зерном (grain z-index:1); НЕ чіпаємо оверлеї (fixed, z-index 110+) */
main, footer, .hero, .topbar { position: relative; z-index: 2; }
/* шапка вище секцій, щоб дропдауни перекривали hero; оверлеї (110+) — вище шапки */
#site-header { position: relative; z-index: 100; }

/* ---------- Верхняя полоса ---------- */
.topbar { background: #0A0D11; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; flex-wrap: wrap; }
.topbar-date { color: var(--faint); letter-spacing: .04em; text-transform: capitalize; }
.lang-switch { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; }
.lang-switch button {
  background: none; border: 1px solid transparent; color: var(--muted);
  font: 600 11.5px/1 var(--font-body); letter-spacing: .05em; padding: 5px 6px;
  border-radius: 5px; cursor: pointer; text-transform: uppercase;
}
.lang-switch button:hover { color: var(--gold-2); }
.lang-switch button.active { color: #0A0D11; background: var(--gold); border-color: var(--gold); }

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14,17,22,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease, background .2s ease;
}
.site-header.scrolled { box-shadow: 0 8px 30px rgba(0,0,0,.45); background: rgba(12,15,19,.95); }
.header-row { display: flex; align-items: center; gap: 18px; height: var(--head-h); }

.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(160deg, #211a09, #12161c);
  border: 1px solid var(--gold-deep); display: grid; place-items: center;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-txt { line-height: 1; }
.brand-name { font-family: var(--font-logo); font-weight: 800; font-size: 18px; letter-spacing: .02em; color: var(--ink); }
.brand-name .accent { color: var(--gold); }
.brand-sub { display: block; font-size: 9.5px; letter-spacing: .28em; color: var(--faint); text-transform: uppercase; margin-top: 5px; }

/* десктоп-навигация */
.mainnav { display: flex; align-items: center; gap: 2px; margin-left: 6px; flex: 1 1 auto; }
.mainnav > a, .navdrop > button {
  font: 600 13.5px/1 var(--font-body); letter-spacing: .01em; color: var(--ink-2);
  padding: 10px 12px; border-radius: 8px; background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.mainnav > a:hover, .navdrop > button:hover { color: var(--ink); background: var(--panel); }
.mainnav > a.active { color: var(--gold-2); }
.mainnav > a.active::after,
.mainnav .navdrop.active > button::after { }
.navdrop > button .caret { font-size: 9px; opacity: .7; transition: transform .2s ease; }
.navdrop.open > button .caret { transform: rotate(180deg); }

.navdrop { position: relative; }
.droppanel {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.navdrop.open .droppanel { opacity: 1; visibility: visible; transform: translateY(0); }
.droppanel.mega { min-width: 460px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dropitem { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink-2); }
.dropitem:hover { background: var(--panel-2); color: var(--ink); }
.dropitem .di-t { font-weight: 600; font-size: 13.5px; }
.dropitem .di-d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; font-size: 16px;
}
.icon-btn:hover { color: var(--gold-2); border-color: var(--gold-deep); }
.btn-support {
  font: 700 13px/1 var(--font-body); letter-spacing: .01em; color: var(--gold-2);
  border: 1px solid var(--gold-deep); background: rgba(210,163,44,.08);
  padding: 11px 16px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.btn-support:hover { background: rgba(210,163,44,.16); color: var(--gold-2); }
.hamburger { display: none; }

/* поисковая панель */
.searchbar { border-top: 1px solid var(--line); background: var(--bg-2); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.searchbar.open { max-height: 80px; }
.searchbar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.searchbar input {
  flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 9px; padding: 11px 14px; font: 400 15px var(--font-body); outline: none;
}
.searchbar input:focus { border-color: var(--gold-deep); }

/* ---------- Mobile menu ---------- */
.mobile-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 110; opacity: 0; visibility: hidden; transition: opacity .2s; }
.mobile-scrim.open { opacity: 1; visibility: visible; }
.mobile-menu {
  position: fixed; top: 0; right: 0; height: 100%; width: min(360px, 88vw); z-index: 120;
  background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%);
  visibility: hidden; transition: transform .26s cubic-bezier(.4,0,.2,1), visibility 0s linear .26s; overflow-y: auto; padding: 18px 16px 40px;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
.mm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mm-close { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 20px; cursor: pointer; }
.mm-group { border-top: 1px solid var(--line-soft); padding: 6px 0; }
.mm-group > a, .mm-acc > button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  font: 600 15px var(--font-body); color: var(--ink); padding: 13px 6px; background: none; border: none; cursor: pointer; text-align: left;
}
.mm-acc-body { display: none; padding: 0 6px 8px 14px; }
.mm-acc.open .mm-acc-body { display: block; }
.mm-acc-body a { display: block; padding: 9px 6px; font-size: 14px; color: var(--ink-2); }
.mm-support { margin-top: 16px; width: 100%; text-align: center; }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(11,15,20,.97) 0%, rgba(11,15,20,.9) 44%, rgba(11,15,20,.5) 72%, rgba(11,15,20,.78) 100%),
    var(--hero-image, none);
  background-size: cover;
  background-position: center;
}
.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 80% at 78% 30%, rgba(46,115,135,.22), transparent 60%),
    radial-gradient(50% 70% at 15% 90%, rgba(168,128,26,.16), transparent 60%),
    linear-gradient(180deg, #0C0F14 0%, #0E1319 100%);
}
.hero .wrap { position: relative; z-index: 2; padding: 54px 22px 46px; }
.hero-grid { display: grid; grid-template-columns: 1.55fr .9fr; gap: 40px; align-items: start; }
@media (max-width: 900px){ .hero-grid { grid-template-columns: 1fr; gap: 30px; } }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 700 11.5px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hero h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(30px, 5vw, 58px); line-height: 1.06; margin: 16px 0 18px; color: #F5F1E7;
}
.hero-lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 620px; margin-bottom: 24px; }
.hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--font-body); padding: 13px 20px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: transform .1s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #eafcff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-2); color: #fff; }
.btn-gold { background: var(--gold); color: #14100a; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-2); color: #14100a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold-deep); color: var(--gold-2); }

/* also-today sidebar */
.also { border-left: 1px solid var(--line); padding-left: 26px; }
@media (max-width: 900px){ .also { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 22px; } }
.also h3 { font: 700 11.5px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.also-item { display: block; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.also-item:last-child { border-bottom: none; }
.also-item .t { font-family: var(--font-display); font-size: 17px; line-height: 1.28; color: var(--ink); font-weight: 500; }
.also-item:hover .t { color: var(--gold-2); }
.also-item .m { font-size: 11.5px; color: var(--muted); margin-top: 6px; letter-spacing: .02em; }

/* ---------- DEMO / badges ---------- */
.badge-demo { display: inline-flex; align-items: center; font: 700 10px/1 var(--font-body); letter-spacing: .12em; color: var(--gold-2); border: 1px solid var(--gold-deep); border-radius: 20px; padding: 4px 8px; text-transform: uppercase; }
.cat-tag { display: inline-flex; align-items: center; font: 700 10.5px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); }
.cat-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 7px; }
.cat-war::before { background: var(--clay); } .cat-war { color: #e08a68; }
.cat-occ::before { background: #b06fc9; } .cat-occ { color: #c79bd6; }
.cat-deocc::before { background: var(--steppe); } .cat-deocc { color: #a7bd7f; }
.cat-rebuild::before { background: var(--teal-2); } .cat-rebuild { color: #6fc3d8; }
.cat-people::before { background: var(--gold); } .cat-people { color: var(--gold-2); }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); color: #F2EEE3; letter-spacing: -.01em; }
.section-head .link { font: 600 13px var(--font-body); color: var(--gold-2); }
.rule { height: 1px; background: var(--line); border: 0; }

/* ---------- News feed ---------- */
.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 940px){ .feed { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px){ .feed { grid-template-columns: 1fr; } }
.article-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease;
}
.article-card:hover { transform: translateY(-3px); border-color: var(--gold-deep); }
.article-card.lead { grid-column: 1 / -1; }
.card-thumb { aspect-ratio: 16/9; position: relative; background: linear-gradient(135deg, #223, #142027); overflow: hidden; }
.card-thumb .ph { position: absolute; inset: 0; opacity: .85; }
.card-thumb picture { display: block; position: absolute; inset: 0; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .3s ease; }
.article-card:hover .card-thumb img { transform: scale(1.035); filter: saturate(1.08) contrast(1.03); }
.card-thumb-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7,10,14,.48)); pointer-events: none; }
.card-thumb .thumb-badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.card-body { padding: 16px 17px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; color: var(--ink); }
.article-card.lead .card-body h3 { font-size: 24px; }
.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--gold-2); }
.card-excerpt { font-size: 14px; color: var(--ink-2); }
.card-meta { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.card-meta a { color: var(--gold-2); font-weight: 600; }
.card-meta .no-src { color: var(--faint); font-style: italic; }

/* category filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { font: 600 13px var(--font-body); color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; border-radius: 40px; cursor: pointer; }
.chip:hover { border-color: var(--gold-deep); color: var(--ink); }
.chip.active { background: var(--gold); color: #14100a; border-color: var(--gold); }

/* loading / empty states */
.skeleton { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.skeleton .sk-thumb { aspect-ratio: 16/9; background: linear-gradient(90deg, #1a2029 25%, #222a34 37%, #1a2029 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
.skeleton .sk-line { height: 12px; margin: 14px 16px; border-radius: 6px; background: linear-gradient(90deg, #1a2029 25%, #222a34 37%, #1a2029 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
.skeleton .sk-line.short { width: 55%; }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state .ico { font-size: 40px; opacity: .5; margin-bottom: 12px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 10px; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--gold-deep), var(--line) 60%); }
@media (min-width: 780px){ .timeline::before { left: 50%; transform: translateX(-1px); } }
.tl-event { position: relative; padding: 0 0 26px 52px; }
@media (min-width: 780px){
  .tl-event { width: 50%; padding: 0 40px 34px 40px; }
  .tl-event:nth-child(odd) { left: 0; text-align: right; }
  .tl-event:nth-child(even) { left: 50%; }
}
.tl-dot { position: absolute; left: 11px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--gold); z-index: 2; }
@media (min-width: 780px){
  .tl-event:nth-child(odd) .tl-dot { left: auto; right: -8px; }
  .tl-event:nth-child(even) .tl-dot { left: -8px; }
}
.tl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; transition: border-color .18s, transform .18s; text-align: left; }
.tl-card:hover { border-color: var(--gold-deep); transform: translateY(-2px); }
.tl-date { font: 700 12px var(--font-body); color: var(--gold-2); letter-spacing: .05em; }
.tl-card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); margin: 6px 0; line-height: 1.3; }
.tl-card .tl-sum { font-size: 14px; color: var(--ink-2); }
.tl-card .tl-full { font-size: 14px; color: var(--ink-2); margin-top: 10px; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.tl-card.open .tl-full { max-height: 400px; }
.tl-card .tl-toggle { margin-top: 10px; font: 600 12.5px var(--font-body); color: var(--gold-2); display: inline-flex; align-items: center; gap: 6px; }
.tl-src { margin-top: 10px; font-size: 12px; color: var(--muted); }
.tl-src a { color: var(--gold-2); } .tl-src .no-src { color: var(--faint); font-style: italic; }
.tl-reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.tl-reveal.in { opacity: 1; transform: none; }

/* ---------- Settlements ---------- */
.district-directory { margin: 0 0 24px; }
.oblast-switcher { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 18px; }
.oblast-summary { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 14px; align-items: center; padding: 12px 15px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); color: var(--muted); text-align: left; cursor: pointer; }
.oblast-summary span { grid-column: 1/-1; color: var(--ink); font: 650 16px var(--font-display); }
.oblast-summary b,.oblast-summary strong { color: var(--gold-deep); font-size: 12px; }
.oblast-summary.active { border-color: var(--gold-deep); background: linear-gradient(145deg,rgba(29,119,118,.1),rgba(210,163,44,.08)); box-shadow: 0 8px 22px rgba(22,35,44,.07); }
.district-head { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.district-kicker { display: grid; place-items: center; min-height: 58px; border-radius: 14px; background: linear-gradient(135deg,var(--teal),var(--gold-2)); color: #fff; font: 700 24px var(--font-display); box-shadow: 0 10px 24px rgba(29,119,118,.15); }
.district-head h2 { margin: 0 0 5px; font: 650 clamp(22px,3vw,30px) var(--font-display); color: var(--ink); }
.district-head p { max-width: 900px; color: var(--muted); line-height: 1.55; }
.district-summary-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.district-summary { min-width: 0; padding: 12px; border: 1px solid var(--line-soft); border-radius: 13px; background: linear-gradient(145deg,rgba(29,119,118,.08),rgba(210,163,44,.05)); color: inherit; text-align: left; cursor: pointer; transition: transform .18s,border-color .18s,box-shadow .18s; }
.district-summary:hover { transform: translateY(-2px); border-color: var(--gold-deep); box-shadow: 0 10px 28px rgba(22,35,44,.08); }
.district-summary h3 { min-height: 39px; margin: 9px 0 7px; color: var(--ink); font: 650 16.5px/1.16 var(--font-display); }
.district-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.district-metrics span { color: var(--muted); font-size: 10px; line-height: 1.2; }
.district-metrics b { display: block; color: var(--ink); font: 650 15px var(--font-display); }
.district-pop { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; line-height: 1.25; }
.district-pop b { color: var(--ink-2); font-size: 12px; }
.district-warning { margin-top: 12px; padding: 13px 15px; border-left: 3px solid var(--gold-2); border-radius: 0 10px 10px 0; background: rgba(210,163,44,.08); color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.district-warning a,.note a { color: var(--gold-deep); font-weight: 650; }
@media (max-width: 1050px){ .district-summary-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 700px){ .district-summary-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 470px){ .district-head { grid-template-columns: 52px 1fr; gap: 11px; } .district-kicker { min-height: 50px; font-size: 20px; } .district-summary h3 { min-height: 0; } }
.controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.controls input, .controls select {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 9px; padding: 11px 13px; font: 400 14px var(--font-body); outline: none;
}
.controls input { flex: 1; min-width: 200px; }
.controls input:focus, .controls select:focus { border-color: var(--gold-deep); }
.set-grid { display: block; }
.settlement-district { margin: 0 0 27px; scroll-margin-top: 85px; }
.settlement-district-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 9px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.settlement-district-head span { color: var(--gold-deep); font: 700 10px var(--font-body); letter-spacing: .06em; }
.settlement-district-head h2 { margin-top: 2px; color: var(--ink); font: 650 22px var(--font-display); }
.settlement-district-head .district-total { color: var(--muted); font-weight: 500; letter-spacing: 0; text-align: right; }
.set-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.set-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 5px 7px; width: 100%; min-width: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 9px; padding: 7px 8px; color: inherit; text-align: left; cursor: pointer; transition: border-color .18s,transform .18s,background .18s; }
.set-card:hover { border-color: var(--gold-deep); background: var(--panel-2); transform: translateY(-1px); }
.set-card .sc-main { min-width: 0; }
.set-card h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font: 600 13px var(--font-display); }
.set-card .sc-reg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; color: var(--muted); font-size: 9.5px; }
.set-card .sc-pop { text-align: right; }
.set-card .sc-pop b { display: block; color: var(--ink-2); font: 600 12px var(--font-display); }
.set-card .sc-pop span { display: block; color: var(--faint); font-size: 8px; }
.set-card .status-pill { grid-column: 1/-1; justify-self: start; font-size: 8px; padding: 2px 6px; }
.status-pill { font: 700 10px var(--font-body); letter-spacing: .07em; text-transform: uppercase; padding: 4px 9px; border-radius: 20px; }
.st-occ { color: #c79bd6; border: 1px solid #6a4a78; } .st-front { color: #e08a68; border: 1px solid #7a4433; }
.st-deocc { color: #a7bd7f; border: 1px solid #566338; } .st-controlled { color: #6fc3d8; border: 1px solid #34606c; }
.st-mixed { color: var(--gold); border: 1px solid var(--gold-deep); }
@media (max-width: 1180px){ .set-list { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 840px){ .set-list { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px){
  .oblast-switcher { grid-template-columns: 1fr; }
  .set-list { grid-template-columns: 1fr; }
  .set-card { grid-template-columns: minmax(0,1fr) auto; }
  .set-card .status-pill { grid-column: 1/-1; justify-self: start; padding: 2px 6px; font-size: 8px; }
  .settlement-district-head { align-items: start; flex-direction: column; gap: 3px; }
}

/* drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 130; opacity: 0; visibility: hidden; transition: opacity .2s; }
.drawer-scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(480px, 94vw); z-index: 140;
  background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1); overflow-y: auto; padding: 22px 24px 44px;
}
.drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 20px; cursor: pointer; }
.drawer h2 { font-family: var(--font-display); font-size: 26px; color: #F2EEE3; margin: 6px 0 4px; padding-right: 44px; }
.drawer .d-reg { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.drawer .d-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.drawer .d-row .k { color: var(--muted); } .drawer .d-row .v { color: var(--ink); text-align: right; }
.drawer .d-note { margin-top: 16px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.drawer .d-src { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- Generic page ---------- */
.page { padding: 40px 0 60px; min-height: 50vh; }
.page-head { max-width: 820px; margin-bottom: 28px; }
.page-head .eyebrow { margin-bottom: 12px; }
.page-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; color: #F4F0E6; }
.page-head h1::after { content: ""; display: block; width: 74px; height: 3px; background: var(--gold); margin-top: 16px; border-radius: 2px; }
.page-head p { color: var(--ink-2); font-size: 17px; margin-top: 14px; }
.prose { max-width: 800px; font-size: 16.5px; color: var(--ink-2); }
.prose p { margin-bottom: 15px; }
.prose h2 { font-family: var(--font-display); color: var(--ink); font-weight: 600; font-size: 22px; margin: 32px 0 12px; }
.prose ul, .prose ol { margin: 0 0 15px 22px; } .prose li { margin-bottom: 9px; }
.prose a { text-decoration: underline; text-decoration-color: var(--gold-deep); }
.quote { font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 1.6; border-left: 3px solid var(--gold); padding: 4px 0 4px 20px; margin: 22px 0; color: var(--ink); }

/* cards grid (petitions / links) */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 10px 0 26px; }
@media (max-width: 760px){ .cards { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.card.clay { border-left-color: var(--clay); } .card.steppe { border-left-color: var(--steppe); } .card.teal { border-left-color: var(--teal-2); }
.card h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); }
.card p { font-size: 14.5px; color: var(--ink-2); }
.card .card-links { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; font-weight: 600; }

/* story (testimonies) */
.story { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.story .story-text { font-family: var(--font-serif); font-style: italic; font-size: 17.5px; line-height: 1.62; color: var(--ink-2); }
.story .story-sig { margin-top: 12px; font-size: 12.5px; color: var(--muted); letter-spacing: .03em; }
.story .story-sig::before { content: "— "; color: var(--gold-2); }

.baba-banner { display: flex; gap: 22px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 26px; }
.baba-banner img { width: 78px; flex: 0 0 auto; opacity: .9; }
.baba-banner p { color: var(--ink-2); font-size: 15px; }
.baba-banner strong { color: var(--gold-2); }

/* video / forms */
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px){ .video-grid { grid-template-columns: 1fr; } }
.video-embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cap { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.4; }
.video-cap .d { color: var(--muted); font-size: 12px; }
.form-shell { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 18px 0; }
.form-shell iframe { width: 100%; height: 900px; border: 0; display: block; background: #fff; }
.form-placeholder { padding: 44px 26px; text-align: center; color: var(--muted); background: repeating-linear-gradient(45deg, #12161c, #12161c 12px, #151a21 12px, #151a21 24px); }
.form-placeholder .ico { font-size: 34px; margin-bottom: 10px; opacity: .6; }
.form-placeholder code { display: inline-block; background: #0a0d11; color: var(--gold-2); border-radius: 6px; padding: 3px 9px; font-size: 12.5px; margin-top: 8px; }

.note { background: rgba(210,163,44,.08); border-left: 4px solid var(--gold); border-radius: 8px; padding: 14px 16px; font-size: 14px; margin: 18px 0; color: var(--ink-2); }
.note.safety { background: rgba(193,90,52,.1); border-left-color: var(--clay); }
.note.demo { background: rgba(46,115,135,.1); border-left-color: var(--teal-2); }

.rule-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); max-width: 820px; }
.rule-num { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--panel); border: 1px solid var(--gold-deep); color: var(--gold-2); font: 600 15px/38px var(--font-display); text-align: center; }
.rule-item h3 { font-family: var(--font-display); font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.rule-item p { font-size: 14.5px; color: var(--ink-2); }

/* support modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 200; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .2s; }
.modal-scrim.open { opacity: 1; visibility: visible; }
.modal { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); max-width: 440px; width: 100%; padding: 28px; text-align: center; box-shadow: var(--shadow); transform: scale(.96); transition: transform .2s; }
.modal-scrim.open .modal { transform: scale(1); }
.modal .m-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; background: rgba(210,163,44,.12); border: 1px solid var(--gold-deep); }
.modal h3 { font-family: var(--font-display); font-size: 22px; color: var(--ink); margin-bottom: 10px; }
.modal p { color: var(--ink-2); font-size: 14.5px; margin-bottom: 20px; }
.modal .btn { width: 100%; justify-content: center; }

/* ---------- Footer ---------- */
footer { background: #0A0D11; border-top: 1px solid var(--line); padding: 40px 0 28px; margin-top: 30px; font-size: 13.5px; color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px){ footer .wrap { grid-template-columns: 1fr; } }
footer h4 { font-family: var(--font-body); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 12px; }
footer a { color: var(--ink-2); display: inline-block; padding: 3px 0; }
footer a:hover { color: var(--gold-2); }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.foot-brand .brand-mark { width: 34px; height: 34px; } .foot-brand .brand-mark svg { width: 22px; height: 22px; }
.foot-brand b { font-family: var(--font-logo); color: var(--ink); font-size: 15px; }
.hydra-project { margin-top: 18px; display: inline-flex; align-items: center; gap: 12px; padding: 9px 14px 9px 9px !important; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.36); box-shadow: 0 8px 24px rgba(23,32,38,.08); }
.hydra-project img { width: 52px; height: 52px; object-fit: contain; border-radius: 50%; }
.hydra-project span { display: grid; gap: 1px; }
.hydra-project small { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.hydra-project strong { color: var(--ink); font-family: var(--font-logo); font-size: 16px; letter-spacing: .12em; }
.foot-legal { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); margin-top: 24px; padding-top: 16px; font-size: 12px; color: var(--faint); }
.footer-langs { font-size: 11.5px; color: var(--faint); margin-top: 8px; letter-spacing: .06em; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .tl-reveal { opacity: 1; transform: none; }
}

/* ---------- Community, authentication and article discussion ---------- */
.article-detail-wrap { max-width: 920px; margin: 0 auto; }
.article-detail { overflow: hidden; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 18px; box-shadow: 0 20px 60px rgba(22,35,44,.10); }
.article-detail picture, .article-detail picture img { display: block; width: 100%; }
.article-detail picture { aspect-ratio: 16/8.5; overflow: hidden; background: var(--bg-2); }
.article-detail picture img { height: 100%; object-fit: cover; }
.article-detail-body { padding: clamp(22px,4vw,48px); }
.article-detail h1 { max-width: 850px; margin: 14px 0 10px; color: var(--ink); font: 600 clamp(28px,4.5vw,48px)/1.08 var(--font-display); }
.article-detail-meta { color: var(--muted); font-size: 13px; }
.article-detail-lead { margin: 24px 0; color: var(--ink-2); font: 400 clamp(17px,2vw,20px)/1.7 var(--font-body); white-space: pre-line; }
.article-copy { color: var(--ink-2); font-size: clamp(16px,1.7vw,18px); line-height: 1.78; }
.article-copy p { margin: 0 0 1.15em; }
.article-figure { margin: 0 0 1.35em; }
.article-copy figure.article-figure { margin: 0 0 1.35em; }
.article-figure img { display: block; width: 100%; height: auto; border-radius: 14px; }
.article-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.article-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(142px,1fr)); gap: 10px; margin: 26px 0 38px; }
.article-fact { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 18px; border: 1px solid rgba(32,103,123,.2); border-radius: 15px; background: linear-gradient(145deg,rgba(235,245,244,.9),rgba(255,250,239,.92)); }
.article-fact strong { color: var(--teal); font: 700 clamp(27px,3.4vw,39px)/1 var(--font-display); letter-spacing: -.03em; }
.article-fact span { color: var(--muted); font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.article-sections section { margin: 0 0 34px; }
.article-sections h2 { margin: 0 0 13px; padding-top: 5px; color: var(--ink); font: 650 clamp(23px,3vw,31px)/1.2 var(--font-display); }
.article-sections section:nth-child(5) { padding: clamp(18px,3vw,28px); border: 1px solid rgba(166,106,24,.2); border-radius: 16px; background: rgba(205,157,55,.075); }
.article-sections #melania-trump { scroll-margin-top: 120px; padding: clamp(20px,3vw,30px); border: 1px solid rgba(32,103,123,.22); border-radius: 18px; background: linear-gradient(145deg,rgba(232,243,244,.82),rgba(255,250,239,.8)); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 22px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.article-tag { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border: 1px solid rgba(32,103,123,.22); border-radius: 999px; background: rgba(46,115,135,.075); color: var(--teal); font-size: 13px; font-weight: 700; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.article-tag:hover { transform: translateY(-2px); background: rgba(46,115,135,.14); border-color: rgba(32,103,123,.42); }
.article-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.article-sources > strong { width: 100%; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.article-back { display: inline-flex; margin: 18px 24px 0; color: var(--teal); font-weight: 700; font-size: 13px; }
.article-source-link { display: inline-flex; padding: 11px 14px; border-radius: 9px; background: rgba(46,115,135,.09); color: var(--teal); font-weight: 700; }
.hydra-about { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: clamp(22px,4vw,42px); margin: 30px 0 42px; padding: clamp(22px,4vw,36px); border: 1px solid var(--line-soft); border-radius: 22px; background: linear-gradient(135deg,rgba(255,255,255,.72),rgba(227,238,237,.52)); box-shadow: 0 18px 50px rgba(22,35,44,.08); }
.hydra-about img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(15,28,38,.18)); }
.hydra-about h2 { margin: 0 0 8px; }
.hydra-about p { margin: 0; }

.comments-root { max-width: 920px; margin: 36px auto 0; }
.comments-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.comments-heading h2, .community-panel-head h2, .community-account-card h2 { color: var(--ink); font: 600 25px/1.2 var(--font-display); }
.comments-heading p, .community-panel-head p, .community-account-card > p { margin-top: 5px; color: var(--muted); }
.comments-list { display: grid; gap: 10px; margin-top: 18px; }
.comment { padding: 15px 17px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel); }
.comment.is-reply { margin-left: 36px; border-left: 3px solid rgba(46,115,135,.34); }
.comment-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.comment-head strong { color: var(--ink); font-size: 14px; }
.comment-head time { color: var(--muted); font-size: 11px; }
.comment > p { margin-top: 8px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-tools { display: flex; gap: 12px; margin-top: 9px; }
.comment-tools button, .text-action { padding: 0; border: 0; background: transparent; color: var(--teal); font: 700 11px var(--font-body); cursor: pointer; }

.community-modal-scrim { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 18px; background: rgba(14,25,32,.68); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: .2s ease; }
.community-modal-scrim.open { opacity: 1; visibility: visible; }
.community-modal { position: relative; width: min(460px,100%); padding: 28px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(255,255,255,.45); box-shadow: 0 28px 90px rgba(10,20,25,.30); }
.community-modal h2 { margin-right: 30px; color: var(--ink); font: 600 26px/1.15 var(--font-display); }
.community-modal > p { margin: 8px 0 18px; color: var(--muted); }
.community-modal-close { position: absolute; top: 12px; right: 14px; width: 35px; height: 35px; border: 0; border-radius: 50%; background: var(--bg-2); color: var(--ink); font-size: 24px; cursor: pointer; }
.oauth-list { display: grid; gap: 9px; }
.oauth-list .btn { justify-content: center; }
.community-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; }
.community-or::before, .community-or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.privacy-mini { font-size: 12px; }

.community-form { display: grid; gap: 12px; }
.community-form label { display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.community-form input, .community-form textarea, .community-form select { width: 100%; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: #fff; color: var(--ink); font: 400 15px/1.5 var(--font-body); }
.community-form textarea { min-height: 92px; resize: vertical; }
.community-form input:focus, .community-form textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,115,135,.10); }
.community-form .btn { justify-content: center; }
.community-form.compact { gap: 9px; }
.inline-form { display: flex; gap: 9px; }
.inline-form input { flex: 1; }
.alias-gate { margin-bottom: 16px; padding: 17px; border: 1px solid rgba(210,163,44,.35); border-radius: 12px; background: rgba(210,163,44,.07); }
.alias-gate p { color: var(--muted); font-size: 13px; }
.comment-form { padding: 16px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line-soft); }
.comment-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.comment-form-actions span { color: var(--teal); font-size: 12px; }
.community-status { min-height: 1em; color: var(--teal); font-size: 12px; }
.community-status.is-error { color: #9f3d27; }
.community-disabled { padding: 20px; border: 1px dashed var(--line); border-radius: 13px; background: var(--panel-2); }
.community-disabled h2 { color: var(--ink); font: 600 21px var(--font-display); }
.community-disabled p { margin-top: 6px; color: var(--muted); }
.empty-community { padding: 26px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }

.community-rules { display: flex; align-items: flex-start; gap: 10px; max-width: none; }
.community-layout { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 22px; align-items: start; }
.community-account-card { position: sticky; top: 110px; padding: 20px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; box-shadow: 0 12px 35px rgba(22,35,44,.06); }
.community-account-card .btn { width: 100%; justify-content: center; margin-top: 13px; }
.account-chip { display: flex; align-items: center; gap: 11px; margin: 15px 0 5px; }
.account-chip small, .account-chip strong { display: block; }
.account-chip small { color: var(--muted); }
.account-chip strong { color: var(--ink); }
.avatar-dot { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; }
.community-workspace { min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 16px; background: var(--panel); box-shadow: 0 16px 46px rgba(22,35,44,.07); }
.community-tabs { display: grid; grid-template-columns: repeat(3,1fr); padding: 6px; background: var(--panel-2); border-bottom: 1px solid var(--line-soft); }
.community-tab { padding: 12px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 700 13px var(--font-body); cursor: pointer; }
.community-tab.active { background: var(--panel); color: var(--teal); box-shadow: 0 3px 12px rgba(22,35,44,.08); }
.community-panel { padding: clamp(16px,3vw,28px); }
.community-panel[hidden] { display: none; }
.community-panel-head { margin-bottom: 18px; }

.chat-shell { display: grid; grid-template-columns: 190px minmax(0,1fr); min-height: 510px; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.chat-rooms { padding: 8px; background: var(--panel-2); border-right: 1px solid var(--line-soft); }
.chat-rooms button { display: grid; width: 100%; gap: 3px; padding: 11px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.chat-rooms button.active { background: #fff; box-shadow: 0 4px 13px rgba(22,35,44,.07); }
.chat-rooms small { color: var(--muted); font-size: 10px; line-height: 1.3; }
.chat-main { display: grid; grid-template-rows: minmax(300px,1fr) auto; min-width: 0; }
.chat-messages { max-height: 430px; overflow-y: auto; padding: 12px 16px; }
.chat-message { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.chat-message > div { display: flex; align-items: baseline; gap: 9px; }
.chat-message strong { color: var(--ink); font-size: 13px; }
.chat-message time { color: var(--muted); font-size: 10px; }
.chat-message p { margin: 4px 0; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { grid-template-columns: 1fr auto; padding: 12px; border-top: 1px solid var(--line-soft); background: var(--panel-2); }
.chat-form textarea { min-height: 52px; max-height: 140px; }
.chat-form .community-status { grid-column: 1/-1; }
.requires-auth.is-locked { opacity: .58; }

.community-card-list { display: grid; gap: 13px; }
.petition-card, .poll-card { padding: 18px; border: 1px solid var(--line-soft); border-radius: 13px; background: #fff; }
.petition-card h3, .poll-card h3 { margin: 7px 0; color: var(--ink); font: 600 20px/1.25 var(--font-display); }
.petition-card > p, .poll-card > p { color: var(--ink-2); }
.community-card-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.petition-card details { margin: 12px 0; color: var(--ink-2); }
.petition-card summary, .community-create summary { color: var(--teal); font-weight: 700; cursor: pointer; }
.progress { height: 7px; overflow: hidden; margin: 15px 0 9px; border-radius: 20px; background: var(--bg-2); }
.progress span { display: block; height: 100%; background: linear-gradient(90deg,var(--teal),var(--gold)); }
.petition-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 13px; }
.petition-actions .btn { padding: 10px 14px; }
.community-create { margin-top: 18px; padding: 15px; border: 1px dashed var(--line); border-radius: 12px; background: var(--panel-2); }
.community-create .community-form { margin-top: 16px; }
.poll-options { display: grid; gap: 8px; margin: 14px 0 9px; }
.poll-options button { position: relative; overflow: hidden; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.poll-options button > span { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 10px; }
.poll-options button em { color: var(--muted); font-style: normal; font-size: 11px; }
.poll-options button i { position: absolute; inset: 0 auto 0 0; z-index: 1; background: rgba(46,115,135,.11); }
.poll-card > small { color: var(--muted); }

@media (max-width: 840px) {
  .community-layout { grid-template-columns: 1fr; }
  .community-account-card { position: static; }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-rooms { display: flex; gap: 7px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .chat-rooms button { min-width: 170px; }
}
@media (max-width: 560px) {
  .article-facts { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 30px; }
  .article-fact { min-height: 116px; padding: 15px; }
  .article-fact strong { font-size: 28px; }
  .hydra-about { grid-template-columns: 78px 1fr; gap: 16px; border-radius: 16px; }
  .hydra-about img { width: 78px; height: 78px; }
  .article-detail { border-radius: 12px; }
  .article-detail picture { aspect-ratio: 4/3; }
  .article-detail-body { padding: 19px; }
  .article-back { margin-left: 18px; }
  .comment.is-reply { margin-left: 16px; }
  .community-tabs { grid-template-columns: 1fr; gap: 4px; }
  .chat-form { grid-template-columns: 1fr; }
  .chat-form .community-status { grid-column: auto; }
  .inline-form, .petition-actions { align-items: stretch; flex-direction: column; }
  .community-modal { padding: 22px; }
}

/* responsive header */
@media (max-width: 1700px){
  .header-actions > .btn-support { display: none; }
}
@media (max-width: 1280px){
  .mainnav { display: none; }
  .header-actions { margin-left: auto; }
  .hamburger { display: grid; }
  .btn-support { display: none; }
}

/* ---------- Light editorial refresh ---------- */
.topbar { background: #14242D; border-bottom-color: rgba(255,255,255,.08); }
.topbar-date { color: #BFC9CE; }
.lang-switch button { color: #AEBBC1; }
.lang-switch button:hover { color: #FFE19A; }
.lang-switch button.active { color: #14242D; background: #F0C75C; border-color: #F0C75C; }

.site-header {
  background: rgba(255,253,248,.84);
  backdrop-filter: saturate(150%) blur(18px);
  box-shadow: 0 1px 0 rgba(255,255,255,.65);
}
.site-header.scrolled { background: rgba(255,253,248,.96); box-shadow: 0 14px 38px rgba(22,35,44,.12); }
.brand-mark { background: linear-gradient(155deg, #17313D, #0E1D24); box-shadow: 0 8px 24px rgba(23,49,61,.18); }
.mainnav > a:hover, .navdrop > button:hover { background: rgba(33,107,125,.08); }
.icon-btn { background: rgba(255,255,255,.68); }
.searchbar { background: rgba(244,241,234,.96); }

.hero { min-height: 540px; background: #20313A; }
.hero-bg {
  background-image:
    linear-gradient(90deg, rgba(18,31,39,.90) 0%, rgba(18,31,39,.76) 42%, rgba(18,31,39,.25) 72%, rgba(18,31,39,.40) 100%),
    var(--hero-image, none);
  background-position: center 48%;
}
.hero-glow {
  background:
    radial-gradient(60% 85% at 82% 24%, rgba(92,176,192,.18), transparent 64%),
    radial-gradient(48% 70% at 12% 92%, rgba(224,175,57,.15), transparent 66%),
    linear-gradient(180deg, rgba(15,31,39,.02), rgba(15,31,39,.18));
  pointer-events: none;
}
.hero .wrap { padding-top: 68px; padding-bottom: 58px; }
.hero h1 { text-shadow: 0 3px 22px rgba(0,0,0,.26); }
.hero .hero-lead { color: rgba(247,247,243,.86); }
.hero .hero-meta, .hero .also h3, .hero .also-item .m { color: rgba(239,243,241,.66); }
.hero .also { border-color: rgba(255,255,255,.24); }
.hero .also-item { border-color: rgba(255,255,255,.16); }
.hero .also-item .t { color: #FAF8F2; }
.hero .btn-ghost { color: #FFFDF8; border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.05); }
.hero .btn-ghost:hover { color: #FFF5D6; border-color: #E0B64C; background: rgba(255,255,255,.10); }

.section-head h2, .page-head h1, .drawer h2 { color: var(--ink); }
.article-card, .tl-card, .set-card, .card, .story, .baba-banner, .form-shell, .skeleton {
  box-shadow: 0 10px 30px rgba(22,35,44,.055);
}
.article-card { border-color: rgba(23,35,44,.11); }
.article-card:hover { box-shadow: 0 18px 46px rgba(22,35,44,.13); }
.card-thumb-shade { background: linear-gradient(180deg, transparent 62%, rgba(15,26,33,.28)); }
.chip { box-shadow: 0 4px 14px rgba(22,35,44,.04); }
.skeleton .sk-thumb, .skeleton .sk-line {
  background: linear-gradient(90deg, #ECE8DE 25%, #F8F5EE 37%, #ECE8DE 63%);
  background-size: 400% 100%;
}
.cat-war { color: #9D3F24; } .cat-occ { color: #76358F; }
.cat-deocc { color: #50652E; } .cat-rebuild { color: #246D7E; }
.cat-people { color: #805B08; }
.status-pill.st-occ { color: #76358F; } .status-pill.st-front { color: #9D3F24; }
.status-pill.st-deocc { color: #50652E; } .status-pill.st-controlled { color: #246D7E; }

.mobile-scrim, .drawer-scrim { background: rgba(15,27,34,.46); backdrop-filter: blur(3px); }
.modal-scrim { background: rgba(15,27,34,.54); backdrop-filter: blur(5px); }
.form-placeholder { background: repeating-linear-gradient(45deg, #F2EEE5, #F2EEE5 12px, #F8F5EE 12px, #F8F5EE 24px); }
.form-placeholder code { background: #17313D; color: #FFE19A; }

footer { background: #E8E2D6; border-top-color: #D2C9B9; color: #667179; }
footer h4 { color: #805B08; }
footer a { color: #42515A; }
footer a:hover { color: #805B08; }
.foot-legal { border-top-color: #D6CEBF; color: #7C858B; }

@media (max-width: 620px){
  .hero { min-height: 0; }
  .hero-bg { background-position: center 44%; background-image: linear-gradient(90deg, rgba(18,31,39,.92), rgba(18,31,39,.58)), var(--hero-image-mobile, var(--hero-image, none)); }
  .hero .wrap { padding-top: 48px; padding-bottom: 44px; }
}

/* Preserve editorial cover typography at every viewport without changing documentary photos. */
.article-detail picture.editorial-cover { height: auto; aspect-ratio: 16 / 9; }
.article-detail picture.editorial-cover img { height: auto; object-fit: contain; }
.card-thumb picture.editorial-cover img { object-fit: contain; }
