/* The public site's one stylesheet (T-168), in the Night Shift identity (T-186): gold coals on
   indigo, Martian Mono for the name and the numbers, Onest for text. Everything is served from
   /static/ (fonts/, brand.svg, favicon.svg); nothing comes from another site. Light and dark
   follow the visitor's setting. Green, amber and red are not part of the palette: they stay
   free for real status messages. */

/* Martian Mono (wdth 75-112.5 %, wght 100-800) and Onest (wght 100-900), variable woff2 from
   Google Fonts, SIL Open Font License 1.1 (fonts/<family>/OFL.txt). The unicode ranges are the
   Google Fonts CSS2 API's for the latin, latin-ext and cyrillic subsets. */
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url("fonts/martian-mono/martian-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url("fonts/martian-mono/martian-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url("fonts/martian-mono/martian-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: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest/onest-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/onest/onest-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;
}

:root {
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --bg: #eef0f7;      /* dawn */
  --fg: #151a3b;      /* indigo text */
  --coal: #2a3170;    /* lit coals: indigo by day */
  --idle: #c3c7dc;    /* idle coals */
  --col: #f2b632;     /* the gold column */
  --col-fg: #151a3b;  /* a letter on the column */
  --link: #3b3fa8;    /* links and buttons */
  --on-link: #ffffff;
  --panel: #e2e5f0;
  --muted: #535a7d;
  --line: #d2d6e6;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1330;    /* night */
    --fg: #eef0fa;
    --coal: #f4c04e;  /* lit coals: gold by night */
    --idle: #2b335c;
    --col: #f4c04e;
    --col-fg: #0e1330;
    --link: #f4c04e;
    --on-link: #0e1330;
    --panel: #161c40;
    --muted: #a3a9cc;
    --line: #262d55;
  }
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0 auto;
  max-width: 60rem;
  padding: 0 16px 2rem;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.55 var(--body);
}
a { color: var(--link); text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }
h1, h2 { text-wrap: balance; }
h1 {
  font-family: var(--mono); font-weight: 700; font-stretch: 75%;
  font-size: 2.1rem; line-height: 1.15; margin: 1.5rem 0 0.75rem;
}
h2 { font-size: 1.25rem; font-weight: 650; margin: 1.75rem 0 0.5rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 0.25rem 0.5rem; }

/* The mark: lit coals take the colour, idle coals the fill (static/brand.svg). */
.mark { display: inline-block; flex: none; width: 1.15em; height: 1.15em; color: var(--coal); fill: var(--idle); }

/* The name. One line in the header; stacked in the landing hero, where the shared column is one
   solid gold bar with the letters cut out of it. */
.wm { font-family: var(--mono); font-weight: 700; font-stretch: 75%; letter-spacing: 0; white-space: nowrap; }
/* Martian Mono's g descends 0.22em below the baseline, past the font's own 0.2em descent and
   past the stacked rows' 1.08 line height: the gold is padded below the last g so its tail is
   never cut (measured in Chrome, 2026-10-11). Inline padding does not move the line. */
.wm .g { background: var(--col); color: var(--col-fg); padding-bottom: 0.16em; }
.wm.st { display: inline-grid; line-height: 1.08; }
.wm.st .row { display: flex; }
.wm.st .g { padding-bottom: 0; }
/* an upper g's tail runs into the row below: drawn above that row's gold, not cut by it */
.wm.st .row:not(:last-child) .g { position: relative; z-index: 1; }
.wm.st .row:last-child .g { padding-bottom: 0.22em; }

/* The header */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5em; margin-right: auto;
  font-family: var(--mono); font-weight: 700; font-stretch: 75%; font-size: 1.25rem;
  line-height: 1; color: var(--fg); text-decoration: none;
}
.menu, .langs {
  display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem;
  font-family: var(--mono); font-stretch: 87.5%; font-size: 0.82rem;
}
.menu a, .langs a { color: var(--fg); text-decoration: none; padding-block: 0.15rem; border-bottom: 2px solid transparent; }
.menu a:hover, .langs a:hover { border-bottom-color: var(--line); }
.menu a[aria-current] { border-bottom-color: var(--link); }
.langs span { font-weight: 700; padding-block: 0.15rem; }

/* The landing hero */
.hero { display: grid; gap: 0.9rem; padding: clamp(1.75rem, 6vw, 3.25rem) 0 0.5rem; }
.hero .name { margin: 0; font-size: clamp(2rem, 8vw, 4.5rem); line-height: 1.08; }
.hero .name .wm { white-space: normal; }
.hero .name .wm.st { font-size: clamp(3rem, 17vw, 8rem); white-space: nowrap; }
.strap {
  margin: 0; padding-top: 0.9rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: clamp(1rem, 3.4vw, 1.6rem); line-height: 1.3;
}
/* The speech bubble beside the stacked name (the human, 2026-10-11): the project "talking",
   its tail pointing at the name; below the name, pointing up, when the two do not fit side by
   side. Two triangles make the tail: the gold edge, then the panel inside it. */
.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2.75rem; }
.bubble {
  position: relative; margin: 0; max-width: 19rem; padding: 1rem 1.25rem;
  background: var(--panel); border: 2px solid var(--col); border-radius: 1.25rem;
  font-size: 1.2rem; line-height: 1.4; text-wrap: balance;
}
.bubble::before, .bubble::after { content: ""; position: absolute; width: 0; height: 0; border-style: solid; }
.bubble::before {
  left: -16px; top: 1.25rem;
  border-width: 12px 16px 12px 0; border-color: transparent var(--col) transparent transparent;
}
.bubble::after {
  left: -12px; top: calc(1.25rem + 3px);
  border-width: 9px 12px 9px 0; border-color: transparent var(--panel) transparent transparent;
}
@media (max-width: 52rem) {
  .bubble::before {
    left: 2rem; top: -16px;
    border-width: 0 12px 16px 12px; border-color: transparent transparent var(--col) transparent;
  }
  .bubble::after {
    left: calc(2rem + 3px); top: -12px;
    border-width: 0 9px 12px 9px; border-color: transparent transparent var(--panel) transparent;
  }
}

/* T-195: the explainer video beside the name, 16:9 and as tall as its two rows (2 x 1.08 em of
   the stacked name), ending on the bubble; below the name, full width, on narrow screens.
   hero.js adds "on" (then "playing" or "ended"); without it, or with "off" (no files), the
   figure is today's bubble, plus a link to the video when the script does not run. */
.hero-video { position: relative; margin: 0; min-width: 0; }
.hero-video:not(.on) video, .hero-video:not(.on) .hero-buttons, .hero-replay { display: none; }
.hero-video.on .hero-watch, .hero-video.off .hero-watch { display: none; }
.hero-watch { margin: 0.6rem 0 0; font-size: 0.9rem; }
.hero-video.on { flex: 0 1 calc(3.84 * clamp(3rem, 17vw, 8rem)); }
.hero-frame { position: relative; container-type: inline-size; }
.hero-video.on video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--bg); }
.hero-video.on .bubble { margin: 1.4rem 0 1rem; max-width: none; }
/* the controls: a row under the video, never over it (the human, 2026-10-11) */
.hero-buttons { margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
.hero-full[hidden] { display: none; }
.hero-buttons button {
  font: 600 0.75rem/1 var(--mono); font-stretch: 87.5%; color: var(--fg); cursor: pointer;
  padding: 0.4rem 0.65rem; background: var(--panel); border: 1px solid var(--col); border-radius: 999px;
}
/* T-197: the subtitle picker, a pill like the buttons; the names in the body font (ten scripts) */
.hero-subs-label { display: inline-flex; align-items: center; gap: 0.35rem; font: 600 0.75rem/1 var(--mono); font-stretch: 87.5%; color: var(--muted); }
.hero-subs {
  font: 600 0.8rem/1 var(--body); color: var(--fg); cursor: pointer;
  padding: 0.3rem 0.5rem; background: var(--panel); border: 1px solid var(--col); border-radius: 999px;
}
/* replay: a play triangle in a gold coal, on the bubble's bottom-right corner */
.hero-video.ended .hero-replay {
  display: block; position: absolute; right: -0.9rem; bottom: -0.9rem; width: 2.25rem; height: 2.25rem;
  padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--col); box-shadow: 0 0 0 0.18em var(--bg);
}
.hero-replay::before {
  content: ""; position: absolute; left: 0.82rem; top: 0.6rem; border-style: solid;
  border-width: 0.525rem 0 0.525rem 0.85rem; border-color: transparent transparent transparent var(--col-fg);
}
/* Not on a phone (where the bubble stays below the video, at its own size): the bubble lies over
   the one drawn in the video's last frame (1280 px: twice the page's sizes, 56 px from the right and
   bottom), in units of the video's width; its tail is placed from the bottom, as the drawn one. */
@media (min-width: 30rem) {
@container (min-width: 20rem) {
  .hero-video.on .bubble {
    position: absolute; right: 4.375cqw; bottom: 4.375cqw; width: 47.5cqw; min-height: 18.05cqw;
    margin: 0; padding: 2.5cqw 3.125cqw; border-width: 0.3125cqw; border-radius: 3.125cqw;
    font-size: 3cqw; text-wrap: wrap;
  }
  .hero-video.on.playing .bubble { opacity: 0; }
  .hero-video.on .bubble::before {
    left: -2.5cqw; top: auto; bottom: 10.86cqw;
    border-width: 1.875cqw 2.5cqw 1.875cqw 0; border-color: transparent var(--col) transparent transparent;
  }
  .hero-video.on .bubble::after {
    left: -1.875cqw; top: auto; bottom: 11.33cqw;
    border-width: 1.406cqw 1.875cqw 1.406cqw 0; border-color: transparent var(--panel) transparent transparent;
  }
}
}
@media (prefers-reduced-motion: no-preference) { .hero-video.on .bubble { transition: opacity 0.6s; } }
@media (min-width: 52.0625rem) { .hero-top.with-video { flex-wrap: nowrap; column-gap: 1.5rem; } .hero-top.with-video .name { flex: none; } }
@media (max-width: 52rem) { .hero-video.on { flex-basis: 100%; } }

/* Numbers */
.stats, .facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.6rem; margin: 1.5rem 0; padding: 0;
}
.stats div, .facts div { background: var(--panel); border-radius: 10px; padding: 0.7rem 0.9rem; display: grid; gap: 0.2rem; align-content: start; }
.stats dt, .facts dt { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.75rem; color: var(--muted); }
.stats dd {
  margin: 0; font-family: var(--mono); font-weight: 700; font-stretch: 75%;
  font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums;
}
.facts dd { margin: 0; font-weight: 600; }

/* Calls to action: one gold (dark) or indigo (light) pill, then a plain link */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; }
.button {
  display: inline-block; padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--link); color: var(--on-link); text-decoration: none; font-weight: 600;
}
.button.link { padding-inline: 0; background: none; color: var(--link); text-decoration: underline; font-weight: 500; }

.steps li { margin: 0.25rem 0; }
.note { margin: 0.75rem 0; padding: 0.5rem 1rem; border-left: 3px solid var(--coal); }
.note p { margin: 0 0 0.25rem; }
.note footer { color: var(--muted); font-size: 0.9rem; }
.pending { background: var(--panel); border-radius: 10px; padding: 0.25rem 1rem 0.5rem; }

/* The leaderboard: the landing page's top five and the Hours page's podium. The leader carries
   the gold coal and the most weight. */
.coal {
  display: inline-block; flex: none; width: 0.8em; height: 0.8em; border-radius: 50%;
  background: var(--col); box-shadow: 0 0 0 0.18em var(--bg);
}
.place { font-family: var(--mono); font-weight: 700; font-stretch: 75%; color: var(--coal); font-variant-numeric: tabular-nums; }
.who { font-family: var(--mono); font-weight: 700; font-stretch: 87.5%; color: var(--fg); }
.hrs { font-family: var(--mono); font-weight: 700; font-stretch: 75%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub { color: var(--muted); font-size: 0.85rem; }
.top5 { list-style: none; margin: 0.75rem 0; padding: 0; display: grid; gap: 0.4rem; }
.top5 li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem;
  padding: 0.55rem 0.9rem; border-radius: 10px; background: var(--panel);
}
.top5 .place { min-width: 1.2em; }
.top5 .sub { flex-basis: 100%; padding-left: 1.95em; }
.top5 li.lead1 { align-items: center; padding-block: 0.9rem; font-size: 1.3rem; box-shadow: inset 0 0 0 2px var(--col); }
.top5 li.lead1 .sub { font-size: 0.85rem; padding-left: 0; }
.podium {
  list-style: none; margin: 1.25rem 0 0.75rem; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 0.5rem;
}
.podium li {
  display: grid; justify-items: center; align-content: start; gap: 0.25rem; text-align: center;
  padding: 0.9rem 0.5rem 1rem; border-radius: 12px 12px 4px 4px; background: var(--panel); min-width: 0;
}
.podium .who { overflow-wrap: anywhere; }
.podium .place { font-size: 2rem; line-height: 1; }
.podium .p1 { order: 2; min-height: 12rem; background: var(--col); color: var(--col-fg); }
.podium .p1 .place, .podium .p1 .who, .podium .p1 .sub { color: var(--col-fg); }
.podium .p1 .place { font-size: 2.8rem; }
.podium .p1 .coal { background: var(--col-fg); box-shadow: none; width: 1.1rem; height: 1.1rem; }
.podium .p1 .hrs { font-size: 1.4rem; }
.podium .p2 { order: 1; min-height: 9.5rem; }
.podium .p3 { order: 3; min-height: 8rem; }
/* T-187: the newcomers board, lighter than the top five: a rule per row, no panels */
.newcomers { list-style: none; margin: 0.75rem 0; padding: 0; }
.newcomers li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem;
  padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--line);
}
.newcomers .place { min-width: 1.6em; }
.newcomers .sub { margin-left: auto; }
.nudges { list-style: none; margin: 0.75rem 0; padding: 0.6rem 0.9rem; border-left: 3px solid var(--col); display: grid; gap: 0.3rem; }

/* Tables: the Hours page's ranked table and the "Not ranked" one */
table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { text-align: start; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); }
thead th {
  font-family: var(--mono); font-stretch: 87.5%; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num { font-family: var(--mono); font-stretch: 87.5%; }
.board tbody td:first-child { font-family: var(--mono); font-weight: 700; font-stretch: 75%; color: var(--coal); }
.others th[scope="row"] { font-weight: 500; color: var(--muted); }
tr.group th, tr.group td { color: var(--muted); }
abbr { text-decoration: none; font-family: var(--mono); font-stretch: 87.5%; font-size: 0.85em; }
.bars { list-style: none; padding: 0; }
.bars li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.3rem 0; }
.bars meter {
  flex: 1 1 8rem; height: 0.6rem; appearance: none; border: 0; border-radius: 999px;
  background: var(--idle);
}
.bars meter::-webkit-meter-bar { background: var(--idle); border: 0; border-radius: 999px; }
.bars meter::-webkit-meter-optimum-value { background: var(--coal); border-radius: 999px; }
.bars meter::-moz-meter-bar { background: var(--coal); border-radius: 999px; }

.talks { list-style: none; padding: 0; }
.talks li { padding: 0.5rem 0 0.75rem; border-bottom: 1px solid var(--line); }
.talks h2 { margin: 0.5rem 0 0.25rem; }
.meta, .hint, .summary { color: var(--muted); }
.foot {
  margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}

/* T-190: the request forms. No script: the server sends a bad field back to #form, whose
   :target shows the message; the honeypot field is off screen and out of the tab order. */
.request { max-width: 36rem; margin: 1rem 0; }
.request .field { display: grid; gap: 0.25rem; margin: 0.75rem 0; }
.request label { font-weight: 600; }
.request input, .request textarea {
  font: inherit; color: var(--fg); background: var(--bg); width: 100%;
  padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 8px;
}
.request button { font: inherit; border: 0; cursor: pointer; }
/* T-192: the invite form's agreement tick, the box beside its label. */
.request .tick { display: flex; gap: 0.5rem; align-items: baseline; }
.request .tick input { width: auto; flex: none; }
.request .tick label { font-weight: 400; }
.request .hint { font-size: 0.9rem; }
.form-error {
  display: none; margin: 0; padding: 0.5rem 0.9rem; border-radius: 8px;
  background: var(--panel); border-left: 3px solid var(--col); font-weight: 600;
}
#form:target .form-error { display: block; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
