:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.6;
  --ink: #182d3b;
  --muted: #465e6c;
  --link: #15567a;
  --line: #d4e1e9;
  --page: #f3f7fa;
  --surface: #fff;
  --intro-end: #e1eff7;
  --control-border: #66869e;
  --control-hover: #eff7fc;
  --focus: #246eb0;
  --warning-surface: #fff5df;
  --warning-border: #d5ac67;
  --warning-ink: #4e3515;
  --active-surface: #15567a;
  --active-ink: #fff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8eef5;
  --muted: #bfccdb;
  --link: #9ac9ed;
  --line: #3b4b61;
  --page: #1b2534;
  --surface: #253246;
  --intro-end: #2e4055;
  --control-border: #8296ac;
  --control-hover: #344862;
  --focus: #a7d2f4;
  --warning-surface: #3e342d;
  --warning-border: #ac8353;
  --warning-ink: #f6e0c0;
  --active-surface: #9ac9ed;
  --active-ink: #182d3b;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--link); text-underline-offset: .16em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.wrap { width: min(55rem, 100% - 2rem); margin-inline: auto; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; min-height: 4.25rem; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .75rem; }
.brand, .catalog-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
.brand { color: var(--ink); font-weight: 750; letter-spacing: -.025em; text-decoration: none; }
.brand:hover { text-decoration: underline; }
.catalog-link { font-size: .9375rem; font-weight: 650; }

.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 1; padding: .65rem 1rem; background: var(--surface); }
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; }

main { padding-top: clamp(1.5rem, 6vw, 3.5rem); }
.intro, .panel { padding: clamp(1.2rem, 4vw, 2.45rem); border: 1px solid var(--line); border-radius: 1.25rem; }
.intro { background: linear-gradient(122deg, var(--surface), var(--intro-end)); }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.22; }
h1 { font-size: clamp(2rem, 6vw, 3.3rem); letter-spacing: -.05em; text-wrap: balance; }
h2 { font-size: clamp(1.35rem, 3vw, 1.72rem); letter-spacing: -.022em; }
h3 { font-size: 1.1rem; }
p { max-width: 66ch; margin: .5rem 0 0; color: var(--muted); }
.intro p { margin-top: .8rem; }
.section-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.section-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .25rem .95rem; background: var(--surface); border: 1px solid var(--control-border); border-radius: 99rem; font-weight: 650; }
.section-nav a:hover { background: var(--control-hover); }

.panel { margin-top: 1rem; background: var(--surface); scroll-margin-top: 1rem; }
.warning { background: var(--warning-surface); border-color: var(--warning-border); border-inline-start-width: .35rem; }
.warning h2, .warning p { color: var(--warning-ink); }
.topic-list { display: grid; gap: 1.1rem; margin: .9rem 0 0; padding: 0; }
ul.topic-list { list-style: none; }
.topic-list li + li { padding-top: 1.1rem; border-top: 1px solid var(--line); }
.recovery-list { padding-inline-start: 1.35rem; }
.recovery-list li { padding-inline-start: .3rem; }
.recovery-list li::marker { color: var(--link); font-weight: 700; }
.topic-list a { display: block; width: fit-content; max-width: 100%; min-height: 2.75rem; padding-block: .55rem; font-weight: 600; }
.topic-list p + a { margin-top: .3rem; }

.site-footer { padding-block: 1.4rem 2rem; font-size: .9rem; }

@media (max-width: 29rem) {
  .wrap { width: calc(100% - 1.5rem); }
  .header-inner { display: block; padding-block: .2rem; }
  .header-actions {
    justify-content: space-between;
    gap: .25rem .75rem;
    border-top: 1px solid var(--line);
    padding-top: .2rem;
  }
  main { padding-top: 1rem; }
  .intro, .panel { padding: 1rem; border-radius: 1rem; }
  h1 { font-size: clamp(1.65rem, 7vw, 2rem); }
  .section-nav { margin-top: 1rem; }
  .section-nav a { flex: 1 1 4.8rem; justify-content: center; padding-inline: .35rem; }
  .topic-list a { width: 100%; overflow-wrap: anywhere; }
}
