/* CWA Reborn web design system (docs/design/web-ui.md). Dark navy theme only, system fonts only, no third-party art.
   Strict CSP: no inline styles anywhere, so every variant is a class. Sections:
   1 tokens  2 base  3 type  4 layout utilities  5 buttons  6 forms  7 cards  8 badges  9 alerts  10 tables
   11 small components (stat, empty, avatar, breadcrumbs, tabs, pager, kv, meter, faq, modal, menu)  12 motion and print */

/* ============================================================================================ 1 tokens */
:root {
  color-scheme: dark;
  --bg-page: #050912;
  --bg-base: #0a1120;
  --bg-raised: #0f1a2e;
  --bg-high: #15233d;
  --bg-hover: #1b2c4b;
  --line: rgba(148, 176, 230, 0.14);
  --line-strong: rgba(148, 176, 230, 0.28);
  --text: #e9eefb;
  --text-2: #b4c1dc;
  --text-muted: #8a9bbb;
  --blue: #3b82f6;
  --blue-hi: #60a5fa;
  --blue-btn: #2563eb;
  --cyan: #38d4ff;
  --gold: #ffc233;
  --gold-deep: #ff9d1c;
  --red: #d23a3a;
  --red-hi: #f87171;
  --ok: #34d399;
  --warn: #fbbf24;
  --info: #60a5fa;
  --magenta: #f472d0;
  --mint: #5eead4;
  --orange: #fb7a3c;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 30px;
  --fs-3xl: 38px;
  --fs-4xl: 52px;
  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Bahnschrift, "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -8px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 60px -12px rgba(0, 0, 0, 0.7);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --ring: 0 0 0 3px rgba(56, 212, 255, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* Aliases of the old theme variables, so the map editor (packages/editor/public/editor.css) matches the new palette. */
  --bg-navy: var(--bg-base);
  --bg-navy-2: var(--bg-raised);
  --glow-cyan: var(--cyan);
  --accent-gold: var(--gold);
  --accent-orange: var(--gold-deep);
  --frame-steel: var(--line-strong);
  --frame-steel-dark: var(--line);
  --error: var(--red-hi);
  --radius: var(--r-sm);
}

/* ============================================================================================ 2 base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
::selection { background: rgba(59, 130, 246, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 100;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-sm);
  background: var(--gold); color: #1a1204; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--s-3); }

/* the starfield and the glows behind every page (CSS only) */
.space-bg { position: relative; isolation: isolate; }
.space-bg::before, .space-bg::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.space-bg::before {
  background:
    radial-gradient(1100px 600px at 85% -12%, rgba(59, 130, 246, 0.2), transparent 62%),
    radial-gradient(800px 520px at -8% 8%, rgba(56, 212, 255, 0.08), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(255, 157, 28, 0.06), transparent 60%),
    linear-gradient(180deg, #071022 0%, var(--bg-page) 55%);
}
.space-bg::after {
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(255, 255, 255, 0.8), transparent 70%),
    radial-gradient(1px 1px at 141px 97px, rgba(200, 220, 255, 0.7), transparent 70%),
    radial-gradient(1.5px 1.5px at 211px 23px, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(1px 1px at 77px 181px, rgba(180, 210, 255, 0.6), transparent 70%),
    radial-gradient(1px 1px at 263px 211px, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(1.5px 1.5px at 171px 257px, rgba(255, 230, 190, 0.7), transparent 70%),
    radial-gradient(1px 1px at 31px 283px, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(1px 1px at 293px 127px, rgba(190, 220, 255, 0.6), transparent 70%);
  background-size: 310px 310px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 55%, rgba(0, 0, 0, 0.25) 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.6) 55%, rgba(0, 0, 0, 0.25) 100%);
}

/* ============================================================================================ 3 type */
h1, h2, h3, h4, h5 { margin: 0 0 var(--s-3); line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
h5 { font-size: var(--fs-base); }
p { margin: 0 0 var(--s-3); }
ul, ol { margin: 0 0 var(--s-3); padding-left: 1.3em; }
li + li { margin-top: 2px; }
small, .small { font-size: var(--fs-sm); }
strong, b { font-weight: 650; }
a { color: var(--blue-hi); text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #93c5fd; text-decoration: underline; }
p a, li a, td a, dd a, .prose a { text-decoration: underline; text-decoration-color: rgba(96, 165, 250, 0.45); }
p a:hover, li a:hover, .prose a:hover { text-decoration-color: currentColor; }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.88em; }
code { padding: 1px 6px; border-radius: 6px; background: rgba(148, 176, 230, 0.1); border: 1px solid var(--line); color: #dbe7ff; overflow-wrap: anywhere; }
kbd { display: inline-block; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--bg-high); color: var(--text); font-size: 0.82em; line-height: 1.4; }
pre { margin: 0 0 var(--s-4); padding: var(--s-4); border-radius: var(--r-md); background: #070d1a; border: 1px solid var(--line); overflow-x: auto; line-height: 1.5; color: #dbe7ff; }
pre code { padding: 0; border: 0; background: none; }
blockquote { margin: 0 0 var(--s-4); padding: var(--s-2) var(--s-4); border-left: 3px solid var(--gold); color: var(--text-2); background: rgba(255, 194, 51, 0.05); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.display { font-family: var(--font-display); font-stretch: condensed; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; line-height: 1.02; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-3); font-family: var(--font-display); font-stretch: condensed; font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.lead { font-size: var(--fs-md); line-height: 1.6; color: var(--text-2); max-width: 62ch; }
.muted { color: var(--text-muted); }
.text-2 { color: var(--text-2); }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.nums, .num { font-variant-numeric: tabular-nums; }
.text-ok { color: var(--ok); } .text-warn { color: var(--warn); } .text-error, .error-text { color: var(--red-hi); } .text-gold { color: var(--gold); }
.prose { max-width: 72ch; line-height: 1.7; color: var(--text-2); }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: var(--s-6); }
.prose strong { color: var(--text); }
.prose img { border-radius: var(--r-md); }
/* the gold slash before section titles */
.slash::before, .section-title::before {
  content: ""; display: inline-block; flex: none; width: 10px; height: 0.9em; margin-right: 10px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep)); transform: skewX(-18deg); border-radius: 2px; vertical-align: -0.08em;
}
.section-title { display: flex; align-items: center; font-size: var(--fs-xl); margin: 0 0 var(--s-4); }

/* ============================================================================================ 4 layout utilities */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.row.nowrap { flex-wrap: nowrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack.tight { gap: var(--s-2); }
.stack.loose { gap: var(--s-8); }
.grid { display: grid; gap: var(--s-4); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1 1 auto; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); } .mb-8 { margin-bottom: var(--s-8); }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-4 { gap: var(--s-4); } .gap-6 { gap: var(--s-6); } .gap-8 { gap: var(--s-8); }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--s-4) 0; }
@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
}
@media (min-width: 641px) { .show-sm { display: none !important; } }

/* ============================================================================================ 5 buttons */
.btn, button, input[type="submit"], input[type="button"] {
  --btn-bg: var(--bg-high);
  --btn-bg-hover: var(--bg-hover);
  --btn-fg: var(--text);
  --btn-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px; margin: 0;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; letter-spacing: 0.005em; white-space: nowrap;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-line); border-radius: var(--r-sm);
  box-shadow: var(--highlight), var(--shadow-1);
  cursor: pointer; text-decoration: none; user-select: none;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
}
.btn:hover, button:hover { background: var(--btn-bg-hover); color: var(--btn-fg); text-decoration: none; border-color: rgba(148, 176, 230, 0.4); }
.btn:active, button:active { transform: translateY(1px); }
.btn:focus-visible, button:focus-visible { outline: none; box-shadow: var(--ring), var(--shadow-1); }
.btn svg, button svg { width: 18px; height: 18px; }
.btn.primary, button.primary { --btn-bg: var(--blue-btn); --btn-bg-hover: #2f6ff0; --btn-fg: #fff; --btn-line: rgba(147, 197, 253, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 18px -6px rgba(37, 99, 235, 0.7); }
.btn.primary:hover, button.primary:hover { border-color: rgba(191, 219, 254, 0.5); }
.btn.cta, button.cta {
  --btn-bg: linear-gradient(180deg, #ffd25a 0%, var(--gold) 45%, var(--gold-deep) 100%);
  --btn-bg-hover: linear-gradient(180deg, #ffdc7a 0%, #ffcb4a 45%, #ffa933 100%);
  --btn-fg: #1d1304; --btn-line: rgba(255, 214, 120, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 24px -8px rgba(255, 157, 28, 0.65);
  font-weight: 700;
}
.btn.danger, button.danger { --btn-bg: #b92f2f; --btn-bg-hover: #cc3636; --btn-fg: #fff; --btn-line: rgba(252, 165, 165, 0.35); }
.btn.ghost, button.ghost { --btn-bg: transparent; --btn-bg-hover: rgba(148, 176, 230, 0.1); --btn-line: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover, button.ghost:hover { color: var(--text); border-color: transparent; }
.btn.outline, button.outline { --btn-bg: transparent; --btn-bg-hover: rgba(148, 176, 230, 0.08); box-shadow: none; }
.btn.link, button.link { --btn-bg: transparent; --btn-bg-hover: transparent; --btn-line: transparent; box-shadow: none; padding: 0; min-height: 0; color: var(--blue-hi); }
.btn.sm, button.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.btn.sm svg, button.sm svg { width: 16px; height: 16px; }
.btn.lg, button.lg { min-height: 48px; padding: 0 24px; font-size: 16px; border-radius: 10px; }
.btn.lg svg, button.lg svg { width: 20px; height: 20px; }
.btn.block, button.block { display: flex; width: 100%; }
.btn.icon-only, button.icon-only { padding: 0; width: 38px; }
.btn.icon-only.sm, button.icon-only.sm { width: 32px; }
.btn:disabled, button:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; pointer-events: none; }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }

/* ============================================================================================ 6 forms */
label { color: var(--text); }
input, select, textarea {
  font: inherit; font-size: 14.5px; color: var(--text);
  background: var(--bg-high); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  min-height: 40px; padding: 8px 12px; max-width: 100%;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.15s var(--ease);
}
input::placeholder, textarea::placeholder { color: #6b7c9c; }
input:hover, select:hover, textarea:hover { border-color: rgba(148, 176, 230, 0.42); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-hi); box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25); background: #172843; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"], .field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red-hi); }
input[type="number"] { font-variant-numeric: tabular-nums; }
textarea { width: 100%; min-height: 120px; line-height: 1.55; resize: vertical; }
textarea.code, textarea.mono { font-family: var(--font-mono); font-size: 13.5px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4c1dc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
select[multiple] { background-image: none; padding-right: 12px; }
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none;
  display: inline-grid; place-content: center; vertical-align: -3px;
  background: var(--bg-high); border: 1.5px solid rgba(148, 176, 230, 0.5); border-radius: 5px; cursor: pointer;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform 0.12s var(--ease); background: #fff; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
input[type="radio"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; transform: scale(0); transition: transform 0.12s var(--ease); background: #fff; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--blue-btn); border-color: var(--blue-hi); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: none; box-shadow: var(--ring); }
input[type="file"] { padding: 6px; min-height: 0; }
input[type="color"] { padding: 2px; width: 48px; }
input[type="range"] { padding: 0; accent-color: var(--blue); border: 0; background: transparent; min-height: 0; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 var(--s-4); min-width: 0; }
.field > label, .field-label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.field .req { color: var(--red-hi); margin-left: 2px; }
.field .optional { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea { width: 100%; }
.field .hint, .hint { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.45; }
.field .error, .field-error { font-size: var(--fs-sm); color: var(--red-hi); display: flex; gap: 6px; align-items: center; }
.field .error svg, .field-error svg { width: 15px; height: 15px; }
.input-group { display: flex; align-items: stretch; }
.input-group > input { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1 1 auto; min-width: 0; }
.input-group > .btn, .input-group > button { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; min-height: 40px; }
.input-icon { position: relative; display: block; }
.input-icon > svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.input-icon > input { padding-left: 38px; width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-all { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-2); }
.form-actions.end { justify-content: flex-end; }
.form-actions.split { justify-content: space-between; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 var(--s-3); cursor: pointer; line-height: 1.4; }
.check > input { margin-top: 1px; }
.check .hint { display: block; margin-top: 2px; }
fieldset { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5) var(--s-2); border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(15, 26, 46, 0.6); min-width: 0; }
legend { padding: 0 var(--s-2); font-weight: 650; font-size: 14px; color: var(--text); }
fieldset.plain { border: 0; padding: 0; background: none; }
/* toggle switch: <label class="switch"><input type="checkbox" name="x"><span class="track"></span> Label</label> */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 40px; height: 22px; flex: none; border-radius: 999px; background: #22324f; border: 1px solid var(--line-strong); transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease); }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #c9d5ec; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); transition: transform 0.2s var(--ease), background-color 0.2s var(--ease); }
.switch input:checked + .track { background: var(--blue-btn); border-color: var(--blue-hi); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.switch input:disabled + .track { opacity: 0.5; }
/* selectable cards: <label class="choice-card"><input type="radio" name="x"><span class="choice-body"><strong>Title</strong><span class="hint">...</span></span></label> */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-3); margin: 0 0 var(--s-4); }
.choice-card { position: relative; display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--bg-raised); cursor: pointer; transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.choice-card:hover { border-color: rgba(148, 176, 230, 0.45); background: #13203a; }
.choice-card > input { margin-top: 2px; }
.choice-card .choice-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-card:has(input:checked) { border-color: var(--blue-hi); background: rgba(37, 99, 235, 0.12); box-shadow: 0 0 0 1px var(--blue-hi) inset; }
.choice-card:has(input:focus-visible) { box-shadow: var(--ring); }
.choice-card:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 640px) { .form-grid, .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================================================ 7 cards */
.card {
  position: relative; display: block; min-width: 0;
  background: linear-gradient(180deg, rgba(21, 35, 61, 0.55), rgba(15, 26, 46, 0.92) 120px), var(--bg-raised);
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--highlight), var(--shadow-2);
  padding: var(--s-5) var(--s-6);
  margin: 0 0 var(--s-5);
}
.card > :last-child { margin-bottom: 0; }
.grid > .card, .row > .card, .stack > .card, .cards > .card { margin-bottom: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .table-wrap { border: 0; border-radius: 0; margin: 0; box-shadow: none; }
.card.flush > .card-head + .table-wrap { border-top: 1px solid var(--line); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin: 0 0 var(--s-4); }
.card.flush > .card-head { margin: 0; padding: var(--s-4) var(--s-5); }
.card-head h2, .card-head h3 { margin: 0; font-size: var(--fs-md); font-weight: 650; }
.card-head p { margin: 2px 0 0; color: var(--text-muted); font-size: var(--fs-sm); }
.card-head .actions { margin-left: auto; display: flex; gap: var(--s-2); flex-wrap: wrap; }
.card-body { padding: var(--s-5); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-5) calc(var(--s-6) * -1) calc(var(--s-5) * -1); padding: var(--s-3) var(--s-6); border-top: 1px solid var(--line); background: rgba(5, 9, 18, 0.35); border-radius: 0 0 var(--r-md) var(--r-md); }
.card.flush > .card-foot { margin: 0; padding: var(--s-3) var(--s-5); }
.card.link, a.card { color: inherit; text-decoration: none; transition: border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.card.link:hover, a.card:hover { color: inherit; text-decoration: none; border-color: rgba(96, 165, 250, 0.45); transform: translateY(-2px); box-shadow: var(--highlight), var(--shadow-3); }
.card.link h3, a.card h3 { display: flex; align-items: center; gap: var(--s-2); }
.card.glass { background: rgba(15, 26, 46, 0.62); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: rgba(148, 176, 230, 0.18); }
.card.accent { border-top: 2px solid var(--gold); }
.card.danger-zone { border-color: rgba(248, 113, 113, 0.4); }
.card.danger-zone .card-head h2, .card.danger-zone .card-head h3 { color: #fca5a5; }
.card .card-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; margin: 0 0 var(--s-3); color: var(--cyan); background: rgba(56, 212, 255, 0.1); border: 1px solid rgba(56, 212, 255, 0.22); }
.card .card-icon svg { width: 22px; height: 22px; }

/* ============================================================================================ 8 badges and pills */
.badge, .pill {
  --b-fg: var(--text-2); --b-bg: rgba(148, 176, 230, 0.1); --b-line: rgba(148, 176, 230, 0.22);
  display: inline-flex; align-items: center; gap: 6px; vertical-align: 1px;
  padding: 2px 10px; min-height: 22px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  color: var(--b-fg); background: var(--b-bg); border: 1px solid var(--b-line);
}
.badge { border-radius: 6px; padding: 1px 8px; }
.badge svg, .pill svg { width: 13px; height: 13px; }
.pill .dot, .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.live .dot, .badge.live .dot { box-shadow: 0 0 0 0 currentColor; animation: cwa-pulse 2s infinite; }
.badge.ok, .pill.ok { --b-fg: #6ee7b7; --b-bg: rgba(52, 211, 153, 0.12); --b-line: rgba(52, 211, 153, 0.35); }
.badge.warn, .pill.warn { --b-fg: #fcd34d; --b-bg: rgba(251, 191, 36, 0.12); --b-line: rgba(251, 191, 36, 0.38); }
.badge.error, .pill.error { --b-fg: #fca5a5; --b-bg: rgba(248, 113, 113, 0.12); --b-line: rgba(248, 113, 113, 0.38); }
.badge.info, .pill.info { --b-fg: #93c5fd; --b-bg: rgba(96, 165, 250, 0.12); --b-line: rgba(96, 165, 250, 0.38); }
.badge.gold, .pill.gold { --b-fg: #ffd66b; --b-bg: rgba(255, 194, 51, 0.12); --b-line: rgba(255, 194, 51, 0.4); }
.badge.neutral, .pill.neutral { --b-fg: var(--text-2); }
.badge.solid { --b-fg: #08101f; }
.badge.solid.ok { --b-bg: var(--ok); } .badge.solid.warn { --b-bg: var(--warn); } .badge.solid.error { --b-bg: var(--red-hi); } .badge.solid.info { --b-bg: var(--blue-hi); } .badge.solid.gold { --b-bg: var(--gold); }
/* staff role colours: the in-game name colours */
.badge.role-admin, .pill.role-admin { --b-fg: #ff8a8a; --b-bg: rgba(255, 91, 91, 0.12); --b-line: rgba(255, 91, 91, 0.4); }
.badge.role-architect, .pill.role-architect { --b-fg: #ff9a6b; --b-bg: rgba(251, 122, 60, 0.12); --b-line: rgba(251, 122, 60, 0.4); }
.badge.role-moderator, .pill.role-moderator, .badge.role-enforcer, .pill.role-enforcer { --b-fg: #5ef0a0; --b-bg: rgba(63, 224, 138, 0.12); --b-line: rgba(63, 224, 138, 0.38); }
.badge.role-emissary, .pill.role-emissary { --b-fg: #ff8bff; --b-bg: rgba(255, 91, 255, 0.12); --b-line: rgba(255, 91, 255, 0.38); }
.badge.role-counselor, .pill.role-counselor { --b-fg: #7affd6; --b-bg: rgba(102, 255, 204, 0.1); --b-line: rgba(102, 255, 204, 0.35); }
.badge.role-player, .pill.role-player { --b-fg: var(--text-2); }
.role-admin { color: #ff6b6b; } .role-architect { color: #ff8a55; } .role-moderator, .role-enforcer { color: #3fe08a; } .role-emissary { color: #ff6bff; } .role-counselor { color: #66ffcc; } .role-player { color: inherit; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================================================ 9 alerts (flash messages render as alerts) */
.alert {
  --a-color: var(--info); --a-bg: rgba(96, 165, 250, 0.09); --a-line: rgba(96, 165, 250, 0.32);
  display: flex; gap: var(--s-3); align-items: flex-start;
  margin: 0 0 var(--s-5); padding: var(--s-3) var(--s-4);
  border: 1px solid var(--a-line); border-left: 3px solid var(--a-color); border-radius: var(--r-sm);
  background: var(--a-bg); color: var(--text);
}
.alert > svg { width: 20px; height: 20px; color: var(--a-color); margin-top: 1px; }
.alert-body { flex: 1 1 auto; min-width: 0; }
.alert-body > :last-child { margin-bottom: 0; }
.alert-title { display: block; font-weight: 650; margin-bottom: 2px; }
.alert.ok { --a-color: var(--ok); --a-bg: rgba(52, 211, 153, 0.08); --a-line: rgba(52, 211, 153, 0.3); }
.alert.error { --a-color: var(--red-hi); --a-bg: rgba(248, 113, 113, 0.08); --a-line: rgba(248, 113, 113, 0.32); }
.alert.warn { --a-color: var(--warn); --a-bg: rgba(251, 191, 36, 0.08); --a-line: rgba(251, 191, 36, 0.32); }
.alert.gold { --a-color: var(--gold); --a-bg: rgba(255, 194, 51, 0.07); --a-line: rgba(255, 194, 51, 0.3); }

/* ============================================================================================ 10 tables */
.table-wrap { position: relative; width: 100%; overflow-x: auto; margin: 0 0 var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-raised); box-shadow: var(--highlight), var(--shadow-1); -webkit-overflow-scrolling: touch; }
.table-wrap.scroll-y { max-height: 70vh; overflow-y: auto; }
table { border-collapse: collapse; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data th, table.data td { padding: 10px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
table.data thead th { position: sticky; top: 0; z-index: 1; background: #111d33; color: var(--text-muted); font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
table.data tbody tr { transition: background-color 0.12s var(--ease); }
table.data tbody tr:hover { background: rgba(96, 165, 250, 0.05); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.mono, table.data td code { font-family: var(--font-mono); font-size: 13px; }
table.data td.actions, table.data th.actions { text-align: right; white-space: nowrap; width: 1%; }
table.data td.actions .btn-group, table.data td.actions form { justify-content: flex-end; flex-wrap: nowrap; }
table.data .row-title { font-weight: 600; color: var(--text); }
table.data .row-sub { display: block; color: var(--text-muted); font-size: 12.5px; }
table.data.compact th, table.data.compact td { padding: 6px 10px; }
table.data.striped tbody tr:nth-child(even) { background: rgba(148, 176, 230, 0.03); }
table.data tfoot td { background: rgba(5, 9, 18, 0.3); font-weight: 600; }
.table-wrap > table.data { margin: 0; }
.table-toolbar { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }

/* ============================================================================================ 11 small components */
/* stat card: <div class="stat"><span class="stat-label">Online</span><span class="stat-value">42</span><span class="stat-meta">+3 today</span></div> */
.stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-raised); box-shadow: var(--highlight), var(--shadow-1); min-width: 0; overflow: hidden; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.stat-label svg { width: 17px; height: 17px; color: var(--cyan); }
.stat-value { font-family: var(--font-display); font-stretch: condensed; font-size: 34px; font-weight: 700; line-height: 1.05; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-meta { font-size: 12.5px; color: var(--text-muted); }
.stat.ok .stat-value { color: var(--ok); } .stat.warn .stat-value { color: var(--warn); } .stat.error .stat-value { color: var(--red-hi); } .stat.gold .stat-value { color: var(--gold); }
a.stat { color: inherit; text-decoration: none; transition: border-color 0.15s var(--ease); }
a.stat:hover { border-color: rgba(96, 165, 250, 0.45); color: inherit; text-decoration: none; }
/* empty state */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); padding: var(--s-10) var(--s-6); color: var(--text-muted); border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: rgba(10, 17, 32, 0.4); margin: 0 0 var(--s-5); }
.empty .empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: var(--text-2); background: var(--bg-high); border: 1px solid var(--line); margin-bottom: var(--s-2); }
.empty .empty-icon svg { width: 26px; height: 26px; }
.empty h3, .empty .empty-title { margin: 0; font-size: var(--fs-md); color: var(--text); }
.empty p { margin: 0; max-width: 46ch; }
.empty .btn-group { margin-top: var(--s-3); }
.card .empty, .table-wrap .empty { border: 0; background: none; margin: 0; }
/* avatar: initials in a coloured circle, colour picked by class av-0..av-7 */
.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: #334155; border: 1px solid rgba(255, 255, 255, 0.14); text-transform: uppercase; user-select: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 11.5px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.xl { width: 72px; height: 72px; font-size: 26px; }
.avatar.av-0 { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.avatar.av-1 { background: linear-gradient(135deg, #0891b2, #155e75); }
.avatar.av-2 { background: linear-gradient(135deg, #059669, #065f46); }
.avatar.av-3 { background: linear-gradient(135deg, #d97706, #92400e); }
.avatar.av-4 { background: linear-gradient(135deg, #dc2626, #7f1d1d); }
.avatar.av-5 { background: linear-gradient(135deg, #9333ea, #581c87); }
.avatar.av-6 { background: linear-gradient(135deg, #db2777, #831843); }
.avatar.av-7 { background: linear-gradient(135deg, #64748b, #334155); }
/* breadcrumbs */
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; margin: 0; min-width: 0; }
.breadcrumbs li + li::before { content: "/"; color: rgba(148, 176, 230, 0.35); }
.breadcrumbs a { color: var(--text-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }
/* tabs made of links: <nav class="tabs" aria-label="..."><a href aria-current="page">One</a><a href>Two</a></nav> */
.tabs { display: flex; gap: 2px; margin: 0 0 var(--s-5); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--text-muted); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.tabs a svg { width: 16px; height: 16px; }
.tabs a:hover { color: var(--text); background: rgba(148, 176, 230, 0.06); }
.tabs a[aria-current="page"], .tabs a.active { color: var(--text); }
.tabs a[aria-current="page"]::after, .tabs a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--gold); }
.tabs .count { font-size: 11.5px; padding: 0 7px; border-radius: 999px; background: var(--bg-high); color: var(--text-2); }
/* segmented control (links or buttons) */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg-base); border: 1px solid var(--line); }
.segmented a, .segmented button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; box-shadow: none; color: var(--text-muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; }
.segmented a[aria-current], .segmented a.active, .segmented button[aria-pressed="true"] { background: var(--bg-high); color: var(--text); box-shadow: var(--shadow-1); }
/* pagination */
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: var(--s-4) 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg-raised); color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.pagination a:hover { border-color: var(--line-strong); color: var(--text); background: var(--bg-high); }
.pagination [aria-current="page"] { background: var(--blue-btn); border-color: var(--blue-hi); color: #fff; }
.pagination .gap { border: 0; background: none; min-width: 20px; }
.pagination .disabled { opacity: 0.4; }
.pagination svg { width: 16px; height: 16px; }
/* definition list of key/value pairs */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 0; margin: 0 0 var(--s-4); }
.kv dt, .kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--text-muted); font-size: 13.5px; padding-right: var(--s-6); }
.kv dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
@media (max-width: 480px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dt { border-bottom: 0; padding-bottom: 0; } }
/* meter: <div class="meter" role="meter" aria-valuenow="40" ...><span class="m-40"></span></div> (width classes in steps of 10) */
.meter { height: 8px; border-radius: 999px; background: var(--bg-high); overflow: hidden; border: 1px solid var(--line); }
.meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.meter.gold > span { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.meter.ok > span { background: var(--ok); } .meter.warn > span { background: var(--warn); } .meter.error > span { background: var(--red-hi); }
.meter .m-0 { width: 0; } .meter .m-10 { width: 10%; } .meter .m-20 { width: 20%; } .meter .m-30 { width: 30%; } .meter .m-40 { width: 40%; } .meter .m-50 { width: 50%; }
.meter .m-60 { width: 60%; } .meter .m-70 { width: 70%; } .meter .m-80 { width: 80%; } .meter .m-90 { width: 90%; } .meter .m-100 { width: 100%; }
progress { width: 100%; height: 8px; accent-color: var(--blue); }
/* status dot */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex: none; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18); }
.status-dot.error { background: var(--red-hi); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18); }
/* FAQ accordion */
details.faq-row { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-raised); margin: 0 0 var(--s-2); }
details.faq-row > summary { display: flex; align-items: center; gap: var(--s-3); padding: 14px var(--s-5); cursor: pointer; font-weight: 600; list-style: none; border-radius: var(--r-md); }
details.faq-row > summary::-webkit-details-marker { display: none; }
details.faq-row > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg) translateY(-3px); transition: transform 0.2s var(--ease); flex: none; }
details.faq-row[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
details.faq-row > summary:hover { background: rgba(148, 176, 230, 0.05); }
details.faq-row > :not(summary) { padding: 0 var(--s-5); color: var(--text-2); }
details.faq-row > :last-child:not(summary) { padding-bottom: var(--s-4); }
details > summary { cursor: pointer; }
/* disclosure (any details) */
details.disclosure > summary { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-hi); font-weight: 600; font-size: 14px; }
/* modal dialog */
dialog.modal { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--bg-raised); color: var(--text); box-shadow: var(--shadow-3), 0 0 0 1px rgba(0, 0, 0, 0.4); }
dialog.modal::backdrop { background: rgba(3, 6, 14, 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
dialog.modal[open] { animation: cwa-pop 0.18s var(--ease); }
.modal-body { display: flex; gap: var(--s-4); padding: var(--s-6) var(--s-6) var(--s-4); }
.modal-body h2 { font-size: var(--fs-lg); margin: 0 0 var(--s-2); }
.modal-body p { color: var(--text-2); margin: 0; }
.modal-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; color: var(--red-hi); background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); }
.modal-icon svg { width: 22px; height: 22px; }
.modal-icon.info { color: var(--blue-hi); background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.3); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-6); border-top: 1px solid var(--line); background: rgba(5, 9, 18, 0.35); }
/* dropdown menu: <details class="menu"><summary>...</summary><div class="menu-panel">links</div></details> */
details.menu { position: relative; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: #0f1a2e; box-shadow: var(--shadow-3); animation: cwa-pop 0.14s var(--ease); }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px; background: none; box-shadow: none; color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; justify-content: flex-start; }
.menu-panel a:hover, .menu-panel button:hover, .menu-panel a:focus-visible, .menu-panel button:focus-visible { background: var(--bg-high); color: var(--text); text-decoration: none; }
.menu-panel svg { width: 17px; height: 17px; color: var(--text-muted); }
.menu-panel form { margin: 0; }
.menu-panel .menu-sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-panel .menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-panel .menu-head strong { display: block; color: var(--text); }
.menu-panel .menu-head span { font-size: 12.5px; color: var(--text-muted); }
/* tooltip (pure CSS, decorative only: the same text must be in an aria-label or title) */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 70; padding: 5px 9px; border-radius: 6px; background: #1d2d4c; border: 1px solid var(--line-strong); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-2); }
/* copy field */
.copy-field { display: flex; gap: var(--s-2); align-items: stretch; }
.copy-field input { flex: 1 1 auto; min-width: 0; font-family: var(--font-mono); }
.copied { color: var(--ok) !important; }

/* the wordmark (every shell): the small plaque mark and "CWA REBORN" */
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.wordmark:hover { color: var(--text); text-decoration: none; }
.wordmark-mark { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.wordmark-text { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); font-stretch: condensed; font-weight: 700; text-transform: uppercase; line-height: 1; }
.wordmark-text .wm-a { font-size: 21px; letter-spacing: 0.06em; color: #f2f5fc; }
.wordmark-text .wm-b { font-size: 21px; letter-spacing: 0.12em; color: var(--gold); }
.wordmark-text .wm-tag { align-self: center; margin-left: 4px; padding: 2px 7px; border-radius: 5px; font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-2); background: var(--bg-high); border: 1px solid var(--line); }

/* ============================================================================================ 12 motion and print */
@keyframes cwa-pop { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes cwa-pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@keyframes cwa-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: #fff !important; color: #000 !important; }
  .space-bg::before, .space-bg::after { display: none; }
  .site-header, .site-footer, .admin-sidebar, .admin-topbar, .btn, button, .skip-link { display: none !important; }
  .card, .table-wrap, .stat { box-shadow: none !important; border-color: #999 !important; background: #fff !important; color: #000 !important; }
  a { color: #000; text-decoration: underline; }
}
