/* BEDA project page */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-card: #ffffff;
  --fg: #16181d;
  --fg-muted: #5d6470;
  --fg-faint: #8b929e;
  --border: #e3e6ea;
  --accent: #1f6feb;
  --accent-soft: #e8f0fe;
  --accent-fg: #ffffff;
  --radius: 14px;
  --maxw: 1080px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  --serif: "Charter", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --bg-soft: #15181e;
    --bg-card: #161a21;
    --fg: #e9ecf1;
    --fg-muted: #a3abb8;
    --fg-faint: #767e8b;
    --border: #262b34;
    --accent: #589bff;
    --accent-soft: #16263d;
    --accent-fg: #0b0d11;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --bg-soft: #15181e; --bg-card: #161a21;
  --fg: #e9ecf1; --fg-muted: #a3abb8; --fg-faint: #767e8b;
  --border: #262b34; --accent: #589bff; --accent-soft: #16263d; --accent-fg: #0b0d11;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 56px; }
.nav-brand { font-weight: 700; letter-spacing: .02em; margin-right: auto; }
.nav-links { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--fg-muted); font-size: 14.5px; white-space: nowrap; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.theme-toggle {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--fg-muted);
  border-radius: 999px; width: 32px; height: 32px; cursor: pointer; font-size: 14px; line-height: 1;
}

/* ---------- hero ---------- */
.hero { padding: 68px 0 34px; text-align: center; }
.badge {
  display: inline-block; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-muted); border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 14px; background: var(--bg-soft);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5.2vw, 50px);
  line-height: 1.14; font-weight: 700; margin: 22px auto 10px; max-width: 18em;
  letter-spacing: -0.01em;
}
.hero .subtitle { color: var(--fg-muted); font-size: 18px; margin: 0 auto; max-width: 34em; }
.authors { margin-top: 24px; color: var(--fg-muted); font-size: 16px; }
.authors .anon { color: var(--fg); font-weight: 600; }
.authors .note { font-size: 14px; color: var(--fg-faint); margin-top: 4px; }

.links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--fg);
  padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 500;
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { color: var(--accent-fg); opacity: .9; }
.btn[aria-disabled="true"] { color: var(--fg-faint); cursor: not-allowed; opacity: .75; }
.btn[aria-disabled="true"]:hover { border-color: var(--border); color: var(--fg-faint); text-decoration: none; }

/* ---------- sections ---------- */
section { padding: 44px 0; }
section + section { border-top: 1px solid var(--border); }
h2 {
  font-family: var(--serif); font-size: 27px; font-weight: 700;
  margin: 0 0 6px; letter-spacing: -0.01em;
}
.section-sub { color: var(--fg-muted); margin: 0 0 26px; font-size: 16px; }
.prose { max-width: 46em; margin: 0 auto; }
.prose p { margin: 0 0 1em; }
.abstract { font-size: 17.5px; line-height: 1.75; }
.center { text-align: center; }

/* ---------- figures ---------- */
figure { margin: 0; }
figure img, figure video { width: 100%; border-radius: var(--radius); }
figure.plain img { border-radius: 0; }
figcaption {
  color: var(--fg-muted); font-size: 14.5px; line-height: 1.6;
  margin-top: 12px; max-width: 48em; margin-left: auto; margin-right: auto; text-align: left;
}
figcaption b, figcaption strong { color: var(--fg); }
.framed { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); padding: 12px; }

/* plots exported from LaTeX: white canvas, equalized height, centered */
.plot {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  display: flex; align-items: center; justify-content: center;
  min-height: 300px;
}
.plot img { width: auto; max-width: 100%; max-height: 380px; border-radius: 0; }
figure.plot-wrap { display: flex; flex-direction: column; }
figure.plot-wrap figcaption { margin-top: 12px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
/* mirrors the paper's 0.4 / 0.6 column split for (a)/(b) figure pairs */
.grid-ab { display: grid; grid-template-columns: 0.42fr 0.58fr; gap: 28px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-ab { grid-template-columns: 1fr; }
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.stat {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; text-align: center;
}
.stat .v { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat .k { font-size: 13.5px; color: var(--fg-muted); line-height: 1.4; margin-top: 4px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ---------- table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--bg-card); }
th, td { padding: 11px 16px; text-align: center; white-space: nowrap; }
th { font-size: 13px; letter-spacing: .03em; text-transform: uppercase; color: var(--fg-muted); font-weight: 600; }
thead tr { border-bottom: 1px solid var(--border); }
tbody tr + tr { border-top: 1px solid var(--border); }
td:first-child, th:first-child { text-align: left; }
tr.ours { background: var(--accent-soft); font-weight: 600; }
td .pm { color: var(--fg-faint); font-size: 13px; }

/* ---------- video cards ---------- */
.vcard {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.vcard video { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #000; }
.vcard .meta { padding: 11px 14px; }
.vcard .t { font-size: 15px; font-weight: 600; }
.vcard .d { font-size: 13.5px; color: var(--fg-muted); }

.teaser { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; }
.teaser video { width: 100%; }

/* ---------- todo / placeholder ---------- */
.placeholder {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 34px 20px; text-align: center; color: var(--fg-faint);
  background: var(--bg-soft); font-size: 15px;
}

footer {
  border-top: 1px solid var(--border); padding: 30px 0 48px;
  color: var(--fg-faint); font-size: 14px; text-align: center;
}
