:root {
  color-scheme: dark;
  --bg: #2b2c30;
  --fg: #ffffff;
  --muted: #cfd0d6;
  --rule: #3e3e44;
  --card: #34353a;
  --accent: #7cb4f0;
  --accent-soft: #2c3747;
  --warn: #f5a25d;
  --warn-soft: #45342a;
  --ok: #6fd388;
  --ok-soft: #2a3e30;
  --todo: #ff6b75;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

code, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--accent-soft); padding: 0.05em 0.3em; border-radius: 4px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
}
.top .wrap {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.top nav { display: flex; gap: 14px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); }
.lang { font-weight: 600; text-decoration: none; }

/* Hero */
.hero { padding: 56px 0 28px; }
.hero h1 {
  font: 700 clamp(2.2rem, 6vw, 3.4rem)/1.1 var(--serif);
  margin: 0 0 10px; letter-spacing: -0.01em;
}
.hero h1 .emoji { font-size: 0.9em; }
.hero .sub { font-size: 1.2rem; color: var(--muted); margin: 0 0 22px; max-width: 46em; }
.authors { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--accent); color: var(--accent);
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.btn.primary { background: var(--accent); color: var(--bg); }
.btn {
  transition: background-color .15s ease, color .15s ease, border-color .15s ease,
              transform .15s ease, box-shadow .15s ease;
}
.btn:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  text-decoration: none;
}
.btn.primary:hover { background: #a9cdf6; border-color: #a9cdf6; color: var(--bg); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}

/* Sections */
section { padding: 26px 0; border-top: 1px solid var(--rule); }
h2 { font: 700 1.6rem/1.25 var(--serif); margin: 6px 0 14px; }
h3 { font-size: 1.08rem; margin: 22px 0 6px; }
p { margin: 0 0 14px; }

.tldr {
  background: var(--accent-soft); border-radius: 10px; padding: 18px 22px;
  font-size: 1.05rem;
}
.tldr p:last-child { margin-bottom: 0; }

/* Findings table */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--rule); }
th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
td.bad { color: var(--warn); font-weight: 600; }

/* Cards */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px;
}
.card h3 { margin-top: 0; }
.card.ok { border-left: 4px solid var(--ok); }
.card.warn { border-left: 4px solid var(--warn); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 16px 20px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
}
.timeline .when { font-weight: 700; display: block; }

/* FAQ */
details { border-bottom: 1px solid var(--rule); padding: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }

pre.bib {
  background: var(--card); border: 1px solid var(--rule); border-radius: 8px;
  padding: 14px; overflow-x: auto; line-height: 1.45;
}

footer { color: var(--muted); font-size: 0.9rem; padding: 30px 0 50px; border-top: 1px solid var(--rule); }

/* Draft markers: delete before publishing (see README.md). */
.draft-banner {
  background: var(--todo); color: #fff; text-align: center; font-weight: 700;
  padding: 6px 12px; font-size: 0.9rem;
}
.todo {
  color: var(--todo); font-weight: 700; font-family: var(--mono); font-size: 0.85em;
}

ul.findings { padding-left: 1.2em; }
ul.findings li { margin-bottom: 8px; }
