:root {
  color-scheme: light;
  --bg: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e2e8f0;
  --accent: #2563eb;
}

* {
  box-sizing: border-box;
}

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

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  max-width: 820px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

h2 {
  font-size: 22px;
}

p {
  color: #334155;
  line-height: 1.7;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.figure-panel,
article,
.note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.figure-panel {
  padding: 14px;
  margin-bottom: 22px;
}

.figure-panel img {
  display: block;
  width: 100%;
  height: auto;
}

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

article,
.note {
  padding: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
}

th mjx-container {
  min-width: max-content;
}

.math-display {
  overflow-x: auto;
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
}

mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
}

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

  table {
    display: block;
    overflow-x: auto;
  }
}
