/* GENERATED by build_tokens.py from tokens/tokens.json. Do not edit. */
:root {
  --tk-blue-900: #06113B;
  --tk-blue-800: #001A77;
  --tk-blue-700: #003FB4;
  --tk-blue-600: #0061FC;
  --tk-blue-500: #78A9FF;
  --tk-blue-400: #A6C8FF;
  --tk-blue-300: #C3D9FA;
  --tk-blue-200: #DDE9FB;
  --tk-blue-100: #EFF5FD;
  --tk-grey-900: #111729;
  --tk-grey-800: #20293A;
  --tk-grey-700: #4A5567;
  --tk-grey-600: #677488;
  --tk-grey-500: #96A2B5;
  --tk-grey-400: #CCD4DF;
  --tk-grey-300: #E2E7EE;
  --tk-grey-200: #F1F4F8;
  --tk-grey-100: #F7F9FB;
  --tk-white: #FFFFFF;
  --tk-black: #000000;
  --tk-electric-500: #67E8F9;
  --tk-electric-300: #A5F3FC;
  --tk-electric-100: #CFFAFE;
  --tk-pink-700: #BE123C;
  --tk-pink-500: #F43F5E;
  --tk-pink-300: #FB7185;
  --tk-pink-100: #FFF1F2;
  --tk-copper-900: #46221A;
  --tk-copper-800: #743621;
  --tk-copper-700: #924325;
  --tk-copper-600: #A94B2A;
  --tk-copper-500: #D5714F;
  --tk-copper-400: #DF7F60;
  --tk-copper-300: #E59F84;
  --tk-copper-200: #EDC3B2;
  --tk-copper-100: #F3E8E3;
  --tk-yellow-500: #FBBF24;
  --tk-yellow-300: #FDE68A;
  --tk-yellow-100: #FFFBEB;
  --tk-green-500: #16A34A;
  --tk-green-300: #22C55E;
  --tk-green-100: #DCFCE7;
  --tk-purple-500: #7C3AED;
  --tk-purple-300: #A855F7;
  --tk-purple-100: #C4B5FD;
  --tk-font-heading: "Oswald", Arial, sans-serif;
  --tk-font-body: "Inter", Arial, sans-serif;
  --tk-font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --tk-font-nonlatin: "Noto Sans", Arial, sans-serif;
  --tk-size-h-2xl: 80px;
  --tk-size-h-xl: 60px;
  --tk-size-h-l: 40px;
  --tk-size-h-m: 32px;
  --tk-size-h-s: 24px;
  --tk-size-h-xs: 16px;
  --tk-size-body-2xl: 48px;
  --tk-size-body-xl: 32px;
  --tk-size-body-l: 24px;
  --tk-size-body-m: 16px;
  --tk-size-body-s: 14px;
  --tk-size-body-xs: 12px;
  --tk-size-spaced-m: 14px;
  --tk-size-spaced-s: 11px;
  --tk-size-button-l: 20px;
  --tk-size-button-m: 18px;
  --tk-size-button-s: 16px;
  --tk-leading-h-2xl: 104px;
  --tk-leading-h-xl: 72px;
  --tk-leading-h-l: 48px;
  --tk-leading-h-m: 40px;
  --tk-leading-h-s: 32px;
  --tk-leading-h-xs: 20px;
  --tk-leading-body-2xl: 64px;
  --tk-leading-body-xl: 40px;
  --tk-leading-body-l: 32px;
  --tk-leading-body-m: 24px;
  --tk-leading-body-s: 20px;
  --tk-leading-body-xs: 16px;
  --tk-leading-spaced: 16px;
  --tk-leading-button-l: 32px;
  --tk-leading-button-m: 24px;
  --tk-space-1: 4px;
  --tk-space-2: 8px;
  --tk-space-3: 12px;
  --tk-space-4: 16px;
  --tk-space-5: 24px;
  --tk-space-6: 32px;
  --tk-space-7: 48px;
  --tk-space-8: 64px;
  --tk-space-9: 96px;
  --tk-radius-sm: 4px;
  --tk-radius-md: 8px;
  --tk-radius-lg: 16px;
  --tk-radius-pill: 999px;
  --tk-shadow-1: 0 0 2px rgba(0, 0, 0, 0.06), 0 1px 8px rgba(0, 0, 0, 0.08);
  --tk-shadow-2: 0 0 2px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.08);
  --tk-shadow-3: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 2px rgba(0, 0, 0, 0.06);
  --tk-shadow-4: 0 4px 6px rgba(0, 0, 0, 0.10);
  --tk-shadow-input: 0 1px 2px rgba(0, 0, 0, 0.05);
  --tk-line-thin: 1px;
  --tk-line-strong: 2px;
  --tk-layout-container: 1320px;
  --tk-layout-margin: 24px;
  --tk-layout-margin-laptop: 32px;
  --tk-layout-margin-desktop: 60px;
  --tk-layout-gutter: 24px;
  --tk-layout-gutter-mobile: 16px;
  --tk-layout-bp-tablet: 768px;
  --tk-layout-bp-laptop: 1024px;
  --tk-layout-bp-desktop: 1440px;
  --tk-layout-measure: 840px;
  --tk-layout-section: 96px;
  --tk-layout-section-sm: 64px;
  --tk-bg: #FFFFFF;
  --tk-bg-subtle: #EFF5FD;
  --tk-bg-muted: #F1F4F8;
  --tk-surface: #FFFFFF;
  --tk-surface-raised: #FFFFFF;
  --tk-text: #20293A;
  --tk-text-muted: #4A5567;
  --tk-text-subtle: #677488;
  --tk-heading: #001A77;
  --tk-highlight: #0061FC;
  --tk-dash: #003FB4;
  --tk-link: #0061FC;
  --tk-link-hover: #003FB4;
  --tk-link-visited: #7C3AED;
  --tk-primary: #0061FC;
  --tk-primary-hover: #001A77;
  --tk-on-primary: #FFFFFF;
  --tk-secondary: #001A77;
  --tk-secondary-hover: #0061FC;
  --tk-on-secondary: #FFFFFF;
  --tk-brand: #001A77;
  --tk-on-brand: #FFFFFF;
  --tk-ghost: #677488;
  --tk-ghost-hover-bg: #677488;
  --tk-disabled-bg: #CCD4DF;
  --tk-disabled-fg: #CCD4DF;
  --tk-on-disabled: #FFFFFF;
  --tk-border: #E2E7EE;
  --tk-placeholder: #E2E7EE;
  --tk-border-strong: #677488;
  --tk-divider: #CCD4DF;
  --tk-divider-strong: #001A77;
  --tk-input-bg: #FFFFFF;
  --tk-input-border: #CCD4DF;
  --tk-input-border-hover: #677488;
  --tk-input-disabled-bg: #F1F4F8;
  --tk-control-checked: #0061FC;
  --tk-control-checked-hover: #003FB4;
  --tk-control-locked: #78A9FF;
  --tk-focus: #0061FC;
  --tk-ring: #67E8F9;
  --tk-table-head-bg: #EFF5FD;
  --tk-tooltip-bg: #20293A;
  --tk-tooltip-fg: #FFFFFF;
  --tk-info-bg: #EFF5FD;
  --tk-info-fg: #001A77;
  --tk-success-bg: #DCFCE7;
  --tk-success-fg: #20293A;
  --tk-success-mark: #16A34A;
  --tk-warning-bg: #FFFBEB;
  --tk-warning-tint: #FDE68A;
  --tk-warning-fg: #20293A;
  --tk-warning-mark: #FBBF24;
  --tk-danger-bg: #FFF1F2;
  --tk-danger-fg: #BE123C;
  --tk-danger-mark: #BE123C;
  --tk-danger-hover: #F43F5E;
  --tk-neutral-bg: #F7F9FB;
  --tk-accent-warm: #A94B2A;
}
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --tk-bg: #111729;
    --tk-bg-subtle: #20293A;
    --tk-bg-muted: #4A5567;
    --tk-surface: #20293A;
    --tk-surface-raised: #20293A;
    --tk-text: #F1F4F8;
    --tk-text-muted: #CCD4DF;
    --tk-text-subtle: #CCD4DF;
    --tk-heading: #FFFFFF;
    --tk-highlight: #67E8F9;
    --tk-dash: #67E8F9;
    --tk-link: #A6C8FF;
    --tk-link-hover: #FFFFFF;
    --tk-link-visited: #C4B5FD;
    --tk-primary: #0061FC;
    --tk-primary-hover: #001A77;
    --tk-on-primary: #FFFFFF;
    --tk-secondary: #001A77;
    --tk-secondary-hover: #0061FC;
    --tk-on-secondary: #FFFFFF;
    --tk-brand: #001A77;
    --tk-on-brand: #FFFFFF;
    --tk-ghost: #CCD4DF;
    --tk-ghost-hover-bg: #677488;
    --tk-disabled-bg: #4A5567;
    --tk-disabled-fg: #677488;
    --tk-on-disabled: #96A2B5;
    --tk-border: #4A5567;
    --tk-placeholder: #677488;
    --tk-border-strong: #96A2B5;
    --tk-divider: #677488;
    --tk-divider-strong: #78A9FF;
    --tk-input-bg: #20293A;
    --tk-input-border: #677488;
    --tk-input-border-hover: #CCD4DF;
    --tk-input-disabled-bg: #4A5567;
    --tk-control-checked: #0061FC;
    --tk-control-checked-hover: #78A9FF;
    --tk-control-locked: #78A9FF;
    --tk-focus: #78A9FF;
    --tk-ring: #67E8F9;
    --tk-table-head-bg: #20293A;
    --tk-tooltip-bg: #FFFFFF;
    --tk-tooltip-fg: #20293A;
    --tk-info-bg: #20293A;
    --tk-info-fg: #F1F4F8;
    --tk-success-bg: #20293A;
    --tk-success-fg: #F1F4F8;
    --tk-success-mark: #22C55E;
    --tk-warning-bg: #20293A;
    --tk-warning-tint: #FDE68A;
    --tk-warning-fg: #F1F4F8;
    --tk-warning-mark: #FBBF24;
    --tk-danger-bg: #20293A;
    --tk-danger-fg: #FB7185;
    --tk-danger-mark: #FB7185;
    --tk-danger-hover: #F43F5E;
    --tk-neutral-bg: #20293A;
    --tk-accent-warm: #DF7F60;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --tk-bg: #111729;
  --tk-bg-subtle: #20293A;
  --tk-bg-muted: #4A5567;
  --tk-surface: #20293A;
  --tk-surface-raised: #20293A;
  --tk-text: #F1F4F8;
  --tk-text-muted: #CCD4DF;
  --tk-text-subtle: #CCD4DF;
  --tk-heading: #FFFFFF;
  --tk-highlight: #67E8F9;
  --tk-dash: #67E8F9;
  --tk-link: #A6C8FF;
  --tk-link-hover: #FFFFFF;
  --tk-link-visited: #C4B5FD;
  --tk-primary: #0061FC;
  --tk-primary-hover: #001A77;
  --tk-on-primary: #FFFFFF;
  --tk-secondary: #001A77;
  --tk-secondary-hover: #0061FC;
  --tk-on-secondary: #FFFFFF;
  --tk-brand: #001A77;
  --tk-on-brand: #FFFFFF;
  --tk-ghost: #CCD4DF;
  --tk-ghost-hover-bg: #677488;
  --tk-disabled-bg: #4A5567;
  --tk-disabled-fg: #677488;
  --tk-on-disabled: #96A2B5;
  --tk-border: #4A5567;
  --tk-placeholder: #677488;
  --tk-border-strong: #96A2B5;
  --tk-divider: #677488;
  --tk-divider-strong: #78A9FF;
  --tk-input-bg: #20293A;
  --tk-input-border: #677488;
  --tk-input-border-hover: #CCD4DF;
  --tk-input-disabled-bg: #4A5567;
  --tk-control-checked: #0061FC;
  --tk-control-checked-hover: #78A9FF;
  --tk-control-locked: #78A9FF;
  --tk-focus: #78A9FF;
  --tk-ring: #67E8F9;
  --tk-table-head-bg: #20293A;
  --tk-tooltip-bg: #FFFFFF;
  --tk-tooltip-fg: #20293A;
  --tk-info-bg: #20293A;
  --tk-info-fg: #F1F4F8;
  --tk-success-bg: #20293A;
  --tk-success-fg: #F1F4F8;
  --tk-success-mark: #22C55E;
  --tk-warning-bg: #20293A;
  --tk-warning-tint: #FDE68A;
  --tk-warning-fg: #F1F4F8;
  --tk-warning-mark: #FBBF24;
  --tk-danger-bg: #20293A;
  --tk-danger-fg: #FB7185;
  --tk-danger-mark: #FB7185;
  --tk-danger-hover: #F43F5E;
  --tk-neutral-bg: #20293A;
  --tk-accent-warm: #DF7F60;
  color-scheme: dark;
}

/* Teltonika base + components. Requires tokens/tokens.css loaded first
   (or use dist/teltonika.bundle.css, which contains both).
   Fonts: <link href="https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,700;1,400;1,700&family=Oswald:wght@200;500&display=swap" rel="stylesheet">
   Values follow the Teltonika Design System in Figma (guide/figma-notes.md). Use tokens only; no raw colours. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--tk-bg);
  color: var(--tk-text);
  font: 400 var(--tk-size-body-m)/var(--tk-leading-body-m) var(--tk-font-body);   /* body-m 16/24 */
  text-align: left;                       /* left-align only */
}

/* Headings: Oswald Medium, UPPERCASE. h1 = h-xl … h5 = h-xs; one step smaller under 768px.
   Visual size is separate from the level: use .tk-h-* to pick a size (e.g. <h1 class="tk-h-m"> on tool pages). */
h1, h2, h3, h4, h5, h6, [class*="tk-h-"], .tk-hero {
  font-family: var(--tk-font-heading);
  font-weight: 500;                       /* Oswald Medium only, never Bold */
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--tk-heading);
  margin: 0 0 var(--tk-space-4);
}
h1, .tk-h-xl  { font-size: var(--tk-size-h-xl);  line-height: var(--tk-leading-h-xl); }
h2, .tk-h-l   { font-size: var(--tk-size-h-l);   line-height: var(--tk-leading-h-l); }
h3, .tk-h-m   { font-size: var(--tk-size-h-m);   line-height: var(--tk-leading-h-m); }
h4, .tk-h-s   { font-size: var(--tk-size-h-s);   line-height: var(--tk-leading-h-s); }
h5, h6, .tk-h-xs { font-size: var(--tk-size-h-xs); line-height: var(--tk-leading-h-xs); }
.tk-hero, .tk-h-2xl { font-size: var(--tk-size-h-2xl); line-height: var(--tk-leading-h-2xl); }   /* landing, report cover, login */
@media (max-width: 767px) {
  .tk-hero, .tk-h-2xl { font-size: var(--tk-size-h-xl); line-height: var(--tk-leading-h-xl); }
  h1, .tk-h-xl  { font-size: var(--tk-size-h-l);  line-height: var(--tk-leading-h-l); }
  h2, .tk-h-l   { font-size: var(--tk-size-h-m);  line-height: var(--tk-leading-h-m); }
  h3, .tk-h-m   { font-size: var(--tk-size-h-s);  line-height: var(--tk-leading-h-s); }
  h4, .tk-h-s   { font-size: var(--tk-size-h-xs); line-height: var(--tk-leading-h-xs); }
}
.tk-light { font-weight: 200; }                    /* Oswald ExtraLight: "tone down" words in a title */
.tk-hl    { color: var(--tk-highlight); }          /* highlight word(s) in a title */
:is(h1, h2, h3, h4, h5, h6, [class*="tk-h-"], .tk-hero) em { font-style: normal; color: var(--tk-highlight); }

p { margin: 0 0 var(--tk-space-4); max-width: var(--tk-layout-measure); }   /* 840px line length */
.tk-subtitle, .tk-lead { font-size: var(--tk-size-body-l); line-height: var(--tk-leading-body-l); margin: 0 0 var(--tk-space-4); }  /* body-l 24/32 */
.tk-body-s { font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); }
small, .tk-small, .tk-caption, .tk-body-xs { font-size: var(--tk-size-body-xs); line-height: var(--tk-leading-body-xs); }
small, .tk-small, .tk-caption { color: var(--tk-text-muted); }
.tk-muted { color: var(--tk-text-muted); }
strong, b { font-weight: 700; }
.tk-medium { font-weight: 500; }

/* Spaced label / eyebrow: Inter Bold, ALL CAPS, 30% tracking, one line. 14/16, 11/16 on mobile. */
.tk-eyebrow {
  display: block;
  font: 700 var(--tk-size-spaced-m)/var(--tk-leading-spaced) var(--tk-font-body);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--tk-highlight);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 0 var(--tk-space-2);
}
@media (max-width: 767px) { .tk-eyebrow { font-size: var(--tk-size-spaced-s); } }

/* Em-dash top line: the glyph U+2014 above a heading or stat, same style and size, no gap. */
.tk-dash::before { content: "\2014"; display: block; color: var(--tk-dash); line-height: 1; }

/* Links: Blue 600, underline on hover, purple when visited. In running text they stay underlined so they don't rely on colour alone. */
a { color: var(--tk-link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:visited { color: var(--tk-link-visited); }
:where(p, li, td, dd, .tk-alert) a { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 2px; border-radius: 2px; }

/* Lists: long dash bullet in the text colour (never round dots). Ordered lists: 1. 1.1. 1.1.1. */
:where(ul) { list-style: none; padding-left: 0; margin: 0 0 var(--tk-space-4); }
:where(ul) > li { position: relative; padding-left: 1.25em; margin-bottom: var(--tk-space-2); }
:where(ul) > li::before { content: "\2013"; position: absolute; left: 0; }
:where(ul.tk-list-slash) > li::before { content: "\2044\2044"; color: var(--tk-highlight); }
:where(ol) { list-style: none; counter-reset: tk-ol; padding-left: 0; margin: 0 0 var(--tk-space-4); }
:where(ol) > li { counter-increment: tk-ol; position: relative; padding-left: 2em; margin-bottom: var(--tk-space-2); }
:where(ol) > li::before { content: counters(tk-ol, ".") "."; position: absolute; left: 0; font-variant-numeric: tabular-nums; }
:where(li) > :where(ul, ol) { margin: var(--tk-space-2) 0 0; }

hr, .tk-divider { border: 0; border-top: var(--tk-line-thin) solid var(--tk-divider); margin: var(--tk-space-6) 0; }
code, kbd, samp, pre { font-family: var(--tk-font-mono); font-size: 0.9em; }
code { background: var(--tk-bg-muted); padding: 0.1em 0.35em; border-radius: var(--tk-radius-sm); }
pre { background: var(--tk-bg-muted); padding: var(--tk-space-4); border-radius: var(--tk-radius-md); overflow-x: auto; }
pre code { background: none; padding: 0; }
img { max-width: 100%; height: auto; }
::selection { background: var(--tk-blue-300); color: var(--tk-blue-900); }

/* Icons from assets/icons/ (inline the SVG; it uses currentColor). */
.tk-icon { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.tk-icon--16 { width: 16px; height: 16px; }
.tk-icon--32 { width: 32px; height: 32px; }
.tk-icon--40 { width: 40px; height: 40px; }

/* ---------- layout: 4/8/12-column grid, container 1320, margins 24/24/32/60 ---------- */
.tk-container {
  width: 100%;
  max-width: calc(var(--tk-layout-container) + 2 * var(--tk-layout-margin-desktop));
  margin: 0 auto;
  padding-inline: var(--tk-layout-margin);
}
@media (min-width: 1024px) { .tk-container { padding-inline: var(--tk-layout-margin-laptop); } }
@media (min-width: 1440px) { .tk-container { padding-inline: var(--tk-layout-margin-desktop); } }
/* 64px between sections; 96px on desktop */
.tk-section { padding-block: calc(var(--tk-layout-section-sm) / 2); }
@media (min-width: 1440px) { .tk-section { padding-block: calc(var(--tk-layout-section) / 2); } }
.tk-stack > * + * { margin-top: var(--tk-space-4); }
.tk-row { display: flex; flex-wrap: wrap; gap: var(--tk-space-4); align-items: center; }
.tk-row--end { align-items: flex-end; }               /* filter rows: buttons line up with labelled fields */
.tk-row--end > .tk-field { margin-bottom: 0; }
.tk-mono { font-family: var(--tk-font-mono); font-variant-numeric: tabular-nums; }   /* IMEI, IDs, hex, IPs */
.tk-grid {
  display: grid; gap: var(--tk-layout-gutter-mobile);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 264px), 1fr));
}
@media (min-width: 768px) { .tk-grid { gap: var(--tk-layout-gutter); } }
.tk-cols { display: grid; gap: var(--tk-layout-gutter-mobile); grid-template-columns: repeat(4, 1fr); }
@media (min-width: 768px)  { .tk-cols { gap: var(--tk-layout-gutter); grid-template-columns: repeat(8, 1fr); } }
@media (min-width: 1024px) { .tk-cols { grid-template-columns: repeat(12, 1fr); } }
.tk-cols > * { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .tk-span-3 { grid-column: span 3; } .tk-span-4 { grid-column: span 4; } .tk-span-6 { grid-column: span 6; }
  .tk-span-8 { grid-column: span 8; } .tk-span-12 { grid-column: span 12; }
}

/* Header: logo top-left, navigation, actions. Navigation uses shadow-4.
   Nav links keep the text colour; a 4px bar on the header's bottom edge marks hover (Grey 400) and the current page (Blue 600). */
.tk-header {
  position: relative; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--tk-space-6);
  min-height: 64px; padding: 0 var(--tk-layout-margin);
  background: var(--tk-surface); box-shadow: var(--tk-shadow-4);
}
@media (min-width: 1024px) { .tk-header { padding-inline: var(--tk-layout-margin-laptop); } }
@media (min-width: 1440px) { .tk-header--site { padding-inline: var(--tk-layout-margin-desktop); } }
.tk-header--site { min-height: 72px; }                      /* public sites: 72px bar, 32px logo */
.tk-header--brand { background: var(--tk-brand); color: var(--tk-on-brand); }
.tk-header__logo { height: 26px; width: auto; display: block; margin-block: var(--tk-space-3); }
.tk-header--site .tk-header__logo { height: 32px; }
.tk-header nav { display: flex; gap: var(--tk-space-6); flex-wrap: wrap; align-self: stretch; }
.tk-header nav a, .tk-header nav a:visited {
  position: relative; display: flex; align-items: center; min-height: 48px;
  color: inherit; font-size: var(--tk-size-body-m); text-decoration: none;
}
.tk-header nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: transparent; transition: background-color .2s;
}
.tk-header nav a:hover::after { background: var(--tk-divider); }
.tk-header nav a[aria-current]::after, .tk-header nav [aria-expanded="true"]::after { background: var(--tk-primary); }
.tk-header--brand nav a:hover::after { background: var(--tk-blue-500); }
.tk-header--brand nav a[aria-current]::after { background: var(--tk-electric-500); }
.tk-header__end { margin-left: auto; display: flex; gap: var(--tk-space-3); align-items: center; padding-block: var(--tk-space-2); }

/* ---------- app shell (internal tools: loaders, viewers, converters, configurators) ----------
   Kit extension; markup in templates/tool.html and guide/components.md "App shell".
   <body class="tk-app">  app bar (.tk-header--app) → optional .tk-toolbar → .tk-app__body (.tk-sidenav + .tk-app__main) → optional status bar.
   App bar: Blue 800 in both themes, 56px. Left: white logo | thin line | TOOL NAME (Oswald 24, 16 on mobile), optional badge,
   then the connected module / context pill. Right: language, theme. Actions never go in the app bar: they go in .tk-toolbar.
   The bottom status bar is per tool (no kit class): keep it a Blue 800 or surface strip, tokens only. */
.tk-header--app { min-height: 56px; gap: 0 var(--tk-space-5); background: var(--tk-brand); color: var(--tk-on-brand); box-shadow: none; }
.tk-header--app .tk-header__end { gap: var(--tk-space-2); padding-block: var(--tk-space-1); }
.tk-header__brand { display: flex; align-items: center; gap: var(--tk-space-4); flex: none; }
a.tk-header__brand, a.tk-header__brand:visited { color: inherit; text-decoration: none; }
.tk-header__title {
  display: flex; align-items: center; gap: var(--tk-space-4); min-width: 0;
  font: 500 var(--tk-size-h-s)/var(--tk-leading-h-s) var(--tk-font-heading); text-transform: uppercase; white-space: nowrap;
}
.tk-header__title::before { content: ""; flex: none; width: 1px; height: 24px; background: var(--tk-blue-500); }   /* the thin line after the logo */
.tk-header--app .tk-badge { background: var(--tk-electric-500); color: var(--tk-grey-900); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
/* Connected module / context: status dot + short text (model, version, serial). Text carries the meaning; the dot only repeats it. */
.tk-header__context {
  display: inline-flex; align-items: center; gap: var(--tk-space-2);
  flex: 1 1 0; min-width: 0; max-width: max-content;   /* shortens with "…" before the bar wraps */
  min-height: 32px; margin-block: var(--tk-space-3); padding: 0 var(--tk-space-3);
  border: 1px solid var(--tk-blue-500); border-radius: var(--tk-radius-pill);
  font: 500 var(--tk-size-body-s)/var(--tk-leading-body-s) var(--tk-font-body); white-space: nowrap;
}
.tk-header__context > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.tk-status-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tk-grey-400); }
.tk-status-dot--ok { background: var(--tk-green-500); }
.tk-status-dot--warning { background: var(--tk-yellow-500); }
.tk-status-dot--danger { background: var(--tk-pink-500); }
/* Icon button (theme, help, menu): 48px hit area, 24px icon. Needs aria-label + title. */
.tk-header__icon {
  display: inline-grid; place-content: center; flex: none; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: var(--tk-radius-md); background: none; color: inherit; cursor: pointer;
}
.tk-header__icon:hover { background: var(--tk-blue-700); }
.tk-header__icon svg { width: 24px; height: 24px; }
/* Language: <label class="tk-header__lang"><svg translate/><select class="tk-select tk-header__select">…</select></label> */
.tk-header__lang { display: flex; align-items: center; gap: var(--tk-space-2); }
.tk-header__select.tk-select {
  width: auto; min-height: 40px; padding: 0 var(--tk-space-7) 0 var(--tk-space-3);
  background-color: transparent; color: inherit; border-color: var(--tk-blue-500); box-shadow: none; font-weight: 400;
}
.tk-header__select.tk-select:hover { border-color: var(--tk-white); }
.tk-header__select option { background: var(--tk-surface); color: var(--tk-text); }
.tk-header--app :focus-visible, .tk-header__select.tk-select:focus { outline: 2px solid var(--tk-white); outline-offset: 2px; border-color: var(--tk-white); box-shadow: none; }
@media (max-width: 767px) {
  .tk-header--app { gap: 0 var(--tk-space-4); }
  .tk-header__brand, .tk-header__title { gap: var(--tk-space-3); }
  .tk-header__title { font-size: var(--tk-size-h-xs); line-height: var(--tk-leading-h-xs); }
  .tk-header__title::before { height: 20px; }
  .tk-header__lang > svg { display: none; }
  .tk-header__brand { flex: 1 0 100%; }                                  /* row 1: logo | name */
  .tk-header__context { order: 10; margin-block: 0 var(--tk-space-2); }  /* row 2: module pill (shortens) + language, theme */
  .tk-header--app .tk-header__end { order: 11; padding-block: 0 var(--tk-space-2); }
}

/* Toolbar: the tool's actions, one row under the app bar. --sm buttons (40px), one primary, the rest --ghost.
   .tk-toolbar__sep groups buttons; .tk-toolbar__end pushes a group (e.g. Disconnect) to the right. Wraps on narrow screens. */
.tk-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--tk-space-3);
  padding: var(--tk-space-3) var(--tk-layout-margin);
  background: var(--tk-surface); border-bottom: 1px solid var(--tk-border);
}
@media (min-width: 1024px) { .tk-toolbar { padding-inline: var(--tk-layout-margin-laptop); } }
.tk-toolbar__sep { flex: none; width: 1px; height: 24px; background: var(--tk-border); }
.tk-toolbar__end { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--tk-space-3); align-items: center; }

/* Side navigation: 280px column, 48px rows, 24px icon + Inter 16 label. Current page: Blue 100 fill, bold,
   4px bar on the left in the highlight colour (Blue 600; Electric 500 in dark). Group labels are small spaced labels.
   .tk-sidenav__foot holds items pinned to the bottom (program settings, about). Under 1024px it becomes a scrolling strip. */
.tk-sidenav {
  display: flex; flex-direction: column; gap: var(--tk-space-1); flex: none;
  width: 280px; padding: var(--tk-space-4); overflow-y: auto;   /* 16 + 16 item padding = icons on the 32px line of the logo and toolbar */
  background: var(--tk-surface); border-right: 1px solid var(--tk-border);
}
.tk-sidenav__group {
  margin: var(--tk-space-5) var(--tk-space-4) var(--tk-space-2);
  font: 700 var(--tk-size-spaced-s)/var(--tk-leading-spaced) var(--tk-font-body);
  text-transform: uppercase; letter-spacing: 0.3em; color: var(--tk-text-muted); white-space: nowrap;
}
.tk-sidenav__item, .tk-sidenav__item:visited {
  display: flex; align-items: center; gap: var(--tk-space-3); min-height: 48px; padding: var(--tk-space-2) var(--tk-space-4);
  border-radius: var(--tk-radius-md); color: var(--tk-text); text-decoration: none;
  font-size: var(--tk-size-body-m); line-height: var(--tk-leading-body-m);
  transition: background-color .15s;
}
.tk-sidenav__item svg { flex: none; width: 24px; height: 24px; }
.tk-sidenav__item:hover { background: var(--tk-bg-muted); text-decoration: none; }
.tk-sidenav__item[aria-current] { background: var(--tk-bg-subtle); color: var(--tk-heading); font-weight: 700; box-shadow: inset 4px 0 0 var(--tk-highlight); }
.tk-sidenav__foot { margin-top: auto; padding-top: var(--tk-space-3); border-top: 1px solid var(--tk-border); }

/* Layout: full-height app; the side nav and the main area scroll on their own. Normal page scroll under 1024px. */
.tk-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.tk-app > * { flex: none; }
.tk-app > .tk-app__body { flex: 1; min-height: 0; display: flex; }
.tk-app__main { flex: 1; min-width: 0; overflow: auto; padding: var(--tk-space-6) var(--tk-layout-margin-laptop) var(--tk-space-7); }
@media (max-width: 1023px) {
  .tk-app { height: auto; min-height: 100dvh; }
  .tk-app > .tk-app__body { flex-direction: column; }
  .tk-app__main { overflow: visible; padding: var(--tk-space-5) var(--tk-layout-margin) var(--tk-space-7); }
  .tk-sidenav {
    flex-direction: row; width: auto; padding: var(--tk-space-2) calc(var(--tk-layout-margin) - var(--tk-space-4)); overflow-x: auto; scrollbar-width: none;
    border-right: 0; border-bottom: 1px solid var(--tk-border);
  }
  .tk-sidenav__group { display: none; }
  .tk-sidenav__item { flex: none; white-space: nowrap; }
  .tk-sidenav__item[aria-current] { box-shadow: inset 0 -4px 0 var(--tk-highlight); }
  .tk-sidenav__foot { display: contents; }
}

/* Logo swap: put both <img class="tk-logo-light"> (blue) and <img class="tk-logo-dark"> (white).
   On a Blue 800 bar use only <img class="tk-logo-white">. .tk-show-light / .tk-show-dark do the same swap for anything else (theme icon). */
.tk-logo-dark, .tk-show-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.tk-logo-light, .tk-show-light) { display: none; }
  :root:not([data-theme="light"]) :is(.tk-logo-dark, .tk-show-dark) { display: block; }
}
:root[data-theme="dark"] :is(.tk-logo-light, .tk-show-light) { display: none; }
:root[data-theme="dark"] :is(.tk-logo-dark, .tk-show-dark) { display: block; }

/* Brand band: full-bleed Blue 800 (or 900) block with white Oswald title */
.tk-band { background: var(--tk-brand); color: var(--tk-on-brand); padding-block: var(--tk-space-7); }
.tk-band--dark { background: var(--tk-blue-900); }
.tk-band :is(h1, h2, h3, h4, [class*="tk-h-"], .tk-hero) { color: var(--tk-white); }
.tk-band .tk-eyebrow, .tk-band .tk-hl, .tk-band .tk-dash::before { color: var(--tk-electric-500); }
:is(.tk-band, .tk-footer, .tk-card--brand, .tk-header--brand) a { color: var(--tk-white); }

/* ---------- buttons: 8px radius, Oswald Medium uppercase, centred label ----------
   Sizes: --sm 40px (dense tools), default 56px (forms, next to inputs), --lg 64px (hero). Mobile: full width, 48px. */
.tk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--tk-space-2);
  min-height: 56px; padding: 0 var(--tk-space-5);
  font: 500 var(--tk-size-button-m)/var(--tk-leading-button-m) var(--tk-font-heading);
  text-transform: uppercase; letter-spacing: 0; text-align: center;
  border: 1px solid transparent; border-radius: var(--tk-radius-md);
  background: var(--tk-primary); color: var(--tk-on-primary);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.tk-btn:visited { color: var(--tk-on-primary); }
.tk-btn:hover { background: var(--tk-primary-hover); text-decoration: none; }
.tk-btn:active, .tk-btn:focus-visible { box-shadow: inset 0 0 0 2px var(--tk-ring); }
.tk-btn svg { width: 24px; height: 24px; flex: none; }
.tk-btn--secondary, .tk-btn--brand { background: var(--tk-secondary); color: var(--tk-on-secondary); }
.tk-btn--secondary:hover, .tk-btn--brand:hover { background: var(--tk-secondary-hover); }
.tk-btn--accent { background: var(--tk-electric-500); color: var(--tk-grey-900); }
.tk-btn--accent:visited { color: var(--tk-grey-900); }
.tk-btn--accent:hover { background: var(--tk-electric-300); }
.tk-btn--accent:active, .tk-btn--accent:focus-visible { box-shadow: inset 0 0 0 2px var(--tk-blue-600); }
.tk-btn--ghost { background: transparent; color: var(--tk-ghost); border-color: var(--tk-ghost); }
.tk-btn--ghost:visited { color: var(--tk-ghost); }
.tk-btn--ghost:hover { background: var(--tk-ghost-hover-bg); border-color: var(--tk-ghost-hover-bg); color: var(--tk-white); }
.tk-btn--white { background: var(--tk-white); color: var(--tk-blue-700); }
.tk-btn--white:visited { color: var(--tk-blue-700); }
.tk-btn--white:hover { background: var(--tk-grey-600); color: var(--tk-white); }
.tk-btn--danger { background: var(--tk-danger-mark); color: var(--tk-white); }       /* kit extension, not in Figma */
.tk-btn--danger:hover { background: var(--tk-danger-hover); }
/* Ghost on dark surfaces becomes "ghost white" */
:is(.tk-band, .tk-header--brand, .tk-card--brand, .tk-footer) .tk-btn--ghost { color: var(--tk-white); border-color: var(--tk-white); }
:is(.tk-band, .tk-header--brand, .tk-card--brand, .tk-footer) .tk-btn--ghost:hover { background: var(--tk-white); color: var(--tk-blue-800); }
.tk-btn:disabled, .tk-btn[aria-disabled="true"] {
  background: var(--tk-disabled-bg); color: var(--tk-on-disabled); border-color: transparent;
  cursor: not-allowed; box-shadow: none;
}
.tk-btn--ghost:disabled, .tk-btn--ghost[aria-disabled="true"] { background: transparent; color: var(--tk-disabled-fg); border-color: var(--tk-disabled-fg); }
.tk-btn--white:disabled, .tk-btn--white[aria-disabled="true"] { background: var(--tk-white); color: var(--tk-grey-400); }
.tk-btn--accent:disabled, .tk-btn--accent[aria-disabled="true"] { background: var(--tk-electric-100); color: var(--tk-grey-600); }
.tk-btn--sm { min-height: 40px; padding: 0 var(--tk-space-4); font-size: var(--tk-size-button-s); }
.tk-btn--sm svg { width: 16px; height: 16px; }
.tk-btn--lg { min-height: 64px; padding: 0 var(--tk-space-6); font-size: var(--tk-size-button-l); line-height: var(--tk-leading-button-l); }
.tk-btn--icon { padding: 0; width: 56px; }                  /* icon-only: add aria-label */
.tk-btn--icon.tk-btn--sm { width: 40px; }
@media (max-width: 767px) {
  .tk-btn:not(.tk-btn--sm):not(.tk-btn--inline):not(.tk-btn--icon) {
    width: 100%; min-height: 48px; font-size: var(--tk-size-button-m); line-height: var(--tk-leading-button-m);
  }
}

/* ---------- forms: 56px fields, 8px radius, Grey 400 border, 2px Blue 600 focus ---------- */
.tk-field { position: relative; display: flex; flex-direction: column; gap: var(--tk-space-1); margin-bottom: var(--tk-space-4); }
.tk-label { font: 700 var(--tk-size-body-s)/var(--tk-leading-body-s) var(--tk-font-body); color: var(--tk-text); }
.tk-hint  { font-size: var(--tk-size-body-xs); line-height: var(--tk-leading-body-xs); color: var(--tk-text-muted); }
.tk-input, .tk-select, .tk-textarea {
  width: 100%; min-height: 56px; padding: var(--tk-space-4) var(--tk-space-3);
  font: 500 var(--tk-size-body-m)/var(--tk-leading-body-m) var(--tk-font-body); color: var(--tk-text);
  background: var(--tk-input-bg); border: 1px solid var(--tk-input-border); border-radius: var(--tk-radius-md);
  box-shadow: var(--tk-shadow-input);
}
.tk-textarea { min-height: 104px; resize: vertical; }
.tk-input::placeholder, .tk-textarea::placeholder { color: var(--tk-text-muted); font-weight: 400; }
.tk-input:hover, .tk-select:hover, .tk-textarea:hover { border-color: var(--tk-input-border-hover); }
.tk-input:focus, .tk-select:focus, .tk-textarea:focus { outline: none; border-color: var(--tk-focus); box-shadow: 0 0 0 1px var(--tk-focus); }
.tk-input:disabled, .tk-select:disabled, .tk-textarea:disabled,
.tk-input[readonly], .tk-textarea[readonly] { background: var(--tk-input-disabled-bg); border-color: var(--tk-input-border); color: var(--tk-text-muted); box-shadow: none; }
.tk-input:disabled, .tk-select:disabled, .tk-textarea:disabled { cursor: not-allowed; }
.tk-select {
  appearance: none; padding-right: var(--tk-space-7); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.tk-input--sm, .tk-select.tk-input--sm { min-height: 40px; padding-block: var(--tk-space-2); }    /* dense tools */
.tk-field--error :is(.tk-input, .tk-select, .tk-textarea) { border-color: var(--tk-danger-mark); }
.tk-field--error :is(.tk-input, .tk-select, .tk-textarea):hover { border-color: var(--tk-danger-hover); }
.tk-field--error :is(.tk-input, .tk-select, .tk-textarea):focus { border-color: var(--tk-focus); }
/* Error message (Figma Patterns > Forms): Inter 14/20 Pink 700, a 16px solid "exclamation" icon before it, 4px under the field.
   Show it on submit (empty required field) or when the format is wrong; it stays until the value is fixed. */
.tk-field--error .tk-hint, .tk-error {
  display: flex; align-items: flex-start; gap: var(--tk-space-1);
  font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); color: var(--tk-danger-fg);
}
:is(.tk-field--error .tk-hint, .tk-error) svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
/* Character counter under a textarea: "0/3000" */
.tk-field__count { font-size: var(--tk-size-body-xs); line-height: var(--tk-leading-body-xs); color: var(--tk-text-subtle); font-variant-numeric: tabular-nums; }
/* Form (Figma Patterns > Forms): one column, 648px (6 columns), inset fields 8px apart, 24px to consents and to the button */
.tk-form { display: flex; flex-direction: column; gap: var(--tk-space-2); max-width: 648px; }
.tk-form > .tk-field { margin-bottom: 0; }
.tk-form__intro { margin-bottom: var(--tk-space-4); }
.tk-form__intro > :is(h1, h2, h3, [class*="tk-h-"]) { margin-bottom: var(--tk-space-1); }
.tk-form__intro > p { margin: 0; font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); color: var(--tk-text-subtle); }
.tk-form__consents { display: flex; flex-direction: column; gap: var(--tk-space-3); margin-top: var(--tk-space-4); font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); }
.tk-form__actions { display: flex; flex-wrap: wrap; gap: var(--tk-space-4); margin-top: var(--tk-space-4); }
/* Label inside the field (Figma default): <div class="tk-field tk-field--inset"><label class="tk-label">…</label><input class="tk-input"></div> */
.tk-field--inset > .tk-label {
  position: absolute; top: var(--tk-space-2); left: calc(var(--tk-space-3) + 1px); z-index: 1; pointer-events: none;
  font: 400 var(--tk-size-body-xs)/var(--tk-leading-body-xs) var(--tk-font-body); color: var(--tk-text-muted);
}
.tk-field--inset > :is(.tk-input, .tk-select, .tk-textarea) { padding-top: calc(var(--tk-space-2) + var(--tk-leading-body-xs)); padding-bottom: var(--tk-space-2); }
.tk-field--error.tk-field--inset > .tk-label { color: var(--tk-danger-fg); }

/* Checkbox and radio: 16px (default) or 24px (.tk-check--lg), 4px radius, Blue 600 when selected */
.tk-check { display: inline-flex; align-items: center; gap: var(--tk-space-2); cursor: pointer; }
.tk-check input[type="checkbox"], .tk-check input[type="radio"] {
  appearance: none; flex: none; display: inline-grid; place-content: center; margin: 0; cursor: pointer;
  width: 16px; height: 16px; border: 1px solid var(--tk-input-border); border-radius: var(--tk-radius-sm);
  background: var(--tk-input-bg);
}
.tk-check input[type="radio"] { border-radius: 50%; }
.tk-check--lg input[type="checkbox"], .tk-check--lg input[type="radio"] { width: 24px; height: 24px; }
.tk-check input:hover { border-color: var(--tk-input-border-hover); }
.tk-check input:checked { background: var(--tk-control-checked); border-color: var(--tk-control-checked); }
.tk-check input:checked:hover { background: var(--tk-control-checked-hover); border-color: var(--tk-control-checked-hover); }
.tk-check input[type="checkbox"]:checked::before {
  content: ""; width: 0.55em; height: 0.3em; margin-top: -0.1em;
  border: solid var(--tk-white); border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.tk-check input[type="radio"]:checked { box-shadow: inset 0 0 0 3px var(--tk-input-bg); }
.tk-check--lg input[type="radio"]:checked { box-shadow: inset 0 0 0 5px var(--tk-input-bg); }
.tk-check input:focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 3px; }
.tk-check--error input, .tk-check input[aria-invalid="true"] { border-color: var(--tk-danger-mark); }
.tk-check--error input:hover, .tk-check input[aria-invalid="true"]:hover { border-color: var(--tk-danger-hover); }
.tk-check--error input:checked, .tk-check input[aria-invalid="true"]:checked { background: var(--tk-danger-mark); border-color: var(--tk-danger-mark); }
.tk-check input:disabled { background: var(--tk-input-disabled-bg); border-color: var(--tk-input-border); cursor: not-allowed; }
.tk-check:has(input:disabled) { color: var(--tk-text-muted); cursor: not-allowed; }
.tk-check--top { align-items: flex-start; }                 /* multi-line labels (consents): box aligns with the first line */
.tk-check--top input { margin-top: 4px; }
.tk-check--top.tk-check--lg input { margin-top: 0; }

/* Toggle switch: <label class="tk-switch"><input type="checkbox" role="switch"> Analytics cookies</label>
   46×24. Off Grey 400, on Blue 600; disabled + checked = "always on" (Blue 500). */
.tk-switch { display: inline-flex; align-items: center; gap: var(--tk-space-3); cursor: pointer; }
.tk-switch input {
  appearance: none; flex: none; margin: 0; cursor: pointer; position: relative;
  width: 46px; height: 24px; border-radius: var(--tk-radius-pill); background: var(--tk-input-border);
  transition: background-color .15s;
}
.tk-switch input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--tk-white); transition: transform .15s;
}
.tk-switch input:hover { background: var(--tk-input-border-hover); }
.tk-switch input:checked { background: var(--tk-control-checked); }
.tk-switch input:checked:hover { background: var(--tk-control-checked-hover); }
.tk-switch input:checked::before { transform: translateX(22px); }
.tk-switch input:focus-visible { outline: 2px solid var(--tk-focus); outline-offset: 3px; }
.tk-switch input:disabled { cursor: not-allowed; }
.tk-switch input:disabled:checked { background: var(--tk-control-locked); }

/* ---------- table: no vertical lines, strong first divider, no line under the last row ---------- */
.tk-table-wrap { overflow-x: auto; }
.tk-table { width: 100%; border-collapse: collapse; font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); }
.tk-table th, .tk-table td { padding: var(--tk-space-3) var(--tk-space-4); text-align: left; vertical-align: top; }
.tk-table thead th { background: var(--tk-table-head-bg); color: var(--tk-text); font-weight: 700; border-bottom: var(--tk-line-strong) solid var(--tk-divider-strong); }
.tk-table tbody td { border-bottom: var(--tk-line-thin) solid var(--tk-divider); }
.tk-table tbody tr:last-child td { border-bottom: 0; }
.tk-table tbody tr:hover td { background: var(--tk-bg-subtle); }
.tk-table--accent thead th { background: none; font-size: var(--tk-size-spaced-m); line-height: var(--tk-leading-spaced); text-transform: uppercase; letter-spacing: 0.3em; }
.tk-table .tk-num { text-align: right; font-variant-numeric: tabular-nums; }
.tk-table .tk-product { font-family: var(--tk-font-heading); font-weight: 500; text-transform: uppercase; }  /* product names in Oswald */

/* ---------- card: 8px radius; outline (default), grey, subtle (Blue 100), brand, shadow ---------- */
.tk-card {
  display: block; color: inherit;
  background: var(--tk-surface-raised); border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius-md); padding: var(--tk-space-5);
}
.tk-card--grey   { background: var(--tk-bg-muted); border-color: transparent; }
.tk-card--subtle { background: var(--tk-bg-subtle); border-color: transparent; }
.tk-card--shadow { border-color: transparent; box-shadow: var(--tk-shadow-1); }
.tk-card--brand  { background: var(--tk-brand); color: var(--tk-on-brand); border-color: transparent; }
.tk-card--brand :is(h2, h3, h4, [class*="tk-h-"]) { color: var(--tk-white); }
.tk-card--brand .tk-eyebrow { color: var(--tk-electric-500); }
a.tk-card, .tk-card--link { text-decoration: none; transition: box-shadow .2s; }
a.tk-card:visited { color: inherit; }
a.tk-card:hover, .tk-card--link:hover { box-shadow: var(--tk-shadow-2); text-decoration: none; }
.tk-card > :last-child { margin-bottom: 0; }
/* Media card (Figma Patterns > Card grid): Grey 200, 16px radius around an 8px 3:2 image, 24px padding (16 below 1024).
   Stack: image → 8 → meta → title → 4 → text (≤ 3 lines) → 24 → action pinned to the bottom. */
.tk-card--media { display: flex; flex-direction: column; background: var(--tk-bg-muted); border-color: transparent; border-radius: var(--tk-radius-lg); }
.tk-card__media { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--tk-radius-md); margin-bottom: var(--tk-space-2); background: var(--tk-placeholder); }
.tk-card__meta { display: flex; align-items: center; gap: var(--tk-space-1); font-size: var(--tk-size-body-xs); line-height: var(--tk-leading-body-xs); color: var(--tk-text-muted); margin-bottom: var(--tk-space-2); }   /* Figma: Grey 600, which fails AA on Grey 200 */
.tk-card__meta svg { width: 16px; height: 16px; }
.tk-card--media :is(h2, h3, h4, [class*="tk-h-"]) { margin-bottom: var(--tk-space-1); }
.tk-card__actions { margin-top: auto; padding-top: var(--tk-space-5); }
@media (max-width: 1023px) { .tk-card--media { padding: var(--tk-space-4); } }
/* Card grid: 3 / 3 / 2 / 1 columns (1440 / 1024 / 768 / under 520), 24px gaps. Fewer cards stay left. */
.tk-grid--3 { grid-template-columns: repeat(3, 1fr); gap: var(--tk-layout-gutter); }
@media (max-width: 1023px) { .tk-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 519px)  { .tk-grid--3 { grid-template-columns: 1fr; } }
/* Aspect ratios (Figma Patterns > Media). 3:2 is the standard; a set ratio is never changed between breakpoints. */
.tk-ratio-3x2 { aspect-ratio: 3 / 2; } .tk-ratio-1x1 { aspect-ratio: 1; } .tk-ratio-16x9 { aspect-ratio: 16 / 9; }
:is(.tk-ratio-3x2, .tk-ratio-1x1, .tk-ratio-16x9) { width: 100%; height: auto; object-fit: cover; border-radius: var(--tk-radius-md); }

/* ---------- badge (status pill), category label, tag ---------- */
.tk-badge {
  display: inline-flex; align-items: center; gap: var(--tk-space-1);
  min-height: 24px; padding: var(--tk-space-1) var(--tk-space-2); border-radius: var(--tk-radius-pill); white-space: nowrap;
  font: 400 var(--tk-size-body-xs)/var(--tk-leading-body-xs) var(--tk-font-body);
  background: var(--tk-neutral-bg); color: var(--tk-text);
}
.tk-badge--info    { background: var(--tk-info-bg);     color: var(--tk-info-fg); }
.tk-badge--success { background: var(--tk-success-bg);  color: var(--tk-success-fg); }
.tk-badge--warning { background: var(--tk-warning-tint); color: var(--tk-grey-800); }
.tk-badge--danger  { background: var(--tk-danger-bg);   color: var(--tk-danger-fg); }
.tk-badge--brand   { background: var(--tk-primary);     color: var(--tk-on-primary); }
/* Dark: the badge fills equal the card surface, so tinted badges get a thin outline to stay visible. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tk-badge:not(.tk-badge--warning, .tk-badge--brand) { box-shadow: inset 0 0 0 1px var(--tk-divider); }
}
:root[data-theme="dark"] .tk-badge:not(.tk-badge--warning, .tk-badge--brand) { box-shadow: inset 0 0 0 1px var(--tk-divider); }

/* Category label on cards (not interactive): white, --dark (Blue 800), --light (Blue 200). --link = interactive outline pill. */
.tk-category {
  display: inline-flex; align-items: center; min-height: 32px; padding: var(--tk-space-1) var(--tk-space-2);
  border-radius: var(--tk-radius-sm); font: 400 var(--tk-size-body-m)/var(--tk-leading-body-m) var(--tk-font-body);
  background: var(--tk-white); color: var(--tk-blue-800);
}
.tk-category--dark  { background: var(--tk-blue-800); color: var(--tk-white); }
.tk-category--light { background: var(--tk-blue-200); color: var(--tk-blue-800); }
.tk-category--link {
  min-height: 0; padding: var(--tk-space-1) var(--tk-space-2); border-radius: var(--tk-radius-md);
  border: 1px solid var(--tk-ghost); background: transparent; color: var(--tk-ghost);
  font-size: var(--tk-size-body-xs); line-height: var(--tk-leading-body-xs); text-decoration: none;
}
.tk-category--link:visited { color: var(--tk-ghost); }
.tk-category--link:hover { background: var(--tk-bg-muted); border-color: transparent; text-decoration: none; }

/* Tag (filter chip): 40px, white with Grey 400 border, Grey 200 on hover. Optional close button. */
.tk-tag {
  display: inline-flex; align-items: center; gap: var(--tk-space-2); min-height: 40px; padding: var(--tk-space-2) var(--tk-space-3);
  border: 1px solid var(--tk-input-border); border-radius: var(--tk-radius-md); background: var(--tk-input-bg);
  font: 400 var(--tk-size-body-s)/var(--tk-leading-body-s) var(--tk-font-body); color: var(--tk-text);
}
.tk-tag:hover { background: var(--tk-bg-muted); }
.tk-tag:focus-within { outline: 2px solid var(--tk-focus); outline-offset: 2px; }
.tk-tag__close { display: inline-grid; place-content: center; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.tk-tag__close:focus-visible { outline: none; }
.tk-tag__close svg { width: 16px; height: 16px; }

/* ---------- tooltip: Grey 800, white text, 8px radius, shadow-3 ----------
   <span class="tk-tooltip-host" tabindex="0">Trigger<span class="tk-tooltip" role="tooltip">Explains the trigger</span></span> */
.tk-tooltip-host { position: relative; display: inline-flex; }
.tk-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 20;
  width: max-content; max-width: 280px; padding: var(--tk-space-2) var(--tk-space-3);
  background: var(--tk-tooltip-bg); color: var(--tk-tooltip-fg); border-radius: var(--tk-radius-md);
  font: 400 var(--tk-size-body-s)/var(--tk-leading-body-s) var(--tk-font-body); box-shadow: var(--tk-shadow-3);
  visibility: hidden; opacity: 0; transition: opacity .15s; pointer-events: none;
}
.tk-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: var(--tk-tooltip-bg);
}
.tk-tooltip-host:hover .tk-tooltip, .tk-tooltip-host:focus-within .tk-tooltip, .tk-tooltip--open { visibility: visible; opacity: 1; }

/* ---------- modal (Figma Patterns > Modals): <dialog class="tk-modal"> opened with showModal() ----------
   Widths: --sm 424 (4 col), default 648 (6 col), --lg 1320 (12 col; 720 on tablet). Height follows the content.
   White, 8px radius, shadow-3, 24px padding, Grey 900 backdrop at 80%. Below 768px it is a sheet stuck to the bottom
   with only the top corners rounded. The page behind doesn't scroll. Form modals close only with ✕ or after submit;
   other modals also close on a backdrop click (add data-dismiss="backdrop" and a small script). Esc closes all. */
.tk-modal {
  width: min(648px, calc(100vw - 2 * var(--tk-space-5))); max-width: none; max-height: calc(100dvh - 2 * var(--tk-space-5));
  padding: var(--tk-space-5); border: 0; border-radius: var(--tk-radius-md); overflow: auto;
  background: var(--tk-surface); color: var(--tk-text); box-shadow: var(--tk-shadow-3);
}
.tk-modal::backdrop { background: color-mix(in srgb, var(--tk-grey-900) 80%, transparent); }
.tk-modal--sm { width: min(424px, calc(100vw - 2 * var(--tk-space-5))); }
.tk-modal--lg { width: min(1320px, calc(100vw - 2 * var(--tk-space-5))); }
.tk-modal > :is(h1, h2, h3, [class*="tk-h-"]):first-of-type { margin-right: var(--tk-space-7); }   /* room for ✕ */
.tk-modal__close {
  position: absolute; top: var(--tk-space-3); right: var(--tk-space-3); width: 48px; height: 48px;
  display: grid; place-content: center; padding: 0; border: 0; border-radius: var(--tk-radius-md);
  background: none; color: var(--tk-ghost); cursor: pointer;
}
.tk-modal__close:hover { color: var(--tk-text); }
.tk-modal__close svg { width: 24px; height: 24px; }
.tk-modal__actions { display: flex; flex-wrap: wrap; gap: var(--tk-space-4); margin-top: var(--tk-space-5); }
/* Result modal after submit: 64px icon (solid check-circle / x-circle), title, one sentence. Left-aligned. */
.tk-modal__icon { display: block; width: 64px; height: 64px; margin-bottom: var(--tk-space-5); color: var(--tk-success-mark); }
.tk-modal__icon--danger { color: var(--tk-danger-mark); }
html:has(.tk-modal[open]) { overflow: hidden; }
@media (max-width: 767px) {
  .tk-modal, .tk-modal--sm, .tk-modal--lg {
    width: 100%; max-height: calc(100dvh - var(--tk-space-7)); margin: auto 0 0;
    border-radius: var(--tk-radius-md) var(--tk-radius-md) 0 0;
  }
  .tk-modal__actions { flex-direction: column; }
}

/* ---------- empty state (Figma Patterns > Empty state) ----------
   Placeholder art, Inter 24/32 title, Inter 16 hint, both Grey 600. Top of the content area. Left-aligned (style rule wins
   over the pattern's centred text). Optional action: never primary if the view already has one. */
.tk-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tk-space-2); padding-block: var(--tk-space-6); }
.tk-empty__art { width: 128px; height: auto; color: var(--tk-placeholder); margin-bottom: var(--tk-space-4); }
.tk-empty__title { margin: 0; font-size: var(--tk-size-body-l); line-height: var(--tk-leading-body-l); color: var(--tk-text-subtle); }
.tk-empty__text { margin: 0; color: var(--tk-text-subtle); }
.tk-empty > .tk-btn { margin-top: var(--tk-space-4); }
@media (max-width: 767px) { .tk-empty__title { font-size: var(--tk-size-body-m); line-height: var(--tk-leading-body-m); } }
/* Image placeholder frame: Grey 200, 8px radius, 3:2, art centred (media.svg or person.svg) */
.tk-placeholder { display: grid; place-items: center; aspect-ratio: 3 / 2; border-radius: var(--tk-radius-md); background: var(--tk-bg-muted); color: var(--tk-placeholder); }
.tk-card--media .tk-placeholder { background: var(--tk-surface); }   /* stays visible on the Grey 200 card */

/* ---------- file upload (Figma Patterns > Forms) ----------
   Drop zone: 2px dashed Grey 400 (Pink 700 on error), 8px radius. Title Oswald, "or", ghost "Browse files" button.
   File list: shadow-1 card, 40px rows, a ✕ to remove; an invalid file name is Pink 700. */
.tk-dropzone {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--tk-space-2);
  padding: var(--tk-space-6) var(--tk-space-5); border: 2px dashed var(--tk-input-border); border-radius: var(--tk-radius-md);
  background: var(--tk-input-bg);
}
.tk-dropzone:hover, .tk-dropzone.is-dragover { border-color: var(--tk-input-border-hover); background: var(--tk-bg-subtle); }
.tk-dropzone:focus-within { border-color: var(--tk-focus); }
.tk-dropzone--error { border-color: var(--tk-danger-mark); }
.tk-dropzone > svg { width: 32px; height: 32px; color: var(--tk-heading); }
.tk-dropzone__or { font: 500 var(--tk-size-h-xs)/var(--tk-leading-h-xs) var(--tk-font-heading); text-transform: uppercase; color: var(--tk-text-subtle); }
.tk-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tk-filelist { list-style: none; margin: var(--tk-space-4) 0 0; padding: var(--tk-space-3); border-radius: var(--tk-radius-md); background: var(--tk-surface-raised); box-shadow: var(--tk-shadow-1); }
.tk-filelist > li { display: flex; align-items: center; gap: var(--tk-space-2); min-height: 40px; padding: 0; margin: 0; }
.tk-filelist > li::before { content: none; }
.tk-filelist > li > :first-child { flex: 1; overflow-wrap: anywhere; }
.tk-filelist > li.is-invalid { color: var(--tk-danger-fg); }

/* ---------- alert (kit extension) ---------- */
.tk-alert {
  display: flex; gap: var(--tk-space-3); padding: var(--tk-space-3) var(--tk-space-4);
  border-left: 4px solid var(--tk-link); border-radius: var(--tk-radius-md);
  background: var(--tk-info-bg); color: var(--tk-info-fg); margin-bottom: var(--tk-space-4);
}
.tk-alert--success { background: var(--tk-success-bg); color: var(--tk-success-fg); border-left-color: var(--tk-success-mark); }
.tk-alert--warning { background: var(--tk-warning-bg); color: var(--tk-warning-fg); border-left-color: var(--tk-warning-mark); }
.tk-alert--danger  { background: var(--tk-danger-bg);  color: var(--tk-text);       border-left-color: var(--tk-danger-mark); }
.tk-alert > :last-child { margin-bottom: 0; }

/* ---------- tabs (Figma Patterns > Tabs) ----------
   48px cells that hug the label (32px side padding, 16 on mobile), no gap. Inter 16/24.
   Selected: Grey 800 label + 2px Blue 600 line across the whole cell. Others Grey 600; hover Grey 800.
   --line adds the 1px Grey 400 rule under the bar. --lg (representative pages): 56px, Inter 24/32 (default size on mobile).
   --center centres the bar (desktop/tablet only). The bar scrolls sideways when it overflows. */
.tk-tabs { display: flex; overflow-x: auto; scrollbar-width: none; margin-bottom: var(--tk-space-7); }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tabs--line { box-shadow: inset 0 -1px 0 var(--tk-divider); }
.tk-tabs--center { justify-content: center; }
.tk-tab {
  flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--tk-space-6);
  background: none; border: 0; box-shadow: inset 0 -2px 0 transparent; border-radius: 0;
  font: 400 var(--tk-size-body-m)/var(--tk-leading-body-m) var(--tk-font-body); color: var(--tk-text-subtle);
  cursor: pointer; white-space: nowrap; text-decoration: none; transition: box-shadow .2s, color .2s;
}
.tk-tab:visited { color: var(--tk-text-subtle); }
.tk-tab:hover { color: var(--tk-text); text-decoration: none; }
.tk-tab[aria-selected="true"], .tk-tab.is-active { color: var(--tk-text); box-shadow: inset 0 -2px 0 var(--tk-highlight); }
.tk-tab:focus-visible { outline-offset: -2px; }
.tk-tabs--lg .tk-tab { min-height: 56px; font-size: var(--tk-size-body-l); line-height: var(--tk-leading-body-l); }
.tk-tabs--sticky { position: sticky; top: 0; z-index: 5; background: var(--tk-bg); }   /* local navigation; follow the scroll with JS */
@media (max-width: 767px) {
  .tk-tabs { margin-bottom: var(--tk-space-5); }
  .tk-tabs--center { justify-content: flex-start; }
  .tk-tab { padding: 0 var(--tk-space-4); }
  .tk-tabs--lg .tk-tab { min-height: 48px; font-size: var(--tk-size-body-m); line-height: var(--tk-leading-body-m); }
}

/* ---------- breadcrumbs: <nav class="tk-breadcrumbs" aria-label="Breadcrumb"><ol><li><a href="/">Home</a></li>…<li aria-current="page">Page</li></ol></nav>
   At least 3 levels, back to the homepage. ---------- */
.tk-breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tk-space-2); margin: 0 0 var(--tk-space-4); font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); }
.tk-breadcrumbs li { padding: 0; margin: 0; display: inline-flex; align-items: center; gap: var(--tk-space-2); }
.tk-breadcrumbs li::before { content: none; }
.tk-breadcrumbs li + li::before {
  content: ""; position: static; width: 6px; height: 6px; margin-right: 2px;
  border: solid var(--tk-text-muted); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}
.tk-breadcrumbs a, .tk-breadcrumbs a:visited { color: var(--tk-text); text-decoration: none; }
.tk-breadcrumbs a:hover { text-decoration: underline; }
.tk-breadcrumbs [aria-current] { color: var(--tk-text-muted); }

/* ---------- pagination: <nav class="tk-pagination" aria-label="Pagination"> with <a>/<button> items ----------
   Current page: Blue 600, underlined (aria-current="page"). "…" is a plain <span>. */
.tk-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tk-space-2); margin: var(--tk-space-5) 0; }
.tk-pagination > :is(a, button, span) {
  display: inline-grid; place-content: center; min-width: 40px; height: 40px; padding: 0 var(--tk-space-1);
  border: 0; border-radius: var(--tk-radius-sm); background: none; cursor: pointer;
  font: 400 var(--tk-size-body-l)/var(--tk-leading-body-l) var(--tk-font-body); color: var(--tk-text-muted); text-decoration: none;
}
.tk-pagination > span { cursor: default; }
.tk-pagination > :is(a, button):hover { color: var(--tk-text); text-decoration: none; }
.tk-pagination > [aria-current="page"] { color: var(--tk-link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.tk-pagination__prev::before, .tk-pagination__next::before {
  content: ""; width: 10px; height: 10px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(-135deg);
}
.tk-pagination__next::before { transform: rotate(45deg); }
.tk-pagination > [aria-disabled="true"] { visibility: hidden; }
@media (max-width: 767px) { .tk-pagination > :is(a, button, span) { min-width: 32px; font-size: var(--tk-size-body-s); } }

/* ---------- accordion: <details class="tk-accordion" name="faq"><summary>Title</summary><div>Body</div></details> ----------
   Figma Patterns: 1px Grey 400 lines between rows only (none above the first or below the last), 80px rows (24px padding),
   optional 32px leading icon (.tk-accordion__icon). The same name="" on each <details> keeps one item open at a time. */
.tk-accordion + .tk-accordion { border-top: 1px solid var(--tk-divider); }
.tk-accordion > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--tk-space-4);
  padding: var(--tk-space-5) var(--tk-space-2);
  font: 500 var(--tk-size-h-s)/var(--tk-leading-h-s) var(--tk-font-heading); text-transform: uppercase; color: var(--tk-text);
}
.tk-accordion > summary > :not(.tk-accordion__icon) { flex: 1; }
.tk-accordion__icon { width: 32px; height: 32px; flex: none; color: var(--tk-heading); }
.tk-accordion > summary::-webkit-details-marker { display: none; }
.tk-accordion > summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-top: -4px; margin-left: auto;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s;
}
.tk-accordion[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.tk-accordion > summary:hover { background: var(--tk-bg-muted); }
.tk-accordion > :not(summary) { padding: 0 var(--tk-space-2) var(--tk-space-5); }
.tk-accordion > :not(summary) > :last-child { margin-bottom: 0; }
@media (max-width: 767px) { .tk-accordion > summary { font-size: var(--tk-size-h-xs); line-height: var(--tk-leading-h-xs); } }

/* ---------- loading: spinner (Blue 600 on Grey 200) and skeleton blocks ---------- */
.tk-spinner {
  display: inline-block; width: 24px; height: 24px; flex: none;
  border: 3px solid var(--tk-bg-muted); border-top-color: var(--tk-primary); border-radius: 50%;
  animation: tk-spin .8s linear infinite;
}
.tk-spinner--lg { width: 40px; height: 40px; border-width: 4px; }
.tk-skeleton { display: block; height: 1em; border-radius: var(--tk-radius-sm); background: var(--tk-bg-muted); animation: tk-pulse 1.4s ease-in-out infinite; }
@keyframes tk-spin { to { transform: rotate(360deg); } }
@keyframes tk-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .tk-spinner { animation-duration: 2.4s; } .tk-skeleton { animation: none; } }

/* ---------- stat / KPI ---------- */
.tk-stat__value { font: 500 var(--tk-size-h-m)/var(--tk-leading-h-m) var(--tk-font-heading); color: var(--tk-heading); }
.tk-stat__label { font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); color: var(--tk-text-muted); }

/* ---------- footer ---------- */
.tk-footer { background: var(--tk-brand); color: var(--tk-on-brand); padding-block: var(--tk-space-6); font-size: var(--tk-size-body-s); line-height: var(--tk-leading-body-s); }

/* ---------- ripples (decorative diagonal lines; backgrounds only; CSS approximation) ---------- */
.tk-ripples {
  background-color: var(--tk-blue-900);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--tk-blue-500) 28%, transparent) 14px 15px);
}
.tk-ripples--light {
  background-color: var(--tk-blue-100);
  background-image: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--tk-blue-600) 12%, transparent) 14px 15px);
}
