:root {
  color-scheme: light;
  --ink: #242424;
  --muted: #616161;
  --blue: #5b5fc7;
  --blue-dark: #46499a;
  --line: #e3e5ec;
  --surface: #f6f7fb;
  font-family: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.75; }
a { color: var(--blue-dark); text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(91,95,199,.28); outline-offset: 4px; }

header {
  position: sticky; top: 0; z-index: 20;
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(227,229,236,.86);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(22px) saturate(140%);
}
header > a { color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 700; }
header > div { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
header div a { color: #62636d; text-decoration: none; font-size: .8rem; font-weight: 600; }
header div a:hover { color: var(--blue-dark); }
header button {
  min-height: 42px; padding: 8px 14px;
  border: 0; border-radius: 9px;
  background: linear-gradient(110deg, var(--blue-dark), var(--blue));
  color: white; font: inherit; font-size: .78rem; font-weight: 650;
  cursor: pointer;
}

.layout { max-width: 1460px; margin: 34px auto; display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 28px; padding: 0 28px; }
aside { position: sticky; top: 102px; align-self: start; max-height: calc(100vh - 126px); overflow: auto; padding: 18px 8px 18px 0; }
aside b { display: block; margin-bottom: 12px; color: #7c7d89; font-size: .68rem; letter-spacing: .09em; }
aside a { min-height: 36px; display: block; padding: 7px 10px; border-left: 2px solid transparent; color: #686976; text-decoration: none; font-size: .78rem; line-height: 1.55; }
aside a:hover { border-left-color: #bbbddd; background: #f0f1f7; color: var(--blue-dark); }

article {
  min-width: 0;
  padding: 44px 48px 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 14px 42px rgba(45,51,89,.06);
}
article > h1 {
  max-width: 900px;
  margin: 0 0 24px;
  color: #30314f;
  font-size: clamp(2.25rem,4vw,3.35rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
article > h1 + p { padding: 16px 18px; border: 1px solid #e5e6ef; border-radius: 12px; background: linear-gradient(135deg,#f8f7fd,#f3f8fc); }
h2 {
  margin: 48px 0 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #3c3d69;
  font-size: 1.55rem;
  line-height: 1.35;
  letter-spacing: -.02em;
}
h3 { margin-top: 28px; color: #41425d; font-size: 1.12rem; line-height: 1.45; }
p { margin: 15px 0; color: #5d606d; }
strong { color: #353641; font-weight: 700; }
li { margin: 8px 0; }
code { padding: 1px 4px; border-radius: 4px; background: #eff1f7; font-family: ui-monospace, SFMono-Regular, monospace; font-size: .88em; }
article a { overflow-wrap: anywhere; }

.table-wrap { max-width: 100%; margin: 20px 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px; overscroll-behavior-x: contain; }
table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: .84rem; line-height: 1.65; }
th, td { min-width: 100px; padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f2f3f9; color: #46486e; font-weight: 700; }
tbody tr:nth-child(even) td { background: #fbfbfd; }
td { color: #5d606d; }

footer { padding: 24px; color: #777984; text-align: center; font-size: .76rem; }

/* High-contrast Microsoft document presentation */
body {
  background:
    radial-gradient(circle at 100% 0, rgba(0,183,195,.07), transparent 22rem),
    #f4f7fa;
}
header {
  border-bottom-color: #dbe5ef;
  background: rgba(255,255,255,.96);
}
header > a {
  color: #005a9e;
}
header button {
  border-radius: 6px;
  background: #0067b8;
}
.layout {
  gap: 24px;
}
aside b {
  color: #0067b8;
}
aside a {
  border-left-color: transparent;
  border-radius: 0 6px 6px 0;
  color: #4f5d6e;
}
aside a:hover {
  border-left-color: #0078d4;
  background: #edf5fb;
  color: #005a9e;
}
article {
  border-radius: 12px;
  border-color: #dce5ef;
  box-shadow: 0 14px 44px rgba(40,72,112,.08);
}
article > h1 {
  color: #10233f;
  font-weight: 720;
}
article > h1 + p {
  border-color: #cfe2f2;
  border-left: 4px solid #0078d4;
  border-radius: 8px;
  background: #edf6fc;
}
h2 {
  color: #005a9e;
  border-top-color: #dbe6ef;
}
th {
  background: #eaf3fa;
  color: #005a9e;
}
.table-wrap {
  border-color: #d9e4ee;
  border-radius: 8px;
}
tbody tr:nth-child(even) td {
  background: #f7fafc;
}

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; max-width: 920px; padding-inline: 18px; }
  aside { display: none; }
  article { padding: 36px 32px 48px; }
}

@media (max-width: 600px) {
  header { min-height: 62px; padding: 10px 14px; flex-wrap: wrap; }
  header > a { font-size: .82rem; }
  header > div { gap: 10px; }
  header div a { font-size: .72rem; }
  header button { min-height: 40px; font-size: .72rem; }
  .layout { margin: 18px auto; padding-inline: 8px; }
  article { padding: 26px 18px 38px; border-radius: 12px; }
  article > h1 { font-size: 2.15rem; }
  h2 { margin-top: 38px; font-size: 1.35rem; }
  body { font-size: 15px; }
  table { font-size: .78rem; }
  ul, ol { padding-left: 20px; }
}

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

@page { size: A4 landscape; margin: 15mm; }
@media print {
  body { background: white; font-size: 10pt; line-height: 1.5; }
  header, aside, footer { display: none; }
  .layout { display: block; max-width: none; margin: 0; padding: 0; }
  article { padding: 0; border: 0; box-shadow: none; }
  article > h1 { font-size: 25pt; }
  h2 { break-after: avoid; margin-top: 24px; font-size: 16pt; }
  h3 { break-after: avoid; font-size: 13pt; }
  p, li { orphans: 3; widows: 3; }
  table { min-width: 0; font-size: 8.5pt; line-height: 1.45; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  th, td { min-width: 0; padding: 7px; }
  .table-wrap { overflow: visible; border: 0; }
  a { color: inherit; text-decoration: none; }
}
