/* ==========================================================================
   Turon TZ world - tokens.css
   Every value the world uses. Themes on <html data-theme="light|dark">,
   glass level on <html data-glass="standard|more|solid">.
   Load order: tokens.css, base.css, glass.css, components.css.
   R3 2026-11-13: every colour value is the Turon Telecom palette (brand/notes/PALETTE.md, numbers in build/notes/r3/tokens.md):
   anchors blue #061F99, red #EB2343, ink #181B21; Evening = the deep navy in the brand hue (LEAD-BRAND decision 1).
   ========================================================================== */

/* ---------- theme-independent scales ---------- */
:root {
  /* type */
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --t-xs: .75rem;    /* 12  captions, axis ticks, timestamps          lh 1.35  500 */
  --t-sm: .8125rem;  /* 13  chips, meta, secondary                    lh 1.35  500 */
  --t-ui: .875rem;   /* 14  dense UI, nav labels, buttons             lh 1.4   500 */
  --t-body: 1rem;    /* 16  body, inputs, task titles                 lh 1.5   400/500 */
  --t-h4: 1.1875rem; /* 19  block titles ("Мой день", "Горит")        lh 1.3   500 */
  --t-h3: 1.4375rem; /* 23  section / drawer title (Inter)            lh 1.25  500 */
  --t-h2: 1.75rem;   /* 28  (Inter)                                   lh 1.2   500 */
  --t-num: 2rem;     /* 32  key counts inside blocks (Inter, KIT «Цифра»)  lh 36px (--lh-num)  500, tracking 0 */
  --lh-num: 2.25rem;
  --t-hero: 2.5rem;  /* 40  at most one per view (Inter)              lh 1.0   500 */
  /* R2 (LEAD-FIX shared 2): the kit knows Inter only. --font-display stays defined for the owners that still read it;
     nothing of the world or the shell uses it. */
  --w-regular: 400; --w-medium: 500; --w-semibold: 600;
  /* R2 page title (KIT 5, LEAD-C 5): Inter Medium 32/38, no negative tracking; 24/30 when the phone shell shows (<=900px,
     set below). One style for «Обзор» (.v3-h1) and every other page (.page-head h1, .ops-page-head h1):
     font: var(--w-medium) var(--t-page)/var(--lh-page) var(--font-text); letter-spacing: 0 */
  --t-page: 2rem; --lh-page: 2.375rem;

  /* spacing (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --pad-sheet: 20px; --gutter: 16px;

  /* radii (concentric: inner = outer - padding) */
  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  /* R2 shapes by role (the unslop direction, KIT.md 5): use these names in new rules.
     control = buttons, inputs, selects, textareas · card = a card or an inset block · sheet = sheets, panels, windows'
     sheets · tag = tags and small status marks · capsule = ONLY the glass control layers (top bar and its tabs and
     in-bar buttons, the phone tab bar, the lens, segmented switches, the command capsule, floating menus, toasts) */
  --r-control: var(--r-sm); --r-card: var(--r-md); --r-sheet: var(--r-lg); --r-tag: var(--r-xs); --r-capsule: var(--r-pill);

  /* control sizes */
  --ctl-h: 40px;        /* buttons, inputs, segmented, round icon buttons */
  --ctl-h-sm: 32px;     /* inline row actions, filter chips */
  --chip-h: 24px;       /* status chips (not interactive) */
  --hit-min: 44px;      /* touch target floor (hit area, not always the visual) */
  --row-h: 52px;        /* task list rows 44-56 */
  --icon-sm: 16px; --icon-md: 20px; --icon-lg: 24px;

  /* motion */
  --dur-1: 120ms;  /* press in, hover tint            */
  --dur-2: 180ms;  /* colour / label changes          */
  --dur-3: 220ms;  /* lens travel (the spring in lg.js drives it) */
  --dur-4: 250ms;  /* materialize, press release      */
  --ease-out: cubic-bezier(.16, 1, .3, 1);       /* exponential ease-out: arrivals */
  --ease-in: cubic-bezier(.5, 0, .75, 0);        /* departures (exits ~65% of enters) */
  --ease-std: cubic-bezier(.2, 0, 0, 1);         /* small state changes */
  --ease-spring: linear(0, 0.039, 0.137, 0.269, 0.414, 0.557, 0.689, 0.803, 0.896, 0.968, 1.02, 1.055, 1.075, 1.083, 1.082, 1.076, 1.066, 1.054, 1.042, 1.03, 1.02, 1.012, 1.005, 1, 0.996, 0.994, 0.993, 0.993, 0.993, 0.994, 0.995, 0.996, 0.997, 0.998, 0.999, 0.999, 1, 1, 1, 1.001, 1);

  /* z-index scale */
  --z-ground: -1; --z-content: 1; --z-sticky: 10; --z-nav: 20; --z-dock: 30; --z-popover: 40; --z-toast: 50; --z-tooltip: 60;
}

/* ---------- Daylight (light) - also the default when no data-theme is set ---------- */
:root, html[data-theme="light"] {
  color-scheme: light;
  --shadow-rgb: 24 27 33;

  /* ground */
  --ground: #F0F3FA;
  --light-1: 55 120 245;  --light-1-a: 0.2;   /* Turon blue from the top-left */
  --light-2: 180 222 252; --light-2-a: 0.55;   /* R3: pale ice from the bottom-right (never a UI colour; was warm sand) */
  --ground-rings: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' preserveAspectRatio='xMinYMin slice'%3E%3Cdefs%3E%3CradialGradient id='f' gradientUnits='userSpaceOnUse' cx='-60' cy='-60' r='1900'%3E%3Cstop offset='0' stop-color='%23181B21'/%3E%3Cstop offset='.55' stop-color='%23181B21' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%23181B21' stop-opacity='.2'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg fill='none' stroke='url(%23f)' stroke-width='1'%3E%3Ccircle cx='-60' cy='-60' r='110' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='144' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='178' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='212' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='246' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='280' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='314' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='348' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='382' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='416' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='450' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='484' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='518' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='552' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='586' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='620' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='654' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='688' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='722' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='756' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='790' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='824' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='858' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='892' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='926' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='960' stroke-opacity='0.080' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='994' stroke-opacity='0.110' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1078' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1146' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1214' stroke-opacity='0.096' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1282' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1350' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1418' stroke-opacity='0.096' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1486' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1554' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1622' stroke-opacity='0.096' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1690' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1758' stroke-opacity='0.060' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1826' stroke-opacity='0.096' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/svg%3E");

  /* surfaces */
  --sheet: #FFFFFF;
  --sheet-hairline: rgb(24 27 33 / .08);
  --sheet-shadow: 0 1px 2px rgb(24 27 33 / .05), 0 12px 28px -16px rgb(24 27 33 / .18);
  --sheet-hover: #F5F6FA;
  --sheet-press: #E9EDF5;
  --well: #F0F3FA;
  --well-hairline: rgb(24 27 33 / .06);
  --divider: #E6E9F0;
  --control-fill: rgb(255 255 255 / .80);       /* secondary buttons / fills placed on glass or sheets */
  --control-fill-hover: #FFFFFF;
  --control-hairline: rgb(24 27 33 / .11);
  --scrim: rgb(24 27 33 / .32);

  /* text */
  --text-1: #181B21; --text-2: #454B5F; --text-3: #585E72;
  --text-accent: #1D3BCC; --text-on-accent: #FFFFFF; --text-disabled: rgb(88 94 114 / 0.55);

  /* accent and focus */
  --accent: #1D3BCC; --accent-hover: #112DB3; --accent-press: #061F99;
  --brand: #3656E8;
  /* R3 the mark inside the app (LEAD-BRAND: no red, no tile): Daylight = logo-blue capsule, white tick and bars */
  --mark-fill: #061F99; --mark-ink: #FFFFFF;
  --focus: #1D3BCC; --focus-halo: rgb(87 116 249 / 0.28);
  --selection: rgb(87 116 249 / 0.24);
  --scroll-thumb: rgb(24 27 33 / .22); --scroll-thumb-hover: rgb(24 27 33 / .36);

  /* states: mark / text / chip fill */
  --ok: #22A752;     --ok-text: #007134;     --ok-bg: rgb(34 167 82 / 0.12);
  --warn: #EF9D00;   --warn-text: #9F5C0C;   --warn-bg: rgb(239 157 0 / 0.14);
  --late: #EB2343;   --late-text: #CA0E33;   --late-bg: rgb(235 35 67 / 0.12);
  --review: #D34A9A; --review-text: #982469; --review-bg: rgb(211 74 154 / 0.12);
  --neutral: #838799; --neutral-text: #454B5F; --neutral-bg: rgb(131 135 153 / 0.16);

  /* stage colours: Новое -> В работе are two blue ordinal steps (the queue); На проверке is the review berry and
     Готово the fine green, so a stage has the same colour in the stage bar, meters, funnel, chips and figures.
     New/work pass --ordinal; review and done clear CVD separation from their neighbours (validate_palette.js). */
  --stage-1: #7D95FF; --stage-2: #3656E8; --stage-3: #B83382; --stage-4: #22A752;
  --stage-1-ink: #181B21; --stage-2-ink: #FFFFFF; --stage-3-ink: #FFFFFF; --stage-4-ink: #181B21;

  /* categorical slots (departments, projects, chart series) - dataviz default order, validated on #FFFFFF */
  --cat-1: #3656E8; --cat-2: #D15A00; --cat-3: #00A294; --cat-4: #DF9C00;
  --cat-5: #D34A9A; --cat-6: #098C42; --cat-7: #838799; --cat-8: #061F99;

  /* charts */
  --series-1: #3656E8; --series-2: #D15A00;
  --series-1-muted: #7D95FF; --series-2-muted: #F88F4E;   /* past days: 2.76 / 2.33 : 1 on the sheet */
  --viz-muted: #C5C8D6; --viz-grid: #E6E9F0; --viz-axis: #C5C8D6; --viz-emph: #3656E8; --viz-dot: #838799;

  /* T3 liquid glass (regular, standard level) */
  /* W2 2026-11-11 (review R1-F1): regular glass is a clearer material than the solid sheet. Was white .26 / .43 (body .58).
     Body now ~.42 with a faint blue cast from the field; the top-left specular raised. */
  --glass-fill: rgb(242 246 255 / 0.2);   /* at the rim (the refracting band); with --glass-core the body is ~.42 */
  --glass-core: rgb(246 248 255 / 0.28);
  --glass-top: .26;          /* top-down light in the body             */
  --glass-sheen: .46;        /* soft specular sheen from the key light */
  /* lifted glass (popovers, menus, tooltips, toasts: reading text over content) keeps the denser body (.58) */
  --glass-fill-lift: rgb(255 255 255 / .26); --glass-core-lift: rgb(255 255 255 / .43);
  --glass-sheen-lift: .34; --glass-top-lift: .22;   /* lifted glass keeps the old light too (any level): its title sits under the sheen */
  --glass-blur: 18px; --glass-sat: 1.8; --glass-bright: 1.04;
  --glass-backdrop: blur(var(--glass-blur)) saturate(var(--glass-sat)) brightness(var(--glass-bright));
  --rim-hi: 255 255 255;
  --rim-w: 1.25px;
  --rim-key: .95;            /* key light, top-left hot spot  */
  --rim-top: .70;            /* the top edge                  */
  --rim-second: .55;         /* second light, bottom-right    */
  --rim-base: .10;           /* whisper everywhere else       */
  --rim-catch: .90;          /* crisp 1px catch-light inside the top edge */
  --rim-shade: 24 27 33; --rim-shade-a: .07;   /* dim bottom edge */
  --gather: 55 120 245; --gather-a: .14;       /* light gathering in the lower edge */
  --inner-glow: .55;
  --glass-shadow: 0 0 0 .5px rgb(24 27 33 / .06), 0 1px 2px rgb(24 27 33 / .06), 0 18px 40px -18px rgb(24 27 33 / .30);
  --glass-shadow-lift: 0 0 0 .5px rgb(24 27 33 / .06), 0 2px 4px rgb(24 27 33 / .06), 0 26px 56px -22px rgb(24 27 33 / .36);
  --band-tone: blur(6px) saturate(1.3) brightness(1.08);   /* Safari/Firefox thick-edge band */

  /* tinted glass (the one primary action) */
  --tint-fill: linear-gradient(180deg, rgb(29 59 204 / 0.96), rgb(22 52 192 / 0.97));
  --tint-fill-hover: linear-gradient(180deg, rgb(17 45 179 / 0.96), rgb(11 38 166 / 0.98));
  /* R3: the action's own inner light and lower shade, both themes (were literals in glass.css .lg-tint and components.css) */
  --tint-glow: 201 214 255;        /* blue-200: light gathering inside the action's lower edge (was sky 170 214 255) */
  --tint-rim-shade: 4 23 111;      /* blue-950: the action's dim bottom edge (was 4 30 80) */
  --accent-glow: 87 116 249;       /* blue-500: the press glow of Daylight secondary buttons (was 37 141 255) */

  /* the lens (selection drop) */
  --lens-fill: rgb(87 116 249 / 0.12);
  --lens-label: #112DB3;
  --lens-crescent: .85;
  --lens-body: .50;
  --lens-band: 29 59 204; --lens-band-a: .20;
  --lens-drop: rgb(var(--shadow-rgb) / .14);   /* R2 (LEAD-FIX shared 6): the lens's drop shadow is neutral in Daylight */
  --lens-catch: .95;
  --lens-key: .95;
  --lens-caustic: 255 255 255; --lens-caustic-a: .85;
  --lens-fill-strong: rgb(242 246 255 / 0.8);   /* lens over scrolling content (tab bar, top bar) */
  --lens-backdrop: blur(1.5px) saturate(1.9) brightness(1.08);

  /* component-level fills */
  --control-catch: .90;                      /* top catch-light on filled controls */
  --hover-on-glass: rgb(255 255 255 / .42);  /* hover wash for rows inside glass */
  --hover-on-sheet: rgb(24 27 33 / .045);
  --late-solid: #CA0E33;                     /* badge fill under white text (5.8:1) */
  --switch-off: #838799;                     /* 3.56:1 on the sheet */
  --check-border: #585E72;
  --skel: #EBEEF5; --skel-hi: #F9FAFD;

  /* content sheet material (translucent only at the "more" level) */
  --sheet-fill: var(--sheet);
  --sheet-backdrop: none;
  /* W2 2026-11-11: a solid element sitting directly on the field (capsule, chip row outside a sheet): .tz-onfield */
  --onfield-hairline: rgb(24 27 33 / .10);
  --onfield-shadow: 0 1px 2px rgb(24 27 33 / .06), 0 10px 24px -14px rgb(24 27 33 / .26);
}

/* ---------- Evening (dark) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --shadow-rgb: 0 0 0;

  --ground: #0C1425;
  --light-1: 17 45 179;  --light-1-a: 0.3;
  --light-2: 8 77 112; --light-2-a: 0.22;
  --ground-rings: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' preserveAspectRatio='xMinYMin slice'%3E%3Cdefs%3E%3CradialGradient id='f' gradientUnits='userSpaceOnUse' cx='-60' cy='-60' r='1900'%3E%3Cstop offset='0' stop-color='%23FFFFFF'/%3E%3Cstop offset='.55' stop-color='%23FFFFFF' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%23FFFFFF' stop-opacity='.2'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg fill='none' stroke='url(%23f)' stroke-width='1'%3E%3Ccircle cx='-60' cy='-60' r='110' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='144' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='178' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='212' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='246' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='280' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='314' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='348' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='382' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='416' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='450' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='484' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='518' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='552' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='586' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='620' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='654' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='688' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='722' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='756' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='790' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='824' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='858' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='892' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='926' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='960' stroke-opacity='0.065' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='994' stroke-opacity='0.090' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1078' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1146' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1214' stroke-opacity='0.088' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1282' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1350' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1418' stroke-opacity='0.088' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1486' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1554' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1622' stroke-opacity='0.088' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1690' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1758' stroke-opacity='0.055' vector-effect='non-scaling-stroke'/%3E%3Ccircle cx='-60' cy='-60' r='1826' stroke-opacity='0.088' vector-effect='non-scaling-stroke'/%3E%3C/g%3E%3C/svg%3E");

  --sheet: #162037;
  --sheet-hairline: rgb(255 255 255 / .07);
  --sheet-shadow: inset 0 1px 0 rgb(255 255 255 / .04), 0 16px 32px -18px rgb(0 0 0 / .6);
  --sheet-hover: #1C2841;
  --onfield-hairline: rgb(255 255 255 / .10);   /* W2: .tz-onfield */
  --onfield-shadow: inset 0 1px 0 rgb(255 255 255 / .05), 0 1px 2px rgb(0 0 0 / .35), 0 12px 28px -14px rgb(0 0 0 / .65);
  --sheet-press: #232F4A;
  --well: #1A253D;
  --well-hairline: rgb(255 255 255 / .05);
  --divider: #27324A;
  --control-fill: rgb(255 255 255 / .08);
  --control-fill-hover: rgb(255 255 255 / .13);
  --control-hairline: rgb(255 255 255 / .11);
  --scrim: rgb(2 5 17 / 0.55);

  --text-1: #F2F3F7; --text-2: #BFC9DC; --text-3: #97A3BA;
  --text-accent: #7D95FF; --text-on-accent: #FFFFFF; --text-disabled: rgb(151 163 186 / 0.5);

  --accent: #4665EF; --accent-hover: #4B69F4; --accent-press: #3F5EE9;
  --brand: #7D95FF;
  /* R3 the mark: Evening = white capsule, logo-blue tick and bars */
  --mark-fill: #FFFFFF; --mark-ink: #061F99;
  --focus: #7D95FF; --focus-halo: rgb(125 149 255 / 0.3);
  --selection: rgb(125 149 255 / 0.34);
  --scroll-thumb: rgb(255 255 255 / .18); --scroll-thumb-hover: rgb(255 255 255 / .30);

  --ok: #22A752;     --ok-text: #4AC372;     --ok-bg: rgb(34 167 82 / 0.16);
  --warn: #EF9D00;   --warn-text: #FEC25E;   --warn-bg: rgb(239 157 0 / 0.16);
  --late: #EB2343;   --late-text: #FB5F6A;   --late-bg: rgb(235 35 67 / 0.16);
  --review: #D34A9A; --review-text: #F797CB; --review-bg: rgb(211 74 154 / 0.16);
  --neutral: #838799; --neutral-text: #BFC9DC; --neutral-bg: rgb(131 135 153 / 0.16);

  --stage-1: #2E51E0; --stage-2: #6D89FE; --stage-3: #D34A9A; --stage-4: #22A752;
  --stage-1-ink: #FFFFFF; --stage-2-ink: #0C1425; --stage-3-ink: #0C1425; --stage-4-ink: #0C1425;

  --cat-1: #5774F9; --cat-2: #DD6612; --cat-3: #00A294; --cat-4: #BD8C00;
  --cat-5: #D34A9A; --cat-6: #2A984B; --cat-7: #838799; --cat-8: #A5B8FF;
  --series-1: #5774F9; --series-2: #DD6612;
  --series-1-muted: #2F479B; --series-2-muted: #8F4111;   /* past days: 1.93 / 2.26 : 1 on the sheet (quiet on purpose; the bars of today carry the value) */
  --viz-muted: #3B3E51; --viz-grid: #27324A; --viz-axis: #3B3E51; --viz-emph: #5774F9; --viz-dot: #686C7F;

  /* W2 2026-11-11 (review R1-F1): was navy .36 / .30 (body .55); body now ~.36, the field's light passes, top-left specular raised */
  --glass-fill: rgb(22 33 58 / 0.22);      /* at the rim; with --glass-core the body is navy ~.31 (W2b) */
  --glass-core: rgb(22 33 58 / 0.12);   /* W2b 2026-11-12: .18 -> .12 (body ~.31): the shell slab no longer reads as one more dark sheet; more.css keeps in step */
  --glass-top: .09;
  --glass-sheen: .20;
  --glass-fill-lift: rgb(22 33 58 / 0.36); --glass-core-lift: rgb(22 33 58 / 0.3);   /* popovers, menus, toasts: body .55 as before */
  --glass-sheen-lift: .10; --glass-top-lift: .07;
  --glass-blur: 18px; --glass-sat: 1.1; --glass-bright: 1.05;   /* colourless: never bluer than the tinted primary (W2 tried 1.10: popover and nav-count text fell under 4.5) */
  --rim-key: .80;            /* W2: was .70 */
  --rim-top: .30;
  --rim-second: .14;
  --rim-base: .025;
  --rim-catch: .22;
  --rim-shade: 0 0 0; --rim-shade-a: .35;
  --gather: 165 184 255; --gather-a: .20;
  --inner-glow: .10;
  --glass-shadow: 0 1px 2px rgb(0 0 0 / .30), 0 20px 44px -20px rgb(0 0 0 / .70);
  --glass-shadow-lift: 0 2px 4px rgb(0 0 0 / .30), 0 28px 60px -22px rgb(0 0 0 / .80);
  --band-tone: blur(7px) saturate(1.05) brightness(1.14);

  --tint-fill: linear-gradient(180deg, rgb(70 101 239 / 0.95), rgb(63 94 233 / 0.96));
  --tint-fill-hover: linear-gradient(180deg, rgb(75 105 244 / 0.95), rgb(70 101 239 / 0.97));
  /* R3 rim (lead, 2026-11-13 14:40): the Evening action keeps #4665EF and its white label; a brighter 1px rim lifts its edge to
     >= 3:1 against every neighbour (ground, sheet, glass, the «Больше стекла» field, «Сплошное»). Read by .lg-tint::after (glass.css,
     a floor under the lit rim) and, as a 1px inset ring, by the tinted icon button, the tab bar «+», .btn.primary and the dashboard
     send. Evening only: Daylight defines neither token, so every consumer falls back to what it painted before. */
  --tint-rim-floor: rgb(201 214 255 / .5);   /* blue-200 at .5 over the action fill */
  --tint-ring: inset 0 0 0 1px var(--tint-rim-floor);

  --lens-fill: rgb(87 116 249 / 0.2);
  --lens-label: #FFFFFF;
  --lens-crescent: .30;
  --lens-body: .06;
  --lens-band: 6 7 13; --lens-band-a: .30;
  --lens-drop: rgb(var(--lens-band) / calc(var(--lens-band-a) * 1.6));   /* Evening: as before (a near-black band, already neutral) */
  --lens-catch: .50;
  --lens-key: .80;
  --lens-caustic: 165 184 255; --lens-caustic-a: .55;
  --lens-fill-strong: rgb(31 47 87 / 0.8);
  --lens-backdrop: blur(1.5px) saturate(1.3) brightness(.98);

  --control-catch: .10;
  --hover-on-glass: rgb(255 255 255 / .07);
  --hover-on-sheet: rgb(255 255 255 / .04);
  --late-solid: #CA0E33;
  --switch-off: #686C7F;
  --check-border: #838799;
  --skel: #1B263E; --skel-hi: #24314C;

  --sheet-fill: var(--sheet);
}

/* ---------- glass level: more (sheets become tinted frost, glass a little clearer) ---------- */
html[data-glass="more"] {
  --glass-fill-lift: initial; --glass-core-lift: initial;   /* W2: lifted glass = this level's glass */
  --glass-fill: rgb(242 246 255 / 0.2); --glass-core: rgb(246 248 255 / 0.28);   /* W2b: = standard (body ~.42); more.css restates these and the lift values */
  --glass-blur: 14px;
  --sheet-fill: rgb(249 250 253 / 0.78);
  --sheet-backdrop: blur(24px) saturate(1.5);
}
html[data-glass="more"][data-theme="dark"] {
  --glass-fill: rgb(22 33 58 / 0.22); --glass-core: rgb(22 33 58 / 0.12);   /* W2b: = standard (body ~.31) */
  --sheet-fill: rgb(22 32 55 / 0.8);
}
/* R1 fix (QA-R1 F-7): Daylight frost lets the ground through, so amber words on --warn-bg (status «Нужны уточнения»,
   «ждёт подтверждения») fell to 4.46-4.49 at this level; one step deeper keeps them above 4.5 (about 5.3 on the measured field). */
html[data-glass="more"][data-theme="light"] { --warn-text: #804811; }
/* FIX-core: the same for accent words (links «Все», «В работе»): on the phone the frost over the teal light of the lower right
   corner gave p02 3.97 for the dashboard group link; the press step of the accent (#0E57B8) keeps them above 4.5 there.
   R3: in the Turon palette the same role is blue-800 #112DB3 (9.4:1 on the platter). */
html[data-glass="more"][data-theme="light"] { --text-accent: #112DB3; }

/* ---------- glass level: solid (near-opaque fills, rims kept) ---------- */
html[data-glass="solid"] {
  --glass-fill-lift: initial; --glass-core-lift: initial;
  --glass-fill: #F9FAFD; --glass-core: transparent;
  --glass-backdrop: none;
  --lens-backdrop: none;
  --lens-fill: rgb(87 116 249 / 0.12);
  --tint-fill: linear-gradient(180deg, #1D3BCC, #1634C0);
  --tint-fill-hover: linear-gradient(180deg, #112DB3, #0B26A6);
}
html[data-glass="solid"] { --glass-sheen: .34; --glass-top: .22; }   /* W2: R1-F1 is a standard-level change; solid keeps the old light */
html[data-glass="solid"][data-theme="dark"] {
  --glass-sheen: .10; --glass-top: .07; --rim-key: .70;
  --glass-fill: #1D2942;
  --lens-fill: rgb(87 116 249 / 0.2);
  --tint-fill: linear-gradient(180deg, #4665EF, #3F5EE9);   /* R3: the Evening action (blue 550 to 575), as at the standard level */
  --tint-fill-hover: linear-gradient(180deg, #4B69F4, #4665EF);
}

/* ---------- the phone shell (<=900px): page title 24/30 ---------- */
@media (max-width: 900px) {
  :root { --t-page: 1.5rem; --lh-page: 1.875rem; }
}

/* ---------- phones: lighter optics (blur <= 12px) ---------- */
@media (max-width: 640px) {
  :root { --pad-sheet: 16px; --gutter: 12px; }
  :root, html[data-theme="light"], html[data-theme="dark"] { --glass-blur: 12px; }
  html[data-glass="more"] { --glass-blur: 10px; --sheet-backdrop: blur(16px) saturate(1.4); }
}
/* touch: 44px controls */
@media (pointer: coarse) {
  :root { --ctl-h: 44px; --ctl-h-sm: 36px; --row-h: 56px; }
}

/* ---------- user preferences ---------- */
/* less transparency = the solid level, whatever data-glass says */
@media (prefers-reduced-transparency: reduce) {
  :root, html[data-theme="light"], html[data-theme="dark"], html[data-glass] { --glass-fill-lift: initial; --glass-core-lift: initial; }
  :root, html[data-theme="light"], html[data-glass] { --glass-fill: #F9FAFD; --glass-backdrop: none; --lens-backdrop: none; --sheet-fill: var(--sheet); --sheet-backdrop: none; }
  html[data-theme="dark"], html[data-theme="dark"][data-glass] { --glass-fill: #1D2942; --sheet-fill: var(--sheet); }
}
/* more contrast: solid surfaces, real hairlines, secondary text one step darker */
@media (prefers-contrast: more) {
  :root, html[data-theme="light"], html[data-glass] {
    --glass-fill-lift: initial; --glass-core-lift: initial;
    --glass-fill: #FFFFFF; --glass-backdrop: none; --lens-backdrop: none; --sheet-fill: var(--sheet); --sheet-backdrop: none;
    --text-2: #3B3E51; --text-3: #525569; --sheet-hairline: rgb(24 27 33 / .40); --control-hairline: rgb(24 27 33 / .55);
    --rim-base: 0; --glass-shadow: 0 0 0 1px #181B21; --lens-fill: rgb(87 116 249 / 0.22); --lens-label: #061F99;
  }
  html[data-theme="dark"], html[data-theme="dark"][data-glass] {
    --glass-fill-lift: initial; --glass-core-lift: initial;
    --glass-fill: #10182B; --text-2: #DCDFE9; --text-3: #C5C8D6; --sheet-hairline: rgb(255 255 255 / .45);
    --control-hairline: rgb(255 255 255 / .55); --glass-shadow: 0 0 0 1px #F2F3F7; --lens-label: #FFFFFF;
  }
}
/* reduced motion: state changes become instant (lg.js also skips the spring) */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 1ms; --dur-2: 1ms; --dur-3: 1ms; --dur-4: 1ms; --ease-spring: linear; }
}
/* ==========================================================================
   Turon TZ world - base.css
   Reset (scoped to .tz-world in the product), the ground (field of light + coverage rings), typography, focus,
   selection, scrollbars, utilities. Needs tokens.css first.
   The page head links:  https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Inter+Tight:wght@400;500;600&display=swap
   ========================================================================== */

/* product patch (F4): in the product this sheet shares the page with the legacy shell, so the resets are scoped.
   Global stay ONLY: the ground (html background + body::before), [hidden], the scrollbar theme, and class utilities.
   Everything that names a bare element applies only inside a world root: an element with class "tz-world" or any
   descendant of one. The scope is written :where(.tz-world, .tz-world *) so it adds no specificity: every rule weighs
   exactly what it weighed in the prototype. Put "tz-world" on section roots (and on body for an all-world page);
   a nested root resets font and colour to the page values. */
html { background: var(--ground); }
:where(.tz-world) {
  font: var(--w-regular) var(--t-body)/1.5 var(--font-text);
  color: var(--text-1);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
:where(body.tz-world) { margin: 0; min-height: 100vh; min-height: 100dvh; background: transparent; }
:where(.tz-world, .tz-world *), :where(.tz-world, .tz-world *)::before, :where(.tz-world, .tz-world *)::after { box-sizing: border-box; }
:is(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol):where(.tz-world, .tz-world *) { margin: 0; }
:is(ul, ol)[role="list"]:where(.tz-world, .tz-world *), .list-reset { list-style: none; padding: 0; }
:is(img, video, canvas):where(.tz-world, .tz-world *) { display: block; max-width: 100%; }
svg:where(.tz-world, .tz-world *) { flex-shrink: 0; }
:is(button, input, select, textarea):where(.tz-world, .tz-world *) { font: inherit; color: inherit; letter-spacing: inherit; }
button:where(.tz-world, .tz-world *) { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
button:disabled:where(.tz-world, .tz-world *), [aria-disabled="true"]:where(.tz-world, .tz-world *) { cursor: not-allowed; }
a:where(.tz-world, .tz-world *) { color: var(--text-accent); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover:where(.tz-world, .tz-world *) { text-decoration-thickness: 2px; }
table:where(.tz-world, .tz-world *) { border-collapse: collapse; }
[hidden] { display: none !important; }

/* ---------- the ground: field of light + coverage rings (fixed, static, one paint) ----------
   --ground-paint is the whole field as one background list, so the scroll-edge layers under the floating bars
   (components.css, .tz-has-tabbar / .tz-has-topbar) repaint exactly the same field and content dissolves into it. */
html {
  --ground-paint:
    var(--ground-rings) 0 0 / 100% 100% no-repeat,
    radial-gradient(70vw 70vw at 0% 0%, rgb(var(--light-1) / var(--light-1-a)) 0%, rgb(var(--light-1) / calc(var(--light-1-a) * .55)) 38%, rgb(var(--light-1) / 0) 72%),
    radial-gradient(62vw 56vw at 100% 100%, rgb(var(--light-2) / var(--light-2-a)) 0%, rgb(var(--light-2) / calc(var(--light-2-a) * .5)) 40%, rgb(var(--light-2) / 0) 74%),
    var(--ground);
}
@media (max-width: 640px) {
  html {
    --ground-paint:
      var(--ground-rings) 0 0 / 100% 100% no-repeat,
      radial-gradient(120vw 90vh at 0% 0%, rgb(var(--light-1) / var(--light-1-a)) 0%, rgb(var(--light-1) / calc(var(--light-1-a) * .5)) 40%, rgb(var(--light-1) / 0) 75%),
      radial-gradient(110vw 70vh at 100% 100%, rgb(var(--light-2) / var(--light-2-a)) 0%, rgb(var(--light-2) / 0) 72%),
      var(--ground);
  }
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: var(--z-ground); pointer-events: none;
  background: var(--ground-paint);
}
@media (forced-colors: active) { html { --ground-paint: Canvas; } body::before { background: Canvas; } }

/* ---------- typography ---------- */
.t-xs   { font-size: var(--t-xs);   line-height: 1.35; font-weight: var(--w-medium); letter-spacing: .01em; }
.t-sm   { font-size: var(--t-sm);   line-height: 1.35; font-weight: var(--w-medium); }
.t-ui   { font-size: var(--t-ui);   line-height: 1.4;  font-weight: var(--w-medium); }
.t-body { font-size: var(--t-body); line-height: 1.5; }
.t-h4   { font-size: var(--t-h4);   line-height: 1.3;  font-weight: var(--w-medium); letter-spacing: -.005em; }
/* R2 (LEAD-FIX shared 2): one family, Inter only, no negative tracking (KIT 2: «Цифра» 32/36 Medium) */
.t-h3   { font: var(--w-medium) var(--t-h3)/1.25 var(--font-text); letter-spacing: 0; }
.t-h2   { font: var(--w-medium) var(--t-h2)/1.2 var(--font-text); letter-spacing: 0; }
.t-num  { font: var(--w-medium) var(--t-num)/var(--lh-num) var(--font-text); letter-spacing: 0; }
.t-hero { font: var(--w-medium) var(--t-hero)/1 var(--font-text); letter-spacing: 0; }
/* R2 (LEAD-FIX shared 4): nothing heavier than Medium, also where nobody set a weight; zero specificity, so an owner's
   explicit rule still wins */
:where(b, strong) { font-weight: var(--w-medium); }
.t-h2, .t-h3, .t-h4 { text-wrap: balance; }
.c-1 { color: var(--text-1); } .c-2 { color: var(--text-2); } .c-3 { color: var(--text-3); } .c-accent { color: var(--text-accent); }
.prose { max-width: 68ch; }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }   /* aligned or ticking numbers */
.pnum { font-variant-numeric: proportional-nums; }                                                 /* a single hero figure */

/* ---------- browser surfaces ---------- */
/* product patch (F4): scoped to world roots, same specificity as before */
:where(.tz-world, .tz-world *)::selection { background: var(--selection); color: var(--text-1); }
:is(input, textarea):where(.tz-world, .tz-world *) { caret-color: var(--text-accent); }
:where(.tz-world, .tz-world *)::placeholder { color: var(--text-2); opacity: 1; }   /* R2 LEAD-FIX shared 7: no --text-3 text on glass */

:where(.tz-world, .tz-world *):focus { outline: none; }
:where(.tz-world, .tz-world *):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-halo);
}

html { scrollbar-color: var(--scroll-thumb) transparent; scrollbar-width: thin; }
.scroll { overflow: auto; scrollbar-color: var(--scroll-thumb) transparent; scrollbar-width: thin; overscroll-behavior: contain; }
/* WebKit (Safari, Chrome < 121) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- utilities ---------- */
.sr-only, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: var(--z-tooltip); padding: 8px 14px; border-radius: var(--r-sm); background: var(--sheet); color: var(--text-1); box-shadow: var(--glass-shadow); }
.skip-link:focus-visible { top: 12px; }
.ic { display: inline-block; vertical-align: -.2em; flex: none; }   /* size comes from the width/height attributes (icons.js) */
.ic--sm { width: var(--icon-sm); height: var(--icon-sm); }
.ic--lg { width: var(--icon-lg); height: var(--icon-lg); }
.nowrap { white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {   /* product patch (F4): scoped to world roots */
  :where(.tz-world, .tz-world *), :where(.tz-world, .tz-world *)::before, :where(.tz-world, .tz-world *)::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  :where(.tz-world, .tz-world *):focus-visible { outline: 2px solid Highlight; box-shadow: none; }
}

/* product patch (F4): printing (Ctrl+P on any page). Bars, tab bar, popovers, toasts and the ground are hidden;
   world sections print black on white, sheets white with a hairline and no shadow; data marks keep their colour. */
@media print {
  html, body { background: #fff !important; }
  body::before, .tz-has-topbar::after, .tz-has-tabbar::after,
  .tz-topbar, .tz-tabbar, .tz-sidebar, .tz-rail, .tz-pop, .tz-toasts, .tz-tip, .skip-link { display: none !important; }
  :where(.tz-world, .tz-world *), :where(.tz-world, .tz-world *)::before, :where(.tz-world, .tz-world *)::after {
    color: #000 !important; -webkit-text-fill-color: #000 !important; text-shadow: none !important; box-shadow: none !important;
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
  :where(.tz-world, .tz-world *):not(.tz-stagebar__part, .tz-meter__bar > i, .tz-legend__key, .tz-legend__size > i, .tz-dot, .tz-mark > i, .tz-avatar__dot),
  :where(.tz-world, .tz-world *)::before, :where(.tz-world, .tz-world *)::after { background: transparent !important; }
  :where(.tz-world, .tz-world *) :is(text, tspan) { fill: #000 !important; }
  .tz-chart .today-band { fill: #ededed !important; }
  .tz-stagebar__part, .tz-meter__bar > i, .tz-legend__key, .tz-legend__size > i, .tz-dot, .tz-mark > i, .tz-avatar__dot { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tz-sheet { border: 1px solid #c4c4c4; break-inside: avoid; }
}
/* ==========================================================================
   Turon TZ world - glass.css
   T3 Liquid Glass: the material, the lit rim, refraction hook, the lens
   (selection drop), press feedback, materialize, and the fallback ladder.
   Every class here is prefixed lg-. Behaviour lives in lg.js.

   ANATOMY of a glass host (.lg-glass)
     host        no backdrop of its own; carries the outer shadow and the content
     ::before    the MATERIAL: tint + backdrop optics + inner light (z -1)
     .lg-band    (Safari/Firefox only, injected by lg.js) thick-edge band (z -1)
     .lg-lens    optional selection drop - a SIBLING of the material, so it
                 still sees the page behind (glass is never nested)   (z 0)
     content     labels, icons, controls with fills                   (z 1)
     ::after     the LIT RIM: key light top-left, second light bottom-right (z 3)
   Because the host itself never has backdrop-filter, it is never a Backdrop Root.
   ========================================================================== */

@property --lg-glow { syntax: "<number>"; inherits: true; initial-value: 0; }

/* ---------- the material ---------- */
.lg-glass {
  --lg-r: var(--r-xl);
  /* refraction parameters read by lg.js (Chromium only) */
  --lg-rim: 20; --lg-shift: 13; --lg-inner-blur: 3;
  --lg-tone: saturate(var(--glass-sat)) brightness(var(--glass-bright));
  --lg-fill: var(--glass-fill); --lg-core: var(--glass-core);   /* W2: the material reads these; they follow --glass-fill / --glass-core set on the element */
  --lg-sheen: var(--glass-sheen); --lg-top: var(--glass-top);
  position: relative;
  isolation: isolate;
  border-radius: var(--lg-r);
  box-shadow: var(--glass-shadow);
  color: var(--text-1);
  transition: transform var(--dur-4) var(--ease-spring), box-shadow var(--dur-2) var(--ease-std), --lg-glow var(--dur-4) var(--ease-out);
}
.lg-glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(circle var(--lg-glow-r, 72px) at var(--lg-px, 50%) var(--lg-py, 50%), rgb(var(--rim-hi) / var(--lg-glow)) 0%, rgb(var(--rim-hi) / 0) 100%),
    radial-gradient(120% 90% at 14% 0%, rgb(var(--rim-hi) / var(--lg-sheen)) 0%, rgb(var(--rim-hi) / 0) 56%),
    linear-gradient(180deg, rgb(var(--rim-hi) / var(--lg-top)) 0%, rgb(var(--rim-hi) / 0) 42%),
    radial-gradient(closest-side, var(--lg-core) 0%, var(--lg-core) 66%, transparent 100%),
    var(--lg-fill);
  -webkit-backdrop-filter: var(--glass-backdrop);
  backdrop-filter: var(--lg-filter, var(--glass-backdrop));
  box-shadow:
    inset 0 1px 0 0 rgb(var(--rim-hi) / var(--rim-catch)),
    inset 0 -1px 0 0 rgb(var(--rim-shade) / var(--rim-shade-a)),
    inset 0 -14px 20px -16px rgb(var(--gather) / var(--gather-a)),
    inset 0 16px 24px -22px rgb(var(--rim-hi) / var(--inner-glow));
}
/* the lit rim: never a uniform stroke - key light top-left, top edge, second light bottom-right */
.lg-glass::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  padding: var(--rim-w);
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--rim-hi) / var(--rim-key)) 0px, rgb(var(--rim-hi) / calc(var(--rim-key) * .45)) 90px, rgb(var(--rim-hi) / 0) 280px),
    radial-gradient(circle at 100% 100%, rgb(var(--rim-hi) / var(--rim-second)) 0px, rgb(var(--rim-hi) / 0) 150px),
    linear-gradient(180deg, rgb(var(--rim-hi) / var(--rim-top)) 0px, rgb(var(--rim-hi) / calc(var(--rim-top) * .2)) 36px, rgb(var(--rim-hi) / var(--rim-base)) 60%, rgb(var(--rim-hi) / calc(var(--rim-second) * .5)) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
:where(.lg-glass) > * { position: relative; z-index: 1; }
.lg-glass > .lg-lens, .lg-glass > .lg-band { position: absolute; }

/* shapes */
.lg-pill { --lg-r: var(--r-pill); }
.lg-r20 { --lg-r: var(--r-lg); }
.lg-r14 { --lg-r: var(--r-md); }
.lg-r10 { --lg-r: var(--r-sm); }

/* lifted (popovers, menus, toasts) */
.lg-lift { box-shadow: var(--glass-shadow-lift); }
/* W2 2026-11-11: lifted glass carries reading text over content, so at the standard level it keeps the denser body
   (--glass-fill-lift / --glass-core-lift); at the other levels and preferences those are unset and it follows the level. */
.lg-glass:is(.lg-lift, .tz-pop, .tz-tip, .tz-toast) { --lg-fill: var(--glass-fill-lift, var(--glass-fill)); --lg-core: var(--glass-core-lift, var(--glass-core)); --lg-sheen: var(--glass-sheen-lift, var(--glass-sheen)); --lg-top: var(--glass-top-lift, var(--glass-top)); }

/* ---------- tinted glass: the ONE primary action per screen ---------- */
.lg-tint {
  --glass-fill: var(--tint-fill); --glass-core: transparent;
  --glass-top: .06; --glass-sheen: .08;
  --glass-backdrop: blur(8px) saturate(1.5);
  --rim-key: .85; --rim-top: .50; --rim-second: .32; --rim-base: .10; --rim-catch: .42;
  --rim-shade: var(--tint-rim-shade); --rim-shade-a: .35;   /* R3: tokens (blue-950, blue-200); were 4 30 80 and 170 214 255 */
  --gather: var(--tint-glow); --gather-a: .45;
  --inner-glow: .22;
  --lg-tone: saturate(1.5) brightness(1);
  color: var(--text-on-accent);
  box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .14), 0 10px 22px -12px rgb(var(--shadow-rgb) / .28);   /* R2 (V1 C1): neutral, never blue */
}
.lg-tint:hover { --glass-fill: var(--tint-fill-hover); }
/* R3 rim: Evening lays a brighter floor under the lit rim (painted in the ring of ::after only, under its lights);
   Daylight has no --tint-rim-floor, so it stays transparent */
.lg-glass.lg-tint::after { background-color: var(--tint-rim-floor, transparent); }

/* ---------- clear glass (T3c): only over media, with a dimming layer under it ---------- */
.lg-clear {
  --glass-fill: rgb(2 5 17 / .22); --glass-core: transparent;   /* R3: the navy of the Evening scrim (was 8 14 26) */ --glass-top: .06; --glass-sheen: .10;
  --glass-backdrop: blur(3px) saturate(1.3) brightness(.55);   /* the dimming layer is in the optics: white text 5:1 over a white frame */
  --lg-tone: saturate(1.3) brightness(.55);                      /* same dimming when the clear glass refracts */
  --rim-key: .9; --rim-top: .55; --rim-second: .35; --rim-base: .12; --rim-catch: .55;
  color: #FFFFFF;
}

/* ---------- refraction hook (Chromium) ----------
   lg.js writes --lg-filter: url(#lg-rf-WxH-...) <tone> on [data-lg-refract] elements.
   The url() is never written into the stylesheet (Safari would drop the whole declaration). */
[data-lg-refract].lg-slab { --lg-rim: 24; --lg-shift: 16; --lg-inner-blur: 3.5; }
.tz-topbar[data-lg-refract] { --lg-inner-blur: 8; }   /* floats over scrolling content: more body blur */

/* ---------- Safari / Firefox: the thick-edge band (two sibling backdrop layers, never nested) ---------- */
.lg-glass > .lg-band {
  inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  --b: 14px;
  -webkit-backdrop-filter: var(--band-tone);
  backdrop-filter: var(--band-tone);
  background: rgb(var(--rim-hi) / .03);
  -webkit-mask: linear-gradient(to bottom, #000, transparent var(--b)), linear-gradient(to top, rgb(0 0 0 / .4), transparent var(--b)), linear-gradient(to right, #000, transparent var(--b)), linear-gradient(to left, rgb(0 0 0 / .4), transparent var(--b));
  mask: linear-gradient(to bottom, #000, transparent var(--b)), linear-gradient(to top, rgb(0 0 0 / .4), transparent var(--b)), linear-gradient(to right, #000, transparent var(--b)), linear-gradient(to left, rgb(0 0 0 / .4), transparent var(--b));
}

/* ==========================================================================
   THE LENS - one drop of glass that marks the current selection.
   Host: any element with [data-lens] (plus position). Items: .lg-lens-item.
   Selected item: aria-selected / aria-current / aria-pressed / aria-checked = true, or .is-selected.
   ========================================================================== */
[data-lens] { position: relative; }
.lg-lens {
  --lg-rim: 12; --lg-shift: 8; --lg-inner-blur: .6; --lg-tone: saturate(1.9) brightness(1.08);
  position: absolute; left: 0; top: 0; z-index: 0;
  width: 0; height: 0;
  pointer-events: none;
  visibility: hidden;
  border-radius: var(--lens-r, var(--r-pill));
  transform-origin: 50% 50%;
  will-change: transform;
  /* a convex drop: bright body centre, darker towards the bottom edge, a crisp top crescent, a caustic line at the bottom */
  background:
    radial-gradient(70% 38% at 50% 6%, rgb(255 255 255 / var(--lens-crescent)) 0%, rgb(255 255 255 / 0) 100%),
    radial-gradient(130% 115% at 50% 18%, rgb(255 255 255 / var(--lens-body)) 0%, rgb(255 255 255 / 0) 52%, rgb(var(--lens-band) / calc(var(--lens-band-a) * .55)) 82%, rgb(var(--lens-band) / var(--lens-band-a)) 100%),
    var(--lens-fill);
  -webkit-backdrop-filter: var(--lens-backdrop);
  backdrop-filter: var(--lg-filter, var(--lens-backdrop));
  box-shadow:
    inset 0 1.5px 0 0 rgb(255 255 255 / var(--lens-catch)),
    inset 0 6px 8px -6px rgb(255 255 255 / calc(var(--lens-catch) * .8)),
    inset 0 -1.5px 1.5px -.5px rgb(var(--lens-caustic) / var(--lens-caustic-a)),
    0 0 0 .5px rgb(var(--lens-band) / calc(var(--lens-band-a) * .9)),
    0 1px 1px rgb(var(--shadow-rgb) / .10),
    0 4px 10px -4px var(--lens-drop, rgb(var(--shadow-rgb) / .14));   /* R2 (LEAD-FIX shared 6): no accent-blue drop */
}
.lg-lens::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgb(255 255 255 / var(--lens-key)) 0px, rgb(255 255 255 / calc(var(--lens-key) * .4)) 22px, rgb(255 255 255 / 0) 64px),
    linear-gradient(180deg, rgb(255 255 255 / calc(var(--lens-key) * .6)) 0%, rgb(255 255 255 / 0) 40%, rgb(255 255 255 / 0) 70%, rgb(var(--lens-caustic) / calc(var(--lens-caustic-a) * .8)) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
html[data-theme="dark"] .lg-lens { --lg-tone: saturate(1.3) brightness(.98); }
/* a lens whose bar floats over scrolling content carries a dense body, so its label keeps 4.5:1 whatever passes beneath */
.tz-tabbar > .lg-lens, .tz-topbar .lg-lens { --lens-fill: var(--lens-fill-strong); --lg-tone: saturate(1.1) brightness(1); --lg-inner-blur: 3; --lens-backdrop: blur(3px) saturate(1.1); }
/* QA-M1 Q6 / DECISIONS 2026-11-12 item 7: on phones a lens has no backdrop of its own (three backdrop layers per screen);
   it lies on its inset fill with the highlight edge. One rule for every lens, also under an inline --lg-filter. */
@media (max-width: 767px) {
  .lg-lens, [data-lens] > .lg-lens { --lens-backdrop: none; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
.lg-lens.is-placed { visibility: visible; }

.lg-lens-item { position: relative; z-index: 1; color: var(--text-2); transition: color var(--dur-2) var(--ease-std), font-weight 0s linear; }
.lg-lens-item > * { transition: transform var(--dur-3) var(--ease-spring), color var(--dur-2) var(--ease-std); }
/* the item the lens travels TO takes its colour and magnification as the drop arrives (~120 ms in); the one it leaves lets go at once */
.lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"], [aria-checked="true"], .is-selected),
.lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"], [aria-checked="true"], .is-selected) > * { transition-delay: 120ms; }
.lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"], [aria-checked="true"], .is-selected) { color: var(--lens-label); }
.lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"], [aria-checked="true"], .is-selected) > :not(.lg-nomag) { transform: scale(1.06); }
/* filled icon variant only inside the lens */
.lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"], [aria-checked="true"], .is-selected) svg .f { fill: currentColor; fill-opacity: .16; }
/* before lg.js runs (or without JS) the selected item still shows a static drop */
[data-lens]:not(.is-lens-ready) > .lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"], [aria-checked="true"], .is-selected),
[data-lens]:not(.is-lens-ready) .lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"]) {
  background: var(--lens-fill); box-shadow: inset 0 1px 0 rgb(255 255 255 / var(--lens-catch)); border-radius: var(--lens-r, var(--r-pill));
}
/* a lens inside a glass host must not be clipped by it */
.lg-glass > .lg-lens { z-index: 0; }

/* ---------- press feedback: gel squash + inner glow (lg.js adds .is-pressed and --lg-px/--lg-py) ---------- */
.lg-press, .tz-btn, .tz-iconbtn { transition: transform var(--dur-4) var(--ease-spring), --lg-glow var(--dur-4) var(--ease-out), background-color var(--dur-1) var(--ease-std), color var(--dur-2) var(--ease-std), box-shadow var(--dur-2) var(--ease-std); }
:is(.lg-press, .tz-btn, .tz-iconbtn).is-pressed {
  transform: scale(var(--press-sx, 1.035), var(--press-sy, .94));
  --lg-glow: .42;
  transition-duration: var(--dur-1), 60ms, var(--dur-1), var(--dur-2), var(--dur-2);
  transition-timing-function: var(--ease-out);
}
:is(.lg-press, .tz-btn, .tz-iconbtn):is(:disabled, [aria-disabled="true"], [aria-busy="true"]).is-pressed { transform: none; --lg-glow: 0; }
html[data-theme="dark"] :is(.lg-press, .tz-btn, .tz-iconbtn).is-pressed { --lg-glow: .28; }
html[data-theme] .lg-tint.is-pressed, .lg-tint.is-pressed { --glass-fill: var(--tint-fill-hover); --lg-glow: .06; --rim-key: 1; --rim-top: .78; --rim-second: .5; --rim-base: .28; --rim-catch: .62; --gather-a: .6; }   /* deeper fill + a lit rim: the press glows at the edge, the white label stays >= 4.5:1 */

/* ---------- materialize (popovers grow out of their button; lg.js runs it) ---------- */
.lg-mat-content { transition: opacity var(--dur-2) var(--ease-out); }
.is-materializing .lg-mat-content { opacity: 0; }

/* ==========================================================================
   Fallback ladder
   ========================================================================== */
/* 0. no backdrop-filter at all */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root, html[data-theme="light"] { --glass-fill: rgb(255 255 255 / .94); --glass-core: transparent; --glass-fill-lift: initial; --glass-core-lift: initial; }
  html[data-theme="dark"] { --glass-fill: rgb(22 33 58 / 0.95); --glass-core: transparent; --glass-fill-lift: initial; --glass-core-lift: initial; }
}
/* 1. low-end switch (lg.js sets html.lg-low; ?lg=low): one cheap blur, no band, no refraction */
html.lg-low .lg-glass::before { -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5) !important; backdrop-filter: blur(var(--glass-blur)) saturate(1.5) !important; }
html.lg-low .lg-lens { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lg-low .lg-band { display: none; }
/* 2. solid level / reduced transparency / more contrast: no optics at all, rims kept */
html[data-glass="solid"] .lg-glass::before, html[data-glass="solid"] .lg-lens,
html.lg-opaque .lg-glass::before, html.lg-opaque .lg-lens { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html[data-glass="solid"] .lg-band, html.lg-opaque .lg-band { display: none; }
@media (prefers-reduced-transparency: reduce) {
  .lg-glass::before, .lg-lens { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .lg-band { display: none; }
}
@media (prefers-contrast: more) {
  .lg-glass::before, .lg-lens { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .lg-band { display: none; }
  .lg-glass::before { background: var(--glass-fill); box-shadow: none; }
  .lg-lens { box-shadow: inset 0 0 0 1.5px var(--lens-label); }
}
/* 3. Windows High Contrast */
@media (forced-colors: active) {
  .lg-glass { border: 1px solid CanvasText; box-shadow: none; }
  .lg-glass::before { background: Canvas; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none; }
  .lg-glass::after, .lg-band, .lg-lens { display: none; }
  .lg-lens-item:is([aria-selected="true"], [aria-current]:not([aria-current="false"]), [aria-pressed="true"], [aria-checked="true"], .is-selected) { outline: 2px solid Highlight; outline-offset: -2px; color: CanvasText; }
  .lg-tint { background: ButtonText; color: ButtonFace; forced-color-adjust: none; }
}
/* 4. reduced motion: no squash, no spring (lg.js moves the lens instantly) */
@media (prefers-reduced-motion: reduce) {
  :is(.lg-press, .tz-btn, .tz-iconbtn).is-pressed { transform: none; }
  .lg-lens-item > * { transition: none; }
  .lg-lens-item, .lg-lens-item > * { transition-delay: 0s !important; }
}
/* ==========================================================================
   Turon TZ world - components.css
   Needs tokens.css, base.css, glass.css. Classes are prefixed tz-.
   Glass components carry .lg-glass in their markup (see WORLD.md snippets).
   ========================================================================== */

/* ---------- layout helpers ---------- */
.tz-grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.tz-stack { display: grid; gap: var(--gutter); align-content: start; }
.tz-row-flex { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* ==========================================================================
   T1 content sheet + T2 inset well
   ========================================================================== */
.tz-sheet {
  position: relative; isolation: isolate;
  background: var(--sheet-fill);
  border-radius: var(--r-lg);
  box-shadow: var(--sheet-shadow), inset 0 0 0 1px var(--sheet-hairline);
  padding: var(--pad-sheet);
  color: var(--text-1);
  min-width: 0;
}
html[data-glass="more"] .tz-sheet { background: transparent; }
html[data-glass="more"] .tz-sheet::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--sheet-fill);
  -webkit-backdrop-filter: var(--sheet-backdrop); backdrop-filter: var(--sheet-backdrop);
}
.tz-sheet--flush { padding: var(--sp-3) var(--sp-2); }
.tz-sheet--flush > .tz-sheet__head { padding: var(--sp-1) var(--sp-3) 0; }
.tz-sheet__head { display: flex; align-items: center; gap: var(--sp-3); min-height: 32px; margin-bottom: var(--sp-3); }
.tz-sheet__title { display: flex; align-items: baseline; gap: var(--sp-2); font: var(--w-medium) var(--t-h4)/1.3 var(--font-text); letter-spacing: 0; color: var(--text-1); text-wrap: balance; }   /* R2 (LEAD-FIX shared 5) */
.tz-sheet__sub { font: var(--w-medium) var(--t-sm)/1.35 var(--font-text); color: var(--text-2); }
.tz-sheet__actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.tz-count { font: var(--w-medium) var(--t-ui)/1 var(--font-text); color: var(--text-2); font-variant-numeric: tabular-nums; }
.tz-sheet__foot { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--divider); }

.tz-well { background: var(--well); border-radius: var(--r-control); box-shadow: inset 0 0 0 1px var(--well-hairline); padding: var(--sp-3); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.tz-btn {
  --btn-h: var(--ctl-h);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: var(--btn-h); padding: 0 18px;
  border-radius: var(--r-control);   /* R2: buttons are radius 10; capsules only on the glass control layers (below) */
  font: var(--w-medium) var(--t-ui)/1 var(--font-text);
  white-space: nowrap; text-decoration: none; user-select: none; -webkit-user-select: none;
  color: var(--text-1);
}
.tz-btn > .ic { width: 18px; height: 18px; margin-left: -2px; }
.tz-btn--sm { --btn-h: var(--ctl-h-sm); padding: 0 14px; font-size: var(--t-sm); }
.tz-btn--sm > .ic { width: 16px; height: 16px; }
.tz-btn--lg { --btn-h: 48px; padding: 0 22px; font-size: var(--t-body); }

/* primary = the one tinted glass capsule:  class="tz-btn tz-btn--primary lg-glass lg-tint" */
.tz-btn--primary { --lg-r: var(--r-control); padding: 0 20px; color: var(--text-on-accent); }
.tz-btn--primary:hover { box-shadow: 0 1px 2px rgb(var(--shadow-rgb) / .16), 0 14px 26px -12px rgb(var(--shadow-rgb) / .32); }   /* R2 (V1 C1): neutral */
.tz-btn--primary:is(:disabled, [aria-disabled="true"]):not([aria-busy="true"]) {
  --glass-fill: var(--neutral-bg); --rim-key: .5; --rim-top: .3; --gather-a: 0; --rim-shade-a: .05;
  color: var(--text-disabled); box-shadow: var(--glass-shadow);
}
.tz-btn--primary .tz-btn__sep { width: 1px; align-self: stretch; margin: 10px 2px; background: rgb(255 255 255 / .35); }

/* secondary: a filled control (allowed on glass and on sheets) */
.tz-btn--secondary, .tz-iconbtn--fill {
  background:
    radial-gradient(circle 60px at var(--lg-px, 50%) var(--lg-py, 50%), rgb(var(--rim-hi) / calc(var(--lg-glow) * .9)), rgb(var(--rim-hi) / 0)),
    var(--control-fill);
  box-shadow: inset 0 0 0 1px var(--control-hairline), inset 0 1px 0 rgb(255 255 255 / var(--control-catch)), 0 1px 2px rgb(var(--shadow-rgb) / .06);
  color: var(--text-1);
}
.tz-btn--secondary:hover, .tz-iconbtn--fill:hover { background-color: var(--control-fill-hover); box-shadow: inset 0 0 0 1px var(--control-hairline), inset 0 1px 0 rgb(255 255 255 / var(--control-catch)), 0 2px 6px rgb(var(--shadow-rgb) / .10); }
html[data-theme="light"] .tz-btn--secondary:hover, html[data-theme="light"] .tz-iconbtn--fill:hover { background: radial-gradient(circle 60px at var(--lg-px, 50%) var(--lg-py, 50%), rgb(var(--accent-glow) / calc(var(--lg-glow) * .35)), rgb(var(--accent-glow) / 0)), #FFFFFF; }
html[data-theme="dark"] .tz-btn--secondary:hover, html[data-theme="dark"] .tz-iconbtn--fill:hover { background: radial-gradient(circle 60px at var(--lg-px, 50%) var(--lg-py, 50%), rgb(255 255 255 / calc(var(--lg-glow) * .5)), rgb(255 255 255 / 0)), var(--control-fill-hover); }

/* ghost: no fill until hover */
.tz-btn--ghost, .tz-iconbtn--ghost { background: radial-gradient(circle 60px at var(--lg-px, 50%) var(--lg-py, 50%), rgb(var(--rim-hi) / calc(var(--lg-glow) * .7)), rgb(var(--rim-hi) / 0)); color: var(--text-1); }
.tz-btn--ghost:hover, .tz-iconbtn--ghost:hover { background-color: var(--hover-on-sheet); }
.lg-glass .tz-btn--ghost:hover, .lg-glass .tz-iconbtn--ghost:hover { background-color: var(--hover-on-glass); }
.tz-btn--accent-text { color: var(--text-accent); }

/* disabled / loading */
.tz-btn:is(:disabled, [aria-disabled="true"]):not(.tz-btn--primary):not([aria-busy="true"]), .tz-iconbtn:is(:disabled, [aria-disabled="true"]):not([aria-busy="true"]) { color: var(--text-disabled); box-shadow: inset 0 0 0 1px var(--control-hairline); background: transparent; }
.tz-btn[aria-busy="true"] { cursor: progress; }
.tz-btn[aria-busy="true"] > .ic { display: none; }
.tz-spin { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid currentColor; border-right-color: transparent; opacity: .9; animation: tz-spin .8s linear infinite; margin-left: -2px; }
@keyframes tz-spin { to { transform: rotate(1turn); } }

/* hit-area expansion for small controls on touch screens (every target reaches 44px) */
@media (pointer: coarse) {
  .tz-btn--sm:not(.lg-glass)::after, .tz-chip--filter::after { content: ""; position: absolute; inset: -4px -2px; }
  .tz-iconbtn--32:not(.lg-glass)::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
  a.tz-fig { min-height: 44px; align-items: center; margin-block: 0; }
  .tz-check, .tz-switch { min-height: 44px; }
  .tz-menu__item { min-height: 44px; }
}

/* ---------- round icon button 40 / 44 ----------
   floating:  class="tz-iconbtn lg-glass"      on glass or a sheet: class="tz-iconbtn tz-iconbtn--fill" */
.tz-iconbtn {
  --ib: var(--ctl-h);
  position: relative; display: inline-grid; place-items: center;
  width: var(--ib); height: var(--ib); border-radius: var(--r-control); flex: none;
  color: var(--text-1); text-decoration: none;
}
.tz-iconbtn.lg-glass { --lg-r: var(--r-capsule); border-radius: var(--r-capsule); }   /* a floating glass button is itself a control layer */
/* R2: the glass control layers keep their capsules, and so do the buttons that sit in them */
:is(.tz-topbar, .tz-tabbar, .tz-quick, .tz-toast) :is(.tz-btn, .tz-iconbtn) { --lg-r: var(--r-capsule); border-radius: var(--r-capsule); }
.tz-iconbtn--44 { --ib: 44px; }
.tz-iconbtn--32 { --ib: 32px; }
.tz-iconbtn > .ic { width: 20px; height: 20px; }
.tz-iconbtn--accent { background: var(--tint-fill); color: var(--text-on-accent); box-shadow: var(--tint-ring, 0 0 #0000), inset 0 1px 0 rgb(255 255 255 / .38), inset 0 -6px 12px -8px rgb(var(--tint-glow) / .55), 0 4px 10px -5px rgb(var(--shadow-rgb) / .28); }   /* R2 (V1 C1): neutral */
.tz-iconbtn--accent:hover { background: var(--tint-fill-hover); }
.tz-iconbtn__badge {
  position: absolute; top: 2px; right: 1px; z-index: 4;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--late-solid); color: #FFFFFF;
  font: var(--w-medium) var(--t-xs)/1 var(--font-text); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--sheet);
}

/* ==========================================================================
   Quick task entry capsule (W9): voice or text
   ========================================================================== */
.tz-quick {
  --lg-r: var(--r-pill);
  display: flex; align-items: center; gap: 6px;
  height: 56px; padding: 6px 6px 6px 20px;
}
.tz-quick > .ic { width: 20px; height: 20px; color: var(--text-2); margin-right: 4px; }
.tz-quick__input {
  flex: 1 1 auto; width: 0; min-width: 0; height: 44px; border: 0; padding: 0; background: transparent;   /* width 0: never widens the capsule */
  font: var(--w-regular) var(--t-body)/1.5 var(--font-text); color: var(--text-1);
}
.tz-quick__input:focus-visible { outline: none; box-shadow: none; }
.tz-quick__input::placeholder { color: var(--text-2); }   /* never text-3 on glass */
.tz-quick:focus-within { box-shadow: var(--glass-shadow-lift), 0 0 0 2px var(--focus), 0 0 0 6px var(--focus-halo); }
.tz-quick:has(.tz-quick__input:placeholder-shown) .tz-quick__send { background: var(--control-fill); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--control-hairline); }
.tz-quick__status { font: var(--w-medium) var(--t-sm)/1 var(--font-text); color: var(--late-text); display: none; align-items: center; gap: 6px; padding-right: 6px; }
.tz-quick.is-listening .tz-quick__status { display: inline-flex; }
.tz-quick.is-listening .tz-quick__mic { background: var(--late-bg); color: var(--late-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--late) 30%, transparent); }
.tz-quick__level { display: inline-flex; gap: 2px; align-items: center; height: 14px; }
.tz-quick__level i { width: 3px; border-radius: 2px; background: currentColor; height: 6px; animation: tz-level .9s ease-in-out infinite alternate; }
.tz-quick__level i:nth-child(2) { animation-delay: -.3s; } .tz-quick__level i:nth-child(3) { animation-delay: -.6s; }
@keyframes tz-level { to { height: 14px; } }
.tz-quick--hero { height: 64px; padding-left: 24px; }
.tz-quick--hero .tz-quick__input { font-size: var(--t-h4); }
.tz-quick--hero .tz-iconbtn { --ib: 48px; }

/* ==========================================================================
   Chips
   ========================================================================== */
.tz-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  height: var(--chip-h); padding: 0 10px 0 8px;
  border-radius: var(--r-tag);   /* R2: a tag, not a pill */
  font: var(--w-medium) var(--t-sm)/1 var(--font-text); white-space: nowrap;
  background: var(--neutral-bg); color: var(--neutral-text);
}
.tz-chip > .ic { width: 14px; height: 14px; }
.tz-chip--ok     { background: var(--ok-bg);     color: var(--ok-text); }
.tz-chip--warn   { background: var(--warn-bg);   color: var(--warn-text); }
.tz-chip--late   { background: var(--late-bg);   color: var(--late-text); }
.tz-chip--review { background: var(--review-bg); color: var(--review-text); }
.tz-chip--neutral { background: var(--neutral-bg); color: var(--neutral-text); }
/* more level: the sheet is frost, so a status chip carries its own solid sheet under the tone (contrast as on the standard level) */
html[data-glass="more"] .tz-chip--ok { background: linear-gradient(var(--ok-bg), var(--ok-bg)), var(--sheet); }
html[data-glass="more"] .tz-chip--warn { background: linear-gradient(var(--warn-bg), var(--warn-bg)), var(--sheet); }
html[data-glass="more"] .tz-chip--late { background: linear-gradient(var(--late-bg), var(--late-bg)), var(--sheet); }
html[data-glass="more"] .tz-chip--review { background: linear-gradient(var(--review-bg), var(--review-bg)), var(--sheet); }
html[data-glass="more"] .tz-chip--neutral { background: linear-gradient(var(--neutral-bg), var(--neutral-bg)), var(--sheet); }
.tz-chip--plain { background: transparent; box-shadow: inset 0 0 0 1px var(--control-hairline); color: var(--text-2); }
.tz-chip__n { font-variant-numeric: tabular-nums; font-weight: var(--w-medium); }
/* interactive filter chip (multi-select toggle; selection of ONE option uses the lens instead) */
.tz-chip--filter {
  height: var(--ctl-h-sm); padding: 0 14px; cursor: pointer; border-radius: var(--r-control);
  background: var(--control-fill); color: var(--text-1);
  box-shadow: inset 0 0 0 1px var(--control-hairline);
  font-size: var(--t-ui);
  transition: background-color var(--dur-1) var(--ease-std), box-shadow var(--dur-1) var(--ease-std);
}
.tz-chip--filter:hover { background: var(--control-fill-hover); }
.tz-chip--filter[aria-pressed="true"] { background: var(--text-1); color: var(--sheet); box-shadow: none; }
.tz-chip--filter[aria-pressed="true"] .tz-chip__n { opacity: .8; }

/* ==========================================================================
   Segmented control with the lens
   class="tz-seg lg-glass" data-lens role="group"  > span.lg-lens + button.lg-lens-item[aria-pressed]
   ========================================================================== */
.tz-seg {
  --lg-r: var(--r-pill); --lens-r: var(--r-pill);
  --lg-rim: 14; --lg-shift: 12; --lg-inner-blur: 2;
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(0, auto);   /* each segment as wide as its label; spare width shared equally */
  max-width: 100%; height: var(--ctl-h); padding: 4px;
  vertical-align: middle;
}
.tz-seg > .lg-lens-item {
  appearance: none; border: 0; background: transparent;   /* R2: the button reset for every section that prints <button> items */
  display: block; min-width: 0; padding: 0 16px; border-radius: var(--r-pill);
  font: var(--w-medium) var(--t-ui)/calc(var(--ctl-h) - 8px) var(--font-text); white-space: nowrap; text-align: center;
  overflow: hidden; text-overflow: ellipsis;   /* last resort only, when even content-sized labels cannot fit */
  color: var(--text-1);
}
@media (max-width: 420px) { .tz-seg > .lg-lens-item { padding: 0 10px; } }
/* touch: the items fill the whole 44px track (hit area to the rim); the drop is drawn 2px inside (--lens-inset) */
@media (pointer: coarse) {
  .tz-seg { padding: 0; --lens-inset: 2; }
  .tz-seg > .lg-lens-item { line-height: var(--ctl-h); }
}
.tz-seg > .lg-lens-item:not([aria-pressed="true"]):not([aria-selected="true"]):hover { color: var(--text-1); background: var(--hover-on-glass); }
.tz-seg > .lg-lens-item:is([aria-pressed="true"], [aria-selected="true"]) { color: var(--lens-label); font-weight: var(--w-medium); }
.tz-seg > .lg-lens-item:focus-visible { outline-offset: -2px; box-shadow: none; }
.tz-seg > .lg-lens-item > .ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
/* inside another glass surface: the track becomes a fill (no glass on glass) */
.tz-seg--inset { background: rgb(var(--rim-shade) / .06); box-shadow: inset 0 1px 2px rgb(var(--shadow-rgb) / .08); border-radius: var(--r-pill); }
html[data-theme="dark"] .tz-seg--inset { background: rgb(0 0 0 / .22); }

/* ==========================================================================
   Task list row (+ group header)
   ========================================================================== */
.tz-list { list-style: none; margin: 0; padding: 0; }
.tz-row {
  position: relative;
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  min-height: var(--row-h); padding: 10px 12px;
  border-radius: calc(var(--r-sheet) - var(--sp-2));   /* 12: inside a sheet with 8 of padding */
  transition: background-color var(--dur-1) var(--ease-std);
}
.tz-list > li + li > .tz-row::before { content: ""; position: absolute; top: 0; left: 32px; right: 12px; height: 1px; background: var(--divider); }
.tz-row:hover { background: var(--sheet-hover); }
.tz-row:hover::before, .tz-row:hover + * .tz-row::before, li:hover + li > .tz-row::before { opacity: 0; }
.tz-row:has(.tz-row__title:focus-visible) { box-shadow: inset 0 0 0 2px var(--focus); }
.tz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--neutral)); align-self: start; margin-top: 8px; }
.tz-row__main { min-width: 0; }
.tz-row__title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font: var(--w-medium) var(--t-body)/1.4 var(--font-text); color: var(--text-1); text-decoration: none;
  overflow-wrap: anywhere;
}
.tz-row__title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.tz-row__title:focus-visible { outline: none; box-shadow: none; }
.tz-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 3px; font: var(--w-medium) var(--t-sm)/1.35 var(--font-text); color: var(--text-2); }
.tz-row__meta > .sep { color: var(--text-3); }
.tz-row__meta .ic { width: 14px; height: 14px; }
.tz-row__meta .is-late { color: var(--late-text); display: inline-flex; align-items: center; gap: 4px; }
.tz-row__meta .is-soon { color: var(--warn-text); display: inline-flex; align-items: center; gap: 4px; }
.tz-row__meta time { font-variant-numeric: tabular-nums; }
.tz-row__end { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--sp-2); }
/* W2 (R2-F8): the title link covers the whole row (::after above); links and buttons inside the meta stay reachable above it */
.tz-row__meta :is(a, button) { position: relative; z-index: 1; }
.tz-row--compact { min-height: 44px; padding-block: 6px; }
.lg-glass .tz-row:hover { background: var(--hover-on-glass); }

.tz-group {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 14px 12px 6px;
  font: var(--w-medium) var(--t-ui)/1.3 var(--font-text); color: var(--text-1);
}
.tz-group:first-child { padding-top: 4px; }
.tz-group > .ic { width: 16px; height: 16px; color: var(--text-2); }
.tz-group--late > .ic { color: var(--late-text); }
.tz-group--warn > .ic { color: var(--warn-text); }
.tz-group--review > .ic { color: var(--review-text); }
.tz-group--ok > .ic { color: var(--ok-text); }
/* R2: a count is quiet text beside its label, not a pill; overdue keeps its red */
.tz-group__count {
  display: inline; min-width: 0; padding: 0; background: none; color: var(--text-2);
  font: var(--w-regular) var(--t-sm)/1 var(--font-text); font-variant-numeric: tabular-nums;
}
.tz-group--late .tz-group__count { background: none; color: var(--late-text); }
.tz-group__more { margin-left: auto; font: var(--w-medium) var(--t-sm)/1 var(--font-text); color: var(--text-accent); text-decoration: none; padding: 6px 4px; border-radius: 6px; }
.tz-group__more:hover { text-decoration: underline; }
/* W2 2026-11-11 (R2-F8): the «Ещё N» / «Все» link has a 44px tall hit area on every device (the box itself is unchanged) */
.tz-group__more { position: relative; }
.tz-group__more::after { content: ""; position: absolute; left: -8px; right: -8px; top: 50%; height: 44px; transform: translateY(-50%); }

/* ==========================================================================
   Avatar, avatar stack
   ========================================================================== */
.tz-avatar {
  --size: 32px;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: var(--well);
  background: color-mix(in srgb, var(--dept, var(--neutral)) 16%, var(--sheet));
  box-shadow: 0 0 0 2px var(--ring, var(--sheet));
  font: var(--w-medium) calc(var(--size) * .375)/1 var(--font-text); letter-spacing: .01em;
  color: var(--text-1);
  user-select: none;
}
.tz-avatar--24 { --size: 24px; font-size: 12px; letter-spacing: -.03em; }   /* never under 12px (rule 6); two initials still fit with tighter tracking */
.tz-avatar--40 { --size: 40px; }
.tz-avatar--48 { --size: 48px; }
.tz-avatar__dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--ring, var(--sheet)); }
.tz-avatar__dot--away { background: var(--warn); }
.tz-avstack { display: inline-flex; align-items: center; }
.tz-avstack > * + * { margin-left: -8px; }
.tz-avstack .tz-avatar__dot { display: none; }
.tz-avstack__more {
  --size: 32px;
  display: inline-grid; place-items: center; height: var(--size); min-width: var(--size); padding: 0 8px;
  border-radius: var(--r-pill); background: var(--well); color: var(--text-2);
  font: var(--w-medium) var(--t-xs)/1 var(--font-text); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--ring, var(--sheet));
}
.lg-glass { --ring: transparent; }

/* ==========================================================================
   People's load: meter rows
   ========================================================================== */
.tz-meters { list-style: none; margin: 0; padding: 0; container-type: inline-size; }
.tz-meters__legend { margin: 0 0 6px; padding: 0 4px; }   /* the stage key; TZ.html.meters() writes it, TZ.init adds it to any bare .tz-meters */
.tz-meter {
  display: grid; grid-template-columns: 32px minmax(0, 10.5rem) minmax(72px, 1fr) auto 40px;
  grid-template-areas: "av who bar fig late";
  align-items: center; column-gap: 12px;
  min-height: 52px; padding: 6px 4px;
}
.tz-meters > li + li > .tz-meter { border-top: 1px solid var(--divider); }
.tz-meter > .tz-avatar { grid-area: av; }
.tz-meter__who { grid-area: who; min-width: 0; display: grid; }
.tz-meter__name { font: var(--w-medium) var(--t-ui)/1.3 var(--font-text); color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-meter__role { font: var(--w-medium) var(--t-xs)/1.35 var(--font-text); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-meter__track { grid-area: bar; position: relative; height: 8px; }
.tz-meter__bar { display: flex; gap: 2px; height: 8px; width: calc(var(--total) / var(--max) * 100%); min-width: 8px; }
.tz-meter__bar > i { flex: var(--v) 1 0; min-width: 3px; background: var(--c); border-radius: 2px; }
.tz-meter__bar > i:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.tz-meter__bar > i:last-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.tz-meter__cap { position: absolute; top: -4px; bottom: -4px; left: calc(var(--cap) / var(--max) * 100%); width: 2px; border-radius: 1px; background: var(--text-3); }
.tz-meter__fig { grid-area: fig; font: var(--w-medium) var(--t-sm)/1.3 var(--font-text); color: var(--text-2); white-space: nowrap; }
.tz-meter__fig b { font-weight: var(--w-medium); color: var(--text-1); font-variant-numeric: tabular-nums; }
.tz-meter__late { grid-area: late; display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; font: var(--w-medium) var(--t-sm)/1 var(--font-text); color: var(--late-text); font-variant-numeric: tabular-nums; }
.tz-meter__late > .ic { width: 14px; height: 14px; }
@container (max-width: 560px) {
  .tz-meter { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "av who late" "av bar fig"; row-gap: 6px; padding-block: 10px; align-items: center; }
  .tz-meter > .tz-avatar { align-self: start; margin-top: 2px; }
}
.s-new    { --c: var(--stage-1); --ink: var(--stage-1-ink); }
.s-work   { --c: var(--stage-2); --ink: var(--stage-2-ink); }
.s-review { --c: var(--stage-3); --ink: var(--stage-3-ink); }
.s-done   { --c: var(--stage-4); --ink: var(--stage-4-ink); }

/* ==========================================================================
   Tall segmented stage bar + legend
   ========================================================================== */
.tz-stagebar__track { display: flex; gap: 2px; height: 28px; }
.tz-stagebar__part {
  flex: var(--v) 1 0; min-width: 6px;
  display: flex; align-items: center; padding: 0 8px;
  background: var(--c); color: var(--ink); border-radius: 4px;
  font: var(--w-medium) var(--t-sm)/1 var(--font-text); font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: filter var(--dur-1) var(--ease-std);
}
.tz-stagebar__part.is-nolabel > b { display: none; }
.tz-stagebar__part:hover { filter: brightness(1.08) saturate(1.05); }
.tz-stagebar__part:focus-visible { outline-offset: 2px; }
.tz-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font: var(--w-medium) var(--t-sm)/1.35 var(--font-text); color: var(--text-2); }
.tz-legend > li { display: inline-flex; align-items: center; gap: 6px; }
.tz-legend__key { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.tz-legend__key--line { width: 14px; height: 2px; border-radius: 1px; }
.tz-legend__key--dot { width: 8px; height: 8px; border-radius: 50%; }
.tz-legend__key--ring { width: 10px; height: 10px; border-radius: 50%; background: none; box-shadow: inset 0 0 0 2px var(--late); }
.tz-legend__sizes { gap: 8px; }
.tz-legend__size { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; color: var(--text-1); }
.tz-legend__size > i { width: var(--d); height: var(--d); border-radius: 50%; background: var(--viz-dot); flex: none; }

/* ==========================================================================
   Figure line (W4): clickable figures in text size, each number its own element
   ========================================================================== */
.tz-figline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font: var(--w-regular) var(--t-body)/1.5 var(--font-text); color: var(--text-2); }
.tz-fig { display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 6px; margin: -2px -2px; border-radius: 8px; color: var(--text-2); text-decoration: none; transition: background-color var(--dur-1) var(--ease-std); }
.tz-fig > b { font-weight: var(--w-medium); color: var(--text-1); font-variant-numeric: tabular-nums; }
.tz-fig > .ic { width: 16px; height: 16px; align-self: center; }
a.tz-fig:hover { background: var(--hover-on-sheet); color: var(--text-1); }
a.tz-fig:hover > span { text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: .22em; }
.tz-fig--late > b, .tz-fig--late > .ic { color: var(--late-text); }
.tz-fig--warn > b, .tz-fig--warn > .ic { color: var(--warn-text); }
.tz-fig--review > b, .tz-fig--review > .ic { color: var(--review-text); }
.tz-fig--ok > b, .tz-fig--ok > .ic { color: var(--ok-text); }
.tz-figline__sep { color: var(--text-3); }
.tz-figline--stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.tz-figline--stack > .tz-figline__sep { display: none; }
.tz-sentence { font: var(--w-regular) var(--t-body)/1.5 var(--font-text); color: var(--text-2); max-width: 68ch; }
.tz-sentence b { font-weight: var(--w-medium); color: var(--text-1); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Week strip: 7 day cells, separate marks for deadlines and publications, lens on the selected day
   ========================================================================== */
.tz-week {
  --lens-r: 14px;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px;
  padding: 4px; border-radius: 18px;
  background: var(--well); box-shadow: inset 0 0 0 1px var(--well-hairline);
}
.tz-day {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 0; min-height: 78px; padding: 8px 2px; border-radius: 14px;
  color: var(--text-2);
}
.tz-day:not([aria-selected="true"]):hover { background: var(--hover-on-sheet); }
.tz-day__wd { font: var(--w-medium) var(--t-xs)/1.35 var(--font-text); color: var(--text-2); }
.tz-day__n { font: var(--w-medium) var(--t-h4)/1.15 var(--font-text); color: var(--text-1); font-variant-numeric: tabular-nums; }
.tz-day.is-today .tz-day__n { color: var(--text-accent); }
.tz-day.is-today .tz-day__wd::after { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); margin-left: 4px; vertical-align: .2em; }
.tz-day.is-off .tz-day__n { color: var(--text-2); font-weight: var(--w-medium); }
.tz-day[aria-selected="true"] .tz-day__wd, .tz-day[aria-selected="true"] .tz-day__n { color: var(--lens-label); }
.tz-day__marks { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 16px; font: var(--w-medium) var(--t-xs)/1 var(--font-text); color: var(--text-2); font-variant-numeric: tabular-nums; }
.tz-mark { display: inline-flex; align-items: center; gap: 3px; }
.tz-mark > i { display: block; flex: none; }
.tz-mark--due > i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); }
.tz-mark--late > i { width: 6px; height: 6px; border-radius: 50%; background: var(--late); }
.tz-mark--late { color: var(--late-text); }
.tz-mark--pub > i { width: 6px; height: 6px; border-radius: 1.5px; background: var(--brand); transform: rotate(45deg); }
@media (max-width: 480px) { .tz-day { min-height: 72px; padding-inline: 0; } .tz-day__marks { gap: 4px; } .tz-mark { gap: 2px; } .tz-mark > i { width: 5px; height: 5px; } }
.tz-week__key { margin: 8px 6px 0; gap: 4px 14px; font-size: var(--t-xs); }
.tz-week__key .tz-mark > i { width: 6px; height: 6px; }

/* ==========================================================================
   Tooltip and popover (glass), menus, toast
   ========================================================================== */
.tz-tip {
  --lg-r: var(--r-sm);
  position: fixed; left: 0; top: 0; z-index: var(--z-tooltip);
  max-width: 260px; padding: 8px 10px;
  font: var(--w-medium) var(--t-sm)/1.4 var(--font-text); color: var(--text-1);
  pointer-events: none;
  visibility: hidden; transform: translateY(3px) scale(.97);
  transition: transform 140ms var(--ease-out), visibility 0s linear 140ms;
}
.tz-tip.is-open { visibility: visible; transform: none; transition: transform 160ms var(--ease-out), visibility 0s; }
.tz-tip__title { font-weight: var(--w-medium); color: var(--text-1); margin-bottom: 2px; }
.tz-tip__row { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.tz-tip__row > b { margin-left: auto; padding-left: 12px; color: var(--text-1); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.tz-tip__key { width: 12px; height: 2px; border-radius: 1px; background: var(--c); flex: none; }

.tz-pop {
  --lg-r: var(--r-lg);
  position: fixed; inset: auto; margin: 0; border: 0;
  padding: 6px; min-width: 248px; max-width: min(360px, calc(100vw - 24px));
  background: transparent; color: var(--text-1); overflow: visible;
  box-shadow: var(--glass-shadow-lift);
  transform-origin: 0 0;
  transition: opacity 170ms var(--ease-in), transform 170ms var(--ease-in), overlay 170ms allow-discrete, display 170ms allow-discrete;
}
/* closing: shrink back into the anchor button (--lg-from is written by TZ.openPop); opening runs LG.materialize */
.tz-pop:not(:popover-open) { opacity: 0; transform: var(--lg-from, scale(.96)); }
.tz-pop:not(:popover-open) .lg-mat-content { opacity: 0; transition-duration: 90ms; }
.tz-pop::backdrop { background: transparent; }
.tz-pop__title { padding: 8px 12px 6px; font: var(--w-medium) var(--t-sm)/1.3 var(--font-text); color: var(--text-2); }
.tz-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.tz-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 40px; padding: 0 12px; border-radius: 14px;
  font: var(--w-medium) var(--t-ui)/1.3 var(--font-text); color: var(--text-1); text-align: left; text-decoration: none;
}
.tz-menu__item > .ic { width: 18px; height: 18px; color: var(--text-2); }
.tz-menu__item:hover, .tz-menu__item:focus-visible { background: var(--hover-on-glass); }
.tz-menu__item:focus-visible { outline-offset: -2px; box-shadow: none; }
.tz-menu__hint { margin-left: auto; font: var(--w-medium) var(--t-sm)/1 var(--font-text); color: var(--text-2); font-variant-numeric: tabular-nums; }
.tz-menu__item[aria-checked="true"]::after { content: ""; margin-left: auto; width: 16px; height: 16px; flex: none; background: currentColor; color: var(--text-accent);
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m20 6-11 11-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m20 6-11 11-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.tz-menu__item[aria-checked="true"] .tz-menu__hint { margin-left: 8px; }
.tz-menu__item--danger, .tz-menu__item--danger > .ic { color: var(--late-text); }
.tz-menu__sep { height: 1px; margin: 5px 10px; background: var(--divider); }

.tz-toasts {
  position: fixed; z-index: var(--z-toast); left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px;
}
.tz-toast {
  --lg-r: var(--r-pill);
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; max-width: min(520px, 100%); padding: 4px 16px;
  font: var(--w-medium) var(--t-ui)/1.35 var(--font-text); color: var(--text-1);
  box-shadow: var(--glass-shadow-lift);
}
.tz-toast > .ic { width: 18px; height: 18px; color: var(--ok-text); }
.tz-toast--late > .ic { color: var(--late-text); }
.tz-toast .tz-btn { margin-left: 4px; }
.tz-toast:has(> .tz-btn:last-child) { padding-right: 4px; }   /* QA-M1 Q10: the tight right edge only when a button ends the pill; a plain toast has equal sides */
/* W2 2026-11-11: TZ.toast({ label, title }): the fixed label is translated, the task title is data (data-no-tr), one line */
.tz-toast__msg { min-width: 0; display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tz-toast__title { display: inline-block; max-width: min(36ch, 60vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--text-1); font-weight: var(--w-medium); }
.tz-toast.is-entering { animation: tz-toast-in var(--dur-4) var(--ease-out); }
@keyframes tz-toast-in { from { transform: translateY(14px) scale(.96); } }
@media (max-width: 640px) { .tz-toasts { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }

/* ==========================================================================
   Skeleton rows and the empty-state line
   ========================================================================== */
.tz-skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--skel) 0 35%, var(--skel-hi) 50%, var(--skel) 65% 100%) 0 0 / 300% 100%; animation: tz-shimmer 1.6s linear infinite; }
.tz-skel--title { height: 14px; }
.tz-skel--meta { height: 10px; margin-top: 8px; }
.tz-skel--dot { width: 8px; height: 8px; border-radius: 50%; align-self: start; margin-top: 8px; animation: none; background: var(--skel); }
.tz-skel--chip { width: 72px; height: 24px; border-radius: var(--r-tag); }
.tz-row--skel:hover { background: none; }
@keyframes tz-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.tz-empty { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 12px; font: var(--w-regular) var(--t-body)/1.5 var(--font-text); color: var(--text-2); }
.tz-empty > .ic { width: 20px; height: 20px; color: var(--text-2); }
.tz-empty > b { color: var(--text-1); font-weight: var(--w-medium); }

/* ==========================================================================
   Form controls
   ========================================================================== */
.tz-field { display: grid; gap: 6px; min-width: 0; }
.tz-label { font: var(--w-medium) var(--t-ui)/1.3 var(--font-text); color: var(--text-1); }
.tz-label .req { color: var(--late-text); margin-left: 2px; }
.tz-input, .tz-select > select, .tz-textarea {
  width: 100%; height: var(--ctl-h); padding: 0 12px;
  border: 0; border-radius: var(--r-sm);
  background: var(--well); color: var(--text-1);
  box-shadow: inset 0 0 0 1px var(--control-hairline);
  font: var(--w-regular) var(--t-body)/1.5 var(--font-text);
  transition: box-shadow var(--dur-1) var(--ease-std), background-color var(--dur-1) var(--ease-std);
}
.tz-input:hover, .tz-select > select:hover, .tz-textarea:hover { box-shadow: inset 0 0 0 1px var(--text-3); }
.tz-input:focus-visible, .tz-select > select:focus-visible, .tz-textarea:focus-visible { outline: none; background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--focus), 0 0 0 4px var(--focus-halo); }
.tz-input[aria-invalid="true"], .tz-textarea[aria-invalid="true"], .tz-select > select[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--late); }
.tz-input:disabled, .tz-select > select:disabled, .tz-textarea:disabled { color: var(--text-disabled); background: transparent; }
.tz-textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; }
.tz-select { position: relative; display: block; }
.tz-select > select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; }
.tz-select > .ic { position: absolute; right: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--text-2); pointer-events: none; }
.tz-help { font: var(--w-medium) var(--t-sm)/1.4 var(--font-text); color: var(--text-2); }
.tz-error { display: flex; align-items: center; gap: 6px; font: var(--w-medium) var(--t-sm)/1.4 var(--font-text); color: var(--late-text); }
.tz-error > .ic { width: 16px; height: 16px; }

.tz-check, .tz-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 32px; cursor: pointer; font: var(--w-regular) var(--t-body)/1.4 var(--font-text); color: var(--text-1); }
.tz-check > input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 20px; height: 20px; border-radius: var(--r-xs);
  background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--check-border);
  display: grid; place-items: center; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-std), box-shadow var(--dur-1) var(--ease-std);
}
.tz-check > input::after { content: ""; width: 14px; height: 14px; background: #FFFFFF; transform: scale(0); transition: transform var(--dur-3) var(--ease-spring);
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m20 6-11 11-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m20 6-11 11-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.tz-check > input:checked { background: var(--accent); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3); }
.tz-check > input:checked::after { transform: scale(1); }
.tz-check > input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tz-check > input:disabled { opacity: .5; cursor: not-allowed; }

.tz-switch > input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; position: relative; cursor: pointer;
  width: 42px; height: 26px; border-radius: var(--r-pill);
  background: var(--switch-off);
  box-shadow: inset 0 1px 2px rgb(0 0 0 / .18);
  transition: background-color var(--dur-2) var(--ease-std);
}
.tz-switch > input::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, #FFFFFF, #F0F3FA);
  box-shadow: 0 1px 2px rgb(0 0 0 / .22), 0 3px 8px -2px rgb(0 0 0 / .18), inset 0 -1px 1px rgb(24 27 33 / .06);
  transition: transform var(--dur-4) var(--ease-spring), width var(--dur-2) var(--ease-out);
}
.tz-switch > input:active::before { width: 26px; }                       /* the thumb stretches like gel while held */
.tz-switch > input:checked { background: var(--accent); }
.tz-switch > input:checked::before { transform: translateX(16px); }
.tz-switch > input:checked:active::before { transform: translateX(10px); }
.tz-switch > input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tz-switch > input:disabled { opacity: .5; cursor: not-allowed; }

/* ==========================================================================
   Navigation shells (all four are glass; pick one per variant)
   ========================================================================== */
/* --- shared brand --- */
.tz-brand { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px; white-space: nowrap; flex: none; color: var(--text-1); text-decoration: none; font: var(--w-medium) var(--t-body)/1 var(--font-text); letter-spacing: -.01em; }
/* R3 the mark (brand/logo/final, glyph 30x20): a capsule with the tick and three voice bars, no tile behind it.
   Inside the app it has no red (red means overdue there): --mark-fill / --mark-ink per theme (tokens.css).
   --red (the sign-in card, the landing header) paints the middle voice bar in the parent's red, as in the logo files. */
.tz-brand__mark { width: 30px; height: 20px; display: block; flex: none; line-height: 0; }
.tz-brand__mark--red { --mark-voice: #EB2343; }
.tz-brand__mark--lg { width: 42px; height: 28px; }
.tz-logo { display: block; width: 100%; height: 100%; }
.tz-logo__cap { fill: var(--mark-fill); }
.tz-logo__tick { fill: none; stroke: var(--mark-ink); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.tz-logo__bar { fill: var(--mark-ink); }
.tz-logo__voice { fill: var(--mark-voice, var(--mark-ink)); }
@media (forced-colors: active) {
  .tz-logo { forced-color-adjust: none; }
  .tz-logo__cap { fill: CanvasText; }
  .tz-logo__tick { stroke: Canvas; }
  .tz-logo__bar, .tz-logo__voice { fill: Canvas; }
}

/* --- 1. floating labelled sidebar slab (~240px) --- */
.tz-sidebar {
  --lg-r: var(--r-xl);
  position: fixed; z-index: var(--z-nav); top: 12px; bottom: 12px; left: 12px; width: 240px;
  display: flex; flex-direction: column; padding: 12px 10px;
}
.tz-nav { display: grid; gap: 2px; --lens-r: 18px; }
.tz-nav__item {
  display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 12px; border-radius: 18px;
  font: var(--w-medium) var(--t-ui)/1 var(--font-text); color: var(--text-1); text-decoration: none;
}
.tz-nav__item > .ic { width: 20px; height: 20px; color: var(--text-2); }
.tz-nav__item:is([aria-current]:not([aria-current="false"]), [aria-selected="true"]) > .ic { color: var(--lens-label); }
.tz-nav__item:is([aria-current]:not([aria-current="false"]), [aria-selected="true"]) { font-weight: var(--w-medium); }
.tz-nav__item:not([aria-current]):hover { background: var(--hover-on-glass); }
.tz-nav__item:focus-visible { outline-offset: -2px; box-shadow: none; }
.tz-nav__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-nav__count { font: var(--w-medium) var(--t-sm)/1 var(--font-text); color: var(--text-2); font-variant-numeric: tabular-nums; }
.tz-nav__count--alert { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--late-bg); color: var(--late-text); font-weight: var(--w-medium); }
.tz-sidebar__section { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 4px; padding: 0 4px 0 12px; font: var(--w-medium) var(--t-sm)/1.3 var(--font-text); color: var(--text-2); }
.tz-proj { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: 14px; font: var(--w-medium) var(--t-ui)/1 var(--font-text); color: var(--text-1); text-decoration: none; }
.tz-proj:hover { background: var(--hover-on-glass); }
.tz-proj > .tz-dot { margin: 0; align-self: center; }
.tz-proj__name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-proj > .tz-nav__count { flex: none; }
.tz-profile { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 18px; background: var(--control-fill); box-shadow: inset 0 0 0 1px var(--control-hairline), inset 0 1px 0 rgb(255 255 255 / var(--control-catch)); --ring: transparent; }
.tz-profile__who { min-width: 0; flex: 1; display: grid; }
.tz-profile__name { font: var(--w-medium) var(--t-ui)/1.3 var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz-profile__role { font: var(--w-medium) var(--t-xs)/1.35 var(--font-text); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- 2. floating icon rail (88px) with short labels --- */
.tz-rail {
  --lg-r: var(--r-xl);
  position: fixed; z-index: var(--z-nav); top: 12px; bottom: 12px; left: 12px; width: 88px;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 8px;
}
.tz-rail > .tz-brand { justify-content: center; padding: 0; height: 48px; }
.tz-rail__nav { display: grid; gap: 4px; --lens-r: 20px; }
.tz-rail__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 62px; border-radius: 20px; padding: 0 2px;
  font: var(--w-medium) var(--t-xs)/1.15 var(--font-text); color: var(--text-1); text-decoration: none; text-align: center;
}
.tz-rail__item > .ic { width: 24px; height: 24px; color: var(--text-2); }
.tz-rail__item:is([aria-current]:not([aria-current="false"]), [aria-selected="true"]) > .ic { color: var(--lens-label); }
.tz-rail__item:not([aria-current]):hover { background: var(--hover-on-glass); }
.tz-rail__item:focus-visible { outline-offset: -2px; box-shadow: none; }
.tz-rail__item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-rail__end { margin-top: auto; display: grid; justify-items: center; gap: 10px; }

/* --- 3. floating top bar with tabs --- */
.tz-topbar {
  --lg-r: var(--r-pill);
  position: fixed; z-index: var(--z-nav); top: 12px; left: 12px; right: 12px;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 8px 0 12px;   /* R2: as drawn on 10:22 (56 high, 12 / 8 inside) */
}
.tz-tabs { display: flex; align-items: center; gap: 4px; --lens-r: var(--r-pill); }
.tz-tab {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  font: var(--w-medium) var(--t-ui)/1 var(--font-text); color: var(--text-2); text-decoration: none; white-space: nowrap;
}
.tz-tab > .ic { width: 18px; height: 18px; color: var(--text-2); }
/* R2: the open section is told by the lens and the colour; the weight stays (hierarchy by colour, not weight) */
.tz-tab:is([aria-current]:not([aria-current="false"]), [aria-selected="true"]) > .ic { color: var(--lens-label); }
.tz-tab:not([aria-current]):hover { background: var(--hover-on-glass); color: var(--text-1); }
.tz-tab:focus-visible { outline-offset: -2px; box-shadow: none; }
.tz-topbar__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* --- 4. phone tab bar capsule: four tabs + a central round action --- */
.tz-tabbar {
  --lg-r: var(--r-pill); --lens-r: var(--r-pill);
  --lg-rim: 16; --lg-shift: 10; --lg-inner-blur: 4;
  position: fixed; z-index: var(--z-dock); left: 16px; right: 16px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px minmax(0, .8fr) minmax(0, 1.2fr); align-items: center;   /* R2 repair (LEAD-FIX shared 1): «+» centred; Russian «Календарь» takes the room «Чаты» does not need */
  height: 64px; padding: 4px;   /* R2: as drawn on 18:47 */
  max-width: 480px; margin: 0 auto;
}
.tz-tabbar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 56px; border-radius: var(--r-pill); min-width: 0;
  font: var(--w-regular) var(--t-xs)/1.2 var(--font-text); color: var(--text-2); text-decoration: none;   /* R2: labels 12 regular, text-2 unless current */
}
.tz-tabbar__item > .ic { width: 20px; height: 20px; color: var(--text-2); }
.tz-tabbar__item:is([aria-current]:not([aria-current="false"]), [aria-selected="true"]) > .ic { color: var(--lens-label); }
.tz-tabbar__item:focus-visible { outline-offset: -2px; box-shadow: none; }
.tz-tabbar__item > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-tabbar__act {
  justify-self: center; position: relative; z-index: 2;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-on-accent);
  background:
    radial-gradient(circle 40px at var(--lg-px, 50%) var(--lg-py, 50%), rgb(255 255 255 / calc(var(--lg-glow) * .7)), rgb(255 255 255 / 0)),
    radial-gradient(90% 60% at 50% 0%, rgb(255 255 255 / .26), rgb(255 255 255 / 0) 70%),
    var(--tint-fill);
  box-shadow: var(--tint-ring, 0 0 #0000), inset 0 1px 0 rgb(255 255 255 / .5), inset 0 -8px 14px -10px rgb(var(--tint-glow) / .6), 0 1px 2px rgb(var(--shadow-rgb) / .2), 0 8px 18px -8px rgb(var(--shadow-rgb) / .28);   /* R2 (V1 C1): neutral */
}
/* Uzbek: four equal tracks («Chatlar» needs more than .8fr; «Kalendar» less than 1.2fr) */
html[lang="uz"] .tz-tabbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px minmax(0, 1fr) minmax(0, 1fr); }
.tz-tabbar__act > .ic { width: 26px; height: 26px; }
@media (max-width: 380px) {
  .tz-tabbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 58px minmax(0, .8fr) minmax(0, 1.2fr); padding: 4px; }   /* R2 repair (LEAD-FIX shared 1) */
  html[lang="uz"] .tz-tabbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 58px minmax(0, 1fr) minmax(0, 1fr); }
  .tz-tabbar__act { width: 52px; height: 52px; }
  .tz-tabbar__item { padding-inline: 2px; letter-spacing: 0; }   /* R2 (V2 D6): no negative tracking on 12px labels */
}
.tz-tabbar__act::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(circle at 18% 10%, rgb(255 255 255 / .9), rgb(255 255 255 / .2) 40%, rgb(255 255 255 / 0) 70%), radial-gradient(circle at 90% 95%, rgb(255 255 255 / .35), rgb(255 255 255 / 0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.tz-has-tabbar { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 900px) {
  .tz-has-tabbar::after {
    content: ""; position: fixed; inset: 0; z-index: calc(var(--z-dock) - 1); pointer-events: none;
    background: var(--ground-paint);
    -webkit-mask: linear-gradient(to top, #000 0, #000 calc(74px + env(safe-area-inset-bottom, 0px)), transparent calc(102px + env(safe-area-inset-bottom, 0px)));
    mask: linear-gradient(to top, #000 0, #000 calc(74px + env(safe-area-inset-bottom, 0px)), transparent calc(102px + env(safe-area-inset-bottom, 0px)));
  }
}
@media (min-width: 901px) {
  .tz-has-topbar::after {
    content: ""; position: fixed; inset: 0; z-index: calc(var(--z-nav) - 1); pointer-events: none;
    background: var(--ground-paint);
    -webkit-mask: linear-gradient(to bottom, #000 0, #000 80px, transparent 104px);   /* R2: the bar ends at 24 + 56 */
    mask: linear-gradient(to bottom, #000 0, #000 80px, transparent 104px);
  }
}

/* ==========================================================================
   Charts (charts.js renders the SVG; colours come from here so themes switch live)
   ========================================================================== */
.tz-chart { margin: 0; min-width: 0; }
.tz-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tz-chart .ax { font: var(--w-medium) 12px/1 var(--font-text); fill: var(--text-2); font-variant-numeric: tabular-nums; }
.tz-chart .ax--today { fill: var(--text-1); font-weight: var(--w-medium); }
.tz-chart .val { font: var(--w-medium) 12px/1 var(--font-text); fill: var(--text-1); font-variant-numeric: tabular-nums; }
.tz-chart .lbl { font: var(--w-medium) 13px/1 var(--font-text); fill: var(--text-1); }
.tz-chart .lbl--2 { fill: var(--text-2); }
.tz-chart .grid { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.tz-chart .base { stroke: var(--viz-axis); stroke-width: 1; shape-rendering: crispEdges; }
.tz-chart .mean { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.tz-chart .s1 { fill: var(--series-1); } .tz-chart .s2 { fill: var(--series-2); }
.tz-chart .s1m { fill: var(--series-1-muted); } .tz-chart .s2m { fill: var(--series-2-muted); }
.tz-chart .today-band { fill: var(--well); }
.tz-chart .l1 { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tz-chart .l2 { fill: none; stroke: var(--series-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tz-chart .m1 { fill: var(--series-1); stroke: var(--sheet); stroke-width: 2; }
.tz-chart .m2 { fill: var(--series-2); stroke: var(--sheet); stroke-width: 2; }
.tz-chart .emph { fill: var(--viz-emph); } .tz-chart .muted { fill: var(--viz-muted); }
.tz-chart .dot { fill: var(--viz-dot); } .tz-chart .dot--today { fill: var(--viz-emph); }
.tz-chart .ring-late { fill: none; stroke: var(--late); stroke-width: 2; }
/* W2 2026-11-11: dotgrid({ overdue }) count chip per person (outside the dot-size scale) and the dashed line after that column */
.tz-chart .odc rect { fill: transparent; }
.tz-chart .odc path { fill: none; stroke: var(--late-text); stroke-width: 1.5; stroke-linejoin: round; }
.tz-chart .odc text { fill: var(--late-text); font: var(--w-medium) 12px/1 var(--font-text); font-variant-numeric: tabular-nums; }
.tz-chart .od-line { stroke: var(--divider); stroke-width: 1; stroke-dasharray: 2 3; }
.tz-chart .track { fill: var(--well); }
.tz-chart .arc-track { fill: none; stroke: var(--well); stroke-linecap: round; }
.tz-chart .arc-fill { fill: none; stroke: var(--viz-emph); stroke-linecap: round; }
.tz-chart .arc-fig { font: var(--w-medium) var(--t-num)/1 var(--font-text); fill: var(--text-1); letter-spacing: 0; }   /* R2 (LEAD-FIX shared 2): Inter, 32 */
.tz-chart .arc-sub { font: var(--w-medium) 13px/1 var(--font-text); fill: var(--text-2); font-variant-numeric: tabular-nums; }
.tz-chart .hit { fill: transparent; cursor: default; }
.tz-chart .hit:hover + g .cap, .tz-chart [data-tip]:hover { opacity: 1; }
.tz-chart g[data-tip] { outline: none; }
.tz-chart g[data-tip]:focus-visible .hl, .tz-chart g[data-tip]:hover .hl { fill: var(--hover-on-sheet); }
.tz-chart g[data-tip]:focus-visible .hl { stroke: var(--focus); stroke-width: 2; }
.tz-chart .hl { fill: transparent; }
.tz-chart__sum { margin-top: 10px; font: var(--w-regular) var(--t-sm)/1.45 var(--font-text); color: var(--text-2); max-width: 68ch; }
.tz-chart__sum b { color: var(--text-1); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.tz-chart .tz-legend { margin: 0 0 10px; }
/* product patch (F4): phone form controls never under 16px, whatever the root font size (iOS zooms into smaller fields);
   the legacy rule that did this (creative-os.css:574) is guarded away from world components */
@media (max-width: 640px) {
  .tz-quick__input, .tz-input, .tz-select > select, .tz-textarea { font-size: max(16px, var(--t-body)); }
  .tz-quick--hero .tz-quick__input { font-size: max(16px, var(--t-h4)); }
}
@media (forced-colors: active) {
  .tz-sheet, .tz-well, .tz-week { border: 1px solid CanvasText; }
  .tz-stagebar__part, .tz-meter__bar > i, .tz-legend__key, .tz-legend__size > i, .tz-dot, .tz-mark > i, .tz-avatar__dot, .tz-iconbtn__badge { forced-color-adjust: none; }
  .tz-pop, .tz-btn--secondary, .tz-iconbtn--fill, .tz-chip--filter, .tz-input, .tz-select > select, .tz-textarea, .tz-profile, .tz-tabbar__act { border: 1px solid CanvasText; }
  .tz-seg > .lg-lens-item + .lg-lens-item { box-shadow: inset 1px 0 0 GrayText; }
  .tz-has-tabbar::after, .tz-has-topbar::after { display: none; }
  .tz-chart .today-band { fill: Canvas; stroke: GrayText; stroke-width: 1; }
  .tz-stagebar__part { outline: 1px solid CanvasText; }
  .tz-chip { border: 1px solid CanvasText; }
  .tz-chart .s1, .tz-chart .s1m, .tz-chart .emph { fill: Highlight; } .tz-chart .s2, .tz-chart .s2m, .tz-chart .muted, .tz-chart .dot { fill: CanvasText; }
  .tz-chart .l1 { stroke: Highlight; } .tz-chart .l2 { stroke: CanvasText; }
}

/* ==========================================================================
   W2 2026-11-11 (R1-F7): a solid element that sits directly on the field, outside a sheet
   (a capsule, a chip row, a filled pill). Solid --sheet fill + a T1 hairline + a soft shadow that stay visible at
   every glass level («больше стекла» strengthens them in more.css). Not glass: no backdrop, no lit rim.
   Use: class="tz-onfield" on the element (keeps your own radius, padding and layout).
   ========================================================================== */
.tz-onfield { background-color: var(--sheet); box-shadow: var(--onfield-shadow), inset 0 0 0 1px var(--onfield-hairline); }
a.tz-onfield:hover, button.tz-onfield:hover, .tz-onfield.is-hoverable:hover { background-color: var(--sheet-hover); }
@media (prefers-contrast: more) { .tz-onfield { box-shadow: inset 0 0 0 1px var(--sheet-hairline); } }
@media (forced-colors: active) { .tz-onfield { border: 1px solid CanvasText; box-shadow: none; } .tz-chart .odc rect { fill: Canvas; stroke: CanvasText; } .tz-chart .odc text { fill: CanvasText; } .tz-chart .odc path { stroke: CanvasText; } }
@media print { .tz-onfield { background: #FFFFFF; box-shadow: inset 0 0 0 1px #C4C4C4; } }
/* Turon TZ world: the «больше стекла» level. Every rule in this file is scoped to html[data-glass="more"]. Loaded after components.css.

   What the level does (iOS 26 widget / Control Center logic):
   - the ground becomes a richer field: a larger Turon blue light top-left, a light blue light top-right, a larger pale ice light
     bottom-right (R3: the Turon palette; the cyan-teal and the warm sand lights are gone);
   - content sheets become platters of regular (frosted) Liquid Glass: translucent tinted body + strong frost, the directional
     lit rim (key light top-left, falling off to the bottom-right), light gathering in the lower edge, a soft offset shadow.
     No refraction on sheets (the 4 refracting elements belong to the controls);
   - no glass on glass: wells, hovers, dividers become translucent fills; glass controls placed on a sheet lose their backdrop;
   - phones (<= 640px) and weak devices (html.lg-low): near-opaque tinted platters WITHOUT backdrop-filter, rim kept;
   - reduced transparency / more contrast / html.lg-opaque: sheets fall back to solid (restated at the end of this file,
     because these rules out-rank the fallbacks in tokens.css). */

/* ---------- tokens: Daylight (also the fallback when no theme is set) ---------- */
html[data-glass="more"] {
  /* richer field */
  --more-l1: 55 120 245;   --more-l1-a: .36;   /* Turon blue, top-left */
  --more-l3: 165 184 255;   --more-l3-a: .30;   /* blue-300, top-right */
  --more-l2: 180 222 252;  --more-l2-a: .62;   /* pale ice, bottom-right (never a UI colour) */

  /* the platter */
  /* r2: platters are clearly denser than the controls (.80 against glass and shells .42; W2b), so content and controls never become the same frost */
  --sheet-fill: rgb(255 255 255 / .80);
  --sheet-backdrop: blur(30px) saturate(1.5) brightness(1.05);   /* less saturated than r1 (1.7): the warm light under a platter no longer eats warn/late meta text */
  --sheet-sheen: .34;      /* specular sheen from the key light */
  --sheet-top: .30;        /* top-down light */
  --sheet-hairline: rgb(24 27 33 / .08);   /* T1 hairline kept for solid elements on the field (capsules, chips); the platter itself drops it, its lit rim replaces the stroke */
  --sheet-shadow: 0 0 0 .5px rgb(24 27 33 / .05), 0 1px 2px rgb(24 27 33 / .05), 0 22px 44px -22px rgb(24 27 33 / .26);
  --srim-key: .72; --srim-top: .42; --srim-second: .24; --srim-base: .10; --srim-catch: .70;   /* a quieter rim than the controls' (.95 .70 .55 .10 .90) */
  --srim-shade: 24 27 33; --srim-shade-a: .07;
  --sgather: 55 120 245; --sgather-a: .16;
  --sinner-glow: .50;

  /* fills on the platter (never a second backdrop) */
  --well: rgb(24 27 33 / .045);
  --well-hairline: rgb(24 27 33 / .06);
  --sheet-hover: rgb(24 27 33 / .04);
  --sheet-press: rgb(24 27 33 / .07);
  --divider: rgb(24 27 33 / .10);

  /* floating glass: W2b 2026-11-12: never denser than the standard level (tokens.css: fill .20 + core .28, body ~.42).
     Keep these two in step with the standard values whenever those change. */
  --glass-fill: rgb(242 246 255 / 0.2); --glass-core: rgb(246 248 255 / 0.28);
  /* lifted glass (popovers, menus, tooltips, toasts) keeps the body this level had before W2b (.50), still clearer than its standard .58 */
  --glass-fill-lift: rgb(255 255 255 / .30); --glass-core-lift: rgb(255 255 255 / .28);
}

/* ---------- tokens: Evening ---------- */
html[data-theme="dark"][data-glass="more"] {
  --more-l1: 17 45 179;   --more-l1-a: .34;   /* blue-800, top-left */
  --more-l3: 54 86 232;   --more-l3-a: .30;   /* blue-600, top-right */
  --more-l2: 8 77 112;   --more-l2-a: .26;    /* dark ice, bottom-right. R3: .30 -> .26 so the action's edge keeps 3:1 on this field (3.04) */

  --sheet-fill: rgb(16 24 45 / 0.8);   /* a deeper navy than the solid sheet: the blue light behind lifts it back to about the sheet #162037 */
  --sheet-hairline: rgb(255 255 255 / .09);
  --sheet-backdrop: blur(30px) saturate(1.3) brightness(.86);   /* the field comes through darker, so late-text on tinted rows keeps 4.5:1 */
  --sheet-sheen: .07;
  --sheet-top: .04;
  --sheet-shadow: 0 1px 2px rgb(0 0 0 / .28), 0 26px 50px -24px rgb(0 0 0 / .72);
  --srim-key: .46; --srim-top: .18; --srim-second: .07; --srim-base: .03; --srim-catch: .15;   /* quieter than the controls' (.70 .30 .14 .025 .22) */
  --srim-shade: 0 0 0; --srim-shade-a: .30;
  --sgather: 165 184 255; --sgather-a: .18;
  --sinner-glow: .08;

  --well: rgb(0 0 0 / .16);
  --well-hairline: rgb(255 255 255 / .06);
  --sheet-hover: rgb(255 255 255 / .05);
  --sheet-press: rgb(255 255 255 / .08);
  --divider: rgb(255 255 255 / .09);

  /* floating glass: W2b 2026-11-12: = the standard level (tokens.css Evening fill .22 + core .12, body ~.31); keep in step */
  --glass-fill: rgb(22 33 58 / 0.22); --glass-core: rgb(22 33 58 / 0.12);
  /* lifted glass keeps this level's former body (.48), still clearer than its standard .55 */
  --glass-fill-lift: rgb(22 33 58 / 0.31); --glass-core-lift: rgb(22 33 58 / 0.25);
}

/* ---------- the ground: a richer, still static field ---------- */
html[data-glass="more"] {
  --ground-paint:
    var(--ground-rings) 0 0 / 100% 100% no-repeat,
    radial-gradient(92vw 86vw at 0% 0%, rgb(var(--more-l1) / var(--more-l1-a)) 0%, rgb(var(--more-l1) / calc(var(--more-l1-a) * .55)) 40%, rgb(var(--more-l1) / 0) 74%),
    radial-gradient(58vw 52vw at 100% 0%, rgb(var(--more-l3) / var(--more-l3-a)) 0%, rgb(var(--more-l3) / calc(var(--more-l3-a) * .45)) 42%, rgb(var(--more-l3) / 0) 76%),
    radial-gradient(76vw 66vw at 100% 100%, rgb(var(--more-l2) / var(--more-l2-a)) 0%, rgb(var(--more-l2) / calc(var(--more-l2-a) * .5)) 42%, rgb(var(--more-l2) / 0) 76%),
    var(--ground);
}

/* ---------- the platter ---------- */
html[data-glass="more"] .tz-sheet { background: transparent; box-shadow: var(--sheet-shadow); }
html[data-glass="more"] .tz-sheet::before {
  background:
    radial-gradient(130% 110% at 8% 0%, rgb(255 255 255 / var(--sheet-sheen)) 0%, rgb(255 255 255 / 0) 52%),
    linear-gradient(180deg, rgb(255 255 255 / var(--sheet-top)) 0%, rgb(255 255 255 / 0) 34%),
    var(--sheet-fill);
  box-shadow:
    inset 0 1px 0 0 rgb(255 255 255 / var(--srim-catch)),
    inset 0 -1px 0 0 rgb(var(--srim-shade) / var(--srim-shade-a)),
    inset 0 -18px 26px -22px rgb(var(--sgather) / var(--sgather-a)),
    inset 0 20px 28px -26px rgb(255 255 255 / var(--sinner-glow));
}
/* the lit rim: key light top-left, lit top edge, faint second light bottom-right, whisper elsewhere (never a uniform stroke) */
html[data-glass="more"] .tz-sheet::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  padding: 1.25px;
  background:
    radial-gradient(circle at 0% 0%, rgb(255 255 255 / var(--srim-key)) 0px, rgb(255 255 255 / calc(var(--srim-key) * .45)) 120px, rgb(255 255 255 / 0) 360px),
    radial-gradient(circle at 100% 100%, rgb(255 255 255 / var(--srim-second)) 0px, rgb(255 255 255 / 0) 180px),
    linear-gradient(180deg, rgb(255 255 255 / var(--srim-top)) 0px, rgb(255 255 255 / calc(var(--srim-top) * .25)) 44px, rgb(255 255 255 / var(--srim-base)) 60%, rgb(255 255 255 / calc(var(--srim-second) * .5)) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------- no glass on glass: glass controls placed on a platter become fills ---------- */
html[data-glass="more"] .tz-sheet .lg-glass:not(.lg-tint):not(.tz-pop):not(.tz-tip):not(.tz-toast) {
  --glass-fill: var(--control-fill); --glass-core: transparent; --glass-sheen: .12; --glass-top: .06;
}
html[data-glass="more"] .tz-sheet .lg-glass:not(.tz-pop):not(.tz-tip):not(.tz-toast)::before {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html[data-glass="more"] .tz-sheet .lg-band { display: none; }

/* ---------- phones and weak devices: near-opaque tinted platters, no backdrop, rim kept ---------- */
@media (max-width: 640px) {
  html[data-glass="more"] {
    --sheet-fill: rgb(242 246 255 / 0.86);
    --sheet-backdrop: none;
    --ground-paint:
      var(--ground-rings) 0 0 / 100% 100% no-repeat,
      radial-gradient(130vw 96vh at 0% 0%, rgb(var(--more-l1) / var(--more-l1-a)) 0%, rgb(var(--more-l1) / calc(var(--more-l1-a) * .5)) 42%, rgb(var(--more-l1) / 0) 76%),
      radial-gradient(90vw 60vh at 100% 30%, rgb(var(--more-l3) / var(--more-l3-a)) 0%, rgb(var(--more-l3) / 0) 72%),
      radial-gradient(120vw 76vh at 100% 100%, rgb(var(--more-l2) / var(--more-l2-a)) 0%, rgb(var(--more-l2) / 0) 74%),
      var(--ground);
  }
  html[data-theme="dark"][data-glass="more"] { --sheet-fill: rgb(22 32 55 / 0.86); }
}
/* QA-M1 Q4: the Evening rule above out-ranked the phone block, so every platter kept its backdrop on a phone (7 layers in view).
   Up to 767px the Evening platter is the frost fill without a backdrop, as the Daylight one already was up to 640px. */
@media (max-width: 767px) {
  html[data-theme="dark"][data-glass="more"] { --sheet-fill: rgb(22 32 55 / 0.86); --sheet-backdrop: none; }
}
html.lg-low[data-glass="more"] { --sheet-fill: rgb(242 246 255 / 0.86); --sheet-backdrop: none; }
html.lg-low[data-theme="dark"][data-glass="more"] { --sheet-fill: rgb(22 32 55 / 0.86); }
html.lg-low[data-glass="more"] .tz-sheet::before { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* ---------- fallbacks restated (these rules out-rank the ones in tokens.css) ---------- */
@media (prefers-reduced-transparency: reduce) {
  html[data-glass="more"], html[data-theme="dark"][data-glass="more"] {
    --sheet-fill: var(--sheet); --sheet-backdrop: none; --sheet-sheen: 0; --sheet-top: 0;
    --glass-fill-lift: initial; --glass-core-lift: initial;   /* W2b: lifted glass follows the fallback */
  }
  html[data-glass="more"] { --glass-fill: #F9FAFD; }
  html[data-theme="dark"][data-glass="more"] { --glass-fill: #1D2942; }
  html[data-glass="more"] .tz-sheet::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  html[data-glass="more"], html[data-theme="dark"][data-glass="more"] {
    --sheet-fill: var(--sheet); --sheet-backdrop: none; --sheet-sheen: 0; --sheet-top: 0;
    --glass-fill-lift: initial; --glass-core-lift: initial;   /* W2b */
  }
  html[data-glass="more"] { --sheet-hairline: rgb(24 27 33 / .40); --divider: #E6E9F0; --glass-fill: #FFFFFF; }
  html[data-theme="dark"][data-glass="more"] { --sheet-hairline: rgb(255 255 255 / .45); --divider: #27324A; --glass-fill: #10182B; }
  html[data-glass="more"] .tz-sheet::before { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 1px var(--sheet-hairline); }
}
html.lg-opaque[data-glass="more"], html.lg-opaque[data-theme="dark"][data-glass="more"] {
  --sheet-fill: var(--sheet); --sheet-backdrop: none; --sheet-sheen: 0; --sheet-top: 0;
}
html.lg-opaque[data-glass="more"] .tz-sheet::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {   /* W2b: glass.css fallback 0, restated */
  html[data-glass="more"] { --glass-fill: rgb(255 255 255 / .94); --glass-core: transparent; --glass-fill-lift: initial; --glass-core-lift: initial; }
  html[data-theme="dark"][data-glass="more"] { --glass-fill: rgb(22 33 58 / 0.95); }
}
@media (forced-colors: active) {
  html[data-glass="more"] .tz-sheet::before { background: Canvas; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  html[data-glass="more"] .tz-sheet::after { display: none; }
}

/* ---------- state counts on glass keep a solid underlay, as status chips do on platters ---------- */
html[data-glass="more"] .tz-nav__count--alert { background: linear-gradient(var(--late-bg), var(--late-bg)), var(--sheet); }

/* ---------- the lens on a platter (week strip, inset segmented): a darker backdrop in Evening, the label stays >= 4.5:1 ---------- */
html[data-theme="dark"][data-glass="more"] .tz-sheet { --lens-backdrop: saturate(1.1) brightness(.84); }

/* ---------- the shells (sidebar, rail, top bar): clearer than the platters, so the big slabs read as glass, not as boxes with a rim ---------- */
html[data-glass="more"] .lg-slab {
  --glass-fill: rgb(242 246 255 / 0.22); --glass-core: rgb(242 246 255 / 0.26);   /* body ~.42 with a faint blue cast (platters .80) */
  --glass-sheen: .46; --glass-top: .26;                                          /* the top-left specular raised */
}
html[data-theme="dark"][data-glass="more"] .lg-slab {
  --glass-fill: rgb(22 33 58 / 0.22); --glass-core: rgb(22 33 58 / 0.12);         /* W2b: body ~.31 = the standard level (was .42, denser than standard) */
  --glass-sheen: .16; --glass-top: .09;
}
/* W2b 2026-11-12: the two slab rules above out-rank the fallbacks; under them the shells take the page's fallback glass */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html[data-glass="more"] .lg-slab, html[data-theme="dark"][data-glass="more"] .lg-slab { --glass-fill: inherit; --glass-core: inherit; --glass-sheen: inherit; --glass-top: inherit; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-glass="more"] .lg-slab, html[data-theme="dark"][data-glass="more"] .lg-slab { --glass-fill: inherit; --glass-core: inherit; }
}

/* ---------- W2 2026-11-11 (R1-F7): solid elements directly on the field (.tz-onfield) keep a visible hairline and shadow ---------- */
html[data-glass="more"] { --onfield-hairline: rgb(24 27 33 / .14); --onfield-shadow: 0 1px 2px rgb(24 27 33 / .08), 0 12px 28px -14px rgb(24 27 33 / .32); }
html[data-theme="dark"][data-glass="more"] { --onfield-hairline: rgb(255 255 255 / .16); --onfield-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 1px 2px rgb(0 0 0 / .40), 0 14px 30px -14px rgb(0 0 0 / .75); }

/* ---------- status chips: the tone fill restated per tone, plus a tone hairline, so it never melts into a warm platter ---------- */
html[data-glass="more"] .tz-chip--ok      { background: color-mix(in srgb, var(--ok) 18%, var(--sheet));      box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 30%, transparent); }
html[data-glass="more"] .tz-chip--warn    { background: color-mix(in srgb, var(--warn) 18%, var(--sheet));    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 34%, transparent); }
html[data-glass="more"] .tz-chip--late    { background: color-mix(in srgb, var(--late) 18%, var(--sheet));    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--late) 30%, transparent); }
html[data-glass="more"] .tz-chip--review  { background: color-mix(in srgb, var(--review) 18%, var(--sheet));  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--review) 30%, transparent); }
html[data-glass="more"] .tz-chip--neutral { background: color-mix(in srgb, var(--neutral) 18%, var(--sheet)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--neutral) 30%, transparent); }
@media (forced-colors: active) { html[data-glass="more"] .tz-chip { box-shadow: none; } }
html[data-theme="dark"][data-glass="more"] .lg-slab .lg-lens { --lens-backdrop: blur(1.5px) saturate(1.1) brightness(.84); --lg-tone: saturate(1.1) brightness(.84); }   /* the white label under the lens on a clearer shell keeps 4.5:1 */
/* R3.1 (CHECK-look F2): on a phone in Evening the white mark of the top bar showed through the head of the task card and of
   a window (crumb 3.11:1, title 3.87:1): the frame keeps its glass look on the ground colour at 72%, which gives 5.43 and 7.63 */
@media (max-width: 767px) { html[data-theme="dark"][data-glass="more"] :is(.tz-drawer, .tz-dialog).lg-glass::before { background-color: rgb(12 20 37 / .72); } }
/* Turon TZ world: backgrounds a person picks for themselves («Фон»). Ported from proto/world/grounds.css by package G1.
   In the product it is part of world.css, right after more.css (tools/bundle.js). API: proto/world/GROUNDS.md; changes: notes/G1.md.

   <html data-ground="ocean|sunset|forest|aurora|sand|graphite|lines|custom">; no attribute = «Поле света», the world's own field,
   untouched. ground.js (appended to world-boot.js, sync, first in <head>) sets the attribute before first paint.
   Raw colours below are preset TOKEN definitions (like tokens.css), not the paint of a skin; the control part uses tokens only.

   How a preset is built: it re-defines the SAME tokens the world paints the ground from
     --ground            the base colour (also the colour of <html>, so overscroll matches)
     --light-1 / -a      first light (rgb triple / alpha)
     --light-2 / -a      second light
     --ground-rings      the structure layer the glass rims bend (the world's coverage rings, or the preset's own lines)
     --ground-paint      the whole field as ONE background list; body::before and the scroll-edge layers under the floating bars
                         (components.css) all paint this same value, so content keeps dissolving into the right field
   plus a few new ones:
     --light-3 / -a      third light
     --g1 --g2 --g3      "<size> at <position>" of the three lights, in % of the viewport (so a 60px swatch is an exact miniature)
     --g-bands           optional extra layers between the structure and the lights (the aurora curtains, the fade over the lines)
     --g-boost           1 at the standard and solid levels, 1.35 at «больше стекла» (every light alpha is multiplied by it)

   Specificity: every rule is :root[...] (0,2,0) so it out-ranks html[data-theme="dark"] (tokens.css) and html[data-glass="more"]
   (more.css, including its phone variant) whatever the load order. Static, one paint, no animation, no filter.
   Limits every preset keeps (measured, see GROUNDS.md): Evening field stays dark enough and Daylight bright enough for --text-2
   written straight on the field (>= 4.5:1) at both the standard and the «больше стекла» level. No purple. */

/* ---------- defaults; swatches reset what they would otherwise inherit from <html> ---------- */
:root { --g-boost: 1; }
:root[data-glass="more"] { --g-boost: 1.35; }
:root, .tz-ground__paint {
  --light-3: 0 0 0; --light-3-a: 0;
  --g1: 78% 118% at 0% 0%;
  --g2: 70% 100% at 100% 100%;
  --g3: 56% 84% at 100% 0%;
  --g-bands: none;
}
.tz-ground__paint { --ground-rings: none; }   /* 1px rings do not survive a 60px miniature */

/* ---------- the one formula ---------- */
:root[data-ground], .tz-ground__paint {
  --ground-paint:
    var(--ground-rings) 0 0 / 100% 100% no-repeat,
    var(--g-bands),
    radial-gradient(var(--g1), rgb(var(--light-1) / calc(var(--light-1-a) * var(--g-boost))) 0%, rgb(var(--light-1) / calc(var(--light-1-a) * var(--g-boost) * .55)) 38%, rgb(var(--light-1) / 0) 72%),
    radial-gradient(var(--g3), rgb(var(--light-3) / calc(var(--light-3-a) * var(--g-boost))) 0%, rgb(var(--light-3) / calc(var(--light-3-a) * var(--g-boost) * .5)) 40%, rgb(var(--light-3) / 0) 74%),
    radial-gradient(var(--g2), rgb(var(--light-2) / calc(var(--light-2-a) * var(--g-boost))) 0%, rgb(var(--light-2) / calc(var(--light-2-a) * var(--g-boost) * .5)) 40%, rgb(var(--light-2) / 0) 74%),
    var(--ground);
}

/* ---------- «Поле света» (field): the default. <html> never carries data-ground="field"; this block only feeds the swatch ----------
   R3: the Turon ground (= tokens.css): Turon blue light top-left plus pale ice bottom-right; the warm sand light is gone.
   Песок and Графит (Evening), Линии and Своё фото follow the new base; Океан, Закат, Лес, Северное сияние are unchanged. */
.tz-ground__paint[data-ground="field"] {
  --ground: #F0F3FA;
  --light-1: 55 120 245;  --light-1-a: 0.2;
  --light-2: 180 222 252; --light-2-a: 0.55;
}
:root[data-theme="dark"] .tz-ground__paint[data-ground="field"] {
  --ground: #0C1425;
  --light-1: 17 45 179;  --light-1-a: 0.3;
  --light-2: 8 77 112; --light-2-a: 0.22;
}

/* ---------- «Океан» (ocean): deep blue into teal ---------- */
:root[data-ground="ocean"], .tz-ground__paint[data-ground="ocean"] {
  --ground: #E9F2F7;
  --light-1: 37 141 255;  --light-1-a: .26;
  --light-2: 40 186 196;  --light-2-a: .36;
  --light-3: 60 196 206;  --light-3-a: .34;
  --g2: 86% 110% at 100% 100%;
  --g3: 64% 96% at 100% 0%;
}
:root[data-theme="dark"][data-ground="ocean"], :root[data-theme="dark"] .tz-ground__paint[data-ground="ocean"] {
  --ground: #071421;
  --light-1: 24 92 214;   --light-1-a: .42;
  --light-2: 14 140 150;  --light-2-a: .30;
  --light-3: 12 150 160;  --light-3-a: .30;
}

/* ---------- «Закат» (sunset): a dusk sky: amber light from the top-right, coral low on the right, the blue kept faint ---------- */
:root[data-ground="sunset"], .tz-ground__paint[data-ground="sunset"] {
  --ground: #F8EFE6;
  --light-1: 120 170 255; --light-1-a: .06;   /* almost no blue, or it reads as the default field (review G7) */
  --light-2: 255 150 128; --light-2-a: .36;
  --light-3: 255 184 112; --light-3-a: .56;
  --g2: 84% 104% at 100% 100%;
  --g3: 66% 100% at 100% 0%;
}
:root[data-theme="dark"][data-ground="sunset"], :root[data-theme="dark"] .tz-ground__paint[data-ground="sunset"] {
  --ground: #0E1422;
  --light-1: 30 95 216;   --light-1-a: .20;
  --light-2: 214 92 76;   --light-2-a: .20;
  --light-3: 226 132 56;  --light-3-a: .28;
}

/* ---------- «Лес» (forest): green and teal ---------- */
:root[data-ground="forest"], .tz-ground__paint[data-ground="forest"] {
  --ground: #ECF4EF;
  --light-1: 64 186 136;  --light-1-a: .26;
  --light-2: 52 178 190;  --light-2-a: .30;
  --light-3: 168 214 140; --light-3-a: .24;
}
:root[data-theme="dark"][data-ground="forest"], :root[data-theme="dark"] .tz-ground__paint[data-ground="forest"] {
  --ground: #08171A;
  --light-1: 22 128 92;   --light-1-a: .34;
  --light-2: 14 124 138;  --light-2-a: .30;
  --light-3: 70 140 70;   --light-3-a: .12;
}

/* ---------- «Северное сияние» (aurora): three slanted curtains, blue - cyan - green, fading downward. The richest one ---------- */
:root[data-ground="aurora"], .tz-ground__paint[data-ground="aurora"] {
  --ground: #EEF4F7;
  --light-1: 37 141 255;  --light-1-a: .16;
  --light-2: 120 214 176; --light-2-a: .22;
  --g-bands:
    linear-gradient(180deg, rgb(238 244 247 / 0) 0%, rgb(238 244 247 / .30) 46%, rgb(238 244 247 / .86) 100%),
    linear-gradient(104deg, rgb(84 156 255 / 0) 2%, rgb(84 156 255 / calc(.40 * var(--g-boost))) 19%, rgb(84 156 255 / 0) 38%),
    linear-gradient(113deg, rgb(64 200 224 / 0) 30%, rgb(64 200 224 / calc(.38 * var(--g-boost))) 49%, rgb(64 200 224 / 0) 66%),
    linear-gradient(121deg, rgb(110 214 164 / 0) 58%, rgb(110 214 164 / calc(.36 * var(--g-boost))) 76%, rgb(110 214 164 / 0) 94%);
}
:root[data-theme="dark"][data-ground="aurora"], :root[data-theme="dark"] .tz-ground__paint[data-ground="aurora"] {
  --ground: #07121D;
  --light-1: 30 95 216;   --light-1-a: .20;
  --light-2: 20 130 110;  --light-2-a: .14;
  --g-bands:
    linear-gradient(180deg, rgb(7 18 29 / 0) 0%, rgb(7 18 29 / .34) 46%, rgb(7 18 29 / .90) 100%),
    linear-gradient(104deg, rgb(34 100 232 / 0) 2%, rgb(34 100 232 / calc(.44 * var(--g-boost))) 19%, rgb(34 100 232 / 0) 38%),
    linear-gradient(113deg, rgb(18 160 196 / 0) 30%, rgb(18 160 196 / calc(.30 * var(--g-boost))) 49%, rgb(18 160 196 / 0) 66%),
    linear-gradient(121deg, rgb(30 176 122 / 0) 58%, rgb(30 176 122 / calc(.26 * var(--g-boost))) 76%, rgb(30 176 122 / 0) 94%);
}

:root[data-theme="light"][data-ground="aurora"][data-glass="more"] { --g-boost: 1.15; }   /* the blue curtain crosses the greeting on the phone (review G5) */

/* ---------- «Песок» (sand): warm, calm ---------- */
:root[data-ground="sand"], .tz-ground__paint[data-ground="sand"] {
  --ground: #F3EEE6;
  --light-1: 255 247 232; --light-1-a: .80;
  --light-2: 226 192 144; --light-2-a: .44;
  --light-3: 240 214 180; --light-3-a: .30;
}
:root[data-theme="dark"][data-ground="sand"], :root[data-theme="dark"] .tz-ground__paint[data-ground="sand"] {
  --ground: #101725;   /* the world's navy stays the base in Evening; only the lights are warm (review G3) */
  --light-1: 176 124 66;  --light-1-a: .18;
  --light-2: 184 116 58;  --light-2-a: .20;
  --light-3: 150 112 70;  --light-3-a: .10;
}

/* ---------- «Графит» (graphite): neutral, almost flat ---------- */
:root[data-ground="graphite"], .tz-ground__paint[data-ground="graphite"] {
  --ground: #EBEDF1;
  --light-1: 255 255 255; --light-1-a: .70;
  --light-2: 196 202 212; --light-2-a: .40;
}
:root[data-theme="dark"][data-ground="graphite"], :root[data-theme="dark"] .tz-ground__paint[data-ground="graphite"] {
  --ground: #0F1623;   /* navy-leaning, to sit with the navy sheets (review G3) */
  --light-1: 150 164 188; --light-1-a: .11;
  --light-2: 110 120 140; --light-2-a: .07;
}

/* ---------- «Линии» (lines): fine arcs crossing the bars on a slant, so the rims have something to bend ---------- */
:root[data-ground="lines"] { --g-gap: 22px; }
.tz-ground__paint[data-ground="lines"] { --g-gap: 7px; }
:root[data-ground="lines"], .tz-ground__paint[data-ground="lines"] {
  --ground: #F0F3FA;
  --g-line: 24 27 33; --g-line-a: .10;
  --light-1: 55 120 245;  --light-1-a: .14;
  --light-2: 201 214 255; --light-2-a: .26;
  --ground-rings: repeating-radial-gradient(circle at 118% 150%,
    rgb(var(--g-line) / 0) 0, rgb(var(--g-line) / 0) calc(var(--g-gap) - 1.6px),
    rgb(var(--g-line) / var(--g-line-a)) calc(var(--g-gap) - 1.1px), rgb(var(--g-line) / var(--g-line-a)) calc(var(--g-gap) - .5px),
    rgb(var(--g-line) / 0) var(--g-gap));
  --g-bands: linear-gradient(200deg, rgb(240 243 250 / 0) 30%, rgb(240 243 250 / 0.55) 100%);   /* the lines thin out away from the bars */
}
:root[data-theme="dark"][data-ground="lines"], :root[data-theme="dark"] .tz-ground__paint[data-ground="lines"] {
  --ground: #0C1425;
  --g-line: 255 255 255; --g-line-a: .085;
  --light-1: 17 45 179;   --light-1-a: .26;
  --light-2: 6 31 153;   --light-2-a: .22;
  --g-bands: linear-gradient(200deg, rgb(12 20 37 / 0) 30%, rgb(12 20 37 / 0.55) 100%);
}

/* ---------- «Своё фото» (custom): the person's photo under an honest fixed scrim per theme ----------
   The photo is softened once, when it is saved (ground.js), so nothing is filtered at run time: one static paint.
   --ground-thumb: a ~1 KB preview painted at once; --ground-photo: the full image (a blob: URL), swapped in on top when it is decoded.
   The scrim is sized for the worst photo: Evening over a pure white frame, Daylight over a pure black one (numbers in GROUNDS.md). */
:root[data-ground="custom"] {
  --ground: #DDE2EA;
  --g-scrim: 240 243 250; --g-scrim-a: .83;
  --ground-paint:
    linear-gradient(rgb(var(--g-scrim) / var(--g-scrim-a)), rgb(var(--g-scrim) / var(--g-scrim-a))),
    var(--ground-photo, none) 50% 50% / cover no-repeat,
    var(--ground-thumb, none) 50% 50% / cover no-repeat,
    var(--ground);
}
:root[data-theme="dark"][data-ground="custom"] {
  --ground: #0C1425;
  --g-scrim: 12 20 37; --g-scrim-a: .78;
}


/* ---------- the control «Фон» (markup from TZGround.controlHtml(), behaviour from TZGround.bindControl(root)) ----------
   Each swatch: a miniature of the ground with the tick on it, and its name written under it (review G8: Evening miniatures
   alone are hard to tell apart, and title tooltips do not exist on touch). */
.tz-ground { display: block; min-width: 0; }
.tz-ground__title { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.tz-ground__name { margin-left: auto; font-weight: var(--w-regular); color: var(--text-1); }
.tz-ground__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 0 2px; }
.tz-ground__set { display: contents; }
.tz-ground__sw {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0;
  padding: 4px 2px 4px; border: 0; border-radius: 14px; background: none; cursor: pointer;
  color: var(--text-2); font: inherit; text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.tz-ground__paint {
  position: relative; display: block; flex: none; width: 100%; height: 40px; border-radius: 10px;
  background: var(--ground-paint);
  box-shadow: inset 0 0 0 1px var(--control-hairline);
  forced-color-adjust: none;
}
.tz-ground__cap {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  min-height: 2.5em; padding: 0 2px;
  font: var(--w-regular) var(--t-xs)/1.25 var(--font-text); color: inherit;
  overflow-wrap: break-word; hyphens: auto;
}
/* Evening miniatures: the lights are shown stronger than on the real field, or four of the tiles are the same near-black (review G8) */
:root[data-theme="dark"] .tz-ground__paint { --g-boost: 1.9; }
.tz-ground__paint--photo {
  --ground-paint: var(--ground-thumb, var(--ground-photo, none)) 50% 50% / cover no-repeat, var(--well);
}
/* selected: an outer ring AND a tick AND the name in full weight (never colour alone) */
.tz-ground__sw[aria-checked="true"] { color: var(--text-1); }
.tz-ground__sw[aria-checked="true"] > .tz-ground__cap { font-weight: var(--w-medium); }
.tz-ground__sw[aria-checked="true"] > .tz-ground__paint { box-shadow: inset 0 0 0 1px var(--control-hairline), 0 0 0 2px var(--text-1); }
.tz-ground__tick {
  position: absolute; right: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%;
  display: none; place-items: center; background: var(--text-1); color: var(--sheet);
}
.tz-ground__tick > svg { width: 12px; height: 12px; display: block; }
.tz-ground__sw[aria-checked="true"] .tz-ground__tick { display: grid; }
.tz-ground__sw:hover { color: var(--text-1); }
.tz-ground__sw:hover > .tz-ground__paint { box-shadow: inset 0 0 0 1px var(--control-hairline), 0 0 0 1px var(--text-2); }
.tz-ground__sw[aria-checked="true"]:hover > .tz-ground__paint { box-shadow: inset 0 0 0 1px var(--control-hairline), 0 0 0 2px var(--text-1); }
.tz-ground__sw:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; box-shadow: none; }
.tz-ground__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 2px 2px; }
.tz-ground__actions > .tz-btn { --btn-h: 44px; flex: 1 1 auto; padding: 0 14px; font-size: var(--t-sm); font-weight: var(--w-medium); }
.tz-ground__actions > .tz-btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.tz-ground__msg { margin: 0; padding: 6px 12px 2px; font: var(--w-regular) var(--t-sm)/1.4 var(--font-text); color: var(--text-1); }
.tz-ground__msg:empty { display: none; }
.tz-ground__note { display: none; margin: 0; padding: 6px 12px 2px; font: var(--w-regular) var(--t-sm)/1.4 var(--font-text); color: var(--text-2); }
@media (max-width: 640px) { .tz-ground__paint { height: 44px; } }

/* ---------- honest fallbacks (these must stay the LAST rules of the file) ----------
   prefers-reduced-transparency: nothing changes here. The ground is an opaque paint; the glass above it goes solid (tokens.css).
   prefers-contrast: more: no lights, no pattern, no photo: the flat base colour of the chosen background.
   forced-colors: Canvas, as the world does; the swatches would be identical empty boxes there, so the grid is hidden and the note stays.
   print: base.css (F4) already hides the ground layers and prints white; here no preset and no photo may reach paper, and the
   control is not printed (review G4: the theme's text colours are the print sheet's job, not this file's). */
@media (prefers-contrast: more) {
  :root[data-ground], .tz-ground__paint { --ground-paint: var(--ground); }
  .tz-ground__paint--photo { --ground-paint: var(--well); }
  .tz-ground__note { display: block; }
}
@media (forced-colors: active) {
  :root[data-ground], .tz-ground__paint { --ground-paint: Canvas; }
  .tz-ground__paint { box-shadow: inset 0 0 0 1px CanvasText; }
  .tz-ground__sw[aria-checked="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
  .tz-ground__tick { background: CanvasText; color: Canvas; forced-color-adjust: none; }
  .tz-ground__grid { display: none; }
  .tz-ground__note { display: block; }
}
@media print {
  :root[data-ground], :root[data-ground="custom"], .tz-ground__paint { --ground-paint: none; }
  .tz-ground, .tz-ground__file { display: none; }
}
/* components-2.css (K1): shared components the first world lacked. Documented in build/notes/K1.md, in the style of WORLD.md.
   1. Dialog         .tz-scrim > .tz-dialog.lg-glass.lg-lift > __head + __body + __foot
   2. Drawer frame   .tz-scrim > .tz-drawer.lg-glass > __head + __body
   3. Toolbar island .tz-island.lg-glass > __group / __sep / __grow / __field / __scroll
   Rule for 1 and 2: glass is the host's ::before, so the FRAME never scrolls. Head and foot are the glass, the body is a
   solid sheet (T1) and the only scroller. No glass inside glass: controls in the head and the foot are fills.
   Nothing here needs the world reset: every part sets its own box, so a frame can hold legacy content
   (the product's modal() does: only its head carries .tz-world). */

/* ---------- scrim ---------- */
.tz-scrim { background: var(--scrim); }

/* ---------- 1. dialog ---------- */
.tz-dialog {
  --lg-r: var(--r-xl);
  --frame-pad: var(--sp-2);
  display: flex; flex-direction: column;
  box-sizing: border-box;
  width: min(580px, 100%); min-width: 0;   /* min-width: a grid or flex parent must not grow the frame to its content */
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  padding: 0 var(--frame-pad) var(--frame-pad);
  overflow: visible;
  color: var(--text-1);
}
.tz-dialog--wide { width: min(760px, 100%); }
.tz-dialog__head, .tz-drawer__head {
  display: flex; align-items: center; gap: var(--sp-3);
  box-sizing: border-box; flex: none;
  min-height: calc(var(--ctl-h) + var(--sp-4));
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-3);
  font: var(--w-regular) var(--t-ui)/1.4 var(--font-text);
}
.tz-dialog__title {
  flex: 1 1 auto; min-width: 0; margin: 0;
  font: var(--w-medium) var(--t-h4)/1.3 var(--font-text); letter-spacing: 0;
  color: var(--text-1);
  overflow-wrap: anywhere; text-wrap: balance;
}
/* the close control: a fill on the glass (never glass in glass); 40px, 44px on touch through --ctl-h */
.tz-dialog__head > .tz-dialog__close, .tz-drawer__head > .tz-drawer__close {
  position: relative; inset: auto;
  display: inline-grid; place-items: center; flex: none;
  box-sizing: border-box;
  width: var(--ctl-h); height: var(--ctl-h); margin: 0 0 0 auto; padding: 0;
  border: 0; border-radius: var(--r-control);   /* R2: a button on a window, radius 10 */
  background: var(--control-fill);
  box-shadow: inset 0 0 0 1px var(--control-hairline), inset 0 1px 0 rgb(var(--rim-hi) / var(--control-catch)), 0 1px 2px rgb(var(--shadow-rgb) / .06);
  color: var(--text-1);
  font: var(--w-regular) var(--t-h3)/1 var(--font-text);
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-std);
}
.tz-dialog__head > .tz-dialog__close:hover, .tz-drawer__head > .tz-drawer__close:hover { background: var(--control-fill-hover); }
.tz-dialog__head > .tz-dialog__close:focus-visible, .tz-drawer__head > .tz-drawer__close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-halo); }
.tz-dialog__body, .tz-drawer__body {
  box-sizing: border-box;
  flex: 1 1 auto; min-width: 0; min-height: 0;
  overflow: auto; overscroll-behavior: contain;
  scrollbar-color: var(--scroll-thumb) transparent; scrollbar-width: thin;
  padding: var(--pad-sheet);
  border-radius: calc(var(--lg-r) - var(--frame-pad));
  background: var(--sheet);
  box-shadow: inset 0 0 0 1px var(--sheet-hairline);
  color: var(--text-1);
}
.tz-dialog__body > :first-child { margin-top: 0; }
.tz-dialog__body > :last-child { margin-bottom: 0; }
.tz-dialog__foot {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--sp-2);
  box-sizing: border-box; flex: none;
  padding: var(--sp-3) var(--sp-1) var(--sp-1);
}
.tz-dialog__foot > * { margin: 0; }
/* a legacy actions row moved into the foot keeps its own flex row */
.tz-dialog__foot > :is(.plan-actions, .drawer-tools, .modal-actions) { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }
.tz-dialog__foot > .modal-actions { display: flex; align-items: center; gap: var(--sp-2); }   /* R2: every window (was scoped in l-team.css) */
.tz-dialog__foot--split { justify-content: space-between; }
/* text straight on the glass foot is not safe (measured 2.41:1 in Daylight over a dark page): a ghost or quiet button gets the fill here */
.tz-dialog__foot :is(.tz-btn--ghost, .btn.quiet), .tz-drawer__head :is(.tz-btn--ghost, .btn.quiet), .tz-dialog__head :is(.tz-btn--ghost, .btn.quiet) {
  background: var(--control-fill);
  box-shadow: inset 0 0 0 1px var(--control-hairline);
  color: var(--text-1);
}
.tz-dialog__foot :is(.tz-btn--ghost, .btn.quiet):hover { background: var(--control-fill-hover); }

/* ---------- 2. drawer frame (the task card and every later side sheet) ---------- */
.tz-drawer {
  --lg-r: var(--r-xl);
  --frame-pad: var(--sp-2);
  display: flex; flex-direction: column;
  box-sizing: border-box;
  width: min(776px, calc(100vw - 2 * var(--sp-3)));
  height: calc(100% - 2 * var(--sp-3));
  margin: var(--sp-3);
  padding: 0 var(--frame-pad) var(--frame-pad);
  box-shadow: var(--glass-shadow-lift);
  color: var(--text-1);
  animation: tz-drawer-in var(--dur-3) var(--ease-out);
}
.tz-drawer.is-still, body.tz-rerender .tz-drawer { animation: none; }
@keyframes tz-drawer-in { from { transform: translateX(32px); } }
.tz-drawer__head > :first-child { flex: 1 1 auto; min-width: 0; }
.tz-drawer__title {
  margin: 0; font: var(--w-medium) var(--t-ui)/1.3 var(--font-text); color: var(--text-1);   /* --text-2 on this head measured 4.3:1 in Evening */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 760px) {
  /* a phone: the frame is a sheet that rises from the bottom edge and leaves the status bar free */
  .tz-dialog { --frame-pad: 6px; }
  /* a phone allows three backdrop layers and the shell already has them (top bar, tab bar, a lens): over the scrim a
     frame is opaque glass here, lit rim kept. It is also a near full-screen blur less on a weak phone. */
  .tz-dialog, .tz-drawer {
    --glass-backdrop: none;
    --glass-fill: var(--well); --glass-fill-lift: var(--well);
    --glass-core: transparent; --glass-core-lift: transparent;
  }
  .tz-drawer {
    --frame-pad: 6px;
    align-self: flex-end;
    width: 100%; margin: 0;
    height: calc(100% - max(var(--sp-2), env(safe-area-inset-top)));
    padding-bottom: max(var(--frame-pad), env(safe-area-inset-bottom));
    border-radius: var(--lg-r) var(--lg-r) 0 0;
  }
  .tz-drawer > .tz-drawer__body, .tz-drawer > :last-child { border-bottom-left-radius: var(--r-md); border-bottom-right-radius: var(--r-md); }
  @keyframes tz-drawer-in { from { transform: translateY(40px); } }
}

/* ---------- 3. toolbar island: one floating glass bar for the controls of a page (filters, search, period) ---------- */
.tz-island {
  --lg-r: var(--r-sheet);   /* R2: a toolbar is not one of the capsule layers */
  display: flex; align-items: center; gap: var(--sp-2);
  box-sizing: border-box;
  min-height: calc(var(--ctl-h) + var(--sp-3));
  max-width: 100%;
  padding: 6px;
  color: var(--text-1);
  font: var(--w-medium) var(--t-ui)/1.3 var(--font-text);
}
.tz-island--sticky { position: sticky; top: calc(var(--shell-top, 0px) + var(--sp-2)); z-index: var(--z-sticky); }
.tz-island__group { display: flex; align-items: center; gap: var(--sp-1); min-width: 0; }
.tz-island__grow { flex: 1 1 auto; min-width: 0; }
.tz-island__sep { flex: none; width: 1px; align-self: stretch; margin: var(--sp-2) 2px; background: var(--control-hairline); }
.tz-island__label { flex: none; padding: 0 var(--sp-2); color: var(--text-2); white-space: nowrap; }   /* text on glass: never --text-3 */
/* a row of chips or tabs that may be wider than the bar scrolls INSIDE the island; the glass host itself never scrolls */
.tz-island__scroll { display: flex; align-items: center; gap: var(--sp-1); flex: 1 1 auto; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; border-radius: var(--r-control); }
.tz-island__scroll::-webkit-scrollbar { display: none; }
.tz-island__scroll > * { flex: none; }
/* the search field of an island: a fill, pill, icon on the left */
.tz-island__field { position: relative; display: flex; align-items: center; flex: 1 1 180px; min-width: 0; }
.tz-island__field > .ic, .tz-island__field > svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--text-2); pointer-events: none; }
.tz-island__field > input {
  box-sizing: border-box; width: 100%; height: var(--ctl-h); margin: 0; padding: 0 14px 0 38px;
  border: 0; border-radius: var(--r-control);
  background: var(--control-fill); color: var(--text-1);
  box-shadow: inset 0 0 0 1px var(--control-hairline);
  font: var(--w-regular) var(--t-ui)/1.4 var(--font-text);
}
.tz-island__field > input::placeholder { color: var(--text-2); opacity: 1; }
.tz-island__field > input:hover { background: var(--control-fill-hover); }
.tz-island__field > input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; box-shadow: 0 0 0 5px var(--focus-halo); }
@media (max-width: 640px) {
  .tz-island { padding: 5px; gap: var(--sp-1); }
  .tz-island__field > input { font-size: max(16px, var(--t-ui)); }   /* iOS never zooms */
}

/* ---------- fallbacks shared by the three ---------- */
@media (prefers-reduced-motion: reduce) { .tz-drawer { animation: none; } }
@media (forced-colors: active) {
  .tz-dialog, .tz-drawer, .tz-island { border: 1px solid CanvasText; }
  .tz-dialog__body, .tz-drawer__body { border: 1px solid CanvasText; box-shadow: none; }
  .tz-dialog__head > .tz-dialog__close, .tz-drawer__head > .tz-drawer__close, .tz-island__field > input { border: 1px solid CanvasText; }
}
@media print {
  .tz-scrim { background: transparent; }
  .tz-dialog, .tz-drawer { box-shadow: none; }
}
