/* Sepenta design system (SFT-536). One definition of the tokens and the shared components, used by Penta and Magnesia.
   This block is identical in both repositories: change it in both, and update the hash in each design-system test.
   Nothing here names a page. Pages add layout; they do not restyle these parts. */
:root {
  --ds-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ds-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ds-ink: #0b1935;
  --ds-muted: #596f83;
  --ds-bg: #f4f7fb;
  --ds-surface: #fff;
  --ds-sunk: #eef2f6;
  --ds-line: #dfe6ef;
  --ds-line-strong: #8590a2;
  --ds-accent: #087e9a;
  --ds-accent-strong: #066a82;
  --ds-accent-soft: #eef6f8;
  --ds-link: #066a82;
  --ds-cyan: #02b8d5;
  --ds-primary: #6c3cf2;
  --ds-primary-strong: #5a2ed6;
  --ds-nav: #0f2947;
  --ds-nav-active: #2b44a0;
  --ds-nav-text: #dbe7f3;
  --ds-success: #217650;
  --ds-success-bg: #e4f5ed;
  --ds-warning: #8a5c12;
  --ds-warning-bg: #fff3db;
  --ds-danger: #ae2e24;
  --ds-danger-bg: #ffeceb;
  --ds-danger-solid: #c9372c;
  --ds-info: #16667e;
  --ds-info-bg: #e7f5fa;
  --ds-focus: #087e9a;
  --ds-focus-on-dark: #02b8d5;
  --ds-radius-sm: .4rem;
  --ds-radius: .55rem;
  --ds-radius-lg: .875rem;
  --ds-radius-pill: 999px;
  --ds-space-1: .25rem;
  --ds-space-2: .5rem;
  --ds-space-3: .75rem;
  --ds-space-4: 1rem;
  --ds-space-5: 1.5rem;
  --ds-space-6: 2rem;
  --ds-shadow: 0 10px 30px rgba(9, 30, 66, .06);
  --ds-card-pad: 1.5rem;
}

.ds-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Every interactive control shows where the keyboard is. The ring is 3px and offset, so it is never hidden by a border. */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible { outline: 3px solid var(--ds-focus); outline-offset: 2px; }
[data-ds-surface="dark"] :where(a, button, input, select, textarea, summary):focus-visible { outline-color: var(--ds-focus-on-dark); }

/* Buttons: one shape, four meanings. Disabled is dimmed and says so to assistive technology through the disabled attribute. */
.ds-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--ds-space-2); box-sizing: border-box; min-height: 2.5rem; padding: .6rem 1.1rem; border: 1.5px solid transparent; border-radius: .625rem; font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.ds-btn--primary { background: var(--ds-primary); color: #fff; }
.ds-btn--primary:hover:not(:disabled) { background: var(--ds-primary-strong); }
.ds-btn--secondary { background: var(--ds-surface); color: var(--ds-ink); border-color: var(--ds-line-strong); }
.ds-btn--secondary:hover:not(:disabled) { background: var(--ds-sunk); }
.ds-btn--danger { background: var(--ds-danger-solid); color: #fff; }
.ds-btn--quiet-danger { background: transparent; color: var(--ds-danger); }
.ds-btn--link { min-height: 0; padding: 0; background: none; color: var(--ds-link); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.ds-btn--sm { min-height: 2rem; padding: .3rem .75rem; font-size: .85rem; }
.ds-btn:disabled, .ds-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Form controls inside a .ds-form area share one look. Labels sit above their control. */
.ds-form :where(input:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="hidden"]), select, textarea), .ds-input { box-sizing: border-box; padding: .6rem .75rem; border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius-sm); background: var(--ds-surface); color: var(--ds-ink); font: inherit; }
.ds-form :where(input, select, textarea):disabled { background: var(--ds-sunk); color: var(--ds-muted); cursor: not-allowed; }
.ds-form :where(input, select, textarea)[aria-invalid="true"] { border-color: var(--ds-danger); }
.ds-field { display: grid; gap: var(--ds-space-2); font-weight: 650; }
.ds-hint { margin: 0; color: var(--ds-muted); font-size: .85rem; font-weight: 400; }

.ds-card { box-sizing: border-box; padding: var(--ds-card-pad); background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); box-shadow: var(--ds-shadow); }

/* Alerts and status chips never rely on colour: each kind has its own mark in front of the words. */
.ds-alert { display: flex; gap: var(--ds-space-2); align-items: flex-start; padding: .75rem 1rem; border: 1px solid currentColor; border-radius: var(--ds-radius); font-weight: 650; }
.ds-alert--success { color: var(--ds-success); background: var(--ds-success-bg); }
.ds-alert--error { color: var(--ds-danger); background: var(--ds-danger-bg); }
.ds-alert--warning { color: var(--ds-warning); background: var(--ds-warning-bg); }
.ds-alert--info { color: var(--ds-info); background: var(--ds-info-bg); }
.ds-alert--success::before { content: "✓"; }
.ds-alert--error::before { content: "✕"; }
.ds-alert--warning::before { content: "!"; }
.ds-alert--info::before { content: "i"; }
.ds-alert::before { flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border: 1.5px solid currentColor; border-radius: 50%; font-size: .75rem; font-weight: 800; line-height: 1; }

.ds-status { display: inline-flex; align-items: center; gap: var(--ds-space-1); padding: .25rem .6rem; border-radius: var(--ds-radius-pill); background: var(--ds-sunk); color: var(--ds-ink); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.ds-status--success { color: var(--ds-success); background: var(--ds-success-bg); }
.ds-status--error { color: var(--ds-danger); background: var(--ds-danger-bg); }
.ds-status--warning { color: var(--ds-warning); background: var(--ds-warning-bg); }
.ds-status--info { color: var(--ds-info); background: var(--ds-info-bg); }
.ds-status--success::before { content: "✓"; }
.ds-status--error::before { content: "✕"; }
.ds-status--warning::before { content: "!"; }
.ds-status--info::before { content: "●"; }
.ds-status--neutral::before { content: "○"; }

/* Data panels have three states besides "has data": loading, empty and failed. Each says what is happening in words. */
.ds-state { display: grid; gap: var(--ds-space-2); justify-items: start; box-sizing: border-box; padding: var(--ds-space-4) var(--ds-space-5); background: var(--ds-surface); border: 1px dashed var(--ds-line-strong); border-radius: var(--ds-radius); color: var(--ds-muted); }
.ds-state > * { margin: 0; }
.ds-state-title { color: var(--ds-ink); font-weight: 700; }
.ds-state--error { color: var(--ds-danger); background: var(--ds-danger-bg); border-style: solid; border-color: var(--ds-danger); }
.ds-state--error .ds-state-title { color: inherit; }
.ds-skeleton { display: grid; gap: var(--ds-space-2); width: 100%; }
.ds-skeleton i { display: block; height: .75rem; border-radius: var(--ds-radius-sm); background: linear-gradient(90deg, var(--ds-sunk) 25%, var(--ds-line) 50%, var(--ds-sunk) 75%); background-size: 200% 100%; animation: ds-shimmer 1.4s linear infinite; }
.ds-skeleton i:nth-child(2) { width: 80%; }
.ds-skeleton i:nth-child(3) { width: 60%; }
@keyframes ds-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ds-skeleton i { animation: none; } }

/* Tabs and switches: the chosen one is marked by aria-selected, aria-pressed or aria-current, never by colour alone (it also gets an underline). */
.ds-tabs { display: flex; gap: var(--ds-space-2); overflow-x: auto; }
.ds-tabs > button { flex: 1; box-sizing: border-box; padding: .65rem .75rem; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); color: var(--ds-muted); font: inherit; font-weight: 650; white-space: nowrap; cursor: pointer; }
.ds-tabs > button:hover { background: var(--ds-sunk); }
.ds-tabs > button:is([aria-selected="true"], [aria-pressed="true"], [aria-current]) { color: var(--ds-link); background: var(--ds-accent-soft); border-color: var(--ds-accent); box-shadow: inset 0 -3px var(--ds-accent); }
