/* dog-watch.net: the mess deck's notice board, drawn as the game's console
   in The Dog Watches, Dog Watch's own colours: Luna's purple made flatter,
   a dusk sky, with the titles in amber, the sunset over the mess table.
   They come from the shared palettes at the site's build, so a change to
   the palette reaches the site with the next refresh. One
   face, JetBrains Mono, as the game draws in, served from this site (no
   font service is asked for it). Sections are the game's windows: a frame
   with its title set into the top edge. A sibling of ghost-boat.com: the
   same console, in the dog watch's colours. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}
/* The card art's braille, from a font of our own: the braille block of
   DejaVu Sans, narrowed to the 0.6 em cell (assets/fonts/DejaVu-LICENSE.txt).
   Without it a Mac draws braille in Apple's braille font, which shows the
   dots that are not raised as hollow rings, so every card showed stray
   dots. Only U+2800 to U+28FF come from it, and it stands second in the
   font list, after JetBrains Mono (which has no braille), so the ch unit
   that sizes every cell is still JetBrains Mono's 0.6 em: first, it made
   Safari size the cells by a font with no "0", and the frames came out
   the wrong size (Anthony, 2026-12-03: "the frames on the website are
   wrongly sized"). */
@font-face {
  font-family: "Dog Watch Braille";
  src: url("../fonts/DogWatchBraille.woff2") format("woff2");
  unicode-range: U+2800-28FF;
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0d090f;
  --frame: #3b2a47;
  --faint: #746383;
  --label: #a794bc;   /* the site's own soft lilac for names and captions, not a token: the palette's labels are amber, kept here for titles (--accent), so the page is not all amber */
  --text: #bfabd5;    /* the site's own body text, not a token: Luna's at the same flatter saturation */
  --value: #d7c2ed;
  --caution: #fff59a;
  --accent: #f5a524;  /* the palette's amber labels, on titles and the tagline: the sunset of the dog watches, the early evening, and purple's complement (Anthony, 2026-12-02). Was Karly's green (#5ec27f, "more green"). */
  --red: #ff4466;
  --blue: #5aa9ff;
  /* Two shades between the ground and the frames, for code and table rows. */
  --well: color-mix(in srgb, var(--frame) 40%, var(--bg));
  --stripe: color-mix(in srgb, var(--frame) 21%, var(--bg));
  --mono: "JetBrains Mono", "Dog Watch Braille", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.65 var(--mono);
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--value); color: var(--bg); }

a { color: var(--value); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 0.12em; text-underline-offset: 0.2em; }
a:hover { color: var(--caution); text-decoration-color: var(--caution); }
:focus-visible { outline: 2px solid var(--caution); outline-offset: 2px; }

strong { color: var(--value); font-weight: 700; }
em { color: var(--value); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); color: var(--caution); padding: 4px 8px; z-index: 2; }

/* The console: one column. */
.console { max-width: 62rem; margin: 0 auto; padding: 0 16px; container-type: inline-size; }

/* The top line: the mark, and the papers as the game's key bar. */
.bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3em 2ch;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--frame);
}
.mark { color: var(--value); font-weight: 700; letter-spacing: 0.3em; text-decoration: none; }
.bar nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.2em 2.5ch; }
.bar nav a { color: var(--label); text-decoration: none; }
.bar nav a:hover { color: var(--value); }
kbd {
  font: inherit; font-weight: 700; color: var(--caution);
  margin-right: 0.6ch;
}
p kbd, li kbd, dd kbd, figcaption kbd { margin-right: 0; }

/* The game's screens, as text. Each <pre> is one frame of the game's own
   drawing (scripts/screens.py), --cols cells wide, scaled so its cells
   fill the column it stands in. JetBrains Mono's advance is 0.6 em. Below
   about 7 px a screen stops shrinking and pans sideways in its frame. */
.shot { container-type: inline-size; margin: 1.6em 0 0; }
.screen {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(7px, calc((100cqi - 2px) / (var(--cols) * 0.6)), 22px);
  line-height: 1.2;
  white-space: pre;
  overflow-x: auto;
  width: fit-content; max-width: 100%;
  border: 1px solid var(--frame);
  /* Keep each advance at exactly 0.6 em; Chrome on Linux otherwise rounds
     each to a whole pixel and a wide frame comes out too wide. */
  text-rendering: geometricPrecision;
  font-variant-ligatures: none;
}
/* Every styled run is a block one line tall, so painted rows meet with no
   seam (block glyphs arrive painted; see screens.py). */
.screen span { display: inline-block; height: 1.2em; vertical-align: top; }
/* A glyph the font lacks (the suits, the braille pips) comes from another
   font, often wider. Each sits in a box one cell wide, centred, so the rest
   of its line stays on the grid. */
.screen .g { display: inline-flex; justify-content: center; width: 1ch; overflow: hidden; }
.shot figcaption, figure figcaption { color: var(--label); font-size: 0.9em; margin-top: 0.4em; }

/* The title screen: the wordmark and the mess table, from the game's own
   title, and under it the tagline. On a phone the table hangs under the
   wordmark, each scaled to the full width. */
.hero { margin: 28px 0 0; }
.hero .screen { border: 0; overflow: hidden; font-size: calc((100cqi - 1px) / (var(--cols) * 0.6)); }
.hero .narrow { display: none; }
.tagline { margin: 0.9em 0 0; color: var(--accent); font-style: italic; font-size: 1.2em; line-height: 1.45; }
.ready { color: var(--label); margin: 0.3em 0 0; font-size: 0.93em; }

/* A window: the frame, with its title set into the top edge. */
.window {
  position: relative;
  border: 1px solid var(--frame);
  padding: 1.5em 3ch 1.1em;
  margin: 2.6em 0;
}
.window > h2 {
  position: absolute; top: 0; left: 2ch;
  transform: translateY(-50%);
  margin: 0; padding: 0 1ch;
  background: var(--bg);
  color: var(--accent);
  font-size: 1em; font-weight: 700; line-height: 1.4;
  letter-spacing: 0.08em; text-transform: uppercase;
  max-width: calc(100% - 4ch);
}
.window p, .window ul, .window dl { max-width: 72ch; }
.window > :last-child { margin-bottom: 0; }

/* The notice board's notice is pinned in the caution colour, and only it. */
.notice { border-color: var(--caution); }
.notice > h2 { color: var(--caution); }
.posted { margin: 0 0 0.8em; color: var(--label); white-space: pre-wrap; }

/* Luna's word, as the log shows it: CDO LUNA, then the line. */
.kibitz { margin: 1em 0; padding: 0; list-style: none; }
.kibitz li { margin: 0 0 0.45em; padding-left: 2ch; text-indent: -2ch; }
.kibitz .who { color: var(--label); font-weight: 700; margin-right: 1ch; }
.kibitz q { color: var(--value); quotes: none; }

.points { list-style: none; padding: 0; }
.points li { padding-left: 2ch; text-indent: -2ch; margin: 0 0 0.6em; }
.points li::before { content: "▸ "; color: var(--accent); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2ch; }

/* The screen-reader mode's session, as it was said. */
.transcript {
  margin: 1em 0 0; padding: 0.7em 2ch;
  background: var(--well); border: 1px solid var(--frame);
  white-space: pre-wrap; font-family: var(--mono); font-size: 0.93em;
}
.transcript .you { color: var(--caution); }

.papers { display: grid; grid-template-columns: max-content 1fr; gap: 0.3em 3ch; }
.papers dt { margin: 0; }
.papers dd { margin: 0; color: var(--text); }

.foot {
  color: var(--label); font-size: 0.86em;
  border-top: 1px solid var(--frame);
  padding: 14px 0 40px; margin-top: 1em;
}
.foot p { margin: 0.2em 0; }

/* The papers: the manual, the roadmap and the rest. */
.paper { padding: 1.2em 0 0; }
.paper h1, .paper h2, .paper h3, .paper h4 { color: var(--value); line-height: 1.3; }
.paper h1 { font-size: 1.6em; letter-spacing: 0.04em; }
.paper h2 { font-size: 1.15em; border-top: 1px solid var(--frame); padding-top: 1.2em; margin-top: 2em; }
.paper h3 { font-size: 1em; }
.paper h4 { font-size: 1em; color: var(--label); }
.paper p, .paper li { max-width: 78ch; }
.paper blockquote {
  margin: 1em 0; padding: 0.6em 2ch;
  border-left: 3px solid var(--frame);
  background: color-mix(in srgb, var(--frame) 25%, transparent);
}
.paper blockquote.callout { border-left-color: var(--value); }
.paper blockquote.warning, .paper blockquote.caution { border-left-color: var(--caution); }
.paper code { color: var(--value); background: var(--well); padding: 0 0.3ch; font-family: var(--mono); }
.paper pre { background: var(--well); border: 1px solid var(--frame); padding: 0.8em 2ch; overflow-x: auto; }
.paper pre code { padding: 0; }
.paper table { border-collapse: collapse; display: block; overflow-x: auto; margin: 1em 0; }
.paper th, .paper td { border: 1px solid var(--frame); padding: 0.3em 1ch; text-align: left; vertical-align: top; }
.paper th { color: var(--value); }
.paper tr:nth-child(2n) td { background: var(--stripe); }
.window code { color: var(--value); font-family: var(--mono); }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .bar nav { margin-left: 0; }
  .window { padding: 1.4em 1.5ch 1em; }
  .pair { grid-template-columns: 1fr; }
  .hero .wide { display: none; }
  .hero .narrow { display: block; }
  .hero .narrow + .narrow { margin-top: 1em; }
  .tagline, .ready { text-align: center; }
  .papers { grid-template-columns: 1fr; }
  .papers dd { margin-bottom: 0.6em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
