/* Raygoe UI theme: the Stellar Conflicts pixel HUD (sc-game's sc.css),
   re-lit in autumn: maple and amber on warm dark earth instead of teal on
   space-blue. Markup comes from src/views and src/features. Plain CSS, no
   build step: public/ is embedded in the binary. */

/* ---------- Tokens ---------- */

:root {
  color-scheme: dark;

  --void: #14110F;
  --panel: #1C1814;
  --panel-2: #181411;
  --well: #0E0B09;
  --raised: #2B241E;
  --raised-hover: #352C25;
  --ink: #070605;
  --edge: #3B3129;
  --edge-2: #4B3E34;
  --edge-soft: #231D18;

  --text: #F1E6D2;
  --text-2: #CDBFA9;
  --muted: #9C8C78;
  --faint: #6C5F51;

  --cream: #F1E6D2;
  --cream-shade: #BBA98C;
  --maple: #E28E3C;
  --maple-dark: #A65E1F;
  --maple-deep: #4A2A10;
  --maple-light: #F5BC7E;
  --gold: #F2C14E;
  --gold-dark: #A5801F;
  --gold-deep: #4A3A10;
  --sage: #8DBF7A;
  --sage-dark: #57804A;
  --rust: #D2553F;
  --rust-light: #EE8A76;
  --rust-dark: #8A2F22;
  --rust-deep: #2A1410;
  --plum: #B98FD9;
  --plum-dark: #7F5CA3;

  --font-ui: "Share Tech Mono", ui-monospace, monospace;
  --font-display: "Doto", "Share Tech Mono", ui-monospace, monospace;
  --font-prose: "Atkinson Hyperlegible", system-ui, sans-serif;

  --rivet: linear-gradient(var(--faint), var(--faint));
}

/* ---------- Base ---------- */

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

body.ray {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.4;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.ray a { color: var(--maple); }
.ray a:hover { color: var(--maple-light); }

.ray :focus-visible { outline: 2px dashed var(--gold); outline-offset: 3px; }

.ray h1, .ray h2, .ray h3 { margin: 0; font-weight: 400; }

/* `hidden` wins over a component's own display. */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ---------- */

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
.container { max-width: 1360px; margin: 0 auto; padding: 40px 32px 64px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3 { grid-column: auto; }
  .container { padding: 24px 16px 48px; }
}

/* ---------- Type ---------- */

.display { font-family: var(--font-display); font-weight: 700; letter-spacing: .08em; line-height: 1.05; }
.display.xl { font-size: 64px; }
.display.lg { font-size: 44px; }
.display.md { font-size: 32px; }

/* Floating heading: Doto, outlined, sits straight on the starfield. */
.kicker {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}

.title { font-size: 24px; letter-spacing: .02em; }
.label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Outline for text drawn over the scene. */
.ol { text-shadow: 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 2px 0 var(--ink), 0 -2px 0 var(--ink); }

.nameplate { font-size: 15px; letter-spacing: .04em; white-space: nowrap; }

.prose { font-family: var(--font-prose); font-size: 19px; line-height: 1.65; color: #E6DCCB; max-width: 72ch; }
.prose p { margin: 0 0 22px; }
.prose h2 { font-family: var(--font-ui); font-size: 30px; line-height: 1.2; margin: 52px 0 16px; color: var(--text); }
.prose h2::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--maple); margin-right: 14px; vertical-align: 5px; }

/* Accent colour utilities, used by icons and text. */
.c-maple { color: var(--maple); }
.c-gold { color: var(--gold); }
.c-sage { color: var(--sage); }
.c-rust { color: var(--rust-light); }
.c-cream { color: var(--cream); }
.c-plum { color: var(--plum); }
.c-muted { color: var(--muted); }

.icon { display: inline-block; flex: none; vertical-align: -2px; }

/* ---------- Frames ---------- */

/* Riveted panel: dark fill, double inset border, a rivet in each corner. */
.frame {
  position: relative;
  background:
    var(--rivet) 6px 6px / 2px 2px no-repeat,
    var(--rivet) calc(100% - 6px) 6px / 2px 2px no-repeat,
    var(--rivet) 6px calc(100% - 6px) / 2px 2px no-repeat,
    var(--rivet) calc(100% - 6px) calc(100% - 6px) / 2px 2px no-repeat,
    var(--panel-2);
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--edge), inset 0 0 0 4px var(--panel);
}
.frame.glass { background-color: rgba(14, 17, 24, .95); }

.panel { padding: 30px 22px 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.well { background: var(--well); box-shadow: inset 0 0 0 2px var(--edge-soft); }

/* Tab label sitting on a frame's top edge. */
.tab {
  position: absolute; top: -12px; left: 14px;
  margin: 0; padding: 1px 8px 2px;
  font-family: var(--font-ui); font-size: 12px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  background: var(--maple); color: #1E0F04;
  box-shadow: 0 0 0 2px var(--ink);
}
.tab.gold { background: var(--gold); color: #1A1206; }
.tab.rust { background: var(--rust); color: #1A0806; }
.tab.cream { background: var(--cream); color: #1E0F04; }
.tab.sage { background: var(--sage); color: #0D1A0E; }
.tab.plum { background: var(--plum); color: #160D24; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px 2px;
  border: 0; border-radius: 0;
  background: var(--raised); color: var(--text);
  font: inherit; font-size: 17px; text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 2px var(--ink), inset 0 -4px 0 #1C1612, inset 0 2px 0 var(--edge-2);
}
.ray .btn:hover { background: var(--raised-hover); color: var(--text); }
.btn:active, .btn.pressed {
  transform: translateY(2px);
  box-shadow: 0 0 0 2px var(--ink), inset 0 -1px 0 #1C1612, inset 0 2px 0 #1C1612;
}
.btn.primary { background: var(--maple); color: #1E0F04; box-shadow: 0 0 0 2px var(--ink), inset 0 -4px 0 var(--maple-dark), inset 0 2px 0 var(--maple-light); }
.ray .btn.primary:hover { background: #ECA25A; color: #1E0F04; }
.btn.danger { background: var(--rust); color: #1A0806; box-shadow: 0 0 0 2px var(--ink), inset 0 -4px 0 var(--rust-dark), inset 0 2px 0 #F2A190; }
.ray .btn.danger:hover { background: #DE6C58; color: #1A0806; }
.btn.gold { background: var(--gold); color: #1A1206; box-shadow: 0 0 0 2px var(--ink), inset 0 -4px 0 var(--gold-dark), inset 0 2px 0 #F8DA92; }
.ray .btn.gold:hover { background: #F5CD6E; color: #1A1206; }
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 2px var(--edge-2); }
.ray .btn.ghost:hover { background: var(--panel); }
.btn.sm { min-height: 34px; padding: 0 12px 2px; font-size: 14px; }
.btn.block { width: 100%; }
.btn .cost { font-size: 13px; opacity: .8; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: #1D1814; color: var(--faint); cursor: not-allowed; transform: none;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--raised);
}

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0;
  background: #1C1713; color: var(--text); cursor: pointer;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--edge), inset 0 -6px 0 0 #0F0C0A;
}
.icon-btn:hover { box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--maple), inset 0 -6px 0 0 #0F0C0A; }

.badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; background: var(--rust); color: #1A0806;
  box-shadow: 0 0 0 2px var(--ink);
}
.badge.inline { position: static; display: inline-flex; margin-left: 6px; vertical-align: 1px; }
.badge.gold { background: var(--gold); color: #1A1206; }

.keycap {
  display: inline-flex; align-items: center; justify-content: center; font-family: inherit;
  min-width: 26px; height: 26px; padding: 0 6px 2px;
  font-size: 13px; color: var(--text); background: var(--raised);
  box-shadow: 0 0 0 2px var(--ink), inset 0 -3px 0 #1C1612;
}
.keycap.sm { min-width: 18px; height: 18px; padding: 0 4px 1px; font-size: 12px; color: var(--text-2); background: var(--well); box-shadow: inset 0 0 0 1px var(--edge-2); }

.tag { display: inline-block; padding: 1px 8px 2px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; background: var(--maple); color: #1E0F04; }
.tag.gold { background: var(--gold); color: #1A1206; }
.tag.sage { background: var(--sage); color: #0D1A0E; }
.tag.rust { background: var(--rust); color: #1A0806; }
.tag.plum { background: var(--plum); color: #160D24; }
.tag.cream { background: var(--cream); color: #1E0F04; }
.tag.outline { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 2px var(--edge-2); }
/* Tags that link to their list (categories and post tags). */
.ray a.tag, .ray a.tag:hover { color: #1E0F04; text-decoration: none; }
.ray a.tag:not(.outline):hover { filter: brightness(1.15); }
.ray a.tag.outline { color: var(--text-2); }
.ray a.tag.outline:hover { color: var(--text); box-shadow: inset 0 0 0 2px var(--maple); }


/* ---------- Meters ---------- */

.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; margin-bottom: 6px; }
.seg {
  position: relative; display: flex; height: 12px; padding: 2px;
  background: var(--well); box-shadow: inset 0 0 0 1px var(--edge);
}
.seg > i { display: block; height: 100%; }
.seg .mark { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--rust); }
.f-maple { background: repeating-linear-gradient(90deg, var(--maple) 0 5px, transparent 5px 7px); }
.f-gold { background: repeating-linear-gradient(90deg, var(--gold) 0 5px, transparent 5px 7px); }
.f-sage { background: repeating-linear-gradient(90deg, var(--sage) 0 5px, transparent 5px 7px); }
.f-rust { background: repeating-linear-gradient(90deg, var(--rust) 0 5px, transparent 5px 7px); }
.f-cream { background: repeating-linear-gradient(90deg, var(--cream) 0 5px, transparent 5px 7px); }
.f-plum { background: repeating-linear-gradient(90deg, var(--plum) 0 5px, transparent 5px 7px); }
.f-muted { background: repeating-linear-gradient(90deg, var(--muted) 0 5px, transparent 5px 7px); }
.f-ghost { background: repeating-linear-gradient(90deg, #F2A190 0 5px, transparent 5px 7px); opacity: .55; }

.pips { display: inline-flex; gap: 6px; }
.pip { width: 12px; height: 12px; background: var(--well); box-shadow: inset 0 0 0 2px var(--edge-2); }
.pip.on { background: var(--gold); box-shadow: inset 0 0 0 2px var(--gold-dark); }


/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.field-hint { font-size: 13px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--rust-light); }

.input {
  display: block; width: 100%; height: 44px; padding: 0 12px;
  border: 0; border-radius: 0; background: var(--well); color: var(--text);
  font: inherit; font-size: 16px;
  box-shadow: inset 0 0 0 2px var(--edge-2);
}
textarea.input { height: auto; min-height: 96px; padding: 12px; line-height: 1.5; resize: vertical; }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--maple); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--rust); }
.input::placeholder { color: var(--faint); }

.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; }
.select .caret { position: absolute; right: 12px; top: 14px; pointer-events: none; color: var(--cream); }

/* Pixel switch built on a real checkbox. */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; flex: none; width: 56px; height: 28px; background: var(--well); box-shadow: inset 0 0 0 2px var(--edge-2); }
.switch .track::after { content: ""; position: absolute; top: 5px; left: 5px; width: 18px; height: 18px; background: var(--faint); }
.switch .state::after { content: "OFF"; font-size: 13px; color: var(--muted); }
.switch input:checked ~ .track { background: var(--maple-deep); box-shadow: inset 0 0 0 2px var(--maple); }
.switch input:checked ~ .track::after { left: 33px; background: var(--cream); }
.switch input:checked ~ .state::after { content: "ON"; }
.switch input:focus-visible ~ .track { outline: 2px dashed var(--gold); outline-offset: 3px; }
.switch .end { display: flex; align-items: center; gap: 10px; }

.check { display: flex; align-items: center; gap: 12px; min-height: 32px; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; position: relative; flex: none;
  width: 22px; height: 22px; margin: 0; cursor: pointer;
  background: var(--well); box-shadow: inset 0 0 0 2px var(--edge-2);
}
.check input[type="checkbox"]:checked { background: var(--maple); box-shadow: inset 0 0 0 2px var(--maple-dark); }
.check input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 4px; top: 10px; width: 2px; height: 2px; background: #1E0F04;
  box-shadow: 2px 2px #1E0F04, 4px 4px #1E0F04, 6px 2px #1E0F04, 8px 0 #1E0F04, 10px -2px #1E0F04, 12px -4px #1E0F04;
}
.check input[type="radio"] { clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px); }
.check input[type="radio"]:checked::after { content: ""; position: absolute; left: 7px; top: 7px; width: 8px; height: 8px; background: var(--maple); }

fieldset.group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
fieldset.group legend { padding: 0; margin-bottom: 8px; }


/* Tabs: links or buttons, htmx-friendly. */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; box-shadow: inset 0 -2px 0 var(--edge); }
.tabs a, .tabs button {
  position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px 2px;
  border: 0; background: var(--panel); color: var(--muted); font: inherit; font-size: 15px; text-decoration: none; cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--raised);
}
.ray .tabs a:hover, .tabs button:hover { color: var(--text); }
.ray .tabs [aria-current="true"] { background: #2E251E; color: var(--text); box-shadow: inset 0 0 0 2px var(--edge), inset 0 3px 0 var(--maple); }


/* ---------- Breadcrumbs (src/views/crumbs.rs) ---------- */

/* Every crumb is 40px tall; its right edge is a stepped arrow 16px deep, and
   the next crumb's left notch is the same staircase, so with a 12px overlap a
   4px dark gap traces the steps between them. */
.trail { max-width: 100%; }
.crumbs { display: inline-flex; align-items: stretch; max-width: 100%; margin: 0; padding: 2px; list-style: none; background: var(--ink); }
.crumbs li { position: relative; display: flex; min-width: 0; }
.crumbs li + li { margin-left: -12px; }
.cr {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; min-width: 0; padding: 0 26px 0 30px;
  background: #2A221C; color: var(--text-2); font-size: 15px; text-decoration: none; white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 16px) 0, calc(100% - 16px) 4px, calc(100% - 12px) 4px, calc(100% - 12px) 8px, calc(100% - 8px) 8px, calc(100% - 8px) 12px, calc(100% - 4px) 12px, calc(100% - 4px) 16px, 100% 16px, 100% 24px, calc(100% - 4px) 24px, calc(100% - 4px) 28px, calc(100% - 8px) 28px, calc(100% - 8px) 32px, calc(100% - 12px) 32px, calc(100% - 12px) 36px, calc(100% - 16px) 36px, calc(100% - 16px) 100%, 0 100%, 0 36px, 4px 36px, 4px 32px, 8px 32px, 8px 28px, 12px 28px, 12px 24px, 16px 24px, 16px 16px, 12px 16px, 12px 12px, 8px 12px, 8px 8px, 4px 8px, 4px 4px, 0 4px);
}
/* First crumb: square left edge. */
.crumbs li:first-child .cr {
  padding-left: 14px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, calc(100% - 16px) 4px, calc(100% - 12px) 4px, calc(100% - 12px) 8px, calc(100% - 8px) 8px, calc(100% - 8px) 12px, calc(100% - 4px) 12px, calc(100% - 4px) 16px, 100% 16px, 100% 24px, calc(100% - 4px) 24px, calc(100% - 4px) 28px, calc(100% - 8px) 28px, calc(100% - 8px) 32px, calc(100% - 12px) 32px, calc(100% - 12px) 36px, calc(100% - 16px) 36px, calc(100% - 16px) 100%, 0 100%);
}
/* Current page: square right edge, lit, not a link. */
.cr.here {
  padding-right: 16px; background: var(--maple); color: #1E0F04;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 36px, 4px 36px, 4px 32px, 8px 32px, 8px 28px, 12px 28px, 12px 24px, 16px 24px, 16px 16px, 12px 16px, 12px 12px, 8px 12px, 8px 8px, 4px 8px, 4px 4px, 0 4px);
}
.crumbs li:first-child .cr.here { clip-path: none; }
.ray a.cr { color: var(--text-2); }
.ray a.cr:hover { background: var(--raised); color: var(--text); box-shadow: inset 0 3px 0 var(--maple); }
.ray a.cr:focus-visible { outline: none; background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 2px var(--gold); }
.crumb-icon { flex: none; color: var(--maple); }
.cr.here .crumb-icon { color: #1E0F04; }
.crumb-text { overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* Folded middle levels: a "···" crumb opening a menu. */
.crumb-more { position: relative; display: flex; }
.cr.more { padding: 0 24px 0 28px; cursor: pointer; list-style: none; }
.cr.more::-webkit-details-marker { display: none; }
.cr.more:hover, .crumb-more[open] .cr.more { background: var(--raised); color: var(--text); box-shadow: inset 0 3px 0 var(--maple); }
.crumb-menu { position: absolute; top: calc(100% + 10px); left: 8px; z-index: 5; min-width: 220px; padding: 8px 6px; display: flex; flex-direction: column; }
.ray .crumb-menu a { display: flex; align-items: center; min-height: 40px; padding: 0 10px 0 24px; color: var(--text); text-decoration: none; font-size: 15px; }
.ray .crumb-menu a:hover { background: #2A221C; }

/* Phones: just the parent, as a back arrow. */
@media (max-width: 600px) {
  .crumbs li { display: none; }
  .crumbs li.crumb-parent { display: flex; margin-left: 0; }
  .crumbs li.crumb-parent .cr {
    padding: 0 16px 0 26px; background: #2A221C; color: var(--text);
    clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 16px 36px, 12px 36px, 12px 32px, 8px 32px, 8px 28px, 4px 28px, 4px 24px, 0 24px, 0 16px, 4px 16px, 4px 12px, 8px 12px, 8px 8px, 12px 8px, 12px 4px, 16px 4px);
  }
}

/* ---------- Feedback ---------- */

.toast {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--panel-2);
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--edge), inset 4px 0 0 0 var(--accent, var(--maple));
}
.toast.gold { --accent: var(--gold); }
.toast.sage { --accent: var(--sage); }
.toast.plum { --accent: var(--plum); }
.toast.rust { --accent: var(--rust); background: var(--rust-deep); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px #7E3324, inset 4px 0 0 0 var(--rust); }
.toast-body { flex: 1; min-width: 0; }
.toast-detail { font-size: 13px; color: var(--muted); }

.banner {
  padding: 18px 12px 16px; text-align: center; background: #1C1408;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--gold), inset 0 0 0 4px var(--gold-deep);
}
.banner .display { font-size: 34px; color: var(--gold); }


/* ---------- Tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 8px 10px; text-align: left; font-weight: 400; }
.table thead th { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 -2px 0 var(--edge); }
.table tbody tr:nth-child(odd) { background: var(--panel); }
.table tbody tr:hover { background: #2A221C; }
.table .num { text-align: right; }

/* ---------- Starfield ---------- */

.space { position: relative; overflow: hidden; background: var(--void); }
.space::before, .space::after { content: ""; position: absolute; left: 0; top: 0; background: transparent; pointer-events: none; }
.space::before {
  width: 2px; height: 2px;
  box-shadow: 84px 62px #F3E3C6, 312px 140px #F3E3C6, 530px 48px #CDB896, 760px 210px #F3E3C6, 1010px 90px #CDB896, 1290px 160px #F3E3C6, 1390px 420px #CDB896, 1180px 610px #F3E3C6, 940px 760px #CDB896, 620px 840px #F3E3C6, 300px 700px #CDB896, 60px 520px #F3E3C6, 220px 380px #CDB896, 470px 300px #F3E3C6, 860px 470px #CDB896, 1100px 330px #F3E3C6, 1340px 780px #CDB896, 700px 590px #F3E3C6, 150px 860px #CDB896, 1230px 40px #F3E3C6;
}
.space::after {
  width: 1px; height: 1px;
  box-shadow: 40px 30px #5C4F42, 190px 110px #5C4F42, 260px 230px #7C6A56, 380px 60px #5C4F42, 450px 410px #7C6A56, 590px 260px #5C4F42, 650px 120px #7C6A56, 720px 360px #5C4F42, 820px 80px #7C6A56, 890px 280px #5C4F42, 960px 180px #7C6A56, 1060px 230px #5C4F42, 1150px 120px #7C6A56, 1260px 300px #5C4F42, 1380px 220px #7C6A56, 1310px 520px #5C4F42, 1210px 450px #7C6A56, 1050px 500px #5C4F42, 900px 640px #7C6A56, 780px 700px #5C4F42;
}
.space > * { position: relative; }


/* ---------- Error page ---------- */

/* In the page container like everything else, so it lines up with the header. */
.container.error { padding-top: 120px; display: flex; flex-direction: column; gap: 14px; }
.error > * { max-width: 640px; }
.error h1 { font-family: var(--font-display); font-weight: 700; font-size: 44px; letter-spacing: .06em; }
.error-code { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.error p { margin: 0; color: var(--text-2); }
.error-note { padding: 10px 14px; background: var(--panel-2); box-shadow: inset 4px 0 0 var(--gold); }
.error-reference { font-size: 13px; }

/* ---------- Page kinds (src/views/layout.rs) ---------- */

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 12px; background: var(--cream); color: #1E0F04; }
.ray .skip-link:focus { top: 12px; color: #1E0F04; }

.ray .logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo-mark { flex: none; image-rendering: pixelated; }
.ray .logo:hover { color: var(--text); }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: .08em; }

/* Site: header, page, footer; the footer sticks to the bottom on short pages. */
body.site { display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }

.site-bar { max-width: 1360px; margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.site-header { background: var(--panel-2); box-shadow: 0 2px 0 var(--edge); }
.site-header .site-bar { min-height: 68px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { padding: 10px 2px; color: var(--text-2); text-decoration: none; font-size: 17px; }
.ray .site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -4px 0 var(--maple); }
.site-user { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.ray .site-pilot { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.ray .site-pilot:hover { color: var(--maple-light); }
.avatar { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--well); box-shadow: inset 0 0 0 2px var(--edge); color: var(--maple); }

/* No margin: each page's content box already ends in its own padding. */
.site-footer { background: #100D0B; box-shadow: inset 0 2px 0 var(--edge); }
.site-footer .site-bar { padding-top: 24px; padding-bottom: 24px; }
.site-footer a { color: var(--muted); }
.site-footer-build { margin-left: auto; }

/* Landing: full-bleed starfield, status line pinned to the bottom. */
body.landing { display: flex; flex-direction: column; }
.landing-main { flex: 1 0 auto; min-height: 100vh; padding-bottom: 72px; }
.landing-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 22px;
  padding: 14px 24px 18px; pointer-events: none;
}
.landing-footer a, .landing-footer span { pointer-events: auto; }

/* Game: the HUD owns the viewport. */
body.game { height: 100vh; overflow: hidden; }

@media (max-width: 720px) {
  .site-bar { padding: 0 16px; }
  .site-user { margin-left: 0; }
  .landing-footer { position: static; }
  .landing-main { padding-bottom: 0; }
}


/* Stat tables: boxed and striped. */
.prose table {
  width: 100%; border-collapse: collapse; margin: 0 0 22px; font-family: var(--font-ui); font-size: 17px;
  background: var(--panel-2); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--edge);
}
.prose th, .prose td { padding: 10px 14px; text-align: left; font-weight: 400; }
.prose thead th { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); box-shadow: inset 0 -2px 0 var(--edge); }
.prose tbody tr:nth-child(odd) { background: #1D1814; }
.prose code { font-family: var(--font-ui); font-size: .9em; background: var(--well); padding: 1px 5px; }
.prose blockquote {
  margin: 32px 0; padding: 4px 0 4px 24px; box-shadow: inset 6px 0 0 var(--gold);
  font-family: var(--font-ui); font-size: 30px; line-height: 1.3; color: var(--text);
}
.prose blockquote p { margin: 0; }

/* ```patch and ```callout blocks. */
.patch-notes { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.patch-notes li {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: baseline;
  padding: 10px 12px; background: var(--panel-2); font-size: 17px; line-height: 1.5;
}
.patch-notes .tag { text-align: center; }
.tag.t-new { background: var(--sage); color: #0D1A0E; }
.tag.t-chg { background: var(--gold); color: #1A1206; }
.tag.t-fix { background: var(--maple); color: #1E0F04; }
.prose .callout {
  margin: 30px 0 26px; padding: 26px 20px 18px; font-size: 17px;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--gold-dark), inset 0 0 0 4px #1C1408;
}
.prose .callout > :last-child { margin-bottom: 0; }


/* The post editor (src/features/news/editor.rs), laid out like the design. */
.newsroom { max-width: 1360px; margin: 0 auto; padding: 32px 32px 56px; display: flex; flex-direction: column; gap: 28px; }
.editor-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: 15px; }
.editor-cols { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.editor-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.editor-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 34px; }
.editor-side .panel { gap: 14px; padding: 28px 18px 18px; }
.editor-title { height: 64px; padding: 0 16px; font-size: 32px; }
.editor-row { display: flex; flex-wrap: wrap; gap: 16px; }
.editor-url { flex: 2 1 340px; min-width: 0; }
.editor-category { flex: 1 1 200px; }
.input-prefixed { display: flex; align-items: stretch; }
.input-prefix {
  display: flex; align-items: center; padding: 0 10px; font-size: 14px; color: var(--muted); white-space: nowrap;
  background: var(--panel); box-shadow: inset 0 0 0 2px var(--edge-2);
}
.input-prefixed .input { margin-left: -2px; min-width: 0; }
textarea.editor-excerpt { min-height: 0; font-family: var(--font-prose); font-size: 17px; }
.cover-panel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; padding: 28px 18px 18px; }
.cover-thumb { width: 300px; max-width: 100%; height: 92px; flex: none; overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 2px var(--edge); }
.cover-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.cover-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.editor-body { display: flex; flex-direction: column; gap: 12px; }
.editor-body .tabs { box-shadow: none; }
.ray .tabs [aria-selected="true"] { background: #2E251E; color: var(--text); box-shadow: inset 0 0 0 2px var(--edge), inset 0 3px 0 var(--maple); }
.editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.editor-toolbar .icon-btn { width: 38px; height: 38px; font-size: 15px; }
.editor-toolbar-rule { width: 2px; height: 30px; background: var(--edge); }
textarea.editor-text { min-height: 440px; padding: 14px; font-family: var(--font-ui); font-size: 15px; line-height: 1.65; }
.editor-preview { max-width: none; min-height: 440px; padding: 24px 28px; background: #100D0B; box-shadow: inset 0 0 0 2px var(--edge); }
.publish-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.publish-actions > * { flex: 1 1 100px; }
.publish-actions .publish-go { flex-basis: 100%; }
.publish:has(input[name="schedule"]:not(:checked)) .schedule-fields { display: none; }
.schedule-fields { display: flex; flex-direction: column; gap: 8px; }
.schedule-time { flex-wrap: nowrap; gap: 10px; align-items: flex-start; }
.editor-side .switch .state { display: none; }


/* Images in posts: screenshots scale smoothly; pixel art opts in with the
   image title, ![alt](url "pixel"), and scales up to the column with hard
   edges (uploaded at 1x). */
.prose img, .prose video { display: block; max-width: 100%; height: auto; margin: 0 0 22px; }
.prose img[title~="pixel"] { width: 100%; image-rendering: pixelated; }

/* Post blocks (src/features/news/markdown.rs). */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.gallery a { display: block; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--edge); }
.gallery a:hover { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--maple); }
.prose .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; margin: 0; }
.gallery figcaption { font-family: var(--font-ui); font-size: 13px; line-height: 1.4; color: var(--muted); }


/* Our own videos on their own line (src/features/news/markdown.rs). */
.post-video { margin: 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.prose .post-video video {
  width: 100%; max-height: 72vh; margin: 0; background: var(--well);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--edge);
}
.post-video figcaption { font-family: var(--font-ui); font-size: 13px; line-height: 1.4; color: var(--muted); }
/* ```img blocks: a captioned image, floated so text wraps around it. */
.post-figure { margin: 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.post-figure.float-right { float: right; width: min(42%, 420px); margin: 4px 0 18px 28px; }
.post-figure.float-left { float: left; width: min(42%, 420px); margin: 4px 28px 18px 0; }
.prose .post-figure img { width: 100%; margin: 0; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--edge); }
.post-figure figcaption { font-family: var(--font-ui); font-size: 13px; line-height: 1.4; color: var(--muted); }
.post-figure figcaption > :last-child { margin-bottom: 0; }
/* ```clear: what follows starts below any floated image. */
.prose .clear { clear: both; }
/* Floats stay inside the post. */
.post-body { display: flow-root; }
@media (max-width: 600px) {
  .post-figure.float-right, .post-figure.float-left { float: none; width: auto; margin: 0 0 22px; }
}
.post-video-title { font-family: var(--font-ui); font-size: 18px; color: var(--text); }
.prose .post-video-text { font-family: var(--font-prose); font-size: 17px; line-height: 1.55; color: var(--text-2); }
.post-video-text > :last-child { margin-bottom: 0; }

.profile { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start; margin: 0 0 28px; }
.prose .profile-avatar { width: 112px; height: 112px; object-fit: cover; margin: 0; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--edge); }
.profile-initial { display: grid; place-items: center; font-family: var(--font-display); font-size: 48px; color: var(--maple); background: var(--panel-2); }
.prose .profile-name { margin: 0 0 8px; font-family: var(--font-ui); font-size: 24px; color: var(--text); }
.profile p:last-child { margin-bottom: 0; }


/* Code: numbers in their own column (never touching the code, never copied),
   the code scrolling sideways on its own. */
.code-block { display: flex; margin: 0 0 22px; background: #1A1512; box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--edge); font-family: var(--font-ui); font-size: 15px; line-height: 1.6; }
.code-block pre { margin: 0; padding: 16px 0; font: inherit; }
.code-block .code-lines { flex: none; padding: 16px 14px 16px 18px; text-align: right; color: var(--faint); user-select: none; box-shadow: inset -2px 0 0 var(--edge-soft); }
.code-block .code-body { flex: 1; min-width: 0; padding: 16px 18px; overflow-x: auto; color: #EDE3D2; }
.code-body code { background: none; padding: 0; font: inherit; }
/* Syntax colours (syntect scope classes, hl- prefixed). */
.hl-comment { color: var(--faint); font-style: italic; }
.hl-keyword, .hl-storage.hl-modifier { color: #F0607A; }
.hl-storage, .hl-support.hl-type { color: #5FD3E6; font-style: italic; }
.hl-entity.hl-name.hl-function, .hl-support.hl-function, .hl-entity.hl-name.hl-type, .hl-entity.hl-name.hl-class { color: #A6E22E; }
.hl-string { color: var(--gold); }
.hl-constant, .hl-constant.hl-numeric { color: var(--plum); }
.hl-variable.hl-parameter, .hl-punctuation.hl-definition.hl-variable { color: #F0607A; }
.hl-keyword.hl-operator, .hl-punctuation.hl-separator { color: #F0607A; }
.hl-entity.hl-name.hl-tag { color: #F0607A; }
.hl-entity.hl-other.hl-attribute-name { color: #A6E22E; }


/* ---------- Page chrome (src/views/layout.rs) ---------- */

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 12px; background: var(--cream); color: #1E0F04; }
.ray .skip-link:focus { top: 12px; color: #1E0F04; }

.ray .logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo-mark { flex: none; image-rendering: pixelated; }
.ray .logo:hover { color: var(--maple-light); }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .1em; }

/* Header, page, footer; the footer sticks to the bottom on short pages. */
body.ray { display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }

.site-bar { max-width: 1360px; margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.site-header { background: var(--panel-2); box-shadow: 0 2px 0 var(--edge); }
.site-header .site-bar { min-height: 68px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { padding: 10px 2px; color: var(--text-2); text-decoration: none; font-size: 17px; }
.ray .site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -4px 0 var(--maple); }
.site-extra { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.ray .feed-link { padding: 2px 8px 3px; font-size: 13px; letter-spacing: .12em; color: var(--gold); text-decoration: none; box-shadow: inset 0 0 0 2px var(--gold-dark); }
.ray .feed-link:hover { color: #1A1206; background: var(--gold); }

/* No margin: each page's content box already ends in its own padding. */
.site-footer { background: #0F0C0A; box-shadow: inset 0 2px 0 var(--edge); }
.site-footer .site-bar { padding-top: 24px; padding-bottom: 24px; }
.site-footer a { color: var(--muted); }
.site-footer-build { margin-left: auto; }

@media (max-width: 720px) {
  .site-bar { padding: 0 16px; }
  .site-extra { margin-left: 0; }
}

/* ---------- Front page (src/features/home.rs) ---------- */

/* The starfield, with a low autumn glow along the horizon and a stepped
   pixel band where it meets the page. */
.hero {
  padding: 40px 0 16px;
  background:
    linear-gradient(to top, rgba(226, 142, 60, .16), rgba(226, 142, 60, 0) 55%),
    var(--void);
  box-shadow: inset 0 -2px 0 var(--maple-deep), inset 0 -6px 0 var(--edge-soft);
}
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 40px 64px; align-items: center; }
.hero-pitch { gap: 18px; max-width: 660px; }
.hero-title { font-size: 104px; line-height: .95; color: var(--cream); letter-spacing: .12em; }
.hero-say { margin: -6px 0 0; color: var(--maple); }
.hero-line { margin: 0; font-size: 19px; line-height: 1.5; color: var(--text-2); }
.hero-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hero-features li { display: flex; align-items: flex-start; gap: 14px; }
.pip-mark { flex: none; width: 14px; height: 14px; margin-top: 4px; background: var(--maple); box-shadow: 0 0 0 2px var(--ink), inset -3px -3px 0 rgba(0, 0, 0, .3); }
.pip-mark.gold { background: var(--gold); }
.pip-mark.sage { background: var(--sage); }

.player-card { display: flex; flex-direction: column; gap: 18px; padding: 30px 22px 22px; }
.player-portrait { display: grid; place-items: center; padding: 18px; }
.player-portrait img { display: block; width: 160px; height: 160px; image-rendering: pixelated; }
.player-stats { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.player-stats div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 6px 10px; background: var(--panel); }
.player-stats div:nth-child(even) { background: transparent; }
.player-stats dd { margin: 0; color: var(--text); }
.c-gold { color: var(--gold); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; padding-top: 12px; }
.project-card { gap: 12px; }
.project-name { font-size: 24px; color: var(--text); }
.project-blurb { margin: 0; flex: 1; font-family: var(--font-prose); font-size: 17px; line-height: 1.55; color: var(--text-2); }
.project-links { gap: 8px 20px; }

.about { padding-top: 12px; }
.about-panel { max-width: 900px; padding: 34px 28px 26px; }
.about-panel .prose p:last-child { margin-bottom: 0; }
.about-tags { gap: 8px; }

@media (max-width: 900px) {
  .hero-split { grid-template-columns: minmax(0, 1fr); }
  .player-card { max-width: 420px; }
}
@media (max-width: 720px) {
  .hero-title { font-size: 64px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Devlog (src/features/devlog) ---------- */

.page-head { padding: 32px 0 0; background: linear-gradient(to top, rgba(226, 142, 60, .10), rgba(226, 142, 60, 0) 60%), var(--void); box-shadow: inset 0 -2px 0 var(--edge-soft); }
.page-head .container { padding-bottom: 32px; }
.tag-bar { gap: 8px; }
.tag-count { opacity: .7; }

/* Cards: the post's icon in a well, then date, title, summary, tags. */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-grid .post-card { flex-direction: column; }
.ray .post-grid .post-card-icon { width: 100%; height: 168px; }
.post-list { display: flex; flex-direction: column; gap: 20px; max-width: 980px; }
.post-card { display: flex; gap: 20px; padding: 14px; }
.ray .post-card-icon {
  flex: none; display: grid; place-items: center; width: 132px; height: 132px; overflow: hidden;
  background: var(--well); box-shadow: inset 0 0 0 2px var(--edge-soft);
}
.post-icon.cover { width: 100%; height: 100%; object-fit: cover; }
.post-icon.leaf { width: 64px; height: 64px; image-rendering: pixelated; }
.ray .post-card-icon:hover { box-shadow: inset 0 0 0 2px var(--maple); }
.post-card-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 4px 6px 4px 0; }
.post-card-date { color: var(--maple); }
.post-card-title { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 400; }
.ray .post-card-title a { color: var(--text); text-decoration: none; }
.ray .post-card-title a:hover { color: var(--maple-light); }
.post-card-summary { margin: 0; font-family: var(--font-prose); font-size: 16px; line-height: 1.5; color: var(--text-2); }
.post-card-tags { gap: 6px; }
.post-card-tags .tag { font-size: 11px; }
@media (max-width: 1100px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-card { flex-direction: column; }
  .ray .post-list .post-card-icon { width: 100%; height: 140px; }
}

/* A post, in the header bar's box so its edges line up with the logo. */
.post-page { max-width: 1360px; margin: 0 auto; padding: 32px 32px 64px; display: flex; flex-direction: column; gap: 32px; }
.post-head { display: flex; flex-direction: column; gap: 18px; }
.post-title-row { display: flex; align-items: center; gap: 22px; }
.post-title-icon { flex: none; display: grid; place-items: center; width: 96px; height: 96px; overflow: hidden; background: var(--well); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--edge); }
.post-title-icon .post-icon.leaf { width: 64px; height: 64px; }
.post-status { gap: 10px 16px; color: var(--maple); }
.post-status .tag { letter-spacing: .12em; }
.ray .post-title { max-width: 980px; font-family: var(--font-display); font-size: 52px; font-weight: 700; line-height: 1.05; letter-spacing: .01em; overflow-wrap: anywhere; }
.post-lede { max-width: 900px; margin: 0; font-family: var(--font-prose); font-size: 21px; line-height: 1.5; color: var(--text-2); }
.post-tags { gap: 8px; }
.post-cover { margin: 0; }
.post-cover img { display: block; width: 100%; max-height: 420px; object-fit: cover; background: var(--well); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--edge); }
.post-cols { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: 48px 64px; align-items: start; }
.post-page.single .post-cols { grid-template-columns: minmax(0, 820px); }
.post-body { max-width: 820px; min-width: 0; display: flow-root; }
.post-body h2 { scroll-margin-top: 24px; }
.post-body > :first-child { margin-top: 0; }
.prose h3 { font-family: var(--font-ui); font-size: 22px; font-weight: 400; color: var(--text); margin: 36px 0 12px; }
.prose hr { height: 2px; margin: 40px 0; border: 0; background: repeating-linear-gradient(90deg, var(--edge-2) 0 6px, transparent 6px 10px); }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 26px; }
.prose li { margin: 4px 0; }
.prose li::marker { color: var(--maple); }
.post-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 36px; min-width: 0; }
.toc { display: flex; flex-direction: column; padding: 28px 18px 14px; }
.ray .toc a { display: flex; gap: 10px; align-items: center; min-height: 36px; color: var(--text-2); text-decoration: none; font-size: 16px; }
.ray .toc a:hover { color: var(--text); }
.toc a::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--edge-2); }
.ray .toc a.on { color: var(--maple); }
.toc a.on::before { background: var(--maple); }
.post-pager { display: flex; flex-wrap: wrap; gap: 20px; max-width: 820px; }
.ray .pager-link { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; padding: 18px; color: var(--text); text-decoration: none; font-size: 18px; }
.ray .pager-link:hover { color: var(--maple-light); }
.pager-link.next { text-align: right; }
@media (max-width: 1100px) {
  .post-cols { grid-template-columns: minmax(0, 1fr); }
  .post-side { position: static; }
  .toc { display: none; }
}
@media (max-width: 720px) {
  .post-page { padding: 24px 16px 48px; gap: 24px; }
  .ray .post-title { font-size: 32px; }
  .post-title-row { align-items: flex-start; gap: 16px; }
  .post-title-icon { width: 64px; height: 64px; }
  .post-title-icon .post-icon.leaf { width: 48px; height: 48px; }
  .post-lede { font-size: 18px; }
  .prose blockquote { font-size: 22px; }
  .patch-notes li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .patch-notes .tag { justify-self: start; }
  .display.xl { font-size: 48px; }
  .display.lg { font-size: 34px; }
}

/* Profiles in posts (```profile). */
.profile { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 24px; align-items: start; margin: 0 0 28px; }
.prose .profile-avatar { width: 112px; height: 112px; object-fit: cover; margin: 0; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--edge); }
.profile-initial { display: grid; place-items: center; font-family: var(--font-display); font-size: 48px; color: var(--maple); background: var(--panel-2); }
.prose .profile-name { margin: 0 0 8px; font-family: var(--font-ui); font-size: 24px; color: var(--text); }
.profile p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
  .prose .profile-avatar { width: 72px; height: 72px; }
}

.tag.maple { background: var(--maple); color: #1E0F04; }
.tag.cream { background: var(--cream); color: #1E0F04; }
.tab.maple { background: var(--maple); color: #1E0F04; }
.tab.cream { background: var(--cream); color: #1E0F04; }
.tab.plum { background: var(--plum); color: #160D24; }
.tab.sage { background: var(--sage); color: #0D1A0E; }
.toast.rust { --accent: var(--rust); }
.f-maple { background: repeating-linear-gradient(90deg, var(--maple) 0 5px, transparent 5px 7px); }

/* ---------- Admin (src/features/admin) ---------- */

.sign-in { display: grid; place-items: center; min-height: 60vh; padding: 64px 16px; }
.sign-in-panel { width: min(400px, 100%); }
.sign-in-panel .row { gap: 12px; }
.sign-in-panel .logo-mark { image-rendering: pixelated; }

.editor-tags { flex: 1 1 240px; }
.saved-note { margin-left: auto; }
.editor-side .group { gap: 8px; }
.delete-post { align-self: flex-start; }
.cheatsheet { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cheatsheet li { display: flex; flex-direction: column; gap: 2px; }
.cheatsheet code { color: var(--gold); font-size: 14px; }
.uploader .input { height: auto; padding: 8px; font-size: 14px; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 20px; }
.media-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 14px; align-items: start; }
.media-preview { width: 112px; height: 112px; display: grid; place-items: center; overflow: hidden; background: var(--well); box-shadow: inset 0 0 0 2px var(--edge-soft); text-decoration: none; }
.media-preview img { max-width: 100%; max-height: 100%; }
.media-name { overflow-wrap: anywhere; }
.media-snippet { height: 36px; font-size: 13px; }
@media (max-width: 720px) { .media-grid { grid-template-columns: minmax(0, 1fr); } }
