:root {
  --ink: #1a1a1a;
  --ink-soft: #555;
  --ink-faint: #888;
  --bg: #fafaf7;
  --rule: #e6e2d8;
  --accent: #2e5c4e;
  --pass: #2e5c4e;
  --fail: #b3261e;
  --warn: #8a6d00;
  --code: #f1ede3;
  --max-w: 760px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  font-family: ui-serif, Georgia, "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px 96px;
}

header.page-head {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
}

header.page-head .eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}

header.page-head h1 {
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 6px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

header.page-head .sub {
  font-size: 17px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0;
}

section {
  margin: 48px 0;
}

section > h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 16px;
  color: var(--ink);
}

section > p {
  margin: 0 0 16px;
  color: var(--ink);
}

p.lede {
  font-size: 18px;
  line-height: 1.6;
}

/* What we hit — the feel panel */

.hit {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 28px 28px 26px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.hit-big {
  font-family: ui-serif, Georgia, "Iowan Old Style", serif;
  font-size: 88px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.hit-text { font-size: 16px; line-height: 1.5; }
.hit-text strong {
  display: block;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
}
.hit-text span { color: var(--ink-soft); }

@media (max-width: 560px) {
  .hit { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .hit-big { font-size: 64px; }
}

.hit-support {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

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

.hit-support .stat {
  padding: 12px 14px;
  background: var(--code);
  border-radius: 3px;
}

.hit-support .stat .num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: block;
}

.hit-support .stat .label {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  display: block;
  margin-top: 2px;
}

/* The verdict banner */

.verdict {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: white;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--pass);
  border-radius: 4px;
}

.verdict.fail { border-left-color: var(--fail); }

.verdict .badge {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--pass);
  color: white;
}

.verdict.fail .badge { background: var(--fail); }

.verdict .verdict-text { flex: 1; }
.verdict .verdict-text strong { font-weight: 600; }
.verdict .verdict-text .meta {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* Gate grid */

.gates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

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

.gate {
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gate .name {
  font-size: 14px;
  font-weight: 600;
}

.gate .threshold {
  font-size: 13px;
  color: var(--ink-soft);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.gate .threshold.target { color: var(--ink-faint); }
.gate .threshold.observed { color: var(--ink); }

.gate .status {
  display: inline-block;
  align-self: flex-start;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  background: var(--pass);
  color: white;
  margin-top: 4px;
}

.gate.fail .status { background: var(--fail); }

/* Findings table */

table.findings {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
  border: 1px solid var(--rule);
}

table.findings th,
table.findings td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

table.findings th {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg);
}

table.findings tr:last-child td { border-bottom: none; }

table.findings td.count {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

table.findings td.count .count-share {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.severity {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
}

.severity.HIGH { background: var(--fail); color: white; }
.severity.MEDIUM { background: var(--warn); color: white; }
.severity.LOW { background: var(--rule); color: var(--ink); }

.rationale {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.4;
}

/* Receipt */

.receipt {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  background: var(--code);
  padding: 16px 18px;
  border-radius: 4px;
}

.receipt dt {
  display: inline-block;
  width: 160px;
  color: var(--ink-soft);
}

.receipt dd {
  display: inline;
  margin: 0;
}

.receipt dd::after {
  content: "";
  display: block;
  height: 4px;
}

/* Asciinema placeholder */

.cast-frame {
  background: #15161a;
  color: #d8d4cf;
  padding: 24px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8a8680;
}

footer.foot {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
}

footer.foot a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

footer.foot a:hover { color: var(--ink); }
