/* Scyros: light by default, dark when the visitor's system asks for it.
   Brand blue comes from the logo; text links use a darker shade so they
   reach 4.5:1 contrast on white. */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/geist-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Tokens ---------------------------------------------------------------
   Each colour is light-dark(light, dark). The page follows the system theme
   until the visitor picks one with the header button, which sets data-theme. */

:root {
  color-scheme: light dark;

  --bg: light-dark(#ffffff, #0e141b);
  --surface: light-dark(#f2f6fa, #16202a);
  --code-bg: light-dark(#f4f6f8, #111a23);
  --border: light-dark(#dde5ec, #263241);
  --text: light-dark(#17212b, #e4eaf0);
  --muted: light-dark(#52606d, #9aa8b6);
  --brand: light-dark(#0d84bb, #3aa6dc);
  --link: light-dark(#0b6c9a, #6cc0ea);
  --on-brand: light-dark(#ffffff, #0e141b);

  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --page: 72rem;
  --prose: 46rem;
  --gutter: 1.25rem;
  --radius: 10px;
  --head-height: 3.75rem;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* --- Base ----------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-height) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 650; margin: 0 0 .75rem; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 2.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

code, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .05em .35em;
  overflow-wrap: anywhere;
}

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 20;
  padding: .5rem .9rem;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: 6px;
}
.skip-link:focus { top: .6rem; }

/* --- Header --------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-head__inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  height: var(--head-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  font-weight: 650;
  font-size: 1.1rem;
  text-decoration: none;
}
.brand img { width: 2.1rem; height: auto; }

.site-nav { display: flex; gap: 1.25rem; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"] { font-weight: 600; }

.site-head__tools { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.icon-button {
  display: flex;
  padding: .4rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.icon-button:hover { color: var(--text); background: var(--surface); }
.icon-button svg { width: 1.3rem; height: 1.3rem; }

.theme-toggle { display: none; }
.js .theme-toggle { display: flex; }
.theme-toggle[data-current="light"] .icon-sun,
.theme-toggle[data-current="dark"] .icon-moon { display: none; }

/* --- Buttons and code ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-weight: 550;
  font-size: .95rem;
  text-decoration: none;
}
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn--primary { background: var(--link); border-color: var(--link); color: var(--on-brand); }
.btn--primary:hover { filter: brightness(1.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }

.code {
  display: flex;
  align-items: flex-start;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 0 1rem;
}
.code pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 1rem 1.1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code--scroll pre { white-space: pre; overflow-x: auto; }
.code pre { tab-size: 4; }

.copy-btn {
  display: none;
  flex: none;
  margin: .6rem .6rem 0 0;
  padding: .3rem .65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font: 500 .8rem var(--sans);
  cursor: pointer;
}
.copy-btn:hover { color: var(--text); border-color: var(--brand); }
.js .copy-btn { display: block; }

/* Tabs. Without JavaScript every panel is shown, each with its own label. */

.tabs__list { display: none; }
.js .tabs__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.tabs__list button {
  padding: .6rem 1rem;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--muted);
  font: 500 .95rem var(--sans);
  cursor: pointer;
}
.tabs__list button:hover { color: var(--text); }
.tabs__list button[aria-selected="true"] { color: var(--link); border-bottom-color: var(--link); }
.tabs__label { margin: 0 0 .4rem; font-weight: 600; font-size: .9rem; }
.js .tabs__label { display: none; }

/* --- Sections ------------------------------------------------------------- */

.section { padding-block: 3.5rem; }
.section__head { text-align: center; max-width: var(--prose); margin: 0 auto 2rem; }
.section__head p { color: var(--muted); }

.venue {
  margin-bottom: .6rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* --- Home ----------------------------------------------------------------- */

.hero { padding-block: 4rem 1rem; text-align: center; }
.hero__logo { width: min(15rem, 60vw); height: auto; margin: 0 auto 1.5rem; }
.hero h1 { margin-bottom: .5rem; }
.hero__tagline { font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); font-weight: 500; margin-bottom: 1.1rem; }
.hero__intro { max-width: 40rem; margin: 0 auto; color: var(--muted); font-size: 1.05rem; }

.install { max-width: 50rem; margin: 0 auto; text-align: center; }
.install .code { text-align: left; }
.install__next { color: var(--muted); font-size: .95rem; }

.card {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}
.card h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.card p { color: var(--muted); }

.publications { display: grid; gap: 1rem; max-width: var(--prose); margin: 0 auto; }
.card .publication__authors { color: var(--text); font-size: .95rem; margin-bottom: .75rem; }
.publication .btn-row { margin-top: 1.25rem; }

.cite { max-width: var(--prose); margin: 0 auto; }

/* Docs: a sidebar on wide screens, a short contents list above on narrow ones. */

.docs { display: grid; gap: 2.5rem; padding-block: 3rem 4rem; }
.docs__nav ul { list-style: none; padding: 0; margin: 0; }
.docs__nav ul ul { padding-left: .9rem; margin: .2rem 0 .5rem; border-left: 1px solid var(--border); }
.docs__nav li { margin: .15rem 0; }
.docs__nav a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.docs__nav a:hover { color: var(--text); }
.docs__nav code { background: none; border: 0; padding: 0; font-size: .88rem; }
.docs__nav-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .6rem; }

.docs__body { min-width: 0; max-width: var(--prose); }
.docs__body > section { margin-bottom: 3.5rem; }
.docs__body h1 { margin-bottom: 2rem; }
.docs__body h2 { padding-top: .5rem; }
.docs__body h3, .docs__body h4 { margin: 2rem 0 .5rem; font-size: 1.1rem; }
.docs__body h4 code { font-size: 1em; background: none; border: 0; padding: 0; }
.docs__body .docs__group {
  margin: 2.5rem 0 0;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.docs__group + h4 { margin-top: .75rem; }
.docs__body li { margin-bottom: .4rem; }
.docs__output { color: var(--muted); font-size: .93rem; }
.docs__body code.cmd { white-space: nowrap; }

/* A code block that shows a file, with the file's name above it. */
.file { margin: 0 0 1rem; }
.file figcaption { margin-bottom: .35rem; color: var(--muted); font: .8rem var(--mono); }
.file .code { margin: 0; }

.docs__body .lead { font-size: 1.1rem; }

/* What the reader should see after a tutorial step. */
.check {
  padding: .7rem 1rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  font-size: .95rem;
}

.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.docs__body table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.docs__body th,
.docs__body td { padding: .45rem .75rem .45rem 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.docs__body th { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ref-table td:first-child { width: 34%; }
.ref-table td:first-child code { white-space: nowrap; }
.ref-label { margin: 1rem 0 .35rem; }

.fields { margin: 0 0 1rem; }
.fields dt { margin-top: .75rem; font-weight: 600; }
.fields dd { margin: .2rem 0 0 1.25rem; }

@media (max-width: 59.99rem) {
  .docs__nav ul ul { display: none; }
}

@media (min-width: 60rem) {
  .docs { grid-template-columns: 14rem minmax(0, 1fr); gap: 3.5rem; }
  .docs__nav > div { position: sticky; top: calc(var(--head-height) + 2rem); }
}

/* --- Footer --------------------------------------------------------------- */

.site-foot {
  margin-top: 2rem;
  padding-block: 2.5rem;
  background: var(--surface);
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
}
.site-foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.4rem; margin-bottom: 1rem; }
.site-foot nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.site-foot nav a:hover { color: var(--link); }
.site-foot p { max-width: 44rem; margin: 0 auto .6rem; }
.site-foot__funding { font-size: .8rem; }

@media (max-width: 30rem) {
  .site-head__inner { gap: 1.1rem; }
  .section { padding-block: 2.75rem; }
  .hero { padding-top: 2.5rem; }
  .tabs__list button { padding: .55rem .6rem; font-size: .9rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
