/* No Ground Floor. A property listing for an apartment tower in orbit,
   played straight. Markup comes from src/views and src/features. Plain CSS,
   no build step: public/ is embedded in the binary.

   Rules (CLAUDE.md): colours come from the mascot; panels are off-white with
   a 3px ink outline and a 10px radius; no drop shadows, gradients or glass;
   Gloock for headings, Hanken Grotesk for text, no monospace, no all-caps
   labels; the cone's slow tumble is the only animation. */

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

:root {
  --space: #0c1238;      /* page: deep space, a darkened hull blue */
  --space-2: #141c52;
  --space-3: #080d2b;    /* footer */
  --panel: #f7f3ea;      /* interior panels */
  --panel-2: #ece6d8;    /* a step darker: wells, stripes */
  --ink: #1c1a29;        /* outlines and text, from the base plates */
  --ink-2: #55526a;      /* quieter text on panels */
  --cobalt: #2b33d6;     /* the cone's body */
  --cone: #e76500;       /* the cone's orange */
  --cone-dark: #b34d00;  /* orange text on panels (contrast) */
  --rim: #d2be12;        /* the cone's yellow rims */
  --starlight: #e9ecff;  /* text on space */
  --dim: #c6ccf5;        /* quieter text on space */
  --dashed: #7f88d8;     /* the ground floor's outline */
  --porthole: #cfd5ff;   /* pale backing so the blue cone reads against space */
  --danger: #c4372a;
  --line-x: 28px;        /* centre of the lift line from the list's left edge */
  --display: "Gloock", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

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

*, *::before, *::after { box-sizing: border-box; }
/* The footer's colour: whatever shows past the page's bottom edge (overscroll
   bounce) reads as more footer. The body paints the starfield over it. */
html { -webkit-text-size-adjust: 100%; background: var(--space-3); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--starlight);
  background-color: var(--space);
  background-image:
    radial-gradient(circle, #ffffff 0 1px, transparent 1.6px),
    radial-gradient(circle, #aab4ff 0 1px, transparent 1.6px),
    radial-gradient(circle, #ffd9a8 0 1.4px, transparent 2px);
  background-size: 240px 240px, 170px 170px, 410px 410px;
  background-position: 30px 60px, 110px 20px, 200px 300px;
}
.site-main { flex: 1 0 auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cone); outline-offset: 3px; border-radius: 4px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; }
[hidden] { display: none !important; }
.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

.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;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 10px; background: var(--panel); color: var(--ink); }
.skip-link:focus { top: 12px; }

/* ---------- Header and footer (src/views/layout.rs) ---------- */

.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.logo-mark { width: 48px; height: 48px; padding: 3px; border-radius: 50%; background: var(--porthole); border: 3px solid var(--ink); flex: none; }
.brand span { font-family: var(--display); font-size: 1.5rem; letter-spacing: .01em; white-space: nowrap; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.site-nav a, .link-button { text-decoration: none; font-weight: 500; padding-block: .25rem; border-bottom: 3px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"], .link-button:hover { border-bottom-color: var(--cone); }
.site-nav form { margin: 0; }
.link-button { background: none; border-top: 0; border-left: 0; border-right: 0; padding-inline: 0; color: inherit; font: inherit; font-weight: 500; cursor: pointer; }

.site-footer { border-top: 3px solid var(--ink); background: var(--space-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; padding-block: 1.5rem; font-size: .9375rem; color: var(--dim); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer .build { color: #8c93c9; }

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

.listing { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: center; padding-block: 2.5rem 4rem; }
.listing h1 { font-size: clamp(2.6rem, 6.2vw, 4.5rem); line-height: 1.02; margin: 0 0 1.25rem; text-wrap: balance; }
.listing .pitch { max-width: 34ch; margin: 0 0 1.75rem; font-size: 1.125rem; }
.facts { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border: 3px solid var(--ink); border-radius: 10px; background: var(--panel); color: var(--ink); overflow: hidden; }
.facts div { padding: .8rem 1rem; border-top: 2px solid var(--ink); }
.facts div:nth-child(-n+2) { border-top: 0; }
.facts div:nth-child(odd) { border-right: 2px solid var(--ink); }
.facts dt { font-size: .875rem; }
.facts dd { margin: 0; font-family: var(--display); font-size: 1.5rem; line-height: 1.15; }
.window { margin: 0; }
/* A porthole frame: ink, panel, ink, as three flat rings. */
.window .shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 3px solid var(--ink); outline: 8px solid var(--panel); border-radius: 6px; box-shadow: 0 0 0 11px var(--ink); }
.window figcaption { margin-top: 1.5rem; font-size: .9375rem; font-style: italic; color: var(--dim); }

/* ---------- Building updates: the lift line ---------- */

.updates { padding-bottom: 1rem; }
.updates h2, .about h2, .tag-page h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.1; margin: 0 0 .4rem; }
.tag-page h1 em { font-style: normal; color: var(--rim); }
.updates .lede { margin: 0 0 2rem; max-width: 52ch; }
.tag-page { padding-block: 1.5rem 3rem; }
.tag-page .tag-bar { margin: -0.75rem 0 2rem; }
.line { list-style: none; margin: 0; padding: 0; position: relative; }
/* Starts at the first stop and ends in a rounded cap; never cut off square. */
.line::before { content: ""; position: absolute; top: calc(1.55rem + 15px); bottom: .4rem; left: calc(var(--line-x) - 7px); width: 14px; background: var(--cone); border: 3px solid var(--ink); border-top: 0; border-radius: 0 0 9px 9px; }
.stop { position: relative; padding: 0 0 1.75rem 78px; }
.stop::before { content: ""; position: absolute; left: calc(var(--line-x) - 15px); top: 1.55rem; width: 30px; height: 30px; border-radius: 50%; background: var(--panel); border: 3px solid var(--ink); z-index: 1; }
.stop.newest::before { background: var(--cobalt); box-shadow: inset 0 0 0 4px var(--panel); }
/* A single stop: no line to run, just the stop. */
.line:has(> .stop:only-child)::before { display: none; }

.post { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 1.25rem; align-items: center; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 1.1rem 1.1rem 1.1rem 1.4rem; }
.post:hover, .post:focus-within { border-color: var(--cone); }
.post .deck { font-weight: 700; color: var(--cobalt); margin: 0; }
.post .deck time { font-weight: 500; color: var(--ink-2); }
.post h3 { font-size: 1.6rem; line-height: 1.15; margin: .1rem 0 .4rem; }
/* The whole panel is the link; tags stay clickable above it. */
.post-link { text-decoration: none; }
.post-link::after { content: ""; position: absolute; inset: 0; border-radius: 7px; }
.post-link:focus-visible { outline: none; }
.post-link:focus-visible::after { outline: 3px solid var(--cone); outline-offset: 3px; }
.post p { margin: 0; max-width: 56ch; }
.post .post-tags { position: relative; z-index: 1; margin-top: .7rem; gap: .4rem; }
.thumb { aspect-ratio: 4 / 3; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--panel-2); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb.cone { background: var(--porthole); display: grid; place-items: center; }
.thumb.cone img { width: 70%; height: auto; object-fit: contain; }

/* Where the ground floor would be. */
.ground { position: relative; padding: 0 0 0 78px; }
.void { border: 3px dashed var(--dashed); border-radius: 10px; padding: 1.75rem 1.5rem; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.5rem; align-items: center; }
.void h3, .void h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.12; margin: 0 0 .4rem; }
.void p { margin: 0; max-width: 46ch; color: var(--dim); }
.porthole { width: 150px; height: 150px; border-radius: 50%; background: var(--porthole); border: 3px solid var(--ink); display: grid; place-items: center; }
.tumble { width: 86%; height: 86%; animation: tumble 48s linear infinite; }
@keyframes tumble { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tumble { animation: none; } }

/* About. */
.about { padding-block: 4.5rem 3.5rem; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 2.5rem; }
.about .body { background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 1.5rem 1.75rem; }
.about .body p { margin: 0 0 1rem; max-width: 62ch; }
.about .body p:last-child { margin-bottom: 0; }
.about .body a { color: var(--cobalt); }

/* ---------- Error pages (src/views/error.rs) ---------- */

.error { padding-block: 4rem 5rem; }
.error .void { max-width: 860px; }
.error h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.error .error-text { display: flex; flex-direction: column; gap: .6rem; }
.error .error-text p { max-width: 52ch; }
.error-code { color: var(--rim) !important; font-weight: 700; }
.error-note { padding: .6rem .9rem; border: 3px solid var(--ink); border-radius: 10px; background: var(--panel); color: var(--ink) !important; }
.error-reference { font-size: .875rem; }
.error a { color: var(--starlight); text-decoration-color: var(--cone); text-decoration-thickness: 2px; }

/* ---------- A post (src/features/devlog/public.rs) ---------- */

.post-page { padding-block: 1rem 4rem; display: flex; flex-direction: column; gap: 2rem; }
.back { align-self: flex-start; font-weight: 500; text-decoration: none; border-bottom: 3px solid transparent; }
.back:hover { border-bottom-color: var(--cone); }
.post-head { display: flex; flex-direction: column; gap: .9rem; max-width: 820px; }
.post-nav { justify-content: space-between; margin-bottom: .5rem; }
.post-status { margin: 0; font-weight: 700; color: var(--rim); }
.post-status time { font-weight: 500; color: var(--dim); }
.post-title { margin: 0; font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.05; text-wrap: balance; overflow-wrap: anywhere; }
.post-lede { margin: 0; max-width: 56ch; font-size: 1.2rem; color: var(--dim); }
.post-tags { gap: .5rem; }
.post-cover { margin: 0; }
.post-cover img { display: block; width: 100%; max-height: 460px; object-fit: cover; border: 3px solid var(--ink); outline: 8px solid var(--panel); border-radius: 6px; box-shadow: 0 0 0 11px var(--ink); margin: 11px 0; }
.post-cols { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: 2rem 2.5rem; align-items: start; }
.post-page.single .post-cols { grid-template-columns: minmax(0, 820px); }
.post-body { min-width: 0; display: flow-root; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 1.75rem 2rem; }
.post-body h2, .post-body h3 { scroll-margin-top: 24px; }
.post-side { position: sticky; top: 24px; min-width: 0; }
.toc { display: flex; flex-direction: column; gap: .15rem; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 1rem 1.1rem; }
.toc h2 { font-size: 1.25rem; margin: 0 0 .4rem; }
.toc a { display: flex; gap: .6rem; align-items: baseline; padding: .2rem 0; text-decoration: none; color: var(--ink-2); }
.toc a::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: var(--panel); transform: translateY(1px); }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); font-weight: 700; }
.toc a.on::before { background: var(--cone); }

/* Up and down the lift. */
.post-pager { display: flex; flex-wrap: wrap; gap: 1rem; max-width: 820px; }
.pager-link { flex: 1 1 280px; display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem; text-decoration: none; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; }
.pager-link:hover { border-color: var(--cone); }
.pager-dir { font-weight: 700; color: var(--cobalt); }
.pager-dir::before { margin-right: .4rem; }
.pager-link.up .pager-dir::before { content: "\2191"; }
.pager-link.down .pager-dir::before { content: "\2193"; }
.pager-title { font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }
.pager-link.bottom { background: transparent; color: var(--starlight); border-style: dashed; border-color: var(--dashed); }
.pager-link.bottom .pager-dir { color: var(--rim); }
.pager-link.bottom .pager-title { font-family: var(--text); font-size: 1rem; color: var(--dim); }

/* ---------- Post bodies (src/markdown.rs), on an off-white panel ---------- */

.prose { font-size: 1.125rem; line-height: 1.65; max-width: 70ch; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2rem; }
.prose a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose h2 { font-size: 1.9rem; line-height: 1.15; margin: 2.4rem 0 .8rem; }
.prose h3 { font-size: 1.4rem; line-height: 1.2; margin: 2rem 0 .6rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.6rem; }
.prose li { margin: .25rem 0; }
.prose li::marker { color: var(--cone-dark); }
.prose hr { height: 0; margin: 2.4rem 0; border: 0; border-top: 3px dashed var(--dashed); }
.prose blockquote { margin: 1.8rem 0; padding: .1rem 0 .1rem 1.3rem; border-left: 4px solid var(--cone); font-family: var(--display); font-size: 1.5rem; line-height: 1.3; }
.prose blockquote p { margin: 0; }
.prose code { font-family: inherit; font-size: .95em; background: var(--panel-2); padding: .05em .35em; border-radius: 4px; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 1.4rem; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; font-size: 1rem; }
.prose th, .prose td { padding: .55rem .8rem; text-align: left; }
.prose thead th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.prose tbody tr:nth-child(even) { background: var(--panel-2); }

/* Images: screenshots with captions. Pixel art opts in with the title,
   ![alt](url "pixel"). */
.prose img, .prose video { display: block; max-width: 100%; height: auto; margin: 0 0 1.2rem; border-radius: 6px; }
.prose > p > img, .prose > img { border: 3px solid var(--ink); }
.prose img[title~="pixel"] { width: 100%; image-rendering: pixelated; }
.post-figure, .post-video { margin: 0 0 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.post-figure.float-right { float: right; width: min(42%, 380px); margin: .3rem 0 1rem 1.6rem; }
.post-figure.float-left { float: left; width: min(42%, 380px); margin: .3rem 1.6rem 1rem 0; }
.prose .post-figure img, .prose .post-video video { width: 100%; margin: 0; border: 3px solid var(--ink); }
.prose .post-video video { max-height: 72vh; background: var(--ink); }
.post-figure figcaption, .post-video figcaption, .gallery figcaption { font-size: .9375rem; line-height: 1.45; font-style: italic; color: var(--ink-2); }
.post-figure figcaption > :last-child, .post-video-text > :last-child { margin-bottom: 0; }
.post-video-title { font-family: var(--display); font-size: 1.3rem; }
.prose .post-video-text { font-style: normal; font-size: 1rem; }
.prose .clear { clear: both; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin: 0 0 1.4rem; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.gallery a { display: block; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; }
.gallery a:hover { border-color: var(--cone); }
.prose .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; margin: 0; border-radius: 0; }

.prose .callout { position: relative; margin: 2rem 0 1.6rem; padding: 1.5rem 1.2rem 1rem; background: var(--panel-2); }
.prose .callout > :last-child { margin-bottom: 0; }
.patch-notes { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.prose .patch-notes li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .8rem; align-items: baseline; margin: 0; }
.patch-notes .tag { text-align: center; }

.profile { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 1.4rem; align-items: start; margin: 0 0 1.6rem; }
.prose .profile-avatar { width: 112px; height: 112px; object-fit: cover; margin: 0; border: 3px solid var(--ink); border-radius: 50%; }
.profile-initial { display: grid; place-items: center; font-family: var(--display); font-size: 3rem; background: var(--porthole); }
.prose .profile-name { margin: 0 0 .4rem; }
.profile p:last-child { margin-bottom: 0; }

/* Code: numbers in their own column, the code scrolling sideways on its own. */
.code-block { display: flex; margin: 0 0 1.4rem; background: var(--ink); color: #eceaf6; border-radius: 10px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.6; overflow: hidden; }
.code-block pre { margin: 0; padding: 1rem 0; font: inherit; }
.code-block .code-lines { flex: none; padding: 1rem .8rem 1rem 1rem; text-align: right; color: #7a7894; user-select: none; border-right: 2px solid #2e2b42; }
.code-block .code-body { flex: 1; min-width: 0; padding: 1rem; overflow-x: auto; }
.code-body code { background: none; padding: 0; font: inherit; color: inherit; }
.hl-comment { color: #8c89a8; font-style: italic; }
.hl-keyword, .hl-storage.hl-modifier, .hl-keyword.hl-operator, .hl-punctuation.hl-separator, .hl-entity.hl-name.hl-tag, .hl-variable.hl-parameter { color: #ff9a4d; }
.hl-storage, .hl-support.hl-type { color: #9aa2ff; }
.hl-entity.hl-name.hl-function, .hl-support.hl-function, .hl-entity.hl-name.hl-type, .hl-entity.hl-name.hl-class, .hl-entity.hl-other.hl-attribute-name { color: #f0de5a; }
.hl-string { color: #b7e08a; }
.hl-constant, .hl-constant.hl-numeric { color: #ffb38a; }

.discord-invite { display: inline-flex; }

/* ---------- Shared components ---------- */

.container { width: min(1240px, 100% - 2.5rem); margin-inline: auto; padding-block: 2rem 4rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
.display { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; }
.display.md { font-size: 2.2rem; }
.title { font-family: var(--display); font-size: 1.6rem; margin: 0; }
.label { font-size: .875rem; font-weight: 700; margin: 0; }
.muted { color: var(--dim); }
.small { font-size: .875rem; }

/* A panel: off-white, ink outline, 10px radius. */
.frame { position: relative; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; }
.frame .muted, .table .muted, .post .muted { color: var(--ink-2); }
.frame a { color: var(--cobalt); }
.panel { padding: 1.6rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.well { background: var(--panel-2); border-radius: 6px; }
/* A label sitting on a panel's top edge. */
.tab { position: absolute; top: -.85rem; left: .9rem; margin: 0; padding: .05rem .6rem; font-size: .875rem; font-weight: 700; background: var(--cone); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; line-height: 1.3; }
.tab.rim, .tab.amber { background: var(--rim); }
.tab.cobalt { background: var(--cobalt); color: var(--panel); }
.tab.cream { background: var(--porthole); }

.tag { display: inline-block; padding: .05rem .6rem; font-size: .8125rem; font-weight: 700; line-height: 1.5; border-radius: 999px; background: var(--cone); color: var(--ink); border: 2px solid var(--ink); text-decoration: none; }
.tag.rim, .tag.t-chg { background: var(--rim); }
.tag.cobalt, .tag.t-new { background: var(--cobalt); color: var(--panel); }
.tag.cone, .tag.t-fix { background: var(--cone); }
.tag.outline { background: transparent; color: inherit; border-color: currentColor; }
.post .tag.outline, .frame .tag.outline { color: var(--ink-2); border-color: var(--ink-2); }
a.tag:hover { border-color: var(--cone); }
a.tag.outline:hover { color: inherit; }
.tag-count { opacity: .7; font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem; border: 3px solid var(--ink); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--cone); }
.frame a.btn { color: var(--ink); }
.btn.primary { background: var(--cone); }
.btn.primary:hover { border-color: var(--ink); background: #ff7a14; }
.btn.danger { background: var(--danger); color: var(--panel); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { border-color: var(--cone); }
.btn.sm { min-height: 34px; padding: 0 .8rem; font-size: .9375rem; }
.btn.block { width: 100%; }

.toast { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-left-width: 10px; border-left-color: var(--cobalt); border-radius: 10px; }
.toast.rust { border-left-color: var(--danger); }
.toast-body { flex: 1; min-width: 0; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; font-size: .9375rem; }
.table th, .table td { padding: .6rem .8rem; text-align: left; vertical-align: middle; }
.table thead th { font-weight: 700; border-bottom: 2px solid var(--ink); }
.table tbody tr:nth-child(even) { background: var(--panel-2); }
.table a { color: var(--cobalt); }
.table .num { text-align: right; white-space: nowrap; }

/* Forms. */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-label { display: flex; justify-content: space-between; gap: .75rem; font-size: .9375rem; font-weight: 700; }
.field-label .muted { font-weight: 400; }
.field-hint { font-size: .875rem; color: var(--ink-2); }
.field-error { font-size: .9375rem; font-weight: 700; color: var(--danger); }
.input { display: block; width: 100%; min-height: 44px; padding: .55rem .75rem; border: 2px solid var(--ink); border-radius: 8px; background: #fffdf8; color: var(--ink); font: inherit; font-size: 1rem; }
textarea.input { min-height: 96px; line-height: 1.5; resize: vertical; }
.input:focus { outline: none; border-color: var(--cone); box-shadow: 0 0 0 1px var(--cone); }
.input::placeholder { color: #9895a8; }
.input-prefixed { display: flex; align-items: stretch; }
.input-prefix { display: flex; align-items: center; padding: 0 .6rem; font-size: .9375rem; color: var(--ink-2); background: var(--panel-2); border: 2px solid var(--ink); border-right: 0; border-radius: 8px 0 0 8px; white-space: nowrap; }
.input-prefixed .input { border-radius: 0 8px 8px 0; min-width: 0; }
.check { display: flex; align-items: center; gap: .6rem; min-height: 32px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--cone); }
fieldset.group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }

.tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.tabs button, .tabs a { min-height: 38px; padding: 0 .9rem; border: 2px solid var(--ink); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.tabs [aria-selected="true"], .tabs [aria-current="true"] { background: var(--panel); color: var(--ink); }

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

.sign-in { display: grid; place-items: center; min-height: 60vh; padding: 4rem 1rem; }
.sign-in-panel { width: min(400px, 100%); }
.sign-in-panel .logo-mark { width: 40px; height: 40px; }

.newsroom { width: min(1360px, 100% - 2.5rem); margin-inline: auto; padding-block: 1.5rem 3.5rem; display: flex; flex-direction: column; gap: 1.6rem; }
.editor-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.1rem; }
.editor-head .saved-note { margin-left: auto; }
.editor-cols { display: flex; flex-wrap: wrap; gap: 2.2rem; align-items: flex-start; }
.editor-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 1.2rem; }
.editor-main .field-label { color: var(--starlight); }
.editor-main .field-label .muted { color: var(--dim); }
.editor-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 1.8rem; }
.editor-title { min-height: 60px; font-family: var(--display); font-size: 1.8rem; }
.editor-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.editor-url { flex: 2 1 340px; min-width: 0; }
.editor-tags { flex: 1 1 240px; }
.editor-body { display: flex; flex-direction: column; gap: .75rem; }
textarea.editor-excerpt { min-height: 0; }
textarea.editor-text { min-height: 460px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9375rem; line-height: 1.65; }
.editor-preview { max-width: none; min-height: 460px; padding: 1.5rem 1.75rem; background: var(--panel); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; }
.delete-post { align-self: flex-start; }
.cheatsheet { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.cheatsheet li { display: flex; flex-direction: column; }
.cheatsheet code { font-weight: 700; }
.uploader .input { min-height: 0; padding: .4rem; font-size: .875rem; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 1.2rem; }
.media-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 1rem; padding: .9rem; align-items: start; }
.media-preview { width: 112px; height: 112px; display: grid; place-items: center; overflow: hidden; background: var(--panel-2); border-radius: 6px; text-decoration: none; }
.media-preview img { max-width: 100%; max-height: 100%; }
.media-name { overflow-wrap: anywhere; }
.media-snippet { min-height: 36px; padding: .3rem .5rem; font-size: .8125rem; }

/* ---------- Narrow screens ---------- */

@media (max-width: 1000px) {
  .post-cols { grid-template-columns: minmax(0, 1fr); }
  .post-side { position: static; order: -1; }
}
@media (max-width: 820px) {
  .listing { grid-template-columns: 1fr; padding-block: 1.5rem 3rem; }
  .listing .window { order: -1; padding: 11px; }
  .about { grid-template-columns: 1fr; gap: 1rem; }
  .post { grid-template-columns: 1fr; }
  .post .thumb { order: -1; max-width: 260px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .post-figure.float-right, .post-figure.float-left { float: none; width: auto; margin: 0 0 1.4rem; }
  .post-body { padding: 1.25rem 1.1rem; }
  .profile { grid-template-columns: 72px minmax(0, 1fr); gap: 1rem; }
  .prose .profile-avatar { width: 72px; height: 72px; }
  .prose .patch-notes li { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .patch-notes .tag { justify-self: start; }
}
@media (max-width: 520px) {
  :root { --line-x: 16px; }
  .stop, .ground { padding-left: 46px; }
  .void { grid-template-columns: 1fr; }
  .porthole { width: 110px; height: 110px; }
  .logo-mark { width: 42px; height: 42px; }
  .brand span { font-size: 1.15rem; }
  .site-nav { gap: .4rem .8rem; font-size: .9375rem; }
  .media-item { grid-template-columns: 72px minmax(0, 1fr); }
  .media-preview { width: 72px; height: 72px; }
}
