:root{color-scheme:dark;--bg:#151120;--side:#191423;--card:#1e1a27;--line:#352d41;--muted:#b6acc1;--text:#f4edf9;--purple:#c2a0f4;--green:#8be1bb;--red:#ffa1af;--amber:#ffd28b;--blue:#9aceff;--deep:#2d2142;font:15px/1.47 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);min-width:320px}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--purple);outline-offset:3px}a{color:var(--purple);text-decoration:none}button{border:0;background:none;color:inherit}i[data-icon],.logo{width:19px;height:19px;display:inline-grid;place-items:center;flex:none}svg{width:100%;height:100%;display:block}.sidebar{position:fixed;inset:0 auto 0 0;width:213px;background:var(--side);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:25px 14px 15px;z-index:5}.brand{display:flex;align-items:center;gap:11px;color:var(--text);font-size:21px;font-weight:750;line-height:1.15;margin:2px 8px 35px;letter-spacing:-.04em}.brand small{display:block;font-size:9px;letter-spacing:.13em;color:var(--muted);margin-top:4px}.logo,.avatar{width:37px;height:37px;border-radius:11px;background:#3c2560;color:#dfcaff;padding:8px}.navlink{display:flex;align-items:center;gap:11px;padding:11px 12px;border-radius:8px;color:var(--muted);text-align:left;width:100%;margin:2px 0;white-space:nowrap}.navlink:hover,.navlink.active{color:#e8d8ff;background:#312044}.navlink.active{box-shadow:inset 2px 0 var(--purple)}.sidefoot{margin-top:auto}.account{border-top:1px solid var(--line);display:flex;align-items:center;gap:10px;margin-top:13px;padding:15px 7px 0}.account small{display:block;color:var(--muted);font-size:12px}.avatar{display:grid;place-items:center;font-weight:750}.shell{margin-left:213px}.ticker{position:sticky;top:0;z-index:4;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#1c1528f5;border-bottom:1px solid var(--line);min-height:54px;backdrop-filter:blur(14px)}.ticker button{display:flex;align-items:center;gap:9px;overflow:hidden;padding:0 15px;text-align:left;white-space:nowrap}.ticker button+button{border-left:1px solid var(--line)}.ticker i{color:var(--purple)}.ticker-detail{color:var(--muted);overflow:hidden;text-overflow:ellipsis;font-size:13px}.market-pill{color:var(--purple);background:#3b2364;border-radius:6px;padding:2px 7px;white-space:nowrap}main{padding:33px 34px 42px;max-width:1540px;margin:auto}.heading{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:23px}h1,h2,h3,p{margin:0}h1{font-size:clamp(31px,4vw,46px);letter-spacing:-.052em;line-height:1.04}h2{font-size:18px;line-height:1.2;letter-spacing:-.025em}h3{font-size:16px}p,.muted{color:var(--muted)}.heading p{margin-top:7px}.preview{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#ded0f7;background:#302440;border:1px solid #4d3965;border-radius:30px;padding:5px 10px;white-space:nowrap}.preview:before{content:"";width:6px;height:6px;border-radius:50%;background:#c2a0f4}.hero{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:14px;margin-bottom:14px}.grid{display:grid;grid-template-columns:minmax(0,1.58fr) minmax(0,1fr);gap:14px;align-items:start}.stack{display:grid;gap:14px;min-width:0}.card{min-width:0;overflow:hidden;padding:18px;background:var(--card);border:1px solid var(--line);border-radius:13px}.cardhead{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px}.cardhead>span:first-child,.cardhead>div:first-child{display:flex;align-items:center;gap:8px}.cardhead i,.action i{color:var(--purple)}.cardhead button{color:var(--purple);margin:-5px;padding:6px;font-size:13px}.weather{background:radial-gradient(ellipse at 95% 0,#3c225c,transparent 65%),var(--card)}.temperature{font-size:42px;line-height:1.05;font-weight:700;letter-spacing:-.055em}.weather-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.weather-top>i{width:40px;height:40px;color:#d5bfff}.forecast{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);margin-top:14px;padding-top:10px;text-align:center}.forecast small,.metric small{display:block;color:var(--muted)}.metric{font-size:29px;font-weight:710;letter-spacing:-.045em;line-height:1.18}.meter{height:6px;border-radius:10px;background:#3b2d50;overflow:hidden;margin:11px 0}.meter span{display:block;height:100%;background:linear-gradient(90deg,#8246d6,#bf97f4);border-radius:inherit}.primary,.secondary,.danger{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:38px;padding:7px 12px;border-radius:8px;font-weight:650}.primary{background:#c2a0f4;color:#241434}.primary:hover{background:#ddc4ff}.secondary{background:#332547;color:#e2d1fa;border:1px solid #48345e}.danger{color:var(--red);background:#422738}.compact{min-height:32px;padding:4px 9px;font-size:13px}.rows{display:grid}.row{display:flex;align-items:center;gap:10px;width:100%;min-width:0;text-align:left;padding:10px 0;border-top:1px solid var(--line)}.row:first-child{border-top:0}.row>div{min-width:0}.row .grow,.grow{flex:1}.row small{display:block;color:var(--muted);font-size:12px}.row button:last-child{margin-left:auto}.badge,.symbol{display:inline-grid;place-items:center;min-width:33px;height:33px;border-radius:8px;background:#382a50;color:var(--purple);flex:none;font-weight:700}.symbol{font-size:12px;min-width:37px}.row .value{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}.green{color:var(--green)}.red{color:var(--red)}.amber{color:var(--amber)}.blue{color:var(--blue)}.accent{color:var(--purple)}.chart{width:100%;height:145px;margin:10px 0 4px;display:block}.chartlabels{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-bottom:7px}.market-summary{display:flex;align-items:end;justify-content:space-between;gap:8px}.quicklinks{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.action{display:grid;justify-items:start;gap:6px;background:#2b203a;color:var(--text);border:1px solid #3c2d51;border-radius:8px;padding:9px;text-align:left}.action:hover{background:#38294b}.action strong{font-size:13px}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.formgrid label{display:grid;gap:4px}.formgrid .wide{grid-column:1/-1}input:not([type=checkbox]),select{width:100%;min-height:42px;background:#171121;border:1px solid #49375f;border-radius:7px;padding:7px 9px;color:var(--text)}input[type=checkbox]{accent-color:#ba94f3;width:19px;height:19px;flex:none}.fieldcheck{display:flex;align-items:center;gap:7px;margin:8px 0}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.toolbar button[aria-pressed=true]{border-color:var(--purple);color:var(--purple)}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left}th,td{padding:8px;border-bottom:1px solid var(--line);white-space:nowrap}th{color:var(--muted)}dialog{width:min(520px,calc(100% - 26px));max-height:85vh;color:var(--text);background:var(--card);border:1px solid #5b4375;border-radius:14px;padding:20px}dialog::backdrop{background:#08050ccc}.dialoghead{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.dialoghead button{font-size:22px}.off{opacity:.55}.complete{text-decoration:line-through}.image{width:38px;height:38px;border-radius:8px;object-fit:cover}#toast{position:fixed;z-index:15;right:17px;bottom:18px;padding:10px 14px;background:#493465;color:white;border-radius:8px;pointer-events:none;opacity:0;transition:opacity .15s}#toast.show{opacity:1}.ticker-detail.changed{animation:reveal .25s ease-out}@keyframes reveal{from{opacity:.3;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:1050px){main{padding:25px 18px}.sidebar{width:171px}.shell{margin-left:171px}.card{padding:14px}.ticker button{padding:0 9px;gap:5px}}
@media(max-width:760px){.sidebar{top:auto;left:0;right:0;width:auto;padding:4px 4px max(4px,env(safe-area-inset-bottom));border:0;border-top:1px solid var(--line)}.sidebar nav{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.navlink{font-size:10px;flex-direction:column;gap:3px;padding:6px 0;margin:0;text-align:center}.navlink.active{box-shadow:inset 0 -2px var(--purple)}.brand,.sidefoot,.ticker-detail{display:none}.shell{margin:0}.ticker{min-height:43px;padding-top:env(safe-area-inset-top)}.ticker button{justify-content:center;font-size:12px}.ticker i{width:15px;height:15px}.ticker strong{overflow:hidden;text-overflow:ellipsis}main{padding:23px 13px calc(85px + env(safe-area-inset-bottom))}.hero{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.weather{grid-column:1/-1}.grid{grid-template-columns:1fr;gap:9px}.stack{gap:9px}.heading{align-items:flex-start;margin-bottom:17px}.heading p{font-size:13px}#toast{bottom:72px}.cardhead{margin-bottom:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Dashboard */
.sidebar .brand {
  margin: 1px 10px 25px;
  font-size: 23px;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -.055em;
}
.heading { margin-bottom: 18px; }
h1 { font-size: clamp(28px, 3.2vw, 39px); }
.card { border-radius: 9px; }
.cardhead i { color: #b99be5; }
.weather { background: var(--card); }
.preview {
  background: transparent;
  border-color: var(--line);
  border-radius: 6px;
  color: var(--muted);
}
.preview::before { display: none; }
.hub-overview {
  display: grid;
  grid-template-columns: minmax(0,1.58fr) minmax(0,1fr);
  gap: 14px;
  margin-bottom: 14px;
  align-items: stretch;
}
.agenda-card .cardhead { margin-bottom: 6px; }
.agenda-card .row { padding: 7px 0; }
.agenda-card .badge {
  width: 27px;
  min-width: 27px;
  height: 27px;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}
.checklist-metric { font-size: 25px; }
.checklist-action { margin-top: 14px; }
.action {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 7px;
  background: transparent;
  border-color: var(--line);
  border-radius: 6px;
}
.action:hover { background: #2a2235; }
.action i { color: #b99be5; }
.symbol { background: #2b2337; border-radius: 5px; }

/* Persistent ticker */
.ticker {
  min-height: 57px;
  background: #1a1521f2;
}
.ticker .ticker-lane {
  display: grid;
  align-content: center;
  justify-content: stretch;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 7px 14px;
  min-width: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ticker-lane:focus-visible { outline-offset: -2px; }
.ticker-anchor {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.15;
  min-width: 0;
}
.ticker-anchor i { width: 15px; height: 15px; }
.ticker-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}
.ticker .market-pill {
  color: #dcbeff;
  background: #3b2755;
  padding: 2px 5px;
  border-radius: 4px;
}
.ticker-window {
  display: block;
  width: 100%;
  height: 16px;
  overflow: hidden;
  line-height: 16px;
  font-size: 12px;
  color: var(--muted);
}
.ticker .ticker-detail {
  display: block;
  color: inherit;
  font-size: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-detail[data-tone=up] { color: var(--green); }
.ticker-detail[data-tone=down] { color: var(--red); }
.ticker-track, .ticker-group {
  display: inline-flex;
  width: max-content;
  white-space: nowrap;
}
.ticker-track { animation: forecast-scroll 18s linear infinite; }
.ticker-group { gap: 15px; padding-inline-end: 15px; }
.ticker-window:has(.ticker-track) {
  mask-image: linear-gradient(90deg,#000 0%,#000 84%,transparent);
}
.ticker-lane:focus-visible .ticker-track { animation-play-state: paused; }
@media(hover:hover) and (pointer:fine){
  .ticker-lane:hover .ticker-track { animation-play-state: paused; }
}
@keyframes forecast-scroll { to { transform: translateX(-50%); } }

@media(max-width:760px) {
  .sidebar .brand { display: none; }
  .ticker { min-height: 50px; }
  .ticker .ticker-lane { padding: 5px 7px; gap: 2px; font-size: 12px; }
  .ticker-anchor { gap: 4px; }
  .ticker-anchor i { width: 13px; height: 13px; }
  .ticker-label { font-size: 10px; }
  .ticker-window { height: 14px; line-height: 14px; font-size: 11px; }
  .hub-overview { grid-template-columns: 1fr; gap: 9px; margin-bottom: 9px; }
  .heading { margin-bottom: 12px; }
}
@media(max-width:360px) {
  .ticker .ticker-lane { padding-inline: 5px; }
  #ticker-stock { font-size: 10px; }
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
.grocery-page { max-width: 810px; margin-inline: auto; }
.grocery-title,.grocery-controls,.grocery-tools,.grocery-selectors,.grocery-tabs {
  display:flex; align-items:center; gap:8px;
}
.grocery-title,.grocery-controls { justify-content:space-between; }
.grocery-title { margin-bottom: 12px; }
.grocery-controls { flex-wrap:wrap; margin-bottom:12px; }
.grocery-selectors label { min-width:0; }
.grocery-selectors select { min-height:38px; max-width:225px; font-size:13px; }
.grocery-tabs button {
  color:var(--muted); padding:8px 10px; border-bottom:2px solid transparent;
  white-space:nowrap;
}
.grocery-tabs button[aria-pressed=true] { color:var(--text); border-color:var(--purple); }
.grocery-icon {
  display:inline-grid; place-items:center; width:42px; height:42px;
  border:1px solid var(--line); border-radius:7px; color:var(--muted);
}
.grocery-icon[aria-pressed=true] { color:var(--purple); border-color:var(--purple); }
.grocery-plus { background:var(--purple); color:#241434; border-color:transparent; }
.grocery-inline {
  display:flex; gap:8px; margin-bottom:12px;
}
.grocery-inline input { flex:1; min-width:0; font-size:16px; }
.grocery-inline button { min-width:58px; }
.grocery-sheet { border:1px solid var(--line); border-radius:9px; overflow:hidden; }
.grocery-group,.grocery-done { background:var(--card); }
.grocery-group+.grocery-group,.grocery-done { border-top:1px solid var(--line); }
.grocery-group h2,.grocery-done summary {
  background:#241d30; color:var(--muted); padding:8px 13px; font-size:13px;
  letter-spacing:0; font-weight:650;
}
.grocery-done summary { cursor:pointer; }
.grocery-sheet ul { list-style:none; margin:0; padding:0 10px; }
.grocery-row { display:flex; align-items:center; gap:6px; min-height:48px; }
.grocery-row+.grocery-row { border-top:1px solid var(--line); }
.grocery-box {
  display:grid; place-items:center; flex:none; margin-inline:2px;
  width:34px; height:40px; color:var(--green); position:relative;
}
.grocery-box::before {
  content:""; position:absolute; width:19px; height:19px;
  border:1px solid #766785; border-radius:4px;
}
.grocery-box[aria-pressed=true]::before { border-color:var(--green); }
.grocery-item {
  display:flex; align-items:center; gap:8px; flex:1; min-width:0; min-height:42px;
  text-align:left; padding:5px 2px;
}
.grocery-item>span:not(.grocery-dot):not(.sr-only) {
  color:var(--text); overflow-wrap:anywhere; font-weight:540;
}
.grocery-picked .grocery-item>span:not(.grocery-dot):not(.sr-only) {
  color:var(--muted); text-decoration:line-through;
}
.grocery-dot { width:7px; height:7px; flex:none; border-radius:50%; background:currentColor; }
.grocery-thumb { flex:none; width:27px; height:27px; object-fit:cover; border-radius:4px; }
.stock-mark { font-size:17px; font-weight:750; padding-inline:2px; }
.grocery-find { padding:4px 7px; min-height:38px; color:var(--purple); font-size:12px; white-space:nowrap; }
.grocery-find:hover { background:#312440; border-radius:5px; }
.grocery-remove { color:var(--red); width:37px; height:36px; border-color:transparent; }
.grocery-empty { padding:15px; }
.grocery-empty button { margin-left:8px; }
.grocery-lookup { display:grid; gap:12px; }
.grocery-lookup .secondary { justify-self:start; }
@media(max-width:520px) {
  .grocery-controls { gap:6px; }
  .grocery-selectors { width:100%; }
  .grocery-selectors label:first-child { flex:0 1 37%; }
  .grocery-selectors label:last-child { flex:1; }
  .grocery-selectors select { max-width:none; }
  .grocery-sheet ul { padding-inline:6px; }
  .grocery-row { gap:4px; }
  .grocery-find { padding-inline:5px; }
}

.food-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(240px,1fr); gap:14px; align-items:start; }
.food-search { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) auto; gap:9px; align-items:end; }
.food-search label { display:grid; min-width:0; gap:4px; font-size:13px; }
.food-search input { font-size:16px; }
.food-search button { min-height:42px; }
.food-results { display:grid; gap:15px; }
.food-results section,.food-location-options { background:var(--card); border:1px solid var(--line); border-radius:9px; padding:15px; }
.food-results h2,.food-location-options h2 { margin-bottom:7px; }
.food-location-options button { margin:4px 6px 0 0; }
.food-location strong { color:var(--text); }
.food-result-list { display:grid; padding:0; margin:7px 0 0; list-style:none; }
.food-result { min-width:0; padding:11px 0; border-top:1px solid var(--line); }
.food-result-title { display:flex; gap:6px; align-items:center; }
.food-result-title h3 { flex:1; overflow-wrap:anywhere; }
.food-result p { overflow-wrap:anywhere; }
.food-result small,.food-source { display:block; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.food-source { margin-top:10px; }
.food-star { min-width:38px; min-height:34px; color:var(--muted); font-size:22px; }
.food-star.active { color:var(--amber); }
.food-result-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }
@media(max-width:820px){.food-layout{grid-template-columns:1fr}}
@media(max-width:520px){.food-search{grid-template-columns:1fr auto}.food-search label:first-child{grid-column:1/-1}}

#market-detail { display:grid; gap:8px; margin-top:12px; }
#market-detail .row { align-items:flex-start; }
#market-detail .row>small { white-space:normal; text-align:right; }
.agenda-card .cardhead>button { margin-left:0; }
