:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #5f5f5f;
  --line: #d8d8d8;
  --accent: #0f766e;
  --accent-soft: #ecf8f6;
  --max-width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
}

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

img {
  display: block;
  max-width: 100%;
}

.page {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.page-article {
  width: min(calc(100% - 32px), 920px);
}

.hero,
.section {
  border-top: 1px solid var(--fg);
  padding-top: 24px;
}

.section {
  margin-top: 40px;
}

.kicker,
.label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 3.5vw, 2.45rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.hero .section-title {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
}

.section .section-title {
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  line-height: 1.2;
}

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

h1 {
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.4;
}

h3 {
  font-size: 0.95rem;
  line-height: 1.5;
}

p,
th,
td,
.button,
.inline-link {
  font-size: 0.95rem;
  line-height: 1.7;
}

.lede {
  margin-top: 16px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button,
.inline-link {
  text-decoration: none;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--fg);
  color: var(--fg);
}

.button-primary {
  background: var(--fg);
  color: var(--bg);
}

.button-cta {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.button:hover,
.inline-link:hover {
  color: var(--accent);
}

.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.section-copy {
  color: var(--muted);
}

.results-browser {
  margin-top: 28px;
}

.results-browser-head {
  display: flex;
  justify-content: flex-end;
}

.results-filter {
  display: grid;
  gap: 8px;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.results-filter select {
  appearance: none;
  border: 1px solid var(--fg);
  border-radius: 0;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  letter-spacing: normal;
  text-transform: none;
  padding: 10px 12px;
}

.results-category {
  display: none;
  margin-top: 20px;
}

.results-category.is-active {
  display: block;
}

.results-stack {
  display: grid;
  gap: 32px;
  margin-top: 28px;
}

.results-detail-table {
  margin-top: 8px;
}

.results-detail-table td:first-child {
  width: 24%;
  font-weight: 700;
}

.results-note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.results-overview-card {
  padding: 0;
  margin-top: 8px;
}

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

.results-column {
  padding: 18px;
}

.results-column+.results-column {
  border-left: 1px solid var(--line);
}

.results-column h3 {
  margin-bottom: 12px;
}

.results-column img {
  width: 100%;
  margin-top: 0;
  border: 1px solid var(--line);
  background: #fafafa;
}

.meta-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.meta-list li+li {
  margin-top: 8px;
}

.article-body .meta-list {
  margin-top: 14px;
}

.results-table {
  margin-top: 12px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  padding: 18px;
}

.card p {
  margin-top: 10px;
  color: var(--muted);
}

.article-header {
  border-top: 1px solid var(--fg);
  padding-top: 24px;
}

.article-meta {
  margin-top: 10px;
  color: var(--muted);
}

.article-body {
  margin-top: 28px;
  border-top: 1px solid var(--fg);
  padding-top: 24px;
}

.article-body p {
  margin-top: 16px;
  color: var(--muted);
}

.article-callout {
  margin-top: 20px;
  padding: 20px 22px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
}

.article-callout-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-callout p {
  margin-top: 0;
  color: var(--fg);
}

.article-break {
  width: 72px;
  height: 1px;
  margin-top: 28px;
  background: var(--line);
}

.article-body h2 {
  margin-top: 36px;
}

.article-body img {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--line);
}

.chart-card {
  padding: 0;
}

.chart-card img {
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.card-copy {
  padding: 18px;
}

table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-weight: 700;
}

.baseline-row td {
  background: #f3f4f4;
  color: var(--muted);
  border-bottom-color: #cfd5d4;
}

.baseline-row td:first-child {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.inline-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
}

/* ── GitHub-style split diff viewer ── */
.gh-diff {
  margin-top: 18px;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(31, 35, 40, 0.04), 0 10px 30px rgba(140, 149, 159, 0.12);
}

.gh-diff a {
  color: #0969da;
}

.gh-diff-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f6f8fa 0%, #eef2f6 100%);
  color: #57606a;
  font-size: 0.82rem;
  line-height: 1.4;
  border-bottom: 1px solid #d0d7de;
}

.gh-diff-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.gh-diff-file a {
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gh-diff-file a:hover {
  text-decoration: underline;
}

.gh-diff-file-icon {
  position: relative;
  width: 14px;
  height: 16px;
  flex: none;
  border: 1px solid #8c959f;
  border-radius: 2px;
  background: #ffffff;
}

.gh-diff-file-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #f6f8fa 48%, transparent 48%);
  border-top: 1px solid #8c959f;
  border-right: 1px solid #8c959f;
  border-top-right-radius: 2px;
}

.gh-diff-chip {
  flex: none;
  padding: 4px 10px;
  border: 1px solid #d0d7de;
  border-radius: 999px;
  background: #ffffff;
  color: #57606a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gh-diff-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #f6f8fa;
}

.gh-diff-columns span {
  padding: 7px 12px;
  color: #57606a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid #d0d7de;
}

.gh-diff-columns span + span {
  border-left: 1px solid #d0d7de;
}

.gh-diff-hunk {
  padding: 6px 12px;
  border-bottom: 1px solid #b6e3ff;
  background: #ddf4ff;
  color: #0969da;
  font-size: 0.76rem;
  line-height: 1.35;
}

.gh-diff-hunk code {
  background: transparent;
  border: none;
  color: inherit;
  font-size: inherit;
}

.gh-diff-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gh-diff-pane {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  background: #ffffff;
  scrollbar-width: thin;
}

.gh-diff-pane + .gh-diff-pane {
  border-left: 1px solid #d8dee4;
}

.gh-diff-side-table {
  width: 100%;
  min-width: max-content;
  margin-top: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.gh-diff-side-table td {
  padding: 0;
  border-bottom: 0;
  vertical-align: top;
}

.gh-diff-num {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: 44px;
  padding: 4px 8px 4px 6px;
  border-right: 1px solid #d8dee4;
  border-bottom: 1px solid #d8dee4;
  background: #f6f8fa;
  color: #6e7781;
  font-size: 0.7rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.gh-diff-codecell {
  position: relative;
  min-width: 0;
  border-bottom: 1px solid #d8dee4;
  background: #ffffff;
}

.gh-diff-codecell code {
  display: block;
  min-height: 26px;
  padding: 4px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: pre;
  color: #24292f;
  scrollbar-width: thin;
}

.gh-diff-row-del .gh-diff-codecell::before,
.gh-diff-row-add .gh-diff-codecell::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
}

.gh-diff-row-del .gh-diff-codecell::before {
  background: #cf222e;
}

.gh-diff-row-add .gh-diff-codecell::before {
  background: #1a7f37;
}

.gh-diff-row-del .gh-diff-num,
.gh-diff-row-del .gh-diff-codecell {
  background: #ffebe9;
}

.gh-diff-row-del .gh-diff-num {
  color: #b42318;
}

.gh-diff-row-del .gh-diff-codecell code {
  color: #82071e;
}

.gh-diff-row-add .gh-diff-num,
.gh-diff-row-add .gh-diff-codecell {
  background: #dafbe1;
}

.gh-diff-row-add .gh-diff-num {
  color: #1f6f43;
}

.gh-diff-row-add .gh-diff-codecell code {
  color: #116329;
}

.gh-diff-num-empty,
.gh-diff-codecell-empty {
  background: #f6f8fa;
}

.gh-diff-num-empty {
  color: transparent;
}

.gh-diff-codecell-empty code {
  color: transparent;
}

@media (max-width: 860px) {

  .grid-three,
  .grid-two,
  .results-columns {
    grid-template-columns: 1fr;
  }

  .results-browser-head {
    justify-content: flex-start;
  }

  .results-column+.results-column {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .page {
    width: min(calc(100% - 20px), var(--max-width));
    padding: 28px 0 40px;
  }

  .hero,
  .section {
    padding-top: 18px;
  }

  .section {
    margin-top: 28px;
  }
}
