/*
 * Stonia - the night-sea atlas. One stylesheet for the whole site (public
 * pages, LogStation, polls, tournament, tickets). Colours are tokens:
 * the night chart is the default, the day chart overrides it, and
 * "auto" follows the visitor's system setting. See templates/site/README.md.
 */

:root {
  color-scheme: dark;
  --bg: #081627;
  --bg-deep: #06111f;
  --bg-raise: #0c1e33;
  --panel: rgba(6, 17, 31, .55);
  --panel-strong: rgba(6, 17, 31, .82);
  --text: #d3e3ec;
  --text-strong: #ffffff;
  --muted: #a9c0cf;
  --faint: #8fb3c6;
  --accent: #9fe0f2;
  --accent-soft: rgba(159, 224, 242, .08);
  --gold: #f2c46b;
  --gold-soft: rgba(242, 196, 107, .12);
  --line: rgba(159, 224, 242, .22);
  --line-strong: rgba(159, 224, 242, .45);
  --line-gold: rgba(242, 196, 107, .38);
  --btn-bg: #f2c46b;
  --btn-text: #081627;
  --btn-hover: #ffd88a;
  --ok: #8fe3b0;
  --warn: #f2c46b;
  --bad: #ff9c8a;
  --grid-ink: rgba(159, 224, 242, .05);
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --sea-1: #0b2440;
  --sea-2: #081627;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1e9d6;
  --bg-deep: #e6dac0;
  --bg-raise: #f7f1e3;
  --panel: rgba(255, 251, 240, .62);
  --panel-strong: rgba(255, 251, 240, .92);
  --text: #23323c;
  --text-strong: #0b1a24;
  --muted: #4b5c66;
  --faint: #5d6b72;
  --accent: #165772;
  --accent-soft: rgba(22, 87, 114, .07);
  --gold: #8a5807;
  --gold-soft: rgba(138, 88, 7, .1);
  --line: rgba(22, 87, 114, .22);
  --line-strong: rgba(22, 87, 114, .45);
  --line-gold: rgba(138, 88, 7, .35);
  --btn-bg: #165772;
  --btn-text: #fdf8ec;
  --btn-hover: #0f4459;
  --ok: #1f7a46;
  --warn: #8a5807;
  --bad: #a3321f;
  --grid-ink: rgba(22, 87, 114, .06);
  --shadow: 0 14px 30px rgba(60, 40, 10, .14);
  --sea-1: #e9dcc0;
  --sea-2: #f1e9d6;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --bg: #f1e9d6;
    --bg-deep: #e6dac0;
    --bg-raise: #f7f1e3;
    --panel: rgba(255, 251, 240, .62);
    --panel-strong: rgba(255, 251, 240, .92);
    --text: #23323c;
    --text-strong: #0b1a24;
    --muted: #4b5c66;
    --faint: #5d6b72;
    --accent: #165772;
    --accent-soft: rgba(22, 87, 114, .07);
    --gold: #8a5807;
    --gold-soft: rgba(138, 88, 7, .1);
    --line: rgba(22, 87, 114, .22);
    --line-strong: rgba(22, 87, 114, .45);
    --line-gold: rgba(138, 88, 7, .35);
    --btn-bg: #165772;
    --btn-text: #fdf8ec;
    --btn-hover: #0f4459;
    --ok: #1f7a46;
    --warn: #8a5807;
    --bad: #a3321f;
    --grid-ink: rgba(22, 87, 114, .06);
    --shadow: 0 14px 30px rgba(60, 40, 10, .14);
    --sea-1: #e9dcc0;
    --sea-2: #f1e9d6;
  }
}

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(var(--grid-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-ink) 1px, transparent 1px),
    radial-gradient(ellipse at 50% -10%, var(--sea-1), var(--sea-2) 70%);
  background-size: 64px 64px, 64px 64px, 100% 100%;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'IBM Plex Sans Condensed', 'Helvetica Neue', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.theme-fade, body.theme-fade * {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease, fill .45s ease, stroke .45s ease !important;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
a:hover { color: var(--text-strong); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--bg); }
h1, h2, h3, h4 { color: var(--text-strong); font-weight: 400; text-wrap: balance; margin: 0; }
p { margin: 0; }
code, kbd, pre, .mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
code { font-size: .92em; color: var(--text-strong); }
hr { border: 0; border-top: 1px dotted var(--line-strong); margin: 32px 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.wrap-narrow { max-width: 860px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--btn-bg); color: var(--btn-text); padding: 10px 16px; }
.skip:focus { left: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ type */

.display { font-family: 'IM Fell English SC', Georgia, serif; letter-spacing: .01em; line-height: 1.02; color: var(--text-strong); }
.serif-italic { font-family: 'IM Fell English', Georgia, serif; font-style: italic; }
.kicker { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.lede { font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 24px; line-height: 1.45; color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--gold); }
.small { font-size: 14px; }
.h1 { font-family: 'IM Fell English SC', Georgia, serif; font-size: clamp(40px, 6vw, 72px); line-height: 1.02; }
.h2 { font-family: 'IM Fell English SC', Georgia, serif; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; }
.h3 { font-family: 'IM Fell English SC', Georgia, serif; font-size: 26px; line-height: 1.15; }

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-family: 'IM Fell English SC', Georgia, serif; font-size: 32px; margin-top: 1.6em; }
.prose h3 { font-family: 'IM Fell English SC', Georgia, serif; font-size: 24px; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--line-gold); font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 20px; color: var(--muted); }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-deep) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  view-transition-name: site-header;
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-strong); flex: none; }
.brand-mark { width: 34px; height: 34px; color: var(--gold); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .brand-mark { transform: rotate(45deg); }
.brand-name { font-family: 'IM Fell English SC', Georgia, serif; font-size: 26px; line-height: 1; }
.brand-sub { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a, .nav summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-family: 'IBM Plex Sans Condensed', sans-serif; font-weight: 500; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; cursor: pointer; position: relative;
}
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.nav a:hover { color: var(--text-strong); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--text-strong); }
.nav-more { position: relative; }
.nav-more summary { list-style: none; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: "\25BE"; margin-left: 6px; font-size: 11px; transition: transform .25s; }
.nav-more[open] summary::after { transform: rotate(180deg); }
.nav-more-menu {
  position: absolute; right: 0; top: 100%; min-width: 230px; padding: 8px 0;
  background: var(--panel-strong); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: drop .22s ease-out;
}
.nav-more-menu a { display: flex; width: 100%; padding: 0 18px; }
.nav-more-menu a::after { display: none; }
.nav-more-menu a:hover, .nav-more-menu a[aria-current="page"] { background: var(--accent-soft); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 40px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line); color: var(--muted); font: 500 13px 'IBM Plex Mono', monospace; letter-spacing: .08em;
  text-decoration: none; cursor: pointer; transition: border-color .2s, color .2s, background .2s;
}
.tool-btn:hover { border-color: var(--line-strong); color: var(--text-strong); background: var(--accent-soft); }
.tool-btn svg { width: 18px; height: 18px; }
.tool-btn[aria-current="page"] { border-color: var(--line-gold); color: var(--gold); background: var(--gold-soft); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); }
.lang-switch a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 10px; font: 500 13px 'IBM Plex Mono', monospace; color: var(--muted); text-decoration: none; transition: background .2s, color .2s; }
.lang-switch a[aria-current="true"] { background: var(--gold-soft); color: var(--gold); }
.lang-switch a:hover { color: var(--text-strong); }
.theme-btn .ti { display: none; }
:root[data-theme="auto"] .theme-btn .ti-auto,
:root[data-theme="light"] .theme-btn .ti-light,
:root[data-theme="dark"] .theme-btn .ti-dark { display: block; }
.user-btn { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu-toggle { display: none; }

@media (max-width: 1460px) {
  .header-row { gap: 14px; }
  .nav { flex-wrap: nowrap; }
  .nav a, .nav summary { padding: 0 9px; font-size: 14px; letter-spacing: .04em; white-space: nowrap; }
  .nav a::after { left: 9px; right: 9px; }
}

@media (max-width: 1320px) {
  .header-row { flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 6px 0 12px; border-top: 1px solid var(--line); }
  .site-header.menu-open .nav { display: flex; animation: drop .25s ease-out; }
  /* the open menu can be taller than the screen: the pinned header then
     scrolls by itself instead of cutting the menu off */
  .site-header.menu-open { max-height: 100vh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }

  .nav a::after { display: none; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
  .nav-more-menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; animation: none; }
  .tools { order: 1; margin-left: auto; }
  .tools.account { order: 2; margin-left: 0; }
  .menu-toggle { order: -1; }
}

/* ------------------------------------------------------------ sections */

.section { padding: 88px 0; border-top: 1px dotted var(--line); }
.section:first-of-type { border-top: 0; }
.section-tight { padding: 56px 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 40px; padding-bottom: 18px; border-bottom: 1px solid var(--line-gold); }
.sec-head .plate-no { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.sec-head h2 { font-family: 'IM Fell English SC', Georgia, serif; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.04; margin-top: 8px; }
.sec-head p { color: var(--muted); max-width: 34em; }

.page-hero { padding: 72px 0 48px; position: relative; overflow: hidden; }
.page-hero .h1 { margin-top: 14px; }
.page-hero .lede { margin-top: 18px; }

.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 60px 0; }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 20px; }
}

/* ------------------------------------------------------------ plates (cards) */

.plate {
  position: relative; background: var(--panel); border: 1px solid var(--line); padding: 26px 28px;
  transition: border-color .25s, background .25s, transform .25s, box-shadow .25s;
}
.plate::before {   /* the chart's corner ticks */
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  background:
    linear-gradient(var(--line-gold), var(--line-gold)) left top / 10px 1px no-repeat,
    linear-gradient(var(--line-gold), var(--line-gold)) left top / 1px 10px no-repeat,
    linear-gradient(var(--line-gold), var(--line-gold)) right bottom / 10px 1px no-repeat,
    linear-gradient(var(--line-gold), var(--line-gold)) right bottom / 1px 10px no-repeat;
}
a.plate, .plate-link { display: block; color: var(--text); text-decoration: none; }
a.plate:hover, .plate-link:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text-strong); }
a.plate:hover .go { color: var(--gold); transform: translateX(4px); }
.plate h3 { font-family: 'IM Fell English SC', Georgia, serif; font-size: 26px; line-height: 1.15; }
.plate .go { display: inline-block; font-family: 'IBM Plex Mono', monospace; color: var(--accent); transition: transform .25s, color .25s; }
.plate-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.plate-tag { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* skins */
.skin-white { --skin: #e9eef2; }
.skin-black { --skin: #6d5a73; }
.skin-brown { --skin: #b08a5a; }
.skin-misty { --skin: #8fd3d9; }
:root[data-theme="light"] .skin-white { --skin: #8a96a0; }
@media (prefers-color-scheme: light) { :root[data-theme="auto"] .skin-white { --skin: #8a96a0; } }
.skin-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--skin); box-shadow: 0 0 0 3px color-mix(in srgb, var(--skin) 25%, transparent); vertical-align: middle; }
.skin-bar { border-top: 3px solid var(--skin); }

/* ------------------------------------------------------------ buttons, chips */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 24px;
  background: var(--btn-bg); color: var(--btn-text); border: 0; cursor: pointer; text-decoration: none;
  font: 600 15px 'IBM Plex Sans Condensed', sans-serif; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: var(--btn-hover); color: var(--btn-text); box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--text-strong); border-color: var(--accent); box-shadow: none; }
.btn-danger { background: transparent; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); box-shadow: none; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--text-strong); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line); font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.chip-gold { border-color: var(--line-gold); color: var(--gold); background: var(--gold-soft); }
.chip-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.chip-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* ------------------------------------------------------------ connect box */

.connect { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line-gold); background: var(--panel-strong); max-width: 560px; }
.connect .addr { flex: 1; display: flex; align-items: center; gap: 12px; padding: 12px 18px; font: 500 21px 'IBM Plex Mono', monospace; color: var(--text-strong); user-select: all; overflow-x: auto; white-space: nowrap; }
.connect .addr .port { color: var(--gold); }
.connect .btn { border-radius: 0; }
@media (max-width: 520px) { .connect { flex-direction: column; } .connect .addr { font-size: 18px; } }

/* ------------------------------------------------------------ data tables */

.scrollbox { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 11px 16px; text-align: left; border-bottom: 1px dotted var(--line); vertical-align: top; }
.table th { font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line-gold); white-space: nowrap; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--accent-soft); }
.table td.num, .table th.num { text-align: right; font-family: 'IBM Plex Mono', monospace; }
.table tr:last-child td { border-bottom: 0; }

/* stat bars, drawn to one scale (0-25) */
.statbar { display: grid; grid-template-columns: 42px minmax(0, 1fr) 32px; align-items: center; gap: 10px; font: 500 13px 'IBM Plex Mono', monospace; }
.statbar + .statbar { margin-top: 6px; }
.statbar .track { height: 8px; background: var(--accent-soft); border: 1px solid var(--line); position: relative; overflow: hidden; }
.statbar .fill { position: absolute; inset: 0 auto 0 0; width: var(--v); background: linear-gradient(90deg, var(--accent), var(--gold)); transform-origin: left; }
.statbar .val { text-align: right; color: var(--text-strong); }
.js .reveal .statbar .fill { transform: scaleX(0); transition: transform 1.1s cubic-bezier(.2, .8, .2, 1) .15s; }
.js .reveal.is-in .statbar .fill { transform: scaleX(1); }

/* ------------------------------------------------------------ forms */

.form { display: grid; gap: 18px; max-width: 720px; }
.field { display: grid; gap: 6px; }
.field label, .label { font: 500 13px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.field .help { font-size: 14px; color: var(--faint); }
input[type="text"], input[type="password"], input[type="search"], input[type="date"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; padding: 12px 14px; background: var(--bg-deep); color: var(--text-strong);
  border: 1px solid var(--line-strong); font: 16px 'IBM Plex Sans Condensed', sans-serif; transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
textarea.mono { font-family: 'IBM Plex Mono', monospace; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.inline-form { display: inline; }
.search-bar { display: flex; gap: 0; max-width: 620px; }
.search-bar input { border-right: 0; }
.search-bar .btn { border-radius: 0; }

/* ------------------------------------------------------------ flashes, notes */

.flashes { list-style: none; padding: 0; margin: 24px auto 0; max-width: 1200px; padding-left: 40px; padding-right: 40px; }
.flashes li { padding: 12px 18px; border: 1px solid var(--line-gold); background: var(--gold-soft); color: var(--text-strong); animation: drop .35s ease-out; }
.flashes li + li { margin-top: 8px; }
.note { padding: 14px 18px; border-left: 3px solid var(--gold); background: var(--gold-soft); color: var(--text); }
.empty { padding: 36px; text-align: center; color: var(--faint); border: 1px dashed var(--line-strong); font-family: 'IM Fell English', Georgia, serif; font-style: italic; font-size: 19px; }
@media (max-width: 700px) { .flashes { padding-left: 16px; padding-right: 16px; } }

/* ------------------------------------------------------------ lists, pager, comments */

.entry-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-gold); }
.entry-list > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: baseline; padding: 16px 4px; border-bottom: 1px dotted var(--line); transition: background .2s, padding .2s; }
.entry-list > li:hover { background: var(--accent-soft); padding-left: 12px; }
.entry-list .title { font-family: 'IM Fell English SC', Georgia, serif; font-size: 22px; line-height: 1.2; color: var(--text-strong); text-decoration: none; }
.entry-list .title:hover { color: var(--gold); }
.entry-list .meta { font: 13px 'IBM Plex Mono', monospace; color: var(--faint); }
.count-badge { font: 500 13px 'IBM Plex Mono', monospace; color: var(--gold); }

.pager { display: flex; gap: 12px; justify-content: space-between; margin-top: 28px; }

.comments { display: grid; gap: 14px; margin-top: 20px; }
.comment { padding: 16px 20px; border: 1px solid var(--line); background: var(--panel); }
.comment-hd { display: flex; justify-content: space-between; gap: 12px; font: 13px 'IBM Plex Mono', monospace; color: var(--faint); margin-bottom: 8px; }
.comment-hd strong { color: var(--gold); font-weight: 500; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* a play log, as the client showed it */
.logtext {
  margin: 0; padding: 24px 26px; background: #050d17; color: #cfe0ea; border: 1px solid var(--line);
  font: 14px/1.55 'IBM Plex Mono', monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 75vh; overflow: auto;
}
:root[data-theme="light"] .logtext { background: #fbf7ee; color: #1c2a33; }
@media (prefers-color-scheme: light) { :root[data-theme="auto"] .logtext { background: #fbf7ee; color: #1c2a33; } }

/* ------------------------------------------------------------ live status */

.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2.4s ease-out infinite; vertical-align: middle; }
.live-dot.stale { background: var(--faint); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ------------------------------------------------------------ the chart ornaments */

.compass { width: 100%; max-width: 320px; color: var(--accent); }
.compass .needle { transform-origin: 110px 110px; animation: needle 9s ease-in-out infinite; }
.compass .rose { transform-origin: 110px 110px; animation: spin 240s linear infinite; }
@keyframes needle { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.waves path { stroke: var(--line-strong); fill: none; stroke-width: 1; stroke-dasharray: 6 10; animation: drift 14s linear infinite; }
.waves path:nth-child(2) { animation-duration: 20s; opacity: .7; }
.waves path:nth-child(3) { animation-duration: 28s; opacity: .45; }
@keyframes drift { to { stroke-dashoffset: -320; } }
.ascii { font: 12px/1.25 'IBM Plex Mono', monospace; color: var(--accent); white-space: pre; margin: 0; }

/* ------------------------------------------------------------ status badges (tickets) */

.status { display: inline-flex; align-items: center; padding: 2px 10px; font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.status-new, .status-new_comment { color: var(--accent); border-color: var(--line-strong); }
.status-approved, .status-in_progress { color: var(--gold); border-color: var(--line-gold); background: var(--gold-soft); }
.status-done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.status-declined { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.status-needs_work, .status-under_review { color: var(--warn); border-color: var(--line-gold); }

/* ------------------------------------------------------------ footer */

.site-footer { margin-top: 80px; border-top: 1px solid var(--line-gold); background: var(--bg-deep); padding: 48px 0 36px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid h4 { font: 500 12px 'IBM Plex Mono', monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text-strong); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 18px; border-top: 1px dotted var(--line); font: 13px 'IBM Plex Mono', monospace; color: var(--faint); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ motion */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s ease both; }
::view-transition-new(root) { animation: vt-in .38s cubic-bezier(.2, .8, .2, 1) both; }
::view-transition-group(site-header) { animation: none; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal-stagger.is-in > * { opacity: 1; transform: none; }
.js .reveal-stagger.is-in > *:nth-child(2) { transition-delay: .07s; }
.js .reveal-stagger.is-in > *:nth-child(3) { transition-delay: .14s; }
.js .reveal-stagger.is-in > *:nth-child(4) { transition-delay: .21s; }
.js .reveal-stagger.is-in > *:nth-child(5) { transition-delay: .28s; }
.js .reveal-stagger.is-in > *:nth-child(6) { transition-delay: .35s; }
.js .reveal-stagger.is-in > *:nth-child(n+7) { transition-delay: .42s; }

.fade-up { animation: fadeUp .9s cubic-bezier(.2, .8, .2, 1) both; }
.fade-up.d1 { animation-delay: .1s; } .fade-up.d2 { animation-delay: .2s; } .fade-up.d3 { animation-delay: .32s; } .fade-up.d4 { animation-delay: .44s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .js .reveal .statbar .fill { transform: none !important; }
  @view-transition { navigation: none; }
}

@media print {
  .site-header, .site-footer, .tools { display: none !important; }
  body { background: #fff; color: #000; }
}

/* phones: menu button first, then the brand, your name top right; the
   other tools on the row below (after every other header rule) */
@media (max-width: 700px) {
  .header-row { gap: 10px; }
  .menu-toggle { order: -1; }
  .tools.account { order: 1; margin-left: auto; }
  .tools:not(.account) { order: 2; flex-basis: 100%; margin-left: 0; }
  .user-btn { max-width: 120px; }
}
