/* The plain look (2026-11-16, Sebastian: remove the old design, Codex is the only look).
   Pages that have no Codex version yet (docs/project/old-design-removal.md, "Still on the plain fallback") load this one file.
   It replaces ui.css, shell.css, tokens.css, living*.css and pages.css: Codex colours and type (codex/fonts.css), readable defaults
   for text, links, buttons, fields, tables and dialogs, and the old custom-property names that the pages' own styles and header.js
   still read, mapped to flat colours. No pictures, no glass, no blur, no scene. A page leaves this file by getting a Codex page. */
:root {
  color-scheme: light;
  --color-bg: #f7f2ea; --color-surface: #fffdf8; --color-surface-2: #efe8db; --color-surface-3: #e6ddcc;
  --color-ink: #1b1626; --color-ink-2: #4a4357; --color-ink-3: #5b5468; --color-line: #ddd3c1; --color-line-2: #a89c86;
  --color-accent: #ffa629; --color-accent-ink: #8a4a00; --color-on-accent: #2a1700; --color-focus: #2f6bff;
  --ok: #0b6b47; --warn: #8a4a00; --err: #b3132d;

  --f-text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-ui: var(--f-text); --font-body: var(--f-text); --font-label: var(--f-text); --font-running: var(--f-text);
  --font-display: var(--f-text); --font-heading: var(--f-text); --font-gothic: var(--f-text); --font-page-title: var(--f-text);
  --font-mono: var(--f-mono);

  --text-12: 12px; --text-14: 14px; --text-16: 16px; --text-20: 20px; --text-28: 28px; --text-40: 40px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
  --radius-panel: 12px; --radius-card: 10px; --radius-box: 8px; --radius-small: 6px; --radius-control: 8px;
  --button-small: 34px; --button: 44px; --button-large: 52px; --hit: 44px;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sidebar-width: 268px; --shell-width: 100%;
  --ease: cubic-bezier(.22, .8, .24, 1); --snap: var(--ease);
  --spring-snappy: ease-out; --spring-smooth: ease-out; --spring-flick: ease-out;
  --spring-time-snappy: 200ms; --spring-time-smooth: 250ms; --spring-time-flick: 250ms;

  /* the old role names, flat */
  --ui-text: var(--color-ink); --ui-text-soft: var(--color-ink-2); --ui-title: var(--color-ink); --ui-ink: var(--color-ink);
  --ui-label: var(--color-ink-2); --ui-link: var(--color-accent-ink); --ui-highlight: var(--color-accent-ink);
  --ui-glass: var(--color-surface); --ui-glass-edge: var(--color-line); --ui-accent: var(--color-accent);
  --ui-on-accent: var(--color-on-accent); --ui-mine: var(--color-surface-3); --ui-warn: var(--warn); --ui-wax: var(--err);
  --ui-notice: var(--color-accent-ink); --ui-mere: var(--color-focus); --ui-knot: var(--color-line-2);
  --accent: var(--color-accent); --gold: var(--color-accent-ink); --gold-hairline: var(--color-line-2); --light: var(--color-surface);
  --link: var(--color-accent-ink); --text: var(--color-ink); --ink: var(--color-ink); --soft: var(--color-ink-2);
  --wax-ink: #fff; --warm: var(--color-accent); --paper: var(--color-surface); --paper-ink: var(--color-ink);
  --paper-soft: var(--color-surface-2); --paper-line: var(--color-line); --paper-warn: var(--warn); --paper-link: var(--color-accent-ink);
  --sky: var(--color-bg); --land: var(--color-bg); --forest: var(--color-bg); --water: var(--color-focus); --mere: var(--color-focus);
  --lg-ink: 27 22 38;

  /* panes, controls and fields: flat fills with one hairline */
  --pane-fill: var(--color-surface); --pane-fill-2: var(--color-surface-2); --pane-fill-3: var(--color-surface-3);
  --pane-field: var(--color-surface); --came: var(--color-line-2); --lead: var(--color-line-2); --lead-lit: var(--color-line);
  --lead-w: 1px; --lead-w-thin: 1px; --lead-w-panel: 1px; --bevel: var(--color-line);
  --lg-veil: var(--color-surface); --lg-veil-strong: var(--color-surface); --lg-tint: none; --lg-frost: none;
  --lg-rim: inset 0 0 0 1px var(--color-line); --lg-shadow: 0 1px 2px rgb(27 22 38 / .12); --lg-shadow-small: 0 1px 1px rgb(27 22 38 / .1);
  --lg-control: var(--color-surface-2); --lg-control-hover: var(--color-surface-3); --lg-control-press: var(--color-surface-3);
  --lg-control-strong: var(--color-surface-3); --lg-control-rim: inset 0 0 0 1px var(--color-line-2);
  --lg-field: var(--color-surface); --lg-field-rim: inset 0 0 0 1px var(--color-line-2); --lg-hairline: var(--color-line);
  --cut-light: var(--lg-control); --cut-light-strong: var(--lg-control-strong); --glint: none;
  --edge: var(--color-line); --edge-strong: var(--color-line-2); --edge-hover: var(--color-ink-3); --rule: var(--color-line);
  --sheen: none; --glass-thin: var(--color-surface); --glass-thick: var(--color-surface); --glass-blur: none;
  --well: var(--color-surface); --lift: var(--lg-shadow); --rim: var(--lg-rim); --frame: none; --ga: 1;
  --focus-ring: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-focus);
  --jewel-strip: none; --jewel-strip-height: 0px; --tool-plate: var(--color-surface-3); --tool-glyph: var(--color-ink);
  --ws-row-hover: var(--color-surface-2); --ws-selected: var(--color-surface-3); --ws-subtle: var(--color-ink-3);
  --button-main: var(--color-accent); --button-main-ink: var(--color-on-accent); --button-main-rim: inset 0 0 0 1px var(--color-accent-ink);
  --button-edge: var(--color-line-2); --notice-fill: var(--color-surface-2); --notice-edge: var(--color-line-2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --color-bg: #0e0b1f; --color-surface: #1a1533; --color-surface-2: #231c45; --color-surface-3: #2d2556;
    --color-ink: #f4efff; --color-ink-2: #cbc2e8; --color-ink-3: #b9b1dd; --color-line: #2e2750; --color-line-2: #7d72b0;
    --color-accent: #d9b46a; --color-accent-ink: #e8c98a; --color-on-accent: #1a1203; --color-focus: #ffd27a;
    --ok: #7ee8be; --warn: #ffb877; --err: #ff9daa; --lg-ink: 244 239 255; }
}
:root[data-theme="dark"] { color-scheme: dark; --color-bg: #0e0b1f; --color-surface: #1a1533; --color-surface-2: #231c45; --color-surface-3: #2d2556;
  --color-ink: #f4efff; --color-ink-2: #cbc2e8; --color-ink-3: #b9b1dd; --color-line: #2e2750; --color-line-2: #7d72b0;
  --color-accent: #d9b46a; --color-accent-ink: #e8c98a; --color-on-accent: #1a1203; --color-focus: #ffd27a;
  --ok: #7ee8be; --warn: #ffb877; --err: #ff9daa; --lg-ink: 244 239 255; }

*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--color-bg); }
body { margin: 0; min-height: 100dvh; background: var(--color-bg); color: var(--color-ink); font: 400 16px/1.5 var(--f-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-text); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--color-ink); }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p, li { max-width: 70ch; }
a { color: var(--color-accent-ink); text-underline-offset: 3px; }
img, svg, video, canvas { max-width: 100%; }
code, kbd, pre, samp { font-family: var(--f-mono); font-size: .92em; }
pre { overflow: auto; padding: 12px; background: var(--color-surface-2); border: 1px solid var(--color-line); border-radius: var(--radius-box); }
hr { border: 0; border-top: 1px solid var(--color-line); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
::placeholder { color: var(--color-ink-3); }

button, .button, input[type="submit"] { min-height: var(--button); padding: 0 16px; font: 600 15px/1 var(--f-text); color: var(--color-ink);
  background: var(--color-surface-2); border: 1px solid var(--color-line-2); border-radius: var(--radius-control); cursor: pointer; }
button:hover, .button:hover { background: var(--color-surface-3); }
button.primary, .button.primary, button[type="submit"]:not(.secondary), button.accent { background: var(--color-accent); color: var(--color-on-accent); border-color: var(--color-accent-ink); }
button.danger { color: var(--err); }
button:disabled, button[aria-disabled="true"] { opacity: .55; cursor: default; }
input, select, textarea { min-height: var(--button); padding: 8px 12px; font: 400 16px/1.4 var(--f-text); color: var(--color-ink);
  background: var(--color-surface); border: 1px solid var(--color-line-2); border-radius: var(--radius-control); max-width: 100%; }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 18px; height: 18px; accent-color: var(--color-accent); }
label { color: var(--color-ink-2); }
table { border-collapse: collapse; }
th, td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--color-line); vertical-align: top; }
th { color: var(--color-ink-2); font-weight: 600; }
dialog { color: var(--color-ink); background: var(--color-surface); border: 1px solid var(--color-line-2); border-radius: var(--radius-panel); padding: 16px; max-width: min(92vw, 560px); }
dialog::backdrop { background: rgb(20 12 42 / .55); }
[hidden] { display: none !important; }
.glass, .pane, .card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-card); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: 1ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; } }
/* The header's wordmark is drawn in cream for a dark plate; on the plain light plate it is darkened (dark theme keeps it) */
.seppo-bar .bar-word { filter: brightness(.26); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seppo-bar .bar-word { filter: none; } }
:root[data-theme="dark"] .seppo-bar .bar-word { filter: none; }
