/* © 2026 Luxembourg Institute of Science and Technology (LIST). All Rights Reserved.
   POLYSUN website. Dark scheme shared with the Optimize This! game:
   blue = human, orange = optimizer, green = target, purple = model. */

:root {
  --bg: #0f1117;
  --bg-2: #141722;
  --panel: #1a1d27;
  --panel-2: #20242f;
  --line: #2d313f;
  --text: #f8fafc;
  --dim: #94a3b8;
  --blue: #3b82f6;
  --orange: #f97316;
  --green: #10b981;
  --purple: #8b5cf6;
  --radius: 18px;
  --wrap: 1120px;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--green); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(15, 17, 23, 0.82); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 2px; text-decoration: none; }
.brand span { color: var(--orange); }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--dim); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.lang { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a {
  font: 600 12px/1 var(--body); text-transform: uppercase; letter-spacing: 0.5px; text-decoration: none;
  background: none; border: 0; color: var(--dim); padding: 7px 9px; border-radius: 999px; cursor: pointer;
}
.lang { position: relative; }
.lang a { position: relative; z-index: 1; transition: color 0.25s cubic-bezier(0.22, 0.61, 0.36, 1); }
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { color: var(--bg); }
.lang-thumb {
  position: absolute; left: 3px; top: 3px; bottom: 3px; border-radius: 999px; background: var(--text);
  transition: transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1), width 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) { .lang-thumb { transition: none; } }

/* transition into the game */
.warp { position: fixed; inset: 0; z-index: 1000; pointer-events: all; }
.warp-green, .warp-dark { position: absolute; inset: 0; clip-path: circle(0px at 50% 50%); }
.warp-green { background: var(--green); }
.warp-dark { background: var(--bg); }
.warp-ring { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--green);
  transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
.warp-icon { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; border-radius: 26px;
  transform: translate(-50%, -50%) scale(0.2); opacity: 0; box-shadow: 0 20px 60px rgba(16, 185, 129, 0.35); }

/* ----------------------------------------------------------------- hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: manipulation; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(15, 17, 23, 0.94) 0%, rgba(15, 17, 23, 0.72) 42%, rgba(15, 17, 23, 0.1) 75%),
              linear-gradient(0deg, var(--bg) 0%, rgba(15, 17, 23, 0) 22%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; pointer-events: none; }
.hero .wrap a, .hero .wrap button { pointer-events: auto; }
.eyebrow { font: 700 13px/1.4 var(--body); letter-spacing: 1.6px; text-transform: uppercase; color: var(--orange); margin: 0 0 14px; }
.hero h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -1.5px;
  font-size: clamp(42px, 7vw, 84px); line-height: 1.02; margin: 0 0 22px; max-width: 12ch;
}
.hero h1 em { font-style: normal; color: var(--green); }
.lead { font-size: clamp(18px, 2vw, 21px); color: #cbd5e1; max-width: 560px; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 700 16px/1 var(--body); padding: 16px 24px; border-radius: 12px; border: 1px solid transparent;
  transition: transform 0.15s, filter 0.15s, border-color 0.15s;
}
.btn:hover { transform: translateY(-2px); }
/* press: a quick squash, released with a little bounce */
.btn:active { transform: translateY(0) scale(0.96, 0.92); transition-duration: 0.08s; }
.btn { transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 10px 30px rgba(16, 185, 129, 0.28); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(26, 29, 39, 0.6); }
.btn-ghost:hover { border-color: var(--dim); }
.hint { margin-top: 26px; font-size: 14px; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.hint .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25); }

/* -------------------------------------------------------------- sections */
section { padding: 110px 0; position: relative; }
.head { max-width: 720px; margin-bottom: 44px; }
h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.8px; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.08; margin: 0 0 18px; }
.intro { color: #cbd5e1; font-size: 19px; margin: 0; }
.prose { color: #cbd5e1; max-width: 760px; }
.prose p { margin: 0 0 16px; }
.prose b { color: var(--text); }

/* Scroll reveal: slow in / slow out with a slight overshoot (follow-through),
   and cards in a row arrive one after another (overlapping action). */
.reveal {
  opacity: 0; transform: translateY(28px) scale(0.985);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.8s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.reveal.in { opacity: 1; transform: none; }
.steps .reveal:nth-child(2), .game-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.steps .reveal:nth-child(3) { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; counter-reset: step; }
.step {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px;
  position: relative; overflow: hidden;
}
.step.in { transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.8s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.3s; }
@media (hover: hover) {
  .step:hover { transform: translateY(-4px); border-color: var(--c); transition-delay: 0s; }
  .step::after { transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1); }
  .step:hover::after { transform: scale(1.35); }
}
.step::before {
  counter-increment: step; content: '0' counter(step);
  font: 700 15px/1 var(--display); color: var(--c); display: block; margin-bottom: 26px; letter-spacing: 1px;
}
.step::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, var(--c) 0%, transparent 70%); opacity: 0.22;
}
.step h3 { font: 700 24px/1.2 var(--display); margin: 0 0 10px; }
.step p { margin: 0; color: var(--dim); font-size: 16px; }

/* game */
.game { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.game-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.game-grid > *, .game-card > *, .stats > * { min-width: 0; }
.game-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 34px;
  display: grid; grid-template-columns: 112px 1fr; gap: 22px; align-items: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.game-card img { width: 112px; height: 112px; border-radius: 26px; }
.game-card h3 { font: 700 28px/1.1 var(--display); margin: 0 0 6px; }
.game-card p { margin: 0; color: var(--dim); font-size: 15px; }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.stat { background: var(--panel-2); border-radius: 14px; padding: 14px; text-align: center; }
.stat b { display: block; font: 700 30px/1 var(--display); color: var(--c); margin-bottom: 6px; }
.stat span { font-size: 13px; color: var(--dim); display: block; line-height: 1.35; overflow-wrap: break-word; hyphens: auto; }
.game-card .btn { grid-column: 1 / -1; justify-content: center; margin-top: 6px; }

/* funding */
.ref {
  display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 22px; padding: 10px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 15px; color: var(--dim);
}
.ref b { color: var(--text); font: 700 18px/1 var(--display); letter-spacing: 0.5px; font-variant-numeric: tabular-nums; }

/* logos: partner logos are designed for a white background */
.partners {
  margin-top: 44px; background: #fff; border-radius: 22px; padding: 30px 36px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 30px 48px;
}
.partners a { display: inline-flex; }
.partners img { display: block; width: auto; }
.partners .l-fnr { height: 40px; }
.partners .l-list { height: 48px; }
.partners .l-uni { height: 76px; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--dim); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a, footer button.linklike { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover, footer button.linklike:hover { color: var(--text); }
button.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* --------------------------------------------------------------- dialogs */
dialog {
  width: min(760px, calc(100% - 24px)); max-height: min(86vh, 900px); padding: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--panel); color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
dialog::backdrop { background: rgba(5, 6, 10, 0.72); backdrop-filter: blur(4px); }
.dlg-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 22px; margin: 0; letter-spacing: -0.3px; }
.dlg-close { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; font-size: 20px; cursor: pointer; }
.dlg-body { padding: 8px 26px 28px; overflow: auto; max-height: calc(min(86vh, 900px) - 76px); color: #cbd5e1; font-size: 15px; }
.dlg-body h3 { font: 700 17px/1.3 var(--display); color: var(--text); margin: 24px 0 6px; }
.dlg-body ul { padding-left: 20px; }
.dlg-body .note { color: var(--dim); font-size: 13px; font-style: italic; }
.dlg-body a { color: var(--blue); }
.dlg-body pre { white-space: pre-wrap; font-size: 12px; line-height: 1.45; color: var(--dim); }
.dlg-body .fnr-on-white { background: #fff; border-radius: 10px; padding: 10px 14px; display: inline-block; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: 1fr; gap: 36px; }
  .nav-links { display: none; }
  .lang { margin-left: auto; }
}
@media (max-width: 560px) {
  section { padding: 80px 0; }
  /* phones: keep the map visible in the upper part, where taps land, and darken only behind the text */
  .hero { align-items: flex-end; padding-top: 46vh; }
  .hero::after { background: linear-gradient(0deg, rgba(15, 17, 23, 0.97) 0%, rgba(15, 17, 23, 0.9) 48%, rgba(15, 17, 23, 0.25) 72%, rgba(15, 17, 23, 0) 100%); }
  .game-card { grid-template-columns: 1fr; padding: 24px; }
  .game-card img { width: 84px; height: 84px; border-radius: 20px; }
  .stat b { font-size: 24px; }
  .stat { padding: 12px 4px; }
  .stat span { font-size: 12px; }
  .partners { padding: 24px; gap: 26px; }
  .partners .l-fnr { height: 32px; } .partners .l-list { height: 38px; } .partners .l-uni { height: 62px; }
  .btn { width: 100%; justify-content: center; }
}

/* ----------------------------------------------------------- back to top */
.to-top {
  position: fixed; z-index: 40;
  right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--text); color: var(--bg); border: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: translateY(18px) scale(0.6); pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover svg { transform: translateY(-2px); }
.to-top svg { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.to-top:active { transform: scale(0.9, 0.86); transition-duration: 0.08s; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: opacity 0.2s; transform: none; } }

/* Google Play badge (Android only). The PNG carries Google's own clear space. */
.gp-badge { display: inline-flex; align-self: center; line-height: 0; border-radius: 10px; }
.gp-badge[hidden] { display: none; }
.gp-badge img, .game-card .gp-badge img { height: 64px; width: auto; border-radius: 0; }
.game-card .gp-badge, .game-card .gp-legal { grid-column: 1 / -1; justify-self: center; }
.game-card p.gp-legal { margin-top: -10px; font-size: 12px; color: var(--dim); text-align: center; }

/* Hero challenge feedback */
.hint.bump { animation: hint-bump 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes hint-bump { 0% { transform: scale(1); } 35% { transform: scale(1.04); } 100% { transform: scale(1); } }
.hint.won { color: #6ee7b7; }
.hint.won .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.3); }
.hint { transform-origin: left center; font-variant-numeric: tabular-nums; }
.btn.nudge { animation: nudge 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s 2; }
@keyframes nudge { 0%, 100% { transform: none; box-shadow: 0 10px 30px rgba(16, 185, 129, 0.28); } 40% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.22), 0 10px 30px rgba(16, 185, 129, 0.4); } }
@media (prefers-reduced-motion: reduce) { .hint.bump, .btn.nudge { animation: none; } }

/* Page arriving after a language change: text starts hidden and rises in. */
html.lang-in main [data-i], html.lang-in .nav [data-i] { opacity: 0; }
/* Page arriving from the game: covered until the hand-over animation starts. */
html.arrive body::before { content: ""; position: fixed; inset: 0; z-index: 300; background: var(--bg); }
.arrive-cover { position: fixed; inset: 0; z-index: 300; background: var(--bg); pointer-events: none; }
/* The wordmark is in the page from the first paint, at exactly the size and
   place the game left it, so nothing blinks between the two pages. */
.arrive-mark { display: none; position: fixed; z-index: 301; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; line-height: 0; }
/* Drawn as outlines, not text: it looks identical on both pages from the very
   first frame, whether or not the web font has loaded yet. */
.arrive-mark svg { display: block; width: min(260px, 55vw); height: auto; }
html.arrive .arrive-mark, .arrive-mark.on { display: block; }

/* ------------------------------------------------------------ about */
.about-card { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 36px; max-width: 880px;
  display: grid; gap: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); }
.about-card > * { min-width: 0; }
.about-id { display: flex; align-items: center; gap: 20px; }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  font: 700 24px/1 var(--display); letter-spacing: 1px; color: #fff;
  background: conic-gradient(from 210deg, var(--blue), var(--purple), var(--orange), var(--green), var(--blue));
  box-shadow: inset 0 0 0 3px rgba(15, 17, 23, 0.55); }
.about-name { font: 700 clamp(26px, 4vw, 34px)/1.1 var(--display); margin: 0 0 6px; text-wrap: balance; }
.about-role { margin: 0; color: var(--dim); }
.about-card .prose p { margin: 0 0 14px; }
.about-card .prose p:last-child { margin-bottom: 0; }
.about-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  border-top: 1px solid var(--line); padding-top: 22px; }
.sup { display: grid; gap: 4px; min-width: 0; }
.sup-label { font: 700 12px/1.3 var(--body); letter-spacing: 1.4px; text-transform: uppercase; color: var(--orange); }
.sup-name { font: 700 19px/1.3 var(--display); color: var(--text); text-decoration: none; width: max-content; max-width: 100%; }
.sup-name span { display: inline-block; color: var(--orange); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sup-name:hover span { transform: translate(3px, -3px); }
.sup-name:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.sup-role { color: var(--dim); font-size: 14px; }
/* ------------------------------------------------------- publications */
#publications { padding-top: 0; }
.pubs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 880px; }
.pubs:empty { display: none; }
.pub { display: grid; grid-template-columns: 64px 1fr; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; }
.pub > * { min-width: 0; }
.pub-year { font: 700 18px/1.4 var(--display); color: var(--orange); }
.pub-title { color: var(--text); font-weight: 600; text-decoration: none; }
.pub-title:hover { text-decoration: underline; }
.pub-meta { margin: 4px 0 0; color: var(--dim); font-size: 14px; }
.pubs-empty { max-width: 880px; display: flex; align-items: center; gap: 18px; padding: 26px 28px; border-radius: 18px;
  border: 1.5px dashed var(--line); color: var(--dim); }
.pubs-empty svg { flex: none; color: var(--orange); }
.pubs-empty p { margin: 0; }
@media (max-width: 560px) {
  .about-card { padding: 24px; border-radius: 22px; }
  .avatar { width: 58px; height: 58px; font-size: 20px; }
  .about-foot .btn { width: 100%; }
  .pubs-empty { padding: 20px; align-items: flex-start; }
}

/* ======================================================== storyline */
/* Chapter numbers on the section labels */
.eyebrow[data-n]::before { content: attr(data-n); display: inline-block; margin-right: 10px; padding: 2px 7px;
  border: 1px solid rgba(249, 115, 22, 0.45); border-radius: 6px; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
/* Bridge from one chapter to the next */
.bridge { display: flex; align-items: center; gap: 12px; width: max-content; max-width: 100%; margin-top: 56px;
  color: var(--dim); text-decoration: none; font: 600 17px/1.4 var(--display); }
.bridge span:first-child { min-width: 0; }
.bridge:hover { color: var(--text); }
.bridge-arrow { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--orange); transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s; }
.bridge:hover .bridge-arrow { transform: translateY(4px); border-color: var(--orange); }
#game .bridge { margin-top: 64px; }
/* Chapter rail, wide screens only */
.rail { display: none; }
@media (min-width: 1360px) {
  .rail { display: flex; flex-direction: column; gap: 18px; position: fixed; z-index: 30; left: 28px; top: 50%; transform: translateY(-50%);
    opacity: 0; pointer-events: none; transition: opacity 0.4s; }
  .rail.show { opacity: 1; pointer-events: auto; }
  .rail-line { position: absolute; left: 13px; top: 12px; bottom: 12px; width: 2px; background: var(--line); border-radius: 2px; }
  .rail-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--orange); border-radius: 2px; transition: height 0.15s linear; }
  .rail a { position: relative; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--dim); }
  .rail-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line);
    font: 700 11px/1 var(--body); font-variant-numeric: tabular-nums; transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .rail-t { font-size: 13px; opacity: 0; transform: translateX(-6px); transition: opacity 0.2s, transform 0.25s; white-space: nowrap; }
  .rail a:hover .rail-t, .rail a.on .rail-t { opacity: 1; transform: none; }
  .rail a.past .rail-n { border-color: var(--orange); color: var(--orange); }
  .rail a.on .rail-n { background: var(--orange); border-color: var(--orange); color: var(--bg); transform: scale(1.12); }
  .rail a.on { color: var(--text); }
}
@media (max-width: 1080px) { .nav-links { display: none; } .lang { margin-left: auto; } }

@media (max-width: 560px) { .bridge { font-size: 16px; margin-top: 44px; } }

/* Licence texts shown inside the licences dialog */
.lic-full { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.lic-full summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.lic-pre { margin: 0; padding: 0 16px 16px; max-height: 340px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--dim); }
