/* Apple HIG pass (apple-design skill): contrast, minimum sizes, keyboard focus, system accessibility settings.
   Loaded last. Brand crimson stays; only values that failed a measured check were changed. */

/* accessibility.md > Color and effects: text up to 17 pt needs 4.5:1 (measured with real computed colours) */
:root{--muted:#5f6674}                                   /* 4.37 -> 5.21:1 on the cream page, 4.85:1 on the sidebar */
:root:not([data-theme="dark"]) .eyebrow,
:root:not([data-theme="dark"]) .llm-eyebrow,
:root:not([data-theme="dark"]) .hm-best b{color:#d4004a}  /* crimson as small text: 4.3 -> 4.86:1 */
:root:not([data-theme="dark"]) .delta-badge.up,
:root:not([data-theme="dark"]) .delta-badge.positive,
:root:not([data-theme="dark"]) .pr-bkd.up,
:root:not([data-theme="dark"]) .llm-chip.up{color:#0a7a55}  /* green on white: 3.46 -> 5.35:1 */
:root:not([data-theme="dark"]) .pr-bkd.down,
:root:not([data-theme="dark"]) .llm-chip.down{color:#c0243a}
[data-theme="dark"] .pr-bkd.down{color:#ff7a8f}            /* 3.66 -> 6.97:1 */
[data-theme="dark"] .hm-best b,[data-theme="dark"] .hm-best{color:#ff5c8d}   /* 4.29 -> 5.53:1 */
[data-theme="dark"] .cs-chip.on{background:#c40043;border-color:#c40043}      /* white on #ff5c8d was 2.93 -> 6.13:1 */

/* typography.md > Size: desktop minimum 10 pt, default 13 pt; nothing user-facing below 11 px */
.sb-label,.nav-caret,.card-inspect-hint,.sub-prev-count,.analytics-split-layout .table-card table.report-table th{font-size:11px!important}
.metric-label,.prev-text,.llm-card-name{font-size:12px}
.metric-value,.llm-card-val,.pr-bkv,.pr-fns>b,.city-total strong,.bl-sv b,.pc-stats strong{font-variant-numeric:tabular-nums}   /* numbers align when they change */

/* buttons.md / accessibility.md: desktop controls default 28 x 28 pt minimum 20, keep hit areas comfortable */
.metric-tab{min-height:30px;padding-top:4px;padding-bottom:4px}

/* accessibility.md > Keyboard: everything interactive shows where focus is */
:where(button,a,select,input,textarea,[role="button"],[tabindex]):focus-visible{outline:2px solid var(--brand,#e4004f)!important;outline-offset:2px;border-radius:inherit}
[data-theme="dark"] :where(button,a,select,input,textarea,[role="button"],[tabindex]):focus-visible{outline-color:#ff5c8d!important}

/* motion.md: avoid adding motion to interactions people repeat, keep feedback brief */
.insight-card:hover,.city-card:hover,.post-card:hover,.pr-fns:hover,.pr-bkc:hover{transform:translateY(-2px)}
.nav-item:hover{transform:none}

/* accessibility settings the page ignored before */
@media (prefers-contrast:more){
  :root{--muted:#3f4654;--line:rgba(20,22,31,.38)}
  [data-theme="dark"]{--muted:#c9cee0;--line:rgba(255,255,255,.34)}
  .chart-container-card,.insight-card,.city-card,.post-card,.metric-card,.llm-card{border-width:1.5px}
}
@media (prefers-reduced-transparency:reduce){
  *{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
  .app-topbar,.topbar,header.report-header,.sidebar{background:var(--surface,#fff)!important}
}

/* remaining sub-11 px labels (found by a measured sweep of the live page) */
.bl-m span,.day-center span,.fun-chip span,.pc-stats span,.hm-hour,.pr-ddt small,.fun-chip{font-size:11px}
:root:not([data-theme="dark"]){--good:#0a7a55;--bad:#c0243a}   /* "good/bad" text on light surfaces: 3.46 -> 5.35:1, 4.0 -> 5.9:1 */
