@font-face { font-family: "Manrope"; src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* The dashboard's only stylesheet (one page for everyone since 2026-11-13). Three looks, chosen with the mode button and set by view.js as
   data-theme on the html element: "light", "dark" and "horace" (Horace mode: black, white, everything bold, thick borders, bigger text that
   he can step up and down). Before a choice is saved the page follows the computer's light or dark setting.
   An app shell: a deep plum sidebar with the section links, a light, airy canvas, white cards with soft shadows, the status sentence set in
   Instrument Serif and everything else in Manrope with tabular figures. One violet accent; teal is the video offer and orange the Ava offer
   on every chart and table; green, amber and red mean health and nothing else. */
:root {
  --bg: #f4f4f8; --card: #ffffff; --soft: #f6f5fa; --ink: #15121f; --muted: #5c586e; --line: #e8e6ef; --line-strong: #cfccdc;
  --accent: #6a4cf5; --accent-hover: #5638e6; --accent-soft: #efebff; --accent-ink: #ffffff; --video: #0b7a72; --ava: #c2560c;
  --ok: #11804a; --warn: #9a5800; --bad: #c22b20; --ok-bg: #e3f5eb; --warn-bg: #fdf0d9; --bad-bg: #fde6e3;
  --side: #17132b; --side-ink: #f1eefc; --side-muted: #aaa5c8; --side-line: #2b2549; --side-hover: rgba(255, 255, 255, 0.06); --side-on: rgba(139, 109, 255, 0.22); --side-icon: #bfb1ff;
  --shadow: 0 1px 2px rgba(21, 18, 31, 0.04), 0 8px 24px -12px rgba(40, 30, 90, 0.14);
  --shadow-lift: 0 1px 2px rgba(21, 18, 31, 0.05), 0 18px 40px -18px rgba(60, 40, 160, 0.28);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: var(--sans); --mono: var(--sans);
  --radius: 18px; --gutter: 20px; --bw: 1px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0d0c13; --card: #16141f; --soft: #1c1a28; --ink: #f1eff9; --muted: #aaa6bf; --line: #272436; --line-strong: #3b3752;
    --accent: #a593ff; --accent-hover: #b8a9ff; --accent-soft: #252040; --accent-ink: #120f1f; --video: #3fd0c4; --ava: #ff9f5a;
    --ok: #5ad597; --warn: #f2b950; --bad: #ff8a80; --ok-bg: #12291e; --warn-bg: #2e2410; --bad-bg: #331818;
    --side: #09080e; --side-line: #1f1c2c;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -16px rgba(0, 0, 0, 0.8);
    --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 44px -18px rgba(0, 0, 0, 0.9);
  }
}
:root[data-theme="dark"] {
  --bg: #0d0c13; --card: #16141f; --soft: #1c1a28; --ink: #f1eff9; --muted: #aaa6bf; --line: #272436; --line-strong: #3b3752;
  --accent: #a593ff; --accent-hover: #b8a9ff; --accent-soft: #252040; --accent-ink: #120f1f; --video: #3fd0c4; --ava: #ff9f5a;
  --ok: #5ad597; --warn: #f2b950; --bad: #ff8a80; --ok-bg: #12291e; --warn-bg: #2e2410; --bad-bg: #331818;
  --side: #09080e; --side-line: #1f1c2c;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -16px rgba(0, 0, 0, 0.8);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 44px -18px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 20px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.55 var(--sans); font-feature-settings: "tnum" 1; padding-bottom: env(safe-area-inset-bottom); -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; z-index: 30; }
.skip:focus { top: 8px; }
.horace-only { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

button, a.navlink { font: 600 0.86rem/1 var(--sans); color: var(--ink); background: var(--card); border: var(--bw) solid var(--line-strong); border-radius: 11px; padding: 0 16px; min-height: 42px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; box-shadow: 0 1px 2px rgba(21, 18, 31, 0.05); transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s; }
button:hover:not(:disabled), a.navlink:hover { border-color: var(--ink); }
button:disabled { opacity: 0.55; cursor: default; }
button#refresh { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -8px var(--accent); }
button#refresh:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---- the app shell: sidebar + content ---- */
.side { display: none; }
main, .foot, .band-in { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) {
  body:not(.login-page) { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  body:not(.login-page) > :not(.side) { grid-column: 2; min-width: 0; width: 100%; }
  body:not(.login-page) > .skip { width: auto; }
  .top-right a.navlink { display: none; }
  .side { grid-column: 1; grid-row: 1 / span 6; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 22px 16px 18px; background: var(--side); color: var(--side-ink); border-right: var(--bw) solid var(--side-line); }
  .top .brand-mark { display: none; }
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: var(--side-ink); text-decoration: none; }
.side-brand .brand-mark { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 8px 16px rgba(106, 76, 245, 0.45)); }
.side-brand strong { display: block; font: 800 1.02rem/1.1 var(--sans); letter-spacing: 0.04em; }
.side-brand small { display: block; font: 500 0.76rem/1.3 var(--sans); color: var(--side-muted); margin-top: 2px; }
.side-label { margin: 18px 12px 6px; font: 600 0.72rem/1 var(--sans); color: var(--side-muted); letter-spacing: 0.06em; }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: 10px; color: var(--side-muted); text-decoration: none; font: 600 0.88rem/1.2 var(--sans); transition: background-color 0.15s, color 0.15s; }
.side-link svg { width: 18px; height: 18px; flex: none; }
.side-link:hover { background: var(--side-hover); color: var(--side-ink); }
.side-link[aria-current="page"] { background: var(--side-on); color: #ffffff; }
.side-link[aria-current="page"] svg { color: var(--side-icon); }
.side :focus-visible { outline-color: var(--side-icon); }
.side-sub { margin: 2px 0 0 21px; padding-left: 10px; border-left: var(--bw) solid var(--side-line); }
.side-sub .side-link { min-height: 36px; padding: 6px 10px; font-size: 0.83rem; font-weight: 500; }
.side-sub .side-link svg { width: 16px; height: 16px; opacity: 0.8; }
.side-foot { margin: auto 12px 0; padding-top: 18px; display: flex; align-items: center; gap: 8px; font: 500 0.76rem/1.3 var(--sans); color: var(--side-muted); }
.side-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); flex: none; }

/* ---- page header ---- */
.band { color: var(--ink); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: calc(24px + env(safe-area-inset-top)) 0 22px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: none; }
h1 { font: 800 clamp(1.45rem, 2.4vw, 1.8rem)/1.15 var(--sans); margin: 0; letter-spacing: -0.03em; }
.sub { margin: 6px 0 0; color: var(--muted); font: 500 0.8rem/1.3 var(--sans); }
.top-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ---- the status card: state badge, one serif sentence, and the four live figures ---- */
.status { --wash: var(--accent-soft); --tone: var(--accent); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: start;
  background: radial-gradient(110% 160% at 0% 0%, var(--wash) 0%, transparent 52%), var(--card); border: var(--bw) solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lift); padding: 28px 28px 0; overflow: hidden; }
.status[data-state="Healthy"] { --wash: var(--ok-bg); --tone: var(--ok); }
.status[data-state="Warning"] { --wash: var(--warn-bg); --tone: var(--warn); }
.status[data-state="Critical"] { --wash: var(--bad-bg); --tone: var(--bad); }
.lamp { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font: 800 1.5rem/1 var(--sans); color: var(--tone); background: var(--card); border: var(--bw) solid var(--line); box-shadow: 0 0 0 5px var(--wash), var(--shadow); margin-top: 4px; }
.lamp::before { content: "…"; }
.status[data-state="Healthy"] .lamp::before { content: "✓"; }
.status[data-state="Warning"] .lamp::before { content: "!"; }
.status[data-state="Critical"] .lamp::before { content: "×"; }
.status-line { font: 400 clamp(2.2rem, 4.8vw, 3.5rem)/1.04 var(--serif); margin: 0; letter-spacing: -0.012em; text-wrap: balance; }
.status-detail { margin: 12px 0 0; color: var(--muted); max-width: 68ch; font-size: 0.98rem; }
.status-detail ul { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.status-detail li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--card); border: var(--bw) solid var(--line); color: var(--ink); font-weight: 600; font-size: 0.85rem; }
.status-detail li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); flex: none; }
.band-figs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 28px -28px 0; border-top: var(--bw) solid var(--line); background: color-mix(in srgb, var(--card) 70%, transparent); }
@media (min-width: 860px) { .band-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.band-figs > div { position: relative; padding: 18px 24px 20px 28px; min-width: 0; border-left: var(--bw) solid var(--line); }
.band-figs > div:first-child { border-left: 0; }
@media (max-width: 859px) { .band-figs > div:nth-child(3) { border-left: 0; } .band-figs > div:nth-child(n+3) { border-top: var(--bw) solid var(--line); } }
.band-figs dt { color: var(--muted); font: 600 0.78rem/1.3 var(--sans); margin: 0; }
.band-figs dd { margin: 8px 0 0; font: 700 clamp(1.5rem, 2.6vw, 2rem)/1.1 var(--sans); letter-spacing: -0.03em; }
.band-figs dd small { display: block; margin-top: 4px; font: 500 0.78rem/1.3 var(--sans); color: var(--muted); letter-spacing: 0; }
.band-figs dd.bad { color: var(--bad); }
.band-figs dd.warn { color: var(--warn); }
.band-figs:empty { display: none; }
.status:has(.band-figs:empty) { padding-bottom: 28px; }
.meter { display: block; height: 6px; margin-top: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; min-width: 0; border-radius: 6px; background: linear-gradient(90deg, #8b6dff, var(--accent)); transition: width 0.6s ease; }
.meter.ok > i { background: var(--ok); }
.meter.warn > i { background: var(--warn); }
.meter.bad > i { background: var(--bad); }

/* ---- content: cards on a two-column grid; the wide ones span both ---- */
body:not(.login-page) main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; padding-top: 20px; padding-bottom: 8px; }
#app { display: contents; }
main > section, #app > section, .col > section { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 24px 26px 26px; background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 1180px) {
  body:not(.login-page) main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col { grid-column: auto; }
}
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
h2 { font: 700 1.04rem/1.3 var(--sans); letter-spacing: -0.01em; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, #8b6dff, #5a3ce6); flex: none; }
h3 { font: 700 0.8rem/1.3 var(--sans); margin: 24px 0 6px; color: var(--muted); letter-spacing: 0.01em; }
.tag-ok { color: var(--ok); } .tag-warn { color: var(--warn); } .tag-bad { color: var(--bad); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 16px; }
.fig { position: relative; min-width: 0; padding: 16px 18px; background: var(--soft); border-radius: 14px; overflow: hidden; }
.label { font: 600 0.78rem/1.3 var(--sans); color: var(--muted); margin: 0; }
.value { font: 700 1.9rem/1.1 var(--sans); letter-spacing: -0.035em; margin: 8px 0 0; }
.value small { font: 500 0.8rem var(--sans); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.detail { margin: 6px 0 0; font-size: 0.8rem; color: var(--muted); }
.spark { display: block; width: calc(100% + 36px); height: 36px; margin: 12px -18px -16px; }
.spark-line { stroke: var(--accent); }
.spark-fill { fill: var(--accent); opacity: 0.12; }

.rows { margin: 0; padding: 0; }
.rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: var(--bw) solid var(--line); }
.rows > div:first-child { border-top: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; font-weight: 600; text-align: right; max-width: 62%; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--soft); border: var(--bw) solid var(--line); font-size: 0.84rem; color: var(--muted); }
.pill b { color: var(--ink); font-weight: 700; }
.src-table td:first-child { color: var(--ink); }

.panel { background: var(--soft); border-radius: 14px; padding: 18px; min-width: 0; }
.two { display: grid; gap: 12px; margin-top: 4px; }
@media (min-width: 720px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.chart text { fill: var(--muted); font: 600 9px var(--sans); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.8rem; color: var(--muted); margin-top: 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: baseline; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-top: 4px; }
th { text-align: left; font: 600 0.75rem/1.3 var(--sans); color: var(--muted); padding: 4px 8px 10px 0; border-bottom: var(--bw) solid var(--line-strong); }
td { padding: 10px 8px 10px 0; border-top: var(--bw) solid var(--line); vertical-align: middle; }
th.num, td.num { text-align: right; padding-right: 0; padding-left: 12px; white-space: nowrap; }
td.num { font-weight: 600; }
.bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 48px; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #8b6dff, var(--accent)); border-radius: 3px; }
tr.total td { font-weight: 700; border-top: var(--bw) solid var(--line-strong); }

.later { margin-top: 16px; padding: 12px 16px; background: var(--soft); border: var(--bw) dashed var(--line-strong); border-radius: 12px; }
.later p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.later strong { color: var(--ink); font-weight: 700; }
.empty, .error { padding: 14px 0; color: var(--muted); margin: 0; }
.error { color: var(--bad); }
.foot { padding-top: 22px; padding-bottom: 40px; font-size: 0.78rem; color: var(--muted); }

/* ---- bounces ---- */
.hist { min-height: 200px; }
.hist-line { font: 400 clamp(1.6rem, 3vw, 2.1rem)/1.15 var(--serif); margin: 0 0 6px; }
.hist-sub { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; max-width: 80ch; }
.hist-body { display: grid; gap: 24px; margin-top: 18px; }
@media (min-width: 760px) { .hist-body { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.hist-body > * { min-width: 0; }
.cal-head, .day-head { display: flex; align-items: center; gap: 8px; }
.cal-title, .day-head h3 { flex: 1; text-align: center; margin: 0; font: 700 0.95rem/1.3 var(--sans); color: var(--ink); letter-spacing: -0.01em; }
button.nav { min-width: 42px; padding: 0 10px; font-size: 1.1rem; }
button.today-btn { font-size: 0.8rem; }
.cal-note { text-align: center; margin: 6px 0 12px; color: var(--muted); font-size: 0.84rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { text-align: center; font: 600 0.72rem var(--sans); color: var(--muted); padding-bottom: 4px; }
button.cal-day { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; border-radius: 11px; min-height: 52px; padding: 7px 8px; background: var(--soft); border-color: transparent; box-shadow: none; font-weight: 600; }
button.cal-day:hover:not(:disabled) { border-color: var(--line-strong); }
.cal-num { font: 600 0.82rem/1 var(--sans); }
.cal-mark { align-self: flex-end; font-size: 0.78rem; font-weight: 800; line-height: 1; min-height: 8px; }
.cal-mark.ok { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
button.cal-day.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
button.cal-day.bad .cal-mark { color: var(--bad); font-size: 0.9rem; }
button.cal-day.future { background: transparent; border: var(--bw) dashed var(--line); color: var(--muted); }
button.cal-day.is-today .cal-num { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
button.cal-day.sel { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--accent-soft); }
button.cal-day.sel.bad { background: var(--bad-bg); }
button.cal-day.sel:focus-visible { outline-offset: 3px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.8rem; color: var(--muted); margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; }
.chips > span { color: var(--muted); font-size: 0.86rem; margin-right: 2px; }
button.chip { font-size: 0.8rem; min-height: 34px; padding: 0 12px; background: var(--bad-bg); color: var(--bad); border-color: transparent; border-radius: 999px; box-shadow: none; }
.day-head h3 { font-size: 0.92rem; }
.day-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.day-facts .fig { padding: 12px 14px; }
.day-facts .value { font-size: 1.45rem; }
.hist-body > .day { align-self: stretch; background: var(--soft); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; }
.empty-day { color: var(--muted); margin: auto 0; padding: 36px 12px; text-align: center; }
.reasons-line { margin: 10px 0 0; color: var(--muted); font-size: 0.88rem; }

/* ---- trends ---- */
.trend-grid { display: grid; gap: 12px; margin-top: 6px; }
@media (min-width: 720px) { .trend-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.trend { background: var(--soft); border-radius: 14px; padding: 16px 18px 12px; min-width: 0; }
.trend-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.trend-title { margin: 0; font: 700 0.88rem/1.3 var(--sans); color: var(--ink); letter-spacing: 0; }
.trend-read { margin: 0; color: var(--muted); font: 600 0.76rem var(--sans); }
.trend .chart { margin-top: 8px; }
.trend .chart text.limit { fill: var(--bad); }
.trend .chart rect[data-i]:not(.on) { opacity: 0.55; }
.trend .chart circle[data-i].on { stroke: var(--ink); }
button.trend-toggle { margin-top: 14px; font-size: 0.84rem; }
.trend-table { margin-top: 10px; overflow-x: auto; }

/* ---- password page ---- */
body.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: radial-gradient(70rem 40rem at 50% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.login { width: 100%; max-width: 440px; margin: 0; padding: 36px 34px 30px; background: var(--card); border: var(--bw) solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lift); }
.login .brand { margin-bottom: 30px; }
.login .brand-mark { display: block; }
.login h1 { font: 700 1rem/1.2 var(--sans); }
.login .status-line { font-size: clamp(2rem, 7vw, 2.6rem); margin-bottom: 26px; }
.login label { display: block; font: 700 0.82rem var(--sans); margin-bottom: 8px; }
.login input { display: block; width: 100%; font: 500 1.02rem var(--sans); color: var(--ink); background: var(--soft); border: var(--bw) solid var(--line-strong); border-radius: 12px; padding: 10px 14px; min-height: 52px; transition: border-color 0.15s, box-shadow 0.15s; }
.login input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.login button { width: 100%; margin-top: 16px; min-height: 52px; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 0.98rem; border-radius: 12px; box-shadow: 0 10px 22px -12px var(--accent); }
.login button:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.login button:disabled { opacity: 0.6; }
.login-msg { min-height: 1.5em; margin: 12px 0 0; color: var(--bad); font-weight: 600; font-size: 0.9rem; }

/* ---- replies page ---- */
.filters { display: grid; gap: 12px; margin: 0 0 16px; }
.inbox-select { font: 600 0.88rem var(--sans); color: var(--ink); background: var(--card); border: var(--bw) solid var(--line-strong); border-radius: 11px; padding: 8px 12px; min-height: 42px; max-width: 100%; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
button.chip-btn { font-size: 0.82rem; min-height: 36px; padding: 0 14px; border-radius: 999px; box-shadow: none; }
button.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.reply { background: var(--soft); border-radius: 14px; padding: 16px 18px; margin-top: 10px; min-width: 0; border-left: 3px solid transparent; }
.reply.review { border-left-color: var(--warn); }
.reply-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.reply-company { margin: 0; font: 700 1rem/1.3 var(--sans); color: var(--ink); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badge { font: 600 0.74rem/1.5 var(--sans); padding: 2px 10px; border-radius: 999px; background: var(--card); border: var(--bw) solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.intent-positive { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.intent-question { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.intent-opt_out { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.reply-meta { margin: 3px 0 0; color: var(--muted); font-size: 0.82rem; overflow-wrap: anywhere; }
.reply-flag { margin: 8px 0 0; color: var(--warn); font-weight: 700; font-size: 0.88rem; }
.reply-subject { margin: 10px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.reply-summary { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.reply-snippet { margin: 6px 0 0; overflow-wrap: anywhere; max-width: 76ch; }
a.reply-open { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 0; color: var(--accent); font-weight: 700; text-underline-offset: 3px; }

/* the section you are reading, marked in the sidebar */
.side-sub .side-link.is-on { color: #ffffff; background: var(--side-hover); font-weight: 600; position: relative; }
.side-sub .side-link.is-on::before { content: ""; position: absolute; left: -11px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--side-icon); }
.side-sub .side-link.is-on svg { color: var(--side-icon); opacity: 1; }

/* ---- phones: tighter, two figures per row, readable chart labels ---- */
@media (max-width: 600px) {
  :root { --gutter: 14px; }
  body { font-size: 15px; }
  .top { padding: calc(16px + env(safe-area-inset-top)) 0 14px; gap: 10px; }
  .brand { gap: 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .sub { font-size: 0.74rem; }
  .top-right { width: 100%; justify-content: flex-start; gap: 6px; flex-wrap: nowrap; }
  .top-right button, .top-right a.navlink { min-height: 40px; padding: 0 12px; font-size: 0.82rem; flex: 1 1 auto; }
  .status { padding: 20px 18px 0; column-gap: 14px; border-radius: 18px; }
  .lamp { width: 40px; height: 40px; border-radius: 12px; font-size: 1.2rem; }
  .status-line { font-size: 2rem; }
  .status-detail { font-size: 0.9rem; }
  .band-figs { margin: 20px -18px 0; }
  .band-figs > div { padding: 14px 16px 16px 18px; }
  .band-figs dd { font-size: 1.45rem; }
  main { gap: 14px; padding-top: 14px; }
  .col { gap: 14px; }
  main > section, #app > section, .col > section { padding: 18px 16px 20px; border-radius: 16px; }
  h2 { margin-bottom: 14px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
  .fig { padding: 12px 12px 12px; border-radius: 12px; }
  .value { font-size: 1.45rem; margin-top: 6px; }
  .detail { font-size: 0.74rem; }
  .spark { width: calc(100% + 24px); margin: 8px -12px -12px; height: 28px; }
  .panel, .trend { padding: 14px 12px; }
  .chart text { font-size: 11px; }
  .cal-grid { gap: 4px; }
  button.cal-day { min-height: 44px; padding: 5px 6px; border-radius: 9px; }
  .cal-num { font-size: 0.76rem; }
  .day-facts .value { font-size: 1.2rem; }
  .rows > div { padding: 9px 0; font-size: 0.9rem; }
  th, td { font-size: 0.82rem; }
  th.num { white-space: normal; padding-left: 8px; }
  td.num { padding-left: 8px; }
  td:first-child { overflow-wrap: anywhere; }
  .reply { padding: 14px; }
  .login { padding: 28px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---- the mode button and the text size controls (the size controls show only in Horace mode) ---- */
.text-size { align-items: center; gap: 6px; }
.text-size output { min-width: 3.6em; text-align: center; font: 800 0.95rem/1 var(--sans); }

/* ---- Horace mode: pure black and white, every word bold, thick borders, nothing faded, text size he can step ---- */
:root[data-theme="horace"] {
  color-scheme: dark;
  --bg: #000000; --card: #000000; --soft: #000000; --ink: #ffffff; --muted: #ffffff; --line: #ffffff; --line-strong: #ffffff;
  --accent: #8fd3ff; --accent-hover: #b9e4ff; --accent-soft: #000000; --accent-ink: #000000; --video: #4fe3d6; --ava: #ffad5c;
  --ok: #6dffa0; --warn: #ffd23f; --bad: #ff9a92; --ok-bg: #000000; --warn-bg: #000000; --bad-bg: #000000;
  --side: #000000; --side-ink: #ffffff; --side-muted: #ffffff; --side-line: #ffffff; --side-hover: #262626; --side-on: #ffffff; --side-icon: #ffffff;
  --shadow: none; --shadow-lift: none;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, "Segoe UI", sans-serif; --serif: var(--sans);
  --bw: 3px;
  font-size: calc(112.5% * var(--text-scale, 1));
}
@media (prefers-reduced-motion: no-preference) { :root[data-theme="horace"] { transition: font-size 0.2s ease; } }
:root[data-theme="horace"] body { font-size: 1.05rem; line-height: 1.55; -webkit-font-smoothing: auto; }
:root[data-theme="horace"] body * { font-weight: 700 !important; letter-spacing: 0 !important; }
:root[data-theme="horace"] h1, :root[data-theme="horace"] .status-line, :root[data-theme="horace"] .hist-line, :root[data-theme="horace"] .value, :root[data-theme="horace"] .band-figs dd { font-weight: 800 !important; }
:root[data-theme="horace"] *, :root[data-theme="horace"] *::before, :root[data-theme="horace"] *::after { box-shadow: none !important; text-shadow: none !important; }
:root[data-theme="horace"] .horace-only { display: inline-flex; }
/* no small print: labels, notes, table headings and captions are at least body size */
:root[data-theme="horace"] :is(.label, .detail, .sub, .band-figs dt, .band-figs dd small, .value small, h3, th, td, .legend, .cal-dow, .cal-note, .cal-legend, .chips > span, .trend-read, .trend-title, .status-detail li, .reply-meta, .reply-summary, .badge, .pill, .foot, .side-label, .side-link, .side-foot, .side-brand small, .hist-sub, .reasons-line) { font-size: 0.95rem; }

/* thick borders around every block */
:root[data-theme="horace"] main > section, :root[data-theme="horace"] #app > section, :root[data-theme="horace"] .col > section, :root[data-theme="horace"] .status, :root[data-theme="horace"] .login { border: 4px solid var(--line); }
:root[data-theme="horace"] .fig, :root[data-theme="horace"] .panel, :root[data-theme="horace"] .trend, :root[data-theme="horace"] .reply, :root[data-theme="horace"] .hist-body > .day { border: var(--bw) solid var(--line); }
:root[data-theme="horace"] .reply.review { border-color: var(--warn); border-left-width: 10px; }
:root[data-theme="horace"] .band-figs { background: var(--card); }

/* nothing faded: no washes, gradients, see-through marks or dimmed buttons */
:root[data-theme="horace"] .status, :root[data-theme="horace"] body.login-page { background: var(--bg); }
:root[data-theme="horace"] h2::before, :root[data-theme="horace"] .meter > i, :root[data-theme="horace"] .bar > i { background: var(--accent); }
:root[data-theme="horace"] .meter, :root[data-theme="horace"] .bar { height: 12px; background: var(--bg); border: 2px solid var(--ink); }
:root[data-theme="horace"] .spark-fill { opacity: 0; }
:root[data-theme="horace"] .spark-line { stroke-width: 3px; }
:root[data-theme="horace"] .trend .chart rect[data-i]:not(.on) { opacity: 1; }
:root[data-theme="horace"] .chart text { fill: var(--ink); font-size: 10px; }
/* one column of cards, so every card keeps the full width at any text size; tables wrap instead of running off the side */
@media (min-width: 1180px) { :root[data-theme="horace"] body:not(.login-page) main { grid-template-columns: minmax(0, 1fr); } :root[data-theme="horace"] .col { grid-column: 1 / -1; } }
:root[data-theme="horace"] th.num, :root[data-theme="horace"] td.num { white-space: normal; }
:root[data-theme="horace"] td:first-child, :root[data-theme="horace"] th:first-child { overflow-wrap: anywhere; }
:root[data-theme="horace"] .side-brand .brand-mark { filter: none; }
:root[data-theme="horace"] .side-dot { background: var(--ok); }
:root[data-theme="horace"] .side-link[aria-current="page"] { background: var(--ink); color: var(--bg); }
:root[data-theme="horace"] .side-link[aria-current="page"] svg { color: var(--bg); }
:root[data-theme="horace"] .side-sub .side-link.is-on { background: var(--side-hover); }
:root[data-theme="horace"] .side-sub .side-link svg { opacity: 1; }

/* buttons, links and focus you cannot miss */
:root[data-theme="horace"] button, :root[data-theme="horace"] a.navlink, :root[data-theme="horace"] .inbox-select { min-height: 48px; border: var(--bw) solid var(--ink); font-size: 0.95rem; }
:root[data-theme="horace"] button:hover:not(:disabled), :root[data-theme="horace"] a.navlink:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
:root[data-theme="horace"] button#refresh, :root[data-theme="horace"] .login button, :root[data-theme="horace"] button.chip-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
:root[data-theme="horace"] button:disabled { opacity: 1; color: var(--ink); border-style: dashed; background: var(--bg); }
:root[data-theme="horace"] :focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }
:root[data-theme="horace"] main a:not(.navlink), :root[data-theme="horace"] .foot a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
:root[data-theme="horace"] .top-right { flex-wrap: wrap; }

/* calendar, chips and badges: outlined in their colour, never a pale fill */
:root[data-theme="horace"] button.cal-day { background: var(--bg); border: 2px solid var(--line); }
:root[data-theme="horace"] button.cal-day.bad { background: var(--bg); border: var(--bw) solid var(--bad); }
:root[data-theme="horace"] button.cal-day.future { border-style: dashed; color: var(--ink); }
:root[data-theme="horace"] button.cal-day.sel { outline: 4px solid var(--accent); outline-offset: 2px; background: var(--bg); }
:root[data-theme="horace"] button.chip { background: var(--bg); color: var(--bad); border: var(--bw) solid var(--bad); }
:root[data-theme="horace"] .badge { background: var(--bg); color: var(--ink); border: 2px solid currentColor; }
:root[data-theme="horace"] .badge.intent-positive { color: var(--ok); }
:root[data-theme="horace"] .badge.intent-question { color: var(--warn); }
:root[data-theme="horace"] .badge.intent-opt_out { color: var(--bad); }
:root[data-theme="horace"] .pill, :root[data-theme="horace"] .status-detail li { background: var(--bg); border: 2px solid var(--line); }

@media (max-width: 600px) {
  :root[data-theme="horace"] .top-right { flex-wrap: wrap; }
  :root[data-theme="horace"] .top-right .text-size { width: 100%; }
  :root[data-theme="horace"] .top-right .text-size button { flex: 1 1 0; }
  :root[data-theme="horace"] body { font-size: 1rem; }
}

/* ---- Horace mode, the short version (2026-11-13): only what needs a decision. Light and Dark still show everything. ----
   Kept: the status card and its four figures, the bounce calendar with the day view, each section's big figures, the System rows.
   Hidden: logos, meters and sparklines, the Trends charts, the extra tables, lists, notes and the footer. */
:root[data-theme="horace"] .brand-mark, :root[data-theme="horace"] .foot,
:root[data-theme="horace"] .meter, :root[data-theme="horace"] .spark, :root[data-theme="horace"] .bar,
:root[data-theme="horace"] #history, :root[data-theme="horace"] .hist-sub, :root[data-theme="horace"] .chips,
:root[data-theme="horace"] #app section:not(#sec-system) > :not(h2):not(.stats-row):not(.keep),
:root[data-theme="horace"] #app .later, :root[data-theme="horace"] #app .fig .detail,
:root[data-theme="horace"] .reply-summary ~ .reply-snippet { display: none !important; }
:root[data-theme="horace"] body:not(.login-page) { display: block; }
:root[data-theme="horace"] #app .stats-row { margin-bottom: 0; }
:root[data-theme="horace"] .top-right a.navlink { display: none; }

/* Horace mode navigation bar: the sidebar links become one row of big outlined buttons across the top (kept in view on wide screens) */
:root[data-theme="horace"] .side { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; position: static; height: auto; overflow: visible;
  padding: 12px max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter))); background: var(--bg); border: 0; border-bottom: 4px solid var(--line); }
:root[data-theme="horace"] .side-brand, :root[data-theme="horace"] .side-label, :root[data-theme="horace"] .side-foot,
:root[data-theme="horace"] .side-link svg, :root[data-theme="horace"] .side a[href="/#history"] { display: none; }
:root[data-theme="horace"] .side-sub { display: contents; }
:root[data-theme="horace"] .side .side-link { min-height: 48px; padding: 8px 12px; border: var(--bw) solid var(--ink); border-radius: 12px; color: var(--ink); font-size: 1rem; }
:root[data-theme="horace"] .side .side-link:hover { background: var(--side-hover); }
:root[data-theme="horace"] .side-sub .side-link.is-on { background: var(--bg); }
:root[data-theme="horace"] .side-sub .side-link.is-on[aria-current="page"] { background: var(--ink); }
:root[data-theme="horace"] .side .side-link[aria-current="page"] { background: var(--ink); color: var(--bg); }
@media (min-width: 900px) {
  :root[data-theme="horace"] .side { position: sticky; top: 0; z-index: 30; }
  :root[data-theme="horace"] main > section, :root[data-theme="horace"] #app section { scroll-margin-top: 9rem; }
}

/* ---- switching modes: a short cross-fade (view.js; skipped when the computer asks for reduced motion) ---- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.4s; animation-timing-function: ease; }
html.mode-fade, html.mode-fade *, html.mode-fade *::before, html.mode-fade *::after { transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, fill 0.4s ease, stroke 0.4s ease !important; }

/* ---- Google Ads Transparency emails per day (in the Emails sent by offer card; shown in every mode) ---- */
.ads-days { margin: 4px 0 18px; }
.ads-table td.num { width: 45%; }
.ads-table td.num .bar { margin-top: 6px; }
.ads-table tr.weekend td { color: var(--muted); }
.ads-more summary { cursor: pointer; margin-top: 10px; font-weight: 600; }
:root[data-theme="horace"] .ads-table tr.weekend td { color: var(--ink); }
:root[data-theme="horace"] .ads-more summary { min-height: 48px; display: flex; align-items: center; text-decoration: underline; }

/* ---- Calls to Ava (full width, after the two columns; shown in every mode) ---- */
#sec-calls { grid-column: 1 / -1; }
.calls-table td.phone { white-space: nowrap; font-variant-numeric: tabular-nums; }
.calls-table td.unknown { color: var(--muted); }
:root[data-theme="horace"] .calls-table td.unknown { color: var(--ink); }
/* phones: each call as a small block with labels instead of four squeezed columns */
@media (max-width: 600px) {
  .calls-table, .calls-table tbody, .calls-table tr, .calls-table td { display: block; width: auto; }
  .calls-table tr:first-of-type { display: none; }
  .calls-table tr { padding: 10px 0; border-bottom: var(--bw) solid var(--line); }
  .calls-table td { border: 0; padding: 2px 0; text-align: left; }
  .calls-table td::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
  :root[data-theme="horace"] .calls-table td::before { color: var(--ink); }
}

/* ---- Update the Google AI Studio balance (System card; shown in every mode) ---- */
.gemini-update { margin-top: 14px; }
.gemini-form label { display: block; font-weight: 600; margin-bottom: 8px; }
.gemini-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gemini-row input { font: inherit; min-height: 42px; padding: 0 12px; width: 12em; max-width: 100%; border: var(--bw) solid var(--line-strong); border-radius: 11px; background: var(--card); color: var(--ink); }
.gemini-msg { margin: 8px 0 0; min-height: 1.2em; }
:root[data-theme="horace"] .gemini-row input { min-height: 48px; border-color: var(--ink); background: var(--bg); }
.gemini-update [hidden] { display: none !important; }

/* ---- Horace mode, one section at a time (app.js applyTab: the navigation bar buttons are tabs) ---- */
:root[data-theme="horace"] .tab-hidden { display: none !important; }
:root[data-theme="horace"] .col:not(:has(> section:not(.tab-hidden))) { display: none; }

/* ---- Horace mode navigation, grouped (2026-11-13) ----
   Wide screens: a left column with group headings (Results, Sending, Money and health) and big buttons stacked. The markup keeps the Light and Dark order;
   `order` arranges Horace's. At large text (class text-xl, 150% and up) the column would squeeze the page, so the bar goes back across the top (headings hidden).
   Phones: one big "Section: <name>" button (view.js) opens the list. */
.side-group, .side-toggle, .text-size-label, .tab-steps { display: none; }
:root[data-theme="horace"] .side > a.side-link[href="/"] { order: 1; }
:root[data-theme="horace"] .side-group.g1 { order: 2; }
:root[data-theme="horace"] .side a[href="/#bounces"] { order: 3; }
:root[data-theme="horace"] .side a[href="/#sec-replies"] { order: 4; }
:root[data-theme="horace"] .side a[href="/#sec-calls"] { order: 5; }
:root[data-theme="horace"] .side-group.g2 { order: 6; }
:root[data-theme="horace"] .side a[href="/#sec-outreach"] { order: 7; }
:root[data-theme="horace"] .side a[href="/#sec-offers"] { order: 8; }
:root[data-theme="horace"] .side a[href="/#sec-ads"] { order: 9; }
:root[data-theme="horace"] .side-group.g3 { order: 10; }
:root[data-theme="horace"] .side a[href="/#sec-revenue"] { order: 11; }
:root[data-theme="horace"] .side a[href="/#sec-system"] { order: 12; }
:root[data-theme="horace"] .side > p.side-label:nth-of-type(2) { order: 19; }
:root[data-theme="horace"] .side > a.side-link[href="/replies"] { order: 20; }
:root[data-theme="horace"] .side > a.side-link[href="/replies"]::after { content: " \2197"; }
:root[data-theme="horace"] .side > p.side-label:nth-of-type(1) { display: none; }
:root[data-theme="horace"] .side-group, :root[data-theme="horace"] .side > p.side-label:nth-of-type(2) { margin: 14px 4px 0; font: 800 0.95rem/1.2 var(--sans); letter-spacing: 0; color: var(--ink); }
:root[data-theme="horace"] .side > p.side-label:nth-of-type(2) { margin-top: 18px; padding-top: 16px; border-top: var(--bw) solid var(--line); }
:root[data-theme="horace"] .side .side-link { justify-content: flex-start; text-align: left; }
:root[data-theme="horace"] .side-toggle { min-height: 56px; width: 100%; justify-content: space-between; background: var(--ink); color: var(--bg); border: var(--bw) solid var(--ink); border-radius: 12px; font-size: 1.05rem; }

/* header controls: a label for the text size, space between the two groups */
:root[data-theme="horace"] .text-size-label { display: inline; font-weight: 800; margin-right: 4px; }
:root[data-theme="horace"] .top-right { column-gap: 28px; row-gap: 10px; }

/* Previous and Next at the bottom of each section */
:root[data-theme="horace"] .tab-steps { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
:root[data-theme="horace"] .tab-steps button { flex: 1 1 14rem; min-height: 56px; font-size: 1.05rem; background: var(--bg); color: var(--ink); }
:root[data-theme="horace"] .tab-steps button[hidden] { display: none; }
:root[data-theme="horace"] .tab-steps button#tab-next { background: var(--ink); color: var(--bg); }

@media (min-width: 900px) {
  :root[data-theme="horace"]:not(.text-xl) body:not(.login-page) { display: grid; grid-template-columns: clamp(260px, 22vw, 320px) minmax(0, 1fr); }
  :root[data-theme="horace"]:not(.text-xl) body:not(.login-page) > :not(.side) { grid-column: 2; min-width: 0; width: 100%; }
  :root[data-theme="horace"]:not(.text-xl) body:not(.login-page) > .skip { width: auto; }
  :root[data-theme="horace"]:not(.text-xl) .side { grid-column: 1; grid-row: 1 / span 6; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px;
    padding: 16px 14px 24px; border: 0; border-right: 4px solid var(--line); }
  :root[data-theme="horace"]:not(.text-xl) .side-group, :root[data-theme="horace"]:not(.text-xl) .side > p.side-label:nth-of-type(2) { display: block; }
  :root[data-theme="horace"]:not(.text-xl) main > section, :root[data-theme="horace"]:not(.text-xl) #app section { scroll-margin-top: 1rem; }
}
@media (max-width: 899px) {
  :root[data-theme="horace"] .side { flex-direction: column; flex-wrap: nowrap; align-items: stretch; padding: 10px var(--gutter); }
  :root[data-theme="horace"] .side-toggle { display: flex; }
  :root[data-theme="horace"] .side:not(.open) a.side-link, :root[data-theme="horace"] .side:not(.open) .side-group, :root[data-theme="horace"] .side:not(.open) > p.side-label { display: none; }
  :root[data-theme="horace"] .side.open .side-group, :root[data-theme="horace"] .side.open > p.side-label:nth-of-type(2) { display: block; }
  :root[data-theme="horace"] .side .side-link { flex: none; }
}

/* ---- while the first numbers are on their way (and there is no saved copy): two soft placeholder cards instead of a blank page ---- */
#app:empty::before, #app:empty::after { content: ""; display: block; height: 210px; border: var(--bw) solid var(--line); border-radius: var(--radius); background: linear-gradient(100deg, var(--soft) 30%, var(--card) 50%, var(--soft) 70%) 0 0 / 220% 100%; animation: skeleton 1.4s linear infinite; }
#app:empty::after { margin-top: 20px; height: 260px; }
@keyframes skeleton { from { background-position: 120% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { #app:empty::before, #app:empty::after { animation: none; } }
:root[data-theme="horace"] #app:empty::before, :root[data-theme="horace"] #app:empty::after { background: var(--bg); animation: none; border-width: 4px; }
