@font-face {
  font-family: "HK Grotesk";
  src: url("/static/fonts/HKGrotesk-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HK Grotesk";
  src: url("/static/fonts/HKGrotesk-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HK Grotesk";
  src: url("/static/fonts/HKGrotesk-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archer";
  src: url("/static/fonts/ArcherBookPro.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archer";
  src: url("/static/fonts/ArcherSemiboldPro.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archer";
  src: url("/static/fonts/ArcherBoldPro.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #122b49;
  --navy-deep: #191e49;
  --ink: #122b49;
  --muted: #5a6b7d;
  --line: #d5dde6;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --accent: #ea4916;
  --accent-hover: #c93c10;
  --sky: #b3dbed;
  --link: #077ce3;
  --max: 52rem;
  --toc: 15.5rem;
  --font-sans: "HK Grotesk", Helvetica, Arial, sans-serif;
  --font-display: "Archer", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  background:
    linear-gradient(180deg, #eaf3f8 0%, var(--bg) 28%, #eef2f6 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--link); }

.wrap {
  width: min(100% - 2rem, 78rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.5rem;
  padding: 0.95rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--navy);
  text-decoration: none;
}

.brand img {
  height: 1.55rem;
  width: auto;
  display: block;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav,
.lang {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav { margin-right: auto; }

.nav a,
.lang a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover,
.lang a:hover,
.related a:hover {
  color: var(--accent);
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

.lang a {
  opacity: 0.55;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.lang a[aria-current="true"] {
  opacity: 1;
  color: var(--accent);
}

main.wrap {
  flex: 1;
  padding: 2.75rem 0 4.5rem;
}

.policy {
  display: grid;
  gap: 1.5rem;
  width: min(100%, calc(var(--max) + var(--toc) + 2rem));
  margin-inline: auto;
}

.policy-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 0.45rem;
  color: var(--navy);
  max-width: var(--max);
}

.updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 300;
}

.toc {
  min-width: 0;
  max-width: 100%;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(18, 43, 73, 0.04);
  overflow-wrap: anywhere;
  overflow-x: hidden;
}

.toc h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.toc ul {
  margin: 0;
  padding-left: 0.95rem;
  list-style: disc;
}

.toc li {
  margin: 0.28rem 0;
  padding-right: 0.15rem;
}

.toc a {
  display: inline;
  color: var(--navy);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.toc .toctree-l2,
.toc ul ul {
  margin-top: 0.15rem;
  padding-left: 0.85rem;
}

.toc .toctree-l2 a,
.toc ul ul a {
  font-size: 0.78rem;
  color: var(--muted);
}

.policy-body {
  min-width: 0;
  max-width: var(--max);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 10px 30px rgba(18, 43, 73, 0.04);
}

.policy-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--navy);
  margin: 2rem 0 0.7rem;
  scroll-margin-top: 5.5rem;
}

.policy-body h2:first-child { margin-top: 0; }

.policy-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--navy-deep);
  margin: 1.35rem 0 0.45rem;
  scroll-margin-top: 5.5rem;
}

.policy-body p,
.policy-body li {
  font-size: 1rem;
  font-weight: 400;
}

.policy-body ul,
.policy-body ol {
  padding-left: 1.2rem;
}

.policy-body table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.policy-body th,
.policy-body td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.6rem;
  vertical-align: top;
}

.policy-body th {
  background: color-mix(in srgb, var(--sky) 35%, white);
  text-align: left;
  font-weight: 500;
}

.policy-body a { color: var(--link); }
.policy-body a:hover { color: var(--accent); }

.error-page {
  max-width: var(--max);
  padding: 3.5rem 0 4rem;
}

.error-page .error-code {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.error-page h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.2;
  color: var(--navy-deep);
}

.error-page .error-message {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.related {
  margin: 0;
}

.related a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.related a::after {
  content: "→";
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--navy);
  color: color-mix(in srgb, white 78%, transparent);
  padding: 1.4rem 0 1.8rem;
  font-size: 0.9rem;
}

.site-footer p { margin: 0; }

@media (min-width: 960px) {
  .policy {
    grid-template-columns: minmax(0, var(--toc)) minmax(0, var(--max));
    column-gap: 1.75rem;
    align-items: start;
  }

  .policy-header,
  .related {
    grid-column: 2;
  }

  .toc {
    grid-column: 1;
    grid-row: 2 / span 2;
    position: sticky;
    top: 5.25rem;
    max-height: calc(100vh - 6.5rem);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .policy-body { grid-column: 2; }
}
