:root {
  color-scheme: light;
  --ink: #10232e;
  --muted: #5e7180;
  --line: #d8e1e7;
  --page: #f2f6f8;
  --surface: #ffffff;
  --surface-soft: #e8f1f7;
  --accent: #0b65c2;
  --accent-dark: #084d94;
  --accent-soft: #dbeeff;
  --warning: #7a4b00;
  --warning-soft: #fff4db;
  --radius: 18px;
  --shadow: 0 18px 44px rgba(21, 49, 68, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

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

button, input { font: inherit; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.header-inner,
.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 4px 11px rgba(11, 101, 194, 0.26);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.92rem;
}

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

.top-nav a[aria-current="page"],
.top-nav a:hover { color: var(--accent); }

.home-hero {
  padding: 78px 0 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-dark);
  font-size: 0.79rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 760px;
  margin: 14px 0 16px;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 760;
}

.home-hero p {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.11rem;
}

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

.catalog-section {
  padding-bottom: 52px;
}

.catalog-section:last-of-type {
  padding-bottom: 72px;
}

.catalog-heading {
  max-width: 700px;
  margin-bottom: 20px;
}

.catalog-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
}

.catalog-heading > p:not(.section-label) {
  margin-bottom: 0;
  color: var(--muted);
}

.catalog--reference {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog--reference .topic-card {
  min-height: 250px;
}
}

.topic-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.topic-card:hover {
  border-color: #a8cbed;
  box-shadow: 0 22px 50px rgba(21, 49, 68, 0.13);
  color: var(--ink);
  transform: translateY(-3px);
}

.topic-number {
  display: inline-grid;
  width: 36px;
  height: 36px;
  margin-bottom: 42px;
  place-items: center;
  border: 1px solid #bad7f2;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 780;
}

.topic-card h2,
.topic-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.topic-card p {
  margin-bottom: 20px;
  color: var(--muted);
}

.card-link {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 720;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.article-header {
  padding: 48px 0 28px;
}

.breadcrumbs {
  margin-bottom: 21px;
  color: var(--muted);
  font-size: 0.88rem;
}

.breadcrumbs a { color: inherit; }

.article-header h1 {
  max-width: 900px;
  margin: 0 0 15px;
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.article-summary {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 42px;
  padding-bottom: 72px;
}

.article-toc {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.article-toc h2 {
  margin-bottom: 10px;
  font-size: 0.77rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-toc ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 19px;
}

.article-toc a {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  text-decoration: none;
}

.article-toc a:hover { color: var(--accent); }

.article {
  min-width: 0;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.article > section + section {
  margin-top: 52px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.article h2 {
  margin-bottom: 16px;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
}

.article h3 {
  margin: 32px 0 12px;
  font-size: 1.17rem;
  letter-spacing: -0.018em;
}

.article p,
.article li { color: #304450; }

.article p + p { margin-top: 14px; }

.execution-place {
  display: none;
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #bcd7ea;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #244256 !important;
  font-size: 0.88rem;
}

.execution-place strong { color: var(--accent-dark); }

.article :is(h2, h3):has(+ .execution-place) {
  display: inline-block;
  cursor: help;
}

.article :is(h2, h3):has(+ .execution-place)::after {
  content: " ⓘ";
  color: var(--accent);
  font-size: 0.62em;
  vertical-align: middle;
}

.article :is(h2, h3):has(+ .execution-place):hover + .execution-place,
.article :is(h2, h3):has(+ .execution-place) + .execution-place:hover {
  display: block;
}

.article ul,
.article ol { padding-left: 1.25rem; }

.article li + li { margin-top: 6px; }

.article code {
  padding: 0.12em 0.32em;
  border-radius: 5px;
  background: #eef3f6;
  color: #244256;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.code-block {
  position: relative;
  margin: 18px 0 22px;
}

.code-block pre {
  overflow: auto;
  margin: 0;
  padding: 22px 56px 22px 20px;
  border-radius: 12px;
  background: #10232e;
  color: #e9f4f8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font-size: 0.87rem;
  line-height: 1.58;
  tab-size: 2;
}

.code-block pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #e9f4f8;
  cursor: pointer;
  font-size: 0.74rem;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: #b7ddff;
  background: rgba(183, 221, 255, 0.18);
  outline: none;
}

.callout {
  margin: 22px 0;
  padding: 17px 19px;
  border: 1px solid #bcd7ea;
  border-radius: 12px;
  background: var(--surface-soft);
}

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

.callout strong { color: var(--accent-dark); }

.callout.warning {
  border-color: #f1d492;
  background: var(--warning-soft);
}

.callout.warning strong { color: var(--warning); }

.table-wrap {
  overflow-x: auto;
  margin: 20px 0 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}

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

th {
  background: #edf4f8;
  color: #274454;
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

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

.checklist {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 29px;
}

.checklist li::before {
  position: absolute;
  top: 0.32em;
  left: 0;
  width: 15px;
  height: 15px;
  border: 1.5px solid #73a9d8;
  border-radius: 50%;
  content: "";
}

.section-label {
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 0.79rem;
  font-weight: 780;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.back-top {
  display: inline-flex;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.87rem;
}

@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; gap: 18px; }
  .article-toc { position: static; max-height: none; }
  .article-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog--reference { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .header-inner, .page-shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 62px; }
  .top-nav { gap: 0; font-size: 0.82rem; text-align: right; }
  .top-nav a:not([aria-current]) { display: none; }
  .home-hero { padding-top: 52px; }
  .catalog,
  .catalog--reference { grid-template-columns: 1fr; }
  .catalog-section { padding-bottom: 38px; }
  .catalog-section:last-of-type { padding-bottom: 42px; }
  .topic-card { min-height: 235px; padding: 24px; }
  .topic-number { margin-bottom: 28px; }
  .article-header { padding: 32px 0 20px; }
  .article { padding: 25px 20px; border-radius: 14px; }
  .article > section + section { margin-top: 39px; padding-top: 34px; }
  .article-toc ol { grid-template-columns: 1fr; }
  .footer-inner { min-height: 96px; align-items: flex-start; flex-direction: column; justify-content: center; }
}
