:root {
  --bg: #0a1020;
  --bg-elevated: #121a2e;
  --bg-card: #161f36;
  --bg-soft: #1c2744;
  --line: rgba(232, 220, 196, 0.12);
  --text: #f4efe4;
  --muted: #b8b0a0;
  --gold: #e4c27a;
  --gold-soft: rgba(228, 194, 122, 0.16);
  --cream: #f6edd8;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(228, 194, 122, 0.12), transparent 50%),
    radial-gradient(900px 500px at 100% 0%, rgba(92, 164, 164, 0.12), transparent 46%),
    var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(10, 16, 32, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.hero,
.nav-panel,
.region,
.site-footer,
.section-head,
.overview-card {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-kicker,
.section-kicker {
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.brand h1,
.hero h2,
.region-copy h3,
.overview-copy h3,
.section-head h2 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand h1 {
  font-size: 1.35rem;
}

.voice-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.voice-control select {
  min-width: 180px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 28px;
}

.hero h2 {
  margin: 12px 0 16px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
}

.hero p,
.overview-copy p,
.region-copy > p,
.details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-figure,
.region-figure,
.overview-figure {
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0d1426;
}

.hero-figure img,
.region-figure img,
.overview-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-size: 0.95rem;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.nav-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 36px;
}

.nav-panel a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
  text-decoration: none;
  font-size: 0.92rem;
  transition: 0.2s ease;
}

.nav-panel a:hover,
.nav-panel a:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.section {
  padding: 18px 0 8px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.overview-card,
.region {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%), var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.region:nth-child(even) .region-figure {
  order: 2;
}

.region-figure,
.overview-figure {
  border-radius: 18px;
}

.region-copy h3 {
  font-size: 2rem;
}

.terms {
  display: grid;
  gap: 12px;
  margin: 18px 0 16px;
}

.term-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label button"
    "main button";
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 12px 14px;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.term-row.bg {
  background: rgba(255, 255, 255, 0.03);
  grid-template-areas:
    "label label"
    "main main";
}

.term-label {
  grid-area: label;
  margin: 0;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.term-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.term-main strong,
.ipa {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

.term-main strong {
  font-size: 1.08rem;
  color: var(--text);
}

.ipa {
  color: var(--muted);
  font-size: 0.92rem;
}

.speak-btn {
  grid-area: button;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #1b1408;
  background: var(--gold);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

.speak-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(228, 194, 122, 0.28);
}

.speak-btn.speaking {
  animation: pulse 0.9s ease-in-out infinite;
}

.speak-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.functions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.functions li {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.site-footer {
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes pulse {
  50% {
    opacity: 0.72;
    transform: scale(0.98);
  }
}

@media (max-width: 900px) {
  .hero,
  .overview-card,
  .region {
    grid-template-columns: 1fr;
  }

  .region:nth-child(even) .region-figure {
    order: 0;
  }

  .header-inner,
  .voice-control {
    flex-direction: column;
    align-items: flex-start;
  }

  .voice-control select {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .term-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "main"
      "button";
  }

  .term-row.bg {
    grid-template-areas:
      "label"
      "main";
  }

  .legend {
    grid-template-columns: 1fr;
  }

  .speak-btn {
    justify-self: start;
  }
}
.region {
  border-left: 4px solid var(--accent, var(--gold));
}

.region-figure figcaption,
.hero-figure figcaption {
  margin: 0;
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 0.88rem;
  background: #10182c;
}

.details p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

.details p:last-child {
  margin-bottom: 0;
}

.region-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.region-nav a {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.86rem;
}

.region-nav a:hover,
.region-nav a:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}
.region-copy,
.region-figure {
  min-width: 0;
}

.region-copy h3,
.region-figure figcaption,
.hero-figure figcaption {
  overflow-wrap: anywhere;
  word-break: break-word;
}