/* FSCLN Apps Design System v1 — shared copy for every FSCLN app, served from /shared/_ds/apps/v1/.
 * Source: the "FSCLN Apps Design System" artifact (dist/fscln-apps.css, version 1794833830-7f67).
 * One change from the source: its Google Fonts @import is replaced by the @font-face rules below,
 * pointing at the self-hosted WOFF2 files in /shared/assets/fonts/ (OFL, licences alongside).
 * No ?v= needed: the version is the directory. A token change is a new /shared/_ds/apps/v2/. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/shared/assets/fonts/instrument-sans-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/shared/assets/fonts/jetbrains-mono-latin-400.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/shared/assets/fonts/jetbrains-mono-latin-500.woff2") format("woff2"); }
/* FSCLN Apps Design System: tokens (generated from tokens.json) */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #ecebe8;
  --surface: #f7f6f3;
  --surface-raised: #ffffff;
  --surface-sunken: #dfddd8;
  --ink: #1b1b1a;
  --ink-muted: #5c5a56;
  --ink-faint: #8a8781;
  --outline: #7e7b75;
  --outline-variant: #d6d3cd;
  --contour: #1b1b1a;
  --primary: #1b1b1a;
  --on-primary: #f7f6f3;
  --accent-orange: #ec7a3c;
  --accent-blue: #7fb2e5;
  --accent-green: #5fb873;
  --accent-yellow: #f5c84b;
  --accent-cream: #f4ead8;
  --on-accent: #1b1b1a;
  --link: #2a62b8;
  --focus: #2a62b8;
  --danger: #b3261e;
  --danger-fill: #d63c2f;
  --on-danger-fill: #ffffff;
  --scrim: rgba(12, 12, 11, 0.48);
  --chart-track: #d6d3cd;
  --elevation-0: none;
  --elevation-1: 0 1px 2px rgba(27, 27, 26, 0.08), 0 1px 3px rgba(27, 27, 26, 0.06);
  --elevation-2: 0 2px 6px rgba(27, 27, 26, 0.10), 0 8px 24px rgba(27, 27, 26, 0.08);
  --elevation-3: 0 12px 40px rgba(27, 27, 26, 0.16);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1c1c1a;
  --surface-raised: #262624;
  --surface-sunken: #0b0b0a;
  --ink: #f2f0eb;
  --ink-muted: #a9a59e;
  --ink-faint: #6f6c66;
  --outline: #75726c;
  --outline-variant: #2e2d2a;
  --contour: #050505;
  --primary: #f2f0eb;
  --on-primary: #1b1b1a;
  --accent-orange: #ec7a3c;
  --accent-blue: #7fb2e5;
  --accent-green: #5fb873;
  --accent-yellow: #f5c84b;
  --accent-cream: #f4ead8;
  --on-accent: #1b1b1a;
  --link: #8cbcf0;
  --focus: #8cbcf0;
  --danger: #ffb4ab;
  --danger-fill: #d63c2f;
  --on-danger-fill: #ffffff;
  --scrim: rgba(0, 0, 0, 0.64);
  --chart-track: #2e2d2a;
  --elevation-0: none;
  --elevation-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --elevation-2: 0 2px 6px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
  --elevation-3: 0 12px 40px rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211;
    --surface: #1c1c1a;
    --surface-raised: #262624;
    --surface-sunken: #0b0b0a;
    --ink: #f2f0eb;
    --ink-muted: #a9a59e;
    --ink-faint: #6f6c66;
    --outline: #75726c;
    --outline-variant: #2e2d2a;
    --contour: #050505;
    --primary: #f2f0eb;
    --on-primary: #1b1b1a;
    --accent-orange: #ec7a3c;
    --accent-blue: #7fb2e5;
    --accent-green: #5fb873;
    --accent-yellow: #f5c84b;
    --accent-cream: #f4ead8;
    --on-accent: #1b1b1a;
    --link: #8cbcf0;
    --focus: #8cbcf0;
    --danger: #ffb4ab;
    --danger-fill: #d63c2f;
    --on-danger-fill: #ffffff;
    --scrim: rgba(0, 0, 0, 0.64);
    --chart-track: #2e2d2a;
    --elevation-0: none;
    --elevation-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --elevation-2: 0 2px 6px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);
    --elevation-3: 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}
:root {
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 64px;
  --radius-none: 0px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 28px;
  --radius-full: 999px;
  --stroke-hairline: 1px;
  --stroke-control: 1.5px;
  --stroke-contour: 2px;
  --bp-compact: 0px;
  --bp-medium: 600px;
  --bp-expanded: 840px;
  --bp-large: 1200px;
  --state-hover: 0.08;
  --state-focus: 0.10;
  --state-pressed: 0.12;
  --state-dragged: 0.16;
  --state-disabled: 0.38;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
.display-l { font-family: var(--font-sans); font-size: 57px; line-height: 64px; font-weight: 500; letter-spacing: -0.02em; }
.display-m { font-family: var(--font-sans); font-size: 45px; line-height: 52px; font-weight: 500; letter-spacing: -0.02em; }
.display-s { font-family: var(--font-sans); font-size: 36px; line-height: 44px; font-weight: 500; letter-spacing: -0.015em; }
.headline-l { font-family: var(--font-sans); font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -0.01em; }
.headline-m { font-family: var(--font-sans); font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -0.01em; }
.headline-s { font-family: var(--font-sans); font-size: 24px; line-height: 32px; font-weight: 500; }
.title-l { font-family: var(--font-sans); font-size: 22px; line-height: 28px; font-weight: 500; }
.title-m { font-family: var(--font-sans); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: 0.01em; }
.title-s { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.01em; }
.body-l { font-family: var(--font-sans); font-size: 16px; line-height: 24px; font-weight: 400; }
.body-m { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.body-s { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: 0.02em; }
.label-l { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.01em; }
.label-m { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.03em; }
.label-s { font-family: var(--font-sans); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.05em; }
.numeric-xl { font-family: var(--font-sans); font-size: 64px; line-height: 64px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.numeric-l { font-family: var(--font-sans); font-size: 40px; line-height: 44px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.numeric-m { font-family: var(--font-sans); font-size: 24px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mono-m { font-family: var(--font-mono); font-size: 13px; line-height: 20px; font-weight: 400; }
.mono-s { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; }

/* FSCLN Apps Design System: components. Pure CSS, class prefix fx-. Needs the tokens. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
.fx-app, body.fx-app {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 24px;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.fx-muted { color: var(--ink-muted); }
.fx-mono { font-family: var(--font-mono); }
.fx-num { font-variant-numeric: tabular-nums; }
.fx-overline { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.fx-link { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.fx-icon { width: 20px; height: 20px; flex: none; display: inline-block; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-icon--s { width: 16px; height: 16px; }
.fx-icon--l { width: 24px; height: 24px; }
:where(.fx-btn, .fx-icon-btn, .fx-fab, .fx-chip, .fx-seg__item, .fx-nav__item, .fx-list__item, .fx-tool, .fx-switch input, .fx-check input, .fx-knob, .fx-tab):focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}

/* State layer (M3): overlay of currentColor */
.fx-state { position: relative; isolation: isolate; }
.fx-state::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; transition: opacity 120ms ease; z-index: -1; }
.fx-state:hover::after { opacity: var(--state-hover); }
.fx-state:focus-visible::after { opacity: var(--state-focus); }
.fx-state:active::after { opacity: var(--state-pressed); }

/* ---------- Layout ---------- */
.fx-page { padding: var(--space-4); max-width: 1200px; margin: 0 auto; display: grid; gap: var(--space-4); }
@media (min-width: 600px) { .fx-page { padding: var(--space-6); gap: var(--space-6); } }
.fx-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.fx-stack { display: grid; gap: var(--space-3); }

/* ---------- Button ---------- */
.fx-btn {
  --_bg: var(--primary); --_fg: var(--on-primary); --_bd: transparent;
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px; padding: 0 var(--space-5); border-radius: var(--radius-full);
  border: var(--stroke-control) solid var(--_bd); background: var(--_bg); color: var(--_fg);
  font: 600 14px/20px var(--font-sans); letter-spacing: .01em; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform 120ms ease;
}
.fx-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity 120ms ease; pointer-events: none; }
.fx-btn:hover::after { opacity: var(--state-hover); }
.fx-btn:active::after { opacity: var(--state-pressed); }
.fx-btn:active { transform: scale(.98); }
.fx-btn:has(> .fx-icon:first-child) { padding-left: var(--space-4); }
.fx-btn--tonal { --_bg: var(--surface-sunken); --_fg: var(--ink); }
.fx-btn--outlined { --_bg: transparent; --_fg: var(--ink); --_bd: var(--outline); }
.fx-btn--text { --_bg: transparent; --_fg: var(--ink); padding: 0 var(--space-3); }
.fx-btn--accent { --_bg: var(--accent-orange); --_fg: var(--on-accent); --_bd: var(--contour); border-width: var(--stroke-contour); }
.fx-btn--danger { --_bg: var(--danger-fill); --_fg: var(--on-danger-fill); }
.fx-btn--s { min-height: 32px; padding: 0 var(--space-4); font-size: 13px; }
.fx-btn--l { min-height: 56px; padding: 0 var(--space-7); font-size: 16px; }
.fx-btn--block { width: 100%; }
.fx-btn:disabled, .fx-btn[aria-disabled="true"] { opacity: var(--state-disabled); pointer-events: none; }

/* ---------- Icon button + FAB ---------- */
.fx-icon-btn {
  position: relative; isolation: isolate; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-full);
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.fx-icon-btn::before { content: ""; position: absolute; inset: 4px; border-radius: inherit; background: var(--_bg, transparent); border: var(--_bdw, 0) solid var(--_bd, transparent); z-index: -1; }
.fx-icon-btn::after { content: ""; position: absolute; inset: 4px; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; transition: opacity 120ms; }
.fx-icon-btn:hover::after { opacity: var(--state-hover); }
.fx-icon-btn:active::after { opacity: var(--state-pressed); }
.fx-icon-btn--filled { color: var(--on-primary); --_bg: var(--primary); }
.fx-icon-btn--tonal { --_bg: var(--surface-sunken); }
.fx-icon-btn--outlined { --_bd: var(--outline); --_bdw: var(--stroke-control); }
.fx-icon-btn[aria-pressed="true"] { color: var(--on-primary); --_bg: var(--primary); }
.fx-icon-btn .fx-badge-dot { position: absolute; top: 6px; right: 6px; }
.fx-fab {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-width: 56px; height: 56px; padding: 0 var(--space-4);
  border-radius: 18px; border: var(--stroke-contour) solid var(--contour); background: var(--accent-orange); color: var(--on-accent);
  font: 600 14px/20px var(--font-sans); box-shadow: var(--elevation-2); cursor: pointer; position: relative;
}
.fx-fab::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity 120ms; }
.fx-fab:hover::after { opacity: var(--state-hover); }
.fx-fab--round { border-radius: var(--radius-full); width: 56px; padding: 0; }

/* ---------- Text field ---------- */
.fx-field { display: grid; gap: 6px; min-width: 0; }
.fx-field__label { font: 600 12px/16px var(--font-sans); letter-spacing: .03em; color: var(--ink-muted); }
.fx-field__control { position: relative; min-width: 0; display: flex; align-items: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-4);
  background: var(--surface-sunken); border-radius: var(--radius-md); border: var(--stroke-control) solid transparent; color: var(--ink); transition: border-color 120ms, background 120ms; }
.fx-field__control:hover { border-color: var(--outline-variant); }
.fx-field__control:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.fx-field input, .fx-field textarea, .fx-field select { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: inherit; font: 400 16px/24px var(--font-sans); padding: 12px 0; appearance: none; }
.fx-field textarea { resize: vertical; min-height: 96px; }
.fx-field select { cursor: pointer; }
.fx-field .fx-mono { font-family: var(--font-mono); }
.fx-field input::placeholder, .fx-field textarea::placeholder { color: var(--ink-faint); }
.fx-field__affix { color: var(--ink-muted); font: 400 14px/20px var(--font-sans); }
.fx-field__help { font: 400 12px/16px var(--font-sans); letter-spacing: .02em; color: var(--ink-muted); }
.fx-field--error .fx-field__control { border-color: var(--danger); }
.fx-field--error .fx-field__help { color: var(--danger); }
.fx-field--outlined .fx-field__control { background: transparent; border-color: var(--outline); }
.fx-field--dense .fx-field__control { min-height: 36px; border-radius: var(--radius-sm); padding: 0 var(--space-3); }
.fx-field--dense input, .fx-field--dense select { font-size: 14px; padding: 6px 0; }
.fx-search { border-radius: var(--radius-full); background: var(--surface); }

/* ---------- Card + tile ---------- */
.fx-card { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; align-content: start; gap: var(--space-3); color: var(--ink); }
.fx-card--raised { background: var(--surface-raised); box-shadow: var(--elevation-1); }
.fx-card--outlined { background: transparent; border: var(--stroke-hairline) solid var(--outline-variant); }
.fx-card__title { font: 600 16px/24px var(--font-sans); margin: 0; }
.fx-card__media { margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; aspect-ratio: 16/9; background: var(--surface-sunken); }
.fx-card__actions { display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }
a.fx-card, button.fx-card { text-decoration: none; text-align: left; border: 0; cursor: pointer; font: inherit; }

/* Tile: the contoured widget block */
.fx-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); padding: var(--space-2); background: var(--surface-sunken); border-radius: calc(var(--radius-xl) + var(--space-2)); }
@media (min-width: 600px) { .fx-tiles { gap: var(--space-3); padding: var(--space-3); border-radius: calc(var(--radius-xl) + var(--space-3)); } }
.fx-tile { --_bg: var(--surface-raised); --_fg: var(--ink); background: var(--_bg); color: var(--_fg); border: var(--stroke-contour) solid var(--contour);
  border-radius: var(--radius-xl); padding: var(--space-4) var(--space-5); min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.fx-tile--orange { --_bg: var(--accent-orange); --_fg: var(--on-accent); }
.fx-tile--blue { --_bg: var(--accent-blue); --_fg: var(--on-accent); }
.fx-tile--green { --_bg: var(--accent-green); --_fg: var(--on-accent); }
.fx-tile--yellow { --_bg: var(--accent-yellow); --_fg: var(--on-accent); }
.fx-tile--cream { --_bg: var(--accent-cream); --_fg: var(--on-accent); }
.fx-tile--ink { --_bg: var(--primary); --_fg: var(--on-primary); }
.fx-tile--round { border-radius: var(--radius-full); aspect-ratio: 1; align-items: center; justify-content: center; padding: var(--space-2); }
.fx-tile--span2 { grid-column: span 2; }
.fx-tile--tall { grid-row: span 2; }
.fx-tile__label { font: 600 12px/16px var(--font-sans); letter-spacing: .03em; display: flex; align-items: center; gap: var(--space-1); }
.fx-tile__value { font: 500 40px/44px var(--font-sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fx-tile__value--xl { font-size: 64px; line-height: 64px; letter-spacing: -.03em; }
.fx-tile__value--m { font-size: 24px; line-height: 28px; letter-spacing: -.01em; }
.fx-tile__meta { font: 400 12px/16px var(--font-sans); opacity: .82; }

/* ---------- Top app bar ---------- */
.fx-topbar { display: flex; align-items: center; gap: var(--space-1); min-height: 64px; padding: 0 var(--space-1); background: var(--bg); color: var(--ink); }
.fx-topbar__title { flex: 1; min-width: 0; font: 500 22px/28px var(--font-sans); margin: 0 var(--space-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: var(--space-3); }
.fx-topbar__title img { width: 32px; height: 32px; }
.fx-topbar--scrolled { background: var(--surface); box-shadow: var(--elevation-1); }

/* ---------- Navigation bar (compact) + rail (medium+) ---------- */
.fx-nav { display: flex; justify-content: space-around; background: var(--surface); padding: var(--space-3) 0 var(--space-4); }
.fx-nav__item { display: grid; justify-items: center; gap: var(--space-1); min-width: 64px; border: 0; background: none; color: var(--ink-muted); font: 600 12px/16px var(--font-sans); letter-spacing: .03em; cursor: pointer; text-decoration: none; }
.fx-nav__pill { position: relative; display: grid; place-items: center; width: 64px; height: 32px; border-radius: var(--radius-full); }
.fx-nav__pill::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity 120ms; }
.fx-nav__item:hover .fx-nav__pill::after { opacity: var(--state-hover); }
.fx-nav__item[aria-current="page"] { color: var(--ink); }
.fx-nav__item[aria-current="page"] .fx-nav__pill { background: var(--primary); color: var(--on-primary); }
.fx-nav--rail { flex-direction: column; justify-content: flex-start; gap: var(--space-3); width: 88px; padding: var(--space-4) 0; }
.fx-nav__pill .fx-badge-dot { position: absolute; top: 4px; right: 18px; z-index: 1; }

/* ---------- Tabs + segmented ---------- */
.fx-tabs { display: flex; gap: var(--space-1); border-bottom: var(--stroke-hairline) solid var(--outline-variant); overflow-x: auto; }
.fx-tab { position: relative; padding: var(--space-3) var(--space-4); border: 0; background: none; color: var(--ink-muted); font: 600 14px/20px var(--font-sans); cursor: pointer; white-space: nowrap; }
.fx-tab[aria-selected="true"] { color: var(--ink); }
.fx-tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-4); right: var(--space-4); bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ink); }
.fx-seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-sunken); border-radius: var(--radius-full); max-width: 100%; }
.fx-seg__item { flex: 1; border: 0; background: transparent; color: var(--ink-muted); min-height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-full); font: 600 14px/20px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); white-space: nowrap; }
.fx-seg__item:hover { color: var(--ink); }
.fx-seg__item[aria-pressed="true"], .fx-seg__item[aria-selected="true"] { background: var(--surface-raised); color: var(--ink); box-shadow: var(--elevation-1); }

/* ---------- Selection: switch, checkbox, radio ---------- */
.fx-switch { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font: 400 14px/20px var(--font-sans); color: var(--ink); }
.fx-switch input { appearance: none; margin: 0; position: relative; width: 52px; height: 32px; flex: none; border-radius: var(--radius-full); background: var(--surface-sunken); border: var(--stroke-control) solid var(--outline); cursor: pointer; transition: background 160ms ease, border-color 160ms; }
.fx-switch input::before { content: ""; position: absolute; top: 50%; left: 4px; width: 20px; height: 20px; transform: translateY(-50%); border-radius: 50%; background: var(--accent-cream); border: var(--stroke-contour) solid var(--contour); transition: left 160ms cubic-bezier(.2,0,0,1), width 160ms; }
.fx-switch input:checked { background: var(--accent-green); border-color: var(--contour); }
.fx-switch input:checked::before { left: 24px; }
.fx-switch input:active::before { width: 24px; }
.fx-switch input:disabled { opacity: var(--state-disabled); cursor: default; }
.fx-switch__text { display: grid; }
.fx-switch__text small { color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.fx-check { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font: 400 14px/20px var(--font-sans); color: var(--ink); }
.fx-check input { appearance: none; margin: 0; width: 22px; height: 22px; flex: none; border: var(--stroke-contour) solid var(--outline); border-radius: 7px; background: transparent; display: grid; place-items: center; cursor: pointer; }
.fx-check input::before { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--on-accent); border-bottom: 2.5px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 120ms; }
.fx-check input:checked { background: var(--accent-green); border-color: var(--contour); }
.fx-check input:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
.fx-check input[type="radio"] { border-radius: 50%; }
.fx-check input[type="radio"]::before { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--on-accent); transform: scale(0); }
.fx-check input[type="radio"]:checked::before { transform: scale(1); }

/* ---------- Chips ---------- */
.fx-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.fx-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-full);
  border: var(--stroke-control) solid var(--outline-variant); background: var(--surface); color: var(--ink); font: 600 13px/16px var(--font-sans); letter-spacing: .02em; cursor: pointer; }
.fx-chip::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity 120ms; }
.fx-chip:hover::after { opacity: var(--state-hover); }
.fx-chip[aria-pressed="true"] { background: var(--accent-green); color: var(--on-accent); border: var(--stroke-contour) solid var(--contour); padding-left: var(--space-2); }
.fx-chip[aria-pressed="true"]::before { content: ""; width: 12px; height: 7px; margin: 0 2px 3px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.fx-chip--input { background: var(--surface-sunken); border-color: transparent; padding-right: 4px; }
.fx-chip__remove { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted); cursor: pointer; }

/* ---------- Badges + plan ---------- */
.fx-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 8px; border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--ink); font: 600 11px/16px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.fx-badge--pro { background: var(--accent-yellow); color: var(--on-accent); border: var(--stroke-contour) solid var(--contour); padding: 0 8px 0 6px; }
.fx-badge--pro::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-accent); }
.fx-badge--demo { background: transparent; border: var(--stroke-control) solid var(--outline); color: var(--ink-muted); }
.fx-badge--count { min-width: 20px; justify-content: center; background: var(--danger-fill); color: var(--on-danger-fill); text-transform: none; letter-spacing: 0; }
.fx-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger-fill); }

/* ---------- Status label (admin) ---------- */
.fx-status { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px 0 8px; border-radius: var(--radius-full); background: var(--surface-sunken); color: var(--ink); font: 600 12px/16px var(--font-sans); letter-spacing: .02em; white-space: nowrap; }
.fx-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: var(--stroke-control) solid var(--ink); background: var(--_dot, transparent); flex: none; }
.fx-status--draft { --_dot: transparent; }
.fx-status--sent { --_dot: var(--accent-blue); }
.fx-status--paid { --_dot: var(--accent-green); }
.fx-status--due { --_dot: var(--accent-yellow); }
.fx-status--overdue { --_dot: var(--danger-fill); }
.fx-status--overdue::before { border-radius: 2px; transform: rotate(45deg) scale(.85); }

/* ---------- List ---------- */
.fx-list { list-style: none; margin: 0; padding: var(--space-1) 0; background: var(--surface); border-radius: var(--radius-lg); }
.fx-list__item { position: relative; display: flex; align-items: center; gap: var(--space-4); min-height: 56px; padding: var(--space-2) var(--space-4); color: var(--ink); text-decoration: none; width: 100%; border: 0; background: none; font: inherit; text-align: left; }
.fx-list__item + .fx-list__item::before { content: ""; position: absolute; top: 0; left: 72px; right: var(--space-4); border-top: var(--stroke-hairline) solid var(--outline-variant); }
a.fx-list__item, button.fx-list__item { cursor: pointer; }
a.fx-list__item::after, button.fx-list__item::after { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0; transition: opacity 120ms; }
a.fx-list__item:hover::after, button.fx-list__item:hover::after { opacity: var(--state-hover); }
.fx-list__lead { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-sunken); font: 600 14px/20px var(--font-sans); }
.fx-list__lead--img { border-radius: var(--radius-sm); overflow: hidden; }
.fx-list__body { flex: 1; min-width: 0; display: grid; }
.fx-list__title { font: 600 14px/20px var(--font-sans); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-list__sub { font: 400 14px/20px var(--font-sans); color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-list__trail { color: var(--ink-muted); font: 400 12px/16px var(--font-sans); display: flex; align-items: center; gap: var(--space-2); }

/* ---------- Dialog + sheet ---------- */
.fx-scrim { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; padding: var(--space-6); z-index: 100; }
.fx-scrim--sheet { place-items: end stretch; padding: 0; }
.fx-dialog { width: min(100%, 400px); background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--elevation-3); display: grid; gap: var(--space-4); }
.fx-dialog__head { display: flex; align-items: center; gap: var(--space-3); }
.fx-dialog__title { flex: 1; margin: 0; font: 500 24px/32px var(--font-sans); }
.fx-dialog__body { font: 400 14px/20px var(--font-sans); color: var(--ink-muted); margin: 0; }
.fx-dialog__actions { display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }
.fx-dialog__actions--split > * { flex: 1; }
dialog.fx-dialog { border: 0; padding: var(--space-6); }
dialog.fx-dialog::backdrop { background: var(--scrim); }
.fx-sheet { background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-2) var(--space-4) var(--space-6); box-shadow: var(--elevation-3); display: grid; gap: var(--space-4); }
.fx-sheet::before { content: ""; justify-self: center; width: 32px; height: 4px; border-radius: 2px; background: var(--outline); margin: var(--space-2) 0; }

/* ---------- Snackbar + tooltip ---------- */
.fx-snackbar { display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: var(--space-1) var(--space-2) var(--space-1) var(--space-4); max-width: 560px;
  background: var(--primary); color: var(--on-primary); border-radius: var(--radius-full); box-shadow: var(--elevation-2); font: 400 14px/20px var(--font-sans); }
.fx-snackbar__icon { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-green); color: var(--on-accent); border: var(--stroke-contour) solid var(--contour); }
.fx-snackbar__text { flex: 1; min-width: 0; }
.fx-snackbar .fx-btn--text { color: var(--on-primary); text-decoration: underline; text-underline-offset: 3px; }
.fx-tooltip { display: inline-block; padding: 6px 10px; border-radius: var(--radius-xs); background: var(--primary); color: var(--on-primary); font: 400 12px/16px var(--font-sans); }

/* ---------- Progress ---------- */
.fx-progress { height: 8px; border-radius: var(--radius-full); background: var(--surface-sunken); overflow: hidden; }
.fx-progress__bar { height: 100%; width: var(--value, 40%); border-radius: inherit; background: var(--accent-green); border-right: var(--stroke-contour) solid var(--contour); transition: width 240ms ease; }
.fx-progress--indeterminate .fx-progress__bar { width: 35%; animation: fx-indet 1.4s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes fx-indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.fx-ring { --size: 48px; --value: 25; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent-green) calc(var(--value) * 1%), var(--surface-sunken) 0); position: relative; }
.fx-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--_inner, var(--surface)); }
.fx-ring > * { position: relative; font: 600 12px/16px var(--font-sans); font-variant-numeric: tabular-nums; }
.fx-spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--surface-sunken); border-top-color: var(--ink); animation: fx-spin .8s linear infinite; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fx-spinner, .fx-progress--indeterminate .fx-progress__bar { animation-duration: 3s; } }

/* ---------- Slider ---------- */
.fx-slider { display: grid; gap: var(--space-2); }
.fx-slider__head { display: flex; justify-content: space-between; align-items: baseline; font: 600 12px/16px var(--font-sans); letter-spacing: .03em; color: var(--ink-muted); }
.fx-slider__value { font: 400 13px/20px var(--font-mono); color: var(--ink); }
.fx-slider input[type="range"] { --_p: 50%; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; }
.fx-slider input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: var(--radius-full); background: linear-gradient(to right, var(--ink) 0 var(--_p), var(--surface-sunken) var(--_p)); }
.fx-slider input[type="range"]::-moz-range-track { height: 8px; border-radius: var(--radius-full); background: var(--surface-sunken); }
.fx-slider input[type="range"]::-moz-range-progress { height: 8px; border-radius: var(--radius-full); background: var(--ink); }
.fx-slider input[type="range"]::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: var(--accent-cream); border: var(--stroke-contour) solid var(--contour); }
.fx-slider input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-cream); border: var(--stroke-contour) solid var(--contour); }
.fx-slider input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--radius-full); }

/* ---------- Knob (OP-1 style rotary) ---------- */
.fx-knob { --value: 50; --color: var(--accent-blue); --size: 64px; display: inline-grid; justify-items: center; gap: var(--space-1); border: 0; background: none; padding: 0; color: var(--ink); cursor: grab; touch-action: none; user-select: none; }
.fx-knob__dial { position: relative; width: var(--size); height: var(--size); border-radius: 50%; padding: 7px;
  background: conic-gradient(from 225deg, var(--ink) calc(var(--value) * 2.7deg), var(--surface-sunken) 0 270deg, transparent 0); }
.fx-knob__cap { position: relative; width: 100%; height: 100%; border-radius: 50%; background: var(--color); border: var(--stroke-contour) solid var(--contour); transform: rotate(calc(-135deg + var(--value) * 2.7deg)); box-shadow: 0 0 0 3px var(--bg); }
.fx-knob__cap::before { content: ""; position: absolute; left: 50%; top: 10%; width: 4px; height: 30%; margin-left: -2px; border-radius: 2px; background: var(--on-accent); }
.fx-knob__label { font: 600 11px/16px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); }
.fx-knob__value { font: 400 12px/16px var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.fx-knob:active { cursor: grabbing; }
.fx-knob--s { --size: 44px; }
.fx-knob--l { --size: 88px; }

/* ---------- Color swatches + picker ---------- */
.fx-swatches { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.fx-swatch { width: 36px; height: 36px; border-radius: 50%; border: var(--stroke-contour) solid var(--contour); background: var(--c, var(--accent-blue)); cursor: pointer; padding: 0; position: relative; }
.fx-swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: var(--stroke-contour) solid var(--ink); }
.fx-swatch--add { background: transparent; border: var(--stroke-control) dashed var(--outline); color: var(--ink-muted); display: grid; place-items: center; }
.fx-swatch--sq { border-radius: var(--radius-xs); width: 24px; height: 24px; }
.fx-picker { display: grid; gap: var(--space-3); padding: var(--space-4); background: var(--surface); border-radius: var(--radius-lg); }
.fx-picker__area { position: relative; height: 140px; border-radius: var(--radius-md); background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, var(--hue, #ec7a3c)); }
.fx-picker__handle { position: absolute; left: var(--x, 70%); top: var(--y, 30%); width: 20px; height: 20px; margin: -10px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #1b1b1a; }
.fx-picker__hue { height: 16px; border-radius: var(--radius-full); background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); position: relative; }
.fx-picker__hue i { position: absolute; top: 50%; left: var(--h, 6%); width: 20px; height: 20px; margin: -10px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #1b1b1a; }
.fx-picker__row { display: flex; gap: var(--space-2); align-items: center; }
.fx-picker__chip { width: 40px; height: 40px; border-radius: var(--radius-sm); border: var(--stroke-contour) solid var(--contour); background: var(--c, #ec7a3c); flex: none; }

/* ---------- Toolbar ---------- */
.fx-toolbar { display: inline-flex; align-items: center; gap: 2px; padding: 4px; background: var(--surface); border-radius: var(--radius-full); box-shadow: var(--elevation-1); }
.fx-toolbar--vertical { flex-direction: column; border-radius: var(--radius-xl); }
.fx-toolbar__sep { width: 1px; height: 24px; background: var(--outline-variant); margin: 0 4px; }
.fx-toolbar--vertical .fx-toolbar__sep { width: 24px; height: 1px; margin: 4px 0; }
.fx-tool { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: var(--radius-full); background: transparent; color: var(--ink); cursor: pointer; }
.fx-tool::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity 120ms; }
.fx-tool:hover::after { opacity: var(--state-hover); }
.fx-tool[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.fx-tool--rec { color: var(--danger-fill); }
.fx-tool--rec .fx-icon { fill: currentColor; }
.fx-tool--rec[aria-pressed="true"] { background: var(--danger-fill); color: var(--on-danger-fill); }

/* ---------- Panel (inspector) + canvas ---------- */
.fx-panel { background: var(--surface); border-radius: var(--radius-lg); display: grid; align-content: start; overflow: hidden; }
.fx-panel__head { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4); }
.fx-panel__title { flex: 1; margin: 0; font: 600 16px/24px var(--font-sans); }
.fx-panel__section { padding: var(--space-3) var(--space-4) var(--space-4); border-top: var(--stroke-hairline) solid var(--outline-variant); display: grid; gap: var(--space-3); }
.fx-panel__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.fx-canvas { background-color: var(--surface-sunken); background-image: radial-gradient(var(--outline-variant) 1px, transparent 1px); background-size: 16px 16px; border-radius: var(--radius-lg); min-height: 240px; display: grid; place-items: center; position: relative; }
.fx-workspace { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 840px) { .fx-workspace { grid-template-columns: auto 1fr 280px; align-items: start; } }

/* ---------- Timeline ---------- */
.fx-timeline { background: var(--surface); border-radius: var(--radius-lg); padding: var(--space-2) 0 var(--space-3); overflow: hidden; position: relative; }
.fx-timeline__ruler { display: grid; grid-template-columns: 88px repeat(8, 1fr); height: 24px; align-items: end; font: 500 10px/16px var(--font-mono); letter-spacing: .06em; color: var(--ink-muted); }
.fx-timeline__ruler span { border-left: var(--stroke-hairline) solid var(--outline-variant); padding-left: 4px; }
.fx-timeline__ruler span:first-child { border: 0; }
.fx-track { display: grid; grid-template-columns: 88px 1fr; align-items: center; min-height: 40px; }
.fx-track__name { padding: 0 var(--space-3); font: 600 12px/16px var(--font-sans); color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.fx-track__name i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); border: 1.5px solid var(--ink); flex: none; }
.fx-track__lane { position: relative; height: 32px; margin-right: var(--space-3); background: var(--surface-sunken); border-radius: var(--radius-sm); }
.fx-clip { position: absolute; top: 3px; bottom: 3px; left: var(--start, 0%); width: var(--len, 20%); border-radius: 6px; background: var(--c, var(--accent-blue)); border: var(--stroke-contour) solid var(--contour); color: var(--on-accent); font: 600 11px/22px var(--font-sans); padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-clip[aria-selected="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
.fx-steps { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; padding: 3px; }
.fx-step { aspect-ratio: 1; border-radius: 4px; background: var(--surface); border: 1.5px solid var(--outline-variant); }
.fx-step--on { background: var(--c, var(--accent-yellow)); border-color: var(--contour); }
.fx-playhead { position: absolute; top: 8px; bottom: 0; left: var(--at, 40%); width: 2px; background: var(--accent-orange); pointer-events: none; }
.fx-playhead::before { content: ""; position: absolute; top: 0; left: -5px; width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; background: var(--accent-orange); border: 1.5px solid var(--contour); }

/* ---------- Mini chart ---------- */
.fx-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 72px; }
.fx-bars i { flex: 1; max-width: 14px; height: var(--h, 50%); border-radius: var(--radius-full); background: var(--chart-track); min-height: 6px; }
.fx-bars i.is-hi { background: var(--accent-green); border: var(--stroke-contour) solid var(--contour); }
.fx-spark { width: 100%; height: 48px; overflow: visible; }
.fx-spark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.fx-spark circle { fill: var(--accent-orange); stroke: var(--contour); stroke-width: 2; }

/* ---------- Data table (admin) ---------- */
.fx-table-wrap { background: var(--surface); border-radius: var(--radius-lg); overflow-x: auto; }
.fx-table { width: 100%; border-collapse: collapse; font: 400 14px/20px var(--font-sans); color: var(--ink); }
.fx-table th { text-align: left; font: 600 12px/16px var(--font-sans); letter-spacing: .03em; color: var(--ink-muted); padding: var(--space-3) var(--space-4); white-space: nowrap; border-bottom: var(--stroke-hairline) solid var(--outline-variant); }
.fx-table td { padding: var(--space-3) var(--space-4); border-bottom: var(--stroke-hairline) solid var(--outline-variant); vertical-align: middle; }
.fx-table tr:last-child td { border-bottom: 0; }
.fx-table tbody tr:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.fx-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-table .is-strong { font-weight: 600; }
/* Compact windows: rows become cards */
@media (max-width: 599px) {
  .fx-table--stack thead { display: none; }
  .fx-table--stack tr { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: var(--stroke-hairline) solid var(--outline-variant); }
  .fx-table--stack td { padding: 0; border: 0; }
  .fx-table--stack td[data-label]::before { content: attr(data-label) " "; color: var(--ink-muted); font-size: 12px; }
}

/* ---------- Form + invoice lines ---------- */
.fx-form { display: grid; gap: var(--space-4); }
.fx-form__row { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 600px) { .fx-form__row--2 { grid-template-columns: 1fr 1fr; } .fx-form__row--3 { grid-template-columns: 2fr 1fr 1fr; } }
.fx-lines { display: grid; gap: var(--space-2); }
.fx-line > * { min-width: 0; }
.fx-line .fx-icon-btn { width: 40px; height: 40px; }
.fx-line { display: grid; grid-template-columns: 1fr 64px 96px 40px; gap: var(--space-2); align-items: end; }
.fx-line--head { font: 600 12px/16px var(--font-sans); letter-spacing: .03em; color: var(--ink-muted); align-items: center; }
.fx-totals { display: grid; gap: var(--space-1); justify-content: end; grid-template-columns: auto 120px; font: 400 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; }
.fx-totals dt { color: var(--ink-muted); text-align: right; }
.fx-totals dd { margin: 0; text-align: right; }
.fx-totals .is-total { font: 600 18px/28px var(--font-sans); color: var(--ink); padding-top: var(--space-2); border-top: var(--stroke-control) solid var(--ink); }

/* ---------- Monetization ---------- */
.fx-demo-bar { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: var(--accent-yellow); color: var(--on-accent); border: var(--stroke-contour) solid var(--contour); font: 400 14px/20px var(--font-sans); }
.fx-demo-bar__text { flex: 1; min-width: 0; }
.fx-demo-bar__text strong { font-weight: 600; }
.fx-demo-bar .fx-btn { --_bg: var(--on-accent); --_fg: var(--accent-yellow); }
.fx-code { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fx-code input { width: 4.6ch; min-width: 0; height: 52px; text-align: center; border-radius: var(--radius-md); border: var(--stroke-control) solid transparent; background: var(--surface-sunken); color: var(--ink);
  font: 500 16px/24px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; outline: 0; padding: 0 4px; flex: 1; max-width: 76px; }
.fx-code input:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.fx-code__dash { color: var(--ink-faint); font: 500 16px/1 var(--font-mono); }
.fx-code--valid input { background: var(--accent-green); color: var(--on-accent); border: var(--stroke-contour) solid var(--contour); }
.fx-code--invalid input { border-color: var(--danger); }
.fx-upgrade { background: var(--surface-raised); border-radius: var(--radius-xl); padding: var(--space-6); display: grid; gap: var(--space-5); color: var(--ink); max-width: 420px; box-shadow: var(--elevation-2); }
.fx-upgrade__head { display: flex; align-items: center; gap: var(--space-3); }
.fx-upgrade__head img { width: 56px; height: 56px; }
.fx-upgrade__price { display: flex; align-items: baseline; gap: var(--space-2); }
.fx-upgrade__price b { font: 500 40px/44px var(--font-sans); letter-spacing: -.02em; }
.fx-compare { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font: 400 14px/20px var(--font-sans); }
.fx-compare li { display: grid; grid-template-columns: 1fr 56px 56px; align-items: center; gap: var(--space-2); padding: 6px 0; border-bottom: var(--stroke-hairline) solid var(--outline-variant); }
.fx-compare li:last-child { border: 0; }
.fx-compare span:not(:first-child) { text-align: center; }
.fx-compare .is-head { font: 600 12px/16px var(--font-sans); color: var(--ink-muted); letter-spacing: .03em; }
.fx-yes, .fx-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.fx-yes { background: var(--accent-green); border: var(--stroke-contour) solid var(--contour); color: var(--on-accent); }
.fx-no { color: var(--ink-faint); }

/* ---------- Brand: app icon, lockup, credit ---------- */
.fx-appicon { width: var(--size, 48px); height: var(--size, 48px); display: block; }
.fx-lockup { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; }
.fx-lockup img { width: 40px; height: 40px; }
.fx-lockup__name { font: 600 22px/28px var(--font-sans); letter-spacing: -.01em; }
.fx-credit { display: flex; align-items: center; justify-content: center; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-4); font: 400 12px/16px var(--font-sans); letter-spacing: .02em; color: var(--ink-muted); text-align: center; }
.fx-credit a { color: inherit; text-underline-offset: 3px; }
.fx-credit a:hover { color: var(--ink); }

/* ---------- Utilities ---------- */
.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }
