/* 探微 Tanwei — generated by packages/css/build.mjs. Do not edit. */
/* -------------------------------------------
 *  Autogenerated by ⛋ Terrazzo. DO NOT EDIT!
 * ------------------------------------------- */

:root {
  color-scheme: light;
/* Deep lake fill, white text >= 7.0:1. */
  --tanwei-color-accent: var(--tanwei-palette-lake-700);
  --tanwei-color-accent-hover: var(--tanwei-palette-lake-800);
  --tanwei-color-accent-pressed: var(--tanwei-palette-lake-900);
  --tanwei-color-accent-soft: var(--tanwei-palette-lake-50);
  --tanwei-color-accent-soft-strong: var(--tanwei-palette-lake-100);
  /* Links and accent text (>= 6.0:1). */
  --tanwei-color-accent-text: var(--tanwei-palette-lake-700);
  /* Radial lake cyan spotlight sheen. */
  --tanwei-color-accent-wash: var(--tanwei-palette-alpha-lake-wash-light);
  /* Single-screen primary focus fill (ink on paper). Fill only, never text. */
  --tanwei-color-anchor: var(--tanwei-palette-night-900);
  --tanwei-color-anchor-glow: var(--tanwei-palette-alpha-anchor-glow-light);
  --tanwei-color-anchor-hover: var(--tanwei-palette-night-750);
  --tanwei-color-anchor-pressed: var(--tanwei-palette-night-950);
  /* Brand highlight (18k champagne gold) for dividers, glints, and specular rims on paper. */
  --tanwei-color-aurum: var(--tanwei-palette-aurum-500);
  /* Specular peak highlight along gilded bevels. */
  --tanwei-color-aurum-bright: var(--tanwei-palette-aurum-200);
  /* Warm champagne badge/pill ground. */
  --tanwei-color-aurum-soft: var(--tanwei-palette-mix-aurum-soft-light);
  /* Accessible bronze-gold eyebrow & telemetry text (>= 5.5:1 on paper). */
  --tanwei-color-aurum-text: var(--tanwei-palette-aurum-700);
  /* Radial champagne caustic sheen for SpotlightCard and crests. */
  --tanwei-color-aurum-wash: var(--tanwei-palette-alpha-aurum-wash-light);
  /* Paper: page ground. */
  --tanwei-color-bg: var(--tanwei-palette-sand-50);
  /* Default structural divider. */
  --tanwei-color-border: var(--tanwei-palette-sand-200);
  /* Hairline ring for popovers, menus and modals. */
  --tanwei-color-border-overlay: var(--tanwei-palette-alpha-border-overlay-light);
  /* Control outlines. */
  --tanwei-color-border-strong: var(--tanwei-palette-sand-300);
  /* Table row dividers and architectural hairlines. */
  --tanwei-color-border-subtle: var(--tanwei-palette-sand-150);
  --tanwei-color-danger: var(--tanwei-palette-red-700);
  --tanwei-color-danger-hover: var(--tanwei-palette-red-800);
  --tanwei-color-danger-pressed: var(--tanwei-palette-red-900);
  --tanwei-color-danger-soft: var(--tanwei-palette-red-soft);
  --tanwei-color-focus-ring: var(--tanwei-palette-alpha-ring-light);
  --tanwei-color-on-accent: var(--tanwei-palette-white);
  --tanwei-color-on-anchor: var(--tanwei-palette-sand-0);
  --tanwei-color-on-danger: var(--tanwei-palette-white);
  --tanwei-color-on-success: var(--tanwei-palette-white);
  --tanwei-color-on-warning: var(--tanwei-palette-white);
  --tanwei-color-scrim: var(--tanwei-palette-alpha-scrim-light);
  --tanwei-color-success: var(--tanwei-palette-green-700);
  --tanwei-color-success-soft: var(--tanwei-palette-green-soft);
  /* Inputs, panels, cards. */
  --tanwei-color-surface: var(--tanwei-palette-sand-0);
  /* Subtle hover wash on any surface. */
  --tanwei-color-surface-hover: var(--tanwei-palette-alpha-hover-light);
  /* Pressed wash on interactive items. */
  --tanwei-color-surface-pressed: var(--tanwei-palette-alpha-pressed-light);
  /* Floating popovers, menus, dialogs. */
  --tanwei-color-surface-raised: var(--tanwei-palette-sand-0);
  /* Recessed wells, segmented tracks. */
  --tanwei-color-surface-sunken: var(--tanwei-palette-sand-100);
  /* Primary body and heading ink. */
  --tanwei-color-text: var(--tanwei-palette-night-900);
  /* Disabled control labels and inactive metadata. */
  --tanwei-color-text-disabled: var(--tanwei-palette-night-400);
  /* Secondary labels, descriptions, and captions. */
  --tanwei-color-text-muted: var(--tanwei-palette-night-600);
  --tanwei-color-warning: var(--tanwei-palette-amber-700);
  --tanwei-color-warning-soft: var(--tanwei-palette-amber-soft);
  /* Deep lake fill, white text >= 7.0:1. */
  --tanwei-component-button-bg: var(--tanwei-color-accent);
  --tanwei-component-button-bg-hover: var(--tanwei-color-accent-hover);
  --tanwei-component-button-bg-pressed: var(--tanwei-color-accent-pressed);
  --tanwei-component-button-fg: var(--tanwei-color-on-accent);
  /* Button border radius (isolated from inputs and cards). */
  --tanwei-component-button-radius: var(--tanwei-shape-button);
  /* Inputs, panels, cards. */
  --tanwei-component-card-bg: var(--tanwei-color-surface);
  /* Hairline ring for popovers, menus and modals. */
  --tanwei-component-card-border: var(--tanwei-color-border-overlay);
  /* Comparison Card internal padding. */
  --tanwei-component-card-padding: var(--tanwei-layout-inset);
  /* Comparison Card border radius. */
  --tanwei-component-card-radius: var(--tanwei-shape-card);
  /* Switch and slider thumb. */
  --tanwei-component-control-thumb: var(--tanwei-palette-white);
  /* Floating popovers, menus, dialogs. */
  --tanwei-component-dialog-bg: var(--tanwei-color-surface-raised);
  /* Hairline ring for popovers, menus and modals. */
  --tanwei-component-dialog-border: var(--tanwei-color-border-overlay);
  /* Modal Dialog border radius. */
  --tanwei-component-dialog-radius: var(--tanwei-shape-dialog);
  /* Modal Dialog elevation shadow. */
  --tanwei-component-dialog-shadow: var(--tanwei-shadow-lg);
  /* Inputs, panels, cards. */
  --tanwei-component-input-bg: var(--tanwei-color-surface);
  /* Control outlines. */
  --tanwei-component-input-border: var(--tanwei-color-border-strong);
  /* Deep lake fill, white text >= 7.0:1. */
  --tanwei-component-input-border-focus: var(--tanwei-color-accent);
  /* TextField and Select trigger border radius. */
  --tanwei-component-input-radius: var(--tanwei-shape-control);
  --tanwei-component-prism-accent-cage: var(--tanwei-palette-lake-400);
  --tanwei-component-prism-accent-hi: var(--tanwei-palette-lake-500);
  --tanwei-component-prism-aurum-cage: var(--tanwei-palette-aurum-400);
  --tanwei-component-prism-aurum-hi: var(--tanwei-palette-aurum-500);
  /* Specular pearl center fill for Meissner pivot jewels on paper. */
  --tanwei-component-prism-core: var(--tanwei-palette-sand-0);
  --tanwei-component-prism-danger-cage: var(--tanwei-palette-red-300);
  --tanwei-component-prism-danger-hi: var(--tanwei-palette-red-700);
  --tanwei-component-prism-success-cage: var(--tanwei-palette-green-300);
  --tanwei-component-prism-success-hi: var(--tanwei-palette-green-700);
  --tanwei-component-prism-warning-cage: var(--tanwei-palette-orange-300);
  --tanwei-component-prism-warning-hi: var(--tanwei-palette-amber-700);
  /* Soft misty lake-daylight horizon glow in Light theme. */
  --tanwei-component-sky-horizon: var(--tanwei-palette-lake-50);
  --tanwei-component-star-edge: var(--tanwei-palette-night-900);
  /* Starlight dot fill <= 14px. Paired with edge on paper for >= 3:1. */
  --tanwei-component-star-fill: var(--tanwei-palette-aurum-400);
  --tanwei-component-star-glow: var(--tanwei-palette-alpha-star-glow-light);
  /* Empty star outline (>= 3:1 WCAG 1.4.11 on paper). */
  --tanwei-component-star-off: var(--tanwei-palette-night-400);
  /* Standard marketing and workspace content frame. */
  --tanwei-container-default: 1240px;
  /* Long-form editorial articles, changelogs, and focused forms. */
  --tanwei-container-narrow: 920px;
  /* Full-span dashboards and multi-column directories. */
  --tanwei-container-wide: 1400px;
  --tanwei-control-font-size: 14px;
  --tanwei-control-height-lg: 44px;
  --tanwei-control-height-md: 36px;
  --tanwei-control-height-sm: 30px;
  /* Minimum hit area for pointer targets. */
  --tanwei-control-min-target: 32px;
  --tanwei-control-padding-x-lg: 22px;
  --tanwei-control-padding-x-md: 16px;
  --tanwei-control-padding-x-sm: 12px;
  --tanwei-duration-base: 200ms;
  --tanwei-duration-fast: 140ms;
  --tanwei-duration-glow: 500ms;
  --tanwei-duration-micro: 110ms;
  --tanwei-duration-slow: 320ms;
  --tanwei-easing-exit: cubic-bezier(0.4, 0, 1, 1);
  --tanwei-easing-snappy: cubic-bezier(0.2, 0, 0, 1);
  --tanwei-easing-standard: cubic-bezier(0.3, 0.7, 0.4, 1);
  --tanwei-font-family-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "Consolas", monospace;
  --tanwei-font-family-numeral: "Bodoni Moda", "Plus Jakarta Sans", serif;
  --tanwei-font-family-sans: "Plus Jakarta Sans", "Alimama FangYuanTi VF", "PingFang SC", "Noto Sans SC", sans-serif;
  --tanwei-font-family-serif: "Bodoni Moda", "Noto Serif SC", "Source Han Serif CN", "Songti SC", serif;
  --tanwei-font-line-height-normal: 1.72;
  --tanwei-font-line-height-relaxed: 1.84;
  --tanwei-font-line-height-snug: 1.4;
  --tanwei-font-line-height-tight: 1.14;
  --tanwei-font-size-2xl: 20px;
  --tanwei-font-size-3xl: 24px;
  --tanwei-font-size-4xl: 30px;
  --tanwei-font-size-5xl: 38px;
  --tanwei-font-size-6xl: 48px;
  --tanwei-font-size-7xl: 60px;
  --tanwei-font-size-base: 15px;
  --tanwei-font-size-lg: 16px;
  --tanwei-font-size-md: 14px;
  --tanwei-font-size-sm: 13.5px;
  --tanwei-font-size-xl: 18px;
  --tanwei-font-size-xs: 12px;
  --tanwei-font-weight-bold: 700;
  --tanwei-font-weight-extralight: 200;
  --tanwei-font-weight-light: 300;
  --tanwei-font-weight-medium: 500;
  --tanwei-font-weight-regular: 400;
  --tanwei-font-weight-semibold: 600;
  --tanwei-font-weight-text: 450;
  /* Default gap between sibling controls. */
  --tanwei-layout-gap: 12px;
  /* Horizontal page container gutter. */
  --tanwei-layout-gutter: 40px;
  /* Card, panel, and dialog interior padding. */
  --tanwei-layout-inset: 24px;
  /* Vertical breathing rhythm for open page sections. */
  --tanwei-layout-section-y: 96px;
  /* Default vertical stack rhythm between content blocks. */
  --tanwei-layout-stack-gap: 24px;
  --tanwei-motion-duration: var(--tanwei-duration-base);
  --tanwei-motion-duration-fast: var(--tanwei-duration-fast);
  --tanwei-motion-duration-glow: var(--tanwei-duration-glow);
  --tanwei-motion-duration-micro: var(--tanwei-duration-micro);
  --tanwei-motion-easing: var(--tanwei-easing-standard);
  --tanwei-motion-easing-exit: var(--tanwei-easing-exit);
  --tanwei-motion-easing-snappy: var(--tanwei-easing-snappy);
  --tanwei-palette-alpha-anchor-glow-dark: #fec9745e;
  --tanwei-palette-alpha-anchor-glow-light: #c98d0047;
  --tanwei-palette-alpha-aurum-wash-dark: #fec97426;
  --tanwei-palette-alpha-aurum-wash-light: #ebae451f;
  --tanwei-palette-alpha-border-overlay-dark: #efe5d221;
  --tanwei-palette-alpha-border-overlay-light: #1a171117;
  --tanwei-palette-alpha-hover-dark: #efe5d212;
  --tanwei-palette-alpha-hover-light: #1a17110d;
  --tanwei-palette-alpha-lake-wash-dark: #89c6e124;
  --tanwei-palette-alpha-lake-wash-light: #00789c14;
  --tanwei-palette-alpha-pressed-dark: #efe5d21f;
  --tanwei-palette-alpha-pressed-light: #1a171117;
  --tanwei-palette-alpha-ring-dark: #89c6e173;
  --tanwei-palette-alpha-ring-light: #00789c59;
  --tanwei-palette-alpha-scrim-dark: #0000008c;
  --tanwei-palette-alpha-scrim-light: #1a171159;
  --tanwei-palette-alpha-shade-dark-1: #0006;
  --tanwei-palette-alpha-shade-dark-2: #0000008c;
  --tanwei-palette-alpha-shade-light-1: #1a17110f;
  --tanwei-palette-alpha-shade-light-2: #1a171129;
  --tanwei-palette-alpha-shade-light-3: #1a171152;
  --tanwei-palette-alpha-star-glow-dark: #fec97480;
  --tanwei-palette-alpha-star-glow-light: #ebae4533;
  --tanwei-palette-amber-700: #935800;
  --tanwei-palette-amber-dim: #2d2224;
  --tanwei-palette-amber-soft: #f3ece1;
  --tanwei-palette-aurum-50: #fffdf9;
  --tanwei-palette-aurum-100: #fff4e4;
  --tanwei-palette-aurum-200: #ffe2b5;
  --tanwei-palette-aurum-300: #fec974;
  --tanwei-palette-aurum-400: #ebae45;
  --tanwei-palette-aurum-500: #c98d00;
  --tanwei-palette-aurum-600: #a37100;
  --tanwei-palette-aurum-700: #7e5600;
  --tanwei-palette-aurum-900: #2b1b00;
  --tanwei-palette-green-300: #64cd8d;
  --tanwei-palette-green-700: #007541;
  --tanwei-palette-green-dim: #11282c;
  --tanwei-palette-green-soft: #e0eee6;
  --tanwei-palette-lake-50: #e9f8ff;
  --tanwei-palette-lake-100: #d2effc;
  --tanwei-palette-lake-200: #b1def2;
  --tanwei-palette-lake-300: #89c6e1;
  --tanwei-palette-lake-400: #62aecf;
  --tanwei-palette-lake-500: #3393b9;
  --tanwei-palette-lake-600: #00789c;
  --tanwei-palette-lake-700: #006280;
  --tanwei-palette-lake-800: #004a62;
  --tanwei-palette-lake-900: #003446;
  --tanwei-palette-lake-950: #001f2c;
  --tanwei-palette-mix-accent-dim: #162a3d;
  --tanwei-palette-mix-accent-dim-strong: #20384c;
  --tanwei-palette-mix-aurum-soft-dark: #1f1f24;
  --tanwei-palette-mix-aurum-soft-light: #fdf4e7;
  --tanwei-palette-night-50: #f3f7fc;
  --tanwei-palette-night-100: #e7ecf3;
  --tanwei-palette-night-200: #ced5de;
  --tanwei-palette-night-300: #a5adb8;
  --tanwei-palette-night-400: #808994;
  --tanwei-palette-night-500: #616b78;
  --tanwei-palette-night-600: #495564;
  --tanwei-palette-night-700: #333f50;
  --tanwei-palette-night-750: #253243;
  --tanwei-palette-night-800: #192738;
  --tanwei-palette-night-850: #0e1c2e;
  --tanwei-palette-night-900: #061527;
  --tanwei-palette-night-925: #030e20;
  --tanwei-palette-night-950: #010819;
  --tanwei-palette-night-975: #000411;
  --tanwei-palette-orange-300: #f39757;
  --tanwei-palette-red-200: #ffb4b1;
  --tanwei-palette-red-250: #fa9893;
  --tanwei-palette-red-300: #f17a75;
  --tanwei-palette-red-700: #b42d29;
  --tanwei-palette-red-800: #9c2220;
  --tanwei-palette-red-900: #821918;
  --tanwei-palette-red-dim: #2c1d2a;
  --tanwei-palette-red-ink: #1e0604;
  --tanwei-palette-red-soft: #f8e9e8;
  --tanwei-palette-sand-0: #fffefd;
  --tanwei-palette-sand-50: #f8f5f0;
  --tanwei-palette-sand-100: #f0ece5;
  --tanwei-palette-sand-150: #eee9e1;
  --tanwei-palette-sand-200: #e6e0d7;
  --tanwei-palette-sand-300: #d0c9be;
  --tanwei-palette-starlight-moon-hi: #fcf4e4;
  --tanwei-palette-starlight-moon-lo: #ded2bc;
  --tanwei-palette-starlight-text: #efe5d2;
  --tanwei-palette-white: #fff;
  --tanwei-radius-full: 9999px;
  --tanwei-radius-lg: 14px;
  --tanwei-radius-md: 10px;
  --tanwei-radius-sm: 6px;
  --tanwei-radius-xl: 18px;
  --tanwei-radius-xs: 4px;
  --tanwei-shadow-lg: 0px 28px 56px -20px var(--tanwei-palette-alpha-shade-light-3);
  --tanwei-shadow-md: 0px 1px 2px var(--tanwei-palette-alpha-shade-light-1), 0px 10px 28px -12px var(--tanwei-palette-alpha-shade-light-2);
  --tanwei-shadow-popover: 0px 2px 6px var(--tanwei-palette-alpha-shade-light-1), 0px 12px 32px -8px var(--tanwei-palette-alpha-shade-light-2);
  --tanwei-shadow-sm: 0px 1px 2px var(--tanwei-palette-alpha-shade-light-1);
  --tanwei-shape-badge: var(--tanwei-radius-xs);
  --tanwei-shape-button: var(--tanwei-radius-sm);
  --tanwei-shape-card: var(--tanwei-radius-md);
  --tanwei-shape-checkbox: var(--tanwei-radius-sm);
  --tanwei-shape-control: var(--tanwei-radius-sm);
  --tanwei-shape-dialog: var(--tanwei-radius-lg);
  --tanwei-shape-panel: var(--tanwei-radius-md);
  --tanwei-shape-popover: var(--tanwei-radius-md);
  --tanwei-space-0: 0px;
  --tanwei-space-1: 4px;
  --tanwei-space-2: 8px;
  --tanwei-space-2-5: 10px;
  --tanwei-space-3: 12px;
  --tanwei-space-4: 16px;
  --tanwei-space-5: 20px;
  --tanwei-space-6: 24px;
  --tanwei-space-7: 28px;
  --tanwei-space-8: 32px;
  --tanwei-space-10: 40px;
  --tanwei-space-12: 48px;
  --tanwei-space-16: 64px;
  --tanwei-space-20: 80px;
  --tanwei-space-24: 96px;
  --tanwei-space-28: 112px;
  /* Checkbox, radio, and icon stroke weight. */
  --tanwei-stroke-control: 1.5px;
  --tanwei-typeface-body: var(--tanwei-font-family-sans);
  --tanwei-typeface-display: var(--tanwei-font-family-serif);
  --tanwei-typeface-heading: var(--tanwei-font-family-sans);
  --tanwei-typeface-mono: var(--tanwei-font-family-mono);
  --tanwei-typeface-numeral: var(--tanwei-font-family-numeral);
  /* Slide-over inspection sheets. */
  --tanwei-z-drawer: 900;
  /* Modal dialogs and global command palette. */
  --tanwei-z-modal: 1000;
  /* Select listboxes, dropdown menus, tooltips. */
  --tanwei-z-popover: 400;
  /* Sticky toolbars, table headers, and page sub-navigation. */
  --tanwei-z-sticky: 100;
  /* Non-blocking floating status notifications. */
  --tanwei-z-toast: 1100;
}

[data-theme="light"] {
  color-scheme: light;
/* Deep lake fill, white text >= 7.0:1. */
  --tanwei-color-accent: var(--tanwei-palette-lake-700);
  --tanwei-color-accent-hover: var(--tanwei-palette-lake-800);
  --tanwei-color-accent-pressed: var(--tanwei-palette-lake-900);
  --tanwei-color-accent-soft: var(--tanwei-palette-lake-50);
  --tanwei-color-accent-soft-strong: var(--tanwei-palette-lake-100);
  /* Links and accent text (>= 6.0:1). */
  --tanwei-color-accent-text: var(--tanwei-palette-lake-700);
  /* Radial lake cyan spotlight sheen. */
  --tanwei-color-accent-wash: var(--tanwei-palette-alpha-lake-wash-light);
  /* Single-screen primary focus fill (ink on paper). Fill only, never text. */
  --tanwei-color-anchor: var(--tanwei-palette-night-900);
  --tanwei-color-anchor-glow: var(--tanwei-palette-alpha-anchor-glow-light);
  --tanwei-color-anchor-hover: var(--tanwei-palette-night-750);
  --tanwei-color-anchor-pressed: var(--tanwei-palette-night-950);
  /* Brand highlight (18k champagne gold) for dividers, glints, and specular rims on paper. */
  --tanwei-color-aurum: var(--tanwei-palette-aurum-500);
  /* Specular peak highlight along gilded bevels. */
  --tanwei-color-aurum-bright: var(--tanwei-palette-aurum-200);
  /* Warm champagne badge/pill ground. */
  --tanwei-color-aurum-soft: var(--tanwei-palette-mix-aurum-soft-light);
  /* Accessible bronze-gold eyebrow & telemetry text (>= 5.5:1 on paper). */
  --tanwei-color-aurum-text: var(--tanwei-palette-aurum-700);
  /* Radial champagne caustic sheen for SpotlightCard and crests. */
  --tanwei-color-aurum-wash: var(--tanwei-palette-alpha-aurum-wash-light);
  /* Paper: page ground. */
  --tanwei-color-bg: var(--tanwei-palette-sand-50);
  /* Default structural divider. */
  --tanwei-color-border: var(--tanwei-palette-sand-200);
  /* Hairline ring for popovers, menus and modals. */
  --tanwei-color-border-overlay: var(--tanwei-palette-alpha-border-overlay-light);
  /* Control outlines. */
  --tanwei-color-border-strong: var(--tanwei-palette-sand-300);
  /* Table row dividers and architectural hairlines. */
  --tanwei-color-border-subtle: var(--tanwei-palette-sand-150);
  --tanwei-color-danger: var(--tanwei-palette-red-700);
  --tanwei-color-danger-hover: var(--tanwei-palette-red-800);
  --tanwei-color-danger-pressed: var(--tanwei-palette-red-900);
  --tanwei-color-danger-soft: var(--tanwei-palette-red-soft);
  --tanwei-color-focus-ring: var(--tanwei-palette-alpha-ring-light);
  --tanwei-color-on-accent: var(--tanwei-palette-white);
  --tanwei-color-on-anchor: var(--tanwei-palette-sand-0);
  --tanwei-color-on-danger: var(--tanwei-palette-white);
  --tanwei-color-on-success: var(--tanwei-palette-white);
  --tanwei-color-on-warning: var(--tanwei-palette-white);
  --tanwei-color-scrim: var(--tanwei-palette-alpha-scrim-light);
  --tanwei-color-success: var(--tanwei-palette-green-700);
  --tanwei-color-success-soft: var(--tanwei-palette-green-soft);
  /* Inputs, panels, cards. */
  --tanwei-color-surface: var(--tanwei-palette-sand-0);
  /* Subtle hover wash on any surface. */
  --tanwei-color-surface-hover: var(--tanwei-palette-alpha-hover-light);
  /* Pressed wash on interactive items. */
  --tanwei-color-surface-pressed: var(--tanwei-palette-alpha-pressed-light);
  /* Floating popovers, menus, dialogs. */
  --tanwei-color-surface-raised: var(--tanwei-palette-sand-0);
  /* Recessed wells, segmented tracks. */
  --tanwei-color-surface-sunken: var(--tanwei-palette-sand-100);
  /* Primary body and heading ink. */
  --tanwei-color-text: var(--tanwei-palette-night-900);
  /* Disabled control labels and inactive metadata. */
  --tanwei-color-text-disabled: var(--tanwei-palette-night-400);
  /* Secondary labels, descriptions, and captions. */
  --tanwei-color-text-muted: var(--tanwei-palette-night-600);
  --tanwei-color-warning: var(--tanwei-palette-amber-700);
  --tanwei-color-warning-soft: var(--tanwei-palette-amber-soft);
  /* Deep lake fill, white text >= 7.0:1. */
  --tanwei-component-button-bg: var(--tanwei-color-accent);
  --tanwei-component-button-bg-hover: var(--tanwei-color-accent-hover);
  --tanwei-component-button-bg-pressed: var(--tanwei-color-accent-pressed);
  --tanwei-component-button-fg: var(--tanwei-color-on-accent);
  /* Button border radius (isolated from inputs and cards). */
  --tanwei-component-button-radius: var(--tanwei-shape-button);
  /* Inputs, panels, cards. */
  --tanwei-component-card-bg: var(--tanwei-color-surface);
  /* Hairline ring for popovers, menus and modals. */
  --tanwei-component-card-border: var(--tanwei-color-border-overlay);
  /* Comparison Card internal padding. */
  --tanwei-component-card-padding: var(--tanwei-layout-inset);
  /* Comparison Card border radius. */
  --tanwei-component-card-radius: var(--tanwei-shape-card);
  /* Switch and slider thumb. */
  --tanwei-component-control-thumb: var(--tanwei-palette-white);
  /* Floating popovers, menus, dialogs. */
  --tanwei-component-dialog-bg: var(--tanwei-color-surface-raised);
  /* Hairline ring for popovers, menus and modals. */
  --tanwei-component-dialog-border: var(--tanwei-color-border-overlay);
  /* Modal Dialog border radius. */
  --tanwei-component-dialog-radius: var(--tanwei-shape-dialog);
  /* Modal Dialog elevation shadow. */
  --tanwei-component-dialog-shadow: var(--tanwei-shadow-lg);
  /* Inputs, panels, cards. */
  --tanwei-component-input-bg: var(--tanwei-color-surface);
  /* Control outlines. */
  --tanwei-component-input-border: var(--tanwei-color-border-strong);
  /* Deep lake fill, white text >= 7.0:1. */
  --tanwei-component-input-border-focus: var(--tanwei-color-accent);
  /* TextField and Select trigger border radius. */
  --tanwei-component-input-radius: var(--tanwei-shape-control);
  --tanwei-component-prism-accent-cage: var(--tanwei-palette-lake-400);
  --tanwei-component-prism-accent-hi: var(--tanwei-palette-lake-500);
  --tanwei-component-prism-aurum-cage: var(--tanwei-palette-aurum-400);
  --tanwei-component-prism-aurum-hi: var(--tanwei-palette-aurum-500);
  /* Specular pearl center fill for Meissner pivot jewels on paper. */
  --tanwei-component-prism-core: var(--tanwei-palette-sand-0);
  --tanwei-component-prism-danger-cage: var(--tanwei-palette-red-300);
  --tanwei-component-prism-danger-hi: var(--tanwei-palette-red-700);
  --tanwei-component-prism-success-cage: var(--tanwei-palette-green-300);
  --tanwei-component-prism-success-hi: var(--tanwei-palette-green-700);
  --tanwei-component-prism-warning-cage: var(--tanwei-palette-orange-300);
  --tanwei-component-prism-warning-hi: var(--tanwei-palette-amber-700);
  /* Soft misty lake-daylight horizon glow in Light theme. */
  --tanwei-component-sky-horizon: var(--tanwei-palette-lake-50);
  --tanwei-component-star-edge: var(--tanwei-palette-night-900);
  /* Starlight dot fill <= 14px. Paired with edge on paper for >= 3:1. */
  --tanwei-component-star-fill: var(--tanwei-palette-aurum-400);
  --tanwei-component-star-glow: var(--tanwei-palette-alpha-star-glow-light);
  /* Empty star outline (>= 3:1 WCAG 1.4.11 on paper). */
  --tanwei-component-star-off: var(--tanwei-palette-night-400);
  /* Dialogs, drawers, command palette. */
  --tanwei-shadow-lg: 0px 28px 56px -20px var(--tanwei-palette-alpha-shade-light-3);
  /* Paper cards. */
  --tanwei-shadow-md: 0px 1px 2px var(--tanwei-palette-alpha-shade-light-1), 0px 10px 28px -12px var(--tanwei-palette-alpha-shade-light-2);
  /* Dropdowns, menus, tooltips, toasts. */
  --tanwei-shadow-popover: 0px 2px 6px var(--tanwei-palette-alpha-shade-light-1), 0px 12px 32px -8px var(--tanwei-palette-alpha-shade-light-2);
  --tanwei-shadow-sm: 0px 1px 2px var(--tanwei-palette-alpha-shade-light-1);
}

[data-theme="dark"] {
  color-scheme: dark;
/* Lake: everyday interaction. */
  --tanwei-color-accent: var(--tanwei-palette-lake-300);
  --tanwei-color-accent-hover: var(--tanwei-palette-lake-200);
  --tanwei-color-accent-pressed: var(--tanwei-palette-lake-100);
  --tanwei-color-accent-soft: var(--tanwei-palette-mix-accent-dim);
  --tanwei-color-accent-soft-strong: var(--tanwei-palette-mix-accent-dim-strong);
  /* Links and accent text (>= 6.0:1). */
  --tanwei-color-accent-text: var(--tanwei-palette-lake-300);
  /* Radial lake cyan spotlight bloom. */
  --tanwei-color-accent-wash: var(--tanwei-palette-alpha-lake-wash-dark);
  /* Single-screen primary focus fill (moonlight on night). Fill only, never text. */
  --tanwei-color-anchor: var(--tanwei-palette-starlight-text);
  --tanwei-color-anchor-glow: var(--tanwei-palette-alpha-anchor-glow-dark);
  --tanwei-color-anchor-hover: var(--tanwei-palette-starlight-moon-hi);
  --tanwei-color-anchor-pressed: var(--tanwei-palette-starlight-moon-lo);
  /* Brand highlight (18k champagne gold) for dividers, glints, and specular rims on night. */
  --tanwei-color-aurum: var(--tanwei-palette-aurum-300);
  /* White-gold specular peak highlight along bevels. */
  --tanwei-color-aurum-bright: var(--tanwei-palette-aurum-100);
  /* Deep velvet-gold badge/pill ground. */
  --tanwei-color-aurum-soft: var(--tanwei-palette-mix-aurum-soft-dark);
  /* Luminous champagne gold eyebrow & telemetry text (>= 12:1 on night). */
  --tanwei-color-aurum-text: var(--tanwei-palette-aurum-200);
  /* Radial champagne caustic bloom for SpotlightCard and crests. */
  --tanwei-color-aurum-wash: var(--tanwei-palette-alpha-aurum-wash-dark);
  /* The night: page ground. */
  --tanwei-color-bg: var(--tanwei-palette-night-950);
  /* Default structural divider. */
  --tanwei-color-border: var(--tanwei-palette-night-800);
  /* Moonlight hairline ring so dark overlays never melt into scrims. */
  --tanwei-color-border-overlay: var(--tanwei-palette-alpha-border-overlay-dark);
  /* Control outlines. */
  --tanwei-color-border-strong: var(--tanwei-palette-night-700);
  /* Table row dividers and architectural hairlines. */
  --tanwei-color-border-subtle: var(--tanwei-palette-night-850);
  --tanwei-color-danger: var(--tanwei-palette-red-300);
  --tanwei-color-danger-hover: var(--tanwei-palette-red-250);
  --tanwei-color-danger-pressed: var(--tanwei-palette-red-200);
  --tanwei-color-danger-soft: var(--tanwei-palette-red-dim);
  --tanwei-color-focus-ring: var(--tanwei-palette-alpha-ring-dark);
  --tanwei-color-on-accent: var(--tanwei-palette-night-950);
  --tanwei-color-on-anchor: var(--tanwei-palette-night-950);
  --tanwei-color-on-danger: var(--tanwei-palette-red-ink);
  --tanwei-color-on-success: var(--tanwei-palette-night-950);
  --tanwei-color-on-warning: var(--tanwei-palette-night-950);
  --tanwei-color-scrim: var(--tanwei-palette-alpha-scrim-dark);
  --tanwei-color-success: var(--tanwei-palette-green-300);
  --tanwei-color-success-soft: var(--tanwei-palette-green-dim);
  /* Higher layers are lighter: light, not shadow. */
  --tanwei-color-surface: var(--tanwei-palette-night-900);
  /* Subtle hover wash on any surface. */
  --tanwei-color-surface-hover: var(--tanwei-palette-alpha-hover-dark);
  /* Pressed wash on interactive items. */
  --tanwei-color-surface-pressed: var(--tanwei-palette-alpha-pressed-dark);
  /* Floating popovers, menus, dialogs. */
  --tanwei-color-surface-raised: var(--tanwei-palette-night-850);
  /* Recessed wells, segmented tracks. */
  --tanwei-color-surface-sunken: var(--tanwei-palette-night-925);
  /* Primary body and heading ink. */
  --tanwei-color-text: var(--tanwei-palette-starlight-text);
  /* Disabled control labels and inactive metadata. */
  --tanwei-color-text-disabled: var(--tanwei-palette-night-500);
  /* Secondary labels, descriptions, and captions. */
  --tanwei-color-text-muted: var(--tanwei-palette-night-300);
  /* Orange, kept clear of champagne golds. */
  --tanwei-color-warning: var(--tanwei-palette-orange-300);
  --tanwei-color-warning-soft: var(--tanwei-palette-amber-dim);
  /* Lake: everyday interaction. */
  --tanwei-component-button-bg: var(--tanwei-color-accent);
  --tanwei-component-button-bg-hover: var(--tanwei-color-accent-hover);
  --tanwei-component-button-bg-pressed: var(--tanwei-color-accent-pressed);
  --tanwei-component-button-fg: var(--tanwei-color-on-accent);
  /* Button border radius (isolated from inputs and cards). */
  --tanwei-component-button-radius: var(--tanwei-shape-button);
  /* Higher layers are lighter: light, not shadow. */
  --tanwei-component-card-bg: var(--tanwei-color-surface);
  /* Moonlight hairline ring so dark overlays never melt into scrims. */
  --tanwei-component-card-border: var(--tanwei-color-border-overlay);
  /* Comparison Card internal padding. */
  --tanwei-component-card-padding: var(--tanwei-layout-inset);
  /* Comparison Card border radius. */
  --tanwei-component-card-radius: var(--tanwei-shape-card);
  /* Switch and slider thumb. */
  --tanwei-component-control-thumb: var(--tanwei-palette-starlight-text);
  /* Floating popovers, menus, dialogs. */
  --tanwei-component-dialog-bg: var(--tanwei-color-surface-raised);
  /* Moonlight hairline ring so dark overlays never melt into scrims. */
  --tanwei-component-dialog-border: var(--tanwei-color-border-overlay);
  /* Modal Dialog border radius. */
  --tanwei-component-dialog-radius: var(--tanwei-shape-dialog);
  /* Modal Dialog elevation shadow. */
  --tanwei-component-dialog-shadow: var(--tanwei-shadow-lg);
  /* Higher layers are lighter: light, not shadow. */
  --tanwei-component-input-bg: var(--tanwei-color-surface);
  /* Control outlines. */
  --tanwei-component-input-border: var(--tanwei-color-border-strong);
  /* Lake: everyday interaction. */
  --tanwei-component-input-border-focus: var(--tanwei-color-accent);
  /* TextField and Select trigger border radius. */
  --tanwei-component-input-radius: var(--tanwei-shape-control);
  --tanwei-component-prism-accent-cage: var(--tanwei-palette-lake-300);
  --tanwei-component-prism-accent-hi: var(--tanwei-palette-lake-100);
  --tanwei-component-prism-aurum-cage: var(--tanwei-palette-aurum-300);
  --tanwei-component-prism-aurum-hi: var(--tanwei-palette-aurum-100);
  /* Starlight white-gold pearl center fill for Meissner pivot jewels on night. */
  --tanwei-component-prism-core: var(--tanwei-palette-aurum-50);
  --tanwei-component-prism-danger-cage: var(--tanwei-palette-red-300);
  --tanwei-component-prism-danger-hi: var(--tanwei-palette-red-200);
  --tanwei-component-prism-success-cage: var(--tanwei-palette-green-300);
  --tanwei-component-prism-success-hi: var(--tanwei-palette-green-soft);
  --tanwei-component-prism-warning-cage: var(--tanwei-palette-orange-300);
  --tanwei-component-prism-warning-hi: var(--tanwei-palette-amber-soft);
  /* Bottom of the sky gradient (Sky, hero areas). */
  --tanwei-component-sky-horizon: var(--tanwei-palette-lake-900);
  --tanwei-component-star-edge: var(--tanwei-palette-aurum-300);
  /* Starlight dot fill <= 14px: done, unread, saved, rating. */
  --tanwei-component-star-fill: var(--tanwei-palette-aurum-300);
  --tanwei-component-star-glow: var(--tanwei-palette-alpha-star-glow-dark);
  /* Empty star outline (>= 3:1 WCAG 1.4.11 on night). */
  --tanwei-component-star-off: var(--tanwei-palette-night-500);
  /* Dialogs, drawers, command palette. */
  --tanwei-shadow-lg: 0px 28px 56px -16px var(--tanwei-palette-alpha-shade-dark-2);
  /* Paper cards. */
  --tanwei-shadow-md: 0px 1px 2px var(--tanwei-palette-alpha-shade-dark-1), 0px 12px 28px -12px var(--tanwei-palette-alpha-shade-dark-2);
  /* Dropdowns, menus, tooltips, toasts. */
  --tanwei-shadow-popover: 0px 2px 8px var(--tanwei-palette-alpha-shade-dark-1), 0px 16px 40px -8px var(--tanwei-palette-alpha-shade-dark-2);
  --tanwei-shadow-sm: 0px 1px 2px var(--tanwei-palette-alpha-shade-dark-1);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
  color-scheme: dark;
/* Lake: everyday interaction. */
    --tanwei-color-accent: var(--tanwei-palette-lake-300);
    --tanwei-color-accent-hover: var(--tanwei-palette-lake-200);
    --tanwei-color-accent-pressed: var(--tanwei-palette-lake-100);
    --tanwei-color-accent-soft: var(--tanwei-palette-mix-accent-dim);
    --tanwei-color-accent-soft-strong: var(--tanwei-palette-mix-accent-dim-strong);
    /* Links and accent text (>= 6.0:1). */
    --tanwei-color-accent-text: var(--tanwei-palette-lake-300);
    /* Radial lake cyan spotlight bloom. */
    --tanwei-color-accent-wash: var(--tanwei-palette-alpha-lake-wash-dark);
    /* Single-screen primary focus fill (moonlight on night). Fill only, never text. */
    --tanwei-color-anchor: var(--tanwei-palette-starlight-text);
    --tanwei-color-anchor-glow: var(--tanwei-palette-alpha-anchor-glow-dark);
    --tanwei-color-anchor-hover: var(--tanwei-palette-starlight-moon-hi);
    --tanwei-color-anchor-pressed: var(--tanwei-palette-starlight-moon-lo);
    /* Brand highlight (18k champagne gold) for dividers, glints, and specular rims on night. */
    --tanwei-color-aurum: var(--tanwei-palette-aurum-300);
    /* White-gold specular peak highlight along bevels. */
    --tanwei-color-aurum-bright: var(--tanwei-palette-aurum-100);
    /* Deep velvet-gold badge/pill ground. */
    --tanwei-color-aurum-soft: var(--tanwei-palette-mix-aurum-soft-dark);
    /* Luminous champagne gold eyebrow & telemetry text (>= 12:1 on night). */
    --tanwei-color-aurum-text: var(--tanwei-palette-aurum-200);
    /* Radial champagne caustic bloom for SpotlightCard and crests. */
    --tanwei-color-aurum-wash: var(--tanwei-palette-alpha-aurum-wash-dark);
    /* The night: page ground. */
    --tanwei-color-bg: var(--tanwei-palette-night-950);
    /* Default structural divider. */
    --tanwei-color-border: var(--tanwei-palette-night-800);
    /* Moonlight hairline ring so dark overlays never melt into scrims. */
    --tanwei-color-border-overlay: var(--tanwei-palette-alpha-border-overlay-dark);
    /* Control outlines. */
    --tanwei-color-border-strong: var(--tanwei-palette-night-700);
    /* Table row dividers and architectural hairlines. */
    --tanwei-color-border-subtle: var(--tanwei-palette-night-850);
    --tanwei-color-danger: var(--tanwei-palette-red-300);
    --tanwei-color-danger-hover: var(--tanwei-palette-red-250);
    --tanwei-color-danger-pressed: var(--tanwei-palette-red-200);
    --tanwei-color-danger-soft: var(--tanwei-palette-red-dim);
    --tanwei-color-focus-ring: var(--tanwei-palette-alpha-ring-dark);
    --tanwei-color-on-accent: var(--tanwei-palette-night-950);
    --tanwei-color-on-anchor: var(--tanwei-palette-night-950);
    --tanwei-color-on-danger: var(--tanwei-palette-red-ink);
    --tanwei-color-on-success: var(--tanwei-palette-night-950);
    --tanwei-color-on-warning: var(--tanwei-palette-night-950);
    --tanwei-color-scrim: var(--tanwei-palette-alpha-scrim-dark);
    --tanwei-color-success: var(--tanwei-palette-green-300);
    --tanwei-color-success-soft: var(--tanwei-palette-green-dim);
    /* Higher layers are lighter: light, not shadow. */
    --tanwei-color-surface: var(--tanwei-palette-night-900);
    /* Subtle hover wash on any surface. */
    --tanwei-color-surface-hover: var(--tanwei-palette-alpha-hover-dark);
    /* Pressed wash on interactive items. */
    --tanwei-color-surface-pressed: var(--tanwei-palette-alpha-pressed-dark);
    /* Floating popovers, menus, dialogs. */
    --tanwei-color-surface-raised: var(--tanwei-palette-night-850);
    /* Recessed wells, segmented tracks. */
    --tanwei-color-surface-sunken: var(--tanwei-palette-night-925);
    /* Primary body and heading ink. */
    --tanwei-color-text: var(--tanwei-palette-starlight-text);
    /* Disabled control labels and inactive metadata. */
    --tanwei-color-text-disabled: var(--tanwei-palette-night-500);
    /* Secondary labels, descriptions, and captions. */
    --tanwei-color-text-muted: var(--tanwei-palette-night-300);
    /* Orange, kept clear of champagne golds. */
    --tanwei-color-warning: var(--tanwei-palette-orange-300);
    --tanwei-color-warning-soft: var(--tanwei-palette-amber-dim);
    /* Lake: everyday interaction. */
    --tanwei-component-button-bg: var(--tanwei-color-accent);
    --tanwei-component-button-bg-hover: var(--tanwei-color-accent-hover);
    --tanwei-component-button-bg-pressed: var(--tanwei-color-accent-pressed);
    --tanwei-component-button-fg: var(--tanwei-color-on-accent);
    /* Button border radius (isolated from inputs and cards). */
    --tanwei-component-button-radius: var(--tanwei-shape-button);
    /* Higher layers are lighter: light, not shadow. */
    --tanwei-component-card-bg: var(--tanwei-color-surface);
    /* Moonlight hairline ring so dark overlays never melt into scrims. */
    --tanwei-component-card-border: var(--tanwei-color-border-overlay);
    /* Comparison Card internal padding. */
    --tanwei-component-card-padding: var(--tanwei-layout-inset);
    /* Comparison Card border radius. */
    --tanwei-component-card-radius: var(--tanwei-shape-card);
    /* Switch and slider thumb. */
    --tanwei-component-control-thumb: var(--tanwei-palette-starlight-text);
    /* Floating popovers, menus, dialogs. */
    --tanwei-component-dialog-bg: var(--tanwei-color-surface-raised);
    /* Moonlight hairline ring so dark overlays never melt into scrims. */
    --tanwei-component-dialog-border: var(--tanwei-color-border-overlay);
    /* Modal Dialog border radius. */
    --tanwei-component-dialog-radius: var(--tanwei-shape-dialog);
    /* Modal Dialog elevation shadow. */
    --tanwei-component-dialog-shadow: var(--tanwei-shadow-lg);
    /* Higher layers are lighter: light, not shadow. */
    --tanwei-component-input-bg: var(--tanwei-color-surface);
    /* Control outlines. */
    --tanwei-component-input-border: var(--tanwei-color-border-strong);
    /* Lake: everyday interaction. */
    --tanwei-component-input-border-focus: var(--tanwei-color-accent);
    /* TextField and Select trigger border radius. */
    --tanwei-component-input-radius: var(--tanwei-shape-control);
    --tanwei-component-prism-accent-cage: var(--tanwei-palette-lake-300);
    --tanwei-component-prism-accent-hi: var(--tanwei-palette-lake-100);
    --tanwei-component-prism-aurum-cage: var(--tanwei-palette-aurum-300);
    --tanwei-component-prism-aurum-hi: var(--tanwei-palette-aurum-100);
    /* Starlight white-gold pearl center fill for Meissner pivot jewels on night. */
    --tanwei-component-prism-core: var(--tanwei-palette-aurum-50);
    --tanwei-component-prism-danger-cage: var(--tanwei-palette-red-300);
    --tanwei-component-prism-danger-hi: var(--tanwei-palette-red-200);
    --tanwei-component-prism-success-cage: var(--tanwei-palette-green-300);
    --tanwei-component-prism-success-hi: var(--tanwei-palette-green-soft);
    --tanwei-component-prism-warning-cage: var(--tanwei-palette-orange-300);
    --tanwei-component-prism-warning-hi: var(--tanwei-palette-amber-soft);
    /* Bottom of the sky gradient (Sky, hero areas). */
    --tanwei-component-sky-horizon: var(--tanwei-palette-lake-900);
    --tanwei-component-star-edge: var(--tanwei-palette-aurum-300);
    /* Starlight dot fill <= 14px: done, unread, saved, rating. */
    --tanwei-component-star-fill: var(--tanwei-palette-aurum-300);
    --tanwei-component-star-glow: var(--tanwei-palette-alpha-star-glow-dark);
    /* Empty star outline (>= 3:1 WCAG 1.4.11 on night). */
    --tanwei-component-star-off: var(--tanwei-palette-night-500);
    /* Dialogs, drawers, command palette. */
    --tanwei-shadow-lg: 0px 28px 56px -16px var(--tanwei-palette-alpha-shade-dark-2);
    /* Paper cards. */
    --tanwei-shadow-md: 0px 1px 2px var(--tanwei-palette-alpha-shade-dark-1), 0px 12px 28px -12px var(--tanwei-palette-alpha-shade-dark-2);
    /* Dropdowns, menus, tooltips, toasts. */
    --tanwei-shadow-popover: 0px 2px 8px var(--tanwei-palette-alpha-shade-dark-1), 0px 16px 40px -8px var(--tanwei-palette-alpha-shade-dark-2);
    --tanwei-shadow-sm: 0px 1px 2px var(--tanwei-palette-alpha-shade-dark-1);
  }
}

[data-density="compact"] {
/* Comparison Card internal padding. */
  --tanwei-component-card-padding: var(--tanwei-layout-inset);
  --tanwei-control-font-size: 13px;
  --tanwei-control-height-lg: 36px;
  --tanwei-control-height-md: 30px;
  --tanwei-control-height-sm: 26px;
  /* Minimum hit area for pointer targets. */
  --tanwei-control-min-target: 28px;
  --tanwei-control-padding-x-lg: 16px;
  --tanwei-control-padding-x-md: 12px;
  --tanwei-control-padding-x-sm: 8px;
  /* Default gap between sibling controls. */
  --tanwei-layout-gap: 8px;
  /* Horizontal page container gutter. */
  --tanwei-layout-gutter: 24px;
  /* Card, panel, and dialog interior padding. */
  --tanwei-layout-inset: 16px;
  /* Vertical breathing rhythm for open page sections. */
  --tanwei-layout-section-y: 44px;
  /* Default vertical stack rhythm between content blocks. */
  --tanwei-layout-stack-gap: 16px;
}

[data-density="comfortable"] {
/* Comparison Card internal padding. */
  --tanwei-component-card-padding: var(--tanwei-layout-inset);
  --tanwei-control-font-size: 14px;
  --tanwei-control-height-lg: 44px;
  --tanwei-control-height-md: 36px;
  --tanwei-control-height-sm: 30px;
  /* Minimum hit area for pointer targets. */
  --tanwei-control-min-target: 32px;
  --tanwei-control-padding-x-lg: 22px;
  --tanwei-control-padding-x-md: 16px;
  --tanwei-control-padding-x-sm: 12px;
  /* Default gap between sibling controls. */
  --tanwei-layout-gap: 12px;
  /* Horizontal page container gutter. */
  --tanwei-layout-gutter: 40px;
  /* Card, panel, and dialog interior padding. */
  --tanwei-layout-inset: 24px;
  /* Vertical breathing rhythm for open page sections. */
  --tanwei-layout-section-y: 96px;
  /* Default vertical stack rhythm between content blocks. */
  --tanwei-layout-stack-gap: 24px;
}

[data-density="touch"] {
/* Comparison Card internal padding. */
  --tanwei-component-card-padding: var(--tanwei-layout-inset);
  --tanwei-control-font-size: 16px;
  --tanwei-control-height-lg: 60px;
  --tanwei-control-height-md: 52px;
  --tanwei-control-height-sm: 48px;
  /* Minimum hit area for pointer targets. */
  --tanwei-control-min-target: 48px;
  --tanwei-control-padding-x-lg: 28px;
  --tanwei-control-padding-x-md: 22px;
  --tanwei-control-padding-x-sm: 16px;
  /* Default gap between sibling controls. */
  --tanwei-layout-gap: 14px;
  /* Horizontal page container gutter. */
  --tanwei-layout-gutter: 20px;
  /* Card, panel, and dialog interior padding. */
  --tanwei-layout-inset: 22px;
  /* Vertical breathing rhythm for open page sections. */
  --tanwei-layout-section-y: 40px;
  /* Default vertical stack rhythm between content blocks. */
  --tanwei-layout-stack-gap: 20px;
}

*, :before, :after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

img, svg, video, canvas {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
}

html {
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--tanwei-color-bg);
  color: var(--tanwei-color-text);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-font-size-base);
  font-weight: var(--tanwei-font-weight-text);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .015em;
  line-height: var(--tanwei-font-line-height-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  -webkit-tap-highlight-color: transparent;
}

[data-theme] {
  background-color: var(--tanwei-color-bg);
  color: var(--tanwei-color-text);
}

[data-perf="lite"] {
  --tanwei-shadow-sm: none;
  --tanwei-shadow-md: 0 0 0 1px var(--tanwei-color-border);
  --tanwei-shadow-popover: 0 0 0 1px var(--tanwei-color-border-strong);
  --tanwei-shadow-lg: 0 0 0 1px var(--tanwei-color-border-strong);
  --tanwei-motion-duration-micro: 0s;
  --tanwei-motion-duration: 0s;
  --tanwei-motion-duration-fast: 0s;
  --tanwei-motion-duration-glow: 0s;
}

h1, h2 {
  font-family: var(--tanwei-typeface-display);
  font-weight: var(--tanwei-font-weight-light);
  font-variation-settings: normal;
  letter-spacing: .015em;
  line-height: var(--tanwei-font-line-height-tight);
  text-wrap: balance;
}

h3, h4 {
  font-family: var(--tanwei-typeface-heading);
  font-weight: var(--tanwei-font-weight-semibold);
  font-variation-settings: "BEVL" 32;
  line-height: var(--tanwei-font-line-height-snug);
  letter-spacing: .02em;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--tanwei-color-accent);
  outline-offset: 2px;
}

::selection {
  background-color: var(--tanwei-color-accent-soft-strong);
  color: var(--tanwei-color-text);
}

.tw-heading {
  font-family: var(--tanwei-typeface-heading);
  font-weight: var(--tanwei-font-weight-semibold);
  font-variation-settings: "BEVL" 32;
  line-height: var(--tanwei-font-line-height-snug);
  letter-spacing: .02em;
  text-wrap: balance;
  margin: 0;
}

.tw-heading[data-level="1"] {
  font-family: var(--tanwei-typeface-display);
  font-size: var(--tanwei-font-size-6xl);
  font-weight: var(--tanwei-font-weight-light);
  font-variation-settings: normal;
  line-height: var(--tanwei-font-line-height-tight);
  letter-spacing: .015em;
}

.tw-heading[data-level="2"] {
  font-family: var(--tanwei-typeface-display);
  font-size: var(--tanwei-font-size-4xl);
  font-weight: var(--tanwei-font-weight-light);
  font-variation-settings: normal;
  letter-spacing: .015em;
  line-height: 1.2;
}

.tw-heading[data-level="3"] {
  font-size: var(--tanwei-font-size-xl);
}

.tw-heading[data-level="4"] {
  font-size: var(--tanwei-font-size-lg);
}

.tw-heading[data-variant="ui"] {
  font-family: var(--tanwei-typeface-heading);
  font-weight: var(--tanwei-font-weight-semibold);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .02em;
}

.tw-heading[data-variant="ui"][data-level="1"] {
  font-size: var(--tanwei-font-size-3xl);
  line-height: var(--tanwei-font-line-height-snug);
}

.tw-heading[data-variant="ui"][data-level="2"] {
  font-size: var(--tanwei-font-size-xl);
  line-height: var(--tanwei-font-line-height-snug);
}

.tw-heading[data-variant="ui"][data-level="3"] {
  font-size: var(--tanwei-font-size-lg);
}

.tw-heading[data-variant="ui"][data-level="4"] {
  font-size: var(--tanwei-font-size-md);
}

.tw-heading[data-variant="editorial"] {
  font-family: var(--tanwei-typeface-display);
  font-weight: var(--tanwei-font-weight-regular);
  font-variation-settings: normal;
  letter-spacing: .015em;
}

.tw-text {
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-font-size-base);
  font-weight: var(--tanwei-font-weight-text);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .015em;
  line-height: var(--tanwei-font-line-height-normal);
  margin: 0;
}

.tw-text[data-size="xs"] {
  font-size: var(--tanwei-font-size-xs);
  letter-spacing: .03em;
  line-height: 1.55;
}

.tw-text[data-size="sm"] {
  font-size: var(--tanwei-font-size-sm);
  letter-spacing: .02em;
  line-height: 1.66;
}

.tw-text[data-size="lg"] {
  font-size: var(--tanwei-font-size-lg);
  line-height: var(--tanwei-font-line-height-relaxed);
}

.tw-text[data-tone="muted"] {
  color: var(--tanwei-color-text-muted);
}

.tw-text[data-tone="accent"] {
  color: var(--tanwei-color-accent-text);
}

.tw-text[data-tone="aurum"] {
  color: var(--tanwei-color-aurum-text);
}

.tw-text[data-tone="success"] {
  color: var(--tanwei-color-success);
}

.tw-text[data-tone="warning"] {
  color: var(--tanwei-color-warning);
}

.tw-text[data-tone="danger"] {
  color: var(--tanwei-color-danger);
}

.tw-label {
  font-size: var(--tanwei-font-size-sm);
  font-weight: var(--tanwei-font-weight-medium);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .03em;
  color: var(--tanwei-color-text-muted);
}

.tw-mono {
  font-family: var(--tanwei-typeface-mono);
  font-variation-settings: normal;
  font-feature-settings: "zero" 0, "tnum" 1;
  font-variant-numeric: tabular-nums;
}

.tw-num {
  font-family: var(--tanwei-typeface-numeral);
  font-variation-settings: normal;
  font-variant-numeric: tabular-nums;
}

.tw-link {
  color: var(--tanwei-color-accent-text);
  font-weight: var(--tanwei-font-weight-medium);
  text-underline-offset: 3px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.tw-link:hover {
  text-decoration-thickness: 2px;
}

.tw-badge {
  border-radius: var(--tanwei-shape-badge);
  background-color: var(--tanwei-color-surface-sunken);
  color: var(--tanwei-color-text-muted);
  font-size: var(--tanwei-font-size-xs);
  font-weight: var(--tanwei-font-weight-medium);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .03em;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  line-height: 1.65;
  display: inline-flex;
}

.tw-badge:before {
  content: "";
  background-color: currentColor;
  border-radius: 50%;
  flex: none;
  width: 6px;
  height: 6px;
}

.tw-badge[data-dot="false"]:before {
  display: none;
}

.tw-badge[data-tone="accent"] {
  background-color: var(--tanwei-color-accent-soft);
  color: var(--tanwei-color-accent-text);
}

.tw-badge[data-tone="aurum"] {
  background-color: var(--tanwei-color-aurum-soft);
  color: var(--tanwei-color-aurum-text);
}

.tw-badge[data-tone="success"] {
  background-color: var(--tanwei-color-success-soft);
  color: var(--tanwei-color-success);
}

.tw-badge[data-tone="warning"] {
  background-color: var(--tanwei-color-warning-soft);
  color: var(--tanwei-color-warning);
}

.tw-badge[data-tone="danger"] {
  background-color: var(--tanwei-color-danger-soft);
  color: var(--tanwei-color-danger);
}

.tw-banner {
  --_banner-fg: var(--tanwei-color-accent-text);
  --_banner-bg: var(--tanwei-color-accent-soft);
  --_banner-solid: var(--tanwei-color-accent);
  --_banner-on-solid: var(--tanwei-color-on-accent);
  gap: var(--tanwei-space-3);
  padding: var(--tanwei-space-3) var(--tanwei-space-4);
  border: 1px solid var(--tanwei-color-border-overlay);
  border-radius: var(--tanwei-shape-card);
  background-color: var(--_banner-bg);
  color: var(--tanwei-color-text);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  display: grid;
}

.tw-banner[data-has-actions="true"] {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.tw-banner[data-tone="success"] {
  --_banner-fg: var(--tanwei-color-success);
  --_banner-bg: var(--tanwei-color-success-soft);
  --_banner-solid: var(--tanwei-color-success);
  --_banner-on-solid: var(--tanwei-color-on-success);
}

.tw-banner[data-tone="warning"] {
  --_banner-fg: var(--tanwei-color-warning);
  --_banner-bg: var(--tanwei-color-warning-soft);
  --_banner-solid: var(--tanwei-color-warning);
  --_banner-on-solid: var(--tanwei-color-on-warning);
}

.tw-banner[data-tone="danger"] {
  --_banner-fg: var(--tanwei-color-danger);
  --_banner-bg: var(--tanwei-color-danger-soft);
  --_banner-solid: var(--tanwei-color-danger);
  --_banner-on-solid: var(--tanwei-color-on-danger);
}

.tw-banner[data-anchor="true"] {
  background-image: linear-gradient(180deg, transparent, var(--_banner-solid) 24%, var(--_banner-solid) 76%, transparent);
  background-position: 0;
  background-repeat: no-repeat;
  background-size: 2px 100%;
}

.tw-banner .tw-button[data-variant="secondary"] {
  background-color: var(--tanwei-color-surface-raised);
  border-color: var(--tanwei-color-border-overlay);
}

@media (max-width: 620px) {
  .tw-banner[data-has-actions="true"] {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tw-banner .tw-banner-actions {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.tw-banner-icon {
  background-color: var(--_banner-solid);
  width: 24px;
  height: 24px;
  color: var(--_banner-on-solid);
  font-weight: var(--tanwei-font-weight-bold);
  font-size: var(--tanwei-font-size-xs);
  border-radius: 50%;
  flex: none;
  place-items: center;
  line-height: 1;
  display: grid;
}

.tw-banner-icon > svg {
  width: 14px;
  height: 14px;
}

.tw-banner-body {
  gap: 2px;
  min-width: 0;
  display: grid;
}

.tw-banner-title {
  font-weight: var(--tanwei-font-weight-medium);
  font-size: var(--tanwei-control-font-size);
  line-height: var(--tanwei-font-line-height-snug);
  margin: 0;
}

.tw-banner-title b, .tw-banner-title strong {
  color: var(--_banner-fg);
  font-weight: var(--tanwei-font-weight-semibold);
  font-variant-numeric: tabular-nums;
}

.tw-banner-text {
  color: var(--tanwei-color-text-muted);
  font-size: var(--tanwei-font-size-xs);
  margin: 0;
}

.tw-banner-actions {
  gap: var(--tanwei-space-2);
  flex-wrap: wrap;
  display: flex;
}

.tw-button {
  justify-content: center;
  align-items: center;
  gap: var(--tanwei-space-2);
  height: var(--tanwei-control-height-md);
  min-width: var(--tanwei-control-min-target);
  padding-inline: var(--tanwei-control-padding-x-md);
  border-radius: var(--tanwei-component-button-radius);
  background-color: var(--tanwei-component-button-bg);
  color: var(--tanwei-component-button-fg);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-medium);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .025em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--tanwei-shadow-sm);
  transition-property: background-color, border-color, color, box-shadow, transform;
  transition-duration: var(--tanwei-motion-duration-fast);
  transition-timing-function: var(--tanwei-motion-easing-snappy);
  border: 1px solid #0000;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
}

.tw-button > svg {
  flex: none;
  width: 16px;
  height: 16px;
}

.tw-button[data-size="sm"] {
  height: var(--tanwei-control-height-sm);
  padding-inline: var(--tanwei-control-padding-x-sm);
  font-size: var(--tanwei-font-size-xs);
  gap: 6px;
}

.tw-button[data-size="sm"] > svg {
  width: 14px;
  height: 14px;
}

.tw-button[data-size="lg"] {
  height: var(--tanwei-control-height-lg);
  padding-inline: var(--tanwei-control-padding-x-lg);
  font-size: var(--tanwei-font-size-base);
  font-weight: var(--tanwei-font-weight-semibold);
}

.tw-button[data-size="lg"] > svg {
  width: 18px;
  height: 18px;
}

:is(.tw-button:focus-visible, .tw-button[data-focus-visible]) {
  outline: 2px solid var(--tanwei-color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--tanwei-color-focus-ring);
}

.tw-button:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-component-button-bg-hover);
}

.tw-button:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-component-button-bg-pressed);
  transform: scale(.98);
}

.tw-button[data-variant="secondary"] {
  background-color: var(--tanwei-color-surface);
  color: var(--tanwei-color-text);
  border-color: var(--tanwei-color-border-strong);
  box-shadow: var(--tanwei-shadow-sm);
}

.tw-button[data-variant="secondary"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-variant="secondary"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-sunken);
  border-color: var(--tanwei-color-border-strong);
}

.tw-button[data-variant="secondary"]:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-variant="secondary"][data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-pressed);
}

.tw-button[data-variant="subtle"] {
  background-color: var(--tanwei-color-accent-soft);
  color: var(--tanwei-color-accent-text);
  box-shadow: none;
}

.tw-button[data-variant="subtle"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-variant="subtle"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-variant="subtle"]:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-variant="subtle"][data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-accent-soft-strong);
}

.tw-button[data-variant="ghost"] {
  color: var(--tanwei-color-text-muted);
  box-shadow: none;
  background-color: #0000;
}

.tw-button[data-variant="ghost"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-variant="ghost"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-hover);
  color: var(--tanwei-color-text);
}

.tw-button[data-variant="ghost"]:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-variant="ghost"][data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-pressed);
  color: var(--tanwei-color-text);
}

.tw-button[data-variant="danger"], .tw-button[data-tone="danger"] {
  background-color: var(--tanwei-color-danger);
  color: var(--tanwei-color-on-danger);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"]):hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-hover);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"]):active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-pressed);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="secondary"] {
  background-color: var(--tanwei-color-surface);
  color: var(--tanwei-color-danger);
  border-color: var(--tanwei-color-danger);
  box-shadow: var(--tanwei-shadow-sm);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="secondary"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="secondary"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-soft);
  border-color: var(--tanwei-color-danger-hover);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="secondary"]:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="secondary"][data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-soft);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="subtle"] {
  background-color: var(--tanwei-color-danger-soft);
  color: var(--tanwei-color-danger);
  box-shadow: none;
  border-color: #0000;
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="subtle"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="subtle"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger);
  color: var(--tanwei-color-on-danger);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="subtle"]:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="subtle"][data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-pressed);
  color: var(--tanwei-color-on-danger);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="ghost"] {
  color: var(--tanwei-color-danger);
  box-shadow: none;
  background-color: #0000;
  border-color: #0000;
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="ghost"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="ghost"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-soft);
  color: var(--tanwei-color-danger);
}

:is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="ghost"]:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), :is(.tw-button[data-variant="danger"], .tw-button[data-tone="danger"])[data-variant="ghost"][data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-soft);
}

.tw-button:disabled, .tw-button[data-disabled], .tw-button[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.tw-button[data-anchor="true"] {
  --_fill: var(--tanwei-color-anchor);
  background: linear-gradient(var(--_fill), var(--_fill)) padding-box,
      radial-gradient(ellipse 65% 160% at 96% 100%, var(--tanwei-color-aurum-bright) 0%, var(--tanwei-color-aurum) 46%, transparent 82%) border-box,
      radial-gradient(ellipse 52% 130% at 8% 0%, var(--tanwei-color-aurum), transparent 76%) border-box,
      linear-gradient(var(--_fill), var(--_fill)) border-box;
  background-color: var(--_fill);
  color: var(--tanwei-color-on-anchor);
  font-weight: var(--tanwei-font-weight-semibold);
  box-shadow: 0 2px 14px -4px var(--tanwei-color-anchor-glow);
  transition-property: box-shadow, transform;
  transition-duration: var(--tanwei-motion-duration-glow);
  border-color: #0000;
}

.tw-button[data-anchor="true"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-anchor="true"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  --_fill: var(--tanwei-color-anchor-hover);
  box-shadow: 0 0 0 1px var(--tanwei-color-aurum), 0 8px 32px -4px var(--tanwei-color-anchor-glow);
}

.tw-button[data-anchor="true"]:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-button[data-anchor="true"][data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  --_fill: var(--tanwei-color-anchor-pressed);
  box-shadow: none;
}

:is(.tw-button[data-anchor="true"]:focus-visible, .tw-button[data-anchor="true"][data-focus-visible]) {
  outline-color: var(--tanwei-color-accent);
  box-shadow: 0 0 0 4px var(--tanwei-color-focus-ring);
}

@media (forced-colors: active) {
  .tw-button[data-anchor="true"] {
    border-color: buttontext;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-button {
    transition-duration: 0s;
  }
}

.tw-card {
  --_card-bg: var(--tanwei-component-card-bg);
  gap: var(--tanwei-space-3);
  min-width: 0;
  padding: var(--tanwei-component-card-padding);
  border: 1px solid var(--tanwei-component-card-border);
  border-radius: var(--tanwei-component-card-radius);
  background-color: var(--_card-bg);
  color: var(--tanwei-color-text);
  box-shadow: var(--tanwei-shadow-md);
  align-content: start;
  display: grid;
  position: relative;
}

.tw-card[data-variant="flat"] {
  box-shadow: none;
  border-color: var(--tanwei-color-border);
}

.tw-card[data-variant="tinted"] {
  --_card-bg: var(--tanwei-color-accent-soft);
  box-shadow: none;
  border-color: #0000;
}

.tw-card[data-anchor="true"] {
  background: radial-gradient(76% 68px at 50% 0%, var(--tanwei-color-aurum-wash), transparent 100%) padding-box,
      linear-gradient(var(--_card-bg), var(--_card-bg)) padding-box,
      linear-gradient(90deg,
        var(--tanwei-color-border) 0%,
        var(--tanwei-color-aurum) 32%,
        var(--tanwei-color-aurum-bright) 50%,
        var(--tanwei-color-aurum) 68%,
        var(--tanwei-color-border) 100%) top / 100% 1px no-repeat border-box,
      linear-gradient(var(--tanwei-color-border), var(--tanwei-color-border)) border-box;
  background-color: var(--_card-bg);
  box-shadow: var(--tanwei-shadow-md), 0 -4px 28px -12px var(--tanwei-color-anchor-glow);
  border-color: #0000;
}

.tw-card > .tw-sticker:not([data-placement="inline"]) {
  position: absolute;
  top: -11px;
  right: 18px;
}

.tw-card-title {
  font-family: var(--tanwei-typeface-heading);
  font-size: var(--tanwei-font-size-lg);
  font-weight: var(--tanwei-font-weight-semibold);
  line-height: var(--tanwei-font-line-height-snug);
  letter-spacing: -.01em;
  margin: 0;
}

.tw-card-description {
  color: var(--tanwei-color-text-muted);
  font-size: var(--tanwei-font-size-sm);
  margin: 0;
}

.tw-card-header {
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-3);
  min-width: 0;
  display: flex;
}

.tw-card-body {
  align-content: start;
  gap: var(--tanwei-space-3);
  min-width: 0;
  display: grid;
}

.tw-card-footer {
  justify-content: flex-end;
  align-items: center;
  gap: var(--tanwei-space-2);
  padding-top: var(--tanwei-space-3);
  margin-top: var(--tanwei-space-1);
  border-top: 1px solid var(--tanwei-color-border-subtle);
  flex-wrap: wrap;
  display: flex;
}

.tw-checkbox, .tw-radio {
  align-items: center;
  gap: var(--tanwei-space-2);
  min-height: var(--tanwei-control-min-target);
  font-size: var(--tanwei-control-font-size);
  color: var(--tanwei-color-text);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  position: relative;
}

:is(.tw-checkbox, .tw-radio) > input {
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: -1px;
  position: absolute;
  overflow: hidden;
}

:is(.tw-checkbox, .tw-radio)[data-disabled] {
  opacity: .45;
  cursor: not-allowed;
}

:is(.tw-checkbox, .tw-radio):has(input:disabled) {
  opacity: .45;
  cursor: not-allowed;
}

.tw-checkbox-box, .tw-radio-box {
  border: var(--tanwei-stroke-control) solid var(--tanwei-color-border-strong);
  background-color: var(--tanwei-color-surface);
  width: 16px;
  height: 16px;
  transition-property: background-color, border-color, box-shadow;
  transition-duration: var(--tanwei-motion-duration-fast);
  transition-timing-function: var(--tanwei-motion-easing-snappy);
  flex: none;
  place-items: center;
  display: grid;
}

[data-density="touch"] :is(.tw-checkbox-box, .tw-radio-box) {
  width: 20px;
  height: 20px;
}

:is(.tw-checkbox-box, .tw-radio-box):after {
  content: "";
  opacity: 0;
  transition: opacity var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy), transform var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy);
  transform: scale(.8);
}

.tw-checkbox-box {
  border-radius: calc(var(--tanwei-shape-checkbox) - 1px);
}

.tw-checkbox-box:after {
  background-color: var(--tanwei-color-on-accent);
  width: 12px;
  height: 12px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.2 6.2 4.8 8.8 9.8 3.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.2 6.2 4.8 8.8 9.8 3.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tw-radio-box {
  border-radius: 50%;
}

.tw-radio-box:after {
  background-color: var(--tanwei-color-on-accent);
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.tw-checkbox > input:checked + .tw-checkbox-box, .tw-checkbox[data-selected] .tw-checkbox-box, .tw-checkbox > input:indeterminate + .tw-checkbox-box, .tw-checkbox[data-indeterminate] .tw-checkbox-box, .tw-radio > input:checked + .tw-radio-box, .tw-radio[data-selected] .tw-radio-box {
  background-color: var(--tanwei-color-accent);
  border-color: var(--tanwei-color-accent);
}

:is(.tw-checkbox > input:checked + .tw-checkbox-box, .tw-checkbox[data-selected] .tw-checkbox-box, .tw-checkbox > input:indeterminate + .tw-checkbox-box, .tw-checkbox[data-indeterminate] .tw-checkbox-box, .tw-radio > input:checked + .tw-radio-box, .tw-radio[data-selected] .tw-radio-box):after {
  opacity: 1;
  transform: scale(1);
}

.tw-checkbox > input:indeterminate + .tw-checkbox-box:after, .tw-checkbox[data-indeterminate] .tw-checkbox-box:after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2.5 6h7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2.5 6h7'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (hover: hover) {
  .tw-checkbox:hover > input:not(:checked):not(:disabled) + .tw-checkbox-box, .tw-radio:hover > input:not(:checked):not(:disabled) + .tw-radio-box {
    border-color: var(--tanwei-color-text-muted);
  }
}

.tw-checkbox[data-hovered]:not([data-selected]) .tw-checkbox-box, .tw-radio[data-hovered]:not([data-selected]) .tw-radio-box {
  border-color: var(--tanwei-color-text-muted);
}

.tw-checkbox[data-focus-visible] .tw-checkbox-box, .tw-radio[data-focus-visible] .tw-radio-box {
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-checkbox > input:focus-visible + .tw-checkbox-box {
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-radio > input:focus-visible + .tw-radio-box {
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-checkbox[data-invalid] .tw-checkbox-box, .tw-radio[data-invalid] .tw-radio-box {
  border-color: var(--tanwei-color-danger);
}

.tw-radio-group {
  gap: var(--tanwei-space-2) var(--tanwei-space-5);
  flex-wrap: wrap;
  display: flex;
}

.tw-radio-group[data-orientation="vertical"] {
  gap: var(--tanwei-space-1);
  flex-direction: column;
}

.tw-command-overlay {
  z-index: var(--tanwei-z-modal);
  padding: 13vh var(--tanwei-space-4) var(--tanwei-space-4);
  background-color: var(--tanwei-color-scrim);
  place-items: start center;
  display: grid;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
  .tw-command-overlay {
    -webkit-backdrop-filter: blur(3px);
  }
}

.tw-command-overlay[data-entering] {
  animation: tw-fade-in var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy);
}

.tw-command-overlay[data-exiting] {
  animation: tw-fade-in var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-exit) reverse;
}

[data-perf="lite"] .tw-command-overlay {
  -webkit-backdrop-filter: none;
}

.tw-command-modal {
  outline: none;
  width: min(560px, 100%);
}

.tw-command-modal[data-entering] {
  animation: tw-dialog-in var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-snappy);
}

.tw-command {
  border: 1px solid var(--tanwei-color-border-overlay);
  border-radius: var(--tanwei-shape-dialog);
  background-color: var(--tanwei-color-surface-raised);
  max-height: 68vh;
  color: var(--tanwei-color-text);
  box-shadow: var(--tanwei-shadow-lg);
  outline: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  display: grid;
  overflow: hidden;
}

.tw-command-search {
  align-items: center;
  gap: var(--tanwei-space-3);
  padding: var(--tanwei-space-3) var(--tanwei-space-4);
  border-bottom: 1px solid var(--tanwei-color-border-subtle);
  display: flex;
}

.tw-command-search > svg {
  width: 16px;
  height: 16px;
  color: var(--tanwei-color-text-muted);
  flex: none;
}

.tw-command-input {
  min-width: 0;
  color: var(--tanwei-color-text);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-font-size-base);
  background: none;
  border: 0;
  outline: none;
  flex: 1;
}

.tw-command-input::placeholder {
  color: var(--tanwei-color-text-muted);
  opacity: .7;
}

.tw-command-list {
  padding: var(--tanwei-space-2);
  outline: none;
  align-content: start;
  gap: 2px;
  display: grid;
  overflow-y: auto;
}

.tw-command-group-label {
  padding: var(--tanwei-space-2) var(--tanwei-space-2) 4px;
  font-size: 11px;
  font-weight: var(--tanwei-font-weight-medium);
  color: var(--tanwei-color-text-muted);
  letter-spacing: .02em;
}

.tw-command-item {
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-3);
  min-height: 36px;
  padding: 6px var(--tanwei-space-3);
  border-radius: var(--tanwei-shape-control);
  color: var(--tanwei-color-text);
  font-size: var(--tanwei-control-font-size);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
  display: flex;
}

.tw-command-item .tw-command-item-main {
  align-items: center;
  gap: var(--tanwei-space-3);
  min-width: 0;
  display: flex;
}

.tw-command-item .tw-command-item-main > svg {
  width: 16px;
  height: 16px;
  color: var(--tanwei-color-text-muted);
  flex: none;
}

.tw-command-item .tw-command-item-sub {
  font-size: var(--tanwei-font-size-xs);
  color: var(--tanwei-color-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.tw-command-item:hover, .tw-command-item[data-active="true"], .tw-command-item[data-focused], .tw-command-item[data-hovered] {
  background-color: var(--tanwei-color-surface-hover);
}

:is(.tw-command-item:hover, .tw-command-item[data-active="true"], .tw-command-item[data-focused], .tw-command-item[data-hovered]) .tw-command-item-main > svg {
  color: var(--tanwei-color-accent-text);
}

.tw-command-empty {
  padding: var(--tanwei-space-8) var(--tanwei-space-4);
  text-align: center;
  font-size: var(--tanwei-font-size-sm);
  color: var(--tanwei-color-text-muted);
}

.tw-command-footer {
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-4);
  padding: var(--tanwei-space-2) var(--tanwei-space-4);
  border-top: 1px solid var(--tanwei-color-border-subtle);
  background-color: var(--tanwei-color-surface-sunken);
  color: var(--tanwei-color-text-muted);
  font-size: 11px;
  display: flex;
}

.tw-command-hints {
  align-items: center;
  gap: var(--tanwei-space-3);
  display: flex;
}

.tw-modal-overlay {
  z-index: var(--tanwei-z-modal);
  padding: var(--tanwei-space-4);
  background-color: var(--tanwei-color-scrim);
  place-items: center;
  display: grid;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
  .tw-modal-overlay {
    -webkit-backdrop-filter: blur(3px);
  }
}

.tw-modal-overlay[data-entering] {
  animation: tw-fade-in var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-snappy);
}

.tw-modal-overlay[data-exiting] {
  animation: tw-fade-in var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-exit) reverse;
}

[data-perf="lite"] .tw-modal-overlay {
  -webkit-backdrop-filter: none;
}

.tw-modal {
  outline: none;
  width: 100%;
  max-width: 440px;
}

.tw-modal[data-size="lg"] {
  max-width: 640px;
}

.tw-modal[data-entering] {
  animation: tw-dialog-in var(--tanwei-motion-duration) var(--tanwei-motion-easing-snappy);
}

.tw-dialog {
  gap: var(--tanwei-space-3);
  max-height: calc(100vh - 2 * var(--tanwei-space-4));
  max-height: calc(100dvh - 2 * var(--tanwei-space-4));
  padding: var(--tanwei-layout-inset);
  border: 1px solid var(--tanwei-component-dialog-border);
  border-radius: var(--tanwei-component-dialog-radius);
  background-color: var(--tanwei-component-dialog-bg);
  color: var(--tanwei-color-text);
  box-shadow: var(--tanwei-component-dialog-shadow);
  outline: none;
  display: grid;
  overflow-y: auto;
}

dialog.tw-dialog {
  width: min(440px, calc(100% - 2 * var(--tanwei-space-4)));
}

dialog.tw-dialog::backdrop {
  background-color: var(--tanwei-color-scrim);
}

dialog.tw-dialog[open] {
  animation: tw-dialog-in var(--tanwei-motion-duration) var(--tanwei-motion-easing-snappy);
}

.tw-dialog-header {
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-3);
  display: flex;
}

.tw-dialog-title {
  font-family: var(--tanwei-typeface-heading);
  font-size: var(--tanwei-font-size-lg);
  font-weight: var(--tanwei-font-weight-semibold);
  line-height: var(--tanwei-font-line-height-snug);
  letter-spacing: -.01em;
  margin: 0;
}

.tw-dialog-body {
  font-size: var(--tanwei-font-size-md);
  color: var(--tanwei-color-text-muted);
  margin: 0;
}

.tw-dialog-footer, .tw-dialog-actions {
  justify-content: flex-end;
  gap: var(--tanwei-space-2);
  margin-top: var(--tanwei-space-2);
  flex-wrap: wrap;
  display: flex;
}

@keyframes tw-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes tw-dialog-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-modal-overlay, .tw-modal, dialog.tw-dialog {
    animation: none !important;
  }
}

.tw-divider {
  --_line: linear-gradient(var(--_dir, 90deg),
    transparent 0%,
    var(--tanwei-color-border) 18%,
    var(--tanwei-color-aurum) 42%,
    var(--tanwei-color-aurum-bright) 50%,
    var(--tanwei-color-aurum) 58%,
    var(--tanwei-color-border) 82%,
    transparent 100%);
  background-image: var(--_line);
  color: #0000;
  border: 0;
  flex: none;
  align-self: stretch;
  width: 100%;
  height: 1px;
  margin: 0;
  padding: 0;
  display: block;
}

.tw-divider[data-variant="lead"] {
  --_line: linear-gradient(var(--_dir, 90deg),
      var(--tanwei-color-aurum) 0%,
      var(--tanwei-color-border) 28%,
      transparent 72%);
}

.tw-divider[aria-orientation="vertical"], .tw-divider[data-orientation="vertical"] {
  --_dir: 180deg;
  width: 1px;
  height: auto;
  min-height: 1em;
}

@media (forced-colors: active) {
  .tw-divider {
    opacity: .4;
    background: canvastext;
  }
}

.tw-drawer-overlay {
  z-index: var(--tanwei-z-drawer);
  background-color: var(--tanwei-color-scrim);
  justify-content: flex-end;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))) {
  .tw-drawer-overlay {
    -webkit-backdrop-filter: blur(2px);
  }
}

.tw-drawer-overlay[data-side="left"] {
  justify-content: flex-start;
}

.tw-drawer-overlay[data-entering] {
  animation: tw-fade-in var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-snappy);
}

.tw-drawer-overlay[data-exiting] {
  animation: tw-fade-in var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-exit) reverse;
}

[data-perf="lite"] .tw-drawer-overlay {
  -webkit-backdrop-filter: none;
}

.tw-drawer-modal {
  --_slide-x: 100%;
  width: min(440px, 92vw);
  height: 100vh;
  outline: none;
  height: 100dvh;
}

.tw-drawer-modal[data-size="lg"] {
  width: min(600px, 94vw);
}

.tw-drawer-overlay[data-side="left"] .tw-drawer-modal {
  --_slide-x: -100%;
}

.tw-drawer-modal[data-entering] {
  animation: tw-drawer-in var(--tanwei-motion-duration) var(--tanwei-motion-easing-snappy);
}

.tw-drawer-modal[data-exiting] {
  animation: tw-drawer-in var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-exit) reverse;
}

.tw-drawer {
  background-color: var(--tanwei-color-surface-raised);
  height: 100%;
  color: var(--tanwei-color-text);
  border-left: 1px solid var(--tanwei-color-border-overlay);
  box-shadow: var(--tanwei-shadow-lg);
  outline: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  display: grid;
}

.tw-drawer-overlay[data-side="left"] .tw-drawer {
  border-left: 0;
  border-right: 1px solid var(--tanwei-color-border-overlay);
}

.tw-drawer-header {
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-3);
  padding: var(--tanwei-space-4) var(--tanwei-layout-inset);
  border-bottom: 1px solid var(--tanwei-color-border-subtle);
  display: flex;
}

.tw-drawer-title {
  font-family: var(--tanwei-typeface-heading);
  font-size: var(--tanwei-font-size-lg);
  font-weight: var(--tanwei-font-weight-semibold);
  letter-spacing: -.01em;
  margin: 0;
}

.tw-drawer-body {
  padding: var(--tanwei-layout-inset);
  align-content: start;
  gap: var(--tanwei-space-4);
  display: grid;
  overflow-y: auto;
}

.tw-drawer-footer {
  justify-content: flex-end;
  align-items: center;
  gap: var(--tanwei-space-2);
  padding: var(--tanwei-space-3) var(--tanwei-layout-inset);
  border-top: 1px solid var(--tanwei-color-border-subtle);
  background-color: var(--tanwei-color-surface);
  display: flex;
}

@keyframes tw-drawer-in {
  from {
    transform: translateX(var(--_slide-x));
  }

  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-drawer-overlay, .tw-drawer-modal {
    animation: none !important;
  }
}

.tw-hold-button {
  --_hold: 0;
  --_hold-fill: var(--tanwei-color-accent-hover);
  --_hold-bg: var(--tanwei-color-surface);
  --_hold-fg: var(--tanwei-color-text);
  --_hold-border: var(--tanwei-color-border-strong);
  isolation: isolate;
  justify-content: center;
  align-items: center;
  gap: var(--tanwei-space-2);
  height: var(--tanwei-control-height-md);
  min-width: var(--tanwei-control-min-target);
  padding-inline: var(--tanwei-control-padding-x-md);
  border: 1px solid var(--_hold-border);
  border-radius: var(--tanwei-shape-button);
  background-color: var(--_hold-bg);
  color: var(--_hold-fg);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-semibold);
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  display: inline-flex;
  position: relative;
  overflow: hidden;
}

.tw-hold-button:before {
  content: "";
  z-index: -1;
  background-color: var(--_hold-fill);
  transform: scaleX(var(--_hold));
  transform-origin: 0;
  will-change: transform;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.tw-hold-button[data-size="sm"] {
  height: var(--tanwei-control-height-sm);
  padding-inline: var(--tanwei-control-padding-x-sm);
  font-size: var(--tanwei-font-size-xs);
}

.tw-hold-button[data-size="lg"] {
  height: var(--tanwei-control-height-lg);
  padding-inline: var(--tanwei-control-padding-x-lg);
  font-size: var(--tanwei-font-size-base);
}

.tw-hold-button[data-tone="danger"] {
  --_hold-bg: var(--tanwei-color-danger-soft);
  --_hold-fg: var(--tanwei-color-danger);
  --_hold-border: var(--tanwei-color-danger);
  --_hold-fill: var(--tanwei-color-danger);
}

.tw-hold-button[data-tone="danger"][data-holding="true"], .tw-hold-button[data-tone="danger"][data-confirmed="true"] {
  color: var(--tanwei-color-on-danger);
}

.tw-hold-button[data-tone="accent"], .tw-hold-button[data-tone="primary"] {
  --_hold-bg: var(--tanwei-color-accent-soft);
  --_hold-fg: var(--tanwei-color-accent-text);
  --_hold-border: var(--tanwei-color-accent);
  --_hold-fill: var(--tanwei-color-accent);
}

:is(.tw-hold-button[data-tone="accent"], .tw-hold-button[data-tone="primary"])[data-holding="true"], :is(.tw-hold-button[data-tone="accent"], .tw-hold-button[data-tone="primary"])[data-confirmed="true"] {
  color: var(--tanwei-color-on-accent);
}

:is(.tw-hold-button:focus-visible, .tw-hold-button[data-focus-visible]) {
  outline: 2px solid var(--tanwei-color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--tanwei-color-focus-ring);
}

.tw-hold-button:disabled, .tw-hold-button[data-disabled], .tw-hold-button[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
}

.tw-stepper {
  grid-template-columns: var(--tanwei-control-height-md) minmax(88px, 1fr) var(--tanwei-control-height-md);
  height: var(--tanwei-control-height-md);
  border: 1px solid var(--tanwei-color-border-strong);
  border-radius: var(--tanwei-shape-control);
  background-color: var(--tanwei-color-surface);
  align-items: center;
  display: inline-grid;
  overflow: hidden;
}

.tw-stepper-btn {
  width: 100%;
  height: 100%;
  color: var(--tanwei-color-text);
  font-size: var(--tanwei-font-size-lg);
  font-weight: var(--tanwei-font-weight-semibold);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: none;
  place-items: center;
  display: grid;
}

.tw-stepper-btn:hover:not(:disabled) {
  background-color: var(--tanwei-color-surface-hover);
}

.tw-stepper-btn:active:not(:disabled) {
  background-color: var(--tanwei-color-surface-pressed);
}

.tw-stepper-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.tw-stepper-value {
  height: 100%;
  padding-inline: var(--tanwei-space-2);
  border-inline: 1px solid var(--tanwei-color-border-subtle);
  font-family: var(--tanwei-typeface-mono);
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-semibold);
  font-variant-numeric: tabular-nums;
  color: var(--tanwei-color-text);
  justify-content: center;
  align-items: center;
  gap: 3px;
  display: flex;
}

.tw-stepper-value[data-editable="true"] {
  cursor: pointer;
}

.tw-stepper-value[data-editable="true"]:hover {
  background-color: var(--tanwei-color-surface-hover);
}

.tw-stepper-unit {
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-font-size-xs);
  font-weight: var(--tanwei-font-weight-regular);
  color: var(--tanwei-color-text-muted);
}

.tw-keypad {
  gap: var(--tanwei-space-2);
  width: 100%;
  max-width: 280px;
  display: grid;
}

.tw-keypad-display {
  justify-content: space-between;
  align-items: baseline;
  gap: var(--tanwei-space-2);
  padding: var(--tanwei-space-2) var(--tanwei-space-3);
  border: 1px solid var(--tanwei-color-border-strong);
  border-radius: var(--tanwei-shape-control);
  background-color: var(--tanwei-color-surface-sunken);
  font-family: var(--tanwei-typeface-mono);
  font-size: var(--tanwei-font-size-xl);
  font-weight: var(--tanwei-font-weight-semibold);
  font-variant-numeric: tabular-nums;
  display: flex;
}

.tw-keypad-grid {
  gap: var(--tanwei-space-2);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  display: grid;
}

.tw-keypad-key {
  min-height: var(--tanwei-control-height-md);
  border: 1px solid var(--tanwei-color-border-strong);
  border-radius: var(--tanwei-shape-button);
  background-color: var(--tanwei-color-surface);
  color: var(--tanwei-color-text);
  font-family: var(--tanwei-typeface-mono);
  font-size: var(--tanwei-font-size-lg);
  font-weight: var(--tanwei-font-weight-medium);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  place-items: center;
  display: grid;
}

.tw-keypad-key:hover:not(:disabled) {
  background-color: var(--tanwei-color-surface-hover);
}

.tw-keypad-key:active:not(:disabled) {
  background-color: var(--tanwei-color-surface-pressed);
  transform: scale(.97);
}

.tw-keypad-key[data-action="confirm"] {
  background-color: var(--tanwei-color-accent);
  color: var(--tanwei-color-on-accent);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-semibold);
  border-color: #0000;
  grid-column: 1 / -1;
}

.tw-keypad-key[data-action="confirm"]:hover:not(:disabled) {
  background-color: var(--tanwei-color-accent-hover);
}

.tw-field {
  align-content: start;
  gap: 6px;
  min-width: 0;
  display: grid;
}

.tw-field-label {
  font-size: var(--tanwei-font-size-xs);
  font-weight: var(--tanwei-font-weight-medium);
  color: var(--tanwei-color-text-muted);
  letter-spacing: .01em;
}

.tw-field-description {
  font-size: var(--tanwei-font-size-xs);
  color: var(--tanwei-color-text-muted);
  margin: 0;
}

.tw-field-error {
  font-size: var(--tanwei-font-size-xs);
  color: var(--tanwei-color-danger);
  margin: 0;
}

.tw-input {
  --_edge: var(--tanwei-component-input-border);
  --_glint: transparent;
  --_fill: var(--tanwei-component-input-bg);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: var(--tanwei-control-height-md);
  padding-inline: var(--tanwei-space-3);
  border-radius: var(--tanwei-component-input-radius);
  background: linear-gradient(var(--_fill), var(--_fill)) padding-box,
    radial-gradient(ellipse 42% 140% at 100% 100%, var(--_glint), transparent) border-box,
    linear-gradient(var(--_edge), var(--_edge)) border-box;
  background-color: var(--_fill);
  color: var(--tanwei-color-text);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-control-font-size);
  transition-property: box-shadow;
  transition-duration: var(--tanwei-motion-duration-fast);
  transition-timing-function: var(--tanwei-motion-easing-snappy);
  border: 1px solid #0000;
  line-height: 1.4;
  display: block;
}

.tw-input[data-glint="true"], .tw-sky .tw-input {
  --_glint: var(--tanwei-color-aurum);
}

.tw-input::placeholder {
  color: var(--tanwei-color-text-muted);
  opacity: .65;
}

.tw-input:hover:not(:disabled):not(:focus), .tw-input[data-hovered]:not([data-focused]) {
  --_edge: var(--tanwei-color-text-muted);
}

.tw-input:focus, .tw-input[data-focused] {
  --_edge: var(--tanwei-component-input-border-focus);
  --_glint: transparent;
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
  outline: none;
}

.tw-input[aria-invalid="true"], .tw-input[data-invalid] {
  --_edge: var(--tanwei-color-danger);
  --_glint: transparent;
}

.tw-input:disabled, .tw-input[data-disabled] {
  --_fill: var(--tanwei-color-surface-sunken);
  --_edge: var(--tanwei-color-border);
  --_glint: transparent;
  color: var(--tanwei-color-text-muted);
  cursor: not-allowed;
}

@media (forced-colors: active) {
  .tw-input {
    border-color: canvastext;
  }
}

.tw-input[data-size="sm"] {
  height: var(--tanwei-control-height-sm);
  padding-inline: var(--tanwei-space-2);
  font-size: var(--tanwei-font-size-xs);
}

.tw-input[data-size="lg"] {
  height: var(--tanwei-control-height-lg);
  padding-inline: var(--tanwei-space-4);
}

.tw-input[data-mono] {
  font-family: var(--tanwei-typeface-mono);
  font-size: var(--tanwei-font-size-sm);
  font-variant-numeric: tabular-nums;
}

textarea.tw-input {
  height: auto;
  min-height: calc(var(--tanwei-control-height-md) * 2.2);
  padding-block: var(--tanwei-space-2);
  resize: vertical;
}

.tw-native-select {
  display: block;
  position: relative;
}

.tw-native-select > select.tw-input {
  cursor: pointer;
  padding-right: 34px;
}

.tw-native-select:after {
  content: "";
  background-color: var(--tanwei-color-text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tw-native-select:has( > select:disabled):after {
  opacity: .45;
}

.tw-hairline-grid {
  --_hg-cols: 3;
  --_hg-bg: var(--tanwei-color-bg);
  grid-template-columns: repeat(var(--_hg-cols), minmax(0, 1fr));
  background-color: var(--tanwei-color-border-subtle);
  border-block: 1px solid var(--tanwei-color-border-subtle);
  gap: 1px;
  min-width: 0;
  display: grid;
}

.tw-hairline-grid[data-columns="2"] {
  --_hg-cols: 2;
}

.tw-hairline-grid[data-columns="3"] {
  --_hg-cols: 3;
}

.tw-hairline-grid[data-columns="4"] {
  --_hg-cols: 4;
}

.tw-hairline-grid[data-surface="paper"] {
  --_hg-bg: var(--tanwei-color-surface);
}

.tw-hairline-grid[data-flush="top"] {
  border-top: 0;
}

.tw-hairline-grid[data-flush="bottom"] {
  border-bottom: 0;
}

.tw-hairline-cell {
  align-content: start;
  gap: var(--tanwei-space-4);
  min-width: 0;
  padding: var(--tanwei-space-8) var(--tanwei-space-7);
  background-color: var(--_hg-bg, var(--tanwei-color-bg));
  color: var(--tanwei-color-text);
  transition: background-image var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing);
  text-decoration: none;
  display: grid;
  position: relative;
}

.tw-hairline-cell[data-padding="sm"] {
  padding: var(--tanwei-space-5) var(--tanwei-space-6);
  gap: var(--tanwei-space-3);
}

.tw-hairline-cell[data-padding="lg"] {
  padding: var(--tanwei-space-10) var(--tanwei-space-8);
  gap: var(--tanwei-space-5);
}

:is(.tw-hairline-cell[data-interactive="true"]:hover, .tw-hairline-cell[data-interactive="true"]:focus-visible) {
  background-image: linear-gradient(var(--tanwei-color-surface-hover), var(--tanwei-color-surface-hover));
  outline: none;
}

.tw-hairline-cell[data-interactive="true"]:focus-visible {
  box-shadow: inset 0 0 0 2px var(--tanwei-color-accent);
}

@media (max-width: 900px) {
  .tw-hairline-grid[data-columns="3"], .tw-hairline-grid[data-columns="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tw-hairline-grid {
    grid-template-columns: 1fr;
  }

  .tw-hairline-cell {
    padding: var(--tanwei-space-5) 0;
  }
}

.tw-icon {
  vertical-align: -.15em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6px;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  width: 16px;
  height: 16px;
  display: inline-block;
}

.tw-icon[data-size="xs"] {
  width: 12px;
  height: 12px;
}

.tw-icon[data-size="sm"] {
  width: 14px;
  height: 14px;
}

.tw-icon[data-size="lg"] {
  stroke-width: 1.5px;
  width: 20px;
  height: 20px;
}

.tw-icon-button {
  width: var(--tanwei-control-height-md);
  height: var(--tanwei-control-height-md);
  min-width: var(--tanwei-control-min-target);
  min-height: var(--tanwei-control-min-target);
  border-radius: var(--tanwei-shape-button);
  color: var(--tanwei-color-text-muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition-property: background-color, border-color, color, transform;
  transition-duration: var(--tanwei-motion-duration-micro);
  transition-timing-function: var(--tanwei-motion-easing-snappy);
  background-color: #0000;
  border: 1px solid #0000;
  outline: none;
  flex: none;
  place-items: center;
  padding: 0;
  display: inline-grid;
}

.tw-icon-button > svg {
  width: 16px;
  height: 16px;
}

.tw-icon-button[data-size="sm"] {
  width: var(--tanwei-control-height-sm);
  height: var(--tanwei-control-height-sm);
}

.tw-icon-button[data-size="sm"] > svg {
  width: 14px;
  height: 14px;
}

.tw-icon-button[data-size="lg"] {
  width: var(--tanwei-control-height-lg);
  height: var(--tanwei-control-height-lg);
}

.tw-icon-button[data-size="lg"] > svg {
  width: 20px;
  height: 20px;
}

.tw-icon-button:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-icon-button[data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-hover);
  color: var(--tanwei-color-text);
}

.tw-icon-button:active:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-icon-button[data-pressed]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-pressed);
  color: var(--tanwei-color-text);
  transform: scale(.96);
}

.tw-icon-button[data-variant="secondary"] {
  background-color: var(--tanwei-color-surface);
  border-color: var(--tanwei-color-border-strong);
  color: var(--tanwei-color-text);
  box-shadow: var(--tanwei-shadow-sm);
}

.tw-icon-button[data-variant="secondary"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-icon-button[data-variant="secondary"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-sunken);
}

.tw-icon-button[data-variant="subtle"] {
  background-color: var(--tanwei-color-accent-soft);
  color: var(--tanwei-color-accent-text);
}

.tw-icon-button[data-variant="subtle"]:hover:not(:disabled):not([data-disabled]):not([aria-disabled="true"]), .tw-icon-button[data-variant="subtle"][data-hovered]:not(:disabled):not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-accent-soft-strong);
}

:is(.tw-icon-button:focus-visible, .tw-icon-button[data-focus-visible]) {
  outline: 2px solid var(--tanwei-color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-icon-button:disabled, .tw-icon-button[data-disabled], .tw-icon-button[aria-disabled="true"] {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.tw-kbd {
  border: 1px solid var(--tanwei-color-border-strong);
  border-radius: var(--tanwei-radius-xs);
  background-color: var(--tanwei-color-surface-sunken);
  min-width: 18px;
  height: 18px;
  color: var(--tanwei-color-text-muted);
  font-family: var(--tanwei-typeface-mono);
  font-size: 11px;
  font-weight: var(--tanwei-font-weight-medium);
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  border-bottom-width: 2px;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding-inline-start: 5px;
  padding-inline-end: 5px;
  line-height: 1;
  display: inline-flex;
}

.tw-container {
  width: 100%;
  max-width: var(--tanwei-container-default);
  padding-inline: var(--tanwei-layout-gutter);
  margin-inline-start: auto;
  margin-inline-end: auto;
}

.tw-container[data-size="narrow"] {
  max-width: var(--tanwei-container-narrow);
}

.tw-container[data-size="wide"] {
  max-width: var(--tanwei-container-wide);
}

.tw-container[data-gutter="false"] {
  padding-inline-start: 0;
  padding-inline-end: 0;
}

.tw-section {
  padding-block: var(--tanwei-layout-section-y);
}

.tw-section[data-space="sm"] {
  padding-block: calc(var(--tanwei-layout-section-y) * .6);
}

.tw-section[data-space="lg"] {
  padding-block: calc(var(--tanwei-layout-section-y) * 1.25);
}

.tw-section[data-band="true"] {
  background-color: var(--tanwei-color-surface);
  border-block: 1px solid var(--tanwei-color-border-subtle);
}

.tw-stack {
  align-content: start;
  gap: var(--tanwei-layout-stack-gap);
  min-width: 0;
  display: grid;
}

.tw-stack[data-gap="xs"] {
  gap: var(--tanwei-space-2);
}

.tw-stack[data-gap="sm"] {
  gap: var(--tanwei-space-3);
}

.tw-stack[data-gap="md"] {
  gap: var(--tanwei-space-5);
}

.tw-stack[data-gap="lg"] {
  gap: var(--tanwei-space-8);
}

.tw-stack[data-gap="xl"] {
  gap: var(--tanwei-space-12);
}

.tw-stack[data-align="start"] {
  justify-items: start;
}

.tw-stack[data-align="center"] {
  justify-items: center;
}

.tw-stack[data-align="end"] {
  justify-items: end;
}

.tw-stack[data-align="stretch"] {
  justify-items: stretch;
}

.tw-inline {
  align-items: center;
  gap: var(--tanwei-layout-gap);
  flex-wrap: wrap;
  min-width: 0;
  display: flex;
}

.tw-inline[data-gap="xs"] {
  gap: var(--tanwei-space-1);
}

.tw-inline[data-gap="sm"] {
  gap: var(--tanwei-space-2);
}

.tw-inline[data-gap="md"] {
  gap: var(--tanwei-space-4);
}

.tw-inline[data-gap="lg"] {
  gap: var(--tanwei-space-6);
}

.tw-inline[data-align="start"] {
  align-items: flex-start;
}

.tw-inline[data-align="end"] {
  align-items: flex-end;
}

.tw-inline[data-align="baseline"] {
  align-items: baseline;
}

.tw-inline[data-align="stretch"] {
  align-items: stretch;
}

.tw-inline[data-justify="center"] {
  justify-content: center;
}

.tw-inline[data-justify="end"] {
  justify-content: flex-end;
}

.tw-inline[data-justify="between"] {
  justify-content: space-between;
}

.tw-inline[data-wrap="false"] {
  flex-wrap: nowrap;
}

.tw-menu {
  outline: none;
  gap: 2px;
  min-width: 180px;
  display: grid;
}

.tw-menu-header {
  padding: 4px var(--tanwei-space-2) 2px;
  font-size: 11px;
  font-weight: var(--tanwei-font-weight-medium);
  color: var(--tanwei-color-text-muted);
  letter-spacing: .02em;
  -webkit-user-select: none;
  user-select: none;
}

.tw-menu-separator {
  background-color: var(--tanwei-color-border-subtle);
  border: 0;
  height: 1px;
  margin: 4px 2px;
}

.tw-menu-item {
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-4);
  min-height: calc(var(--tanwei-control-height-md) - 4px);
  padding: 0 var(--tanwei-space-2);
  border-radius: calc(var(--tanwei-shape-control) - 1px);
  color: var(--tanwei-color-text);
  font-size: var(--tanwei-control-font-size);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy);
  outline: none;
  text-decoration: none;
  display: flex;
}

.tw-menu-item .tw-menu-item-main {
  align-items: center;
  gap: var(--tanwei-space-2);
  min-width: 0;
  display: inline-flex;
}

.tw-menu-item .tw-menu-item-main > svg {
  width: 15px;
  height: 15px;
  color: var(--tanwei-color-text-muted);
  flex: none;
}

.tw-menu-item:hover:not([data-disabled]):not([aria-disabled="true"]), .tw-menu-item[data-focused]:not([data-disabled]):not([aria-disabled="true"]), .tw-menu-item[data-hovered]:not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-hover);
}

:is(.tw-menu-item:hover:not([data-disabled]):not([aria-disabled="true"]), .tw-menu-item[data-focused]:not([data-disabled]):not([aria-disabled="true"]), .tw-menu-item[data-hovered]:not([data-disabled]):not([aria-disabled="true"])) .tw-menu-item-main > svg {
  color: var(--tanwei-color-text);
}

.tw-menu-item[data-tone="danger"] {
  color: var(--tanwei-color-danger);
}

.tw-menu-item[data-tone="danger"] .tw-menu-item-main > svg {
  color: var(--tanwei-color-danger);
}

.tw-menu-item[data-tone="danger"]:hover:not([data-disabled]):not([aria-disabled="true"]), .tw-menu-item[data-tone="danger"][data-focused]:not([data-disabled]):not([aria-disabled="true"]), .tw-menu-item[data-tone="danger"][data-hovered]:not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-danger-soft);
}

.tw-menu-item[data-disabled], .tw-menu-item[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
}

.tw-metric-strip {
  border-block: 1px solid var(--tanwei-color-border-subtle);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  min-width: 0;
  display: grid;
}

.tw-metric-strip[data-flush="top"] {
  border-top: 0;
}

.tw-metric-strip[data-flush="bottom"] {
  border-bottom: 0;
}

.tw-metric-strip[data-flush="both"] {
  border-block-start: 0;
  border-block-end: 0;
}

.tw-metric-strip > .tw-metric {
  min-width: 0;
  padding: var(--tanwei-space-5) var(--tanwei-space-6);
  border-inline-start: 1px solid var(--tanwei-color-border-subtle);
  align-content: start;
  gap: 8px;
  display: grid;
}

.tw-metric-strip > .tw-metric:first-child {
  border-inline-start: 0;
  padding-inline-start: 0;
}

.tw-metric-strip[data-layout="rows"] {
  border-block-start: 0;
  border-block-end: 0;
  grid-template-columns: 1fr;
  display: grid;
}

.tw-metric-strip[data-layout="rows"] > .tw-metric {
  justify-content: space-between;
  align-items: baseline;
  gap: var(--tanwei-space-3);
  padding: var(--tanwei-space-2-5) 0;
  border-inline-start: 0;
  border-bottom: 1px solid var(--tanwei-color-border-subtle);
  display: flex;
}

.tw-metric-strip[data-layout="rows"] > .tw-metric:last-child {
  border-bottom: 0;
}

.tw-metric-strip[data-layout="rows"] .tw-metric-value {
  font-size: var(--tanwei-font-size-md);
}

.tw-metric-label {
  font-size: var(--tanwei-font-size-xs);
  color: var(--tanwei-color-text-muted);
  letter-spacing: .03em;
}

.tw-metric-value {
  font-family: var(--tanwei-typeface-numeral);
  font-variation-settings: normal;
  font-size: 30px;
  font-weight: var(--tanwei-font-weight-medium);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
  color: var(--tanwei-color-text);
  line-height: 1.12;
}

.tw-metric-value[data-tone="accent"] {
  color: var(--tanwei-color-accent-text);
}

.tw-metric-value[data-tone="aurum"] {
  color: var(--tanwei-color-aurum-text);
}

.tw-metric-value[data-tone="success"] {
  color: var(--tanwei-color-success);
}

.tw-metric-value[data-tone="warning"] {
  color: var(--tanwei-color-warning);
}

.tw-metric-value[data-tone="danger"] {
  color: var(--tanwei-color-danger);
}

.tw-metric-note {
  font-size: var(--tanwei-font-size-xs);
  color: var(--tanwei-color-text-muted);
}

@media (max-width: 720px) {
  .tw-metric-strip:not([data-layout="rows"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tw-metric-strip:not([data-layout="rows"]) > .tw-metric {
    padding: var(--tanwei-space-3) var(--tanwei-space-3);
    border-bottom: 1px solid var(--tanwei-color-border-subtle);
  }

  .tw-metric-strip:not([data-layout="rows"]) > .tw-metric:nth-child(odd) {
    border-inline-start: 0;
    padding-inline-start: 0;
  }
}

.tw-prism {
  --_p-cage: var(--tanwei-component-prism-aurum-cage);
  --_p-hi: var(--tanwei-component-prism-aurum-hi);
  --_p-core: var(--tanwei-component-prism-core);
  --_p-glow: var(--tanwei-color-anchor-glow);
  vertical-align: -.18em;
  -webkit-user-select: none;
  user-select: none;
  width: 22px;
  height: 22px;
  color: var(--_p-cage);
  filter: drop-shadow(0 0 6px var(--_p-glow));
  transition: color var(--tanwei-motion-duration) var(--tanwei-motion-easing),
              filter var(--tanwei-motion-duration-glow) var(--tanwei-motion-easing);
  flex: none;
  place-items: center;
  display: inline-grid;
  position: relative;
}

.tw-prism > svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.tw-prism[data-size="xxs"] {
  filter: none;
  width: 15px;
  height: 15px;
}

.tw-prism[data-size="xs"] {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 3px var(--_p-glow));
}

.tw-prism[data-size="md"] {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 8px var(--_p-glow));
}

.tw-prism[data-size="lg"] {
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 0 14px var(--_p-glow));
}

.tw-prism[data-size="xl"] {
  width: 144px;
  height: 144px;
  filter: drop-shadow(0 0 20px var(--_p-glow));
}

.tw-prism[data-size="hero"] {
  width: 208px;
  height: 208px;
  filter: drop-shadow(0 0 26px var(--_p-glow));
}

.tw-prism[data-interactive="true"] {
  cursor: grab;
  touch-action: none;
}

.tw-prism[data-dragging="true"] {
  cursor: grabbing;
}

.tw-prism[data-tone="aurum"] {
  --_p-cage: var(--tanwei-component-prism-aurum-cage);
  --_p-hi: var(--tanwei-component-prism-aurum-hi);
  --_p-glow: var(--tanwei-color-anchor-glow);
}

.tw-prism[data-tone="accent"] {
  --_p-cage: var(--tanwei-component-prism-accent-cage);
  --_p-hi: var(--tanwei-component-prism-accent-hi);
  --_p-glow: var(--tanwei-color-focus-ring);
}

.tw-prism[data-tone="success"] {
  --_p-cage: var(--tanwei-component-prism-success-cage);
  --_p-hi: var(--tanwei-component-prism-success-hi);
  --_p-glow: var(--tanwei-color-success-soft);
}

.tw-prism[data-tone="warning"] {
  --_p-cage: var(--tanwei-component-prism-warning-cage);
  --_p-hi: var(--tanwei-component-prism-warning-hi);
  --_p-glow: var(--tanwei-color-warning-soft);
}

.tw-prism[data-tone="danger"] {
  --_p-cage: var(--tanwei-component-prism-danger-cage);
  --_p-hi: var(--tanwei-component-prism-danger-hi);
  --_p-glow: var(--tanwei-color-danger-soft);
}

.tw-prism[data-tone="ink"] {
  --_p-cage: var(--tanwei-color-text-muted);
  --_p-hi: var(--tanwei-color-text);
  --_p-glow: transparent;
}

[data-perf="lite"] .tw-prism {
  filter: none;
  transition: none;
}

.tw-prism-cage {
  fill: none;
  stroke: var(--_p-cage);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tw-prism-sand {
  fill: none;
  stroke: var(--_p-cage);
  stroke-opacity: .16;
  stroke-width: 4.2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-perf="lite"] .tw-prism-sand, .tw-prism[data-sand="off"] .tw-prism-sand {
  display: none;
}

.tw-prism-node {
  fill: none;
  stroke: var(--_p-hi);
  stroke-width: 2.05px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tw-prism[data-dimension="3d"] .tw-prism-node {
  stroke-width: 2.15px;
}

.tw-prism-pivot {
  fill: var(--_p-core);
  stroke: var(--_p-hi);
  stroke-width: 1.05px;
}

.tw-prism-pivot[data-critical="true"] {
  fill: var(--tanwei-color-aurum-bright);
  stroke: var(--tanwei-color-aurum);
  stroke-width: 1.25px;
}

.tw-prism-2d-veil {
  fill: var(--_p-cage);
  fill-opacity: .09;
  stroke: none;
}

.tw-prism-2d-cage {
  fill: none;
  stroke: var(--_p-cage);
  stroke-opacity: .86;
  stroke-width: 3.7px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tw-prism-2d-deltoid {
  fill: none;
  stroke: var(--_p-hi);
  stroke-opacity: .98;
  stroke-width: 4.4px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tw-prism:not([data-size]) .tw-prism-2d-veil, .tw-prism[data-size="sm"] .tw-prism-2d-veil {
  fill-opacity: .11;
}

.tw-prism:not([data-size]) .tw-prism-2d-cage, .tw-prism[data-size="sm"] .tw-prism-2d-cage {
  stroke-width: 5.5px;
  stroke-opacity: .9;
}

.tw-prism:not([data-size]) .tw-prism-2d-deltoid, .tw-prism[data-size="sm"] .tw-prism-2d-deltoid {
  stroke-width: 6.4px;
  stroke-opacity: 1;
}

.tw-prism[data-size="xs"] .tw-prism-2d-veil {
  fill-opacity: .12;
}

.tw-prism[data-size="xs"] .tw-prism-2d-cage {
  stroke-width: 6.4px;
  stroke-opacity: .92;
}

.tw-prism[data-size="xs"] .tw-prism-2d-deltoid {
  stroke-width: 7.4px;
  stroke-opacity: 1;
}

.tw-prism[data-size="xxs"] .tw-prism-2d-veil {
  fill-opacity: .14;
}

.tw-prism[data-size="xxs"] .tw-prism-2d-cage {
  stroke-width: 7.2px;
  stroke-opacity: .94;
}

.tw-prism[data-size="xxs"] .tw-prism-2d-deltoid {
  stroke-width: 8.4px;
  stroke-opacity: 1;
}

.tw-prism-2d-echo {
  fill: none;
  stroke: var(--_p-cage);
  stroke-opacity: .24;
  stroke-width: 1.3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-perf="lite"] .tw-prism-2d-echo, .tw-prism[data-sand="off"] .tw-prism-2d-echo {
  display: none;
}

.tw-segmented {
  border: 1px solid var(--tanwei-color-border);
  border-radius: var(--tanwei-shape-control);
  background-color: var(--tanwei-color-surface-sunken);
  vertical-align: middle;
  align-items: center;
  gap: 3px;
  padding: 3px;
  display: inline-flex;
}

.tw-segmented[data-full="true"] {
  width: 100%;
  display: flex;
}

.tw-segmented[data-full="true"] .tw-segmented-item {
  flex: 1;
}

.tw-segmented-item {
  -webkit-appearance: none;
  appearance: none;
  height: calc(var(--tanwei-control-height-md) - 6px);
  padding-inline: var(--tanwei-space-3);
  border-radius: calc(var(--tanwei-shape-control) - 2px);
  color: var(--tanwei-color-text-muted);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-medium);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy),
              color var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy),
              box-shadow var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy);
  background-color: #0000;
  border: 1px solid #0000;
  outline: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  line-height: 1;
  display: inline-flex;
}

.tw-segmented[data-size="sm"] .tw-segmented-item {
  height: calc(var(--tanwei-control-height-sm) - 6px);
  padding-inline: var(--tanwei-space-2-5);
  font-size: var(--tanwei-font-size-xs);
}

.tw-segmented[data-size="lg"] .tw-segmented-item {
  height: calc(var(--tanwei-control-height-lg) - 6px);
  padding-inline: var(--tanwei-space-4);
  font-size: var(--tanwei-font-size-base);
}

.tw-segmented-item:hover:not([data-disabled]):not(:disabled), .tw-segmented-item[data-hovered]:not([data-disabled]):not(:disabled) {
  color: var(--tanwei-color-text);
}

.tw-segmented-item[data-selected], .tw-segmented-item[aria-pressed="true"] {
  background-color: var(--tanwei-color-surface-raised);
  border-color: var(--tanwei-color-border-overlay);
  color: var(--tanwei-color-text);
  font-weight: var(--tanwei-font-weight-semibold);
  box-shadow: var(--tanwei-shadow-sm);
}

:is(.tw-segmented-item:focus-visible, .tw-segmented-item[data-focus-visible]) {
  outline: 2px solid var(--tanwei-color-accent);
  outline-offset: 1px;
}

.tw-segmented-item:disabled, .tw-segmented-item[data-disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.tw-select {
  gap: 6px;
  min-width: 0;
  display: grid;
}

.tw-select-trigger {
  --_edge: var(--tanwei-component-input-border);
  --_glint: transparent;
  --_fill: var(--tanwei-component-input-bg);
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-2);
  width: 100%;
  height: var(--tanwei-control-height-md);
  padding-inline: var(--tanwei-space-3);
  border-radius: var(--tanwei-component-input-radius);
  background: linear-gradient(var(--_fill), var(--_fill)) padding-box,
    radial-gradient(ellipse 42% 140% at 100% 100%, var(--_glint), transparent) border-box,
    linear-gradient(var(--_edge), var(--_edge)) border-box;
  background-color: var(--_fill);
  color: var(--tanwei-color-text);
  font-size: var(--tanwei-control-font-size);
  text-align: start;
  cursor: pointer;
  transition-property: box-shadow;
  transition-duration: var(--tanwei-motion-duration-fast);
  transition-timing-function: var(--tanwei-motion-easing-snappy);
  border: 1px solid #0000;
  outline: none;
  display: flex;
}

.tw-select-trigger[data-glint="true"], .tw-select[data-glint="true"] .tw-select-trigger, .tw-sky .tw-select-trigger {
  --_glint: var(--tanwei-color-aurum);
}

.tw-select[data-size="sm"] .tw-select-trigger {
  height: var(--tanwei-control-height-sm);
  padding-inline: var(--tanwei-space-2);
  font-size: var(--tanwei-font-size-xs);
}

.tw-select[data-size="lg"] .tw-select-trigger {
  height: var(--tanwei-control-height-lg);
  padding-inline: var(--tanwei-space-4);
  font-size: var(--tanwei-font-size-base);
}

.tw-select-trigger:hover:not(:disabled):not([data-disabled]), .tw-select-trigger[data-hovered]:not(:disabled):not([data-disabled]) {
  --_edge: var(--tanwei-color-text-muted);
}

.tw-select-trigger[data-focus-visible], .tw-select-trigger[data-pressed], .tw-select[data-open] .tw-select-trigger {
  --_edge: var(--tanwei-component-input-border-focus);
  --_glint: transparent;
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-select-trigger:focus-visible {
  --_edge: var(--tanwei-component-input-border-focus);
  --_glint: transparent;
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-select[data-invalid] .tw-select-trigger {
  --_edge: var(--tanwei-color-danger);
  --_glint: transparent;
}

.tw-select-trigger:disabled, .tw-select-trigger[data-disabled] {
  --_fill: var(--tanwei-color-surface-sunken);
  --_edge: var(--tanwei-color-border);
  --_glint: transparent;
  color: var(--tanwei-color-text-muted);
  cursor: not-allowed;
}

@media (forced-colors: active) {
  .tw-select-trigger {
    border-color: buttontext;
  }
}

.tw-select-value {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.tw-select-value[data-placeholder] {
  color: var(--tanwei-color-text-muted);
}

.tw-select-chevron {
  background-color: var(--tanwei-color-text-muted);
  width: 16px;
  height: 16px;
  transition: transform var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-snappy);
  flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tw-select[data-open] .tw-select-chevron {
  transform: rotate(180deg);
}

.tw-popover {
  --_pop-y: -4px;
  z-index: var(--tanwei-z-popover);
  min-width: var(--trigger-width, 160px);
  border: 1px solid var(--tanwei-color-border-overlay);
  border-radius: var(--tanwei-shape-popover);
  background-color: var(--tanwei-color-surface-raised);
  max-height: 320px;
  color: var(--tanwei-color-text);
  box-shadow: var(--tanwei-shadow-popover);
  transform-origin: var(--trigger-anchor-point, center top);
  outline: none;
  padding: 4px;
  overflow-y: auto;
}

.tw-popover[data-placement="top"] {
  --_pop-y: 4px;
  transform-origin: var(--trigger-anchor-point, center bottom);
}

.tw-popover[data-placement="left"] {
  --_pop-y: 0px;
  transform-origin: 100%;
}

.tw-popover[data-placement="right"] {
  --_pop-y: 0px;
  transform-origin: 0;
}

.tw-popover[data-entering] {
  animation: tw-pop-in var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-snappy);
}

.tw-popover[data-exiting] {
  animation: tw-pop-in var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-exit) reverse;
}

@keyframes tw-pop-in {
  from {
    opacity: 0;
    transform: translateY(var(--_pop-y)) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tw-listbox {
  outline: none;
  gap: 2px;
  display: grid;
}

.tw-listbox-item {
  justify-content: space-between;
  align-items: center;
  gap: var(--tanwei-space-3);
  min-height: calc(var(--tanwei-control-height-md) - 4px);
  padding: 0 var(--tanwei-space-2);
  border-radius: calc(var(--tanwei-shape-control) - 1px);
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-regular);
  cursor: pointer;
  transition: background-color var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy);
  outline: none;
  display: flex;
}

.tw-listbox-item[data-focused], .tw-listbox-item[data-hovered] {
  background-color: var(--tanwei-color-surface-hover);
}

.tw-listbox-item[data-selected] {
  color: var(--tanwei-color-accent-text);
  font-weight: var(--tanwei-font-weight-medium);
}

.tw-listbox-item[data-selected]:after {
  content: "";
  background-color: currentColor;
  flex: none;
  width: 15px;
  height: 15px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 8.4 6.5 11.7 12.8 4.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 8.4 6.5 11.7 12.8 4.8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.tw-listbox-item[data-disabled] {
  color: var(--tanwei-color-text-muted);
  opacity: .45;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .tw-popover {
    animation: none !important;
  }
}

.tw-sky {
  isolation: isolate;
  background-color: var(--tanwei-color-bg);
  background-image: linear-gradient(180deg, transparent 0%, transparent 54%, var(--tanwei-color-bg) 100%),
    radial-gradient(56% 52% at 72% 46%, var(--tanwei-color-aurum-wash), transparent 76%),
    radial-gradient(112% 62% at 50% 62%, var(--tanwei-component-sky-horizon), transparent 82%),
    linear-gradient(180deg, var(--tanwei-color-bg) 0%, var(--tanwei-component-sky-horizon) 52%, var(--tanwei-color-bg) 100%);
  color: var(--tanwei-color-text);
  position: relative;
  overflow: hidden;
}

.tw-slider {
  --_slider-accent: var(--tanwei-color-accent);
  gap: var(--tanwei-space-2);
  width: 100%;
  min-width: 0;
  display: grid;
}

.tw-slider[data-tone="aurum"] {
  --_slider-accent: var(--tanwei-color-aurum);
}

.tw-slider[data-disabled] {
  opacity: .5;
}

.tw-slider-header {
  justify-content: space-between;
  align-items: baseline;
  gap: var(--tanwei-space-3);
  display: flex;
}

.tw-slider-output {
  font-family: var(--tanwei-typeface-mono);
  font-feature-settings: "zero" 0, "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-size: var(--tanwei-font-size-xs);
  font-weight: var(--tanwei-font-weight-medium);
  color: var(--tanwei-color-text);
}

.tw-slider-track {
  width: 100%;
  height: var(--tanwei-control-min-target);
  cursor: pointer;
  touch-action: none;
  align-items: center;
  display: flex;
  position: relative;
}

.tw-slider-track:before {
  content: "";
  border-radius: var(--tanwei-radius-full);
  background-color: var(--tanwei-color-border-strong);
  width: 100%;
  height: 4px;
  display: block;
}

.tw-slider-track[data-disabled] {
  cursor: not-allowed;
}

.tw-slider-fill {
  border-radius: var(--tanwei-radius-full);
  background-color: var(--_slider-accent);
  pointer-events: none;
  height: 4px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.tw-slider-thumb {
  border: 2px solid var(--_slider-accent);
  background-color: var(--tanwei-component-control-thumb);
  width: 18px;
  height: 18px;
  box-shadow: var(--tanwei-shadow-sm);
  cursor: grab;
  transition: transform var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy),
              box-shadow var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-snappy);
  border-radius: 50%;
  outline: none;
  top: 50%;
}

.tw-slider[data-size="sm"] .tw-slider-thumb {
  width: 15px;
  height: 15px;
}

.tw-slider-thumb:hover:not([data-disabled]), .tw-slider-thumb[data-hovered]:not([data-disabled]) {
  transform: scale(1.1);
}

.tw-slider-thumb[data-dragging] {
  cursor: grabbing;
  box-shadow: 0 0 0 4px var(--tanwei-color-focus-ring);
  transform: scale(1.14);
}

:is(.tw-slider-thumb:focus-visible, .tw-slider-thumb[data-focus-visible]) {
  box-shadow: 0 0 0 4px var(--tanwei-color-focus-ring);
}

.tw-slider-thumb[data-disabled] {
  cursor: not-allowed;
}

[data-density="touch"] .tw-slider-thumb {
  width: 24px;
  height: 24px;
}

.tw-split-pane {
  --_sp-aside: 336px;
  grid-template-columns: minmax(0, 1fr) var(--_sp-aside);
  align-items: stretch;
  min-width: 0;
  display: grid;
}

.tw-split-pane[data-aside="sm"] {
  --_sp-aside: 280px;
}

.tw-split-pane[data-aside="lg"] {
  --_sp-aside: 400px;
}

.tw-split-pane[data-aside="even"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tw-split-main {
  align-content: start;
  gap: var(--tanwei-space-5);
  min-width: 0;
  padding: var(--tanwei-space-6) var(--tanwei-space-7);
  display: grid;
}

.tw-split-main[data-padding="none"] {
  padding: 0;
}

.tw-split-aside {
  align-content: start;
  gap: var(--tanwei-space-5);
  min-width: 0;
  padding: var(--tanwei-space-6) var(--tanwei-space-6);
  border-inline-start: 1px solid var(--tanwei-color-border);
  display: grid;
}

.tw-split-aside[data-padding="none"] {
  padding: 0;
}

@media (max-width: 1020px) {
  .tw-split-pane, .tw-split-pane[data-aside="even"] {
    grid-template-columns: 1fr;
  }

  .tw-split-aside {
    border-inline-start: 0;
    border-block-start: 1px solid var(--tanwei-color-border);
  }
}

.tw-star {
  vertical-align: -.05em;
  width: 10px;
  height: 10px;
  fill: var(--tanwei-component-star-fill);
  stroke: var(--tanwei-component-star-edge);
  stroke-width: 1.6px;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px var(--tanwei-component-star-glow));
  flex: none;
  display: inline-block;
  overflow: visible;
}

[data-perf="lite"] .tw-star {
  filter: none;
}

.tw-star[data-size="xs"] {
  width: 8px;
  height: 8px;
}

.tw-star[data-size="md"] {
  width: 12px;
  height: 12px;
}

.tw-star[data-size="lg"] {
  width: 14px;
  height: 14px;
}

.tw-star[data-state="off"] {
  fill: #0000;
  stroke: var(--tanwei-component-star-off);
  filter: none;
}

.tw-sticker {
  border-radius: var(--tanwei-shape-badge);
  background: linear-gradient(var(--tanwei-color-anchor), var(--tanwei-color-anchor)) padding-box,
    linear-gradient(135deg, var(--tanwei-color-aurum-bright), var(--tanwei-color-aurum) 55%, transparent) border-box;
  background-color: var(--tanwei-color-anchor);
  color: var(--tanwei-color-on-anchor);
  font-family: var(--tanwei-typeface-body);
  font-size: var(--tanwei-font-size-xs);
  font-weight: var(--tanwei-font-weight-semibold);
  letter-spacing: .06em;
  white-space: nowrap;
  vertical-align: middle;
  animation: tw-anchor-in var(--tanwei-motion-duration-glow) var(--tanwei-motion-easing) both;
  border: 1px solid #0000;
  justify-self: start;
  padding: 3px 7px;
  line-height: 1.2;
  display: inline-block;
}

@keyframes tw-anchor-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-sticker {
    animation: none;
  }
}

.tw-surface {
  min-width: 0;
  padding: var(--tanwei-layout-inset);
  color: var(--tanwei-color-text);
  background-color: #0000;
  border: 0;
  border-radius: 0;
  position: relative;
}

.tw-surface[data-variant="band"] {
  background-color: var(--tanwei-color-surface);
  border-block: 1px solid var(--tanwei-color-border-subtle);
}

.tw-surface[data-variant="seam"] {
  border-top: 1px solid var(--tanwei-color-border-subtle);
}

.tw-surface[data-variant="seam"][data-seam="bottom"] {
  border-top: 0;
  border-bottom: 1px solid var(--tanwei-color-border-subtle);
}

.tw-surface[data-variant="seam"][data-seam="start"] {
  border-top: 0;
  border-inline-start: 1px solid var(--tanwei-color-border);
}

.tw-surface[data-variant="seam"][data-seam="end"] {
  border-top: 0;
  border-inline-end: 1px solid var(--tanwei-color-border);
}

.tw-surface[data-variant="seam"][data-seam="block"] {
  border-block: 1px solid var(--tanwei-color-border-subtle);
}

.tw-surface[data-variant="panel"] {
  background-color: var(--tanwei-color-surface);
  border: 1px solid var(--tanwei-color-border);
  border-radius: var(--tanwei-shape-panel);
}

.tw-surface[data-variant="sunken"] {
  background-color: var(--tanwei-color-surface-sunken);
  border: 1px solid var(--tanwei-color-border-subtle);
  border-radius: var(--tanwei-shape-panel);
}

.tw-surface[data-variant="floating"] {
  background-color: var(--tanwei-color-surface-raised);
  border: 1px solid var(--tanwei-color-border-overlay);
  border-radius: var(--tanwei-shape-panel);
  box-shadow: var(--tanwei-shadow-md);
}

.tw-surface[data-padding="none"] {
  padding: 0;
}

.tw-surface[data-padding="sm"] {
  padding: var(--tanwei-space-3);
}

.tw-surface[data-padding="lg"] {
  padding: var(--tanwei-space-7);
}

.tw-switch {
  align-items: center;
  gap: var(--tanwei-space-2);
  min-height: var(--tanwei-control-min-target);
  font-size: var(--tanwei-control-font-size);
  color: var(--tanwei-color-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  position: relative;
}

.tw-switch > input {
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: -1px;
  position: absolute;
  overflow: hidden;
}

.tw-switch[data-disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.tw-switch:has(input:disabled) {
  opacity: .45;
  cursor: not-allowed;
}

.tw-switch-track {
  border-radius: var(--tanwei-radius-full);
  background-color: var(--tanwei-color-border-strong);
  width: 38px;
  height: 22px;
  transition: background-color var(--tanwei-motion-duration) var(--tanwei-motion-easing);
  flex: none;
  position: relative;
}

.tw-switch-track:after {
  content: "";
  background-color: var(--tanwei-component-control-thumb);
  width: 16px;
  height: 16px;
  box-shadow: var(--tanwei-shadow-sm);
  transition: transform var(--tanwei-motion-duration) var(--tanwei-motion-easing);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
}

.tw-switch > input:checked + .tw-switch-track, .tw-switch[data-selected] .tw-switch-track {
  background-color: var(--tanwei-color-accent);
}

:is(.tw-switch > input:checked + .tw-switch-track, .tw-switch[data-selected] .tw-switch-track):after {
  background-color: var(--tanwei-color-on-accent);
  transform: translateX(16px);
}

.tw-switch[data-focus-visible] .tw-switch-track {
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-switch > input:focus-visible + .tw-switch-track {
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  .tw-switch-track, .tw-switch-track:after {
    transition: none;
  }
}

.tw-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.tw-table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--tanwei-control-font-size);
  color: var(--tanwei-color-text);
}

.tw-table th {
  padding: var(--tanwei-layout-gap) var(--tanwei-space-4);
  border-bottom: 1px solid var(--tanwei-color-border);
  color: var(--tanwei-color-text-muted);
  font-size: var(--tanwei-font-size-xs);
  font-weight: var(--tanwei-font-weight-medium);
  font-variation-settings: "BEVL" 32;
  letter-spacing: .03em;
  text-align: start;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}

.tw-table td {
  padding: var(--tanwei-layout-gap) var(--tanwei-space-4);
  border-bottom: 1px solid var(--tanwei-color-border-subtle);
  word-break: keep-all;
  vertical-align: middle;
}

.tw-table td[data-numeric] {
  white-space: nowrap;
}

.tw-table tbody tr:last-child td {
  border-bottom: 0;
}

.tw-table tbody tr {
  transition: background-color var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy);
}

.tw-table tbody tr:hover, .tw-table tbody tr[data-hovered] {
  background-color: var(--tanwei-color-surface-hover);
}

.tw-table tbody tr[data-selected], .tw-table tbody tr[aria-selected="true"] {
  background-color: var(--tanwei-color-accent-soft);
}

.tw-table [data-numeric] {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.tw-table [data-muted] {
  color: var(--tanwei-color-text-muted);
}

.tw-table [data-alert] {
  color: var(--tanwei-color-danger);
  font-weight: var(--tanwei-font-weight-semibold);
}

.tw-tabs {
  gap: var(--tanwei-space-3);
  min-width: 0;
  display: grid;
}

.tw-tab-list {
  border: 1px solid var(--tanwei-color-border-subtle);
  border-radius: var(--tanwei-shape-control);
  background-color: var(--tanwei-color-surface-sunken);
  gap: 2px;
  width: max-content;
  max-width: 100%;
  padding: 3px;
  display: inline-flex;
  overflow-x: auto;
}

.tw-tab {
  min-height: calc(var(--tanwei-control-height-md) - 6px);
  padding: 0 var(--tanwei-space-3);
  border-radius: calc(var(--tanwei-shape-control) - 2px);
  color: var(--tanwei-color-text-muted);
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-medium);
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition-property: background-color, color, box-shadow;
  transition-duration: var(--tanwei-motion-duration-fast);
  transition-timing-function: var(--tanwei-motion-easing-snappy);
  outline: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.tw-tab:hover:not([data-disabled]):not([aria-disabled="true"]), .tw-tab[data-hovered]:not([data-disabled]):not([aria-disabled="true"]) {
  color: var(--tanwei-color-text);
}

.tw-tab[aria-selected="true"], .tw-tab[data-selected] {
  background-color: var(--tanwei-color-surface);
  color: var(--tanwei-color-text);
  box-shadow: var(--tanwei-shadow-sm), 0 0 0 1px var(--tanwei-color-border-overlay);
}

:is(.tw-tab:focus-visible, .tw-tab[data-focus-visible]) {
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
}

.tw-tab[data-disabled], .tw-tab[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
}

.tw-tab-panel {
  outline: none;
  min-width: 0;
}

.tw-tab-panel[data-focus-visible] {
  box-shadow: 0 0 0 3px var(--tanwei-color-focus-ring);
  border-radius: var(--tanwei-radius-sm);
}

.tw-tabs[data-variant="underline"] .tw-tab-list {
  gap: var(--tanwei-space-1);
  border: 0;
  border-bottom: 1px solid var(--tanwei-color-border);
  background-color: #0000;
  border-radius: 0;
  width: auto;
  padding: 0;
}

.tw-tabs[data-variant="underline"] .tw-tab {
  padding: var(--tanwei-space-1) var(--tanwei-space-3);
  border-radius: var(--tanwei-shape-control);
  margin-bottom: 4px;
  position: relative;
}

.tw-tabs[data-variant="underline"] .tw-tab:hover:not([data-disabled]):not([aria-disabled="true"]), .tw-tabs[data-variant="underline"] .tw-tab[data-hovered]:not([data-disabled]):not([aria-disabled="true"]) {
  background-color: var(--tanwei-color-surface-hover);
}

.tw-tabs[data-variant="underline"] .tw-tab[aria-selected="true"], .tw-tabs[data-variant="underline"] .tw-tab[data-selected] {
  box-shadow: none;
  color: var(--tanwei-color-text);
  background-color: #0000;
}

:is(.tw-tabs[data-variant="underline"] .tw-tab[aria-selected="true"], .tw-tabs[data-variant="underline"] .tw-tab[data-selected]):after {
  content: "";
  left: var(--tanwei-space-2);
  right: var(--tanwei-space-2);
  background-color: var(--tanwei-color-accent);
  border-radius: 1px;
  height: 2px;
  position: absolute;
  bottom: -5px;
}

.tw-toast-region {
  right: var(--tanwei-space-5);
  bottom: var(--tanwei-space-5);
  z-index: var(--tanwei-z-toast);
  gap: var(--tanwei-space-2-5);
  width: min(380px, calc(100vw - 2 * var(--tanwei-space-4)));
  pointer-events: none;
  display: grid;
  position: fixed;
}

.tw-toast-region[data-placement="top-right"] {
  top: var(--tanwei-space-5);
  bottom: auto;
}

.tw-toast-region[data-placement="top-center"] {
  top: var(--tanwei-space-5);
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.tw-toast-region[data-placement="bottom-center"] {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.tw-toast {
  --_toast-stripe: var(--tanwei-color-border-strong);
  align-items: start;
  gap: var(--tanwei-space-3);
  padding: var(--tanwei-space-3) var(--tanwei-space-4);
  border: 1px solid var(--tanwei-color-border-overlay);
  border-radius: var(--tanwei-shape-popover);
  background-color: var(--tanwei-color-surface-raised);
  color: var(--tanwei-color-text);
  box-shadow: var(--tanwei-shadow-popover);
  pointer-events: auto;
  animation: tw-toast-in var(--tanwei-motion-duration-fast) var(--tanwei-motion-easing-snappy);
  grid-template-columns: minmax(0, 1fr) auto;
  padding-inline-start: calc(var(--tanwei-space-4) + 3px);
  display: grid;
  position: relative;
  overflow: hidden;
}

.tw-toast:before {
  content: "";
  background-color: var(--_toast-stripe);
  width: 3px;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
}

.tw-toast[data-tone="accent"] {
  --_toast-stripe: var(--tanwei-color-accent);
}

.tw-toast[data-tone="aurum"] {
  --_toast-stripe: var(--tanwei-color-aurum);
}

.tw-toast[data-tone="success"] {
  --_toast-stripe: var(--tanwei-color-success);
}

.tw-toast[data-tone="warning"] {
  --_toast-stripe: var(--tanwei-color-warning);
}

.tw-toast[data-tone="danger"] {
  --_toast-stripe: var(--tanwei-color-danger);
}

.tw-toast-body {
  gap: 2px;
  min-width: 0;
  display: grid;
}

.tw-toast-title {
  font-size: var(--tanwei-control-font-size);
  font-weight: var(--tanwei-font-weight-semibold);
  line-height: var(--tanwei-font-line-height-snug);
  margin: 0;
}

.tw-toast-desc {
  font-size: var(--tanwei-font-size-xs);
  color: var(--tanwei-color-text-muted);
  margin: 0;
  line-height: 1.5;
}

.tw-toast-actions {
  align-items: center;
  gap: var(--tanwei-space-1);
  display: flex;
}

@keyframes tw-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-toast {
    animation: none;
  }
}

.tw-tooltip {
  --_tip-y: 3px;
  z-index: var(--tanwei-z-popover);
  border: 1px solid var(--tanwei-color-border-overlay);
  border-radius: var(--tanwei-radius-sm);
  background-color: var(--tanwei-color-surface-raised);
  max-width: 260px;
  color: var(--tanwei-color-text);
  font-size: var(--tanwei-font-size-xs);
  font-weight: var(--tanwei-font-weight-medium);
  box-shadow: var(--tanwei-shadow-popover);
  pointer-events: none;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  line-height: 1.35;
  display: inline-flex;
}

.tw-tooltip[data-placement="bottom"] {
  --_tip-y: -3px;
}

.tw-tooltip[data-entering] {
  animation: tw-tip-in var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-snappy);
}

.tw-tooltip[data-exiting] {
  animation: tw-tip-in var(--tanwei-motion-duration-micro) var(--tanwei-motion-easing-exit) reverse;
}

@keyframes tw-tip-in {
  from {
    opacity: 0;
    transform: translateY(var(--_tip-y)) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-tooltip {
    animation: none !important;
  }
}
