/* Gabe's Day website: copied from the claude.ai version (personal/app/gabes-day.html) so both look the same.
   Changes: three tabs, settings form inputs, the small additions at the end. */
/* Decision block (v7 Daily Leads look)
   Feel: the same family as Daily Leads (Lusk Designs brand). Flat warm paper, white cards with a soft border, ink and one blue.
   Face: General Sans, self-hosted next to the page (fonts/). Regular = 400; Medium covers 500-700, so 600/700 render as Medium
         (same as Daily Leads). Times and amounts use font-variant-numeric: tabular-nums.
   Colour: ink #111111 and LD blue #4A65A3 (dark #8FA5DA) on paper #F4F4F2 / near-black #111214. Warn red only for overdue, stale and alerts.
   Surfaces: each section is one white card (12px radius, 1px border, 16px padding); never a card inside a card. No blur, no glass.
   Chrome: plain header that scrolls away; flat full-width bottom bar, the current tab marked by a 3px blue line along its top.
   Curve: cubic-bezier(.2,.7,.2,1); 200ms open, 150ms close; press = scale(.98); no motion under reduced-motion.
   Grid: one 640px column, 16px gutters, spacing 4/8/12/16/24/32/48, radius 10 controls / 12 cards / 16 sheets.
   Type: title 28/1.1 600, title 20/1.25, body 16/1.45, small 13/1.4, section label 13 600 uppercase. Inputs stay 16px (no iOS zoom). */
@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("fonts/GeneralSans-Medium.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
:root {
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px; --s7:48px;
  --r1:6px; --r2:10px; --r3:12px; --r4:16px;
  --fs-display:28px; --lh-display:1.1; --fs-title:20px; --lh-title:1.25; --fs-body:16px; --lh-body:1.45;
  --fs-small:13px; --lh-small:1.4; --fs-label:13px; --lh-label:1.3;
  /* light (default): Daily Leads tokens */
  --bg:#F4F4F2; --surface:#FFFFFF; --surface-2:#F4F4F2; --ink:#111111; --muted:#55585E;
  /* --hair is Daily Leads' soft line (cards, rows); --edge (input borders) and --track (week cells, previews) are darker for 3:1;
     --bar-track (progress bars) is Daily Leads' bar track: decorative, the blue fill and the number beside it carry the meaning */
  --hair:#DCDCD7; --edge:#85878D; --track:#85878D; --bar-track:#DCDCD7; --tint:rgba(17,17,17,.04);
  --accent:#4A65A3; --accent-fill:#4A65A3; --on-accent:#FFFFFF; --accent-soft:#E3E8F3;
  --accent-line:#4A65A3; --accent-text:#4A65A3; --focus:#4A65A3;
  --warn:#A13A3A; --warn-line:rgba(161,58,58,.35); --on-warn:#FFFFFF;
  /* status dots, named by the script: blue, ink or warn only */
  --k-today:var(--accent); --k-inbox:var(--accent); --k-money:var(--ink); --k-warn:var(--warn);
  --scrim:rgb(0 0 0 / .45); --ring:var(--surface); --thumb:rgba(17,17,17,.22);
  --ease:cubic-bezier(.2,.7,.2,1); --t-open:200ms; --t-close:150ms;
  --tabbar:64px; --tab-gap:0px;
  --body:"General Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#111214; --surface:#1A1B1E; --surface-2:#111214; --ink:#EDEDEA; --muted:#A4A7AE;
    --hair:#2E3034; --edge:#6B6E75; --track:#6B6E75; --bar-track:#2E3034; --tint:rgba(237,237,234,.05);
    --accent:#8FA5DA; --accent-fill:#8FA5DA; --on-accent:#0E1116; --accent-soft:#222A3B; --accent-line:#8FA5DA; --accent-text:#8FA5DA; --focus:#8FA5DA;
    --warn:#E58080; --warn-line:rgba(229,128,128,.4); --on-warn:#111214;
    --scrim:rgb(0 0 0 / .5); --thumb:rgba(237,237,234,.2);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg:#111214; --surface:#1A1B1E; --surface-2:#111214; --ink:#EDEDEA; --muted:#A4A7AE;
  --hair:#2E3034; --edge:#6B6E75; --track:#6B6E75; --bar-track:#2E3034; --tint:rgba(237,237,234,.05);
  --accent:#8FA5DA; --accent-fill:#8FA5DA; --on-accent:#0E1116; --accent-soft:#222A3B; --accent-line:#8FA5DA; --accent-text:#8FA5DA; --focus:#8FA5DA;
  --warn:#E58080; --warn-line:rgba(229,128,128,.4); --on-warn:#111214;
  --scrim:rgb(0 0 0 / .5); --thumb:rgba(237,237,234,.2);
  color-scheme: dark;
}
html, body { height: 100%; color: var(--ink); }
html { background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; }
body {
  margin: 0; font: 400 var(--fs-body)/var(--lh-body) var(--body); font-variant-numeric: tabular-nums;
  background: var(--bg); position: relative; z-index: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: var(--accent-soft); color: var(--ink); }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: var(--thumb); border-radius: 8px; }
.app { max-width: 640px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; box-sizing: border-box; padding: 0 16px calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + var(--s5)); }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cards, Daily Leads style: one level only. Sections, the checklist, the summary, weather, the junk row and the two forms */
.sec, .block, .surface, .sum, .wx, #junk:not(:empty) {
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r3); padding: var(--s4); box-sizing: border-box;
}
/* Never a card inside a card; a section holding only a note stays plain text */
.cl .block, .sec:not(:has(> .sec-top, > .sec-h)) { background: none; border: 0; border-radius: 0; padding: 0; }
/* A form opened inside a card (type to add) sits flat, set off by a hairline */
:is(.sec, .block, .cl) .surface { background: none; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; padding: var(--s1) 0 var(--s4); }

/* Header: a small date line, the tab title, and the gear and refresh. Plain, scrolls away with the page */
.top { position: relative; z-index: 3; margin: 0 -16px; padding: calc(env(safe-area-inset-top, 0px) + var(--s4)) 16px var(--s4); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); background: none; border: 0; box-shadow: none; }
.brand { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.eyebrow, .label { font: 500 var(--fs-small)/var(--lh-label) var(--body); color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: var(--s2); }
.live { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.live.off { background: var(--muted); }
h1 { margin: 0; font: 600 var(--fs-display)/var(--lh-display) var(--body); letter-spacing: -.01em; }
.icon-btn { position: relative; flex: none; width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; border: 1px solid transparent; background: transparent; border-radius: 8px; color: var(--ink); cursor: pointer; transition: background-color var(--t-close) var(--ease), color var(--t-close) var(--ease), transform var(--t-close) var(--ease); }
.icon-btn::after { content: ""; position: absolute; inset: -2px; }
.icon-btn:hover:not(:disabled) { background: var(--tint); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Page rhythm: 32px between sections, 8-16px inside them */
.report { display: flex; flex-direction: column; min-width: 0; padding-top: var(--s1); }
.panel { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.panel[hidden] { display: none; }
.panel:empty { display: none; }
.sum { display: flex; flex-direction: column; gap: var(--s1); }
.sum:empty { display: none; }
.sum-line { margin: 0; font-size: 17px; line-height: 1.4; color: var(--ink); letter-spacing: -.005em; }
.sum-line .num, .sales-stats .num { font-weight: 700; }
.sum-line .num { font-size: 24px; line-height: 1; letter-spacing: -.02em; }
.sum-line .zero { color: var(--muted); }
.sum-line .sep { color: var(--muted); padding-inline: .45em; }
.when { font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); }
.when.stale, .banner { color: var(--warn); }
.banner { font: 400 var(--fs-small)/var(--lh-small) var(--body); }

/* Sections: a Daily Leads section label and a hairline list, inside the card */
.sec, .block { display: flex; flex-direction: column; min-width: 0; }
.sec-h, .block h3 { margin: 0 0 var(--s2); display: flex; align-items: baseline; gap: var(--s2); font: 600 var(--fs-label)/var(--lh-label) var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
/* Report headings arrive in capitals; sentenceCase() in the script fixes them and keeps acronyms */
.sec-h { display: block; }
.sec-h em { margin-left: var(--s2); }
.sec-h em, .block h3 em { font-style: normal; color: var(--ink); }
.list, .block ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.list > li, .block ul > li { border-bottom: 1px solid var(--hair); }
.block > p, .quiet { margin: 0; padding: var(--s3) 0; font-size: var(--fs-body); color: var(--muted); overflow-wrap: anywhere; }
.block > h3 + p { padding-top: 0; }
.sec-note { margin: 0 0 var(--s2); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); overflow-wrap: anywhere; }

/* Collapsible alert rows: hairline list; hover tints, the opened row lifts onto glass */
.list > li.row { position: relative; margin-inline: calc(-1 * var(--s3)); padding-inline: var(--s3); border-bottom: 0; border-radius: var(--r3); border: 1px solid transparent; transition: background-color var(--t-close) var(--ease), border-color var(--t-close) var(--ease), box-shadow var(--t-close) var(--ease); }
.list > li.row::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: -1px; height: 1px; background: var(--hair); pointer-events: none; }
.list > li.row.open::after, .list > li.row:has(+ li.row.open)::after { opacity: 0; }
/* Inside a card the card edge does the framing: hairlines only between rows */
:is(.sec, .block, #junk) .list { border-top: 0; }
:is(.sec, .block, #junk) .list > li.row:last-child::after { content: none; }
:is(.sec, .block) .list > li:not(.row):last-child { border-bottom: 0; }
:is(.sec, .block, .wx, #junk) .list > li.row:first-child > .row-h { padding-top: var(--s1); }
:is(.sec, .block, .wx, #junk) .list > li.row:last-child > .row-h { padding-bottom: var(--s1); }
.list > li.row:hover:not(.open) { background: var(--tint); }
.list > li.row.open { border-color: transparent; }
.row-h { width: 100%; min-height: 48px; display: flex; align-items: center; gap: var(--s3); margin: 0; padding: var(--s3) 0; border: 0; background: none; color: var(--ink); font: 500 var(--fs-body)/var(--lh-body) var(--body); text-align: left; cursor: pointer; border-radius: var(--r2); }
.row-h:hover .row-t { color: var(--ink); }
a.row-h { box-sizing: border-box; text-decoration: none; }
.dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--k, var(--muted)); }
.row-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-t .aside { font-weight: 400; color: var(--muted); }
.row-t .scope-i { font: 600 var(--fs-small)/1 var(--body); color: var(--accent-text); margin-right: var(--s2); }
.row-m { flex: none; font: 500 var(--fs-small)/1 var(--body); color: var(--muted); }
.chev { flex: none; width: 16px; height: 16px; color: var(--muted); transition: transform var(--t-close) var(--ease); }
.row.open > .row-h .chev, [aria-expanded="true"] > .chev { transform: rotate(180deg); }
.row-b { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--t-close) var(--ease), visibility 0s linear var(--t-close); }
.row.open > .row-b { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--t-open) var(--ease), visibility 0s; }
.row-bi { min-height: 0; overflow: hidden; }
.row-pad { display: flex; flex-direction: column; gap: var(--s2); padding: 0 0 var(--s4) calc(6px + var(--s3)); }
.row-pad .full { margin: 0; overflow-wrap: anywhere; }
.row-pad .sub { margin: 0; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); overflow-wrap: anywhere; }
.row-pad .btn-row { margin-top: var(--s1); }
.more { align-self: flex-start; margin-top: var(--s1); }

/* Buttons, Daily Leads style: solid blue primary, outlined secondary, blue text */
.btn, .state button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px var(--s4); box-sizing: border-box; font: 600 var(--fs-body)/1.2 var(--body); color: var(--on-accent); background: var(--accent-fill); border: 1px solid var(--accent-fill); border-radius: var(--r2); cursor: pointer; text-decoration: none; text-align: center; transition: filter var(--t-close) var(--ease), background-color var(--t-close) var(--ease), border-color var(--t-close) var(--ease), transform var(--t-close) var(--ease); }
.btn:hover:not(:disabled) { filter: brightness(.94); }
.btn.ghost, .gmail { color: var(--ink); background: var(--surface); border-color: var(--hair); }
.btn.ghost:hover:not(:disabled), .gmail:hover { filter: none; background: var(--surface-2); border-color: var(--hair); }
.gmail { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px var(--s4); box-sizing: border-box; border: 1px solid var(--hair); border-radius: var(--r2); font: 600 var(--fs-body)/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background-color var(--t-close) var(--ease), transform var(--t-close) var(--ease); }
.text-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent-text); font: 600 var(--fs-small)/1.2 var(--body); cursor: pointer; text-decoration: none; }
.text-btn:hover { color: var(--ink); }
.btn:disabled, .text-btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.foot { font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); }

/* Empty, loading and error states: words and one action, no box */
.state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); padding: var(--s2) 0; }
.state strong { font: 600 var(--fs-title)/var(--lh-title) var(--body); letter-spacing: -.01em; }
.state span { color: var(--muted); }
.state button { margin-top: var(--s2); }

/* Fields */
.field { display: flex; flex-direction: column; gap: var(--s2); margin: 0; }
.field label, .field-l { font: 600 var(--fs-label)/var(--lh-label) var(--body); color: var(--muted); }
.field .hint { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }
textarea, select, .cl input[type="text"], #set-form input { width: 100%; box-sizing: border-box; min-height: 44px; font: 16px/1.45 var(--body); color: var(--ink); background: var(--surface-2); border: 1px solid var(--edge); border-radius: var(--r2); padding: 10px 12px; }
textarea { resize: vertical; min-height: 96px; }
textarea[readonly] { color: var(--muted); }
.status { font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); min-height: 1em; }
.status.err { color: var(--warn); }
.status:empty { display: none; }
.confirm { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s3); border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r3); overflow-wrap: anywhere; }
.confirm .sub { font-size: var(--fs-small); color: var(--muted); }
.ok { font-weight: 600; color: var(--ink); }

/* Needs a reply */
.composer { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--hair); }
.composer textarea { min-height: 160px; }

/* Ask */
.chat { display: flex; flex-direction: column; gap: var(--s5); }
.chat:empty { display: none; }
.msg { font-size: var(--fs-body); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; max-width: 85%; padding: var(--s2) var(--s3); border-radius: var(--r3) var(--r3) var(--r1) var(--r3); background: var(--accent-soft); }
.msg.bot { align-self: stretch; }
.msg.bot::before { content: "Claude"; display: block; margin-bottom: var(--s1); font: 600 var(--fs-label)/var(--lh-label) var(--body); color: var(--muted); white-space: normal; }
.msg.pending { color: var(--muted); }
.msg .note { display: block; margin-top: var(--s2); font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--warn); white-space: normal; }
.msg .btn { margin-top: var(--s2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips[hidden] { display: none; }
.chip { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s2) 14px; border: 1px solid var(--hair); border-radius: 22px; background: var(--surface); color: var(--ink); font: 600 var(--fs-body)/1.3 var(--body); text-align: left; cursor: pointer; transition: transform var(--t-close) var(--ease); }
.chip .chev { transform: rotate(-90deg); color: var(--accent); }
.chip small { margin-left: var(--s2); font: 500 var(--fs-small)/1 var(--body); color: var(--muted); }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.lede { margin: 0; color: var(--muted); }
.ask-form { position: sticky; bottom: calc(var(--tabbar) + var(--tab-gap) + env(safe-area-inset-bottom, 0px) + var(--s3)); z-index: 2; gap: var(--s3); background: var(--surface); }
.ask-form textarea { min-height: 72px; }

/* Skills */
.rule-confirm .row-pad { gap: var(--s3); }
.form { display: flex; flex-direction: column; gap: var(--s4); }

/* Daily checklist (top of Today) */
.cl { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.cl-head { display: flex; align-items: center; gap: var(--s3); min-height: 44px; margin: calc(-1 * var(--s2)) 0 calc(-1 * var(--s1)); }
.cl-head h2 { margin: 0; flex: 1; min-width: 0; font: 600 var(--fs-body)/1.3 var(--body); color: var(--ink); }
.cl-toggle { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; border-radius: var(--r2); }
.cl-toggle svg { width: 14px; height: 14px; color: var(--muted); }
.cl-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.cl-streak { font: 500 var(--fs-small)/1 var(--body); color: var(--muted); white-space: nowrap; }
.cl-count { font: 700 var(--fs-small)/1 var(--body); color: var(--ink); white-space: nowrap; }
.cl-bar { height: 8px; border-radius: 4px; background: var(--bar-track); overflow: hidden; }
.cl-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.cl-meta { font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); }
.cl-body { display: flex; flex-direction: column; gap: var(--s3); }
.cl-body[hidden] { display: none; }
.cl .cl-note { margin: 0; font-size: var(--fs-body); color: var(--muted); }
.cl .block ul { border-top: 0; }
.cl .block ul > li:last-child { border-bottom: 0; }
.cl .block > p { padding: 0 0 var(--s2); font-size: var(--fs-small); }
.cl li.cl-item { display: flex; align-items: center; gap: var(--s2); min-height: 52px; padding: var(--s1) 0; }
.cl-check { position: relative; flex: none; width: 44px; height: 44px; margin-left: calc(-1 * var(--s2)); padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--on-accent); cursor: pointer; transition: transform var(--t-close) var(--ease); }
.cl-check::before { content: ""; position: absolute; inset: 9px; border: 1.5px solid var(--muted); border-radius: 50%; background: var(--surface-2); transition: background-color var(--t-close) var(--ease), border-color var(--t-close) var(--ease); }
.cl-check svg { position: relative; width: 16px; height: 16px; opacity: 0; }
.cl-check[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); }
.cl-check[aria-pressed="true"] svg { opacity: 1; }
.cl-check:disabled { opacity: .45; cursor: not-allowed; }
.cl-check:disabled::before { border-style: dashed; }
.cl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-title { font-size: var(--fs-body); overflow-wrap: anywhere; }
.cl-item.done .cl-title { color: var(--muted); }
.cl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font: 500 12px/var(--lh-label) var(--body); color: var(--muted); }
/* Badge, Daily Leads "Website broken" style */
.cl-tag { display: inline-block; padding: 2px 8px; border: 1px solid transparent; border-radius: 4px; background: var(--accent-soft); color: var(--ink); font: 600 var(--fs-small)/var(--lh-label) var(--body); }
.cl-tag.over { color: var(--warn); background: none; border-color: var(--warn-line); }
.cl-time { color: var(--muted); }
.cl-thumb { flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--hair); border-radius: var(--r2); overflow: hidden; background: var(--surface-2); cursor: zoom-in; color: var(--muted); font: 9px var(--body); }
.cl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cl li.cl-edit { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) 0; }
.cl-edit-top { display: flex; align-items: center; gap: var(--s2); }
.cl-edit-top .cl-title { flex: 1; min-width: 0; }
.cl-arrows { flex: none; display: flex; gap: var(--s1); }
.cl-spacer { flex: 1; }
.cl-ctrls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.cl-opt { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; font-size: var(--fs-small); cursor: pointer; }
.cl-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.cl-add { display: flex; flex-direction: column; gap: var(--s3); }
.cl-add-wrap { padding-top: var(--s3); border-top: 1px solid var(--hair); }
.cl-starters { display: flex; flex-direction: column; gap: var(--s3); }
.cl-week-wrap { border-top: 1px solid var(--hair); margin-bottom: calc(-1 * var(--s2)); }
.cl-week-t { width: 100%; justify-content: space-between; color: var(--muted); font: 600 var(--fs-label)/var(--lh-label) var(--body); }
.cl-week-t .chev { width: 14px; height: 14px; }
.cl-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s1); padding-bottom: var(--s3); }
.cl-day { display: flex; flex-direction: column; align-items: center; gap: var(--s1); padding: var(--s1) 0; border: 1px solid transparent; border-radius: var(--r2); background: none; color: var(--muted); cursor: pointer; font: 600 11px/1.3 var(--body); }
.cl-day .cell { position: relative; width: 22px; height: 28px; border-radius: var(--r1); background: var(--track); overflow: hidden; }
.cl-day .cell i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--accent); }
.cl-day.today { color: var(--ink); }
.cl-day.today .cell { outline: 1.5px solid var(--accent); }
.cl-day[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }
.cl-detail { padding-bottom: var(--s3); }
.cl-detail h4 { margin: 0 0 var(--s2); font: 600 var(--fs-label)/var(--lh-label) var(--body); color: var(--ink); }
.cl-detail > p { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.cl-detail .cl-item { display: flex; align-items: center; gap: var(--s3); }
.cl-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cl-sheet { box-sizing: border-box; width: calc(100% - 2 * var(--s3)); max-width: 560px; max-height: 92vh; margin: auto auto calc(var(--s3) + env(safe-area-inset-bottom, 0px)); padding: var(--s5) 20px var(--s5); border: 0; border-radius: var(--r4); background: var(--bg); color: var(--ink); overflow: auto; }
.cl-sheet::backdrop, .cl-viewer::backdrop { background: var(--scrim); }
.cl-sheet-in { display: flex; flex-direction: column; gap: var(--s3); }
.cl-sheet h2 { margin: 0; font: 700 var(--fs-title)/var(--lh-title) var(--body); letter-spacing: -.01em; overflow-wrap: anywhere; }
.cl-preview { display: block; width: 100%; max-height: 40vh; object-fit: contain; border: 1px solid var(--hair); border-radius: var(--r3); background: var(--track); }
.cl-verdict { margin: 0; overflow-wrap: anywhere; }
.cl-verdict.ok { color: var(--ink); }
.cl-verdict.bad { color: var(--warn); }
.cl-verdict.wait { font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); }
.cl-viewer { box-sizing: border-box; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: var(--s3) var(--s3) calc(var(--s3) + env(safe-area-inset-bottom, 0px)); border: 0; background: var(--bg); color: var(--ink); }
.cl-viewer[open] { display: flex; flex-direction: column; gap: var(--s3); }
.cl-viewer img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.cl-viewer .btn { align-self: flex-end; }

/* Bottom tab bar, Daily Leads style: flat and full width; the current tab gets a 3px blue line along its top */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; box-sizing: border-box; background: var(--surface); border-top: 1px solid var(--hair); padding-bottom: env(safe-area-inset-bottom, 0px); padding-inline: max(0px, calc(50% - 320px)); }
.tabbar-in { height: var(--tabbar); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 2px; border: 0; background: none; border-radius: 0; color: var(--muted); cursor: pointer; font: 600 13px/1.1 var(--body); transition: color var(--t-close) var(--ease), transform var(--t-close) var(--ease); }
.tab svg { width: 22px; height: 22px; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--accent-text); box-shadow: inset 0 3px 0 var(--accent); }
.tab[aria-current="page"] svg { color: var(--accent-text); }
.tab .badge { position: absolute; top: 9px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--k-warn); outline: 2px solid var(--ring); }

/* Clear items: a quiet "Clear all" beside the section label, rows fold away, one undo toast above the tab bar */
.sec-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: 0 0 var(--s2); min-height: 20px; }
.sec-top > .sec-h, .block .sec-top > h3 { margin: 0; }
.sec-clear { position: relative; min-height: 20px; margin: 0; font-weight: 500; }
.sec-clear::after { content: ""; position: absolute; inset: -12px -8px; }
.list > li.row.leaving { overflow: hidden; opacity: 0; margin-block: 0; border-color: transparent; transition: height var(--t-open) var(--ease), opacity var(--t-close) var(--ease), margin var(--t-open) var(--ease); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 12px + 2 * var(--tab-gap) + env(safe-area-inset-bottom, 0px)); z-index: 6; transform: translateX(-50%); box-sizing: border-box; width: max-content; max-width: calc(100% - 2 * var(--s5)); display: flex; align-items: center; gap: var(--s4); min-height: 48px; padding: 2px var(--s2) 2px var(--s4); border-radius: var(--r2); background: var(--ink); border: 0; box-shadow: 0 6px 24px rgb(0 0 0 / .2); font: 500 var(--fs-body)/1.3 var(--body); color: var(--bg); }
.toast .text-btn { padding: 0 var(--s3); font-size: var(--fs-body); color: var(--bg); text-decoration: underline; }
.toast-t { min-width: 0; overflow-wrap: anywhere; }

/* Junk cleaner: one row on Inbox opens the sheet; senders as a hairline list with a tick each */
.row-h .chev.go { transform: rotate(-90deg); }
.btn.warn { color: var(--on-warn); background: var(--warn); border-color: var(--warn); }
.jk-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.jk-top .text-btn { margin: calc(-1 * var(--s2)) 0; }
.jk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.jk-g { border-bottom: 1px solid var(--hair); }
.jk-row { display: flex; align-items: center; gap: var(--s2); min-height: 60px; }
.jk-check { flex: none; width: 44px; height: 44px; margin-left: calc(-1 * var(--s3)); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.jk-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-fill); cursor: pointer; }
.jk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: var(--s2) 0; border: 0; background: none; color: var(--ink); text-align: left; font: 500 var(--fs-body)/1.3 var(--body); cursor: pointer; border-radius: var(--r2); }
.jk-t > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.jk-t .jk-s { font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); }
.jk-g.off .jk-name { color: var(--muted); }
.jk-n { flex: none; min-width: 2ch; text-align: right; font: 600 var(--fs-small)/1 var(--body); color: var(--muted); }
.jk-keep { flex: none; padding: 0 var(--s1); }
.jk-subs { list-style: none; margin: 0; padding: 0 0 var(--s3) 40px; display: flex; flex-direction: column; gap: var(--s1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }
.jk-subs li { overflow-wrap: anywhere; }
.jk-kept { list-style: none; margin: 0; padding: 0; }
.jk-kept li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 44px; font-size: var(--fs-small); color: var(--muted); overflow-wrap: anywhere; }
.jk-foot { position: sticky; bottom: calc(-1 * var(--s5)); z-index: 1; margin: 0 -20px calc(-1 * var(--s5)); padding: var(--s3) 20px var(--s5); background: var(--bg); border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: var(--s3); }
.jk-foot .confirm { border-color: var(--warn-line); background: transparent; }
.jk-big { margin: 0; font: 600 var(--fs-title)/var(--lh-title) var(--body); letter-spacing: -.01em; }
:where(.jk-t, .jk-check input):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Schedule: live Google Calendar on Today; one quiet line per event, the next few days fold away under a label */
.cal-time { display: inline-block; min-width: 4.9em; margin-right: var(--s3); font-weight: 500; color: var(--muted); }
.cal-next .cal-time { min-width: 7.4em; }
.cal-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s3); }
.cal-line .text-btn { min-height: 44px; }
.cal-next { margin-top: var(--s2); }
.cal-next.open > .row-b { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--t-open) var(--ease), visibility 0s; }
.cal-next-t em { margin-left: var(--s2); margin-right: auto; font-style: normal; color: var(--ink); }

/* Weather: one line in its own card under the summary; opens for the day, the night and any alert */
.wx .list { border-top: 0; }
.wx .list > li.row::after { content: none; }
.wx .row-t { white-space: normal; text-wrap: pretty; }
.wx-i { width: 18px; height: 18px; margin-right: var(--s2); vertical-align: -3px; color: var(--muted); }
.wx-alert { display: flex; flex-direction: column; gap: var(--s1); margin-top: var(--s1); padding-top: var(--s3); border-top: 1px solid var(--hair); }
.wx-alert .text-btn { min-height: 44px; align-self: flex-start; }
.wx-alert-t { margin: 0; font-weight: 600; color: var(--warn); overflow-wrap: anywhere; }
.wx-alert-b { display: flex; flex-direction: column; gap: var(--s2); }
/* The open "This week" disclosure already sits in the checklist card: no second box */
.cl-week-wrap > .row.open { background: none; border-color: transparent; box-shadow: none; }
/* Type to add: a small form under the Schedule label */
.cal-add { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s3); }
.cal-add form { display: flex; flex-direction: column; gap: var(--s3); }
.cal-add input[type="text"], .cal-add input[type="date"], .cal-add input[type="time"] { width: 100%; box-sizing: border-box; min-height: 44px; font: 16px/1.45 var(--body); color: var(--ink); background: var(--surface-2); border: 1px solid var(--edge); border-radius: var(--r2); padding: 10px 12px; }
.cal-add input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cal-add-sum { margin: 0; font: 600 var(--fs-body)/var(--lh-body) var(--body); overflow-wrap: anywhere; }
.cal-add-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); }
.cal-add .status { margin: 0; }
.cal-add .ask { color: var(--ink); }
.cl-week-note { margin: 0; padding-bottom: var(--s3); font: 400 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); }
/* Header actions: Skills and rules (gear) beside Refresh */
.top-acts { flex: none; display: flex; align-items: center; gap: var(--s2); }
/* Skills open: the gear shows it is the current page, like the active tab */
.icon-btn[aria-current="page"], .icon-btn[aria-current="page"]:hover:not(:disabled) { color: var(--accent-text); background: var(--accent-soft); }
/* Sales: the Daily Leads summary. One quiet line on Today; the Sales tab is hairline lists, show only */
.sales-go .row-t { white-space: normal; text-wrap: pretty; }
/* Sales tab top: Daily Leads' progress, a big number over a thin bar, no card */
.sales-prog { display: grid; gap: var(--s2); padding: var(--s1) 0 var(--s2); }
.sales-big { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sales-big small { font-size: 18px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.sales-sub { margin: var(--s3) 0 0; font: 600 var(--fs-small)/var(--lh-small) var(--body); color: var(--muted); }
.sec-top + .sales-sub { margin-top: var(--s2); }
.sales-sub.over { color: var(--warn); }
.sales-stats li { display: flex; flex-direction: column; gap: var(--s1); min-height: 48px; box-sizing: border-box; padding: var(--s3) 0; overflow-wrap: anywhere; }
.sales-stats .aside { font-weight: 500; color: var(--muted); }
.sales-stats .pair { white-space: nowrap; }
.sales-fu-late { color: var(--warn); }
.sales-foot { display: flex; flex-direction: column; gap: var(--s1); }

:where(.tab, .icon-btn, .gmail, .state button, .btn, .text-btn, .chip, .row-h, .cl-toggle, .cl-check, .cl-thumb, .cl-day, textarea, select, .cl input):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .cl-bar i { transition: width var(--t-open) var(--ease); } .cl-toggle svg { transition: transform var(--t-close) var(--ease); }
  .btn:not(:disabled):active, .gmail:active, .chip:not(:disabled):active, .row-h:active, .tab:active, .icon-btn:not(:disabled):active, .cl-check:not(:disabled):active { transform: scale(.98); }
}
/* No motion: presses dim instead of shrinking */
.text-btn:active { opacity: .7; }
@media (prefers-reduced-motion: reduce) {
  .icon-btn.spin svg { animation: none; }
  .row-b, .row.open > .row-b, .chev, .btn, .gmail, .chip, .tab, .icon-btn, .top, .list > li.row, .list > li.row.leaving, .cal-next.open > .row-b, .cl-check, .cl-check::before { transition: none; }
  .btn:not(:disabled):active, .gmail:active, .chip:active, .row-h:active, .tab:active, .icon-btn:active { opacity: .75; }
}

/* ---------- website additions ---------- */
#set-form input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#setup-note:empty { display: none; }
.cal-src { color: var(--muted); }
.cl-edit { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; }
.cl-add-row { display: flex; gap: var(--s2); align-items: stretch; }
.cl-add-row input { flex: 1; min-width: 0; }
.cl-add-row .btn { flex: none; }
