/* The look of ogas.space: the colours of the workshop of O.G.A.S. — its dark
   plum-black, its blues —, light or dark as the system of the reader is. No
   outside fonts: the letters are those of the reader's system. */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #1f1b20;
  --muted: #5d5a63;
  --line: #dcd9e0;
  --accent: #3d4b69;
  --accent-soft: #e4e8f1;
  --on-accent: #fefefe;
  --warn: #8c3636;
  --warn-soft: #f6e4e4;
  --done: #485c30;
  --done-soft: #e6eedd;
  --radius: 0.6rem;
  --gap: 1rem;
  --wide: 72rem;
  --prose: 46rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1b20;
    --surface: #26232a;
    --ink: #f2f1f4;
    --muted: #aaa6b2;
    --line: #3d3a42;
    --accent: #7684a2;
    --accent-soft: #2f3546;
    --on-accent: #1f1b20;
    --warn: #e08a8a;
    --warn-soft: #3a2427;
    --done: #a6c48a;
    --done-soft: #29321f;
  }
}

* { box-sizing: border-box; }
/* What a page hides stays hidden, whatever its own display says. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
@media (prefers-color-scheme: dark) { a { color: #a9b6d4; } }
img { max-width: 100%; height: auto; }
code { font: 0.9em/1.4 ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, monospace; overflow-wrap: anywhere; }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-top: 0.6em; }
:focus-visible { outline: 0.15rem solid var(--accent); outline-offset: 0.15rem; }

.skip { position: absolute; left: -100vw; }
.skip:focus { left: 1rem; top: 1rem; z-index: 2; background: var(--surface); padding: 0.5rem 1rem; }

/* Header: the mark, the sections, the other language. */
.top { background: #1f1b20; color: #fefefe; border-bottom: 0.25rem solid #3d4b69; }
.top-in { max-width: var(--wide); margin: 0 auto; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: 0.08em; }
.brand .mark { width: 2.4rem; height: 2.4rem; }
.mark path { stroke-width: 1.6; }
.nav { display: flex; gap: 0.25rem 1rem; flex-wrap: wrap; flex: 1; }
.nav a, .lang { color: #d9deea; text-decoration: none; padding: 0.2rem 0; border-bottom: 0.15rem solid transparent; }
.nav a:hover, .lang:hover { color: #fefefe; }
.nav a[aria-current="page"] { color: #fefefe; border-bottom-color: #7684a2; }
.lang { font-size: 0.95rem; }
@media (max-width: 40rem) {
  .nav { order: 3; flex-basis: 100%; }
  .nav a { white-space: nowrap; }
  .lang { margin-left: auto; }
}

.main { max-width: var(--wide); margin: 0 auto; padding: 1rem 1rem 3rem; }
.prose { max-width: var(--prose); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: var(--prose); }
.quiet { color: var(--muted); font-size: 0.95rem; }

/* The first screen: the mark large beside the name. */
.hero { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: 2rem; align-items: center; padding: 2rem 0 1rem; }
.hero-mark { color: var(--accent); }
.hero-mark .mark { width: 100%; height: auto; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: 0.06em; margin: 0; }
.hero-acts { display: flex; gap: 0.75rem; flex-wrap: wrap; }
@media (max-width: 40rem) { .hero { grid-template-columns: 1fr; gap: 1rem; } .hero-mark { width: 8rem; } }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0.5rem 1.2rem;
  border: 0.1rem solid var(--accent); border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button.ghost { background: transparent; color: var(--ink); }
.button:hover { filter: brightness(1.08); }
.button[disabled], fieldset[disabled] .button { opacity: 0.55; cursor: not-allowed; }

.notice { background: var(--accent-soft); border-left: 0.3rem solid var(--accent); padding: 0.75rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: var(--prose); }
.notice.warn { background: var(--warn-soft); border-left-color: var(--warn); }
.badge { display: inline-block; padding: 0 0.5rem; border-radius: 1rem; font-size: 0.85rem; background: var(--accent-soft); color: var(--ink); }
.badge.done { background: var(--done-soft); color: var(--done); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

.download { background: var(--surface); border: 0.0625rem solid var(--line); border-radius: var(--radius); padding: 0.5rem 1.5rem 1.5rem; margin: 2rem 0; }
.files { list-style: none; padding: 0; display: grid; gap: 0.75rem; }
.files li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.sum { flex-basis: 100%; color: var(--muted); font-size: 0.8rem; }

/* Cards: publications, videos, things of the showcase. */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--gap); }
.card { background: var(--surface); border: 0.0625rem solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card > a, .card.thing { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem; color: inherit; text-decoration: none; height: 100%; }
.card > a:hover { background: var(--accent-soft); }
.card img { border-radius: calc(var(--radius) / 2); aspect-ratio: 16 / 9; object-fit: cover; }
.facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0.5rem 0 0; font-size: 0.9rem; }
.facts div { display: flex; gap: 0.35rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* A video: its room, then the hosting sites to choose from. */
.player { max-width: 56rem; margin: 1rem 0 2rem; }
.player-room { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background: #0d0b0e; border: 0.0625rem solid var(--line); color: #d9deea; border-radius: var(--radius); overflow: hidden; text-align: center; padding: 1rem; }
.player-room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.player-room p { position: relative; margin: 0; }
.player-room iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-hosts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.player-hosts .button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.gallery { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: var(--gap); }
.gallery figure { margin: 0; background: var(--surface); border: 0.0625rem solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery figcaption { padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; }

/* Requests, reviews and bugs; what people wrote keeps its lines. */
.requests { list-style: none; padding: 0; display: grid; gap: var(--gap); }
.request { background: var(--surface); border: 0.0625rem solid var(--line); border-radius: var(--radius); padding: 0.5rem 1.25rem 1rem; }
.request h3 { margin-top: 0.25rem; }
.said { white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { border-left: 0.2rem solid var(--line); padding-left: 0.75rem; margin-left: 0.25rem; }

table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 0.4rem 0.75rem; border-bottom: 0.0625rem solid var(--line); vertical-align: top; }

.foot { border-top: 0.0625rem solid var(--line); }
.foot-in { max-width: var(--wide); margin: 0 auto; padding: 1.5rem 1rem 2rem; font-size: 0.95rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 0.75rem; }

/* A thing of the showcase on its own page; its known and solved bugs side
   by side where there is room. */
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 var(--gap); }
.thing-picture { border-radius: var(--radius); margin: 0.5rem 0 1rem; max-height: 22rem; object-fit: cover; }



/* The parts of the showcase as a row of tabs, each with how many it holds. */
.subnav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 1.25rem; padding-bottom: 0.5rem; border-bottom: 0.0625rem solid var(--line); }
.subnav a { text-decoration: none; color: var(--ink); padding: 0.2rem 0; border-bottom: 0.15rem solid transparent; }
.subnav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }
.subnav .count, .part-count { color: var(--muted); }
.parts .part-count { font-size: 2rem; font-weight: 700; color: var(--accent); }
/* Above the things of a part: find, order, the video memory of the reader. */
.shelf-tools { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end; margin: 0 0 1rem; }
.shelf-tools .tool { display: grid; gap: 0.25rem; }
.shelf-tools .tool > span { font-size: 0.9rem; color: var(--muted); }
.shelf-tools .tool.check { display: flex; align-items: center; gap: 0.5rem; padding-bottom: 0.5rem; }
.shelf-tools .tool.check > span { color: var(--ink); font-size: 1rem; }
.shelf-tools input, .shelf-tools select { padding: 0.5rem 0.75rem; font: inherit; color: var(--ink); background: var(--surface); border: 0.0625rem solid var(--line); border-radius: calc(var(--radius) / 1.5); }
.shelf-tools input[type="number"] { width: 6rem; }
.shelf-group h2 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.page-acts { margin: 1rem 0; }
