/* Fool's Gold — project page styles.
   Self-contained: no CDN, no build step, no external fonts. */

:root {
  --link: #245e9b;
  --ink: #181818;
  --body: #2d2d2d;
  --muted: #666;
  --line: #d8d8d8;
  --bg: #ffffff;
  --maxw: 880px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.64;
  color: var(--body);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

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

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--ink); line-height: 1.25; }
h2 {
  font-size: 1.65rem;
  margin: 0 0 .75em;
  letter-spacing: -.01em;
}
h3 { font-size: 1.08rem; margin: 1.8em 0 .4em; }

section { padding: 10px 0; }
section.alt { background: var(--bg); }

/* ---------------------------------------------------------------- hero --- */
.hero {
  border-top: none;
  padding: 58px 0 28px;
  background: #fff;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0;
  letter-spacing: -.03em;
  color: var(--ink);
}
.hero .tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--ink);
  font-weight: 400;
  margin: .5em auto 0;
  max-width: 38em;
  letter-spacing: -.01em;
}
.hero .authors { margin: 1.1em 0 0; font-size: 1.02rem; }
.hero .affil { margin: .18em 0 0; color: var(--muted); font-size: .93rem; }
.hero .venue {
  display: block;
  margin-top: 1.1em;
  color: var(--muted);
  font-size: .8rem;
}

/* --------------------------------------------------------------- links --- */
.hero-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.hero-icon svg, .hero-icon img { width: 64px; height: auto; display: block; }

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 1.5em;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--link);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid var(--link);
  box-shadow: 0 1px 2px rgba(24, 24, 24, .18);
  transition: background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.btn:hover {
  text-decoration: none;
  background: #1d4d80;
  border-color: #1d4d80;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(24, 24, 24, .22);
}
.btn.ghost { background: var(--link); color: #fff; border-color: var(--link); }
.btn.ghost:hover { background: #1d4d80; border-color: #1d4d80; }
.btn.disabled {
  background: #eef1f5; color: var(--muted); border-color: var(--line);
  box-shadow: none;
  pointer-events: none;
}
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }

/* --------------------------------------------------------------- media --- */
figure { margin: 0; }
figure img {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}
figcaption {
  font-size: .84rem;
  color: var(--muted);
  margin-top: .85em;
  line-height: 1.55;
  /* captions sit narrower than the full figure margin, matching the
     fig-narrow measure (user order 2026-08-16) */
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
figcaption b { color: var(--body); }
.fig-narrow { max-width: 640px; margin: 0 auto; }
.fig-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: start;
}

/* ---------------------------------------------------------- page structure --- */
.teaser { padding-top: 8px; }

.summary-title {
  font-size: 1.05rem;
  margin-bottom: .75em;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.highlight {
  padding: 16px 22px;
}
.highlight + .highlight { border-left: 1px solid var(--line); }
.highlight .metric {
  display: block;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: .35em;
}
.highlight p { margin: 0; font-size: .88rem; color: var(--muted); }

.method-list {
  margin: 1.25em 0 0;
  padding-left: 1.6em;
  border-top: 1px solid var(--line);
}
.method-list li {
  padding: 14px 0 15px .35em;
  border-bottom: 1px solid var(--line);
}
.method-list h3 { margin: 0 0 .2em; font-size: 1rem; }
.method-list p { margin: 0; }

/* -------------------------------------------------------------- tables --- */
.table-scroll { overflow-x: auto; margin-top: 1.1em; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: transparent;
}
th, td { padding: 8px 9px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; white-space: nowrap; }
thead th {
  border-bottom: 2px solid #c9ced6;
  font-size: .84rem;
  color: var(--body);
  font-weight: 700;
}
td.hi { font-weight: 700; color: var(--ink); }
tr.boundary td { color: var(--muted); font-style: italic; }
.tnote { font-size: .84rem; color: var(--muted); margin-top: .8em; }

/* ---------------------------------------------------------------- code --- */
pre {
  background: #14171c;
  color: #e6e9ee;
  padding: 16px 18px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: .86rem;
  line-height: 1.55;
  font-family: var(--mono);
}
pre code { font-family: inherit; }
code { font-family: var(--mono); font-size: .9em; }
p code, li code, td code {
  background: #f1f3f6;
  padding: .12em .38em;
  border-radius: 4px;
  color: #24292f;
}
.bibtex { position: relative; }
.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255,255,255,.12);
  color: #e6e9ee;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .78rem;
  font-family: var(--font);
  cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,.22); }

/* -------------------------------------------------------------- footer --- */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 46px;
  font-size: .87rem;
  color: var(--muted);
}
footer a { color: var(--muted); text-decoration: underline; }

ul.tight { padding-left: 1.15em; }
ul.tight li { margin: .35em 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .highlights, .fig-pair { grid-template-columns: 1fr; }
  .highlight { padding: 13px 0; }
  .highlight + .highlight { border-left: none; border-top: 1px solid var(--line); }
  section { padding: 8px 0; }
}
