:root {
  color-scheme: light;
  --ink: #17212f;
  --muted: #5d6b7d;
  --line: #d8e2eb;
  --page: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #fbfcfe;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --accent-soft: #e7f4f1;
  --danger: #b4233a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.68;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(216, 226, 235, 0.86);
  background: rgba(245, 247, 250, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-inner,
.wrap,
.footer {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(23, 33, 47, 0.16);
}

nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--ink);
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.13), rgba(180, 35, 58, 0.08)),
    var(--surface);
}

.hero-inner {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 750;
}

h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.wrap {
  padding: 34px 0 58px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.panel,
.toc,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 52px rgba(23, 33, 47, 0.06);
}

.panel {
  padding: clamp(22px, 4vw, 42px);
}

.toc {
  position: sticky;
  top: 90px;
  padding: 18px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.toc a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--accent);
}

h2 {
  margin: 32px 0 12px;
  font-size: clamp(1.32rem, 2.4vw, 1.75rem);
  line-height: 1.22;
  letter-spacing: 0;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  margin: 22px 0 8px;
  font-size: 1.08rem;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 22px;
}

li + li {
  margin-top: 8px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.card {
  min-height: 170px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  background: var(--surface-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.card:hover,
a.card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.card span,
.muted {
  color: var(--muted);
}

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

.summary div,
.notice {
  border-radius: 8px;
  padding: 16px;
}

.summary div {
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.summary strong {
  display: block;
  margin-bottom: 5px;
}

.notice {
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: var(--accent-soft);
}

.danger {
  color: var(--danger);
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #edf2f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.94em;
}

.footer {
  padding: 0 0 34px;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 900px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  nav {
    justify-content: flex-start;
  }

  .layout,
  .cards {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .summary {
    grid-template-columns: 1fr;
  }
}
