/* Статичні сторінки /uk/…, /en/… (tools/build-pages.mjs): текст статті + 3D-модель у рамці */
:root {
  --bg: #05070f;
  --panel: rgba(10, 14, 30, 0.9);
  --border: rgba(140, 170, 255, 0.25);
  --text: #e8ecff;
  --muted: #9aa3c7;
  --accent: #ffcc55;
  --link: #9ec2ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
a { color: var(--link); }
a:hover { color: #c6dcff; }

.site-header, .site-footer, .page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.brand { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 18px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.langs { margin-inline-start: auto; font-size: 15px; display: flex; gap: 12px; }
.langs [aria-current] { color: var(--text); text-decoration: none; font-weight: 600; }

.breadcrumbs { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "›"; margin-inline-end: 4px; color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--text); }

h1 { font-size: 30px; line-height: 1.25; margin: 10px 0 14px; color: var(--accent); }
h2 { font-size: 22px; line-height: 1.3; margin: 32px 0 10px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; color: #d3d9f2; }

/* 3D-модель: кадр-заставка під рамкою симулятора — видно, поки сцена вантажиться, і без JS */
.scene {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  height: clamp(300px, 62vh, 640px);
  background: #000;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.scene .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  opacity: 0; transition: opacity 0.4s;
}
.scene iframe.loaded { opacity: 1; }
.scene-tools { max-width: 860px; margin: 8px auto 0; padding: 0 16px; font-size: 14px; color: var(--muted); }
.scene-tools p { margin: 0 0 4px; }

.facts {
  display: grid;
  grid-template-columns: minmax(130px, max-content) 1fr;
  gap: 6px 16px;
  margin: 18px 0 8px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts ul { margin: 0; padding-inline-start: 18px; }
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  h1 { font-size: 26px; }
}

.kids { background: rgba(255, 204, 85, 0.07); border: 1px solid rgba(255, 204, 85, 0.3); border-radius: 14px; padding: 4px 16px 6px; }
.kids h2 { margin-top: 14px; color: var(--accent); }

.objects li, .sources li { margin-bottom: 6px; }
.sources { font-size: 15px; }
.note { font-size: 14px; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 10px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: start; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num { white-space: nowrap; text-align: end; }
th.num { text-align: end; }

.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 28px 0 8px; font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.cards li { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.cards small { display: block; color: var(--muted); }

.site-footer { margin-top: 40px; padding-top: 16px; padding-bottom: 28px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
