/* base.css – design tokens (Classic / Modern × light / dark), reset, UI font, utilities.
   The application UI always uses its own bundled font ("TP UI" = Inter subset), never the font being previewed.
   Classic = the editorial, monochrome look (white, hairlines, square corners, upper-case micro labels).
   Modern  = the same layout with rounded shapes, soft shadows and an indigo accent. */

@font-face {
  font-family: "TP UI";
  src: url("../assets/fonts/inter-ui.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ui-font: "TP UI", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono-font: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  /* Classic · light (default) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f2f2f2;
  --border: #dcdcdc;              /* panel and card outlines */
  --hairline: #ececec;            /* dividers inside a panel */
  --border-strong: #8a8a8a;       /* outline of form controls (≥ 3:1 on white, WCAG 1.4.11) */
  --text: #000000;
  --text-2: #333333;
  --text-3: #666666;
  --accent: #000000;
  --accent-hover: #2a2a2a;
  --accent-ink: #ffffff;
  --accent-soft: #f4f4f4;
  --brand-ink: #ffffff;
  --focus: #1a56db;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --warn: #8a4b00;
  --warn-soft: #fdf1dc;
  --ok: #17663a;
  --ok-soft: #e4f4ea;
  --info: #1a56db;

  --radius-s: 0px;
  --radius: 0px;
  --radius-l: 0px;
  --radius-pill: 0px;
  --radius-chip: 8px;             /* value chips next to the sliders */
  --shadow-1: none;
  --shadow-chip: 0 1px 2px rgba(0, 0, 0, .09);
  --shadow-2: 0 10px 32px rgba(0, 0, 0, .16);
  --ctrl-h: 34px;
  --topbar-h: 64px;
  --gutter: 16px;
  --section-label-case: uppercase;
  --section-label-ls: .14em;
  --section-label-size: 10.5px;
  --label-weight: 700;
  --field-label-case: uppercase;
  --field-label-ls: .1em;
  --field-label-size: 10.5px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --surface: #121212;
  --surface-2: #171717;
  --surface-3: #202020;
  --border: #303030;
  --hairline: #262626;
  --border-strong: #707070;
  --text: #f5f5f5;
  --text-2: #d2d2d2;
  --text-3: #a0a0a0;
  --accent: #f5f5f5;
  --accent-hover: #ffffff;
  --accent-ink: #0b0b0b;
  --accent-soft: #1f1f1f;
  --brand-ink: #0b0b0b;
  --focus: #8fb4ff;
  --danger: #ff8a80;
  --danger-soft: #3a1f1d;
  --warn: #ffbf66;
  --warn-soft: #382a12;
  --ok: #6fd69a;
  --ok-soft: #14301f;
  --info: #8fb4ff;
  --shadow-chip: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 10px 32px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

:root[data-skin="modern"] {
  --bg: #f1f2f8;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eceef7;
  --border: #e0e3ef;
  --hairline: #e8eaf4;
  --border-strong: #8087a6;
  --text: #151826;
  --text-2: #3f4660;
  --text-3: #596280;
  --accent: #4338ca;
  --accent-hover: #3730a3;
  --accent-ink: #ffffff;
  --accent-soft: #eceafd;
  --brand-ink: #ffffff;
  --focus: #4338ca;
  --info: #4338ca;
  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 18px;
  --radius-pill: 999px;
  --radius-chip: 999px;
  --shadow-1: 0 1px 2px rgba(21, 24, 38, .05), 0 4px 14px rgba(21, 24, 38, .06);
  --shadow-chip: 0 1px 2px rgba(21, 24, 38, .08);
  --shadow-2: 0 14px 40px rgba(21, 24, 38, .2);
  --ctrl-h: 38px;
  --section-label-case: none;
  --section-label-ls: 0;
  --section-label-size: 12px;
  --field-label-case: none;
  --field-label-ls: 0;
  --field-label-size: 12px;
}

:root[data-skin="modern"][data-theme="dark"] {
  --bg: #0d0f17;
  --surface: #151824;
  --surface-2: #1a1e2c;
  --surface-3: #232839;
  --border: #2a3047;
  --hairline: #232840;
  --border-strong: #6a729a;
  --text: #eceef7;
  --text-2: #c3c9de;
  --text-3: #9aa2c0;
  --accent: #9a97ff;
  --accent-hover: #b5b3ff;
  --accent-ink: #0d0f17;
  --accent-soft: #25264a;
  --brand-ink: #0d0f17;
  --focus: #a9a7ff;
  --info: #a9a7ff;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .28);
  --shadow-chip: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 14px 40px rgba(0, 0, 0, .6);
}

@media (pointer: coarse) {
  :root { --ctrl-h: 44px; }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: 13px;
  line-height: 1.45;
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
/* The UI font uses stylistic alternates; anything that shows a user-chosen font must NOT inherit them (specimens must be honest). */
.tp-scope, .tp-print-scope, .tp-pgscope, .cmp-card, .fp-name, .fp-opt-name, .fp-opt-sample, .set-fam-name, .chip-font, [style*="font-family"] { font-feature-settings: normal; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-s); }
:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 1000; padding: 10px 16px; background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius); text-decoration: none; font-weight: 600; transition: top .15s;
}
.skip-link:focus { top: 12px; }
.noscript { padding: 24px; text-align: center; font-weight: 600; }
.only-narrow { display: none !important; }
.tp-icon { flex: none; }

/* upper-case micro label used all over the Classic look */
.section-label {
  margin: 0; font-size: var(--section-label-size); font-weight: var(--label-weight); letter-spacing: var(--section-label-ls);
  text-transform: var(--section-label-case); color: var(--text-3);
}

body.tp-modal-open { overflow: hidden; }

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