/* ============================================================================
   Nexivo Design Kit — kit.css  (components; requires tokens.css)
   Rules baked in: logical properties only (RTL-safe) · hit areas ≥ 44 px (pseudo-element
   when the visible box is smaller) · visible focus rings · surfaces step by lightness ·
   one accent · 200 ms ease-out · hover only on (hover:hover) and (pointer:fine) · press
   scale(.97) 160 ms · touch-action: manipulation · inputs 16 px · loading keeps its label.
   Prefix: .k-   Modifiers: .k-x--mod   Children: .k-x__part
   ========================================================================== */

/* ---------------------------------------------------------------- layout */
.k-screen { min-block-size: 100dvh; padding-block-end: calc(var(--tabbar-h) + var(--safe-bottom) + var(--s4)); }
.k-page { padding-inline: var(--gutter); display: flex; flex-direction: column; gap: var(--s4); padding-block: var(--s4); }
.k-stack { display: flex; flex-direction: column; gap: var(--s2); }
.k-stack--4 { gap: var(--s4); }
.k-cluster { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.k-spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.k-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.k-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.k-scroll-x { -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); display: flex; gap: var(--s2); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.k-scroll-x::-webkit-scrollbar { display: none; }
.k-scroll-x > * { flex: 0 0 auto; scroll-snap-align: start; }
/* carousel: show 16–32 px of the next card so the row reads as scrollable (ui-skills) */
.k-scroll-x--peek > * { flex-basis: calc(100% - 32px); }
.k-hairline { block-size: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------------------------------------------------------------- type */
.k-title { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-semibold); letter-spacing: var(--ls-tight); color: var(--text); }
.k-title--xl { font-size: var(--t-xl); line-height: var(--lh-xl); }
.k-display { font-size: var(--t-2xl); line-height: var(--lh-2xl); font-weight: var(--w-bold); letter-spacing: var(--ls-display); }
.k-h { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-semibold); }
.k-body { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--text); }
.k-body-2 { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--text-2); }
.k-caption { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--text-3); }
.k-muted { color: var(--text-2); }
.k-faint { color: var(--text-3); }   /* only on --bg / --surface; on surface-2/3 use .k-muted */
.k-accent { color: var(--accent-text); }
.k-success { color: var(--success); } .k-danger { color: var(--danger); } .k-warning { color: var(--warning); } .k-info { color: var(--info); }
/* headings balance, body avoids widows (WIG / ui-skills) */
.k-title, .k-display, .k-h, .k-empty__title, .k-sheet__title, .k-section__title, .k-card__title { text-wrap: balance; }
.k-body, .k-body-2, .k-empty__text, .k-help, .k-banner { text-wrap: pretty; }
.k-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* fade long labels instead of a hard ellipsis (ui-skills); row titles, names and stat labels use it.
   The faded element must FILL its box (flex: 1 / inline-size: 100 %) — a content-sized box fades its own last 24 px. */
.k-fade, .k-row__title, .k-row__sub, .k-stat__label, .k-match__name, .k-fixture__team > span:not(.k-avatar), .k-podium__name, .k-topbar__sub {
  overflow: hidden; white-space: nowrap; text-overflow: clip;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}
[dir="rtl"] :is(.k-fade, .k-row__title, .k-row__sub, .k-stat__label, .k-match__name, .k-fixture__team > span:not(.k-avatar), .k-podium__name, .k-topbar__sub) {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 24px), transparent);
}
.k-ltr { direction: ltr; unicode-bidi: isolate; }   /* phone numbers, codes, scores — bidi island inside Arabic */

/* ---------------------------------------------------------------- icon */
.k-icon {
  inline-size: var(--icon); block-size: var(--icon); flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: var(--icon-stroke);
  stroke-linecap: round; stroke-linejoin: round; color: inherit;
}
.k-icon--sm { inline-size: var(--icon-sm); block-size: var(--icon-sm); }
.k-icon--xs { inline-size: 16px; block-size: 16px; stroke-width: 2; }
.k-icon--fill { fill: currentColor; stroke: none; }
/* 2 px beside semibold text (buttons, headings), 1.5 beside regular (ui-skills) */
.k-btn .k-icon, .k-h .k-icon, .k-title .k-icon, .k-section__title .k-icon, .k-card__title .k-icon { stroke-width: 2; }
/* directional glyphs (chevrons, arrows) flip in RTL */
[dir="rtl"] .k-icon--flip { transform: scaleX(-1); }

/* ---------------------------------------------------------------- topbar */
.k-topbar {
  position: sticky; inset-block-start: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--s1);
  min-block-size: calc(var(--topbar-h) + var(--safe-top));
  padding-block-start: var(--safe-top); padding-inline: var(--s2);
  background: var(--bg);
  transition: box-shadow var(--dur-fast) var(--ease);
}
.k-topbar--surface { background: var(--surface); }
/* scrolled content gets a 1 px edge (Atlassian / iOS): toggle .is-scrolled from an IntersectionObserver sentinel */
.k-topbar.is-scrolled { box-shadow: 0 1px 0 var(--border); }
.k-topbar__title { flex: 1; min-inline-size: 0; font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-semibold); letter-spacing: var(--ls-tight); padding-inline: var(--s2); }
.k-topbar__title--center { text-align: center; }
.k-topbar__sub { display: block; font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-regular); color: var(--text-2); }
.k-topbar__actions { display: flex; align-items: center; gap: 0; }
.k-topbar .k-avatar { margin-inline: var(--s1); }

/* ---------------------------------------------------------------- tabbar */
.k-tabbar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-tabbar);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  min-block-size: var(--tabbar-h); padding-block-end: var(--safe-bottom);
  background: var(--surface); border-block-start: 1px solid var(--border);
}
.k-tabbar--inline { position: static; }
.k-tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-block-size: var(--tabbar-h); padding-block: var(--s2); border: 0; background: none;
  color: var(--text-3); font-size: 11px; line-height: 14px; font-weight: var(--w-medium);
  cursor: pointer; transition: color var(--dur-fast) var(--ease); position: relative;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.k-tabbar__item .k-icon { transition: transform var(--dur-press) var(--ease); }
.k-tabbar__item:active .k-icon { transform: scale(0.92); }
.k-tabbar__item[aria-current], .k-tabbar__item.is-active { color: var(--accent-text); }
/* outline by default, filled when active (ui-skills) */
.k-tabbar__item[aria-current] .k-icon, .k-tabbar__item.is-active .k-icon { fill: currentColor; fill-opacity: 0.18; }
.k-tabbar__item .k-badge-dot { position: absolute; inset-block-start: 8px; inset-inline-start: calc(50% + 6px); }
.k-tabbar__item:focus-visible { outline-offset: -3px; }

/* ---------------------------------------------------------------- hit area: visible box may be < 44, the hit box never is (WIG) */
.k-chip, .k-seg__item, .k-section__action, .k-btn--sm, .k-switch, .k-search__clear, .k-toast__action, .k-hit { position: relative; }
:is(.k-chip, .k-seg__item, .k-section__action, .k-btn--sm, .k-switch, .k-search__clear, .k-toast__action, .k-hit)::before {
  content: ""; position: absolute;
  inset-block: min(0px, calc((100% - var(--tap)) / 2));
  inset-inline: min(0px, calc((100% - var(--tap)) / 2));
}

/* ---------------------------------------------------------------- button */
.k-btn {
  --btn-h: var(--tap); --btn-px: var(--s4); --btn-fs: var(--t-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-block-size: var(--btn-h); min-inline-size: var(--btn-h); padding-inline: var(--btn-px);
  border-radius: var(--r-md); border: 0; cursor: pointer; user-select: none; -webkit-user-select: none; white-space: nowrap;
  touch-action: manipulation;
  font-size: var(--btn-fs); line-height: 1; font-weight: var(--w-semibold);
  background: var(--accent); color: var(--accent-fg);
  box-shadow: var(--sh-bevel), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px hsl(228 40% 2% / 0.35);   /* Polaris bevel on the primary */
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-press) var(--ease), opacity var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  position: relative;
}
.k-btn .k-icon { inline-size: var(--icon-sm); block-size: var(--icon-sm); }
.k-btn:active { background: var(--accent-press); transform: scale(0.97); }
.k-btn:disabled, .k-btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.k-btn--secondary { background: var(--surface-3); color: var(--text); box-shadow: var(--sh-bevel); }
.k-btn--secondary:active { background: var(--surface-2); }
.k-btn--soft { background: var(--accent-soft); color: var(--accent-text); }
.k-btn--soft:active { background: var(--accent-soft-2); }
.k-btn--ghost { box-shadow: none; background: transparent; color: var(--text); }
.k-btn--ghost:active { background: var(--surface-3); }
.k-btn--danger { background: var(--danger-fill); color: #fff; }   /* --danger-fill carries white at 4.9:1 */
.k-btn--danger:active { background: var(--danger-fill); filter: brightness(0.9); }
.k-btn--danger.k-btn--soft { background: var(--danger-soft); color: var(--danger); }
.k-btn--sm { --btn-h: 36px; --btn-px: var(--s3); --btn-fs: 13px; border-radius: var(--r-sm); }
.k-btn--lg { --btn-h: 52px; --btn-px: var(--s5); --btn-fs: var(--t-md); border-radius: var(--r-lg); }
.k-btn--block { inline-size: 100%; }
.k-btn--pill { border-radius: var(--r-full); }
.k-btn--icon { padding-inline: 0; inline-size: var(--btn-h); border-radius: var(--r-full); }
.k-btn--icon.k-btn--ghost { color: var(--text); }
.k-btn--icon .k-icon { inline-size: var(--icon); block-size: var(--icon); }
.k-btn--icon.k-btn--sm .k-icon { inline-size: var(--icon-sm); block-size: var(--icon-sm); }
/* loading: the label STAYS, a 16 px spinner sits beside it (WIG) */
.k-btn.is-loading { pointer-events: none; }
.k-btn.is-loading::after {
  content: ""; flex: 0 0 auto; inline-size: 16px; block-size: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-inline-end-color: transparent; opacity: 0.9;
  animation: k-spin 0.7s linear infinite;
}
@keyframes k-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- chip */
.k-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-block-size: 40px; padding-inline: var(--s3); border-radius: var(--r-full); border: 0;
  background: var(--control); color: var(--text-2);
  font-size: 13px; font-weight: var(--w-medium); line-height: 1; cursor: pointer; white-space: nowrap;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-press) var(--ease), filter var(--dur-fast) var(--ease);
}
.k-chip .k-icon { inline-size: 16px; block-size: 16px; stroke-width: 2; }
.k-chip:active { background: var(--surface-3); color: var(--text); }
.k-chip[aria-pressed="true"], .k-chip.is-active { background: var(--text); color: var(--bg); }
/* selected = alpha step 3/4 (--accent-soft-2), so a selected chip never looks like a badge */
.k-chip--accent[aria-pressed="true"], .k-chip--accent.is-active { background: var(--accent-soft-2); color: var(--accent-text); }
.k-chip--outlined { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.k-chip__count { font-variant-numeric: tabular-nums; opacity: 0.7; }

/* ---------------------------------------------------------------- segmented */
.k-seg {
  --n: 2; --i: 0;
  position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  padding: 3px; border-radius: var(--r-md); background: var(--seg-track);
  min-block-size: var(--tap); isolation: isolate;
}
.k-seg__pill {
  position: absolute; inset-block: 3px; inline-size: calc((100% - 6px) / var(--n));
  inset-inline-start: calc(3px + var(--i) * (100% - 6px) / var(--n));
  border-radius: calc(var(--r-md) - 3px); background: var(--seg-pill);
  box-shadow: var(--sh-1); z-index: 0;
  transition: inset-inline-start var(--dur) var(--ease);
}
.k-seg__item {
  position: relative; z-index: 1; border: 0; background: none; border-radius: calc(var(--r-md) - 3px);
  min-block-size: 42px; padding-inline: var(--s2); color: var(--text-2);
  font-size: 13px; font-weight: var(--w-medium); line-height: 1; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: color var(--dur-fast) var(--ease); white-space: nowrap;
}
.k-seg__item[aria-selected="true"], .k-seg__item.is-active { color: var(--text); font-weight: var(--w-semibold); }
.k-seg--accent .k-seg__pill { background: var(--accent); box-shadow: none; }
.k-seg--accent .k-seg__item[aria-selected="true"] { color: var(--accent-fg); }

/* ---------------------------------------------------------------- card */
.k-card { box-shadow: var(--card-ring), var(--sh-bevel);   /* premium default (10-20): hairline ring + top bevel, no opt-in */
  background: var(--surface); border-radius: var(--r-lg); padding: var(--card-pad);
  color: var(--text); overflow: hidden;
}
.k-card--outlined { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.k-card--flush { padding: 0; }
.k-card--raised { background: var(--surface-2); box-shadow: var(--card-ring), var(--sh-bevel); }
.k-card--accent { background: var(--accent); color: var(--accent-fg); }
.k-card--accent .k-caption, .k-card--accent .k-muted { color: inherit; opacity: 0.72; }
.k-card--interactive { cursor: pointer; touch-action: manipulation; transition: background-color var(--dur-fast) var(--ease), transform var(--dur-press) var(--ease), filter var(--dur-fast) var(--ease); }
.k-card--interactive:active { transform: scale(0.985); }
.k-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-block-end: var(--s2); }
.k-card__title { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-semibold); }
.k-card > .k-row:first-child, .k-card--flush > .k-list > .k-row:first-child { border-start-start-radius: inherit; border-start-end-radius: inherit; }
/* ONE ring card per screen (hero score / live match): 1 px conic accent ring in a pseudo layer (Magic UI shine-border) */
.k-card--ring, .k-ring { position: relative; }
:is(.k-card--ring, .k-ring)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 60%, var(--accent) 85%, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* signature layer: SVG turbulence grain at 4 % overlay (daisyUI --noise); use on ONE hero surface, never on lists */
.k-noise { position: relative; }
.k-noise::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- list row */
.k-list { display: flex; flex-direction: column; }
.k-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  column-gap: var(--s3); min-block-size: var(--row-h); padding-block: var(--s2); padding-inline: var(--s3);
  background: transparent; color: var(--text); text-align: start; border: 0; inline-size: 100%;
  position: relative; cursor: default;
}
.k-row--tap { cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background-color var(--dur-fast) var(--ease), transform var(--dur-press) var(--ease), filter var(--dur-fast) var(--ease); }
.k-row--tap:active { background: var(--surface-3); }
.k-row.is-selected, .k-row--tap[aria-selected="true"] { background: var(--accent-soft-2); }
.k-row--no-lead { grid-template-columns: minmax(0, 1fr) auto; }
.k-row__lead { display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.k-row__lead--box { inline-size: 40px; block-size: 40px; border-radius: var(--r-md); background: var(--surface-2); }
.k-row__lead--accent { background: var(--accent-soft); color: var(--accent-text); }
.k-row__body { min-inline-size: 0; display: flex; flex-direction: column; gap: 1px; }
.k-row__title { font-size: var(--t-sm); line-height: var(--lh-sm); font-weight: var(--w-medium); color: var(--text); }
.k-row__sub { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--text-2); }
.k-row__trail { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.k-row__trail .k-icon { color: var(--text-3); }
.k-row__value { color: var(--text); font-weight: var(--w-medium); }
.k-row__value--strong { font-weight: var(--w-semibold); font-size: var(--t-md); }
/* inset hairline divider: starts after the leading column (never overlaps the card ring — Geist) */
.k-list > .k-row + .k-row::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline-end: 0;
  inset-inline-start: calc(var(--s3) + 40px + var(--s3)); block-size: 1px; background: var(--border);
}
.k-list > .k-row--no-lead + .k-row--no-lead::before, .k-list--flat > .k-row + .k-row::before { inset-inline-start: var(--s3); }
.k-list--bare > .k-row + .k-row::before { display: none; }

/* ---------------------------------------------------------------- section */
.k-section { display: flex; flex-direction: column; gap: var(--s2); }
.k-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); min-block-size: 32px; }
.k-section__title { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-semibold); letter-spacing: var(--ls-tight); }
.k-section__title--sm { font-size: var(--t-md); line-height: var(--lh-md); }
.k-section__sub { font-size: var(--t-xs); color: var(--text-3); }
.k-section__action {
  display: inline-flex; align-items: center; gap: 2px; min-block-size: 32px; padding-inline: var(--s1);
  border: 0; background: none; color: var(--accent-text); font-size: 13px; font-weight: var(--w-medium); cursor: pointer; border-radius: var(--r-sm);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.k-section__action .k-icon { inline-size: 16px; block-size: 16px; stroke-width: 2; }

/* ---------------------------------------------------------------- stat */
.k-stat { display: flex; flex-direction: column; gap: var(--s1); background: var(--surface); border-radius: var(--r-lg); padding: var(--s3) var(--s3) var(--s3); min-inline-size: 0; box-shadow: var(--card-ring); }
.k-stat__label { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--text-2); font-weight: var(--w-medium); }
.k-stat__value { font-size: var(--t-xl); line-height: var(--lh-xl); font-weight: var(--w-bold); letter-spacing: var(--ls-tight); font-variant-numeric: tabular-nums lining-nums; color: var(--text); }
.k-stat__value--lg { font-size: var(--t-2xl); line-height: var(--lh-2xl); letter-spacing: var(--ls-display); }
.k-stat__unit { font-size: var(--t-sm); font-weight: var(--w-medium); color: var(--text-2); margin-inline-start: 2px; letter-spacing: 0; }
.k-stat__foot { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); color: var(--text-3); }
.k-delta {
  display: inline-flex; align-items: center; gap: 2px; block-size: 20px; padding-inline: 6px; border-radius: var(--r-full);
  font-size: 11px; font-weight: var(--w-semibold); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate;
  background: var(--success-soft); color: var(--success);
}
.k-delta--down { background: var(--danger-soft); color: var(--danger); }
.k-delta--flat { background: var(--surface-3); color: var(--text-2); }
.k-delta .k-icon { inline-size: 12px; block-size: 12px; stroke-width: 2.5; }

/* ---------------------------------------------------------------- avatar */
.k-avatar {
  --av: 40px; --av-fs: 14px; inline-size: var(--av); block-size: var(--av); border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--surface-3); color: var(--text-2); font-size: var(--av-fs); font-weight: var(--w-semibold); position: relative;
}
.k-avatar img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.k-avatar--xs { --av: 24px; --av-fs: 10px; } .k-avatar--sm { --av: 32px; --av-fs: 12px; } .k-avatar--lg { --av: 56px; --av-fs: 20px; } .k-avatar--xl { --av: 80px; --av-fs: 28px; }
.k-avatar--square { border-radius: var(--r-md); }
.k-avatar--ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.k-avatar--accent { background: var(--accent-soft); color: var(--accent-text); }
.k-avatar-group { display: inline-flex; }
.k-avatar-group .k-avatar { box-shadow: 0 0 0 2px var(--surface); }
.k-avatar-group .k-avatar + .k-avatar { margin-inline-start: -8px; }

/* ---------------------------------------------------------------- badge */
.k-badge {
  display: inline-flex; align-items: center; gap: 4px; block-size: 22px; padding-inline: 8px; border-radius: var(--r-full);
  font-size: 11px; line-height: 1; font-weight: var(--w-semibold); white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--surface-3); color: var(--text-2);
}
.k-badge--accent { background: var(--accent-soft); color: var(--accent-text); }
.k-badge--success { background: var(--success-soft); color: var(--success); }
.k-badge--danger { background: var(--danger-soft); color: var(--danger); }
.k-badge--warning { background: var(--warning-soft); color: var(--warning); }
.k-badge--info { background: var(--info-soft); color: var(--info); }
.k-badge--solid { background: var(--accent); color: var(--accent-fg); }
.k-badge--live { background: var(--danger-fill); color: #fff; }
.k-badge--live::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; animation: k-pulse 1.4s var(--ease) infinite; }
.k-badge--count { min-inline-size: 18px; block-size: 18px; padding-inline: 5px; justify-content: center; background: var(--danger-fill); color: #fff; }
.k-badge-dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); display: inline-block; }
@keyframes k-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------------------------------------------------------------- input */
.k-field { display: flex; flex-direction: column; gap: 6px; }
.k-label { font-size: 13px; line-height: var(--lh-xs); font-weight: var(--w-medium); color: var(--text-2); }
.k-input {
  display: flex; align-items: center; gap: var(--s2); min-block-size: 48px; padding-inline: var(--s3);
  border-radius: var(--r-md); background: var(--control); color: var(--text);
  box-shadow: inset 0 0 0 1px transparent; transition: box-shadow var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.k-input:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
/* inside a card/sheet the control must step DOWN from the white card, not match it */
:is(.k-card, .k-sheet, .k-stat) :is(.k-chip, .k-input) { background: var(--surface-2); }
.k-input.is-invalid { box-shadow: inset 0 0 0 1.5px var(--danger); }
/* 16 px on mobile so iOS never zooms (WIG / Rauno); the field itself is a 44 px hit box */
.k-input > input, .k-input > textarea, .k-input > select {
  flex: 1; min-inline-size: 0; min-block-size: var(--tap); border: 0; background: none; outline: none; padding: 0; font-size: var(--t-md); line-height: var(--lh-md); color: var(--text);
}
.k-input > select { background-color: var(--control); color: var(--text); }   /* Windows native select fix (WIG) */
.k-input > input::placeholder, .k-input > textarea::placeholder { color: var(--text-3); }
.k-input > .k-icon { color: var(--text-3); inline-size: var(--icon-sm); block-size: var(--icon-sm); }
.k-input__suffix { font-size: var(--t-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }
.k-input--sm { min-block-size: var(--tap); padding-inline: var(--s2); }
.k-input--textarea { align-items: flex-start; padding-block: var(--s3); }
.k-input--textarea > textarea { resize: none; min-block-size: 72px; }
.k-help { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--text-3); }
.k-help--error { color: var(--danger); }
.k-search { border-radius: var(--r-full); min-block-size: var(--tap); }
.k-search__clear { inline-size: 28px; block-size: 28px; border-radius: 50%; border: 0; background: var(--surface-3); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-inline-end: -4px; touch-action: manipulation; }
.k-search__clear .k-icon { inline-size: 14px; block-size: 14px; stroke-width: 2.5; color: inherit; }

/* switch */
.k-switch { inline-size: 48px; block-size: 28px; border-radius: var(--r-full); border: 0; background: var(--surface-3); cursor: pointer; padding: 0; transition: background-color var(--dur) var(--ease); flex: 0 0 auto; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.k-switch::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; inline-size: 22px; block-size: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform var(--dur) var(--ease); }
.k-switch[aria-checked="true"] { background: var(--accent); }
.k-switch[aria-checked="true"]::after { transform: translateX(20px); }
[dir="rtl"] .k-switch[aria-checked="true"]::after { transform: translateX(-20px); }

/* ---------------------------------------------------------------- sheet */
.k-sheet-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: var(--z-sheet); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.k-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.k-sheet {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: calc(var(--z-sheet) + 1);
  background: var(--surface); border-start-start-radius: var(--r-xl); border-start-end-radius: var(--r-xl);
  padding: var(--s2) var(--gutter) calc(var(--s4) + var(--safe-bottom)); box-shadow: var(--sh-3);
  transform: translateY(100%); transition: transform var(--dur-slow) var(--ease-drawer); max-block-size: 88dvh; overflow: auto; overscroll-behavior: contain;
}
.k-sheet.is-open { transform: none; }
.k-sheet--demo { position: relative; transform: none; inset: auto; box-shadow: var(--sh-2); border-radius: var(--r-xl); padding-block-end: var(--s4); }
.k-sheet__grip { inline-size: 36px; block-size: 4px; border-radius: var(--r-full); background: var(--border-strong); margin: 0 auto var(--s3); }
.k-sheet__title { font-size: var(--t-lg); line-height: var(--lh-lg); font-weight: var(--w-semibold); letter-spacing: var(--ls-tight); margin-block-end: var(--s1); }
.k-sheet__body { display: flex; flex-direction: column; gap: var(--s3); }
.k-sheet__actions { display: flex; gap: var(--s2); padding-block-start: var(--s2); }
.k-sheet__actions > .k-btn { flex: 1; }

/* ---------------------------------------------------------------- popover / menu (floats over a sheet: surface-4 + full shadow stack, origin at the trigger) */
.k-popover {
  position: absolute; z-index: var(--z-modal); min-inline-size: 180px; padding: var(--s1);
  background: var(--surface-4); border-radius: var(--r-md); box-shadow: var(--sh-2); color: var(--text);
  transform-origin: var(--origin, top); transition: transform 125ms var(--ease-out-strong), opacity 125ms var(--ease);
}
.k-popover[data-closed], .k-popover[hidden] { transform: scale(0.97); opacity: 0; pointer-events: none; }
.k-popover--demo { position: relative; z-index: auto; }
.k-popover__item {
  display: flex; align-items: center; gap: var(--s3); min-block-size: var(--tap); padding-inline: var(--s3); border-radius: var(--r-sm);
  border: 0; background: none; color: var(--text); font-size: var(--t-sm); font-weight: var(--w-medium); inline-size: 100%; text-align: start; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background-color var(--dur-fast) var(--ease);
}
.k-popover__item .k-icon { inline-size: var(--icon-sm); block-size: var(--icon-sm); color: var(--text-2); }
.k-popover__item:active { background: var(--surface-3); }
.k-popover__item--danger { color: var(--danger-text); } .k-popover__item--danger .k-icon { color: var(--danger-text); }
.k-tooltip { position: absolute; z-index: var(--z-toast); padding: 6px var(--s2); border-radius: var(--r-sm); background: var(--text); color: var(--bg); font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-medium); box-shadow: var(--sh-2); pointer-events: none; transform-origin: var(--origin, bottom); transition: transform 125ms var(--ease-out-strong), opacity 125ms var(--ease); }
.k-tooltip[data-closed], .k-tooltip[hidden] { transform: scale(0.97); opacity: 0; }

/* ---------------------------------------------------------------- toast */
.k-toast-host { position: fixed; inset-inline: var(--gutter); inset-block-end: calc(var(--tabbar-h) + var(--safe-bottom) + var(--s3)); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--s2); pointer-events: none; }
.k-toast {
  display: flex; align-items: center; gap: var(--s3); min-block-size: 48px; padding: var(--s2) var(--s3) var(--s2) var(--s3); padding-inline-start: var(--s4);
  border-radius: var(--r-md); background: var(--surface-3); color: var(--text); box-shadow: var(--sh-2); pointer-events: auto;
  font-size: var(--t-sm); font-weight: var(--w-medium); animation: k-toast-in var(--dur) var(--ease-drawer);
}
.k-toast > .k-icon { inline-size: var(--icon-sm); block-size: var(--icon-sm); flex: 0 0 auto; }
.k-toast__msg { flex: 1; min-inline-size: 0; }
.k-toast__action { border: 0; background: none; color: var(--accent-text); font-weight: var(--w-semibold); font-size: var(--t-sm); min-block-size: 36px; padding-inline: var(--s2); border-radius: var(--r-sm); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.k-toast--success > .k-icon { color: var(--success); }
.k-toast--danger > .k-icon { color: var(--danger); }
.k-toast--info > .k-icon { color: var(--info); }
.k-toast--inverse { background: var(--text); color: var(--bg); }
.k-toast--inverse .k-toast__action { color: var(--accent-text-inv); }   /* the OTHER theme's accent text step: 5.4:1 */
@keyframes k-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- table */
.k-table-wrap { overflow: auto; overscroll-behavior-x: contain; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--card-ring); }
.k-table { inline-size: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--t-sm); line-height: var(--lh-sm); }
.k-table th, .k-table td { padding: var(--s3); text-align: start; white-space: nowrap; vertical-align: middle; }   /* 44 px rows (4-px scale) */
.k-table th { position: sticky; inset-block-start: 0; background: var(--surface); color: var(--text-3); font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-medium); z-index: 1; }
.k-table th::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; block-size: 1px; background: var(--border); }
.k-table td { color: var(--text); }
.k-table tr + tr td { border-block-start: 1px solid var(--border); }
.k-table .num, .k-table [data-num] { text-align: end; font-variant-numeric: tabular-nums lining-nums; direction: ltr; unicode-bidi: isolate; }
.k-table th.num { text-align: end; }
.k-table .k-table__pos { color: var(--text-3); inline-size: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.k-table .k-table__team { display: flex; align-items: center; gap: var(--s2); font-weight: var(--w-medium); }
.k-table .k-table__team .k-avatar { --av: 24px; --av-fs: 10px; }
.k-table td.strong { font-weight: var(--w-semibold); }
.k-table--dense th, .k-table--dense td { padding-block: var(--s2); }
.k-table tr.is-highlight td { background: var(--accent-soft-2); }
.k-table tr.is-highlight td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .k-table tr.is-highlight td:first-child { box-shadow: inset -3px 0 0 var(--accent); }
/* zone marker (promotion / relegation) */
.k-table tr.zone-up td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.k-table tr.zone-down td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
[dir="rtl"] .k-table tr.zone-up td:first-child { box-shadow: inset -3px 0 0 var(--success); }
[dir="rtl"] .k-table tr.zone-down td:first-child { box-shadow: inset -3px 0 0 var(--danger); }

/* ---------------------------------------------------------------- skeleton (mirrors the final content's exact heights — WIG) */
.k-skeleton {
  position: relative; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-2);
  color: transparent !important; pointer-events: none; user-select: none;
}
.k-skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: k-shimmer 1.4s var(--ease) infinite;
}
:root[data-theme="light"] .k-skeleton::after { background: linear-gradient(90deg, transparent, rgba(18, 20, 28, 0.05), transparent); }
.k-skeleton--text { block-size: 12px; inline-size: 60%; border-radius: 6px; }
.k-skeleton--title { block-size: 16px; inline-size: 40%; border-radius: 8px; }
.k-skeleton--circle { border-radius: 50%; }
.k-skeleton--block { border-radius: var(--r-lg); }
.k-skeleton--row { block-size: var(--row-h); inline-size: 100%; border-radius: 0; background: transparent; }        /* = .k-row 56 */
.k-skeleton--fixture { block-size: var(--fixture-h); inline-size: 100%; border-radius: 0; background: transparent; } /* = .k-fixture 64 */
.k-skeleton--stat { block-size: 88px; inline-size: 100%; border-radius: var(--r-lg); }                               /* = .k-stat */
.k-skeleton--chip { block-size: 40px; inline-size: 88px; border-radius: var(--r-full); }                              /* = .k-chip */
@keyframes k-shimmer { to { transform: translateX(100%); } }

/* ---------------------------------------------------------------- empty state */
.k-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: var(--s8) var(--s6); color: var(--text-2); }
.k-empty__icon { inline-size: 56px; block-size: 56px; border-radius: var(--r-lg); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-2); margin-block-end: var(--s1); }
.k-empty__icon .k-icon { inline-size: 28px; block-size: 28px; stroke-width: 1.5; }
.k-empty__title { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-semibold); color: var(--text); }
.k-empty__text { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--text-2); max-inline-size: 28ch; }
.k-empty .k-btn { margin-block-start: var(--s2); }

/* ---------------------------------------------------------------- progress */
.k-progress { block-size: 4px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; inline-size: 100%; }
.k-progress__bar { block-size: 100%; border-radius: inherit; background: var(--accent); inline-size: var(--value, 0%); transition: inline-size var(--dur-slow) var(--ease); }
.k-progress--thick { block-size: 8px; }
.k-progress--success .k-progress__bar { background: var(--success); }
.k-progress--warning .k-progress__bar { background: var(--warning); }
.k-progress--danger .k-progress__bar { background: var(--danger); }
.k-progress-row { display: flex; align-items: center; gap: var(--s3); }
.k-progress-row .k-progress { flex: 1; }
.k-progress-row__val { font-size: var(--t-xs); color: var(--text-2); font-variant-numeric: tabular-nums; min-inline-size: 3ch; text-align: end; }

/* ---------------------------------------------------------------- tabs */
.k-tabs { display: flex; gap: var(--s1); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; position: relative; border-block-end: 1px solid var(--border); }
.k-tabs::-webkit-scrollbar { display: none; }
.k-tabs--fill .k-tab { flex: 1; }
.k-tab {
  position: relative; flex: 0 0 auto; min-block-size: var(--tap); padding-inline: var(--s3); border: 0; background: none;
  color: var(--text-2); font-size: var(--t-sm); font-weight: var(--w-medium); cursor: pointer; white-space: nowrap;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: color var(--dur-fast) var(--ease);
}
.k-tab::after { content: ""; position: absolute; inset-inline: var(--s3); inset-block-end: -1px; block-size: 2px; border-radius: 2px 2px 0 0; background: var(--accent); transform: scaleX(0); transition: transform var(--dur) var(--ease); }
.k-tab[aria-selected="true"], .k-tab.is-active { color: var(--text); font-weight: var(--w-semibold); }
.k-tab[aria-selected="true"]::after, .k-tab.is-active::after { transform: scaleX(1); }
.k-tab .k-badge { margin-inline-start: 6px; }

/* ---------------------------------------------------------------- score */
.k-score {
  display: inline-grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: var(--s1);
  font-variant-numeric: tabular-nums lining-nums; font-weight: var(--w-bold); font-size: var(--t-xl); line-height: 1; letter-spacing: var(--ls-tight);
  unicode-bidi: isolate;
}
.k-score > span { unicode-bidi: isolate; font-family: var(--font-latin); }
.k-score__home { text-align: end; }
.k-score__away { text-align: start; }
.k-score__sep { color: var(--text-3); font-weight: var(--w-regular); padding-inline: 2px; }
.k-score--sm { font-size: var(--t-md); }
.k-score--lg { font-size: var(--t-3xl); }
.k-score--ltr { direction: ltr; }           /* force "home - away" left→right even in RTL pages */
.k-score .is-win { color: var(--text); } .k-score .is-lose { color: var(--text-3); }
/* match row: home | score | away with a status caption */
.k-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3); padding: var(--s3); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--card-ring); }
.k-match__team { display: flex; flex-direction: column; align-items: center; gap: 6px; min-inline-size: 0; text-align: center; }
.k-match__team .k-avatar { --av: 40px; }
.k-match__name { font-size: 13px; line-height: 16px; font-weight: var(--w-medium); inline-size: 100%; }
.k-match__center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.k-match__status { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.k-match__status--live { color: var(--danger); font-weight: var(--w-semibold); }
/* compact fixture row */
.k-fixture { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; column-gap: var(--s3); min-block-size: var(--fixture-h); padding-block: var(--s2); padding-inline: var(--s3); position: relative; }
.k-fixture__time { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.k-fixture__time--live { color: var(--danger); font-weight: var(--w-semibold); }
.k-fixture__teams { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; }
.k-fixture__team { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); line-height: 18px; font-weight: var(--w-medium); min-inline-size: 0; }
.k-fixture__team .k-avatar { --av: 20px; --av-fs: 10px; }
.k-fixture__team > span:not(.k-avatar) { flex: 1; min-inline-size: 0; }
.k-fixture__goals { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: var(--t-sm); line-height: 18px; font-weight: var(--w-semibold); font-variant-numeric: tabular-nums; min-inline-size: 16px; text-align: end; }
.k-fixture__goals .is-lose { color: var(--text-3); font-weight: var(--w-medium); }
.k-list > .k-fixture + .k-fixture::before { content: ""; position: absolute; inset-block-start: 0; inset-inline-end: 0; inset-inline-start: calc(var(--s3) + 44px + var(--s3)); block-size: 1px; background: var(--border); }

/* ---------------------------------------------------------------- podium */
.k-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: var(--s2); padding-block-start: var(--s4); }
.k-podium__place { display: flex; flex-direction: column; align-items: center; gap: var(--s2); min-inline-size: 0; }
.k-podium__place--1 { order: 2; } .k-podium__place--2 { order: 1; } .k-podium__place--3 { order: 3; }
.k-podium__who { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-inline-size: 0; inline-size: 100%; }
.k-podium__name { font-size: 13px; line-height: 16px; font-weight: var(--w-semibold); inline-size: 100%; }
.k-podium__pts { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.k-podium__place--1 .k-avatar { --av: 56px; --av-fs: 20px; }
.k-podium__place--2 .k-avatar, .k-podium__place--3 .k-avatar { --av: 48px; --av-fs: 16px; }
.k-podium__block {
  inline-size: 100%; display: flex; align-items: flex-start; justify-content: center; padding-block-start: var(--s2);
  border-start-start-radius: var(--r-md); border-start-end-radius: var(--r-md); background: var(--surface-2);
  font-size: var(--t-lg); font-weight: var(--w-bold); color: var(--text-2); font-variant-numeric: tabular-nums;
}
.k-podium__place--1 .k-podium__block { block-size: 64px; background: var(--accent); color: var(--accent-fg); box-shadow: var(--sh-bevel), 0 8px 16px -4px hsl(228 40% 2% / 0.45); }
.k-podium__place--2 .k-podium__block { block-size: 48px; }
.k-podium__place--3 .k-podium__block { block-size: 36px; }

/* ---------------------------------------------------------------- misc */
.k-kbd-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.k-divider-label { display: flex; align-items: center; gap: var(--s3); color: var(--text-3); font-size: var(--t-xs); }
.k-divider-label::before, .k-divider-label::after { content: ""; flex: 1; block-size: 1px; background: var(--border); }
.k-banner { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3); border-radius: var(--r-md); background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 18px; }
.k-banner > .k-icon { inline-size: var(--icon-sm); block-size: var(--icon-sm); color: var(--text-2); margin-block-start: -1px; }
.k-banner--accent { background: var(--accent-soft); color: var(--text); } .k-banner--accent > .k-icon { color: var(--accent-text); }
.k-banner--warning { background: var(--warning-soft); color: var(--text); } .k-banner--warning > .k-icon { color: var(--warning); }
.k-banner--danger { background: var(--danger-soft); color: var(--text); } .k-banner--danger > .k-icon { color: var(--danger); }
.k-fab { position: fixed; inset-inline-end: var(--gutter); inset-block-end: calc(var(--tabbar-h) + var(--safe-bottom) + var(--s4)); z-index: var(--z-tabbar); inline-size: 56px; block-size: 56px; border-radius: var(--r-lg); background: var(--accent); color: var(--accent-fg); border: 0; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-2); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.k-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- hover: ONLY on devices that hover (Rauno / Emil). Touch gets :active, never a stuck hover. */
@media (hover: hover) and (pointer: fine) {
  .k-btn:hover { background: var(--accent-hover); }
  .k-btn--secondary:hover { background: var(--surface-3); filter: brightness(1.08); }
  .k-btn--soft:hover { background: var(--accent-soft); filter: brightness(1.1); }
  .k-btn--ghost:hover { background: var(--surface-2); }
  .k-btn--danger:hover { background: var(--danger-fill); filter: brightness(1.06); }
  .k-chip:hover { background: var(--surface-3); color: var(--text); }
  .k-card--interactive:hover { background: var(--surface-2); }
  .k-row--tap:hover { background: var(--surface-2); }
  .k-popover__item:hover { background: var(--surface-3); }
  .k-section__action:hover, .k-toast__action:hover { filter: brightness(1.1); }
}

/* ---- lane 2b: row swipe (motion finish) ---- */
/* <div class="k-row--swipe"><button class="k-row k-row--tap">…</button><div class="k-row__actions"><button class="k-row__action">تذكير</button><button class="k-row__action k-row__action--danger">حذف</button></div></div>
   Trailing actions sit under the row at inline-end; motion.js (KM.swipe, auto on .k-row--swipe) reveals them on a horizontal drag
   (iOS Mail: reveal snaps at 72 px per action, full swipe past 60 % of the row commits the LAST action; motion.css animates). Logical
   direction: in RTL the row moves to the right and the actions live on the left. Fires `k-swipe` {action, full} on the wrapper. */
.k-row--swipe { position: relative; overflow: hidden; touch-action: pan-y; background: var(--surface); }
.k-card--flush > .k-list > .k-row--swipe:first-child { border-start-start-radius: inherit; border-start-end-radius: inherit; }
.k-row--swipe > .k-row { position: relative; z-index: 1; background: var(--surface); }
.k-row--swipe > .k-row__actions { position: absolute; inset-block: 0; inset-inline-end: 0; display: flex; inline-size: var(--sw, 0px); overflow: hidden; }
.k-row__action { flex: 1 1 72px; min-inline-size: 0; border: 0; padding: 0; cursor: pointer; background: var(--accent); color: var(--accent-fg); font: inherit; font-size: var(--t-sm); font-weight: var(--w-semibold); white-space: nowrap; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.k-row__action--soft { background: var(--surface-3); color: var(--text); }
.k-row__action--danger { background: var(--danger-fill); color: #fff; }
.k-row--swipe.is-full > .k-row__actions > .k-row__action:last-child { flex: 1 0 100%; }
.k-row--swipe.is-full > .k-row__actions > .k-row__action:not(:last-child) { opacity: 0; }
/* the inset hairline continues across swipe wrappers (same geometry as .k-list > .k-row + .k-row::before) */
.k-list > .k-row + .k-row--swipe::before, .k-list > .k-row--swipe + .k-row::before, .k-list > .k-row--swipe + .k-row--swipe::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline-end: 0; z-index: 2;
  inset-inline-start: calc(var(--s3) + 40px + var(--s3)); block-size: 1px; background: var(--border);
}
