:root {
  --ink: #14171c;
  --muted: #5b6270;
  --line: #e3e6eb;
  --bg: #ffffff;
  --soft: #f6f7f9;
  --accent: #1d4ed8;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.logo { font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--accent); }
nav a { color: var(--muted); text-decoration: none; margin-left: 1.5rem; }
nav a:hover { color: var(--ink); }
.hero { padding: 5rem 0 3.5rem; }
.hero h1 { font-size: 2.6rem; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .75rem; max-width: 20ch; }
.hero p { color: var(--muted); font-size: 1.2rem; margin: 0; }
h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 1.25rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; }
.card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.card img { width: 100%; height: 15rem; object-fit: contain; object-position: center; background: #fff; padding: 1rem; border-bottom: 1px solid var(--line); }
.card .body { padding: 1rem 1.25rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.card h3 { margin: 0; font-size: 1.05rem; }
.card .meta { color: var(--muted); font-size: .9rem; margin: .15rem 0 0; }
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; border: 0; border-radius: 8px; padding: .65rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #000; }
section { padding: 2.5rem 0; }
form { display: grid; gap: 1rem; max-width: 36rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input, textarea { width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid #c9ced6; border-radius: 8px; background: #fff; color: var(--ink); }
textarea { min-height: 8rem; resize: vertical; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; margin-top: 3rem; }
footer .wrap { padding: 1.5rem 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* example pages */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 52rem) { .compare { grid-template-columns: 1fr; } .hero h1 { font-size: 2rem; } }
.panel { border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.panel h2 { margin-bottom: 1rem; }
.panel img { width: 100%; height: auto; }
.eq { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; overflow-x: auto; }
.eq math { flex: 1; font-size: 1.1rem; }
.eqno { color: var(--muted); white-space: nowrap; font-size: .9rem; }
.tag { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.check { display: inline-block; background: #e8f5ec; color: #14532d; border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; font-weight: 600; }
details { margin-top: 1.5rem; background: var(--soft); border-radius: 8px; padding: .75rem 1rem; }
summary { cursor: pointer; font-weight: 600; }
pre.ocr { white-space: pre-wrap; font-size: .85rem; color: #7a1d1d; margin: .75rem 0 0; }
.mol { border-top: 1px solid var(--line); padding: 1rem 0; }
.mol:first-of-type { border-top: 0; padding-top: 0; }
.mol h3 { margin: 0 0 .25rem; font-size: 1rem; }
.mol p { margin: .25rem 0; }
.mol code { font-size: .85rem; background: var(--soft); padding: .1rem .35rem; border-radius: 4px; word-break: break-all; }
.back { display: inline-block; margin: 2rem 0 0; color: var(--muted); text-decoration: none; }

.compare.stack { grid-template-columns: 1fr; }

.hero.small { padding: 3.5rem 0 1.5rem; }
.hero.small h1 { font-size: 2rem; max-width: none; }
.hero.small p { font-size: 1.05rem; max-width: 46rem; margin: 0 0 .75rem; }
.hero p { max-width: 42rem; }
.lead { color: var(--muted); max-width: 36rem; margin: 0 0 1.25rem; }
.note { color: var(--muted); font-size: .95rem; margin-top: 1.25rem; }
.tablewrap { overflow-x: auto; margin-top: 1rem; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .95rem; }
caption { text-align: left; font-weight: 600; padding-bottom: .5rem; }
th, td { border-bottom: 1px solid var(--line); padding: .4rem .6rem; text-align: right; white-space: nowrap; }
thead th { border-bottom: 2px solid var(--ink); }
tbody th { text-align: left; }

.hero h1 { font-size: 2.1rem; max-width: 30ch; }
.grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 44rem) { .grid { grid-template-columns: 1fr; } }
.card .body { display: block; }
.card .body .btn { margin-top: 1rem; }

.compare > *, .grid > * { min-width: 0; }
img { max-width: 100%; }
