:root {
  color-scheme: light dark;
  --accent: #ff6129;
  --accent-soft: #ff8542;
  --accent-deep: #d83e12;
  --ink: #222321;
  --muted: #6d6d68;
  --faint: #92928c;
  --canvas: #f6f4ef;
  --surface: #fffefa;
  --surface-raised: #ffffff;
  --surface-soft: #efede7;
  --border: #dedbd3;
  --border-strong: #c8c4ba;
  --mint: #258c6d;
  --mint-soft: #dff5ec;
  --sky: #267fc8;
  --sky-soft: #e4f1fc;
  --amber: #9a6500;
  --amber-soft: #fff0cf;
  --violet: #6750ce;
  --violet-soft: #eeeaff;
  --shadow: 0 16px 50px rgb(42 35 25 / 9%);
  --header-height: 70px;
  --content-width: 760px;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f2eb;
    --muted: #b8b5ae;
    --faint: #8f8c86;
    --canvas: #0e0e0e;
    --surface: #151515;
    --surface-raised: #1b1b1b;
    --surface-soft: #242424;
    --border: #343434;
    --border-strong: #4c4c4c;
    --mint: #68d6b3;
    --mint-soft: #143b30;
    --sky: #78bdf5;
    --sky-soft: #153249;
    --amber: #f7c765;
    --amber-soft: #3d3014;
    --violet: #a897ff;
    --violet-soft: #2a244b;
    --shadow: 0 18px 60px rgb(0 0 0 / 28%);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 86% -2%, rgb(255 97 41 / 9%), transparent 33rem),
    var(--canvas);
  color: var(--ink);
  line-height: 1.6;
}

body::selection {
  background: rgb(255 97 41 / 25%);
}

a {
  color: inherit;
  text-decoration-color: rgb(255 97 41 / 48%);
  text-underline-offset: 0.18em;
}

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

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgb(255 97 41 / 44%);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 9px 14px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--canvas);
  font-weight: 750;
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid rgb(128 123 114 / 24%);
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.topbar {
  display: flex;
  width: min(100% - 36px, 1440px);
  height: 100%;
  align-items: center;
  gap: 20px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  min-width: 232px;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand span {
  display: grid;
  line-height: 1.12;
}

.brand strong {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 650;
}

.search-button {
  display: flex;
  width: min(460px, 42vw);
  height: 38px;
  align-items: center;
  gap: 9px;
  margin-inline: auto;
  padding: 0 9px 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 1px 0 rgb(255 255 255 / 45%) inset;
  cursor: pointer;
  text-align: left;
}

.search-button:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.search-button span:nth-child(2) {
  flex: 1;
  font-size: 0.79rem;
}

kbd {
  display: inline-grid;
  min-width: 23px;
  min-height: 22px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-bottom-color: var(--border-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  line-height: 1;
}

.manual-version {
  min-width: 116px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  text-align: right;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-soft);
}

.nav-toggle,
.nav-close {
  display: none;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  margin-block: 2px;
  border-radius: 2px;
  background: currentColor;
}

.site-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, var(--content-width)) 180px;
  justify-content: center;
  gap: clamp(28px, 4vw, 64px);
  width: min(100% - 40px, 1400px);
  margin-inline: auto;
  padding-block: 42px 92px;
}

.site-navigation {
  position: sticky;
  top: calc(var(--header-height) + 25px);
  align-self: start;
  max-height: calc(100vh - var(--header-height) - 50px);
  overflow: auto;
  padding: 0 12px 22px 2px;
  scrollbar-width: thin;
}

.nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-group + .nav-group {
  margin-top: 24px;
}

.nav-group h2 {
  margin: 0 0 6px 10px;
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-group ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-group a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 580;
  line-height: 1.3;
  text-decoration: none;
}

.nav-group a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-group a[aria-current="page"] {
  background: rgb(255 97 41 / 11%);
  color: var(--accent-deep);
  font-weight: 760;
}

.nav-promise {
  display: grid;
  gap: 4px;
  margin-top: 30px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.nav-promise strong {
  font-size: 0.71rem;
}

.nav-promise span {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.guide-main,
.guide-main article {
  min-width: 0;
}

.article-header {
  margin-bottom: 38px;
}

.breadcrumbs {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.74rem;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs span {
  margin-inline: 7px;
  color: var(--faint);
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-deep);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue",
    sans-serif;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.25rem, 5.8vw, 4.45rem);
  font-weight: 820;
  line-height: 0.98;
}

.article-header h1 {
  max-width: 17ch;
  font-size: clamp(2.3rem, 5vw, 3.65rem);
  line-height: 1.03;
}

.lede {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.23rem);
  line-height: 1.58;
  text-wrap: pretty;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag,
.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 720;
}

.tag.accent {
  border-color: rgb(255 97 41 / 30%);
  background: rgb(255 97 41 / 10%);
  color: var(--accent-deep);
}

.guide-main article > section {
  margin-top: 52px;
}

.guide-main article > section:first-of-type {
  margin-top: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 790;
  line-height: 1.16;
}

h3 {
  margin: 30px 0 9px;
  font-size: 1.05rem;
  font-weight: 780;
  line-height: 1.25;
}

p {
  margin: 0 0 16px;
  text-wrap: pretty;
}

.guide-main article p,
.guide-main article li,
.guide-main article dd {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}

.guide-main article strong {
  color: var(--ink);
}

.guide-main article ul,
.guide-main article ol {
  padding-left: 1.35rem;
}

.guide-main article li + li {
  margin-top: 8px;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 22px 0;
  padding: 0 !important;
  counter-reset: manual-step;
  list-style: none;
}

.steps > li {
  position: relative;
  min-height: 64px;
  margin: 0 !important;
  padding: 16px 18px 16px 64px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgb(255 255 255 / 36%) inset;
  counter-increment: manual-step;
}

.steps > li::before {
  position: absolute;
  top: 15px;
  left: 17px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--canvas);
  content: counter(manual-step);
  font-size: 0.73rem;
  font-weight: 850;
}

.steps > li strong {
  display: block;
  margin-bottom: 3px;
}

.callout {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 13px;
  margin: 24px 0;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.callout::before {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink);
  content: "i";
  font-family: Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 800;
}

.callout.warning {
  border-color: color-mix(in srgb, var(--amber) 38%, var(--border));
  background: var(--amber-soft);
}

.callout.warning::before {
  background: var(--amber);
  color: #1e1605;
  content: "!";
  font-family: inherit;
  font-style: normal;
}

.callout.safe {
  border-color: color-mix(in srgb, var(--mint) 35%, var(--border));
  background: var(--mint-soft);
}

.callout.safe::before {
  background: var(--mint);
  color: #071b15;
  content: "✓";
  font-family: inherit;
  font-style: normal;
}

.callout > div > :last-child {
  margin-bottom: 0;
}

.callout-title {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.81rem;
  font-weight: 820;
}

.callout p,
.callout li {
  font-size: 0.85rem;
  line-height: 1.55;
}

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

.info-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}

.info-card .card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 0.9rem;
  font-weight: 850;
}

.info-card h3 {
  margin: 0 0 5px;
  font-size: 0.9rem;
}

.info-card p {
  margin: 0;
  color: var(--muted) !important;
  font-size: 0.78rem;
  line-height: 1.48;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.status-row {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.status-row strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.8rem;
}

.status-row span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  line-height: 1.45;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

code {
  padding: 0.14em 0.38em;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

pre {
  overflow-x: auto;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  line-height: 1.55;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
  overflow-x: auto;
  margin: 24px 0;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.workflow-strip div {
  min-width: 112px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.workflow-strip span {
  display: block;
  margin-bottom: 11px;
  color: var(--accent-deep);
  font-size: 0.66rem;
  font-weight: 900;
}

.workflow-strip strong {
  display: block;
  font-size: 0.74rem;
  line-height: 1.35;
}

.page-toc {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  align-self: start;
  padding-left: 17px;
  border-left: 1px solid var(--border);
}

.page-toc:empty {
  display: none;
}

.page-toc > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-toc ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-toc a {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
  text-decoration: none;
}

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

.page-toc .toc-subitem {
  padding-left: 10px;
}

.article-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 70px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-pagination a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
}

.article-pagination a:hover {
  border-color: rgb(255 97 41 / 45%);
  transform: translateY(-1px);
}

.article-pagination .next {
  text-align: right;
}

.article-pagination span {
  color: var(--muted);
  font-size: 0.66rem;
}

.article-pagination strong {
  overflow: hidden;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  width: min(100% - 40px, 1400px);
  margin-inline: auto;
  padding: 24px 0 34px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.69rem;
}

.site-footer p {
  margin: 0;
}

.search-dialog {
  width: min(650px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 40px));
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 34px 110px rgb(0 0 0 / 34%);
}

.search-dialog::backdrop {
  background: rgb(10 10 10 / 48%);
  backdrop-filter: blur(5px);
}

.search-shell {
  padding: 22px;
}

.search-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.search-topline h2 {
  margin: 0;
  font-size: 1.45rem;
}

.search-close {
  font-size: 1.35rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 12px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--canvas);
}

.search-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(255 97 41 / 14%);
}

.search-field input {
  width: 100%;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.search-results {
  display: grid;
  gap: 5px;
  max-height: 390px;
  overflow-y: auto;
}

.search-results a {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 2px 10px;
  padding: 12px 13px;
  border-radius: 10px;
  text-decoration: none;
}

.search-results a:hover,
.search-results a:focus-visible {
  background: var(--surface-soft);
}

.result-section {
  grid-row: 1 / 3;
  padding-top: 2px;
  color: var(--accent-deep);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-results strong {
  font-size: 0.82rem;
}

.search-results a > span:last-child {
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-search {
  padding: 24px 10px;
  color: var(--muted);
  text-align: center;
}

.search-hint {
  margin: 15px 0 0;
  color: var(--faint);
  font-size: 0.66rem;
  text-align: center;
}

.search-hint kbd + kbd {
  margin-left: 2px;
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid #3a342f;
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 15%, #e05a35 0 7%, transparent 7.2%),
    radial-gradient(circle at 80% 20%, #503b85 0 27%, transparent 27.2%),
    linear-gradient(145deg, #211e1c, #121211 68%);
  color: #fff9f2;
  box-shadow: var(--shadow);
}

.home-hero::after {
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -50%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 50%;
  content: "";
}

.home-hero .eyebrow {
  color: #ff9b75;
}

.home-hero h1 {
  max-width: 10ch;
  color: #fff9f2;
}

.home-hero .lede {
  max-width: 34rem;
  color: #c9c3bb;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 780;
  text-decoration: none;
}

.primary-action {
  background: var(--accent);
  color: white;
}

.primary-action:hover {
  background: var(--accent-soft);
}

.secondary-action {
  border: 1px solid rgb(255 255 255 / 20%);
  background: rgb(255 255 255 / 7%);
  color: #fff;
}

.manual-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.manual-principles div {
  padding: 17px;
}

.manual-principles div + div {
  border-left: 1px solid var(--border);
}

.manual-principles strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.76rem;
}

.manual-principles span {
  color: var(--muted);
  font-size: 0.68rem;
}

.topic-section {
  margin-top: 54px;
}

.topic-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.topic-section > header h2,
.topic-section > header p {
  margin: 0;
}

.topic-section > header p {
  color: var(--muted);
  font-size: 0.78rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.topic-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-decoration: none;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: rgb(255 97 41 / 42%);
  box-shadow: var(--shadow);
}

.topic-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--accent-deep);
  font-size: 0.68rem;
  font-weight: 900;
}

.topic-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.82rem;
}

.topic-card span:last-child {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.hero-image {
  overflow: hidden;
  margin: 30px 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-image figcaption {
  padding: 10px 14px;
  color: var(--muted);
  font-size: 0.68rem;
}

.nav-backdrop {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .nav-group a[aria-current="page"],
  .eyebrow {
    color: #ff9369;
  }
}

@media (max-width: 1120px) {
  .site-layout {
    grid-template-columns: 220px minmax(0, var(--content-width));
    gap: 38px;
  }

  .page-toc {
    display: none;
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 62px;
  }

  .topbar {
    width: min(100% - 22px, 740px);
    gap: 8px;
  }

  .brand {
    min-width: 0;
    flex: 1;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand small {
    display: none;
  }

  .search-button {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .search-button span:nth-child(2),
  .search-button kbd,
  .manual-version {
    display: none;
  }

  .nav-toggle,
  .nav-close {
    display: inline-grid;
    flex: 0 0 auto;
  }

  .site-layout {
    display: block;
    width: min(100% - 28px, var(--content-width));
    padding-block: 28px 60px;
  }

  .site-navigation {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, calc(100vw - 44px));
    max-height: none;
    padding: 20px 17px;
    transform: translateX(-104%);
    border-right: 1px solid var(--border);
    background: var(--surface-raised);
    box-shadow: 20px 0 60px rgb(0 0 0 / 25%);
    transition: transform 180ms ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .site-navigation {
    transform: translateX(0);
  }

  .nav-heading {
    margin-bottom: 17px;
  }

  .nav-backdrop {
    position: fixed;
    z-index: 55;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgb(0 0 0 / 46%);
    opacity: 0;
    transition:
      opacity 180ms ease,
      visibility 180ms ease;
  }

  body.nav-open .nav-backdrop {
    visibility: visible;
    opacity: 1;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .article-header h1 {
    font-size: clamp(2.15rem, 11vw, 3.25rem);
  }

  .home-hero {
    padding: 29px 24px 32px;
    border-radius: 19px;
  }

  .home-hero::after {
    right: -20%;
    bottom: -16%;
    width: 80%;
  }

  .manual-principles {
    grid-template-columns: 1fr;
  }

  .manual-principles div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .topic-grid,
  .card-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .topic-section > header {
    display: block;
  }

  .topic-section > header p {
    margin-top: 5px;
  }

  .article-pagination {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
    width: min(100% - 28px, var(--content-width));
  }

  .site-footer p + p {
    margin-top: 6px;
  }

  .search-shell {
    padding: 18px;
  }

  .search-results a {
    grid-template-columns: 1fr;
  }

  .result-section {
    grid-row: auto;
  }
}

@media (max-width: 480px) {
  .brand strong {
    font-size: 0.68rem;
  }

  .guide-main article > section {
    margin-top: 44px;
  }

  .steps > li {
    padding-left: 58px;
  }

  .callout {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  :root {
    --canvas: white;
    --surface: white;
    --ink: black;
    --muted: #454545;
    --border: #cfcfcf;
  }

  body {
    background: white;
    font-size: 11pt;
  }

  .site-header,
  .site-navigation,
  .page-toc,
  .article-pagination,
  .site-footer,
  .nav-backdrop,
  [data-search] {
    display: none !important;
  }

  .site-layout {
    display: block;
    width: auto;
    padding: 0;
  }

  .guide-main {
    max-width: none;
  }

  a {
    text-decoration: none;
  }

  .callout,
  .info-card,
  .steps > li,
  .table-wrap {
    break-inside: avoid;
    box-shadow: none;
  }
}
