/*
 * bestWA macOS HIG visual layer (2026-10-30)
 * Intentionally mimics system *hierarchy*, not native NSVisualEffectView.
 * Glass is limited to navigation, toolbars and transient overlays.
 * Heavy lists, tables, heatmaps and content cards remain opaque/lightweight.
 */
:root{
  --mac-radius-window:18px;
  --mac-radius-panel:14px;
  --mac-radius-menu:12px;
  --mac-radius-control:10px;
  --mac-glass-sidebar:rgba(251,250,253,.79);
  --mac-glass-toolbar:rgba(250,249,252,.79);
  --mac-glass-popover:rgba(255,255,255,.94);
  --mac-highlight:rgba(255,255,255,.48);
  --mac-shell-rim:rgba(255,255,255,.55);
  --mac-shell-depth:rgba(31,30,55,.025);
  --mac-hairline:rgba(62,51,76,.10);
  --mac-float-shadow:0 22px 64px rgba(25,24,43,.17),0 8px 20px rgba(25,24,43,.07),0 1px 2px rgba(25,24,43,.04);
  --mac-panel-shadow:0 5px 21px rgba(31,30,55,.045),0 1px 2px rgba(31,30,55,.035);
  --mac-spring:cubic-bezier(.22,1,.36,1);
}
:root[data-theme="dark"]{
  --mac-glass-sidebar:rgba(26,26,34,.84);
  --mac-glass-toolbar:rgba(29,28,37,.83);
  --mac-glass-popover:rgba(38,37,48,.94);
  --mac-highlight:rgba(255,255,255,.075);
  --mac-shell-rim:rgba(255,255,255,.065);
  --mac-shell-depth:rgba(0,0,0,.14);
  --mac-hairline:rgba(245,237,255,.115);
  --mac-float-shadow:0 24px 70px rgba(0,0,0,.42),0 8px 24px rgba(0,0,0,.24),0 1px 2px rgba(0,0,0,.20);
  --mac-panel-shadow:0 5px 22px rgba(0,0,0,.16),0 1px 3px rgba(0,0,0,.12);
}
/* The content layer is deliberately stable: no backdrop-filter on .panel or rows. */
.panel{
  border-radius:var(--mac-radius-panel);
  box-shadow:var(--mac-panel-shadow),inset 0 1px 0 var(--mac-highlight);
}
.hero{border-radius:var(--mac-radius-window)}
/* Sidebar and toolbar are the only persistent vibrancy surfaces. */
/* Elysia-inspired material: a translucent tint and a subpixel rim, with
 * text and navigation controls staying on their existing crisp layer. */
.sidebar{
  background:linear-gradient(180deg,rgba(255,255,255,.055),transparent 42%),var(--mac-glass-sidebar);
  border-right:1px solid var(--mac-hairline);
  box-shadow:inset -1px 0 0 var(--mac-shell-rim);
  -webkit-backdrop-filter:blur(18px) saturate(112%);
  backdrop-filter:blur(18px) saturate(112%);
}
.topbar{
  background:linear-gradient(180deg,rgba(255,255,255,.045),transparent 65%),var(--mac-glass-toolbar);
  border-bottom:1px solid var(--mac-hairline);
  box-shadow:0 1px 0 var(--mac-shell-rim),0 5px 14px var(--mac-shell-depth);
  -webkit-backdrop-filter:blur(20px) saturate(112%);
  backdrop-filter:blur(20px) saturate(112%);
}
/* Composited pointer feedback; selected page stays in place and legible. */
.sidebar .nav-link{
  border-radius:var(--mac-radius-menu);
  transition:background-color 180ms var(--mac-spring),color 180ms ease,box-shadow 180ms ease,transform 180ms var(--mac-spring);
}
@media(hover:hover) and (pointer:fine){
  .sidebar .nav-link:hover:not(.selected){
    transform:none;
    background:color-mix(in srgb,var(--accent) 5%,var(--nav-bg));
  }
  .sidebar .nav-link.selected:hover{background:color-mix(in srgb,var(--accent) 9%,var(--nav-bg))}
}
.sidebar .nav-link.selected{
  /* A steady selection surface; retain the existing selected-label color. */
  background:color-mix(in srgb,var(--accent) 7%,var(--nav-bg));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 8%,var(--mac-hairline));
}
.sidebar .nav-link:active:not([aria-disabled="true"]){transform:scale(.985)}
.sidebar .nav-link:focus-visible{outline-offset:-2px}
/* State changes never change the geometry of other navigation controls. */
:where(.topbar .icon-button,.btn,.small-action){
  border-radius:var(--mac-radius-control);
  transition:background-color 170ms ease,color 170ms ease,border-color 170ms ease,
             box-shadow 180ms ease,transform 180ms var(--mac-spring);
}
@media(hover:hover) and (pointer:fine){
  .topbar .icon-button:hover:not(:disabled){
    background:color-mix(in srgb,var(--accent) 4%,var(--surface-solid));
    box-shadow:inset 0 0 0 1px var(--mac-hairline),inset 0 1px 0 var(--mac-highlight);
    transform:none;
  }
  .btn:hover:not(:disabled),.small-action:hover:not(:disabled){transform:translateY(-1px)}
  .btn.primary:hover:not(:disabled){box-shadow:0 9px 21px color-mix(in srgb,var(--accent) 24%,transparent)}
}
:where(.topbar .icon-button,.btn,.small-action):active:not(:disabled){transform:scale(.97)}
/* Preserve the existing segmented indicator JS; only refine its surface. */
:is(.pill-filters,.group-view-switch)[data-motion-segment]{
  border-color:var(--mac-hairline);
  box-shadow:inset 0 1px 0 var(--mac-highlight),0 2px 8px rgba(28,22,40,.035);
}
.selection-indicator{border-radius:var(--mac-radius-control)}
/* Keep the header workspace switcher readable over translucent material:
 * only its local chrome is softened, not its label or select behavior. */
.topbar .workspace-picker{
  background:color-mix(in srgb,var(--surface-solid) 92%,transparent);
  border-color:var(--mac-hairline);
  box-shadow:inset 0 1px 0 var(--mac-highlight);
}
@media(hover:hover) and (pointer:fine){
  .topbar .workspace-picker:hover{
    border-color:color-mix(in srgb,var(--accent) 20%,var(--mac-hairline));
  }
}
/* Inputs stay solid and readable rather than blurring long data-entry forms. */
:where(.search-field,.field input,.field textarea,.field select,.compact-filter select,.setting-line>select){
  border-radius:var(--mac-radius-control);
  transition:border-color 180ms ease,box-shadow 180ms ease,background-color 180ms ease;
}
:where(.search-field,.field input,.field textarea,.field select,.compact-filter select,.setting-line>select):focus-visible,
.search-field:focus-within{
  outline-offset:2px;
  box-shadow:0 0 0 3px var(--accent-glow),0 2px 8px rgba(29,25,42,.035);
}
/* Transient overlays get the richer multi-layer material and soft depth. */
:is(.modal,.workspace-confirm-dialog){
  border-radius:var(--mac-radius-window);
  border:1px solid var(--mac-hairline);
  background:var(--mac-glass-popover);
  box-shadow:var(--mac-float-shadow),inset 0 1px 0 var(--mac-highlight);
  -webkit-backdrop-filter:blur(18px) saturate(125%);
  backdrop-filter:blur(18px) saturate(125%);
}
.modal-top,.modal-actions{
  background:var(--mac-glass-popover);
  border-color:var(--mac-hairline);
}
.attention-popover{
  border-radius:var(--mac-radius-menu);
  background:var(--mac-glass-popover);
  border:1px solid var(--mac-hairline);
  box-shadow:var(--mac-float-shadow),inset 0 1px 0 var(--mac-highlight);
  -webkit-backdrop-filter:blur(16px) saturate(125%);
  backdrop-filter:blur(16px) saturate(125%);
}
#toast-root>.toast{
  border-radius:var(--mac-radius-menu);
  box-shadow:0 14px 36px rgba(31,24,43,.19),0 3px 10px rgba(31,24,43,.07),inset 0 1px 0 rgba(255,255,255,.14);
}
/* Keep native focus indicators clear on keyboard-only navigation. */
:where(.sidebar .nav-link,.topbar .icon-button,.btn,.small-action,.attention-item):focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
@media(max-width:830px){
  .sidebar{-webkit-backdrop-filter:blur(14px) saturate(110%);backdrop-filter:blur(14px) saturate(110%)}
}
@media(max-width:640px){
  .topbar{-webkit-backdrop-filter:blur(14px) saturate(110%);backdrop-filter:blur(14px) saturate(110%)}
  /* Modal + backdrop should not impose two large blurs on mobile GPUs. */
  .modal{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--surface-solid)}
}
/* Respect transparency, motion and contrast accommodations. */
@media(prefers-reduced-transparency:reduce){
  .sidebar{background:var(--nav-bg)!important}
  .topbar,.modal,.workspace-confirm-dialog,.attention-popover{background:var(--surface-solid)!important}
  :is(.sidebar,.topbar,.modal,.workspace-confirm-dialog,.attention-popover){
    -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
  }
}
@media(prefers-reduced-motion:reduce){
  .sidebar .nav-link,.topbar .icon-button,.btn,.small-action{
    transition:none!important;animation:none!important;transform:none!important;
  }
}
@media(forced-colors:active){
  :where(.sidebar,.topbar,.panel,.modal,.workspace-confirm-dialog,.attention-popover){border:1px solid CanvasText}
  .sidebar .nav-link.selected{outline:1px solid Highlight}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .sidebar{background:var(--nav-bg)}
  .topbar,.modal,.workspace-confirm-dialog,.attention-popover{background:var(--surface-solid)}
}


/*
 * macOS typography + spacing hierarchy.
 * Apple HIG: Large Title 26/32, Title 1 22/26, Title 2 17/22,
 * Title 3 15/20, Body 13/16, Callout 12/15, Subheadline 11/14,
 * Footnote/Caption 10/13 (pt in native AppKit; CSS px approximations).
 * Long Chinese paragraphs explicitly use taller leading for readability.
 * Spacing is a local 4px-based rhythm, not an Apple-mandated pixel grid.
 * Keep the three actual bundled PingFang weights: 400 / 500 / 600.
 */
:root{
  --mac-type-large:26px;
  --mac-type-title:22px;
  --mac-type-section:17px;
  --mac-type-heading:15px;
  --mac-type-body:13px;
  --mac-type-callout:12px;
  --mac-type-subhead:11px;
  --mac-type-footnote:10px;
  --mac-leading-large:32px;
  --mac-leading-title:26px;
  --mac-leading-section:22px;
  --mac-leading-heading:20px;
  --mac-leading-body:16px;
  --mac-leading-callout:15px;
  --mac-leading-subhead:14px;
  --mac-leading-footnote:13px;
  --mac-weight-regular:400;
  --mac-weight-medium:500;
  --mac-weight-semibold:600;
  --mac-space-1:4px;
  --mac-space-2:8px;
  --mac-space-3:12px;
  --mac-space-4:16px;
  --mac-space-5:20px;
  --mac-space-6:24px;
  --mac-space-8:32px;
  font-size:var(--mac-type-body);
}
body{
  font-size:var(--mac-type-body);
  font-weight:var(--mac-weight-regular);
  line-height:var(--mac-leading-body);
  letter-spacing:normal;
}
button,input,select,textarea{font-family:inherit}
button,select{font-weight:var(--mac-weight-medium)}

/* Workspace title and navigation: consistent with native sidebar reading order. */
.brand strong{
  font-size:var(--mac-type-title);
  line-height:var(--mac-leading-title);
  font-weight:var(--mac-weight-semibold);
  letter-spacing:-.4px;
}
.brand small{
  font-size:var(--mac-type-footnote);
  line-height:var(--mac-leading-footnote);
  font-weight:var(--mac-weight-medium);
  letter-spacing:.7px;
  margin-top:var(--mac-space-1);
}
.nav-label{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
  font-weight:var(--mac-weight-medium);
  letter-spacing:.4px;
  padding-inline:16px;
  margin-bottom:var(--mac-space-2);
}
.sidebar .brand{padding-bottom:var(--mac-space-6)}
.sidebar nav{gap:var(--mac-space-1)}
.sidebar .nav-link{
  min-height:44px;
  height:auto;
  padding:var(--mac-space-2) var(--mac-space-3);
  gap:var(--mac-space-3);
  font-size:var(--mac-type-body);
  line-height:var(--mac-leading-body);
  font-weight:var(--mac-weight-medium);
  letter-spacing:0;
}
.sidebar .nav-link.selected{font-weight:var(--mac-weight-semibold)}
.sidebar .nav-link i{
  font-size:var(--mac-type-footnote);
  line-height:var(--mac-leading-footnote);
  font-weight:var(--mac-weight-semibold);
}
.side-profile{gap:var(--mac-space-3);padding-top:var(--mac-space-3)}
.side-profile b{
  font-size:var(--mac-type-callout);
  line-height:var(--mac-leading-callout);
  font-weight:var(--mac-weight-semibold);
}
.side-profile small{
  font-size:var(--mac-type-footnote);
  line-height:var(--mac-leading-footnote);
  font-weight:var(--mac-weight-regular);
}
.topbar .crumb{gap:var(--mac-space-2);font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout)}
.topbar .crumb strong{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-semibold)}
.topbar .top-actions{gap:var(--mac-space-2)}
.topbar .workspace-picker-caption{font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote);font-weight:var(--mac-weight-regular)}
.topbar #workspace-picker-name{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-semibold)}
.topbar .mode-indicator{font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote);font-weight:var(--mac-weight-medium);letter-spacing:0}

/* Page title -> section heading -> card heading -> body -> caption -> footnote. */
.page{padding-top:var(--mac-space-8);padding-bottom:var(--mac-space-8)}
.page-head{margin-bottom:var(--mac-space-6)}
.heading-line{gap:var(--mac-space-4);margin-top:var(--mac-space-2)}
.heading-line h1{
  font-size:var(--mac-type-large);
  line-height:var(--mac-leading-large);
  font-weight:var(--mac-weight-semibold);
  letter-spacing:-.55px;
}
.heading-line p{
  margin-top:var(--mac-space-2);
  font-size:var(--mac-type-body);
  line-height:20px;
  font-weight:var(--mac-weight-regular);
}
.eyebrow,.section-kicker{
  font-size:var(--mac-type-footnote);
  line-height:var(--mac-leading-footnote);
  font-weight:var(--mac-weight-medium);
  letter-spacing:.8px;
}
.hero h2{font-size:var(--mac-type-large);line-height:var(--mac-leading-large);font-weight:var(--mac-weight-semibold);letter-spacing:-.55px}
.hero p{font-size:var(--mac-type-body);line-height:20px;font-weight:var(--mac-weight-regular)}
.hero-kicker{font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote);font-weight:var(--mac-weight-semibold);letter-spacing:.8px}
.section-head{margin-bottom:var(--mac-space-4)}
.section-head h3{font-size:var(--mac-type-section);line-height:var(--mac-leading-section);font-weight:var(--mac-weight-semibold);letter-spacing:-.2px}
.section-head p{font-size:var(--mac-type-callout);line-height:18px;font-weight:var(--mac-weight-regular);margin-top:var(--mac-space-1)}
.list-summary,.library-copy h3,.group-explanation b{
  font-size:var(--mac-type-heading);
  line-height:var(--mac-leading-heading);
  font-weight:var(--mac-weight-semibold);
  letter-spacing:-.1px;
}
.metric-label,.library-stat small,.activity-stats small,.ch-stats small{
  font-size:var(--mac-type-callout);
  line-height:var(--mac-leading-callout);
  font-weight:var(--mac-weight-medium);
}
.metric-value{font-size:var(--mac-type-large);line-height:var(--mac-leading-large);font-weight:var(--mac-weight-semibold);letter-spacing:-.5px}
.metric-foot,.library-stat span{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
  font-weight:var(--mac-weight-regular);
}
.library-stat strong{font-size:var(--mac-type-title);line-height:var(--mac-leading-title);font-weight:var(--mac-weight-semibold)}
.synced,.footer{font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote);font-weight:var(--mac-weight-regular)}
.footer{margin-top:var(--mac-space-6)}

/* Lists and segmented controls: body-sized data; smaller metadata, not smaller primary data. */
.list-tools{gap:var(--mac-space-3);margin-bottom:var(--mac-space-4)}
.filter-bar{gap:var(--mac-space-3);margin-bottom:var(--mac-space-4)}
.filter-selects{gap:var(--mac-space-2)}
.pill-filters{gap:var(--mac-space-1)}
.filter-pill,.compact-filter,.compact-filter select,.setting-line>select,
.search-field input,.pagination,.source-tag,.route-chip{
  font-size:var(--mac-type-callout);
  line-height:var(--mac-leading-callout);
  font-weight:var(--mac-weight-medium);
}
:is(.account-table [data-motion-segment="account-role"],.task-table [data-motion-segment="task-status"],.group-view-controls [data-motion-segment="group-role"])>.filter-pill{
  font-size:var(--mac-type-callout);
  line-height:var(--mac-leading-callout);
  font-weight:var(--mac-weight-medium);
}
.filter-pill.on{font-weight:var(--mac-weight-semibold)}
.search-field{min-height:38px}
.filter-hint,.compact-filter>span{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead);font-weight:var(--mac-weight-regular)}
thead th{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead);font-weight:var(--mac-weight-semibold);letter-spacing:0}
tbody td{font-size:var(--mac-type-body);line-height:var(--mac-leading-body);font-weight:var(--mac-weight-regular)}
.identity b,.pair-names b,.task-table .task-name b,
.account-workspace .allowlist-number-cell b{
  font-size:var(--mac-type-body);
  line-height:var(--mac-leading-body);
  font-weight:var(--mac-weight-semibold);
}
.identity small,.pair-names small,.table-card td>small.subtext,.table-card td .subtext,
.account-workspace .allowlist-number-cell .subtext{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
  font-weight:var(--mac-weight-regular);
}
.phone-number,.conversation-count{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-medium)}
time,.table-card td[data-label]::before{font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote)}
.table-card{padding:var(--mac-space-5)}
.table-card:not(.account-table) td{padding:var(--mac-space-3) var(--mac-space-3)}
/* Preserve compact account density and selection / pagination logic. */
.account-workspace .account-table td{padding-inline:var(--mac-space-3)}
.pagination{gap:var(--mac-space-3);margin-top:var(--mac-space-4);padding-top:var(--mac-space-4)}
.pagination>div{gap:var(--mac-space-2)}
.btn,.small-action{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-medium)}
.btn.primary,.filter-pill.on{font-weight:var(--mac-weight-semibold)}
.badge,.count-bubble,.management-tag,.field-help,.form-note,.review-description{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
  font-weight:var(--mac-weight-regular);
}
.badge{font-weight:var(--mac-weight-medium)}
.connection-notice b{font-size:var(--mac-type-body);line-height:var(--mac-leading-body);font-weight:var(--mac-weight-semibold)}
.connection-notice small{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead)}

/* Account management / disclosure panels; child labels stay below section titles. */
.approval-panel summary{padding:var(--mac-space-4) var(--mac-space-5);gap:var(--mac-space-3)}
.approval-panel summary b,.account-workspace .auto-onboard-panel summary b,
.account-workspace .allowlist-panel summary b{
  font-size:var(--mac-type-body);
  line-height:var(--mac-leading-body);
  font-weight:var(--mac-weight-semibold);
}
.approval-body{padding:var(--mac-space-4) var(--mac-space-5)}
.approval-body>p,.approval-row small,
.account-workspace .auto-onboard-body>p,
.account-workspace .auto-onboard-options .auto-onboard-option-title small{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
  font-weight:var(--mac-weight-regular);
}
.approval-row{gap:var(--mac-space-3);padding-block:var(--mac-space-3)}
.approval-row b,.account-workspace .auto-onboard-options .auto-onboard-option-title strong,
.account-workspace .allowlist-edit-field,.account-workspace .allowlist-edit-row .allowlist-enable{
  font-size:var(--mac-type-callout);
  line-height:var(--mac-leading-callout);
  font-weight:var(--mac-weight-medium);
}
.account-workspace .auto-onboard-options .auto-onboard-option-title strong{font-weight:var(--mac-weight-semibold)}
.account-workspace .allowlist-stats strong{font-size:var(--mac-type-section);line-height:var(--mac-leading-section);font-weight:var(--mac-weight-semibold)}

/* Group cards and task status — secondary details never outweigh titles. */
.group-grid{gap:var(--mac-space-4)}
.group-grid:not(.group-grid--compact) .group-card{padding:var(--mac-space-5)}
.group-card h3{font-size:var(--mac-type-heading);line-height:var(--mac-leading-heading);font-weight:var(--mac-weight-semibold)}
.group-total{font-size:var(--mac-type-title);line-height:var(--mac-leading-title);font-weight:var(--mac-weight-semibold)}
.group-total span,.group-availability,.group-members summary,.group-members>div>span{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
  font-weight:var(--mac-weight-regular);
}
.group-explanation{gap:var(--mac-space-4);padding:var(--mac-space-5)}
.group-explanation p{font-size:var(--mac-type-callout);line-height:18px}
.group-view-controls{gap:var(--mac-space-3)}
.group-grid--compact .group-card h3{font-size:var(--mac-type-body);line-height:var(--mac-leading-body);font-weight:var(--mac-weight-semibold)}
.group-grid--compact .group-total{font-size:var(--mac-type-section);line-height:var(--mac-leading-section)}
.group-grid--compact .group-total span{font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote)}
.task-eta-caption,.task-timing-detail small{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead);font-weight:var(--mac-weight-regular)}
.task-timing-detail strong{font-size:var(--mac-type-body);line-height:var(--mac-leading-body);font-weight:var(--mac-weight-semibold)}
.task-timing-detail>p{font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote)}

/* AI content, settings and forms: readable body and restrained headings. */
.library-metrics,.metric-grid{gap:var(--mac-space-4)}
.library-header,.settings-card,.featured,.current-plans{padding:var(--mac-space-5)}
.library-copy p,.setting-line p,.setting-caption,.settings-section-description,
.workspace-subhead p,.workspace-danger-head p{
  font-size:var(--mac-type-callout);
  line-height:18px;
  font-weight:var(--mac-weight-regular);
}
.setting-line b,.workspace-subhead b,.workspace-danger-head b,
.settings-current-value strong,.settings-overview-card .settings-current-copy strong{
  font-size:var(--mac-type-body);
  line-height:var(--mac-leading-body);
  font-weight:var(--mac-weight-semibold);
}
.settings-current-value small,.settings-overview-card .settings-current-copy small,
.workspace-member-info small{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
  font-weight:var(--mac-weight-regular);
}
.workspace-member-info b{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-semibold)}
.modal-top{padding:var(--mac-space-5) var(--mac-space-6) var(--mac-space-4)}
.modal-top h2{font-size:var(--mac-type-title);line-height:var(--mac-leading-title);font-weight:var(--mac-weight-semibold);letter-spacing:-.35px}
.dialog-subtitle{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead)}
.modal-body{padding:var(--mac-space-6)}
.modal form{gap:var(--mac-space-4)}
.modal-actions{padding:var(--mac-space-4) var(--mac-space-6);gap:var(--mac-space-2)}
.modal-actions .btn{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-medium)}
.field{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-medium);gap:var(--mac-space-2)}
.schedule-modal #task-form .field-label{
  font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);
  font-weight:var(--mac-weight-semibold);
}
.schedule-modal #task-form .task-stage-label{font-size:var(--mac-type-heading);line-height:var(--mac-leading-heading);font-weight:var(--mac-weight-semibold)}
.schedule-section h3{font-size:var(--mac-type-heading);line-height:var(--mac-leading-heading);font-weight:var(--mac-weight-semibold)}
.schedule-section p{font-size:var(--mac-type-callout);line-height:18px}
.field input,.field select,.field textarea,.ai-suggestion-main textarea{
  font-size:var(--mac-type-body);
  line-height:var(--mac-leading-body);
  font-weight:var(--mac-weight-regular);
}
.form-grid,.schedule-grid,.ai-controls{gap:var(--mac-space-4)}
.ai-suggestion-meta small{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead)}
.ai-inline-status b{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-semibold)}
.ai-inline-status small{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead)}

/* Live dashboard and health monitors: apply the same hierarchy to embedded modules. */
.activity-heading h3,.ch-head h3{font-size:var(--mac-type-section);line-height:var(--mac-leading-section);font-weight:var(--mac-weight-semibold)}
.activity-heading p,.ch-head p{font-size:var(--mac-type-callout);line-height:18px;font-weight:var(--mac-weight-regular)}
.activity-stats strong,.ch-stats strong{font-size:var(--mac-type-section);line-height:var(--mac-leading-section);font-weight:var(--mac-weight-semibold)}
.activity-row-copy b,.ch-account-name b,.ch-group-name,.ch-panel-label b{
  font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-semibold);
}
.activity-row-copy small,.activity-row time,.activity-footer,.ch-account-name small,.ch-panel-label small,
.ch-group-row>small,.ch-top-actions small{
  font-size:var(--mac-type-footnote);line-height:var(--mac-leading-footnote);font-weight:var(--mac-weight-regular);
}
.ch-select,.ch-filter-row .ch-search input,.activity-controls select{
  font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-medium);
}
.ch-legend span,.ch-list-summary,.ch-empty,.activity-empty{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead)}
.attention-heading b{font-size:var(--mac-type-body);line-height:var(--mac-leading-body);font-weight:var(--mac-weight-semibold)}
.attention-item b{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout);font-weight:var(--mac-weight-semibold)}
.attention-item small,.attention-empty{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead)}
.toast-copy>b{font-size:var(--mac-type-subhead);line-height:var(--mac-leading-subhead);font-weight:var(--mac-weight-semibold)}
.toast-copy>span{font-size:var(--mac-type-callout);line-height:var(--mac-leading-callout)}

/* Responsive: short lines and input zoom avoidance take precedence over density. */
@media(max-width:830px){
  .page{padding-top:var(--mac-space-6);padding-bottom:var(--mac-space-6)}
  .sidebar .brand{padding-bottom:var(--mac-space-5)}
  .table-card{padding:var(--mac-space-4)}
  .settings-card,.featured,.current-plans{padding:var(--mac-space-4)}
}
@media(max-width:640px){
  .page-head{margin-bottom:var(--mac-space-5)}
  .heading-line h1{font-size:var(--mac-type-title);line-height:var(--mac-leading-title)}
  .heading-line p{font-size:var(--mac-type-callout);line-height:18px}
  .hero h2{font-size:var(--mac-type-title);line-height:var(--mac-leading-title)}
  .metric-grid,.library-metrics{gap:var(--mac-space-2)}
  .table-card{padding:var(--mac-space-4)}
  .table-card:not(.account-table) td{padding:var(--mac-space-3) 0}
  .modal-top{padding:var(--mac-space-4)}
  .modal-body{padding:var(--mac-space-4)}
  .modal-actions{padding:var(--mac-space-3) var(--mac-space-4)}
  /* 16 CSS pixels prevents automatic input zoom on iOS Safari. */
  .field input,.field select,.field textarea,.ai-suggestion-main textarea,
  .search-field input,.ch-filter-row .ch-search input{font-size:16px;line-height:22px}
  .sidebar .nav-link{min-height:44px}
}
@media(hover:none) and (pointer:coarse){
  .btn,.small-action,.filter-pill{min-height:40px}
}


/* Final small-type audit: no meaningful visible label below the macOS 10pt reference. */
.route-token small,.route-sep,.rule-grid p,.hero-core-label,
.integration-details .integration-cli-title small,.ch-account-score small{
  font-size:var(--mac-type-footnote);
  line-height:var(--mac-leading-footnote);
  font-weight:var(--mac-weight-regular);
}
.attention-count{
  font-size:var(--mac-type-footnote);
  line-height:18px;
  min-width:18px;
  height:18px;
  font-weight:var(--mac-weight-semibold);
}
.head-actions .btn,.hero-actions .btn,.library-actions .btn,
.account-workspace .account-bulk-buttons>.btn,
.ai-suggestion-meta .small-action,.account-verification .small-action{
  font-size:var(--mac-type-callout);
  line-height:var(--mac-leading-callout);
  font-weight:var(--mac-weight-medium);
}
.group-section .section-head p{
  font-size:var(--mac-type-callout);
  line-height:18px;
  font-weight:var(--mac-weight-regular);
}
.task-table .task-eta-caption,
.schedule-modal .daily-range-note .field-help,
.account-workspace .allowlist-edit-row .inline-error{
  font-size:var(--mac-type-subhead);
  line-height:var(--mac-leading-subhead);
}
@media(max-width:640px){
  /* Match desktop hierarchy while allowing natural multi-line reflow. */
  .list-summary{white-space:normal}
  .heading-line{gap:var(--mac-space-3)}
  .head-actions .btn,.hero-actions .btn,.library-actions .btn{font-size:var(--mac-type-callout)}
}
