:root {
  --navy: #1a2550;
  --navy-2: #2b3a8f;
  --amber: #e8a33d;
  --amber-ink: #8a5300;
  --sand: #f7f1e6;
  --sand-line: #e3d6bd;
  --ink: #1f2433;
  --text: #353b4d;
  --muted: #5b6275;
  --rule: #dfe3ec;
  --white: #fff;
  --font: 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.68;
  color: var(--text);
  background: var(--white);
}

svg { display: block; max-width: 100%; }
a { color: var(--navy-2); text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { margin: 0 0 .9rem; color: var(--navy); line-height: 1.22; font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1rem; }
strong { color: var(--ink); font-weight: 600; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }

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

.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-top: 4px solid var(--navy); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-size: 1.15rem; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.nav-list { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.nav-list a { display: block; padding: 20px 0; font-size: .92rem; font-weight: 600; color: var(--text); text-decoration: none; box-shadow: inset 0 -3px 0 transparent; }
.nav-list a:hover,
.nav-list a.is-active { color: var(--navy); box-shadow: inset 0 -3px 0 var(--amber); }

.nav-toggle {
  display: none; position: relative; width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--navy); border-radius: 4px; background: var(--white); cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 10px; width: 20px; height: 2px; background: var(--navy); transition: transform .25s, background .25s;
}
.nav-toggle-bar { top: 19px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

.hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px);
  background: repeating-linear-gradient(180deg, transparent 0 31px, #edf0f7 31px 32px), var(--white);
  border-bottom: 6px solid var(--navy);
  box-shadow: 0 4px 0 var(--amber);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: end; }
.hero-grid > * { min-width: 0; }
.hero h1 { margin: 0; font-size: clamp(2rem, 4.1vw, 3.15rem); letter-spacing: -.025em; }
.lead { margin: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--amber); font-size: 1.04rem; background: rgba(255, 255, 255, .85); }

.doc { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 60px; padding-top: 56px; padding-bottom: 40px; }
.doc > * { min-width: 0; }
.toc-inner {
  position: sticky; top: calc(var(--header-h) + 22px);
  max-height: calc(100vh - var(--header-h) - 44px); overflow-y: auto;
  padding: 18px 20px 12px; border: 1px solid var(--rule); border-top: 4px solid var(--navy); background: #fbf9f4;
}
.toc-title { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-ink); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; border-bottom: 1px dotted #c8cedd; }
.toc li:last-child { border-bottom: 0; }
.toc a { display: grid; grid-template-columns: 28px 1fr; padding: 8px 0; font-size: .9rem; line-height: 1.38; color: var(--ink); text-decoration: none; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--amber-ink); }
.toc a:hover { color: var(--navy-2); text-decoration: underline; text-decoration-color: var(--amber); }

.doc-body { max-width: 800px; counter-reset: part; }
.part { counter-increment: part; padding-bottom: 44px; margin-bottom: 48px; border-bottom: 1px solid var(--rule); }
.part:last-child { margin-bottom: 0; border-bottom: 0; }
.part h2 { font-size: clamp(1.5rem, 2.5vw, 1.95rem); letter-spacing: -.015em; }
.part h2::before {
  content: counter(part, decimal-leading-zero);
  display: inline-block; margin-right: 14px; padding: 2px 8px; border-radius: 3px;
  font-size: .9rem; font-variant-numeric: tabular-nums; vertical-align: .3em;
  color: var(--white); background: var(--navy);
}

.table-wrap { margin: 22px 0 24px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead th, thead td { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--white); background: var(--navy); border-bottom: 0; }
table.wide { min-width: 600px; }
tbody th { font-weight: 600; color: var(--navy); background: #fbf8f1; }
tbody tr:last-child > * { border-bottom: 0; }
td.yes, td.no { white-space: nowrap; font-weight: 600; color: var(--navy); }
td.yes::before, td.no::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 50%; background: var(--navy); }
td.no { color: var(--amber-ink); }
td.no::before { background: transparent; border: 2px solid var(--amber); }

.ticks, .cycle, .lines, .flags, .steps { margin: 0 0 1.2rem; padding: 0; list-style: none; }
.ticks li { position: relative; margin: 8px 0; padding-left: 32px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border: 2px solid var(--navy); border-radius: 3px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7' fill='none' stroke='%23c47f12' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.cycle { counter-reset: c; }
.cycle li { position: relative; counter-increment: c; padding: 5px 0 20px 54px; }
.cycle li::before {
  content: counter(c); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px;
  border: 2px solid var(--navy); border-radius: 50%; font-weight: 700; color: var(--navy); background: var(--white);
}
.cycle li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--amber); }

.form-sheet { position: relative; margin-top: 8px; padding: 6px 30px; border: 1px solid var(--sand-line); border-top: 6px solid var(--amber); border-radius: 4px; background: var(--sand); counter-reset: fld; }
.field { counter-increment: fld; padding: 26px 0 22px; border-bottom: 1px dashed #cdb98f; }
.field:last-child { border-bottom: 0; }
.field h3 { display: flex; gap: 14px; align-items: flex-start; }
.field h3::before {
  content: counter(fld); flex: 0 0 28px; height: 28px; display: grid; place-items: center; margin-top: -2px;
  border: 2px solid var(--navy); border-radius: 3px; font-size: .85rem; color: var(--navy); background: var(--white);
}
.lines { margin-top: 4px; background: var(--white); border: 1px solid var(--sand-line); }
.lines li { position: relative; padding: 10px 14px 10px 42px; border-bottom: 1px solid var(--sand-line); font-size: .97rem; }
.lines li:last-child { border-bottom: 0; }
.lines li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 15px; height: 15px; border: 1.5px solid var(--navy); border-radius: 2px; }
.slip {
  margin: 20px 0 0; padding: 16px 20px; border: 1px dashed #8e97b8; border-left: 5px solid var(--navy);
  font-variant-numeric: tabular-nums; background: var(--white);
}

.flags { padding: 6px 20px; border: 1px solid #efd9b3; border-radius: 4px; background: #fffaf1; }
.flags li { position: relative; padding: 11px 0 11px 36px; border-bottom: 1px solid #f1e2c6; }
.flags li:last-child { border-bottom: 0; }
.flags li::before {
  content: ""; position: absolute; left: 0; top: 14px; width: 22px; height: 22px; border-radius: 3px;
  background: var(--amber-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7L7 17' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.alert { padding: 18px 22px; border-left: 6px solid var(--amber); border-radius: 4px; color: #e9ecf5; background: var(--navy); }

.steps { counter-reset: s; }
.steps li { position: relative; counter-increment: s; padding: 16px 0 16px 64px; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(s); position: absolute; left: 4px; top: 6px; font-size: 2.3rem; font-weight: 700; line-height: 1.2; color: var(--amber-ink); }
.steps strong { color: var(--navy); }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { position: relative; padding: 18px 54px 18px 0; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 16px; display: grid; place-items: center; width: 28px; height: 28px;
  border: 2px solid var(--navy); border-radius: 3px; font-size: 1.15rem; font-weight: 600; line-height: 1; color: var(--navy);
}
.faq details[open] summary::after { content: "\2212"; color: var(--white); background: var(--navy); }
.faq summary h3 { margin: 0; font-size: 1.05rem; }
.faq summary:hover h3 { color: var(--navy-2); }
.faq details p { margin: 0; padding: 0 54px 20px 0; }

.about { padding: 56px 0 60px; background: var(--sand); border-top: 1px solid var(--sand-line); }
.about-inner { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 60px; }
.about-inner > * { min-width: 0; }
.about h2 { margin: 0; font-size: 1.35rem; }
.about p { max-width: 800px; margin: 0; padding-left: 20px; border-left: 4px solid var(--navy); color: var(--ink); }

.site-footer { color: #c9d0e6; background: var(--navy); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 32px; padding-top: 30px; padding-bottom: 30px; }
.footer-inner p { margin: 0; }
.footer-brand { font-size: 1.1rem; font-weight: 700; color: var(--white); }
.footer-copy { margin-left: auto !important; font-size: .9rem; }

.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 4px; color: var(--navy); background: var(--amber); box-shadow: 0 4px 14px rgba(26, 37, 80, .25);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }

@media (max-width: 1100px) {
  .nav-list { gap: 18px; }
  .doc, .about-inner { grid-template-columns: 230px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 991.98px) {
  .nav-toggle { display: block; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 4px 28px 16px; background: var(--white); border-bottom: 1px solid var(--rule); box-shadow: 0 10px 20px rgba(26, 37, 80, .08); }
  .primary-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { padding: 12px 0; border-bottom: 1px solid var(--rule); box-shadow: none; }
  .nav-list a.is-active { box-shadow: inset 4px 0 0 var(--amber); padding-left: 12px; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 36px; }
  .about-inner { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .toc-inner { position: static; max-height: none; }
  .toc ol { columns: 2; column-gap: 28px; }
  .toc li { break-inside: avoid; }
  .doc-body { max-width: none; }
}

@media (max-width: 767.98px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .primary-nav { padding: 4px 18px 14px; }
  .toc ol { columns: 1; }
  .form-sheet { padding: 4px 16px; }
  .lines li { padding-left: 38px; }
  .faq details p { padding-right: 0; }
  .footer-copy { margin-left: 0 !important; }
  .back-to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.release-not-found main { display: block; width: 100%; max-width: 640px; min-height: 0; margin: 10vh auto; padding: 32px; box-sizing: border-box; }
.release-not-found h1 { font-size: clamp(32px, 7vw, 48px); line-height: 1.2; letter-spacing: normal; }
