/* FWF house style, dark: the palette and type of the AI & Automation-barometer. Shared by host screen and phone. */
:root {
  --bg: #1c0f47;
  --surface: #120a30;
  --surface-2: #1a0e40;
  --deep: #291065;
  --ink: #f4f2fb;
  --muted: #b9b3d1;
  --faint: #8a82ad;
  --accent: #a68bf5;
  --accent-strong: #c9b8ff;
  --on-accent: #120a30;
  --line: #33275e;
  --unknown: #5d5384;
  --ok: #8be3c0;
  --alert: #ffb4a8;
  --radius: 8px;
  color-scheme: dark;
  font-family: Montserrat, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display { font-family: Outfit, Montserrat, sans-serif; font-weight: 600; line-height: 1.12; margin: 0; }
p { margin: 0; }
.accent { color: var(--accent); }
h1 .accent { white-space: nowrap; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
[hidden] { display: none !important; }

/* Logo on a white plate, as on the barometer */
.plate { background: #fff; padding: 6px 10px; display: inline-flex; align-items: center; }
.plate img { height: 28px; display: block; }

/* Buttons and language toggle */
.btn { font: inherit; font-weight: 600; padding: 12px 20px; border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .4; cursor: default; }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang { display: flex; gap: 4px; }
.lang button { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: var(--radius); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Cards and forms */
.card { background: var(--surface); border: 1px solid var(--line); padding: clamp(20px, 4vw, 40px); }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input, select { width: 100%; font: inherit; padding: 11px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 0; }
.error { color: var(--alert); font-size: 14px; min-height: 1.4em; margin: 10px 0 0; }

/* Theme band: image on the right, deep violet fading in from the left, accent stripe */
.band { position: relative; color: #fff; background: var(--deep) center right / cover no-repeat; overflow: hidden; display: flex; gap: 16px; align-items: center; }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--deep) 30%, color-mix(in srgb, var(--deep) 70%, transparent) 55%, transparent 85%); }
.band::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); }
.band > * { position: relative; z-index: 1; }
.band .label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 2px; }
.tile-icon { flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--accent-strong) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent-strong) 45%, transparent); border-radius: var(--radius); width: 52px; height: 52px; }
.tile-icon svg { width: 55%; height: 55%; stroke: var(--accent-strong); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Answer tiles: letter, text and, once known, a fill with the share of the room */
.tiles { display: grid; gap: 8px; }
.tile { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.tile .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--accent) 26%, transparent); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.tile.unknown .fill { background: color-mix(in srgb, var(--unknown) 45%, transparent); }
.tile.best { border-color: var(--accent); }
.tile.best .fill { background: color-mix(in srgb, var(--accent) 42%, transparent); }
.tile > :not(.fill) { position: relative; }
.tile .letter { flex: none; width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 6px; font-weight: 700; font-size: .85em; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-strong); }
.tile.unknown .letter { background: color-mix(in srgb, var(--unknown) 40%, transparent); color: var(--muted); }
.tile .text { flex: 1; min-width: 0; }
.tile .pct { flex: none; font-family: Outfit, sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .4s .5s; }
.tile .pct small { font-family: Montserrat, sans-serif; font-weight: 500; color: var(--muted); margin-left: 6px; font-size: .7em; }
.tiles.shown .pct { opacity: 1; }

/* Gauge */
.gauge { width: 100%; max-width: 320px; display: block; }
.gauge .score { font-family: Outfit, sans-serif; font-weight: 600; font-size: 54px; fill: var(--ink); }
.gauge .score-sub { font-size: 15px; fill: var(--muted); }

/* Score per theme */
.dims { display: grid; gap: 14px; }
.dim { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 3ch; gap: 14px; align-items: center; }
.dim .track { position: relative; height: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.dim .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.dim .tick { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.dim .val { font-family: Outfit, sans-serif; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.dim.gap .name::after { content: attr(data-gap); margin-left: 10px; font-size: .7em; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-accent); background: var(--accent-strong); padding: 2px 6px; vertical-align: middle; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.legend i { display: inline-block; width: 14px; height: 10px; background: var(--accent); margin-right: 6px; vertical-align: middle; }
.legend i.tick { width: 3px; height: 14px; background: var(--ink); }

/* scale, not transform: positioned elements keep their own transform (e.g. centring) */
@keyframes pop { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Slightly rounded corners and the tight headlines of the decks */
h1, h2, h3, .display { letter-spacing: -.02em; }
.plate { border-radius: 6px; }
.card, .tile, .tile-icon, input, select, .btn { border-radius: var(--radius); }
.band { border-radius: var(--radius); }
.dim .track, .dim .bar { border-radius: 999px; }
.dim.gap .name::after { border-radius: 4px; }
