/* =====================================================================
   Thatcher Kit v3.1 — shared UI for the Thatcher family of apps
   Design language: iOS / iPadOS 27 Liquid Glass.
   Source of truth: shared/thatcher-kit/. Copied into each app's /kit/
   folder by shared/sync-kit.mjs (each app deploys on its own).
   Do not edit the copies.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Per-app tint. Apps override --tk-tint-light / --tk-tint-dark only. */
  --tk-tint-light: #007AFF;
  --tk-tint-dark: #0A84FF;

  /* System palette (Apple's published values) */
  --tk-red-l: #FF3B30;    --tk-red-d: #FF453A;
  --tk-orange-l: #FF9500; --tk-orange-d: #FF9F0A;
  --tk-yellow-l: #FFCC00; --tk-yellow-d: #FFD60A;
  --tk-green-l: #34C759;  --tk-green-d: #30D158;
  --tk-mint-l: #00C7BE;   --tk-mint-d: #63E6E2;
  --tk-teal-l: #30B0C7;   --tk-teal-d: #40C8E0;
  --tk-cyan-l: #32ADE6;   --tk-cyan-d: #64D2FF;
  --tk-blue-l: #007AFF;   --tk-blue-d: #0A84FF;
  --tk-indigo-l: #5856D6; --tk-indigo-d: #5E5CE6;
  --tk-purple-l: #AF52DE; --tk-purple-d: #BF5AF2;
  --tk-pink-l: #FF2D55;   --tk-pink-d: #FF375F;
  --tk-brown-l: #A2845E;  --tk-brown-d: #AC8E68;
  --tk-gray: #8E8E93;

  /* Spacing (8pt grid, 4pt for tight gaps) */
  --tk-s1: 4px; --tk-s2: 8px; --tk-s3: 12px; --tk-s4: 16px;
  --tk-s5: 20px; --tk-s6: 24px; --tk-s8: 32px;
  --tk-margin: 16px;

  /* Corner radii — Liquid Glass shapes are concentric with the display */
  --tk-r-card: 26px;      /* inset grouped lists, cards */
  --tk-r-sheet: 36px;     /* sheets */
  --tk-r-alert: 32px;     /* alerts, action sheets */
  --tk-r-capsule: 999px;  /* buttons, bars, controls */

  /* Liquid Glass. --tk-glass-alpha mirrors iOS 27's Settings > Appearance slider:
     0.35 ≈ "Clearest", 0.62 = default, 0.9 ≈ "Tinted". */
  --tk-glass-alpha: 0.62;
  --tk-glass-blur: 22px;

  /* Hairline = 1 device pixel. Separators draw a 1px line scaled by --tk-hairline-scale, which
     always lands on a whole device pixel (a raw 0.5px line can vanish at fractional offsets). */
  --tk-hairline: 1px;
  --tk-hairline-scale: 1;

  /* Motion */
  --tk-dur: 0.32s;
  --tk-ease: cubic-bezier(0.32, 0.72, 0, 1);

  --tk-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --tk-font-round: ui-rounded, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --tk-navbar-h: 52px;
  --tk-tabbar-h: 62px;
  --tk-safe-t: env(safe-area-inset-top, 0px);
  --tk-safe-b: env(safe-area-inset-bottom, 0px);
  --tk-safe-l: env(safe-area-inset-left, 0px);
  --tk-safe-r: env(safe-area-inset-right, 0px);
  /* Floating bars sit just above the home indicator */
  --tk-float-b: max(12px, calc(var(--tk-safe-b) - 12px));
  --tk-bottom-clear: calc(var(--tk-float-b) + var(--tk-tabbar-h) + 24px);
}
@media (min-resolution: 2dppx) { :root { --tk-hairline: 0.5px; --tk-hairline-scale: 0.5; } }
@media (min-resolution: 3dppx) { :root { --tk-hairline: 0.34px; --tk-hairline-scale: 0.3334; } }
@media (min-width: 600px) { :root { --tk-margin: 20px; } }
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* Spring: response 0.3s, damping 0.92 — sampled from the closed-form solution */
    --tk-ease: linear(0, 0.04, 0.131, 0.246, 0.365, 0.479, 0.581, 0.669, 0.743, 0.803, 0.851, 0.89, 0.919, 0.942, 0.959, 0.971, 0.981, 0.987, 0.992, 0.995, 1);
  }
}

/* Light (default) */
:root {
  --tk-bg-grouped: #F2F2F7;
  --tk-bg-cell: #FFFFFF;
  --tk-bg-plain: #FFFFFF;
  --tk-bg-elevated-cell: #FFFFFF;
  --tk-label: #000000;
  --tk-label-2: rgba(60, 60, 67, 0.6);
  --tk-label-3: rgba(60, 60, 67, 0.3);
  --tk-separator: rgba(60, 60, 67, 0.29);
  --tk-fill: rgba(120, 120, 128, 0.2);
  --tk-fill-2: rgba(120, 120, 128, 0.16);
  --tk-fill-3: rgba(118, 118, 128, 0.12);
  --tk-highlight: #D1D1D6;
  --tk-chevron: #C4C4C7;
  --tk-seg-thumb: #FFFFFF;
  --tk-dim: rgba(0, 0, 0, 0.2);
  --tk-glass-rgb: 252 252 254;
  --tk-glass-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.9);
  --tk-glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
  --tk-tint: var(--tk-tint-light);
  --tk-red: var(--tk-red-l); --tk-orange: var(--tk-orange-l); --tk-yellow: var(--tk-yellow-l);
  --tk-green: var(--tk-green-l); --tk-mint: var(--tk-mint-l); --tk-teal: var(--tk-teal-l);
  --tk-cyan: var(--tk-cyan-l); --tk-blue: var(--tk-blue-l); --tk-indigo: var(--tk-indigo-l);
  --tk-purple: var(--tk-purple-l); --tk-pink: var(--tk-pink-l); --tk-brown: var(--tk-brown-l);
}
/* Dark — follows the system, or forced with data-appearance="dark" */
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) {
    --tk-bg-grouped: #000000; --tk-bg-cell: #1C1C1E; --tk-bg-plain: #000000;
    --tk-bg-elevated-cell: #2C2C2E;
    --tk-label: #FFFFFF; --tk-label-2: rgba(235, 235, 245, 0.6); --tk-label-3: rgba(235, 235, 245, 0.3);
    --tk-separator: rgba(84, 84, 88, 0.6);
    --tk-fill: rgba(120, 120, 128, 0.36); --tk-fill-2: rgba(120, 120, 128, 0.32); --tk-fill-3: rgba(118, 118, 128, 0.24);
    --tk-highlight: #3A3A3C; --tk-chevron: #5A5A5E;
    --tk-seg-thumb: #636366; --tk-dim: rgba(0, 0, 0, 0.45);
    --tk-glass-rgb: 40 40 44;
    --tk-glass-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    --tk-glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
    --tk-tint: var(--tk-tint-dark);
    --tk-red: var(--tk-red-d); --tk-orange: var(--tk-orange-d); --tk-yellow: var(--tk-yellow-d);
    --tk-green: var(--tk-green-d); --tk-mint: var(--tk-mint-d); --tk-teal: var(--tk-teal-d);
    --tk-cyan: var(--tk-cyan-d); --tk-blue: var(--tk-blue-d); --tk-indigo: var(--tk-indigo-d);
    --tk-purple: var(--tk-purple-d); --tk-pink: var(--tk-pink-d); --tk-brown: var(--tk-brown-d);
  }
}
:root[data-appearance="dark"] {
  color-scheme: dark;
  --tk-bg-grouped: #000000; --tk-bg-cell: #1C1C1E; --tk-bg-plain: #000000;
  --tk-bg-elevated-cell: #2C2C2E;
  --tk-label: #FFFFFF; --tk-label-2: rgba(235, 235, 245, 0.6); --tk-label-3: rgba(235, 235, 245, 0.3);
  --tk-separator: rgba(84, 84, 88, 0.6);
  --tk-fill: rgba(120, 120, 128, 0.36); --tk-fill-2: rgba(120, 120, 128, 0.32); --tk-fill-3: rgba(118, 118, 128, 0.24);
  --tk-highlight: #3A3A3C; --tk-chevron: #5A5A5E;
  --tk-seg-thumb: #636366; --tk-dim: rgba(0, 0, 0, 0.45);
  --tk-glass-rgb: 40 40 44;
  --tk-glass-edge: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --tk-glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  --tk-tint: var(--tk-tint-dark);
  --tk-red: var(--tk-red-d); --tk-orange: var(--tk-orange-d); --tk-yellow: var(--tk-yellow-d);
  --tk-green: var(--tk-green-d); --tk-mint: var(--tk-mint-d); --tk-teal: var(--tk-teal-d);
  --tk-cyan: var(--tk-cyan-d); --tk-blue: var(--tk-blue-d); --tk-indigo: var(--tk-indigo-d);
  --tk-purple: var(--tk-purple-d); --tk-pink: var(--tk-pink-d); --tk-brown: var(--tk-brown-d);
}
:root[data-appearance="light"] { color-scheme: light; }

/* Accessibility: Increase Contrast and Reduce Transparency, as iOS 27's glass does */
@media (prefers-contrast: more) {
  :root { --tk-separator: rgba(60, 60, 67, 0.5); --tk-label-2: rgba(60, 60, 67, 0.8); --tk-glass-alpha: 0.92; }
  :root { --tk-glass-edge: inset 0 0 0 1px rgba(0, 0, 0, 0.35); }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --tk-glass-alpha: 0.97; --tk-glass-blur: 0px; }
}
:root.tk-reduce-transparency { --tk-glass-alpha: 0.97; --tk-glass-blur: 0px; }

/* ---------- 2. Dynamic Type ----------
   On Apple devices `-apple-system-body` sets the root size to the user's
   Body size (17px by default) and follows Settings > Display > Text Size.
   Every size below is in rem relative to that, so the whole UI scales. */
html { font-size: 106.25%; /* 17px fallback */ }
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; }
}
html[data-text-size] { font-size: var(--tk-forced-size) !important; } /* preview only */

.tk-large-title { font-size: 2rem; line-height: 2.412rem; font-weight: 700; letter-spacing: 0.011em; }
.tk-title1 { font-size: 1.647rem; line-height: 2rem; font-weight: 400; letter-spacing: 0.013em; }
.tk-title2 { font-size: 1.294rem; line-height: 1.647rem; font-weight: 400; letter-spacing: 0.016em; }
.tk-title3 { font-size: 1.176rem; line-height: 1.471rem; font-weight: 400; letter-spacing: 0.019em; }
.tk-headline { font-size: 1rem; line-height: 1.294rem; font-weight: 600; letter-spacing: -0.024em; }
.tk-body { font-size: 1rem; line-height: 1.294rem; font-weight: 400; letter-spacing: -0.024em; }
.tk-callout { font-size: 0.941rem; line-height: 1.235rem; letter-spacing: -0.02em; }
.tk-subhead { font-size: 0.882rem; line-height: 1.176rem; letter-spacing: -0.016em; }
.tk-footnote { font-size: 0.765rem; line-height: 1.059rem; letter-spacing: -0.006em; }
.tk-caption1 { font-size: 0.706rem; line-height: 0.941rem; letter-spacing: 0; }
.tk-caption2 { font-size: 0.647rem; line-height: 0.765rem; letter-spacing: 0.006em; }
.tk-bold { font-weight: 700; } .tk-semibold { font-weight: 600; }
.tk-secondary { color: var(--tk-label-2); }
.tk-tertiary { color: var(--tk-label-3); }
.tk-tinted { color: var(--tk-tint); }
.tk-destructive-text { color: var(--tk-red); }
.tk-numeric { font-variant-numeric: tabular-nums; }

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { touch-action: manipulation; } /* no double-tap zoom; panning and taps unaffected */
body.tk {
  font-family: var(--tk-font);
  font-size: 1rem; line-height: 1.294rem; letter-spacing: -0.024em;
  color: var(--tk-label);
  background: var(--tk-bg-grouped);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  overflow: hidden;
}
/* Resets use :where() so they carry zero specificity and never beat a component class */
:where(.tk) :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.tk) :where(button) { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
:where(.tk) :where(:focus) { outline: none; }
:where(.tk) :where(:focus-visible) { outline: 3px solid color-mix(in srgb, var(--tk-tint) 50%, transparent); outline-offset: 2px; border-radius: 8px; }
.tk-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tk-icon { width: 1.1em; height: 1.1em; flex: none; display: inline-block; vertical-align: -0.18em; }

/* ---------- 4. Liquid Glass material ----------
   One definition, used by every floating control. */
.tk-glass,
.tk-tabbar, .tk-bar-group, .tk-toolbar > *, .tk-alert, .tk-action-group,
.tk-sheet.is-medium, .tk-sheet.is-form, .tk-menu {
  background: rgb(var(--tk-glass-rgb) / var(--tk-glass-alpha));
  -webkit-backdrop-filter: blur(var(--tk-glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--tk-glass-blur)) saturate(180%);
  box-shadow: var(--tk-glass-edge), var(--tk-glass-shadow);
}
/* Prominent glass: tinted, for the primary action (Done / Add / confirm) */
.tk-glass-prominent {
  background: var(--tk-tint) !important; color: #fff !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 4px 14px color-mix(in srgb, var(--tk-tint) 35%, transparent) !important;
}

/* ---------- 5. App shell ---------- */
.tk-root {
  position: fixed; inset: 0;
  display: flex;
  background: var(--tk-bg-grouped);
  transition: transform var(--tk-dur) var(--tk-ease), border-radius var(--tk-dur) var(--tk-ease);
  transform-origin: 50% 0;
}
.tk-root.is-receded { transform: scale(0.93) translateY(calc(var(--tk-safe-t) + 8px)); border-radius: var(--tk-r-sheet); overflow: hidden; }
.tk-main { position: relative; flex: 1; min-width: 0; }
.tk-stack { position: absolute; inset: 0; overflow: hidden; }
.tk-stack[hidden] { display: none; }

/* Page */
.tk-page { position: absolute; inset: 0; background: var(--tk-bg-grouped); will-change: transform; }
.tk-page.is-plain { background: var(--tk-bg-plain); }
.tk-scroll {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-top: calc(var(--tk-safe-t) + var(--tk-navbar-h));
  padding-bottom: var(--tk-bottom-clear);
  padding-left: var(--tk-safe-l); padding-right: var(--tk-safe-r);
}
.tk-root.no-tabbar .tk-scroll { padding-bottom: calc(var(--tk-safe-b) + var(--tk-s6)); }
.tk-content { max-width: 720px; margin: 0 auto; }
.tk-content.is-wide { max-width: 1100px; }
.tk-page-dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 5; }
.tk-page-edge-shadow { box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12); }

/* Scroll edge effect: content softly blurs and fades under the floating bars */
.tk-scroll-edge {
  position: absolute; left: 0; right: 0; z-index: 8; pointer-events: none;
  opacity: 0; transition: opacity 0.2s linear;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tk-scroll-edge.is-top {
  top: 0; height: calc(var(--tk-safe-t) + var(--tk-navbar-h) + 16px);
  background: linear-gradient(to bottom, var(--tk-bg-grouped) 0%, color-mix(in srgb, var(--tk-bg-grouped) 70%, transparent) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.tk-scroll-edge.is-bottom {
  bottom: 0; height: calc(var(--tk-float-b) + var(--tk-tabbar-h) + 20px); opacity: 1;
  background: linear-gradient(to top, color-mix(in srgb, var(--tk-bg-grouped) 80%, transparent) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, #000 50%, transparent); mask-image: linear-gradient(to top, #000 50%, transparent);
}
.tk-page.is-plain .tk-scroll-edge.is-top { background: linear-gradient(to bottom, var(--tk-bg-plain), transparent); }
.tk-page.is-scrolled .tk-scroll-edge.is-top { opacity: 1; }
.tk-root.no-tabbar .tk-scroll-edge.is-bottom { display: none; }

/* Navigation bar — no bar background; controls float as glass */
.tk-navbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding-top: var(--tk-safe-t);
  padding-left: calc(var(--tk-safe-l) + var(--tk-margin) - 4px); padding-right: calc(var(--tk-safe-r) + var(--tk-margin) - 4px);
  pointer-events: none;
}
.tk-navbar-bar {
  position: relative; height: var(--tk-navbar-h);
  display: flex; align-items: center; justify-content: space-between;
}
.tk-navbar-title {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  max-width: 52%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 1rem; font-weight: 600; letter-spacing: -0.024em;
  transition: opacity 0.18s linear; pointer-events: none;
}
.tk-page.has-large-title:not(.is-collapsed) .tk-navbar-title { opacity: 0; }
.tk-navbar-leading, .tk-navbar-trailing { display: flex; align-items: center; gap: 8px; z-index: 1; pointer-events: auto; }
.tk-bar-group { display: flex; align-items: center; border-radius: var(--tk-r-capsule); }
.tk-bar-group:empty { display: none; }
.tk-bar-button {
  min-height: 44px; min-width: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  color: var(--tk-label); font-size: 1rem; font-weight: 500; letter-spacing: -0.024em;
  border-radius: var(--tk-r-capsule);
  transition: transform 0.2s var(--tk-ease), opacity 0.1s linear;
}
.tk-bar-button.is-icon { padding: 0; width: 44px; }
.tk-bar-button:active { transform: scale(1.08); transition-duration: 0.12s; }
.tk-bar-button[disabled] { color: var(--tk-label-3); pointer-events: none; }
.tk-bar-button[disabled].tk-glass-prominent { background: var(--tk-fill) !important; color: var(--tk-label-3) !important; box-shadow: none !important; }
.tk-bar-button .tk-icon { width: 1.2rem; height: 1.2rem; }
.tk-bar-group > .tk-bar-button.tk-glass-prominent { margin: 0; }
.tk-large-title-wrap { padding: 4px var(--tk-margin) 10px; }
.tk-large-title-wrap .tk-large-title { margin: 0; overflow-wrap: anywhere; }
.tk-large-subtitle { margin: 2px 0 0; }

/* Tab bar — a floating glass capsule */
.tk-tabbar {
  position: fixed; z-index: 50;
  left: calc(var(--tk-safe-l) + 20px); right: calc(var(--tk-safe-r) + 20px); bottom: var(--tk-float-b);
  max-width: 560px; margin: 0 auto;
  height: var(--tk-tabbar-h); padding: 4px;
  display: flex; justify-content: space-between; gap: 2px;
  border-radius: var(--tk-r-capsule);
}
.tk-tab {
  position: relative; flex: 1; min-width: 0; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: var(--tk-r-capsule);
  color: var(--tk-label);
  font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0.01em;
  transition: background-color 0.25s var(--tk-ease), color 0.2s linear, transform 0.2s var(--tk-ease);
}
.tk-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.tk-tab .tk-icon { width: 25px; height: 25px; }
.tk-tab.is-active { color: var(--tk-tint); background: var(--tk-fill-2); }
.tk-tab:active { transform: scale(0.94); }
.tk-badge {
  position: absolute; top: 3px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--tk-red); color: #fff;
  font-size: 12px; line-height: 18px; font-weight: 600; text-align: center;
}

/* Sidebar (iPad / Mac) — a floating glass panel */
.tk-sidebar { display: none; }
@media (min-width: 768px) {
  .tk-root.has-sidebar .tk-tabbar { display: none; }
  .tk-root.has-sidebar { --tk-bottom-clear: calc(var(--tk-safe-b) + var(--tk-s8)); }
  .tk-root.has-sidebar .tk-scroll-edge.is-bottom { display: none; }
  .tk-root.has-sidebar .tk-sidebar {
    display: flex; flex-direction: column;
    width: 300px; flex: none; position: relative; z-index: 20;
    margin: calc(var(--tk-safe-t) + 8px) 0 calc(var(--tk-safe-b) + 8px) calc(var(--tk-safe-l) + 8px);
    border-radius: var(--tk-r-card);
    background: rgb(var(--tk-glass-rgb) / var(--tk-glass-alpha));
    -webkit-backdrop-filter: blur(var(--tk-glass-blur)) saturate(180%); backdrop-filter: blur(var(--tk-glass-blur)) saturate(180%);
    box-shadow: var(--tk-glass-edge), var(--tk-glass-shadow);
    padding: 8px 0; overflow-y: auto;
  }
}
.tk-sidebar-title { padding: 36px 20px 10px; margin: 0; }
.tk-sidebar-list { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.tk-sidebar-item {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 12px;
  padding: 0 14px; border-radius: var(--tk-r-capsule); text-align: left; color: var(--tk-label);
}
.tk-sidebar-item .tk-icon { width: 1.3rem; height: 1.3rem; color: var(--tk-tint); }
.tk-sidebar-item:active { background: var(--tk-fill-2); }
.tk-sidebar-item.is-active { background: var(--tk-tint); color: #fff; }
.tk-sidebar-item.is-active .tk-icon { color: #fff; }
.tk-sidebar-item .tk-count { margin-left: auto; color: var(--tk-label-2); }
.tk-sidebar-item.is-active .tk-count { color: rgba(255, 255, 255, 0.85); }

/* ---------- 6. Lists ---------- */
.tk-section { margin: 0 0 32px; }
.tk-section-header {
  margin: 0; padding: 0 calc(var(--tk-margin) + 20px) 8px;
  font-size: 0.765rem; line-height: 1.059rem; font-weight: 400; letter-spacing: -0.006em;
  text-transform: uppercase; color: var(--tk-label-2);
}
.tk-section-header.is-prominent {
  text-transform: none; color: var(--tk-label);
  font-size: 1.176rem; line-height: 1.471rem; font-weight: 700; letter-spacing: 0.019em;
  padding-bottom: 10px; padding-left: calc(var(--tk-margin) + 4px); padding-right: calc(var(--tk-margin) + 4px);
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.tk-section-header.is-prominent .tk-header-action { font-size: 1rem; font-weight: 400; color: var(--tk-tint); text-transform: none; letter-spacing: -0.024em; min-height: 44px; margin: -12px 0; }
.tk-section-footer {
  margin: 0; padding: 8px calc(var(--tk-margin) + 20px) 0;
  font-size: 0.765rem; line-height: 1.059rem; color: var(--tk-label-2);
}
.tk-list {
  --tk-row-bg: var(--tk-bg-cell);
  list-style: none; margin: 0 var(--tk-margin); padding: 0;
  background: var(--tk-row-bg); border-radius: var(--tk-r-card); overflow: hidden;
}
.tk-sheet .tk-list { --tk-row-bg: var(--tk-bg-elevated-cell); }
.tk-list.is-plain { margin: 0; border-radius: 0; background: transparent; }
.tk-row-wrap { position: relative; overflow: hidden; }
.tk-row-wrap > .tk-row { background: var(--tk-row-bg); }
.tk-row {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 13px 20px;
  background: transparent; color: var(--tk-label); text-align: left;
  text-decoration: none;
}
/* Inset hairline separators that align with the text */
.tk-list > li:not(:last-child) > .tk-row::after,
.tk-list > li:not(:last-child) > .tk-row-wrap > .tk-row::after {
  content: ""; position: absolute; right: 0; bottom: 0;
  left: var(--tk-sep-inset, 20px);
  height: 1px; background: var(--tk-separator);
  transform: scaleY(var(--tk-hairline-scale)); transform-origin: 0 100%;
}
.tk-row.has-icon { --tk-sep-inset: 61px; }
.tk-row.has-avatar { --tk-sep-inset: 72px; }
.tk-row.has-check { --tk-sep-inset: 56px; align-items: flex-start; }
.tk-row :is(input, textarea, select):focus-visible { outline: none; }
button.tk-row, a.tk-row, label.tk-row { cursor: pointer; }
button.tk-row:active, a.tk-row:active, .tk-row.is-pressable:active { background: var(--tk-highlight); transition: none; }
.tk-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tk-row-title { overflow-wrap: anywhere; }
.tk-row-subtitle { color: var(--tk-label-2); font-size: 0.882rem; line-height: 1.176rem; letter-spacing: -0.016em; overflow-wrap: anywhere; }
.tk-row-detail { color: var(--tk-label-2); text-align: right; flex: none; max-width: 50%; overflow-wrap: anywhere; }
.tk-row-chevron { width: 0.53rem; height: 0.88rem; flex: none; color: var(--tk-chevron); margin-left: -4px; }
.tk-row.is-destructive { color: var(--tk-red); }
.tk-row.is-action { color: var(--tk-tint); }
.tk-row.is-centered { justify-content: center; text-align: center; }
.tk-row.is-disabled { color: var(--tk-label-3); pointer-events: none; }
.tk-row.is-done .tk-row-title { color: var(--tk-label-2); }

/* Settings-style icon tile */
.tk-tile {
  width: 29px; height: 29px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff; background: var(--tk-gray);
}
.tk-tile .tk-icon { width: 18px; height: 18px; vertical-align: 0; }

/* Monogram avatar (Contacts-style, flat) */
.tk-avatar {
  --size: 40px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--tk-gray); color: #fff;
  font-family: var(--tk-font-round); font-weight: 600; font-size: calc(var(--size) * 0.42);
  letter-spacing: 0; user-select: none;
}
.tk-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tk-avatar .tk-icon { width: 58%; height: 58%; }
.tk-avatar.is-small { --size: 29px; }
.tk-avatar.is-large { --size: 72px; }

/* Reminders-style completion circle */
.tk-check {
  --c: var(--tk-tint);
  position: relative; flex: none; width: 24px; height: 24px; margin: -10px;
  box-sizing: content-box; padding: 10px; /* 44pt target */
  display: grid; place-items: center;
}
.tk-check::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--tk-chevron);
  transition: box-shadow 0.15s linear;
}
.tk-check[aria-checked="true"]::before { box-shadow: inset 0 0 0 1.5px var(--c); }
.tk-check::after {
  content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--c); transform: scale(0); transition: transform 0.25s var(--tk-ease);
}
.tk-check[aria-checked="true"]::after { transform: scale(1); }

/* Swipe actions — separate capsules, as in iOS 26+ */
.tk-swipe-actions {
  position: absolute; top: 0; bottom: 0; right: 0;
  display: flex; align-items: stretch; gap: 6px; padding: 6px 8px 6px 6px; z-index: 0;
}
.tk-swipe-action {
  min-width: 62px; padding: 0 12px; color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; border-radius: var(--tk-r-capsule);
  font-size: 0.765rem; font-weight: 600; letter-spacing: -0.006em;
  background: var(--tk-gray);
}
.tk-swipe-action.is-destructive { background: var(--tk-red); }
.tk-swipe-action.is-tint { background: var(--tk-tint); }
.tk-swipe-action.is-orange { background: var(--tk-orange); }
.tk-swipe-action .tk-icon { width: 1.15rem; height: 1.15rem; }
.tk-row-wrap > .tk-row { z-index: 1; touch-action: pan-y; transition: transform var(--tk-dur) var(--tk-ease); }
.tk-row-wrap.is-swiping > .tk-row { transition: none !important; }
.tk-row-wrap:not(.is-swiping):not(.is-open) > .tk-swipe-actions { visibility: hidden; }
.tk-row-wrap.is-removing { transition: height var(--tk-dur) var(--tk-ease), opacity 0.2s linear; overflow: hidden; }

/* Form controls inside rows */
.tk-row input[type="text"], .tk-row input[type="email"], .tk-row input[type="password"],
.tk-row input[type="number"], .tk-row input[type="search"], .tk-row input[type="tel"], .tk-row input[type="url"],
.tk-row textarea, .tk-field {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; margin: 0;
  font-size: 1rem; line-height: 1.294rem; color: var(--tk-label);
}
.tk-row textarea { resize: none; min-height: 5.2rem; }
.tk-row input::placeholder, .tk-row textarea::placeholder, .tk-field::placeholder { color: var(--tk-label-3); }
.tk-row input[type="date"], .tk-row input[type="time"], .tk-row input[type="datetime-local"] {
  border: 0; border-radius: var(--tk-r-capsule); padding: 6px 12px; margin: -6px 0;
  background: var(--tk-fill-3); color: var(--tk-label);
  font-size: 1rem; -webkit-appearance: none; appearance: none; min-height: 34px;
}
.tk-select-wrap { position: relative; display: inline-flex; align-items: center; }
.tk-select-wrap select { -webkit-appearance: none; appearance: none; border: 0; background: transparent; color: var(--tk-label-2); padding: 0 1.1rem 0 0; margin: 0; text-align: right; text-align-last: right; font-size: 1rem; }
.tk-select-wrap .tk-icon { position: absolute; right: 0; pointer-events: none; color: var(--tk-label-2); width: 0.8rem; height: 0.8rem; }

/* Switch — Safari's native <input switch> is used where available (it draws the
   current iOS switch itself). This fallback matches the iOS 26+ shape. */
.tk-switch { accent-color: var(--tk-green); flex: none; margin: 0; }
html:not(.tk-native-switch) .tk-switch {
  -webkit-appearance: none; appearance: none;
  position: relative; width: 64px; height: 28px; border-radius: var(--tk-r-capsule);
  background: var(--tk-fill-2); cursor: pointer;
  transition: background-color 0.25s linear;
}
html:not(.tk-native-switch) .tk-switch::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 38px; height: 24px; border-radius: 12px;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.06);
  transition: transform var(--tk-dur) var(--tk-ease), width 0.15s var(--tk-ease);
}
html:not(.tk-native-switch) .tk-switch:active::before { width: 44px; }
html:not(.tk-native-switch) .tk-switch:checked { background: var(--tk-green); }
html:not(.tk-native-switch) .tk-switch:checked::before { transform: translateX(22px); }
html:not(.tk-native-switch) .tk-switch:checked:active::before { transform: translateX(16px); }
html:not(.tk-native-switch) .tk-switch:disabled { opacity: 0.5; }
.tk-switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--tk-tint) 50%, transparent); outline-offset: 2px; }

/* Slider (iOS 26+ capsule thumb) */
.tk-slider { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 44px; background: transparent; margin: 0; --v: 50%; }
.tk-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--tk-tint) var(--v), var(--tk-fill) var(--v)); }
.tk-slider::-moz-range-track { height: 6px; border-radius: 3px; background: var(--tk-fill); }
.tk-slider::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--tk-tint); }
.tk-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 38px; height: 24px; margin-top: -9px; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.18), 0 0 0 0.5px rgba(0,0,0,0.04); }
.tk-slider::-moz-range-thumb { width: 38px; height: 24px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.18); }

/* Segmented control — capsule */
.tk-segmented {
  position: relative; display: flex; padding: 3px;
  min-height: 36px; border-radius: var(--tk-r-capsule); background: var(--tk-fill-3);
  isolation: isolate;
}
.tk-segmented-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; z-index: -1;
  border-radius: var(--tk-r-capsule); background: var(--tk-seg-thumb);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(0, 0, 0, 0.04);
  transition: transform var(--tk-dur) var(--tk-ease), width var(--tk-dur) var(--tk-ease);
}
.tk-segment {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 30px; padding: 4px 10px;
  /* Like UISegmentedControl, segments stop growing past ~16pt at accessibility sizes */
  font-size: clamp(13px, 0.824rem, 16px); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em;
  border-radius: var(--tk-r-capsule); color: var(--tk-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tk-segment[aria-checked="true"] { font-weight: 600; }
.tk-segment::after { content: ""; position: absolute; inset: -5px 0; } /* 44pt hit target */
.tk-segmented-wrap { padding: 0 var(--tk-margin) 18px; }

/* Stepper — capsule */
.tk-stepper { display: inline-flex; align-items: center; height: 36px; border-radius: var(--tk-r-capsule); background: var(--tk-fill-3); flex: none; }
.tk-stepper button { width: 48px; height: 36px; display: grid; place-items: center; color: var(--tk-label); position: relative; border-radius: var(--tk-r-capsule); }
.tk-stepper button::after { content: ""; position: absolute; inset: -4px 0; }
.tk-stepper button:active { background: var(--tk-fill); }
.tk-stepper button:disabled { color: var(--tk-label-3); }
.tk-stepper button + button::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--tk-fill); }
.tk-stepper .tk-icon { width: 1rem; height: 1rem; }

/* Search field — capsule */
.tk-search { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; margin: 0 var(--tk-margin) 12px; border-radius: var(--tk-r-capsule); background: var(--tk-fill-3); color: var(--tk-label-2); }
.tk-search input { flex: 1; border: 0; background: transparent; font-size: 1rem; color: var(--tk-label); min-width: 0; }
.tk-search input::placeholder { color: var(--tk-label-2); }
.tk-search .tk-icon { width: 1rem; height: 1rem; }

/* Day picker (Clock-alarm-style repeat days) */
.tk-days { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-day {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  font-size: 0.882rem; font-weight: 600; background: var(--tk-fill-3); color: var(--tk-label);
  transition: background-color 0.2s linear, transform 0.2s var(--tk-ease);
}
.tk-day:active { transform: scale(0.92); }
.tk-day::after { content: ""; position: absolute; inset: -3px; }
.tk-day[aria-pressed="true"] { background: var(--tk-tint); color: #fff; }

/* ---------- 7. Buttons (capsules) ---------- */
.tk-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 50px; padding: 14px 24px; border-radius: var(--tk-r-capsule);
  background: var(--tk-tint); color: #fff;
  font-size: 1rem; line-height: 1.294rem; font-weight: 600; letter-spacing: -0.024em; text-align: center;
  transition: transform 0.2s var(--tk-ease), opacity 0.1s linear;
}
.tk-button:active { transform: scale(0.97); }
.tk-button[disabled] { background: var(--tk-fill-2); color: var(--tk-label-3); pointer-events: none; }
.tk-button.is-tinted { background: color-mix(in srgb, var(--tk-tint) 15%, transparent); color: var(--tk-tint); }
.tk-button.is-gray { background: var(--tk-fill-2); color: var(--tk-label); }
.tk-button.is-glass { color: var(--tk-label); }
.tk-button.is-destructive { background: var(--tk-red); }
.tk-button.is-destructive.is-tinted { background: color-mix(in srgb, var(--tk-red) 15%, transparent); color: var(--tk-red); }
.tk-button.is-small { min-height: 36px; padding: 7px 16px; font-size: 0.882rem; position: relative; }
.tk-button.is-small::after { content: ""; position: absolute; inset: -4px; }
.tk-button.is-block { display: flex; width: calc(100% - var(--tk-margin) * 2); margin: 0 var(--tk-margin); }
.tk-plain-button { color: var(--tk-tint); min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; transition: opacity .1s linear; }
.tk-plain-button:active { opacity: 0.3; transition: none; }
.tk-plain-button .tk-icon { width: 1.3rem; height: 1.3rem; }

/* Bottom toolbar — floating glass capsules above the tab bar (Reminders "New Reminder") */
.tk-toolbar {
  position: absolute; z-index: 9; pointer-events: none;
  left: calc(var(--tk-safe-l) + 20px); right: calc(var(--tk-safe-r) + 20px);
  bottom: calc(var(--tk-float-b) + var(--tk-tabbar-h) + 12px);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tk-toolbar > * { pointer-events: auto; border-radius: var(--tk-r-capsule); min-height: 48px; padding: 0 18px; font-weight: 600; color: var(--tk-tint); }
.tk-toolbar > .tk-plain-button:active { opacity: 1; transform: scale(1.04); }
.tk-root.no-tabbar .tk-toolbar { bottom: var(--tk-float-b); }
@media (min-width: 768px) { .tk-root.has-sidebar .tk-toolbar { bottom: calc(var(--tk-safe-b) + 16px); } }
.tk-page.has-toolbar .tk-scroll { padding-bottom: calc(var(--tk-bottom-clear) + max(48px, 2.8rem) + 12px); }

/* ---------- 8. Content Unavailable (empty / error) and loading ---------- */
.tk-unavailable {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 8px; padding: 48px 32px; min-height: 50vh; max-width: 480px; margin: 0 auto;
}
.tk-unavailable.is-compact { min-height: 0; padding: 32px 24px; }
.tk-unavailable-icon { width: 3.3rem; height: 3.3rem; color: var(--tk-label-2); margin-bottom: 8px; }
.tk-unavailable h2 { margin: 0; font-size: 1.294rem; line-height: 1.647rem; font-weight: 700; letter-spacing: 0.016em; }
.tk-unavailable p { margin: 0; color: var(--tk-label-2); }
.tk-unavailable .tk-button { margin-top: 12px; }

.tk-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 50vh; color: var(--tk-label-2); }
.tk-loading.is-compact { min-height: 0; padding: 24px; }
.tk-spinner { width: 20px; height: 20px; color: var(--tk-gray); animation: tk-spin 1s steps(8) infinite; }
.tk-spinner.is-large { width: 37px; height: 37px; }
@keyframes tk-spin { to { transform: rotate(360deg); } }

/* Pull to refresh */
.tk-ptr { position: absolute; left: 0; right: 0; top: calc(var(--tk-safe-t) + var(--tk-navbar-h)); height: 0; display: flex; justify-content: center; z-index: 4; pointer-events: none; }
.tk-ptr .tk-spinner { margin-top: 14px; opacity: 0; animation-play-state: paused; }
.tk-ptr.is-refreshing .tk-spinner { animation-play-state: running; opacity: 1; }

/* ---------- 9. Sheets, alerts, action sheets ---------- */
.tk-overlay { position: fixed; inset: 0; z-index: 100; }
.tk-backdrop { position: absolute; inset: 0; background: var(--tk-dim); opacity: 0; transition: opacity var(--tk-dur) linear; }
.tk-overlay.is-open .tk-backdrop { opacity: 1; }

.tk-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(100% - var(--tk-safe-t) - 10px);
  display: flex; flex-direction: column;
  background: var(--tk-bg-grouped);
  border-radius: var(--tk-r-sheet) var(--tk-r-sheet) 0 0; overflow: hidden;
  transform: translateY(105%);
  transition: transform var(--tk-dur) var(--tk-ease);
  will-change: transform;
}
/* Medium detent floats, inset from the screen edges, as glass */
.tk-sheet.is-medium { left: 8px; right: 8px; bottom: max(8px, calc(var(--tk-safe-b) - 20px)); border-radius: var(--tk-r-sheet); --tk-bg-elevated-cell: rgb(255 255 255 / 0.7); }
:root[data-appearance="dark"] .tk-sheet { --tk-bg-grouped: #1C1C1E; }
:root[data-appearance="dark"] .tk-sheet.is-medium { --tk-bg-elevated-cell: rgb(255 255 255 / 0.08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-appearance="light"]) .tk-sheet { --tk-bg-grouped: #1C1C1E; }
  :root:not([data-appearance="light"]) .tk-sheet.is-medium { --tk-bg-elevated-cell: rgb(255 255 255 / 0.08); }
}
.tk-sheet.is-dragging { transition: none; }
.tk-sheet-grabber { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 36px; height: 5px; border-radius: 2.5px; background: var(--tk-fill); z-index: 2; }
.tk-sheet-header { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 14px 14px 0; touch-action: none; }
.tk-sheet-header .tk-navbar-title { top: calc(50% + 7px); opacity: 1; }
.tk-sheet-header .tk-bar-group:not(:has(.tk-glass-prominent)) { background: var(--tk-fill-3); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.tk-sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 0 calc(var(--tk-safe-b) + 24px); -webkit-overflow-scrolling: touch; }
.tk-sheet.is-medium .tk-sheet-body { padding-bottom: 20px; }
.tk-sheet.is-scrolled .tk-sheet-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--tk-hairline); background: var(--tk-separator); }
@media (min-width: 768px) {
  .tk-sheet.is-form {
    left: 50%; top: 50%; bottom: auto; width: min(560px, calc(100% - 40px)); height: min(640px, calc(100% - 80px));
    border-radius: var(--tk-r-sheet); transform: translate(-50%, 100vh);
    --tk-bg-elevated-cell: rgb(255 255 255 / 0.7);
  }
  .tk-overlay.is-open .tk-sheet.is-form { transform: translate(-50%, -50%); }
}

.tk-alert {
  position: absolute; left: 50%; top: 50%;
  width: min(300px, calc(100% - 48px)); max-height: 80%; overflow: auto; border-radius: var(--tk-r-alert);
  padding: 22px 16px 16px;
  transform: translate(-50%, -50%) scale(1.1); opacity: 0;
  transition: transform 0.3s var(--tk-ease), opacity 0.2s linear;
}
.tk-overlay.is-open .tk-alert { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.tk-alert-text { padding: 0 6px 18px; }
.tk-alert-title { margin: 0; font-size: 1rem; line-height: 1.294rem; font-weight: 600; letter-spacing: -0.024em; }
.tk-alert-message { margin: 4px 0 0; font-size: 0.882rem; line-height: 1.176rem; color: var(--tk-label); }
.tk-alert-actions { display: flex; flex-direction: column; gap: 8px; }
.tk-alert-actions.is-pair { flex-direction: row; }
.tk-alert-action {
  flex: 1; min-height: 48px; padding: 12px 16px; border-radius: var(--tk-r-capsule);
  background: var(--tk-fill-2); color: var(--tk-label);
  font-size: 1rem; font-weight: 500; letter-spacing: -0.024em;
  transition: transform 0.2s var(--tk-ease);
}
.tk-alert-action:active { transform: scale(0.97); }
.tk-alert-action.is-preferred { background: var(--tk-tint); color: #fff; font-weight: 600; }
.tk-alert-action.is-destructive { color: var(--tk-red); font-weight: 600; }
.tk-alert-action.is-destructive.is-preferred { background: var(--tk-red); color: #fff; }

.tk-action-sheet {
  position: absolute; left: 8px; right: 8px; bottom: max(8px, calc(var(--tk-safe-b) - 20px));
  max-width: 440px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px;
  transform: translateY(calc(100% + 40px)); transition: transform var(--tk-dur) var(--tk-ease);
}
.tk-overlay.is-open .tk-action-sheet { transform: none; }
.tk-action-group { border-radius: var(--tk-r-alert); overflow: hidden; padding: 6px; }
.tk-action-head { padding: 12px 16px 10px; text-align: center; color: var(--tk-label-2); }
.tk-action-head .tk-action-title { margin: 0; font-size: 0.765rem; font-weight: 600; }
.tk-action-head .tk-action-message { margin: 2px 0 0; font-size: 0.765rem; }
.tk-action-button {
  display: block; width: 100%; min-height: 52px; padding: 14px 16px; border-radius: 26px;
  font-size: 1rem; font-weight: 500; color: var(--tk-tint); letter-spacing: -0.024em;
}
.tk-action-button.is-destructive { color: var(--tk-red); }
.tk-action-group.is-cancel .tk-action-button { font-weight: 600; color: var(--tk-label); }
.tk-action-button:active { background: var(--tk-fill-2); }

/* ---------- 10. Progress ring (Fitness-style) and summary cards ---------- */
.tk-ring { --c: var(--tk-tint); --p: 0; --size: 64px; --w: 10px; position: relative; width: var(--size); height: var(--size); flex: none; }
.tk-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.tk-ring .tk-ring-track { stroke: color-mix(in srgb, var(--c) 22%, transparent); }
.tk-ring .tk-ring-value { stroke: var(--c); stroke-linecap: round; transition: stroke-dashoffset 0.6s var(--tk-ease); }
.tk-ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--tk-font-round); font-weight: 600; }

.tk-cards { display: grid; gap: 10px; margin: 0 var(--tk-margin); grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.tk-card { background: var(--tk-bg-cell); border-radius: var(--tk-r-card); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 44px; text-align: left; color: var(--tk-label); transition: transform 0.2s var(--tk-ease); }
button.tk-card:active { transform: scale(0.97); }
.tk-card-label { display: flex; align-items: center; gap: 6px; font-size: 0.882rem; font-weight: 600; letter-spacing: -0.016em; }
.tk-card-label .tk-icon { width: 1rem; height: 1rem; }
.tk-card-value { font-size: 1.647rem; line-height: 2rem; font-weight: 600; font-family: var(--tk-font-round); letter-spacing: 0.01em; }
.tk-card-value small { font-size: 0.882rem; color: var(--tk-label-2); font-weight: 600; margin-left: 2px; }

/* ---------- 11. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  :root { --tk-dur: 0.2s; --tk-ease: linear; }
  .tk-spinner { animation-duration: 2s; }
  .tk-root.is-receded { transform: none; border-radius: 0; }
}
:root.tk-reduce-motion { --tk-dur: 0.2s; --tk-ease: linear; }
