/* Batch 1 (2026-10-23): cycle cost card, dose outcome buttons, provider report modal, help link.
   Colours are chosen for >=4.5:1 text contrast in both themes. */
:root{
  --b1-taken-bg:#4dedaa; --b1-taken-ink:#04140c;
  --b1-btn-bg:#17301f; --b1-btn-ink:#f5fbf8; --b1-btn-border:#6f9781;
  --b1-skip-ink:#fcd34d; --b1-miss-ink:#fca5a5;
  --b1-bar-logged:#4dedaa; --b1-bar-projected:rgba(77,237,170,.34);
  --b1-note:#d6e6dd;
}
[data-theme="light"]{
  --b1-taken-bg:#0b7a55; --b1-taken-ink:#ffffff;
  --b1-btn-bg:#ffffff; --b1-btn-ink:#122019; --b1-btn-border:#8fa89b;
  --b1-skip-ink:#7a4a00; --b1-miss-ink:#a12a1d;
  --b1-bar-logged:#0b7a55; --b1-bar-projected:rgba(11,122,85,.30);
  --b1-note:#4a6357;
}

/* ---- Cycle cost card ---- */
.cycle-cost-card{margin-top:16px;}
.cycle-cost-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.cycle-cost-card-kicker{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--text-dim);}
.cycle-cost-card-title{margin:2px 0 0;font-size:18px;font-weight:800;color:var(--text);}
.cost-card-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.cost-card-figure{background:var(--surface-1);border:1px solid var(--border);border-radius:12px;padding:12px;min-width:0;}
.cost-card-figure-label{font-size:12px;font-weight:700;color:var(--text-dim);}
.cost-card-figure-value{font-size:26px;font-weight:800;color:var(--text);margin-top:4px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cost-card-figure-sub{font-size:12px;color:var(--b1-note);margin-top:2px;}
.cost-card-chart-wrap{margin-top:12px;}
.cost-spend-chart{width:100%;height:120px;display:block;overflow:visible;}
.cost-bar-logged{fill:var(--b1-bar-logged);}
.cost-bar-projected{fill:var(--b1-bar-projected);stroke:var(--b1-bar-logged);stroke-width:1;stroke-dasharray:3 2;}
.cost-bar-label{fill:var(--text-dim);font-size:9.5px;font-weight:600;}
.cost-chart-base{stroke:var(--chart-grid);stroke-width:1;}
.cost-chart-split{stroke:var(--chart-dose-line);stroke-width:1;stroke-dasharray:2 3;}
.cost-card-legend{display:flex;gap:14px;font-size:12px;color:var(--text-dim);margin-top:6px;}
.cost-card-legend span{display:inline-flex;align-items:center;gap:6px;}
.cost-swatch{display:inline-block;width:12px;height:12px;border-radius:3px;}
.cost-swatch.logged{background:var(--b1-bar-logged);}
.cost-swatch.projected{background:var(--b1-bar-projected);border:1px dashed var(--b1-bar-logged);}
.cost-card-rows{margin-top:10px;display:grid;gap:6px;}
.cost-card-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.3fr);gap:8px;font-size:13px;color:var(--text);padding:6px 0;border-top:1px solid var(--border);}
.cost-card-row-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cost-card-note{font-size:12px;color:var(--b1-note);margin-top:8px;}
.cost-card-empty{padding:6px 0 2px;}
.cost-card-empty-title{font-weight:800;font-size:15px;color:var(--text);}
.cost-card-empty p{margin:6px 0 12px;font-size:13px;color:var(--text-dim);max-width:560px;}
@media (max-width:640px){
  .cost-card-figures{grid-template-columns:1fr 1fr;}
  .cost-card-figure:last-child{grid-column:1 / -1;}
  .cost-card-figure-value{font-size:22px;}
  .cost-card-row{grid-template-columns:1fr;gap:2px;}
}

/* ---- Dose outcome buttons ---- */
.dose-outcome-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.dose-outcome-btn{appearance:none;border:1px solid var(--b1-btn-border);background:var(--b1-btn-bg);color:var(--b1-btn-ink);font:inherit;font-size:12px;font-weight:700;line-height:1;padding:8px 10px;border-radius:9px;cursor:pointer;min-height:32px;}
.dose-outcome-btn:hover{filter:brightness(1.08);}
.dose-outcome-btn:focus-visible{outline:2px solid var(--b1-taken-bg);outline-offset:2px;}
.dose-outcome-btn.taken{background:var(--b1-taken-bg);color:var(--b1-taken-ink);border-color:var(--b1-taken-bg);}
.dose-outcome-btn.skipped{color:var(--b1-skip-ink);}
.dose-outcome-btn.missed{color:var(--b1-miss-ink);}
.dose-outcome-btn.undo{text-decoration:underline;text-underline-offset:2px;}
.today-dose.done{opacity:1;}
.today-dose.done .today-dose-name{color:var(--text-dim);}
@media (max-width:640px){
  .today-dose{grid-template-columns:4px minmax(0,1fr) !important;}
  .today-dose .today-dose-action{grid-column:2;justify-content:flex-start;}
  .dose-outcome-group{justify-content:flex-start;}
  .dose-outcome-btn{min-height:36px;padding:9px 12px;}
}

/* ---- Provider report modal ---- */
.provider-report-intro{font-size:14px;margin:6px 0 12px;}
.provider-report-presets{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
.chip-btn{appearance:none;border:1px solid var(--b1-btn-border);background:var(--b1-btn-bg);color:var(--b1-btn-ink);font:inherit;font-size:13px;font-weight:700;padding:7px 12px;border-radius:999px;cursor:pointer;}
.chip-btn.active{background:var(--b1-taken-bg);color:var(--b1-taken-ink);border-color:var(--b1-taken-bg);}
.provider-report-dates{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.provider-report-dates label{display:grid;gap:4px;font-size:12px;font-weight:700;color:var(--text-dim);}
.provider-report-tier-note{font-size:13px;color:var(--text);margin:12px 0 4px;}
.provider-report-footnote{font-size:12px;color:var(--b1-note);margin:4px 0 0;}
.provider-report-status{font-size:13px;color:var(--text);margin-top:10px;min-height:1em;}
.cost-spend-chart{height:100px;}
.cost-bar-projected{vector-effect:non-scaling-stroke;}
.cost-chart-labels{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;margin-top:4px;font-size:11px;font-weight:600;color:var(--text-dim);text-align:center;}
.cost-chart-labels span{white-space:nowrap;overflow:hidden;text-overflow:clip;}
@media (max-width:640px){.cost-chart-labels{font-size:10px;gap:2px;}}

/* Mobile Home cards are always light surfaces (both themes), so pin the light palette inside them. */
.mobile-home-card{
  --b1-taken-bg:#0b7a55; --b1-taken-ink:#ffffff;
  --b1-btn-bg:#ffffff; --b1-btn-ink:#122019; --b1-btn-border:#8fa89b;
  --b1-skip-ink:#7a4a00; --b1-miss-ink:#a12a1d;
  --b1-bar-logged:#0b7a55; --b1-bar-projected:rgba(11,122,85,.30);
  --b1-note:#4a6357;
}
.home-cost-card{--text:#122019;--text-dim:#4a6357;--surface-1:#f0f5f2;--border:#d7e5dd;--chart-grid:rgba(15,157,110,.18);--chart-dose-line:rgba(20,45,35,.28);color:#122019;}
.home-cost-card .btn.small{background:#0b7a55;color:#fff;}

/* ---- Landing (shorter layout) ---- */
.hero-shot{position:relative;margin:8px auto 10px;max-width:1080px;padding:0;}
.hero-shot img{display:block;width:100%;height:auto;border-radius:16px;border:1px solid var(--border);box-shadow:0 18px 50px var(--shadow);}
.hero-shot-badge{position:absolute;top:12px;left:12px;z-index:2;background:#122019;color:#ffffff;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:6px 10px;border-radius:999px;}
.hero-shot figcaption{font-size:13px;color:var(--text-dim);text-align:center;margin-top:10px;}
.benefit-grid.benefit-grid-three{grid-template-columns:repeat(3,minmax(0,1fr));}
@media(max-width:900px){.benefit-grid.benefit-grid-three{grid-template-columns:1fr;}}
.landing-help-link{text-align:center;margin:18px 0 0;font-size:14px;}
.landing-help-link a{color:var(--text);font-weight:700;text-decoration:underline;text-underline-offset:3px;}
.trust-row{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:1080px;margin:4px auto 30px;padding:0 4px;}
.trust-chip{display:inline-block;border:1px solid var(--border);background:var(--panel);color:var(--text);font-size:13px;padding:8px 14px;border-radius:999px;}
.trust-chip b{font-weight:800;}

/* Status pills next to Undo: explicit colours so they keep >=4.5:1 on every surface. */
:root{--b1-ok-ink:#86efac;--b1-ok-bg:rgba(74,222,128,.13);--b1-warn-bg:rgba(251,191,36,.13);--b1-bad-bg:rgba(248,113,113,.13);}
[data-theme="light"],.mobile-home-card{--b1-ok-ink:#0b5a3f;--b1-ok-bg:#dff3ea;--b1-warn-bg:#fbefd5;--b1-bad-bg:#fbe3e0;}
.dose-outcome-status.ok{color:var(--b1-ok-ink)!important;background:var(--b1-ok-bg)!important;}
.dose-outcome-status.warn{color:var(--b1-skip-ink)!important;background:var(--b1-warn-bg)!important;}
.dose-outcome-status.bad{color:var(--b1-miss-ink)!important;background:var(--b1-bad-bg)!important;}

/* Contrast fixes (audit): labels use an explicit tone rather than --text-dim. */
:root{--b1-label:#d6e6dd;}
[data-theme="light"]{--b1-label:#4a6357;}
.mobile-home-card{--b1-label:#4a6357;}
.cost-card-figure-label,.cycle-cost-card-kicker,.cost-card-legend,.cost-chart-labels,.provider-report-dates label{color:var(--b1-label);}
#provider-report-modal .provider-report-intro{color:var(--b1-note)!important;}
#provider-report-modal .provider-report-dates input{background:var(--surface-1)!important;color:var(--text)!important;border:1px solid var(--b1-btn-border)!important;color-scheme:dark;}
[data-theme="light"] #provider-report-modal .provider-report-dates input{color-scheme:light;}
.home-cost-card .mobile-card-link{color:#0b7a55!important;}
.hero-shot figcaption{color:var(--text);opacity:.86;}
