@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-700.woff2") format("woff2");
}

:root {
  --bg: #f3efe6;
  --bg-2: #e8e1d2;
  --card: #fffdf8;
  --ink: #162033;
  --muted: #4d5b6a;
  --navy: #12263c;
  --navy-2: #1c3d5c;
  --blue: #1d5d90;
  --blue-2: #2f7eae;
  --copper: #b25a30;
  --line: #d8d0c2;
  --ok: #1d6844;
  --warn: #8a5a16;
  --warn-bg: #f8f1e4;
  --note-bg: #e7f1f8;
  --danger-bg: #f8ece6;
  --shadow: 0 18px 40px rgba(18, 38, 60, 0.08);
  --header: 4.5rem;
  --measure: 74ch;
  --focus: 2px solid var(--copper);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 420px at 90% -10%, rgba(47, 126, 174, 0.12), transparent 60%),
    linear-gradient(180deg, #f7f4ec 0%, var(--bg) 280px);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  min-width: 320px;
}

body.nav-open { overflow: hidden; }

img, svg { max-width: 100%; height: auto; }

a { color: var(--blue); text-underline-offset: 0.16em; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--card);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { top: 0.5rem; }

.wrap {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(18, 38, 60, 0.96);
  color: #f6f3ec;
  border-bottom: 3px solid var(--copper);
  min-height: var(--header);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  text-decoration: none;
  margin-right: auto;
}
.brand-text { display: block; }
.brand-text strong {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}
.brand-text small {
  display: block;
  color: #d5deea;
  font-size: 0.75rem;
}
.mark {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  cursor: pointer;
}

.site-nav { display: flex; align-items: center; gap: 0.15rem; }
.site-nav > ul,
.menu {
  display: flex;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.menu-row {
  display: inline-flex;
  align-items: center;
}
.menu a.menu-btn,
.menu button.menu-more {
  color: #f4f7fb;
  text-decoration: none;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.92rem;
  border-radius: 0.4rem;
  cursor: pointer;
}
.menu a.menu-btn {
  padding: 0.45rem 0.15rem 0.45rem 0.55rem;
}
.menu button.menu-more {
  width: 1.4rem;
  height: 1.8rem;
  padding: 0;
  position: relative;
}
.menu button.menu-more::before {
  content: "";
  display: block;
  margin: 0 auto;
  border: 4px solid transparent;
  border-top-color: #f4f7fb;
  transform: translateY(2px);
}
.menu a.menu-btn:hover,
.menu button.menu-more:hover,
.menu a.menu-btn[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
}

.drop { position: relative; }
.drop-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  width: min(28rem, 72vw);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  box-shadow: var(--shadow);
  padding: 0.85rem 0.7rem 0.7rem;
  columns: 2;
  column-gap: 0.8rem;
}
.drop-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.55rem;
  height: 0.55rem;
}
.drop-panel a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 0.28rem 0.35rem;
  border-radius: 0.35rem;
  break-inside: avoid;
  font-size: 0.9rem;
}
.drop-panel a:hover { background: var(--bg); color: var(--blue); }
.drop.open .drop-panel,
.drop:hover .drop-panel,
.drop:focus-within .drop-panel { display: block; }

.search-wrap { position: relative; margin-left: 0.4rem; }
.search-wrap input {
  width: 11.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.9rem;
}
.search-wrap input::placeholder { color: #c9d4e2; }
.search-results {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(24rem, 80vw);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  box-shadow: var(--shadow);
  max-height: 22rem;
  overflow: auto;
  z-index: 40;
}
.search-results a {
  display: block;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.search-results a:hover,
.search-results a.active { background: var(--bg); }
.search-results small { display: block; color: var(--muted); }
.search-results.open { display: block; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 1rem 0 0;
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; list-style: none; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: #9aa4b0; }
.crumbs a { color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: 2rem;
  padding: 1.2rem 0 3.5rem;
}
.layout > article,
.layout > .toc,
.prose,
.hero,
.hero-card,
.table-scroll,
.card-grid,
.link-grid,
.split,
.btn-row {
  min-width: 0;
  max-width: 100%;
}
.layout.solo { grid-template-columns: minmax(0, 1fr); }

.article-head h1,
.hero h1,
h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-size: clamp(2rem, 4vw, 3.35rem);
  margin: 0.2rem 0 0.8rem;
}

.kicker {
  color: var(--copper);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.55;
  max-width: var(--measure);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.4rem 0 1rem;
}

h2, h3, h4 {
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--header) + 0.8rem);
}
h2 { font-size: clamp(1.5rem, 2vw, 1.95rem); margin: 2.35rem 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 1.45rem 0 0.45rem; }
p { max-width: 72ch; }
.prose > p, .prose li { line-height: 1.72; }
.prose > p { margin: 0.85rem 0; }

.note, .warning, .source-note {
  border-radius: 0.8rem;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
  max-width: 75ch;
}
.note { background: var(--note-bg); border-left: 4px solid var(--blue-2); }
.warning { background: var(--danger-bg); border-left: 4px solid var(--copper); }
.source-note { background: var(--warn-bg); border-left: 4px solid var(--warn); }
.note p, .warning p, .source-note p { margin: 0.35rem 0; }

.card-grid, .platform-grid, .link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0 1.4rem;
}
.card, .link-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1rem 0.9rem;
  box-shadow: 0 1px 0 rgba(18, 38, 60, 0.03);
}
.card h3, .link-card h3 { margin-top: 0; }
.link-card { text-decoration: none; color: inherit; display: block; }
.link-card:hover { border-color: var(--blue-2); }
.card p, .link-card p { color: var(--muted); margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 1rem 0 1.4rem; max-width: 100%; width: 100%; }
table { width: 100%; border-collapse: collapse; background: var(--card); min-width: 36rem; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: #f6f3ec; font-weight: 600; }
tr:nth-child(even) td { background: #faf7f1; }

ol.steps { padding-left: 1.2rem; max-width: 75ch; }
ol.steps li { margin: 0.55rem 0; }
ol.steps li::marker { color: var(--copper); font-weight: 700; }

pre.cmd {
  position: relative;
  background: var(--navy);
  color: #f3efe6;
  border-radius: 0.8rem;
  padding: 1rem 1rem 1rem 1rem;
  overflow: auto;
  max-width: 100%;
}
pre.cmd code { font-family: Consolas, "Courier New", monospace; font-size: 0.92rem; white-space: pre-wrap; }
.copy-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}

.figure {
  margin: 1.2rem 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  padding: 0.8rem;
}
.figure figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.7rem 0.9rem;
  margin: 0.55rem 0;
  max-width: 75ch;
}
.faq summary { cursor: pointer; font-weight: 650; }
.faq summary:hover { color: var(--blue); }

.toc {
  position: sticky;
  top: calc(var(--header) + 1rem);
  align-self: start;
  background: transparent;
  max-height: calc(100vh - var(--header) - 2rem);
  overflow: auto;
}
.toc h2 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-family: "Source Sans 3", sans-serif; margin-top: 0; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { color: var(--muted); text-decoration: none; display: block; padding: 0.22rem 0; font-size: 0.92rem; }
.toc a:hover { color: var(--blue); }
.toc .sub { padding-left: 0.8rem; }

.related, .pager {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pager a { text-decoration: none; font-weight: 650; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 650;
  border: 1px solid var(--navy);
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn.secondary { background: transparent; color: var(--navy); }
.btn.secondary:hover { background: var(--card); }
.btn.copper { background: var(--copper); border-color: var(--copper); }

.hero-wrap { padding-bottom: 0.4rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.35rem;
  padding: 0.35rem 0 1.5rem;
}
.hero-copy { max-width: 44rem; }
.hero h1 { margin: 0.15rem 0 0.7rem; }
.hero .lead { margin-top: 0; font-size: 1.125rem; }
.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 0.7rem 0.7rem 0.85rem;
  box-shadow: var(--shadow);
}
.hero-card img { display: block; width: 100%; height: auto; }
.hero-note {
  margin: 0.55rem 0.4rem 0.15rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.band {
  background: var(--navy);
  color: #f6f3ec;
  margin: 2rem 0;
  border-radius: 1rem;
  padding: 1.3rem 1.2rem;
}
.band a { color: #d7ecff; }
.band h2 { margin-top: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.site-footer {
  background: var(--navy);
  color: #e6edf5;
  padding: 2.2rem 0 1.4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.2rem;
}
.site-footer a { color: #d7e6f5; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2 { font-size: 0.95rem; margin: 0 0 0.5rem; font-family: "Source Sans 3", sans-serif; letter-spacing: 0.04em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.25rem 0; }
.legal-line { color: #b7c5d4; font-size: 0.88rem; margin-top: 1.4rem; max-width: 80ch; }

.form-grid { display: grid; gap: 0.75rem; max-width: 40rem; }
label { font-weight: 650; display: grid; gap: 0.3rem; }
input, textarea, select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9c0b1;
  border-radius: 0.55rem;
  padding: 0.6rem 0.7rem;
  width: 100%;
}
textarea { min-height: 9rem; resize: vertical; }
.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status { min-height: 1.4rem; font-weight: 650; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #8d2f16; }

.stat-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0 1rem; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.6rem 0.75rem;
  min-width: 8rem;
}
.stat b { display: block; font-family: "Source Serif 4", Georgia, serif; font-size: 1.15rem; }

@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; background: var(--card); border: 1px solid var(--line); border-radius: 0.8rem; padding: 0.8rem 1rem; margin-bottom: 1rem; }
  .split, .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    inset: var(--header) 0 auto 0;
    background: #102238;
    padding: 0.6rem 1rem 1rem;
    max-height: calc(100vh - var(--header));
    overflow: auto;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav.open { display: flex; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu-row { display: flex; width: 100%; }
  .menu a.menu-btn { flex: 1; text-align: left; padding: 0.55rem 0.4rem; }
  .menu button.menu-more { width: 2.4rem; height: 2.4rem; }
  .drop-panel {
    position: static;
    display: none;
    width: auto;
    columns: 1;
    box-shadow: none;
    margin: 0.2rem 0 0.4rem;
  }
  .drop.open .drop-panel { display: block; }
  .search-wrap { margin: 0.4rem 0 0; }
  .search-wrap input, .search-results { width: 100%; }
  .hero, .split, .footer-grid { grid-template-columns: 1fr; }
  .wrap { width: min(1180px, calc(100% - 1.25rem)); }
  table { min-width: 32rem; }
}

@media (max-width: 375px) {
  body { font-size: 1rem; }
  .brand-text small { display: none; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header, .site-footer, .toc, .search-wrap, .nav-toggle, .copy-btn { display: none !important; }
  body { background: #fff; }
  a { text-decoration: underline; }
}
