:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #5f6d66;
  --soft: #f6f0e6;
  --paper: #fffaf2;
  --line: rgba(28, 63, 52, 0.16);
  --primary: #163c32;
  --accent: #c9902d;
  --leaf: #2f8c70;
  --blue: #376a9f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(47, 140, 112, 0.16), transparent 34rem),
    linear-gradient(180deg, #f8f2e8 0%, #fffdf9 48%, #eef5f1 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

a {
  color: #225f77;
  font-weight: 750;
}

.page-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: #ede6ff;
  border: 1px solid rgba(42, 91, 77, 0.16);
  padding: 8px;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: block;
}

.brand-text strong {
  display: block;
  line-height: 1.05;
}

.brand-text span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 9px 16px;
  text-decoration: none;
  font-weight: 850;
}

.button.primary {
  background: var(--primary);
  color: #fff7e8;
  border-color: var(--primary);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 26px;
}

.hero-panel,
.summary-panel,
.content-panel,
.translation-panel,
.doc-card {
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(27, 41, 35, 0.09);
}

.hero-panel {
  padding: clamp(28px, 5vw, 54px);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(22, 60, 50, 0.95), rgba(28, 80, 67, 0.9)),
    url("/assets/assets/images/bg.jpg") center / cover;
  color: #fff9ee;
}

.eyebrow {
  margin: 0 0 12px;
  color: #ffd98c;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2,
h3 {
  color: var(--ink);
  line-height: 1.16;
}

h2 {
  margin: 34px 0 10px;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

h3 {
  margin: 24px 0 8px;
  font-size: 1.12rem;
}

.hero-text {
  max-width: 62ch;
  margin: 20px 0 0;
  color: rgba(255, 249, 238, 0.84);
  font-size: 1.08rem;
}

.summary-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 24px;
  border-radius: 30px;
  background: rgba(255, 250, 242, 0.86);
}

.quick-fact {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.quick-fact strong {
  display: block;
  color: var(--primary);
  font-size: 1.02rem;
}

.quick-fact span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.translation-panel {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
}

.translation-panel.is-visible {
  display: flex;
}

.translation-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 8px 14px;
  font: inherit;
  font-weight: 750;
}

.content-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
}

.toc {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
}

.toc strong {
  display: block;
  margin-bottom: 12px;
}

.toc a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
}

.legal-copy {
  min-width: 0;
}

.notice {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--leaf);
  border-radius: 14px;
  background: #eef8f3;
}

.warning {
  border-left-color: var(--accent);
  background: #fff5df;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.doc-card {
  display: block;
  min-height: 184px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: rgba(28, 63, 52, 0.32);
  box-shadow: 0 28px 70px rgba(27, 41, 35, 0.12);
}

.doc-card span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #eef8f3;
  color: var(--leaf);
  font-weight: 900;
}

.doc-card strong {
  display: block;
  margin-top: 18px;
  color: var(--ink);
  font-size: 1.12rem;
}

.doc-card em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
}

.version {
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 28px, 1160px);
  }

  .topbar,
  .translation-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions,
  .translation-controls {
    justify-content: flex-start;
  }

  .hero,
  .content-panel {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  h1 {
    max-width: 11ch;
  }
}
