/* =============================================================
   Liquid glass: the redesign layer (started 01/11/2026).

   The only look since 02/11/2026: glass.js adds html.glass on every
   load, before the first paint. The rules stay scoped to html.glass
   so they always outrank the flat chassis they layer over.

   Linked after components.css. The approach follows Plotline's own
   glass (web/css/glass.css there): a frosted tint, a bright rim, a
   sheen and a deep soft shadow, with true edge refraction added by
   glass.js in Chromium only. Safari and reduce-transparency get the
   frosted or solid version.

   The rule from Plotline holds here too: glass is for the navigation
   layer (rail, dock, topbar, island, popovers) and the card shells.
   The tint under text stays dense enough that every text token keeps
   AA, so a card reads as a sheet of glass, not a window.
   ============================================================= */

html.glass {
  --g-radius: 24px;          /* card shell; nested panels use --r-lg */
  --g-rail-w: 216px;         /* desktop rail, without its 12 px inset */
  --g-blur: blur(22px) saturate(170%);
  /* Dark skin: a smoky tint, light rims, a black drop. */
  --g-tint:       rgba(24, 24, 30, 0.56);  /* card shell, text sits on it */
  --g-tint-chrome:rgba(26, 26, 34, 0.40);  /* rail, dock, topbar */
  --g-tint-inner: rgba(255, 255, 255, 0.06); /* chips and rows inside glass */
  --g-tint-pop:   rgba(30, 30, 38, 0.78);  /* popovers, the island */
  --g-sheen: linear-gradient(172deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0) 36%);
  --g-spot: rgba(255, 255, 255, 0.10);     /* the cursor's spotlight */
  --g-edge:
    inset 0 1px 1px rgba(255,255,255,0.26),
    inset 0 -1px 1px rgba(255,255,255,0.07),
    inset 2px 3px 10px -6px rgba(255,255,255,0.20),
    inset 0 -14px 26px -18px rgba(0,0,0,0.45);
  --g-drop: 0 1px 2px rgba(0,0,0,0.28), 0 22px 44px -22px rgba(0,0,0,0.70);
  --g-active: rgba(255, 255, 255, 0.12);   /* the lit rail row */
}
html.glass[data-theme="light"] {
  /* Light skin: the tint stays at or above the old page background
     (#F3F1EC) so the accent text tokens keep AA on it. */
  --g-tint:       rgba(255, 255, 255, 0.80);
  --g-tint-chrome:rgba(255, 255, 255, 0.58);
  --g-tint-inner: rgba(255, 255, 255, 0.55);
  --g-tint-pop:   rgba(255, 255, 255, 0.90);
  --g-sheen: linear-gradient(172deg, rgba(255,255,255,0.70) 0%, rgba(255,255,255,0) 40%);
  --g-spot: rgba(255, 255, 255, 0.55);
  --g-edge:
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(255,255,255,0.40),
    inset 0 0 0 1px rgba(255,255,255,0.45);
  --g-drop: 0 1px 2px rgba(31,41,68,0.06), 0 14px 36px -14px rgba(31,41,68,0.22);
  --g-active: rgba(255, 255, 255, 0.85);
}

/* ---- Accent choices (Look panel). Each pair was checked for AA: the
   strong shade on the darkest light glass and the lightest dark glass,
   and the ink on the strong fill. Ember is the default and needs no
   override. ---- */
html.glass[data-accent="blue"]   { --accent:#5B8DEF; --accent-strong:#8DB2F5; --accent-ink:#0B1A33; --focus:#8DB2F5; --accent-soft:rgba(91,141,239,0.16); }
html.glass[data-accent="green"]  { --accent:#4FB286; --accent-strong:#7FCBA6; --accent-ink:#0A2418; --focus:#7FCBA6; --accent-soft:rgba(79,178,134,0.16); }
html.glass[data-accent="violet"] { --accent:#9B7BEA; --accent-strong:#B9A2F2; --accent-ink:#1C1238; --focus:#B9A2F2; --accent-soft:rgba(155,123,234,0.16); }
html.glass[data-accent="pink"]   { --accent:#E0679A; --accent-strong:#EE93B8; --accent-ink:#3A0D20; --focus:#EE93B8; --accent-soft:rgba(224,103,154,0.16); }
html.glass[data-theme="light"][data-accent="blue"]   { --accent:#3B6FD8; --accent-strong:#2B5CC0; --accent-ink:#FFFFFF; --focus:#2B5CC0; --accent-soft:#E3ECFB; }
html.glass[data-theme="light"][data-accent="green"]  { --accent:#2E9A6C; --accent-strong:#1A7350; --accent-ink:#FFFFFF; --focus:#1A7350; --accent-soft:#DFF3EA; }
html.glass[data-theme="light"][data-accent="violet"] { --accent:#7C5CE0; --accent-strong:#6445C9; --accent-ink:#FFFFFF; --focus:#6445C9; --accent-soft:#ECE6FB; }
html.glass[data-theme="light"][data-accent="pink"]   { --accent:#D24B84; --accent-strong:#B23A6E; --accent-ink:#FFFFFF; --focus:#B23A6E; --accent-soft:#FBE4EE; }

/* ---- Wallpaper: nav.js's .lf-atmos layer, made opaque so the glass has
   colour to pick up. Gradients only, nothing to download. ---- */
html.glass .lf-atmos { background: linear-gradient(135deg, #1E1F24, #26272D); }
html.glass[data-wall="aurora"] .lf-atmos {
  background:
    radial-gradient(70vw 55vh at 12% 18%, rgba(56, 96, 230, 0.55), transparent 70%),
    radial-gradient(60vw 60vh at 88% 78%, rgba(40, 60, 170, 0.60), transparent 70%),
    radial-gradient(40vw 30vh at 70% 10%, rgba(120, 150, 255, 0.30), transparent 70%),
    #0E1334;
}
html.glass[data-wall="ember"] .lf-atmos {
  background:
    radial-gradient(65vw 55vh at 10% 0%, rgba(200, 106, 66, 0.42), transparent 70%),
    radial-gradient(55vw 50vh at 100% 85%, rgba(224, 168, 90, 0.26), transparent 70%),
    #18130F;
}
html.glass[data-wall="forest"] .lf-atmos {
  background:
    radial-gradient(65vw 55vh at 15% 10%, rgba(46, 120, 90, 0.48), transparent 70%),
    radial-gradient(55vw 55vh at 90% 90%, rgba(30, 80, 70, 0.55), transparent 70%),
    #0E1714;
}
html.glass[data-wall="dusk"] .lf-atmos {
  background:
    radial-gradient(60vw 55vh at 10% 15%, rgba(110, 70, 200, 0.48), transparent 70%),
    radial-gradient(55vw 50vh at 92% 85%, rgba(190, 70, 130, 0.40), transparent 70%),
    #15112A;
}
html.glass[data-theme="light"] .lf-atmos { background: linear-gradient(135deg, #ECEBE7, #E2E1DC); }
html.glass[data-theme="light"][data-wall="aurora"] .lf-atmos {
  background:
    radial-gradient(70vw 55vh at 12% 18%, rgba(120, 140, 240, 0.55), transparent 70%),
    radial-gradient(60vw 60vh at 88% 78%, rgba(150, 120, 230, 0.45), transparent 70%),
    #E4E8FA;
}
html.glass[data-theme="light"][data-wall="ember"] .lf-atmos {
  background:
    radial-gradient(65vw 55vh at 10% 0%, rgba(232, 150, 110, 0.45), transparent 70%),
    radial-gradient(55vw 50vh at 100% 85%, rgba(240, 200, 130, 0.40), transparent 70%),
    #F4ECE4;
}
html.glass[data-theme="light"][data-wall="forest"] .lf-atmos {
  background:
    radial-gradient(65vw 55vh at 15% 10%, rgba(120, 190, 150, 0.45), transparent 70%),
    radial-gradient(55vw 55vh at 90% 90%, rgba(110, 170, 160, 0.40), transparent 70%),
    #E6F0EA;
}
html.glass[data-theme="light"][data-wall="dusk"] .lf-atmos {
  background:
    radial-gradient(60vw 55vh at 10% 15%, rgba(170, 140, 235, 0.50), transparent 70%),
    radial-gradient(55vw 50vh at 92% 85%, rgba(235, 150, 190, 0.45), transparent 70%),
    #EEE8F6;
}

/* ---- The shared surface. --mx/--my are the cursor's position over the
   element (glass.js); off the element they park far outside it. ---- */
html.glass .card,
html.glass .dash-nav,
html.glass .topbar,
html.glass .lf-pop,
html.glass #lf-island {
  -webkit-backdrop-filter: var(--g-blur);
  backdrop-filter: var(--g-blur);
  box-shadow: var(--g-edge), var(--g-drop);
  border: 0;
}
/* Cards carry the look (tint, rim, sheen, spotlight) but no backdrop blur.
   They sit on a smooth wallpaper gradient, which a blur leaves unchanged, so
   the blur bought nothing visible and cost a GPU layer per card: on long pages
   (Gym, Recovery) first paint lagged behind it (01/11/2026). Real blur stays
   on the floating layer, where content scrolls underneath and it shows. */
html.glass .card {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background:
    radial-gradient(260px circle at var(--mx, -400px) var(--my, -400px), var(--g-spot), transparent 70%),
    var(--g-sheen), var(--g-tint);
  border-radius: var(--g-radius);
}
/* A card inside a card is a panel, not another sheet of glass. */
html.glass .card .card {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: var(--g-tint-inner); box-shadow: none; border-radius: var(--r-lg);
}

/* Cards rise in one after another on load (glass.js sets --i on the first
   dozen). The page's own reduced-motion rule in components.css flattens
   this to an instant. */
@keyframes lf-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.985); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
html.glass .lf-enter {
  animation: lf-rise var(--dur-4) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* ---- Topbar: a floating capsule instead of a full-bleed strip. ---- */
html.glass .topbar {
  position: sticky; top: 10px !important;
  width: auto; margin: 10px 0 14px;
  border-radius: 22px;
  background:
    radial-gradient(220px circle at var(--mx, -400px) var(--my, -400px), var(--g-spot), transparent 70%),
    var(--g-sheen), var(--g-tint-chrome);
}
html.glass .topbar-pill, html.glass .topbar-water-pill {
  background: var(--g-tint-inner); border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
html.glass .topbar-pill, html.glass .topbar-water-pill { border-radius: var(--r-pill); }

/* ---- Navigation: rail on a desktop, dock on anything smaller. ---- */
html.glass .dash-nav {
  position: fixed; z-index: 60;
  width: auto; margin: 0; min-height: 0;
  background:
    radial-gradient(240px circle at var(--mx, -400px) var(--my, -400px), var(--g-spot), transparent 70%),
    var(--g-sheen), var(--g-tint-chrome);
  border-bottom: 0;
  transform: none !important; /* the rail and dock never slide away */
}
html.glass .dash-nav a {
  background: transparent; border: 0;
  color: var(--text-secondary);
  transition: background var(--dur-2) var(--ease-out), color var(--dur-1), transform var(--dur-2) var(--spring);
}
html.glass .dash-nav a:hover { background: var(--g-tint-inner); color: var(--text-primary); }
html.glass .dash-nav a:active { transform: scale(0.96); }
html.glass .dash-nav a.active {
  background: var(--g-active); color: var(--text-primary); font-weight: 700;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.22), 0 6px 16px -8px rgba(0,0,0,0.55);
}
html.glass .dash-nav a.active .dn-ico { color: var(--accent-strong); }
html.glass .dash-nav .dn-ico {
  display: block; width: 18px; height: 18px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
html.glass .lf-theme-toggle, html.glass .lf-look-btn {
  background: var(--g-tint-inner); border: 0; color: var(--text-secondary);
  /* The icon is display:block, so without this it sat at the left edge of
     the full-width rail button (02/11/2026). */
  display: flex; align-items: center; justify-content: center; padding: 0;
}

@media (min-width: 1080px) {
  /* The rail is fixed, so it holds no height in the flow. */
  html.glass { --lf-nav-h: 0px; }
  html.glass body { padding-left: calc(var(--g-rail-w) + 28px) !important; }
  html.glass .dash-nav {
    top: 12px; left: 12px; bottom: 12px; width: var(--g-rail-w);
    padding: 14px 10px; border-radius: 28px;
    display: flex; flex-direction: column;
  }
  html.glass .dash-nav-inner {
    flex: 1; flex-direction: column; gap: 2px;
    max-width: none; margin: 0; padding: 0; overflow: visible;
    justify-content: flex-start;
  }
  html.glass .dash-nav a { gap: 11px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; }
  html.glass .dash-nav-inner > .lf-theme-toggle { margin-top: auto; }
  html.glass .dash-nav-inner > .lf-theme-toggle,
  html.glass .dash-nav-inner > .lf-look-btn { width: 100%; height: 38px; border-radius: 14px; }
}

@media (max-width: 1079px) {
  html.glass { --lf-nav-h: 0px; --g-dock-h: 64px; }
  html.glass body { padding-bottom: calc(var(--g-dock-h) + 40px + env(safe-area-inset-bottom, 0px)) !important; }
  html.glass .dash-nav {
    top: auto; left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    padding: 6px; border-radius: 26px;
  }
  html.glass .dash-nav-inner { max-width: none; padding: 0; gap: 2px; justify-content: safe center; }
  html.glass .dash-nav a {
    flex-direction: column; gap: 3px; min-width: 58px; padding: 7px 8px 6px;
    border-radius: 20px; font-size: 11px; justify-content: center;
  }
  html.glass .dash-nav .dn-ico { width: 20px; height: 20px; }
  html.glass .dash-nav.dn-more .dash-nav-inner {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
  html.glass .dash-nav-inner > .lf-theme-toggle,
  html.glass .dash-nav-inner > .lf-look-btn { width: 48px; height: 48px; border-radius: 20px; align-self: center; }
}

/* ---- Island: one floating capsule for live things. It sits bottom
   centre of the content (above the dock on a phone), clear of the topbar
   and the page header. States: hidden, a toast, a running focus timer. ---- */
html.glass #lf-island {
  position: fixed; z-index: 70;
  left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(140%) scale(0.9);
  opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 6px 8px 6px 16px; border-radius: 26px;
  background: var(--g-sheen), var(--g-tint-pop);
  color: var(--text-primary); font-family: var(--font-sans); font-size: 13.5px;
  transition:
    transform var(--dur-3) var(--spring), opacity var(--dur-2) var(--ease-out),
    padding var(--dur-3) var(--spring), border-radius var(--dur-3) var(--spring);
}
@media (min-width: 1080px) {
  html.glass #lf-island { left: calc(var(--g-rail-w) + 40px + (100vw - var(--g-rail-w) - 40px) / 2); }
}
@media (max-width: 1079px) {
  html.glass #lf-island { bottom: calc(var(--g-dock-h) + 26px + env(safe-area-inset-bottom, 0px)); }
}
html.glass #lf-island.on { transform: translateX(-50%); opacity: 1; pointer-events: auto; }
html.glass #lf-island.focus { padding: 8px 8px 8px 18px; border-radius: 30px; }
html.glass #lf-island .isl-tick {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--success); color: #0B1A12;
}
html.glass #lf-island .isl-tick svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
html.glass #lf-island .isl-ring { width: 26px; height: 26px; flex: 0 0 auto; transform: rotate(-90deg); }
html.glass #lf-island .isl-ring circle { fill: none; stroke-width: 3; }
html.glass #lf-island .isl-ring .bg { stroke: var(--g-tint-inner); }
html.glass #lf-island .isl-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
html.glass #lf-island .isl-text { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
html.glass #lf-island > span:not(.isl-tick):not(.isl-time) { overflow: hidden; text-overflow: ellipsis; max-width: min(56vw, 360px); white-space: nowrap; }
html.glass #lf-island .isl-sub { font-size: var(--fs-label); color: var(--text-secondary); }
html.glass #lf-island .isl-time { font-size: 22px; font-weight: 700; color: var(--warning); margin-left: 6px; min-width: 66px; text-align: right; }
html.glass #lf-island button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--text-primary); background: var(--g-tint-inner);
}
html.glass #lf-island button svg { width: 14px; height: 14px; fill: currentColor; }
html.glass #lf-island button:active { transform: scale(0.92); }

/* Page toasts that pin to the bottom (Finances' cancel toast) clear the rail
   and the dock the way the island does. */
@media (min-width: 1080px) {
  html.glass .cancel-toast { left: calc(var(--g-rail-w) + 40px + (100vw - var(--g-rail-w) - 40px) / 2); }
}
@media (max-width: 1079px) {
  html.glass .cancel-toast { bottom: calc(var(--g-dock-h) + 26px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Look panel: wallpaper and accent, one tap each. ---- */
html.glass .lf-pop {
  position: fixed; z-index: 80; width: 280px; padding: 16px; border-radius: 22px;
  background: var(--g-sheen), var(--g-tint-pop); color: var(--text-primary);
  font-family: var(--font-sans);
}
html.glass .lf-pop[hidden] { display: none; }
html.glass .lf-pop h3 { margin: 0 0 10px; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-secondary); font-weight: 600; }
html.glass .lf-pop .row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
html.glass .lf-pop .row:last-child { margin-bottom: 0; }
html.glass .lf-pop .wall {
  width: 44px; height: 32px; border-radius: 10px; border: 0; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
html.glass .lf-pop .dot { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
html.glass .lf-pop [aria-pressed="true"] { outline: 2px solid var(--text-primary); outline-offset: 2px; }
@media (min-width: 1080px) { html.glass .lf-pop { left: calc(var(--g-rail-w) + 24px); bottom: 24px; } }
@media (max-width: 1079px) { html.glass .lf-pop { left: 50%; transform: translateX(-50%); bottom: calc(var(--g-dock-h) + 30px + env(safe-area-inset-bottom, 0px)); } }

/* ---- Home band (index.html #glassHome, filled by glass-home.js). Three
   cards in a row on a wide screen, two then one below, one on a phone.
   Not charts, so they may share the row; layout.css still owns widths. ---- */
.glass-home { display: none; }
html.glass .glass-home:not([hidden]) {
  display: grid; gap: 14px; margin: 0 0 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px)  { html.glass .glass-home:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); } html.glass .gh-focus { grid-column: 1 / -1; } }
@media (min-width: 1500px) { html.glass .glass-home:not([hidden]) { grid-template-columns: repeat(3, minmax(0, 1fr)); } html.glass .gh-focus { grid-column: auto; } }
html.glass .gh-card { padding: 18px 20px; min-height: 236px; display: flex; flex-direction: column; }
html.glass .gh-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
html.glass .gh-head h2 { margin: 0; font-size: var(--fs-head); font-weight: 700; color: var(--text-primary); }
html.glass .gh-head p { margin: 2px 0 0; font-size: var(--fs-meta); color: var(--text-secondary); }
html.glass .gh-head a { font-size: var(--fs-meta); font-weight: 600; color: var(--accent-strong); text-decoration: none; }

html.glass .gh-rings-body { flex: 1; display: flex; align-items: center; gap: 22px; }
html.glass .gh-ring-svg { width: 132px; height: 132px; flex: 0 0 auto; transform: rotate(-90deg); }
html.glass .gh-track { fill: none; stroke: var(--g-tint-inner); stroke-width: 9; }
html.glass .gh-fill { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset var(--dur-4) var(--ease-out); }
html.glass .gh-fill.gh-g { stroke: var(--accent); }
html.glass .gh-fill.gh-w { stroke: var(--info); }
html.glass .gh-fill.gh-s { stroke: var(--success); }
html.glass .gh-legend { margin: 0; display: grid; gap: 10px; }
html.glass .gh-legend > div { padding-left: 10px; border-left: 3px solid; }
html.glass .gh-legend .gh-g { border-color: var(--accent); }
html.glass .gh-legend .gh-w { border-color: var(--info); }
html.glass .gh-legend .gh-s { border-color: var(--success); }
html.glass .gh-legend dt { font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-secondary); }
html.glass .gh-legend dd { margin: 0; font-size: var(--fs-meta); color: var(--text-secondary); }
html.glass .gh-legend b { font-size: 20px; color: var(--text-primary); }

html.glass .gh-next-hero {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; margin-bottom: 8px;
  border-radius: var(--r-lg); background: color-mix(in srgb, var(--accent) 16%, var(--g-tint-inner));
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.14);
}
html.glass .gh-when { font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--accent-strong); }
html.glass .gh-next-hero b { font-size: var(--fs-head); color: var(--text-primary); }
html.glass .gh-meta { font-size: var(--fs-meta); color: var(--text-secondary); }
html.glass .gh-next-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 4px 8px 12px; border-left: 3px solid var(--accent); margin-top: 6px; font-size: var(--fs-body); color: var(--text-primary); }
html.glass .gh-empty { margin: auto 0; font-size: var(--fs-body); color: var(--text-secondary); }

html.glass .gh-seg { display: flex; padding: 3px; border-radius: var(--r-pill); background: var(--g-tint-inner); }
html.glass .gh-seg button {
  border: 0; background: transparent; color: var(--text-secondary); font: 600 var(--fs-meta) var(--font-sans);
  padding: 6px 11px; border-radius: var(--r-pill); cursor: pointer;
  transition: background var(--dur-2) var(--spring), color var(--dur-1);
}
html.glass .gh-seg button[aria-pressed="true"] { background: var(--g-active); color: var(--text-primary); box-shadow: inset 0 1px 1px rgba(255,255,255,0.2); }
html.glass .gh-focus-body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
html.glass .gh-focus-num { display: flex; align-items: baseline; gap: 8px; }
html.glass .gh-focus-num b { font-size: var(--fs-display); line-height: 1; color: var(--text-primary); }
html.glass .gh-focus-num span { font-size: var(--fs-meta); color: var(--text-secondary); }
html.glass .gh-start {
  border: 0; cursor: pointer; padding: 13px 18px; border-radius: var(--r-pill);
  font: 700 var(--fs-body) var(--font-sans); color: var(--accent-ink);
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 60%), var(--accent-strong);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.35), 0 8px 20px -10px var(--accent);
  transition: transform var(--dur-2) var(--spring);
}
html.glass .gh-start:active { transform: scale(0.97); }
html.glass .gh-live { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: var(--r-lg); background: var(--g-tint-inner); font-size: var(--fs-body); color: var(--text-primary); }
html.glass .gh-live[hidden] { display: none; }
html.glass .gh-live button { border: 0; cursor: pointer; padding: 7px 14px; border-radius: var(--r-pill); background: var(--g-active); color: var(--text-primary); font: 600 var(--fs-meta) var(--font-sans); }
@media (pointer: coarse) { html.glass .gh-seg button, html.glass .gh-live button { min-height: 44px; } html.glass .gh-start { min-height: 48px; } }

/* ---- The home Today card's link to the Tasks page (tasks.html). ---- */
.gm-board-link { display: none; }
html.glass .gm-board-link {
  display: inline-flex; align-items: center; margin-left: auto; align-self: flex-start; padding: 6px 14px;
  border-radius: var(--r-pill); background: var(--g-tint-inner); color: var(--text-primary);
  font: 600 var(--fs-meta) var(--font-sans); text-decoration: none;
  transition: background var(--dur-2) var(--spring);
}
html.glass .gm-board-link:hover { background: var(--g-active); }
@media (pointer: coarse) { html.glass .gm-board-link { min-height: 44px; } }

/* ---- Ticked rows: strike through, then glass.js slides them down. ---- */
html.glass .lf-struck { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--text-tertiary); transition: color var(--dur-2); }

/* ---- Chromium only: real refraction at the rail, dock and topbar edge.
   Safari ignores url() in backdrop-filter and keeps the frosted look. ---- */
html.glass.glass-lens .dash-nav { -webkit-backdrop-filter: url(#lf-lens-nav) blur(16px) saturate(170%); backdrop-filter: url(#lf-lens-nav) blur(16px) saturate(170%); }
html.glass.glass-lens .topbar  { -webkit-backdrop-filter: url(#lf-lens-top) blur(16px) saturate(170%); backdrop-filter: url(#lf-lens-top) blur(16px) saturate(170%); }

/* ---- Reduce transparency: every surface turns solid and keeps its place. ---- */
@media (prefers-reduced-transparency: reduce) {
  html.glass { --g-tint:#1E1E25; --g-tint-chrome:#1C1C23; --g-tint-pop:#24242C; --g-tint-inner:#2A2A33; }
  html.glass[data-theme="light"] { --g-tint:#FFFFFF; --g-tint-chrome:#FBFAF7; --g-tint-pop:#FFFFFF; --g-tint-inner:#F2F1ED; }
  html.glass .card, html.glass .dash-nav, html.glass .topbar, html.glass .lf-pop, html.glass #lf-island {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
}
