/* The look of every page that is not the map (Luka, 2026-11-06): minimal and in line with the map page, where people
   spend their time. Login, start, help, guide, settings, admin, new project and deleted projects load it LAST, after
   their own sheets; the map page never loads it.
   The header is the map's own: the red bar and SUBTERRA in red at 14 px, the same switches, the links at 12 px, a thin
   rule under it; then plain content on the page background with ONE quiet trace of the drawing idea, a very faint grid
   (Luka's pick). No version or date is shown on any page, for anyone (the version stays in /healthz, for the map's
   new-version notice and the diagnostics).
   The CGP: red #EE2E27 only as the logo and small accents (the action button, errors, a hovered card's edge; never a
   fill, a tint, a gradient or body text), text and lines #585858, the greys #A7A9AB and #D1D2D4, the one tint #DED8D3,
   white; the dark theme's values are derived from the same greys, no new hue. Inter only, tabular figures where
   numbers line up. Square corners, thin rules, no shadows. Every colour is a token: light on :root, dark for the OS
   setting and again for the explicit toggle, the way style.css does it. */

:root {
  --bg: #DED8D3; --surface: #FFFFFF; --panel: #FFFFFF; --panel-3: #DED8D3; --btn-bg: #FFFFFF; --btn-hover: #DED8D3;
  --border: #D1D2D4; --border-2: #A7A9AB; --text: #585858; --heading: #585858; --text-dim: #585858;
  --text-muted: #585858; --accent2: #A7A9AB; --theme-accent: #585858;
  --page-shadow: none; --page-shadow-hover: none;
  --sh-line: #A7A9AB; --sh-hover: #DED8D3; --sh-lift: 0 2px 4px rgba(88, 88, 88, 0.14);
  --sh-grid: url("img/sheet/grid-faint-light.svg");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #292624; --surface: #33302E; --panel: #33302E; --panel-3: #292624; --btn-bg: #33302E; --btn-hover: #3D3A38;
    --border: #4A4847; --border-2: #585858; --text: #D1D2D4; --heading: #D1D2D4; --text-dim: #D1D2D4;
    --text-muted: #A7A9AB; --accent2: #A7A9AB; --theme-accent: #D1D2D4;
    --sh-line: #585858; --sh-hover: #3D3A38; --sh-lift: 0 2px 4px rgba(0, 0, 0, 0.35);
    --sh-grid: url("img/sheet/grid-faint-dark.svg");
    color-scheme: dark; }
}
:root[data-theme="dark"] {
  --bg: #292624; --surface: #33302E; --panel: #33302E; --panel-3: #292624; --btn-bg: #33302E; --btn-hover: #3D3A38;
  --border: #4A4847; --border-2: #585858; --text: #D1D2D4; --heading: #D1D2D4; --text-dim: #D1D2D4;
  --text-muted: #A7A9AB; --accent2: #A7A9AB; --theme-accent: #D1D2D4;
  --sh-line: #585858; --sh-hover: #3D3A38; --sh-lift: 0 2px 4px rgba(0, 0, 0, 0.35);
  --sh-grid: url("img/sheet/grid-faint-dark.svg");
  color-scheme: dark; }

/* The page background: the warm grey, and on it a very faint grid - one step off the background, barely there. */
body, body.login-bg { background: var(--sh-grid) 0 0 / 50px 50px repeat fixed, var(--bg); }

/* The scrollbar's room is kept on every page, scrolling or not, so the header row stands in the same place on a short
   page (the start page) and a long one (help) - Luka, 2026-11-09: nothing in the row moves between pages. */
html { scrollbar-gutter: stable; }

/* ── The header: the map page's own ── */
header { background: var(--bg); border-bottom: 1px solid var(--sh-line); box-shadow: none;
         padding: 12px 16px; gap: 16px; }
header h1 { font-size: 14px; font-weight: 700; letter-spacing: .5px; color: var(--accent);
            border-left: 4px solid var(--accent); padding-left: 10px; margin: 0; }
header .app-subtitle, header .who, header a { font-size: 12px; color: var(--text-muted); }
header a:hover { color: var(--text); text-decoration: underline; }
/* The link to the page you are on (header.js; Luka, 2026-11-09): stays in its place, in the text colour with a firmer
   underline - no bold, which would widen it and move the row. */
header a[aria-current] { color: var(--text); }
/* On the label's own text: a link's underline does not reach into the box that keeps both languages' widths. */
header a[aria-current], header a[aria-current] .i18n-fit > span {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.login-brand { font-size: 14px; font-weight: 700; letter-spacing: .5px; color: var(--accent); }

/* ── Titles ── */
.page-title, #page-title, #project-title, .heading-row h2, .help h2.help-title, .login-title,
#deleted > h2:first-child, main > h2:first-child {
  font-weight: 600; font-size: 22px; letter-spacing: 1px; text-transform: uppercase; color: var(--heading); }
#project-title:hover { color: var(--heading); }
.login-title { font-size: 20px; }
.help h3 { font-weight: 600; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--heading); }

/* ── Square corners, thin rules, no shadows ── */
:is(.card, .empty-start, .help, section, .np-card, .del-card, .login-card, .btn, .login-btn, input, select,
    textarea, .help-guide a) { border-radius: 0; box-shadow: none; }
:is(.card, .empty-start, section, .np-card, .del-card, .login-card, .help) {
  background: var(--panel); border: 1px solid var(--sh-line); border-left-width: 1px; border-left-color: var(--sh-line); }
.help section { background: transparent; border: 0; }     /* help's and the guide's text sections are not cards */
#danger { border-left: 3px solid var(--accent); }        /* settings: the delete card - the page's one accent */
.card .slug, .card .meta, .del-card .slug, #deleted-link, .help-toc a { font-variant-numeric: tabular-nums; }
.card .slug, .del-card .slug { font-family: var(--font-ui); color: var(--text-muted); }
.cog:hover, #deleted-link:hover, .login-foot a:hover { color: var(--text); text-decoration: underline; }
tr.current td { color: var(--text); }
.acc-link { border: 1px dashed var(--sh-line); }
.login-btn:hover, .login-btn[aria-expanded="true"], .login-field input:focus { border-color: var(--text); }

/* ── Hover and keyboard focus on what can be clicked: the calm design pass's behaviour - a small lift and a red edge -
   in CGP colours: a thin red bar on the left edge, lifted 1 px with a faint shadow; the same for the keyboard. ── */
.card, .help-toc a { transition: transform .12s, box-shadow .12s; }
.card:hover, .card:focus-visible, .help .help-toc a:hover, .help .help-toc a:focus-visible {
  box-shadow: inset 3px 0 0 var(--accent), var(--sh-lift); transform: translateY(-1px); outline: none; }
.card:hover, .card:focus-visible { background: var(--panel); border-color: var(--sh-line); }   /* no fill (picker.css's own) */

/* ── The project cards as details on a drawing (Luka, 2026-11-06): a dimension line |------| along the bottom (no figure
   on it), in the CGP greys. (Ruler ticks down the left edge were tried and removed - Luka, 2026-11-06.) ── */
.card { position: relative; padding-bottom: 30px; }
/* The project's path sits on the card's last line, just above the dimension line, at the same height in every card of
   a row however many lines the name or description take (Luka, 2026-11-06); a path too long for the card stays on one
   line with an ellipsis, the whole path in its tooltip (picker.js). The admin's "no owner" flag stays above it. */
.card-wrap { min-width: 0; }
.card-wrap .card { display: flex; flex-direction: column; }
.card .flag { order: 1; }
.card .slug { order: 2; margin-top: auto; padding-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card::after { content: ""; position: absolute; left: 20px; right: 48px; bottom: 11px; height: 7px; pointer-events: none;
  background: linear-gradient(var(--sh-line), var(--sh-line)) center / 100% 1px no-repeat,
    linear-gradient(var(--sh-line), var(--sh-line)) left / 1px 100% no-repeat,
    linear-gradient(var(--sh-line), var(--sh-line)) right / 1px 100% no-repeat; }

/* ── Help and the guide: one panel, the contents in a plain column ── */
.help { margin-top: 24px; }
.help a { color: var(--text); text-decoration: underline; text-decoration-color: var(--sh-line); }
.help a:hover { text-decoration-color: var(--text); }
/* The privacy notice's two addresses (legal.js makes them links): the help page's link look, not the browser's blue. */
#legal-body a { color: var(--text); text-decoration: underline; text-decoration-color: var(--sh-line); }
#legal-body a:hover { text-decoration-color: var(--text); }
.help-guide a { border: 1px solid var(--sh-line); color: var(--text); text-decoration: none; background: var(--panel); }
.help-guide a:hover { background: var(--sh-hover); color: var(--text); }
.help .help-toc a { color: var(--text); text-decoration: none; }
.help:not(.guide) > .help-toc { border-right: 1px solid var(--sh-line); }

@media (prefers-reduced-motion: reduce) { .card, .help-toc a { transition: none; } }
@media print { body, body.login-bg { background: #fff !important; } }
