:root {
  color-scheme: light dark;
  --ink: #071638;
  --muted: #52617c;
  --line: #d9e1ef;
  --blue: #075de8;
  --surface: #ffffff;
  --soft: #f5f8fd;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--blue); }

a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent);
  outline-offset: 3px;
}

.catalog-header,
.catalog-main,
.catalog-footer {
  width: min(100% - 40px, 1060px);
  margin-inline: auto;
}

.catalog-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.catalog-brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
  text-decoration: none;
}

.catalog-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.catalog-header nav a {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.breadcrumbs {
  margin: 34px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a { text-decoration: none; }

.catalog-hero {
  max-width: 850px;
  padding: 18px 0 42px;
}

.catalog-eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.12;
}

h1 {
  margin: 8px 0 14px;
  font-size: clamp(42px, 7vw, 70px);
  letter-spacing: -.035em;
}

.catalog-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.catalog-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 22px;
}

.catalog-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.catalog-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.catalog-card a {
  font-weight: 800;
  text-decoration: none;
}

.term-section {
  margin: 0 0 58px;
}

.term-section > h2 {
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  font-size: 30px;
}

.term-list {
  display: grid;
  gap: 14px;
}

.term {
  scroll-margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.term h3 {
  margin: 0 0 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.2;
}

.term > p {
  margin: 0 0 15px;
  color: var(--muted);
}

.term dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 7px 14px;
  margin: 0;
  font-size: 14px;
}

.term dt { font-weight: 800; }
.term dd { margin: 0; }

.term code {
  display: block;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  line-height: 1.55;
  white-space: normal;
}

.catalog-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 13px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef4ff;
    --muted: #a9b7cf;
    --line: #2b3850;
    --blue: #71a6ff;
    --surface: #07101f;
    --soft: #0e1a2d;
  }
}

@media (max-width: 800px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-header { align-items: flex-start; flex-direction: column; padding: 20px 0; }
  .term dl { grid-template-columns: 1fr; }
  .term dd + dt { margin-top: 8px; }
}

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