/*! Drewcotech Yummy Design 1.1 — Material 3 Expressive, the Drewcotech way. (It's eye candy, and candy is yummy.)
 *  Master copy: C:\Srvr\Projects\YummyDesign\yummy.css (repo drewcotech/yummydesign). Products keep a copy; re-copy to update.
 *  - Color: M3 roles built around Drewcotech blue (#0077b6; #3aa6e0 on dark, per LOGO-GUIDE.md) + a warm amber tertiary.
 *  - Type: Inter → Segoe UI for text. Product names in the top bar: Jost (Futura-style, SIL OFL), REGULAR weight only,
 *    subset per product with bin/wordmark.ps1 and embedded as a data: font ("Yummy Wordmark"). No web-font CDNs.
 *  - Shape: big and round; pills squash to rounded squares when pressed.
 *  - Motion: springy; off for prefers-reduced-motion. Page changes glide (View Transitions): the bar holds still and the
 *    current nav/rail/tab pill slides to its new place. Products add Speculation Rules prefetch (README) for instant clicks.
 *  - No coloured pill/badge next to a product name or logo. Product names are plain text.
 *  Components (see demo/index.html): .yd-bar .yd-brand .yd-nav · .yd-main .yd-shell .yd-rail · .card .hero ·
 *  .btn (-small -big -ghost -outline -text -danger) · fields .field .form-grid · .chip(s) · .pill (-ok -warn -bad -info) ·
 *  .table · .tabs .tab · .flash (-ok -error) · .note .warn · .stats .stat · .list · .empty · dialog.yd-dialog · .yd-foot */

:root {
  color-scheme: light dark;
  --md-primary: #0077b6; --md-on-primary: #ffffff;
  --md-primary-container: #cfe5ff; --md-on-primary-container: #001d33;
  --md-secondary: #51606f; --md-on-secondary: #ffffff;
  --md-secondary-container: #d5e4f7; --md-on-secondary-container: #0e1d2a;
  --md-tertiary: #7d5700; --md-on-tertiary: #ffffff;
  --md-tertiary-container: #ffdeac; --md-on-tertiary-container: #281800;
  --md-error: #ba1a1a; --md-on-error: #ffffff;
  --md-error-container: #ffdad6; --md-on-error-container: #410002;
  --md-success: #1e6b3a; --md-success-container: #b9f1c6; --md-on-success-container: #00210c;
  --md-surface: #f8f9ff; --md-on-surface: #191c20; --md-on-surface-variant: #42474e;
  --md-surface-container-lowest: #ffffff; --md-surface-container-low: #f2f3fa; --md-surface-container: #ecedf4;
  --md-surface-container-high: #e6e8ee; --md-surface-container-highest: #e0e2e8;
  --md-outline: #72777f; --md-outline-variant: #c2c7cf;
  --md-inverse-surface: #2e3135; --md-inverse-on-surface: #eff0f7; --md-scrim: rgb(0 0 0 / .4);

  --shape-xs: 4px; --shape-sm: 8px; --shape-md: 12px; --shape-lg: 16px; --shape-xl: 28px; --shape-xxl: 44px; --shape-full: 999px;
  --spring: cubic-bezier(.38, 1.21, .22, 1);
  --spring-fast: cubic-bezier(.42, 1.67, .21, .9);
  --ease: cubic-bezier(.34, .8, .34, 1);
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-brand: 'Yummy Wordmark', 'Futura', 'Century Gothic', var(--font);
  --mono: 'Cascadia Code', Consolas, ui-monospace, monospace;
  --yd-max: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --md-primary: #3aa6e0; --md-on-primary: #001d33;
    --md-primary-container: #004b74; --md-on-primary-container: #cfe5ff;
    --md-secondary: #b9c8da; --md-on-secondary: #23323f;
    --md-secondary-container: #3a4857; --md-on-secondary-container: #d5e4f7;
    --md-tertiary: #fbbc4a; --md-on-tertiary: #422c00;
    --md-tertiary-container: #5f4100; --md-on-tertiary-container: #ffdeac;
    --md-error: #ffb4ab; --md-on-error: #690005;
    --md-error-container: #93000a; --md-on-error-container: #ffdad6;
    --md-success: #9ad6a9; --md-success-container: #00522a; --md-on-success-container: #b9f1c6;
    --md-surface: #101418; --md-on-surface: #e0e2e8; --md-on-surface-variant: #c2c7cf;
    --md-surface-container-lowest: #0b0f12; --md-surface-container-low: #181c20; --md-surface-container: #1c2024;
    --md-surface-container-high: #272a2f; --md-surface-container-highest: #32353a;
    --md-outline: #8c9199; --md-outline-variant: #42474e;
    --md-inverse-surface: #e0e2e8; --md-inverse-on-surface: #2e3135; --md-scrim: rgb(0 0 0 / .6);
  }
}

/* ---- Base ------------------------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--md-surface); color: var(--md-on-surface); font: 400 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--md-primary); text-underline-offset: 3px; transition: color .2s var(--ease); }
a:hover { color: color-mix(in srgb, var(--md-primary) 80%, var(--md-on-surface)); }
:focus-visible { outline: 3px solid var(--md-primary); outline-offset: 2px; border-radius: var(--shape-sm); }
img, svg, video { max-width: 100%; }
h1 { font-size: 2.25rem; line-height: 1.15; font-weight: 750; letter-spacing: -.02em; margin: 0 0 14px; }
h2 { font-size: 1.3rem; line-height: 1.3; font-weight: 680; letter-spacing: -.01em; margin: 0 0 10px; }
h3 { font-size: 1.05rem; font-weight: 650; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--md-outline-variant); margin: 22px 0; }
code { font: .86em var(--mono); word-break: break-all; background: var(--md-surface-container-high); padding: 1px 6px; border-radius: var(--shape-xs); }
pre, pre.code { font: .82rem/1.5 var(--mono); background: var(--md-surface-container-highest); border-radius: var(--shape-lg); padding: 14px 16px; overflow-x: auto; white-space: pre; }
pre code { background: none; padding: 0; word-break: normal; }
kbd { font: .82em var(--mono); background: var(--md-surface-container-highest); border-radius: var(--shape-xs); padding: 1px 6px; box-shadow: inset 0 -1px 0 var(--md-outline-variant); }
::selection { background: var(--md-primary-container); color: var(--md-on-primary-container); }

/* Utilities */
.muted { color: var(--md-on-surface-variant); }
.center { text-align: center; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.error { color: var(--md-error); display: block; font-size: .9rem; font-weight: 500; }
.big { font-size: 2rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-end { justify-content: flex-end; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: 1fr minmax(240px, 340px); gap: 18px; align-items: start; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } .hide-sm { display: none !important; } }

/* ---- Top app bar ---------------------------------------------------------------------------------------------- */
.yd-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 24px; background: color-mix(in srgb, var(--md-surface) 88%, transparent); backdrop-filter: blur(14px); }
.yd-brand { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; color: var(--md-on-surface); padding: 6px 4px;
  font: 400 1.75rem/1 var(--font-brand); letter-spacing: .005em; }
.yd-brand:hover { color: var(--md-on-surface); }
.yd-brand img { height: 1.15em; width: auto; display: block; }            /* e.g. the DCH cloud: keep its ratio */
.yd-brand b, .yd-brand strong { font-weight: 400; }                         /* never bold Futura */
.yd-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.yd-nav a, .yd-nav button.linklike { text-decoration: none; color: var(--md-on-surface-variant); font-weight: 560; padding: 10px 16px; border-radius: var(--shape-full);
  transition: background .2s var(--ease), color .2s var(--ease), border-radius .35s var(--spring); }
.yd-nav a:hover, .yd-nav button.linklike:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); }
.yd-nav a:active, .yd-nav button.linklike:active { border-radius: var(--shape-md); }
.yd-nav a[aria-current="page"], .yd-nav a.on { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.yd-nav a.btn { color: var(--md-on-primary); margin-left: 6px; }
.yd-nav a.btn:hover { color: var(--md-on-primary); }
.yd-user { color: var(--md-on-surface-variant); font-size: .9rem; padding: 0 8px; }

/* ---- Page layouts -------------------------------------------------------------------------------------------- */
.yd-main { max-width: var(--yd-max); margin: 0 auto; padding: 24px 16px 56px; }
.yd-main.wide { max-width: 1320px; }
.yd-main.narrow { max-width: 620px; }
/* Dashboards: a navigation rail beside the content; becomes a scrolling row of pills on small screens. */
.yd-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; max-width: 1400px; margin: 0 auto; padding: 16px 16px 56px; }
.yd-rail { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: var(--shape-xl); background: var(--md-surface-container-low); }
.yd-rail a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border-radius: var(--shape-full); text-decoration: none;
  color: var(--md-on-surface-variant); font-weight: 580; transition: background .2s var(--ease), color .2s var(--ease), border-radius .35s var(--spring); }
.yd-rail a:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); }
.yd-rail a:active { border-radius: var(--shape-md); }
.yd-rail a[aria-current="page"], .yd-rail a.on { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.yd-rail .yd-rail-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--md-on-surface-variant); padding: 14px 16px 6px; }
.yd-rail .badge { margin-left: auto; }
@media (max-width: 860px) {
  .yd-shell { grid-template-columns: 1fr; }
  .yd-rail { position: static; flex-direction: row; overflow-x: auto; border-radius: var(--shape-full); padding: 6px; }
  .yd-rail a { min-height: 40px; white-space: nowrap; }
  .yd-rail .yd-rail-label { display: none; }
}
.yd-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.yd-page-head h1 { margin: 0; }
.yd-foot { text-align: center; color: var(--md-on-surface-variant); font-size: .86rem; padding: 28px 16px 44px; }
.yd-foot a { color: inherit; }

/* ---- Containers ---------------------------------------------------------------------------------------------- */
.card { background: var(--md-surface-container-low); border-radius: var(--shape-xl); padding: 26px; margin-bottom: 18px; }
.card > :last-child { margin-bottom: 0; }
.card.narrow { max-width: 580px; margin-left: auto; margin-right: auto; }
.card-tonal { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.card-outlined { background: transparent; box-shadow: inset 0 0 0 1px var(--md-outline-variant); }
.card-high { background: var(--md-surface-container); }
a.card, .card-link { display: block; text-decoration: none; color: inherit; transition: transform .45s var(--spring), background .2s var(--ease), border-radius .45s var(--spring); }
a.card:hover, .card-link:hover { transform: translateY(-3px); background: var(--md-surface-container); border-radius: var(--shape-xxl); color: inherit; }
.grid2 > .card, .grid3 > .card { margin: 0; }
.grid2, .grid3 { margin-bottom: 18px; }

/* Hero: tonal surface with two slowly morphing Expressive shapes. */
.hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: 64px 24px 56px; margin: 4px 0 22px;
  background: var(--md-primary-container); color: var(--md-on-primary-container); border-radius: var(--shape-xxl); }
.hero::before, .hero::after { content: ''; position: absolute; z-index: -1; pointer-events: none; }
.hero::before { width: 420px; height: 420px; right: -120px; top: -160px; background: var(--md-primary); opacity: .16;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: yd-morph 18s ease-in-out infinite alternate; }
.hero::after { width: 300px; height: 300px; left: -90px; bottom: -150px; background: var(--md-tertiary-container); opacity: .9;
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; animation: yd-morph 22s ease-in-out infinite alternate-reverse; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.7rem); font-weight: 820; letter-spacing: -.035em; line-height: 1.04; margin-bottom: 16px; }
.hero .yd-brand, .hero .wordmark, .hero h1.wordmark { font-family: var(--font-brand); font-weight: 400; letter-spacing: .005em; }   /* product names: never bold Futura */
.hero .muted { color: color-mix(in srgb, var(--md-on-primary-container) 78%, transparent); }
.hero.left { text-align: left; }
.lead { font-size: 1.2rem; max-width: 660px; margin: 0 auto 22px; }
.hero.left .lead { margin-left: 0; }
@media (prefers-color-scheme: dark) { .hero::after { background: var(--md-on-primary-container); opacity: .1; } }   /* on dark: a soft light-blue glow (amber turned brown, or green over the blue) */
@keyframes yd-morph {
  0% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: rotate(0deg) scale(1); }
  50% { border-radius: 58% 42% 38% 62% / 55% 61% 39% 45%; transform: rotate(14deg) scale(1.06); }
  100% { border-radius: 36% 64% 47% 53% / 62% 35% 65% 38%; transform: rotate(-8deg) scale(.97); }
}

/* ---- Buttons ------------------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 24px;
  background: var(--md-primary); color: var(--md-on-primary); border: 0; border-radius: var(--shape-full);
  font: 620 .95rem/1 var(--font); letter-spacing: .01em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), border-radius .4s var(--spring), transform .4s var(--spring-fast), box-shadow .2s var(--ease); }
.btn:hover { background: color-mix(in srgb, var(--md-on-primary) 10%, var(--md-primary)); color: var(--md-on-primary); box-shadow: 0 1px 3px rgb(0 0 0 / .18); }
.btn:active { border-radius: var(--shape-md); transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-small { min-height: 36px; padding: 0 16px; font-size: .88rem; }
.btn-big { min-height: 56px; padding: 0 32px; font-size: 1.05rem; }
.btn-ghost { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.btn-ghost:hover { background: color-mix(in srgb, var(--md-on-secondary-container) 9%, var(--md-secondary-container)); color: var(--md-on-secondary-container); }
.btn-outline { background: transparent; color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-outline); }
.btn-outline:hover { background: color-mix(in srgb, var(--md-primary) 8%, transparent); color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-outline); }
.btn-text { background: transparent; color: var(--md-primary); padding: 0 14px; }
.btn-text:hover { background: color-mix(in srgb, var(--md-primary) 8%, transparent); color: var(--md-primary); box-shadow: none; }
.btn-danger { background: var(--md-error); color: var(--md-on-error); }
.btn-danger:hover { background: color-mix(in srgb, var(--md-on-error) 10%, var(--md-error)); color: var(--md-on-error); }
.linklike { background: none; border: 0; padding: 0; color: var(--md-primary); font: inherit; cursor: pointer; }
form.inline { display: inline; }

/* ---- Forms --------------------------------------------------------------------------------------------------- */
.stack label, .stack fieldset, .field { display: block; margin-bottom: 16px; color: var(--md-on-surface-variant); font-size: .92rem; font-weight: 550; }
input, select, textarea { font: 400 1rem var(--font); color: var(--md-on-surface); background: var(--md-surface-container-lowest);
  border: 1px solid var(--md-outline); border-radius: var(--shape-md); padding: 11px 14px; max-width: 100%;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), border-radius .35s var(--spring); }
input:hover, select:hover, textarea:hover { border-color: var(--md-on-surface); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--md-primary); box-shadow: inset 0 0 0 1px var(--md-primary); border-radius: var(--shape-lg); }
input[type=checkbox], input[type=radio] { accent-color: var(--md-primary); width: 18px; height: 18px; padding: 0; vertical-align: -3px; }
input[type=range] { accent-color: var(--md-primary); padding: 0; border: 0; }
input[type=file] { padding: 9px 12px; }
input[type=file]::file-selector-button { font: 600 .88rem var(--font); border: 0; border-radius: var(--shape-full); padding: 8px 14px; margin-right: 12px;
  background: var(--md-secondary-container); color: var(--md-on-secondary-container); cursor: pointer; }
input:disabled, select:disabled, textarea:disabled { opacity: .55; cursor: not-allowed; }
.stack input:not([type=checkbox]):not([type=radio]), .stack select, .stack textarea,
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { display: block; width: 100%; margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.hint { display: block; font-size: .85rem; font-weight: 400; color: var(--md-on-surface-variant); margin-top: 4px; }
input.small { padding: 6px 10px; font-size: .85rem; width: 150px; border-radius: var(--shape-sm); }
input.small.wide { width: 270px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: 8px; }
.check { display: flex; gap: 10px; align-items: center; color: var(--md-on-surface) !important; font-weight: 450 !important; }

/* ---- Chips ---------------------------------------------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 16px;
  border: 1px solid var(--md-outline-variant); border-radius: var(--shape-sm); background: transparent; color: var(--md-on-surface-variant);
  font-size: .9rem; font-weight: 560; text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), border-radius .4s var(--spring), padding .3s var(--spring); }
.chip:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); color: var(--md-on-surface); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip:has(input:focus-visible) { outline: 3px solid var(--md-primary); outline-offset: 2px; }
.chip-on, .chip:has(input:checked) { background: var(--md-secondary-container); color: var(--md-on-secondary-container); border-color: transparent; border-radius: var(--shape-lg); padding-left: 12px; }
.chip:has(input:checked)::before { content: '✓'; font-weight: 800; }

/* ---- Status pills and badges ----------------------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; min-height: 26px; font-size: .76rem; font-weight: 680; letter-spacing: .02em; white-space: nowrap;
  border-radius: var(--shape-full); padding: 0 12px; background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); vertical-align: middle; }
.pill-ok { background: var(--md-success-container); color: var(--md-on-success-container); }
.pill-warn { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); }
.pill-bad { background: var(--md-error-container); color: var(--md-on-error-container); }
.pill-info { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--shape-full);
  background: var(--md-error); color: var(--md-on-error); font-size: .74rem; font-weight: 750; }

/* ---- Tables ---------------------------------------------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--md-outline-variant); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--md-on-surface-variant); font-weight: 650; }
.table tbody tr { transition: background .2s var(--ease); }
.table tbody tr:hover { background: color-mix(in srgb, var(--md-on-surface) 4%, transparent); }

/* ---- Tabs (segmented) ------------------------------------------------------------------------------------------ */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--md-surface-container); border-radius: var(--shape-full); }
.tab { padding: 9px 18px; text-decoration: none; color: var(--md-on-surface-variant); font-weight: 580; border-radius: var(--shape-full); border: 0; background: none; font-size: 1rem; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease); }
.tab:hover { background: color-mix(in srgb, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); }
.tab-on, .tab[aria-selected="true"], .tab[aria-current="page"] { background: var(--md-primary); color: var(--md-on-primary); }
.tab-on:hover, .tab[aria-selected="true"]:hover, .tab[aria-current="page"]:hover { background: var(--md-primary); color: var(--md-on-primary); }

/* ---- Messages -------------------------------------------------------------------------------------------------- */
.flash { border-radius: var(--shape-lg); padding: 14px 18px; margin-bottom: 18px; word-break: break-word; font-weight: 500; animation: yd-rise .5s var(--spring); }
.flash-ok { background: var(--md-inverse-surface); color: var(--md-inverse-on-surface); }
.flash-error { background: var(--md-error-container); color: var(--md-on-error-container); }
.note { background: var(--md-primary-container); color: var(--md-on-primary-container); padding: 12px 16px; border-radius: var(--shape-lg); margin-bottom: 14px; }
.warn { background: var(--md-tertiary-container); color: var(--md-on-tertiary-container); padding: 12px 16px; border-radius: var(--shape-lg); margin-bottom: 14px; }
.danger-zone { box-shadow: inset 0 0 0 1px var(--md-error); }
@keyframes yd-rise { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---- Stats, lists, empty states, dialogs ------------------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--md-surface-container-low); border-radius: var(--shape-xl); padding: 18px 20px; }
.stat .label { display: block; color: var(--md-on-surface-variant); font-size: .85rem; font-weight: 560; margin-bottom: 6px; }
.stat .value { display: block; font-size: 1.9rem; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat.tonal { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.stat.tonal .label { color: inherit; opacity: .8; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list > a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--shape-lg); text-decoration: none; color: inherit; }
.list > li + li, .list > a + a { margin-top: 2px; }
.list > a:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); color: inherit; }
.list .meta { margin-left: auto; color: var(--md-on-surface-variant); font-size: .88rem; }
.empty { text-align: center; padding: 40px 20px; color: var(--md-on-surface-variant); }
.empty::before { content: ''; display: block; width: 72px; height: 72px; margin: 0 auto 14px; background: var(--md-secondary-container);
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
dialog.yd-dialog { border: 0; border-radius: var(--shape-xl); padding: 26px; max-width: min(560px, calc(100vw - 32px));
  background: var(--md-surface-container-high); color: var(--md-on-surface); animation: yd-rise .4s var(--spring); }
dialog.yd-dialog::backdrop { background: var(--md-scrim); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--shape-full); background: var(--md-tertiary-container);
  color: var(--md-on-tertiary-container); font-weight: 700; flex: none; }

/* ---- Smooth navigation: page changes glide instead of flashing --------------------------------------------------
   Cross-document View Transitions (Chromium/Edge 126+, Safari 18.2+; others just navigate normally). The top bar holds
   still, the current item's pill in the nav, rail and tabs slides to its new place, and the content rises in.
   Each name may appear once per page; a duplicate only skips the animation, never breaks navigation.
   Pair with Speculation Rules prefetch in the product's layout (see README) so pages are ready before the click. */
@view-transition { navigation: auto; }
.yd-bar { view-transition-name: yd-bar; }
.yd-nav a[aria-current="page"], .yd-nav a.on { view-transition-name: yd-nav-current; }
.yd-rail a[aria-current="page"], .yd-rail a.on { view-transition-name: yd-rail-current; }
.tabs .tab-on, .tabs .tab[aria-selected="true"], .tabs .tab[aria-current="page"] { view-transition-name: yd-tab-current; }
.yd-main, .yd-shell > main, .yd-content { view-transition-name: yd-content; }
::view-transition-group(*) { animation-duration: .42s; animation-timing-function: var(--spring); }
::view-transition-group(yd-bar) { animation: none; }
::view-transition-old(yd-bar), ::view-transition-new(yd-bar) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
::view-transition-old(yd-content) { animation: yd-content-out .18s var(--ease) both; }
::view-transition-new(yd-content) { animation: yd-content-in .38s var(--spring) both; }
@keyframes yd-content-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes yd-content-in { from { opacity: 0; transform: translateY(14px); } }

/* ---- Small screens and reduced motion -------------------------------------------------------------------------- */
@media (max-width: 560px) {
  .yd-bar { padding: 8px 12px; }
  .yd-nav a, .yd-nav button.linklike { padding: 8px 12px; }
  .card { padding: 20px; border-radius: 24px; }
  .hero { padding: 44px 18px 40px; border-radius: 32px; }
  h1 { font-size: 1.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}
@media print {
  .yd-bar, .yd-rail, .yd-foot, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card { background: none; box-shadow: inset 0 0 0 1px #ccc; }
}
