:root {
  --ink: #1b1f27;
  --muted: #5b6472;
  --line: #e3e6eb;
  --bg: #ffffff;
  --soft: #f5f6f9;
  --s1: #2f6fd6;        /* System 1: blue, as in the paper's diagram */
  --s2: #8a2be2;        /* System 2: purple */
  --accent: #128a7e;    /* REASON bars */
  --warn: #c2410c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--s1); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; margin-left: auto; margin-right: auto; }

/* ---------- header ---------- */
header.hero { text-align: center; padding: 64px 0 28px; }
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 46px);
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.hero h1 .name { display: block; font-size: 1.5em; letter-spacing: 0.04em; margin-bottom: 10px; }
.hero h1 .sub { display: block; font-weight: 400; font-size: 0.62em; color: #2a303a; }
.hero h1 b { color: var(--s2); font-weight: 700; }
.authors { margin: 22px 0 4px; font-size: 19px; }
.venue { color: var(--muted); font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600;
}
.btn:hover { background: #343b48; text-decoration: none; }
.btn.off { background: #c9ced6; cursor: default; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- sections ---------- */
section { padding: 34px 0; }
section.band { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px; margin: 0 0 14px; text-align: center; font-weight: 700;
}
h3 { font-size: 19px; margin: 26px 0 8px; }
p { margin: 0 0 14px; }
.lead { font-size: 18px; }
.abstract { text-align: justify; hyphens: auto; }
figure { margin: 22px 0; }
figure img { border-radius: 8px; margin: 0 auto; }
figure.framed img { border: 1px solid var(--line); background: #fff; }
figcaption { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin-top: 10px; text-align: center; }
figcaption b { color: var(--ink); }

.s1 { color: var(--s1); font-weight: 600; }
.s2 { color: var(--s2); font-weight: 600; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.card h3 { margin: 0 0 6px; font-size: 17.5px; }
.card p { margin: 0; font-size: 15.5px; color: #333a46; }
.card .tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0 6px; }
.stat { text-align: center; padding: 18px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.stat .num { font-family: Georgia, serif; font-size: 34px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat .num small { font-size: 0.5em; color: var(--muted); font-weight: 400; }
.stat .what { font-size: 14.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }

/* ---------- media grids ---------- */
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.clip { margin: 0; }
.clip video { width: 100%; border-radius: 8px; background: #000; }
.clip figcaption { margin-top: 6px; font-size: 13.5px; }
.rowlabel { display: flex; align-items: center; gap: 10px; margin: 20px 0 8px; font-weight: 700; font-size: 15.5px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: #fff; letter-spacing: 0.04em; }
.pill.fail { background: var(--warn); }
.pill.ok { background: var(--accent); }
.note { color: var(--muted); font-size: 14.5px; text-align: center; }
.tasks { display: flex; gap: 16px; justify-content: center; align-items: flex-end; }
.tasks figure { margin: 0; flex: 0 1 auto; }
.tasks img { height: 250px; width: auto; }

/* ---------- table ---------- */
table { border-collapse: collapse; margin: 18px auto; font-size: 15.5px; }
th, td { padding: 7px 16px; text-align: center; border-bottom: 1px solid var(--line); }
th { font-weight: 700; border-bottom: 2px solid var(--ink); }
td:first-child, th:first-child { text-align: left; }
tr.ours td { background: #eef8f6; font-weight: 600; }

/* ---------- bibtex / footer ---------- */
pre {
  background: #14171c; color: #e6e9ef; padding: 16px 18px; border-radius: 10px;
  overflow-x: auto; font-size: 14px; line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
footer { text-align: center; color: var(--muted); font-size: 13.5px; padding: 26px 0 40px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  header.hero { padding-top: 40px; }
  .cards, .grid2, .stats { grid-template-columns: 1fr; }
  .grid3, .grid4 { grid-template-columns: repeat(2, 1fr); }
  .tasks img { height: 170px; }
  .abstract { text-align: left; }
  th, td { padding: 6px 8px; }
}
