/* Hallmark · shape: app screen · genre: editorial utility · themes: kamo, mielenosoitukset, xr, general
 * pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: V, one shell with four token sets; fixed by per-theme display face, header treatment, radius and border weight
 * built: Kamo v1 · 2026-11-08 */

:root {
  --container: 1160px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display-transform: none;
  --display-tracking: -0.015em;
  --display-leading: 1.08;
  --display-weight: 700;
  --btn-font: var(--font-body);
  --btn-transform: none;
  --btn-tracking: 0;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --border-width: 1px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

html[data-theme="kamo"] {
  --paper: #f4efe6;
  --paper-2: #ebe4d6;
  --surface: #fffdf8;
  --surface-2: #f8f3e9;
  --ink: #22231f;
  --ink-2: #3c3a32;
  --muted: #6b665b;
  --rule: #d9d0c0;
  --accent: #1f4b3f;
  --accent-hover: #173a30;
  --accent-ink: #fffdf8;
  --accent-soft: #dfe9e2;
  --signal: #b4653a;
  --signal-ink: #ffffff;
  --signal-soft: #f5e3d7;
  --ok: #2f6b4f;
  --ok-soft: #e2eee7;
  --warn: #8a5a15;
  --warn-soft: #f6ead2;
  --danger: #9d3326;
  --danger-soft: #f5e0db;
  --info: #3860aa;
  --info-soft: #e5ebf5;
  --focus: #b4653a;
  --focus-soft: #e9c6b1;
  --header-bg: #f4efe6;
  --header-ink: #22231f;
  --header-muted: #6b665b;
  --header-rule: #d9d0c0;
  --header-border: 1px solid #d9d0c0;
  --header-btn-bg: #1f4b3f;
  --header-btn-ink: #fffdf8;
  --footer-bg: #1f332b;
  --footer-ink: #f7f3e9;
  --footer-muted: #c0cbc3;
  --footer-rule: #3a5145;
  --brand-mark-bg: #1f4b3f;
  --brand-mark-ink: #fffdf8;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(34, 35, 31, 0.06), 0 8px 24px rgba(34, 35, 31, 0.04);
  --font-display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display-weight: 700;
}

html[data-theme="kamo"][data-mode="dark"] {
  --paper: #171a16;
  --paper-2: #1e221d;
  --surface: #212620;
  --surface-2: #272d26;
  --ink: #f2eee5;
  --ink-2: #d8d2c5;
  --muted: #a39c8d;
  --rule: #3b4239;
  --accent: #8fc3a9;
  --accent-hover: #a8d3bd;
  --accent-ink: #10231b;
  --accent-soft: #263a2f;
  --signal: #e39a6d;
  --signal-ink: #2a160c;
  --signal-soft: #3a271c;
  --ok: #8bd3ad;
  --ok-soft: #1e3328;
  --warn: #e5be74;
  --warn-soft: #332a16;
  --danger: #f0a094;
  --danger-soft: #3a211d;
  --info: #9db8e8;
  --info-soft: #1d2a3d;
  --focus: #e39a6d;
  --focus-soft: #4a3223;
  --header-bg: #171a16;
  --header-ink: #f2eee5;
  --header-muted: #a39c8d;
  --header-rule: #3b4239;
  --header-border: 1px solid #3b4239;
  --header-btn-bg: #8fc3a9;
  --header-btn-ink: #10231b;
  --footer-bg: #111410;
  --footer-ink: #f2eee5;
  --footer-muted: #a39c8d;
  --footer-rule: #30362e;
  --brand-mark-bg: #8fc3a9;
  --brand-mark-ink: #10231b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px rgba(0, 0, 0, 0.22);
}

html[data-theme="mielenosoitukset"] {
  --paper: #f6f8fb;
  --paper-2: #edf2f9;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --ink: #172033;
  --ink-2: #33405a;
  --muted: #647083;
  --rule: #dce3ec;
  --accent: #0033a0;
  --accent-hover: #00267a;
  --accent-ink: #ffffff;
  --accent-soft: #e6edff;
  --signal: #ff6600;
  --signal-ink: #ffffff;
  --signal-soft: #fff0e5;
  --ok: #18794e;
  --ok-soft: #e7f6ee;
  --warn: #8a5a15;
  --warn-soft: #fff6df;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --info: #0033a0;
  --info-soft: #e6edff;
  --focus: #0033a0;
  --focus-soft: #c2d0f5;
  --header-bg: linear-gradient(120deg, #002b86 0%, #0033a0 55%, #0a4bc4 100%);
  --header-ink: #ffffff;
  --header-muted: #cfdcff;
  --header-rule: #4a6fd0;
  --header-border: 0;
  --header-btn-bg: #ffffff;
  --header-btn-ink: #0033a0;
  --footer-bg: #0c1b3d;
  --footer-ink: #f2f5fa;
  --footer-muted: #b7c0ce;
  --footer-rule: #2b3c63;
  --brand-mark-bg: #ffffff;
  --brand-mark-ink: #0033a0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 35, 80, 0.06), 0 10px 30px rgba(16, 35, 80, 0.06);
  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --display-weight: 800;
  --display-tracking: -0.025em;
  --display-leading: 1.08;
}

html[data-theme="mielenosoitukset"][data-mode="dark"] {
  --paper: #171b22;
  --paper-2: #1c222b;
  --surface: #20252d;
  --surface-2: #252b34;
  --ink: #f2f5fa;
  --ink-2: #d5dce7;
  --muted: #b7c0ce;
  --rule: #424b59;
  --accent: #8bb1ff;
  --accent-hover: #a9c5ff;
  --accent-ink: #081736;
  --accent-soft: #263453;
  --signal: #ff8a3d;
  --signal-ink: #2a1200;
  --signal-soft: #3a2414;
  --ok: #6ee7a8;
  --ok-soft: #1c3328;
  --warn: #ffd27a;
  --warn-soft: #332a16;
  --danger: #ff9b91;
  --danger-soft: #3a1f1d;
  --info: #8bb1ff;
  --info-soft: #233250;
  --focus: #8bb1ff;
  --focus-soft: #2c3d63;
  --header-bg: linear-gradient(120deg, #0b1730, #14264d);
  --header-ink: #f2f5fa;
  --header-muted: #b7c0ce;
  --header-rule: #33436a;
  --header-border: 0;
  --header-btn-bg: #f2f5fa;
  --header-btn-ink: #081736;
  --footer-bg: #10141a;
  --footer-ink: #f2f5fa;
  --footer-muted: #b7c0ce;
  --footer-rule: #333b47;
  --brand-mark-bg: #8bb1ff;
  --brand-mark-ink: #081736;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px rgba(0, 0, 0, 0.2);
}

html[data-theme="xr"] {
  --paper: #f2efe6;
  --paper-2: #eae6da;
  --surface: #fffdf7;
  --surface-2: #f5f1e6;
  --ink: #0a0a0a;
  --ink-2: #232323;
  --muted: #5b5a54;
  --rule: #0a0a0a;
  --accent: #caff11;
  --accent-hover: #d7ff4d;
  --accent-ink: #0a0a0a;
  --accent-soft: #e9ffb0;
  --signal: #c80082;
  --signal-ink: #ffffff;
  --signal-soft: #f7d6ea;
  --ok: #1d6b32;
  --ok-soft: #dff3df;
  --warn: #7a4c00;
  --warn-soft: #fff0c7;
  --danger: #a3005f;
  --danger-soft: #f7d6ea;
  --info: #195555;
  --info-soft: #d9ecec;
  --focus: #c80082;
  --focus-soft: #f0a9d0;
  --header-bg: #0a0a0a;
  --header-ink: #ffffff;
  --header-muted: #c9c9c9;
  --header-rule: #4a4a4a;
  --header-border: 3px solid #caff11;
  --header-btn-bg: #caff11;
  --header-btn-ink: #0a0a0a;
  --footer-bg: #0a0a0a;
  --footer-ink: #ffffff;
  --footer-muted: #bdbdbd;
  --footer-rule: #3a3a3a;
  --brand-mark-bg: #caff11;
  --brand-mark-ink: #0a0a0a;
  --radius: 0px;
  --radius-sm: 0px;
  --radius-pill: 0px;
  --border-width: 2px;
  --shadow: 4px 4px 0 #0a0a0a;
  --font-display: "FUCXED CAPS", "Arial Narrow", Arial, sans-serif;
  --font-body: "Crimson Text", Georgia, serif;
  --display-transform: uppercase;
  --display-tracking: 0.01em;
  --display-leading: 0.9;
  --display-weight: 400;
  --btn-font: var(--font-display);
  --btn-transform: uppercase;
  --btn-tracking: 0.03em;
}

html[data-theme="xr"][data-mode="dark"] {
  --paper: #0a0a0a;
  --paper-2: #101010;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --ink: #ffffff;
  --ink-2: #e6e6e6;
  --muted: #bdbdbd;
  --rule: #3a3a3a;
  --accent: #caff11;
  --accent-hover: #d7ff4d;
  --accent-ink: #0a0a0a;
  --accent-soft: #263300;
  --signal: #ff1493;
  --signal-ink: #0a0a0a;
  --signal-soft: #3a0022;
  --ok: #caff11;
  --ok-soft: #223000;
  --warn: #ffc11e;
  --warn-soft: #332600;
  --danger: #ff1493;
  --danger-soft: #3a0022;
  --info: #75d0f1;
  --info-soft: #123039;
  --focus: #ff1493;
  --focus-soft: #5c0035;
  --header-bg: #0a0a0a;
  --header-ink: #ffffff;
  --header-muted: #bdbdbd;
  --header-rule: #3a3a3a;
  --header-border: 3px solid #caff11;
  --header-btn-bg: #caff11;
  --header-btn-ink: #0a0a0a;
  --footer-bg: #0a0a0a;
  --footer-ink: #ffffff;
  --footer-muted: #bdbdbd;
  --footer-rule: #3a3a3a;
  --brand-mark-bg: #caff11;
  --brand-mark-ink: #0a0a0a;
  --shadow: 4px 4px 0 #caff11;
}

html[data-theme="general"] {
  --paper: #f7f8f6;
  --paper-2: #eef2ef;
  --surface: #ffffff;
  --surface-2: #f3f6f3;
  --ink: #1b2422;
  --ink-2: #34413d;
  --muted: #64716c;
  --rule: #dbe3df;
  --accent: #1f6b5c;
  --accent-hover: #175247;
  --accent-ink: #ffffff;
  --accent-soft: #e2efea;
  --signal: #b4653a;
  --signal-ink: #ffffff;
  --signal-soft: #f5e3d7;
  --ok: #166b4a;
  --ok-soft: #e4f2ea;
  --warn: #8a5a15;
  --warn-soft: #f7ecd6;
  --danger: #a3342a;
  --danger-soft: #f7e2de;
  --info: #2b5f8a;
  --info-soft: #e6eef5;
  --focus: #1f6b5c;
  --focus-soft: #b9d8ce;
  --header-bg: #f7f8f6;
  --header-ink: #1b2422;
  --header-muted: #64716c;
  --header-rule: #dbe3df;
  --header-border: 1px solid #dbe3df;
  --header-btn-bg: #1f6b5c;
  --header-btn-ink: #ffffff;
  --footer-bg: #1b2422;
  --footer-ink: #f7f8f6;
  --footer-muted: #b7c3be;
  --footer-rule: #34413d;
  --brand-mark-bg: #1f6b5c;
  --brand-mark-ink: #ffffff;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(27, 36, 34, 0.06);
  --font-display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display-weight: 700;
}

html[data-theme="general"][data-mode="dark"] {
  --paper: #141816;
  --paper-2: #191e1b;
  --surface: #1c221f;
  --surface-2: #222925;
  --ink: #eef3ef;
  --ink-2: #d3dcd7;
  --muted: #a0aca6;
  --rule: #39443f;
  --accent: #7fc3b1;
  --accent-hover: #9bd4c4;
  --accent-ink: #0c211b;
  --accent-soft: #243731;
  --signal: #e39a6d;
  --signal-ink: #2a160c;
  --signal-soft: #3a271c;
  --ok: #8bd3ad;
  --ok-soft: #1e3328;
  --warn: #e5be74;
  --warn-soft: #332a16;
  --danger: #f0a094;
  --danger-soft: #3a211d;
  --info: #9db8e8;
  --info-soft: #1d2a3d;
  --focus: #7fc3b1;
  --focus-soft: #2a4a40;
  --header-bg: #141816;
  --header-ink: #eef3ef;
  --header-muted: #a0aca6;
  --header-rule: #39443f;
  --header-border: 1px solid #39443f;
  --header-btn-bg: #7fc3b1;
  --header-btn-ink: #0c211b;
  --footer-bg: #0f1210;
  --footer-ink: #eef3ef;
  --footer-muted: #a0aca6;
  --footer-rule: #2b342f;
  --brand-mark-bg: #7fc3b1;
  --brand-mark-ink: #0c211b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: clip;
}

html[data-theme="xr"] body {
  font-size: 1.06rem;
  line-height: 1.6;
}

main {
  flex: 1;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

h1,
h2,
h3 {
  margin: 0 0 0.55em;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.15rem, 4.4vw, 3.5rem);
  line-height: var(--display-leading);
  letter-spacing: var(--display-tracking);
  text-transform: var(--display-transform);
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  letter-spacing: var(--display-tracking);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

code,
.key-reveal {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

.muted {
  color: var(--muted);
}

.count {
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.lead {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.5;
}

html[data-theme="xr"] .lead {
  font-size: clamp(1.12rem, 1.8vw, 1.3rem);
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  color: var(--header-ink);
  border-bottom: var(--header-border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.5rem;
  padding-block: 0.65rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--header-ink);
  text-decoration: none;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  background: var(--brand-mark-bg);
  color: var(--brand-mark-ink);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand__mark--sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.8rem;
}

.brand__text {
  display: grid;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.brand__sub {
  color: var(--header-muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.nav a {
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid transparent;
  color: var(--header-ink);
  text-decoration: none;
  opacity: 0.82;
}

.nav a:hover {
  opacity: 1;
}

.nav a[aria-current="page"] {
  border-bottom-color: var(--header-ink);
  opacity: 1;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.topbar .btn--quiet {
  background: transparent;
  border-color: var(--header-rule);
  color: var(--header-ink);
}

.topbar .btn--quiet:hover {
  background: var(--header-rule);
}

.topbar .btn--primary {
  background: var(--header-btn-bg);
  border-color: var(--header-btn-bg);
  color: var(--header-btn-ink);
}

.topbar .btn--primary:hover {
  background: var(--header-btn-bg);
  color: var(--header-btn-ink);
  opacity: 0.88;
}

/* Admin bar */

.adminbar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--rule);
}

.adminbar__inner {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  font-size: 0.88rem;
}

.adminbar a {
  padding: 0.7rem 0.7rem;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.adminbar a:hover {
  color: var(--ink);
}

.adminbar a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.adminbar__exit {
  margin-left: auto;
  color: var(--muted) !important;
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.05rem;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--btn-font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: var(--btn-tracking);
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: var(--btn-transform);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn--quiet {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink);
}

.btn--quiet:hover {
  background: var(--surface-2);
  border-color: var(--ink);
}

.btn--danger {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.btn--danger:hover {
  background: var(--danger);
  color: var(--paper);
}

.btn--sm {
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.84rem;
}

.btn--block {
  width: 100%;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.linkish--danger {
  color: var(--danger);
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1rem;
  width: fit-content;
}

.arrow-link::after {
  content: "→";
  font-family: var(--font-body);
  transition: transform 0.15s ease;
}

.arrow-link:hover::after {
  transform: translateX(0.2rem);
}

.backlink {
  display: inline-block;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.backlink::before {
  content: "← ";
}

.backlink:hover {
  color: var(--ink);
}

/* Layout blocks */

.hero {
  padding-block: clamp(2.5rem, 6vw, 4.75rem) clamp(2rem, 4vw, 3rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.hero__copy h1 {
  max-width: 18ch;
  margin-bottom: 0.4em;
}

html[data-theme="xr"] .hero__copy h1 {
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  max-width: 16ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.hero__meta {
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero__panel {
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.82rem;
}

.hero__facts strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: var(--display-weight);
}

.panel {
  background: var(--surface);
  border: var(--border-width) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel__title {
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: var(--display-weight);
}

.steps {
  display: grid;
  gap: 0.9rem;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.steps li > span {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: var(--display-weight);
}

html[data-theme="xr"] .steps li > span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.steps strong {
  display: block;
  font-size: 0.95rem;
}

.steps p {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.section {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section--tight {
  padding-block: clamp(1.75rem, 4vw, 3rem);
}

.section--tint {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section__head h2 {
  margin: 0;
}

.section__head--small {
  margin-bottom: 1rem;
}

.section__head--small h2 {
  font-size: 1.2rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.split--wide {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
}

.stack {
  display: grid;
  gap: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: clamp(1rem, 2vw, 1.4rem);
  background: var(--surface);
  border: var(--border-width) solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card--spaced {
  margin-top: 1.5rem;
}

.card--highlight {
  margin-bottom: 1.5rem;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.card__title {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

a.card:hover {
  border-color: var(--ink);
}

/* Warehouse and item cards */

.warehouse-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.warehouse-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
}

.warehouse-card h2,
.warehouse-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.warehouse-card h2 a,
.warehouse-card h3 a {
  text-decoration: none;
}

.warehouse-card h2 a:hover,
.warehouse-card h3 a:hover {
  text-decoration: underline;
}

.warehouse-card p {
  margin: 0;
}

.warehouse-card .arrow-link {
  margin-top: auto;
  padding-top: 0.6rem;
}

.warehouse-card--wide {
  gap: 0.7rem;
}

.item-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.item-card__category {
  color: var(--muted);
  font-size: 0.8rem;
}

.item-card__stock {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
}

.chip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.chip:hover {
  border-color: var(--ink);
}

/* Page head */

.page-head {
  padding-block: clamp(2rem, 4vw, 3.25rem) clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  margin-bottom: 0.25em;
}

.page-head .lead {
  margin-bottom: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.title-row h1 {
  margin: 0;
}

/* Facts, prose, lists */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.5rem;
  margin: 0;
}

.facts--stack {
  grid-template-columns: 1fr;
}

.facts div {
  min-width: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.facts dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 1.8rem;
  font-size: 1.35rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.checklist {
  display: grid;
  gap: 0.55rem;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.35rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  border-radius: var(--radius-pill);
}

html[data-theme="xr"] .checklist li::before {
  border-radius: 0;
}

.callout {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--signal);
  background: var(--signal-soft);
  color: var(--ink);
}

.callout p:last-child {
  margin-bottom: 0;
}

.instruction {
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}

.instruction__label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.note {
  margin-top: 0.8rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface-2);
  border-left: 3px solid var(--warn);
  font-size: 0.9rem;
}

/* Tables and filters */

.filterbar {
  display: flex;
  align-items: end;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.filterbar .field {
  flex: 1 1 180px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.card .table-wrap {
  margin-inline: calc(clamp(1rem, 2vw, 1.4rem) * -1);
  width: calc(100% + clamp(1rem, 2vw, 1.4rem) * 2);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.table th {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table--compact td,
.table--compact th {
  padding-block: 0.6rem;
}

.table .num {
  text-align: right;
  white-space: nowrap;
}

.table td:first-child {
  min-width: 11rem;
}

.row-note {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.catalog-group {
  margin-bottom: 2.5rem;
}

.catalog-group:last-child {
  margin-bottom: 0;
}

/* Forms */

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field > span {
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
}

.field textarea {
  min-height: 6rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 0;
}

.field--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.field--inline > span {
  font-weight: 500;
}

.field--inline input {
  width: 6rem;
  max-width: 45%;
  text-align: right;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.form-actions--end {
  justify-content: flex-end;
}

.qty {
  width: 5.5rem;
  text-align: right;
}

/* Booking */

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.72fr);
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.booking-form {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

.booking-form .panel {
  padding: clamp(1rem, 2.4vw, 1.5rem);
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.panel__head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.step-no {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: var(--display-weight);
}

html[data-theme="xr"] .step-no {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.booking-group {
  margin-top: 1.4rem;
}

.booking-group:first-of-type {
  margin-top: 0;
}

.booking-group h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.booking-side {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6rem;
}

.booking-card {
  display: grid;
  gap: 0.7rem;
}

.booking-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.booking-card h2 {
  margin: 0.1rem 0 0;
  font-size: 1.2rem;
}

.ref {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* Status and notices */

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.badge--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--info {
  background: var(--info-soft);
  color: var(--info);
}

.badge--muted {
  background: var(--surface-2);
  color: var(--muted);
}

html[data-theme="xr"] .badge {
  border: 1px solid currentColor;
}

.flash {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rule);
  border-left-width: 5px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.92rem;
}

.flash--ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ink);
}

.flash--err {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  color: var(--ink);
}

.empty {
  padding: 2rem 1.25rem;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  text-align: center;
}

.empty__title {
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: var(--display-weight);
}

.empty__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Stats */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  display: grid;
  gap: 0.1rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: var(--border-width) solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

html[data-theme="xr"] .stat {
  border-left-width: 2px;
  border-color: var(--rule);
  border-left-color: var(--accent);
}

.stat__label {
  color: var(--muted);
  font-size: 0.8rem;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: var(--display-weight);
  line-height: 1.2;
}

.stat__note {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Theme picker */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.theme-option {
  display: flex;
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.theme-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.theme-option input {
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.theme-option__body {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.86rem;
}

.theme-option__body strong {
  font-size: 0.95rem;
}

.theme-option__body span:last-child {
  color: var(--muted);
}

.swatches {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.2rem;
}

.swatches span {
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

/* Auth */

.auth-section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.auth-shell {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(100%, 29rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.auth-card h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.auth-switch {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.auth-switch a {
  color: var(--ink);
  font-weight: 600;
}

.error-code {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: var(--display-weight);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="xr"] .error-code {
  letter-spacing: 0.08em;
}

/* Admin API */

.key-reveal {
  display: block;
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* Instance home */

.org-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.org-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.org-card h3 {
  margin: 0.25rem 0 0;
  font-size: 1.2rem;
}

.org-card__stats {
  margin-top: auto;
  padding-top: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.feature-card h3 {
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Footer */

.footer {
  margin-top: 2rem;
  padding-top: clamp(2rem, 4vw, 3rem);
  background: var(--footer-bg);
  color: var(--footer-ink);
  border-top: var(--header-border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer__grid--instance {
  grid-template-columns: 1.5fr 1fr 1fr;
}

.footer__brand {
  display: flex;
  gap: 0.7rem;
  align-items: start;
}

.footer__name {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: var(--display-weight);
}

.footer__note {
  max-width: 38ch;
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.86rem;
}

.footer__title {
  margin: 0 0 0.5rem;
  color: var(--footer-ink);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.footer p {
  margin: 0 0 0.3rem;
  color: var(--footer-muted);
  font-size: 0.88rem;
}

.footer__links {
  display: grid;
  gap: 0.3rem;
  list-style: none;
  font-size: 0.88rem;
}

.footer__links a {
  color: var(--footer-muted);
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--footer-ink);
  text-decoration: underline;
}

.footer .btn--quiet {
  border-color: var(--footer-rule);
  color: var(--footer-ink);
}

.footer .btn--quiet:hover {
  background: var(--footer-rule);
}

.footer__base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--footer-rule);
  color: var(--footer-muted);
  font-size: 0.78rem;
  flex-wrap: wrap;
}

/* XR specifics */

html[data-theme="xr"] .section__head {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule);
}

html[data-theme="xr"] .section__head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

html[data-theme="xr"] .brand__mark {
  font-size: 1.1rem;
}

html[data-theme="xr"] .hero__panel {
  background: var(--surface-2);
}

html[data-theme="xr"] .footer {
  border-top: 3px solid var(--accent);
}

html[data-theme="xr"] .footer__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

html[data-theme="xr"] .btn--quiet {
  border-width: 2px;
}

html[data-theme="xr"] .table th {
  color: var(--ink-2);
}

/* Mielenosoitus specifics */

html[data-theme="mielenosoitukset"] .topbar {
  border-bottom: 0;
}

html[data-theme="mielenosoitukset"] .hero__panel {
  border-top: 6px solid var(--signal);
}

html[data-theme="mielenosoitukset"] .section--tint {
  border-block: 0;
}

/* Responsive */

@media (max-width: 1000px) {
  .hero__grid,
  .split,
  .split--wide,
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .booking-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .topbar__inner {
    gap: 0.75rem;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .nav a {
    white-space: nowrap;
  }

  .topbar__actions {
    margin-left: auto;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-side {
    grid-template-columns: 1fr;
  }

  .footer__grid,
  .footer__grid--instance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .theme-grid {
    grid-template-columns: 1fr;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .brand__sub {
    display: none;
  }

  .topbar__actions .btn--quiet {
    display: none;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .section__head {
    align-items: start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .filterbar .field {
    flex-basis: 100%;
  }

  .footer__grid,
  .footer__grid--instance {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer__base {
    flex-direction: column;
    gap: 0.25rem;
  }

  .table {
    font-size: 0.88rem;
  }

  .table th,
  .table td {
    padding-inline: 0.55rem;
  }

  .field--inline {
    align-items: start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .field--inline input {
    width: 100%;
    max-width: none;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* XR poster pass: one loud field, flat panels, no offset shadows. */

html[data-theme="xr"],
html[data-theme="xr"][data-mode="dark"] {
  --shadow: none;
  --radius: 0px;
  --radius-sm: 0px;
  --radius-pill: 0px;
}

html[data-theme="xr"] .card,
html[data-theme="xr"] .panel,
html[data-theme="xr"] .stat,
html[data-theme="xr"] .empty,
html[data-theme="xr"] .table-wrap,
html[data-theme="xr"] .flash {
  border-radius: 0;
  box-shadow: none;
}

html[data-theme="xr"] .hero__panel {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--ink);
}

html[data-theme="xr"] .hero__panel .panel__title,
html[data-theme="xr"] .hero__panel h2,
html[data-theme="xr"] .hero__panel h3,
html[data-theme="xr"] .hero__panel strong {
  color: var(--accent-ink);
}

html[data-theme="xr"] .hero__panel .muted,
html[data-theme="xr"] .hero__panel .steps p,
html[data-theme="xr"] .hero__panel .hero__facts {
  color: var(--accent-ink);
}

html[data-theme="xr"] .hero__panel .hero__facts {
  border-top-color: var(--ink);
}

html[data-theme="xr"] .hero__panel .steps li > span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}

html[data-theme="xr"] .section--tint {
  background: var(--ink);
  color: var(--paper);
  border-block: 0;
}

html[data-theme="xr"] .section--tint h2,
html[data-theme="xr"] .section--tint h3,
html[data-theme="xr"] .section--tint .arrow-link {
  color: var(--paper);
}

html[data-theme="xr"] .section--tint .chip {
  background: transparent;
  border-color: var(--paper);
  color: var(--paper);
}

html[data-theme="xr"] .section--tint .chip span {
  color: var(--paper);
}

html[data-theme="xr"] .btn,
html[data-theme="xr"] .field input,
html[data-theme="xr"] .field select,
html[data-theme="xr"] .field textarea,
html[data-theme="xr"] .badge,
html[data-theme="xr"] .chip {
  border-radius: 0;
}

html[data-theme="xr"] .btn {
  box-shadow: none;
}
