/* SQE project page. Dependency-free; Crimson Pro for display, Atkinson Hyperlegible for reading. */
:root {
  --ink: #1f2429;
  --muted: #5d6873;
  --blue: #2f5d88;
  --blue-dark: #1b3c5c;
  --blue-soft: #eaf1f8;
  --amber: #9a5a1c;
  --amber-soft: #fbf3e8;
  --green: #2f6b45;
  --line: #e1e6ea;
  --paper: #fff;
  --soft: #f6f8f9;
  --max: 980px;
  --narrow: 760px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Atkinson Hyperlegible", Arial, sans-serif; font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, select { font: inherit; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

.skip-link { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--blue); color: #fff; border-radius: 6px; z-index: 20; }
.skip-link:focus { left: 12px; }

/* Header */
.site-header-wrap { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.site-name { font: 700 24px "Crimson Pro", serif; color: var(--blue-dark); letter-spacing: 0.04em; }
.site-name:hover { text-decoration: none; }
.site-header nav { display: flex; gap: 22px; font-size: 14px; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--blue-dark); }

.page { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Title block */
.paper-header { text-align: center; padding: 76px 20px 40px; }
.venue { display: inline-block; margin: 0 0 22px; padding: 4px 12px; border: 1px solid #c8d6e3; border-radius: 999px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.paper-header h1 { max-width: 860px; margin: 0 auto; font: 600 clamp(36px, 5.6vw, 62px)/1.05 "Crimson Pro", Georgia, serif; letter-spacing: -0.02em; color: var(--ink); }
.subtitle { max-width: 760px; margin: 14px auto 0; font: 400 clamp(21px, 2.6vw, 27px)/1.3 "Crimson Pro", Georgia, serif; color: var(--muted); }
.authors { margin: 28px 0 2px; font-size: 19px; }
.authors a { color: var(--ink); font-weight: 700; }
.affiliation { margin: 0; color: var(--muted); font-size: 15px; }
.presentation { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.paper-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.link-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 18px; border: 1px solid #c3d0db; border-radius: 999px; background: #fff; color: var(--blue-dark); font-size: 15px; font-weight: 700; transition: background-color 0.15s, border-color 0.15s; }
.link-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.link-button:hover { text-decoration: none; background: var(--blue-soft); border-color: var(--blue); }
.link-button.primary { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.link-button.primary:hover { background: var(--blue); }
.tldr { max-width: 760px; margin: 34px auto 0; padding: 16px 20px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); text-align: left; font-size: 16px; }
.tldr strong { margin-right: 6px; color: var(--blue-dark); }

/* Figures */
.teaser { margin: 10px 0 72px; }
.teaser img, .figure-grid img { display: block; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }
figcaption b { color: var(--ink); }
.figure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.figure-grid figure { margin: 0; }
.figure-grid a:hover img, .teaser a:hover img { border-color: #b9c8d5; }

/* Sections */
.paper-section { padding: 0 0 64px; }
.paper-section.narrow { max-width: var(--narrow); margin: 0 auto; }
.paper-section h2 { margin: 0 0 20px; padding-top: 22px; border-top: 1px solid var(--line); font: 600 36px/1.2 "Crimson Pro", Georgia, serif; color: var(--blue-dark); }
.paper-section h3 { margin: 0 0 10px; font: 600 23px/1.25 "Crimson Pro", Georgia, serif; color: var(--blue-dark); }
.paper-section h4 { margin: 0 0 14px; font-size: 15px; color: var(--ink); }
.paper-section p { margin: 0 0 16px; }
.paper-section.narrow p { text-align: justify; hyphens: auto; }
.contributions ol { margin: 0; padding-left: 22px; }
.contributions li { margin-bottom: 8px; }
.section-intro { color: var(--muted); max-width: 760px; }
.hint { color: var(--muted); font-weight: 400; }

/* Headline numbers */
.headline-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 30px; }
.headline-results div { padding: 18px 18px 16px; background: var(--blue-soft); border-radius: var(--radius); }
.headline-results div.neutral { background: var(--amber-soft); }
.headline-results strong { display: block; color: var(--blue-dark); font: 600 38px/1 "Crimson Pro", serif; }
.headline-results div.neutral strong { color: var(--amber); }
.headline-results span { display: block; margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.35; }

/* Findings */
.finding-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.finding { padding: 20px 20px 6px; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--radius); }
.finding.negative { border-top-color: var(--amber); }
.finding-label { margin: 0 0 6px !important; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.finding h3 { font-size: 21px; }
.finding p { font-size: 15px; }

/* Interactive panel */
.panel { padding: 24px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.panel-head h3 { margin: 0; }
.results-toolbar { display: flex; gap: 16px; }
.results-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.results-toolbar select { padding: 6px 10px; border: 1px solid #b7c3cd; border-radius: 6px; background: #fff; color: var(--ink); }
.result-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.method-chart { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 112px 1fr 54px; align-items: center; gap: 10px; font-size: 14px; }
.bar-label { text-align: right; color: var(--muted); line-height: 1.2; }
.bar-track { height: 18px; background: #e3e8ec; border-radius: 4px; overflow: hidden; }
.bar { display: block; height: 100%; background: #9aaab6; border-radius: 4px; transition: width 0.4s ease; }
.bar.highlight { background: var(--blue); }
.bar.control { background: var(--amber); }
.bar-value { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.seed-table { font-size: 14px; font-variant-numeric: tabular-nums; }
.seed-row { display: grid; grid-template-columns: 0.8fr repeat(3, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid #e3e8ec; }
.seed-row.head { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.seed-row strong { color: var(--blue-dark); }
.metric-delta.up { color: var(--green); font-weight: 700; }
.metric-delta.down { color: var(--amber); font-weight: 700; }
.data-note { margin: 18px 0 0 !important; color: var(--muted); font-size: 13px; }

/* Paired-test table */
.table-wrap { margin-top: 40px; overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table-wrap th { padding: 10px 12px; text-align: left; border-bottom: 2px solid var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table-wrap td:not(:first-child), .table-wrap th:not(:first-child) { text-align: right; }
.table-wrap tr.key-row td { background: var(--amber-soft); font-weight: 700; }
.table-note { margin-top: 10px !important; color: var(--muted); font-size: 13px; }

/* Gate cards */
.gate-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gate-cards article { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.big-number { margin: 0 0 10px !important; font: 600 34px/1 "Crimson Pro", serif; color: var(--amber); }
.big-number span { font-size: 18px; color: var(--muted); }
.gate-cards h3 { font-size: 20px; }
.gate-cards p { font-size: 15px; }

/* Method */
.method-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; padding: 0; list-style: none; }
.method-steps li { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; color: var(--muted); }
.method-steps .step { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-bottom: 10px; border-radius: 50%; background: var(--blue-dark); color: #fff; font-size: 13px; font-weight: 700; }
.method-steps strong { display: block; margin-bottom: 4px; color: var(--blue-dark); font: 600 22px "Crimson Pro", serif; }
.note { padding: 16px 18px; background: var(--soft); border-left: 3px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; }

/* Limitations */
.limitations ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin: 0; padding: 0; list-style: none; }
.limitations li { padding-left: 16px; border-left: 2px solid var(--line); font-size: 15px; color: var(--muted); }
.limitations li strong { color: var(--ink); }

/* Reproducibility */
.artifacts ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.artifacts li { display: grid; grid-template-columns: 230px 1fr; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.artifacts li a { font-weight: 700; }
.artifacts li span { color: var(--muted); }

/* BibTeX */
.citation-box { position: relative; background: #1d2329; border-radius: var(--radius); }
.citation-box pre { margin: 0; padding: 20px 22px; overflow-x: auto; color: #e8edf1; line-height: 1.6; }
.citation-box button { position: absolute; top: 12px; right: 12px; padding: 5px 12px; border: 1px solid #56616b; border-radius: 6px; background: #2a3138; color: #e8edf1; font-size: 13px; cursor: pointer; }
.citation-box button:hover { background: var(--blue); border-color: var(--blue); }
.copy-status { display: block; height: 22px; margin-top: 6px; color: var(--green); font-size: 13px; }

/* Footer */
.site-footer { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; padding: 26px 0 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--muted); }

@media (max-width: 860px) {
  .finding-cards, .gate-cards { grid-template-columns: 1fr; }
  .method-steps { grid-template-columns: 1fr 1fr; }
  .result-columns { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header, .page, .site-footer { width: calc(100% - 32px); }
  .site-header nav { display: none; }
  .paper-header { padding: 48px 0 32px; }
  .headline-results { grid-template-columns: 1fr 1fr; }
  .figure-grid, .limitations ul { grid-template-columns: 1fr; }
  .paper-section.narrow p { text-align: left; }
  .artifacts li { grid-template-columns: 1fr; gap: 2px; }
  .site-footer { flex-direction: column; gap: 6px; }
  .bar-row { grid-template-columns: 96px 1fr 50px; font-size: 13px; }
  .panel { padding: 18px; }
}
@media (max-width: 420px) {
  .method-steps { grid-template-columns: 1fr; }
  .headline-results strong { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
