:root {
  color-scheme: light;
  --bg: #fbfbf8;
  --panel: #ffffff;
  --ink: #050505;
  --muted: #686868;
  --soft: #9a9a9a;
  --line: #e8e8e3;
  --line-strong: #d8d8d1;
  --accent: #050505;
  --accent-soft: #f1f1ed;
  --green: #18a058;
  --red: #d84646;
  --amber: #f0b429;
  --shadow: 0 24px 80px rgba(5, 5, 5, 0.06);
  --hero-copy: #3d3d3a;
  --body-text: #242421;
  --card-bg: #ffffff;
  --switcher-bg: #edede8;
  --switcher-active-bg: #ffffff;
  --note-bg: #fff9df;
  --note-color: #4a3b00;
  --note-border: rgba(240, 180, 41, 0.38);
}

html.dark {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --soft: #64748b;
  --line: #334155;
  --line-strong: #475569;
  --accent: #f1f5f9;
  --accent-soft: #1e293b;
  --green: #10b981;
  --red: #ef4444;
  --amber: #f0b429;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  --hero-copy: #94a3b8;
  --body-text: #cbd5e1;
  --card-bg: #1e293b;
  --switcher-bg: #1e293b;
  --switcher-active-bg: #334155;
  --note-bg: rgba(240, 180, 41, 0.08);
  --note-color: #f0d080;
  --note-border: rgba(240, 180, 41, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.72;
}

a {
  color: var(--ink);
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-color: var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(232, 232, 227, 0.9);
  background: rgba(251, 251, 248, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--ink);
  color: transparent;
  font-size: 0;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  content: "";
  transform-origin: center;
}

.brand-mark::before {
  transform: translate(-50%, -50%) rotate(42deg);
}

.brand-mark::after {
  transform: translate(-50%, -50%) rotate(-42deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

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

.nav a:hover {
  color: var(--ink);
}

.download {
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  padding: 9px 16px;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0 58px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  padding: 7px 12px;
  color: var(--line);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(52px, 8vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 950;
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--hero-copy);
  font-size: 18px;
}

.updated {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  /* color: var(--muted); */
  font-size: 16px;
  font-weight: 700;
}

.lang-switcher {
  display: flex;
  align-self: center;
  gap: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--switcher-bg);
  padding: 4px;
  white-space: nowrap;
}

.lang-switcher a,
.lang-switcher span {
  display: inline-flex;
  min-width: 46px;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.lang-switcher .active {
  background: var(--switcher-active-bg);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(5, 5, 5, 0.12);
}

.layout {
  display: block;
  width: min(980px, calc(100% - 48px));
  margin: 0 auto 100px;
}

.toc {
  display: none;
}

.toc-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.toc a {
  display: block;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.toc a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.document {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.document section + section {
  margin-top: 58px;
  padding-top: 0;
  border-top: 0;
}

h2 {
  margin: 0 0 18px;
  font-size: 29px;
  line-height: 1.24;
  letter-spacing: 0;
  font-weight: 900;
}

h3 {
  margin: 26px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

p {
  margin: 0 0 15px;
  color: var(--body-text);
}

ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

li {
  margin: 8px 0;
  color: var(--body-text);
}

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

.signal-list li {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-bg);
  padding: 12px 14px;
}

.note {
  margin-top: 20px;
  border: 1px solid var(--note-border);
  border-radius: 16px;
  background: var(--note-bg);
  padding: 16px 18px;
  color: var(--note-color);
}

.boundary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.boundary-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--card-bg);
}

.boundary-card strong {
  display: block;
  margin-bottom: 8px;
}

.yes {
  color: var(--green);
}

.no {
  color: var(--red);
}

.contact-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-bg);
  padding: 18px;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--card-bg);
}

.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 860px) {
  .header-inner,
  .hero,
  .layout,
  .footer-inner {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    gap: 9px;
  }

  .nav a:not(.download) {
    display: none;
  }

  .hero {
    display: block;
    padding: 58px 0 28px;
  }

  .lang-switcher {
    margin-top: 28px;
    overflow-x: auto;
    width: 100%;
  }

  .layout {
    display: block;
  }

  .document {
    border-radius: 0;
    padding: 0;
  }

  .signal-list,
  .boundary {
    grid-template-columns: 1fr;
  }
}
