/* SPDX-FileCopyrightText: 2026 Dominik Schwimmbeck */
/* SPDX-License-Identifier: GPL-3.0-or-later */

/* Fonts ship with the site, no requests to font services. */
@font-face { font-family: "Mona Sans"; font-style: normal; font-display: swap; font-weight: 200 900; font-stretch: 75% 125%; src: url("fonts/mona-sans-normal.woff2") format("woff2"); }
@font-face { font-family: "Mona Sans"; font-style: italic; font-display: swap; font-weight: 200 900; font-stretch: 75% 125%; src: url("fonts/mona-sans-italic.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("fonts/newsreader-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-display: swap; font-weight: 200 800; src: url("fonts/newsreader-italic.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("fonts/geist.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("fonts/geist-mono.woff2") format("woff2"); }

:root {
  /* The graphite of the app, lit by Velvet Static, the game of the screenshots
     and the hero art, as the app takes its accent from the game in front. The
     app's rule in lib/theme.ts gave the accent from that game's cover. */
  --ink: #101112; --surface: #171819; --raised: #1d1e20; --hairline: #2a2b2d; --rule: #202224;
  --text: #f1f2f2; --soft: #b5b7bb; --faint: #8a8c90;
  --violet: oklch(0.678 0.107 346); --violet-hover: oklch(0.748 0.082 346); --violet-ink: oklch(0.183 0.040 346);
  --amber: #f0b45b;
  /* Edges of form fields, 3:1 against the ground as WCAG asks of controls. */
  --field-edge: #66686c;
  --display: "Mona Sans", system-ui, sans-serif; --prose: "Newsreader", Georgia, serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  /* Marks of the sample games, as the app gives them in the journal: the
     main color of the cover, blending into the second for two-colored art. */
  --kessler-line: linear-gradient(90deg, oklch(0.72 0.111 45), oklch(0.72 0.111 45));
  --velvet-static: linear-gradient(90deg, oklch(0.72 0.162 346), oklch(0.72 0.162 346));
  --wild-ante: linear-gradient(90deg, oklch(0.72 0.142 76), oklch(0.72 0.142 76));
}
/* A guide takes the color of its picture, as a game page in the app takes
   its cover's. The app's rule in lib/theme.ts gave these from the art. */
body:has(.docs-article img[src^="/art/desk.jpg"]) { --violet: oklch(0.678 0.088 349); --violet-hover: oklch(0.748 0.068 349); --violet-ink: oklch(0.183 0.040 349); }
body:has(.docs-article img[src^="/art/handheld.jpg"]) { --violet: oklch(0.678 0.083 337); --violet-hover: oklch(0.748 0.064 337); --violet-ink: oklch(0.183 0.040 337); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
/* Keeps iOS from enlarging the text when a phone turns sideways. */
html { background: var(--ink); color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--text); background: var(--ink); line-height: 1.55; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
/* One focus ring for every link, button and control a keyboard reaches. */
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
/* The type of the app: Mona Sans wide and heavy for titles, Newsreader for
   sentences, and small labels in sentence case. */
.font-display { font-family: var(--display); font-stretch: 125%; font-weight: 760; letter-spacing: -0.035em; }
.font-prose { font-family: var(--prose); font-weight: 420; letter-spacing: -0.005em; }
.label-small { font-size: 12px; font-weight: 500; color: var(--faint); }
.mono { font-family: var(--mono); }

header { border-bottom: 1px solid var(--rule); }
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
/* As in the app: frame, hands and name in the accent, the pivot in the text color. */
.brand { display: flex; align-items: center; gap: 10px; color: var(--violet); text-decoration: none; }
.brand .pivot { fill: var(--text); }
.brand span { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 24px; letter-spacing: -0.03em; }
nav { display: flex; gap: 24px; font-size: 14px; }
nav a { color: var(--faint); text-decoration: none; }
nav a:hover { color: var(--text); }
nav.top a { padding: 12px 0; }

/* The vista runs behind the header and the hero and fades into the ground. */
.landing header { position: absolute; inset: 0 0 auto; z-index: 1; border-bottom-color: transparent; }
.hero { position: relative; isolation: isolate; padding: 168px 0 72px; border-bottom: 1px solid var(--rule); }
.hero-art { position: absolute; inset: 0 0 auto; z-index: -1; height: min(800px, 58vw); overflow: hidden; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 38% 22%; }
.hero-art::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(16 17 18 / 0.55), rgb(16 17 18 / 0) 160px),
    linear-gradient(90deg, var(--ink) 6%, rgb(16 17 18 / 0.72) 36%, rgb(16 17 18 / 0) 66%),
    linear-gradient(0deg, var(--ink) 4%, rgb(16 17 18 / 0) 46%); }
.hero h1 { margin-top: 18px; max-width: 9em; font-size: clamp(40px, 7vw, 84px); line-height: 0.97; }
.hero p { margin-top: 24px; max-width: 620px; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.35; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; height: 44px; padding: 0 22px; border: 0; border-radius: 22px; font-family: inherit; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.button.solid { background: var(--violet); color: var(--violet-ink); }
.button.solid:hover { background: var(--violet-hover); }
.button.line { border: 1px solid var(--hairline); color: var(--text); font-weight: 500; }
.button.line:hover { background: var(--raised); }

.journal { padding: 56px 0; border-bottom: 1px solid var(--rule); }
.day { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
.day h2 { font-size: 36px; line-height: 1; }
.day .date { margin-top: 8px; }
.day .total { margin-top: 14px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.day .total small { margin-left: 1px; font-size: 0.62em; font-weight: 500; }
.strip { position: relative; height: 10px; border-radius: 5px; background: var(--raised); }
.strip span { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.strip .kessler-line { background: var(--kessler-line); }
.strip .velvet-static { background: var(--velvet-static); }
.strip .wild-ante { background: var(--wild-ante); }
.entry em.kessler-line { background-image: var(--kessler-line); }
.entry em.velvet-static { background-image: var(--velvet-static); }
.entry em.wild-ante { background-image: var(--wild-ante); }
.entry em[class] { -webkit-background-clip: text; background-clip: text; color: transparent; }
.ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; color: var(--faint); }
.entry { display: flex; align-items: baseline; gap: 20px; margin-top: 18px; }
.entry .when { width: 132px; flex-shrink: 0; font-size: 13px; color: var(--faint); }
.entry .body { flex: 1; min-width: 0; }
.entry .line { font-size: 24px; line-height: 1.25; }
.entry .meta { margin-top: 3px; font-size: 13px; color: var(--faint); }
.entry .meta b { font-weight: 400; color: var(--soft); }
.badge { flex-shrink: 0; border: 1px solid; border-radius: 11px; padding: 2px 9px; font-size: 12px; font-weight: 500; }
.badge.local { color: var(--faint); }
.badge.suspicious { color: var(--amber); }

section.doc { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px 48px; padding: 56px 0; border-bottom: 1px solid var(--rule); }
section.doc h2 { font-size: 30px; line-height: 1.1; }
section.doc .lead { margin-top: 10px; font-size: 14px; color: var(--faint); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.row:first-child { padding-top: 0; }
.row:last-child { border-bottom: 0; }
.buttons { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 8px; }
.row h3 { font-size: 15px; font-weight: 500; }
.row p { margin-top: 4px; max-width: 560px; font-size: 14px; color: var(--faint); }
.release { margin-top: 14px; max-width: 260px; font-size: 14px; color: var(--soft); }

/* Text pages: the legal pages and the changelog. */
.page { padding: 64px 0 80px; border-bottom: 1px solid var(--rule); }
.prose { max-width: 720px; }
.prose h1 { font-family: var(--display); font-stretch: 125%; font-weight: 760; font-size: clamp(36px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.prose h2 { font-family: var(--display); font-stretch: 125%; font-weight: 760; font-size: 26px; margin-top: 44px; letter-spacing: -0.02em; }
.prose h3 { font-size: 15px; font-weight: 600; margin-top: 28px; }
.prose p, .prose ul { margin-top: 12px; font-size: 15px; color: var(--soft); }
.prose ul { padding-left: 20px; }
.prose li { margin-top: 6px; }
.prose a { color: var(--violet); }
.prose a:hover { color: var(--violet-hover); }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { font-family: var(--mono); font-size: 13px; }

footer { padding: 40px 0 56px; font-size: 13px; color: var(--faint); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer nav { flex-wrap: wrap; gap: 20px; font-size: 13px; }
/* A taller tap area that leaves the layout as it is. */
footer nav a { padding: 10px 0; margin: -10px 0; }
nav a[aria-current="page"] { color: var(--text); }

/* The app as it looks, under the hero. The screenshots bring their own round
   corners and the window's border in the accent of the page. */
.shot { margin-top: 56px; }
.shot img { display: block; width: 100%; height: auto; box-shadow: 0 48px 120px -48px rgb(0 0 0 / 0.8); }
/* The demo in place of the picture, which draws the border itself. */
.shot iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 12px; background: var(--ink);
  box-shadow: 0 48px 120px -48px rgb(0 0 0 / 0.8); }
.demo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.demo p { flex: 1 1 320px; font-size: 14px; color: var(--faint); }
.demo a { color: var(--soft); }
.doc .lead a { color: var(--violet); text-decoration: none; }
.doc .lead a:hover { color: var(--violet-hover); }

/* Documentation: sidebar, text and the sections of the page. */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.docs.has-toc { grid-template-columns: 220px minmax(0, 1fr) 196px; gap: 56px; }
.docs-side, .docs-toc { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 56px 0 48px; }
.docs-page header .wrap, .docs-page footer .wrap { max-width: 1280px; }
.docs-side nav { display: block; }
.docs-nav-group + .docs-nav-group { margin-top: 28px; }
.docs-side ul, .docs-toc ol { list-style: none; margin-top: 10px; }
.docs-side li a { display: block; padding: 6px 0 6px 14px; border-left: 1px solid var(--rule); font-size: 14px; line-height: 1.4; color: var(--faint); text-decoration: none; }
.docs-side li a:hover { color: var(--text); }
.docs-side li a[aria-current="page"] { color: var(--text); font-weight: 500; border-left-color: var(--violet); }
.docs-menu { display: none; }
.docs-main { min-width: 0; padding: 56px 0 88px; }
.docs-article { max-width: 720px; }
.docs-article .crumb a { color: inherit; text-decoration: none; }
.docs-article .crumb a:hover { color: var(--text); text-decoration: none; }
.crumb span { margin: 0 6px; color: var(--hairline); }
.docs-article h1 { margin-top: 16px; font-family: var(--display); font-stretch: 125%; font-weight: 760; font-size: clamp(36px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.02em; }
.docs-article .lead { margin-top: 18px; font-family: var(--prose); font-weight: 420; font-size: clamp(19px, 2.2vw, 22px); line-height: 1.42; letter-spacing: -0.01em; color: var(--soft); }
.docs-article h2 { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); font-family: var(--display); font-stretch: 125%; font-weight: 760; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; scroll-margin-top: 24px; }
.docs-article h3 { margin-top: 34px; font-size: 17px; font-weight: 600; scroll-margin-top: 24px; }
.docs-article h4 { margin-top: 26px; font-size: 13px; font-weight: 500; color: var(--faint); }
.docs-article p, .docs-article ul, .docs-article ol, .docs-article dl, .docs-article .table, .docs-article pre, .docs-article blockquote { margin-top: 14px; }
.docs-article p, .docs-article li { font-size: 16px; line-height: 1.7; color: var(--soft); }
.docs-article ul, .docs-article ol { padding-left: 22px; }
.docs-article li + li { margin-top: 6px; }
.docs-article li::marker { color: var(--faint); }
.docs-article ol li::marker { font-family: var(--mono); font-size: 13px; }
.docs-article a { color: var(--violet); text-decoration: none; }
.docs-article a:hover { color: var(--violet-hover); text-decoration: underline; text-underline-offset: 3px; }
.docs-article strong { color: var(--text); font-weight: 600; }
.docs-article .anchor { margin-left: 6px; color: var(--hairline); font-weight: 400; opacity: 0; }
.docs-article .anchor:is(:hover, :focus-visible) { color: var(--violet); text-decoration: none; }
.docs-article :is(h2, h3, h4):hover .anchor, .docs-article .anchor:focus-visible { opacity: 1; }
.docs-article code { padding: 1px 6px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); font-family: var(--mono); font-size: 0.84em; color: var(--text); overflow-wrap: anywhere; }
.docs-article pre { padding: 16px 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); overflow-x: auto; }
.docs-article pre code { padding: 0; border: 0; background: none; font-size: 13px; line-height: 1.6; overflow-wrap: normal; }
.docs-article kbd { display: inline-block; min-width: 22px; padding: 0 6px; border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: 6px; background: var(--raised); font-family: var(--mono); font-size: 12px; line-height: 20px; text-align: center; color: var(--text); }
.docs-article .table { overflow-x: auto; }
.docs-article td code { white-space: nowrap; overflow-wrap: normal; }
.docs-article table { width: 100%; border-collapse: collapse; font-size: 15px; }
.docs-article th { padding: 0 20px 10px 0; border-bottom: 1px solid var(--hairline); font-size: 12px; font-weight: 500; text-align: left; color: var(--faint); white-space: nowrap; }
.docs-article td { padding: 12px 20px 12px 0; border-bottom: 1px solid var(--rule); line-height: 1.55; vertical-align: top; color: var(--soft); }
.docs-article td:first-child { color: var(--text); font-weight: 500; }
.docs-article dl { border-top: 1px solid var(--rule); }
.docs-article dl > div { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 6px 28px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.docs-article dt { font-size: 15px; font-weight: 500; line-height: 1.6; color: var(--text); }
.docs-article dd { grid-column: 2; font-size: 15px; line-height: 1.6; color: var(--soft); }
.docs-article blockquote { padding: 2px 0 2px 18px; border-left: 1px solid var(--hairline); }
.docs-article blockquote p:first-child { font-family: var(--prose); font-weight: 420; font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; color: var(--text); }
.docs-article blockquote p + p { margin-top: 4px; font-size: 14px; color: var(--faint); }
.callout { margin-top: 20px; padding: 14px 20px 16px; border-left: 2px solid var(--violet); border-radius: 0 12px 12px 0; background: linear-gradient(90deg, color-mix(in srgb, var(--violet) 9%, transparent), color-mix(in srgb, var(--violet) 2%, transparent)); }
.callout .label-small { color: var(--violet); }
.callout p:first-of-type { margin-top: 6px; }
.callout.caution { border-left-color: var(--amber); background: linear-gradient(90deg, rgba(240, 180, 90, 0.09), rgba(240, 180, 90, 0.02)); }
.callout.caution .label-small { color: var(--amber); }
.docs-article figure { margin-top: 28px; }
.docs-article figure img { display: block; width: 100%; height: auto; border: 1px solid var(--hairline); border-radius: 12px; }
.docs-article figure img[src^="/screenshots/"] { border: 0; border-radius: 0; }
.docs-article figcaption { margin-top: 10px; font-size: 13px; color: var(--faint); }
.toc-inline { display: none; margin-top: 28px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.toc-inline summary, .docs-menu summary { cursor: pointer; list-style: none; }
.toc-inline summary { padding: 12px 0; }
.toc-inline summary::-webkit-details-marker, .docs-menu summary::-webkit-details-marker { display: none; }
.toc-inline summary::after, .docs-menu summary::after { content: "+"; float: right; font-family: var(--mono); font-size: 14px; color: var(--faint); }
.toc-inline[open] summary::after, .docs-menu[open] summary::after { content: "\2212"; }
.toc-inline ol { list-style: none; margin-top: -4px; padding: 0 0 12px; }
.toc-inline li { margin-top: 0; font-size: 14px; }
.toc-inline .toc-3 { padding-left: 14px; }
.toc-inline a { display: block; padding: 4px 0; color: var(--soft); }
.docs-toc ol { border-left: 1px solid var(--rule); }
.docs-toc a { display: block; margin-left: -1px; padding: 4px 0 4px 14px; border-left: 1px solid transparent; font-size: 13px; line-height: 1.4; color: var(--faint); text-decoration: none; }
.docs-toc .toc-3 a { padding-left: 26px; }
.docs-toc a:hover { color: var(--text); }
.docs-toc a.active { color: var(--text); border-left-color: var(--violet); }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 720px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--rule); }
.pager a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.pager .next { grid-column: 2; text-align: right; }
.pager-title { font-family: var(--display); font-stretch: 125%; font-weight: 760; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.pager a:hover .pager-title { color: var(--violet); }
.edit { margin-top: 28px; font-size: 13px; }
.edit a { color: var(--faint); }
.edit a:hover { color: var(--text); }
.docs-article .docs-group { margin-top: 44px; }
.docs-article .docs-group h2 { margin: 0; padding: 0; border: 0; font-family: var(--sans); font-stretch: 100%; font-size: 12px; font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.docs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 12px; }
.docs-article .docs-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 0 20px; border-top: 1px solid var(--rule); color: inherit; text-decoration: none; }
.docs-card-title { font-family: var(--display); font-stretch: 125%; font-weight: 760; font-size: 19px; line-height: 1.2; letter-spacing: -0.01em; color: var(--text); }
.docs-card:hover .docs-card-title { color: var(--violet); }
.docs-card-lead { font-size: 14px; line-height: 1.5; color: var(--faint); }

/* The app's smallest window does not fit narrower screens, which keep the
   picture, also when the window shrinks with the demo open. */
@media (max-width: 1099px) {
  .demo, .shot iframe { display: none; }
  .shot img[hidden] { display: block !important; }
}

@media (max-width: 1180px) {
  .docs.has-toc { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .toc-inline { display: block; }
}

@media (max-width: 860px) {
  .docs, .docs.has-toc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .docs-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .docs-side .docs-nav { display: none; }
  .docs-menu { display: block; border-bottom: 1px solid var(--rule); }
  .docs-menu summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; }
  .docs-menu summary::after { margin-left: auto; }
  .docs-menu-current { font-size: 14px; font-weight: 500; }
  .docs-menu nav { padding: 4px 0 20px; }
  .docs-main { padding: 32px 0 64px; }
  .docs-article h2 { margin-top: 44px; padding-top: 24px; }
  .docs-article dl > div { grid-template-columns: minmax(0, 1fr); }
  .docs-article dd { grid-column: 1; }
  .docs-cards { grid-template-columns: minmax(0, 1fr); }
  .pager { margin-top: 56px; }
}

@media (max-width: 760px) {
  .wrap, .docs { padding: 0 16px; }
  nav.top { gap: 18px; }
  nav.top a:not(.keep) { display: none; }
  .shot { margin-top: 40px; }
  .hero { padding: 212px 0 48px; }
  .hero-art { height: 520px; }
  .hero-art img { object-position: 76% 0; }
  .hero-art::after { background: linear-gradient(180deg, rgb(16 17 18 / 0.5), rgb(16 17 18 / 0.3) 30%, rgb(16 17 18 / 0.8) 72%, var(--ink)); }
  .day, section.doc { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
  .entry .when { grid-column: 1 / -1; width: auto; }
  .entry .line { font-size: 21px; }
  .row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: 1; }
}

/* The narrowest phones, like a folded Galaxy Fold. */
@media (max-width: 340px) {
  .brand { gap: 8px; }
  .brand svg { width: 24px; height: 24px; }
  .brand span { font-size: 20px; }
  nav.top { gap: 14px; }
  footer nav { column-gap: 16px; }
  .docs-article h1 { font-size: 30px; }
}
