/* Dashboard: Light (default) or Dark. Tokens come from pricing.css; this file re-themes them.
   Switch with <html data-theme="light|dark">. */
:root {
  --d-fg2: #d8d8dc; --d-tint: rgba(255,255,255,.05); --d-tint2: rgba(255,255,255,.09);
  --panel: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 40%), var(--surface);
  --hi: var(--y1); --knob: #f6f0e6; --primary: #f6f0e6; --on-primary: #111;
  --soon-bg: rgba(255,200,40,.18); --soon-c: var(--y1); --over-bg: rgba(255,80,80,.18); --over-c: #ff9a9a;
  --bar-a: rgba(255,216,77,.85); --bar-b: rgba(255,122,47,.55);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f6f2; --surface: #ffffff; --text: #0b0b0b; --muted: #66665f;
  --line: rgba(11,11,11,.09); --line-2: rgba(11,11,11,.17);
  --nav-bg: rgba(247,246,242,.78); --hover-bg: rgba(11,11,11,.06);
  --d-fg2: #34342f; --d-tint: rgba(11,11,11,.04); --d-tint2: rgba(11,11,11,.08);
  --panel: #ffffff; --hi: #b06600; --knob: #ffffff; --primary: #0b0b0b; --on-primary: #f7f6f2;
  --soon-bg: rgba(255,184,0,.24); --soon-c: #7a4d00; --over-bg: rgba(220,50,40,.13); --over-c: #a8231b;
  --bar-a: #ffb400; --bar-b: #ff7a3a;
}
html[data-theme="light"] body {
  background: radial-gradient(900px 520px at 50% -10%, rgba(255,184,0,.16), transparent 62%), radial-gradient(700px 520px at 100% 28%, rgba(255,106,61,.07), transparent 62%), var(--bg);
}
html[data-theme="light"] .grain, html[data-theme="light"] .spot { display: none; }
html[data-theme="light"] .logo { color: var(--text); }

.dash { padding: clamp(120px, 15vw, 170px) 0 clamp(50px, 7vw, 90px); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.head-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eyebrow--l { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; text-align: left; }
.eyebrow--l i { display: block; width: 26px; height: 1px; background: var(--rainbow); }
.dh { margin: 0; font-size: clamp(3rem, 8.4vw, 6.4rem); font-weight: 700; line-height: .95; letter-spacing: -.055em; }
.goal-line { margin: 16px 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.7vw, 1.3rem); letter-spacing: -.02em; }
.goal-line b { color: var(--text); font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; background: var(--d-tint); border: 1px solid var(--line); color: var(--d-fg2); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--y2); box-shadow: 0 0 12px var(--y2); }
.status.live::before { background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.mute { color: var(--muted); font-size: .95rem; }

/* Light / Dark switch */
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--d-tint); border: 1px solid var(--line); }
.seg button { min-height: 40px; padding: 0 18px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: 600 14px var(--sans); cursor: pointer; transition: background .25s, color .25s; }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.seg button:focus-visible { outline: 2px solid var(--y2); outline-offset: 2px; }

.banner, .panel, .tile { background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
html[data-theme="light"] .banner, html[data-theme="light"] .panel, html[data-theme="light"] .tile { box-shadow: 0 1px 2px rgba(11,11,11,.04), 0 18px 40px -26px rgba(11,11,11,.18); }
.banner { border-radius: 26px; padding: 24px 26px; margin-bottom: 22px; border-color: rgba(255,184,0,.42); }
.banner h2 { margin: 0 0 8px; font-size: 1.5rem; letter-spacing: -.035em; }
.banner ol { margin: 8px 0 18px; padding-left: 1.2rem; color: var(--muted); }
.banner li { margin-bottom: 6px; }
.banner a { color: var(--hi); }
.banner code, .settings code { font-family: ui-monospace, Menlo, monospace; background: var(--d-tint2); border-radius: 8px; padding: 2px 8px; font-size: .88em; color: var(--text); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn-s { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--sans); letter-spacing: -.005em; color: var(--text); background: var(--d-tint); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 11px 20px; cursor: pointer; text-decoration: none; transition: transform .35s var(--spring), border-color .25s; }
.btn-s:hover { transform: translateY(-2px) scale(1.03); border-color: var(--text); }
.btn-s--ghost { background: transparent; }
.btn-s--y { color: #171100; border-color: transparent; background: linear-gradient(180deg, #ffe373, var(--y1) 40%, var(--y2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 26px -8px rgba(255,184,0,.55); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile { border-radius: 26px; padding: 24px 26px; }
.tile b { display: block; font-size: clamp(2.8rem, 5vw, 4rem); font-weight: 700; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { display: block; margin-top: 8px; color: var(--muted); font-size: .98rem; }
.tile:first-child b { color: var(--hi); }

.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 20px; }
.panel { border-radius: var(--r-card); padding: clamp(24px, 3vw, 36px); }
.panel--wide { margin-bottom: 20px; }
.panel h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.045em; line-height: 1; }
.sub-s { margin: 10px 0 26px; color: var(--muted); font-size: 1rem; }

.bars { display: flex; align-items: flex-end; gap: clamp(8px, 1.6vw, 18px); height: 210px; padding-top: 10px; }
.bars .col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.bars .bar { width: 100%; max-width: 56px; min-height: 4px; border-radius: 14px 14px 5px 5px; background: linear-gradient(180deg, var(--bar-a), var(--bar-b)); opacity: .82; }
.bars .col.today .bar { opacity: 1; box-shadow: 0 0 34px -4px rgba(255,150,0,.65); }
.bars .val { font-size: .85rem; font-weight: 700; color: var(--d-fg2); min-height: 1.2em; }
.bars .day { font-size: .82rem; color: var(--muted); }

.fb { display: grid; gap: 14px; }
.fb .r { display: grid; grid-template-columns: 150px 1fr 28px; gap: 12px; align-items: center; font-size: .96rem; color: var(--d-fg2); }
.fb .track { height: 12px; border-radius: 99px; background: var(--d-tint2); overflow: hidden; }
.fb .fbfill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff2e93, #ff2e93); }
.fb b { text-align: right; }
.insight { margin-top: 22px; padding: 16px 18px; border-radius: 18px; background: var(--d-tint); color: var(--d-fg2); font-size: 1rem; line-height: 1.45; }

.addnote { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
input[type="text"], input[type="datetime-local"], select { font: 500 15px var(--sans); color: var(--text); background: var(--d-tint); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 12px 18px; }
select option { background: var(--surface); color: var(--text); }
input[type="text"]:focus, input[type="datetime-local"]:focus, select:focus { outline: 2px solid #ff2e93; outline-offset: 2px; }
.addnote input[type="text"] { flex: 1; min-width: 200px; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.notes li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 20px; background: var(--d-tint); border: 1px solid var(--line); }
.notes li.done .t { text-decoration: line-through; color: var(--muted); }
.notes .t { flex: 1; word-break: break-word; }
.notes input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s, border-color .2s; }
.notes input[type="checkbox"]:checked { background: var(--y1); border-color: var(--y1); }
.notes input[type="checkbox"]:checked::after { content: ""; width: 6px; height: 11px; border: solid #1b1300; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.when { font-size: .78rem; font-weight: 700; letter-spacing: .04em; padding: 4px 12px; border-radius: var(--r-pill); background: var(--d-tint2); color: var(--d-fg2); white-space: nowrap; }
.when.soon { background: var(--soon-bg); color: var(--soon-c); }
.when.over { background: var(--over-bg); color: var(--over-c); }
.x { border: 0; background: none; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.x:hover { color: var(--text); }

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 30px 44px; }
.set { display: grid; gap: 10px; align-content: start; }
.set > .lab { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.set > .lab::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: linear-gradient(90deg,#ff2e93,#5fe0ff,#6dffa8,#ffe23d); }
.set .val { color: var(--text); letter-spacing: -.005em; text-transform: none; font-size: 14px; margin-left: auto; }
.set small { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.opts { display: flex; gap: 10px; flex-wrap: wrap; }
.opt { font: 600 15px var(--sans); color: var(--text); background: var(--d-tint); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 11px 20px; cursor: pointer; transition: transform .3s var(--spring), border-color .2s; }
.opt:hover { transform: translateY(-2px); border-color: var(--text); }
.opt.on { color: var(--on-primary); background: var(--primary); border-color: var(--primary); }
.pets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pet-t { text-align: center; font: inherit; color: var(--text); background: var(--d-tint); border: 1px solid var(--line); border-radius: 22px; padding: 12px 8px 14px; cursor: pointer; transition: transform .35s var(--spring), border-color .25s, box-shadow .3s; }
.pet-t:hover { transform: translateY(-3px); }
.pet-t.on { border-color: #ff2e93; box-shadow: 0 0 0 1px #ff2e93, 0 20px 40px -20px rgba(255,46,147,.5); background: rgba(255,46,147,.08); }
.pet-t .pet { display: block; width: 76px; height: 76px; margin: 0 auto 6px; }
.pet-t .pet img { overflow: visible; overflow-clip-margin: 40px; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)) drop-shadow(0 8px 8px rgba(0,0,0,.22)); }
.pet-t .pet span { font-size: 56px; line-height: 76px; display: block; }
.pet-t b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.1rem; }
.pet-t em { display: block; font-style: normal; color: var(--muted); font-size: .78rem; line-height: 1.3; margin-top: 2px; }

.sw { display: flex; align-items: center; gap: 14px; cursor: pointer; font-weight: 500; font-size: 1rem; color: var(--d-fg2); }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw i { position: relative; flex: none; width: 52px; height: 30px; border-radius: 99px; background: var(--d-tint2); border: 1px solid var(--line-2); transition: background .25s; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--knob); box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .35s var(--spring); }
.sw input:checked + i { background: #ff2e93; border-color: #ff2e93; }
.sw input:checked + i::after { transform: translateX(22px); }
.sw input:focus-visible + i { outline: 2px solid var(--y2); outline-offset: 3px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 99px; background: var(--d-tint2); border: 1px solid var(--line); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--knob); border: 1px solid var(--line-2); box-shadow: 0 3px 10px rgba(0,0,0,.4); cursor: pointer; }
input[type="range"]:focus-visible { outline: 2px solid var(--y2); outline-offset: 4px; }

@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .fb .r { grid-template-columns: 120px 1fr 26px; } }
@media (max-width: 640px) { .pets { grid-template-columns: 1fr 1fr 1fr; } .pet-t em { display: none; } .dash { padding-top: 104px; } }


/* ============ flat pass: no cards, homepage paper, homepage fonts only ============ */
html[data-theme="light"] { --bg: #fcfcfa; --surface: transparent; }
html[data-theme="dark"] { --surface: transparent; }
body, html[data-theme="light"] body { background: var(--bg); }
.dh, .panel h2, .banner h2, .tile b, .bars .val { font-family: var(--display); font-weight: 400; letter-spacing: -.015em; }
.dh { line-height: .92; }
.panel h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.tile b { font-size: clamp(2.6rem, 5vw, 4.2rem); }
.banner, .panel, .tile, html[data-theme="light"] .banner, html[data-theme="light"] .panel, html[data-theme="light"] .tile {
  background: none; box-shadow: none; border: 0; border-radius: 0; padding-left: 0; padding-right: 0; }
.banner { border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding-top: 22px; padding-bottom: 22px; margin-bottom: 30px; }
.tiles { gap: 0 28px; margin-bottom: 8px; }
.tile { border-top: 1px solid var(--line-2); padding-top: 20px; padding-bottom: 24px; }
.tile:first-child b { color: var(--text); }
.cols { gap: 0 clamp(28px, 5vw, 80px); }
.panel, .panel--wide { border-top: 1px solid var(--line-2); padding-top: 28px; padding-bottom: 40px; margin-bottom: 0; }
.bars .bar { border-radius: 2px 2px 0 0; background: var(--text); opacity: .16; box-shadow: none; }
.bars .col.today .bar { opacity: 1; box-shadow: none; background: var(--text); }
.fb .track { height: 3px; background: var(--line-2); }
.fb .fbfill { background: var(--text); height: 3px; }
.insight { background: none; padding: 0; border-radius: 0; margin-top: 22px; color: var(--muted); font-size: 1.05rem; }
.notes { gap: 0; }
.notes li { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; }
.notes li:first-child { border-top: 1px solid var(--line); }
.when, .when.soon, .when.over { background: none; padding: 0; border-radius: 0; color: var(--muted); font-weight: 600; }
.when.soon { color: var(--text); } .when.over { color: var(--over-c); }
.x { text-decoration: underline; text-underline-offset: 4px; font: 500 .9rem var(--sans); }
.insight, .status { border-radius: 0; }
.status { background: none; border: 0; padding: 0; color: var(--muted); }
.notes input[type="checkbox"]:checked { background: var(--text); border-color: var(--text); }
.notes input[type="checkbox"]:checked::after { border-color: var(--bg); }
.btn-s--y { background: var(--text); color: var(--bg); box-shadow: none; }
.pets { gap: 24px; }
.pet-t, .pet-t.on { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 6px 4px 10px; position: relative; }
.pet-t::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 0; height: 2px; background: var(--text); transform: scaleX(0); transition: transform .35s var(--spring); }
.pet-t.on::after { transform: scaleX(1); }
.pet-t:hover { transform: translateY(-3px); }
.set > .lab::before, .eyebrow--l i { height: 2px; background: var(--text); }
.sw input:checked + i { background: var(--text); border-color: var(--text); }
.sw i::after { background: var(--bg); box-shadow: none; }
.sw input:checked + i::after { background: var(--bg); }
input[type="range"]::-webkit-slider-thumb { background: var(--text); border: 0; box-shadow: none; }
.opt.on { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (max-width: 900px) { .cols .panel:first-child { padding-bottom: 8px; } }
