/* CASh Outreach. Silva's calm, large layout (she already knows it) in the CASh brand: Instrument Sans only (she dislikes Playfair),
   Instrument Sans, one electric blue. Light by default for daytime work, the CASh night look one tap away.
   Radius system: controls 14px, panels 20px, chips full. */
:root {
  --bg: #f3f5fb;
  --paper: #ffffff;
  --paper-2: #f7f8fd;
  --ink: #0d1330;
  --ink-2: #3b4366;
  --ink-3: #5b6385;
  --line: #d6dbeb;
  --line-2: #e6e9f3;
  --blue: #2453f0;
  --blue-hi: #1a42d1;
  --on-blue: #ffffff;
  --tint: #e5ebff;
  --tint-2: #f0f3ff;
  --good: #136b3d; --good-tint: #dff3e7;
  --warn: #7d4c00; --warn-tint: #faeed7;
  --bad: #a3242c; --bad-tint: #fbe4e5;
  --rose: #b0284f; --rose-tint: #fde6ee;
  --shadow: 0 1px 2px rgba(13, 19, 48, .05), 0 12px 32px -20px rgba(13, 19, 48, .3);
  --scrim: rgba(13, 19, 48, .32);
  --glow: transparent;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r-ctl: 14px;
  --r-panel: 20px;
  --head-h: 80px;
  --wrap: 1180px;
  --pad: clamp(20px, 6vw, 72px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #04050d;
  --paper: #0b0e1f;
  --paper-2: #10142b;
  --ink: #f2f3f8;
  --ink-2: #c9cde0;
  --ink-3: #a3a7bf;
  --line: rgba(255, 255, 255, .13);
  --line-2: rgba(255, 255, 255, .075);
  --blue: #4d7cff;
  --blue-hi: #6a92ff;
  --tint: rgba(77, 124, 255, .2);
  --tint-2: rgba(77, 124, 255, .1);
  --good: #8ef0b8; --good-tint: rgba(61, 220, 132, .14);
  --warn: #ffdc94; --warn-tint: rgba(255, 200, 87, .13);
  --bad: #ffb3bb; --bad-tint: rgba(255, 107, 122, .14);
  --rose: #ff9fb0; --rose-tint: rgba(255, 159, 176, .13);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -24px rgba(0, 0, 0, .8);
  --scrim: rgba(2, 3, 9, .6);
  --glow: rgba(51, 102, 255, .16);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: hidden; }
body { font: 400 19px/1.55 var(--sans); min-height: 100dvh; -webkit-font-smoothing: antialiased; transition: background .3s var(--ease), color .3s var(--ease); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(70vw 50vh at 85% -10%, var(--glow), transparent 70%); }
::selection { background: var(--tint); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
a { color: var(--blue); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--sans); font-weight: 600; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
h1 em, h2 em { font-style: normal; color: var(--blue); }
h1 { font-size: clamp(2.1rem, 3.4vw, 2.75rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p, li { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.warn-text { color: var(--warn) !important; }
.bad-text { color: var(--bad); }
.i { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.fill { fill: currentColor; stroke: none; }
.hide { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::placeholder { color: var(--ink-3); opacity: .85; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; height: var(--head-h); border-bottom: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); }
.top-in { max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 20px; padding: 0 var(--pad); }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); white-space: nowrap; margin-right: auto; }
.brand b { font: 600 27px/1 var(--sans); letter-spacing: -.04em; }
.brand span { font-size: .9rem; color: var(--ink-3); font-weight: 500; }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: var(--r-ctl); color: var(--ink-2); text-decoration: none;
  font-weight: 600; font-size: 1rem; position: relative; transition: background .2s, color .2s; }
.nav a:hover { background: var(--tint-2); color: var(--ink); }
.nav a.on { background: var(--tint); color: var(--blue-hi); }
:root[data-theme="dark"] .nav a.on { color: #fff; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--rose); color: #fff; font-size: .75rem; font-weight: 700;
  display: inline-grid; place-items: center; }
.pilot { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 0 16px 0 13px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2); font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.pilot .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.pilot.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pilot.on .dot { background: var(--good); box-shadow: 0 0 0 4px var(--good-tint); }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; flex: none; }
.iconbtn:hover { background: var(--tint-2); color: var(--ink); }
.tabbar { display: none; }

/* ---------- page ---------- */
main { position: relative; z-index: 1; max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; padding: 44px var(--pad) 120px; }
.view { animation: enter .45s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.hero { display: grid; gap: 10px; margin-bottom: 30px; }
.lede { color: var(--ink-2); font-size: 1.1rem; max-width: 62ch; margin: 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.sec-h .muted { font-size: .92rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: var(--r-ctl);
  border: 2px solid var(--line); background: var(--paper); color: var(--ink); font: 600 1rem/1 var(--sans); cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: background .18s, border-color .18s, transform .12s var(--ease), box-shadow .18s; }
.btn:hover { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); box-shadow: 0 10px 22px -14px color-mix(in srgb, var(--blue) 90%, transparent); }
.btn.primary:hover { background: var(--blue-hi); border-color: var(--blue-hi); }
.btn.big { min-height: 64px; padding: 0 30px; font-size: 1.12rem; }
.btn.sm { min-height: 44px; padding: 0 16px; font-size: .93rem; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--tint-2); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.on { background: var(--tint); border-color: var(--blue); color: var(--blue-hi); }
:root[data-theme="dark"] .btn.on { color: #fff; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-panel); box-shadow: var(--shadow); padding: 28px 30px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: .84rem; font-weight: 600;
  background: var(--paper-2); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line-2); }
.chip.good { background: var(--good-tint); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-tint); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-tint); color: var(--bad); border-color: transparent; }
.chip.blue { background: var(--tint); color: var(--blue-hi); border-color: transparent; }
:root[data-theme="dark"] .chip.blue { color: #c4d3ff; }
.chip.rose { background: var(--rose-tint); color: var(--rose); border-color: transparent; }
.chip .i { width: 15px; height: 15px; }

input, textarea, select { width: 100%; min-height: 54px; background: var(--paper); color: var(--ink); border: 2px solid var(--line); border-radius: var(--r-ctl);
  padding: 12px 16px; font: 400 1.02rem/1.5 var(--sans); caret-color: var(--blue); transition: border-color .18s, box-shadow .18s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--tint); }
textarea { resize: vertical; min-height: 140px; }
label.f { display: grid; gap: 8px; font-size: .98rem; font-weight: 600; color: var(--ink-2); }
label.f .help { font-weight: 400; color: var(--ink-3); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.form { display: grid; gap: 20px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.err { color: var(--bad); font-size: .95rem; }
.why { margin: 0; padding: 16px 20px; background: var(--tint-2); border-radius: var(--r-ctl); color: var(--ink); font-size: 1.05rem; line-height: 1.55; }

/* ---------- alerts ---------- */
.alerts { display: grid; gap: 12px; margin-bottom: 30px; }
.alert { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px 22px; border-radius: var(--r-panel);
  background: var(--bad-tint); color: var(--bad); }
.alert.soft { background: var(--warn-tint); color: var(--warn); }
.alert .i { width: 28px; height: 28px; }
.alert .grow { color: var(--ink); }

/* ---------- Today (Silva's layout) ---------- */
.today { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.hello { margin-bottom: 26px; }
.hello h1 { font-size: clamp(2.2rem, 3.6vw, 2.9rem); }
.hello .date { color: var(--ink-2); font-size: 1.12rem; margin: 8px 0 0; }
.next { padding: 34px 36px 30px; }
.next.out { animation: cardOut .32s var(--ease) forwards; }
@keyframes cardOut { to { opacity: 0; transform: translateX(-32px); } }
.next .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.next h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.next .town { color: var(--ink-2); margin-top: 8px; font-size: 1.08rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.next .why { margin: 22px 0; }
.contact { display: grid; gap: 10px; margin-bottom: 26px; }
.contact a, .contact span { display: inline-flex; align-items: center; gap: 12px; font-size: 1.05rem; overflow-wrap: anywhere; min-width: 0; }
.contact .i { color: var(--blue); }
.sortrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.sortrow .muted { margin-right: 4px; font-size: .95rem; }
.sortbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid var(--line);
  background: var(--paper); color: var(--ink-2); font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .12s var(--ease); }
.sortbtn:hover { color: var(--ink); border-color: color-mix(in srgb, var(--blue) 30%, var(--line)); }
.sortbtn:active { transform: scale(.96); }
.sortbtn.liked { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 45%, transparent); background: var(--rose-tint); }
.next .left { margin: 18px 0 0; color: var(--ink-3); font-size: .95rem; }
.done-card { padding: 40px 36px; }
.done-card .i { width: 48px; height: 48px; color: var(--good); margin-bottom: 12px; }

.side { display: grid; gap: 36px; }
.side h2 { font-size: 1.3rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.count { font: 700 .9rem/1 var(--sans); background: var(--blue); color: var(--on-blue); border-radius: 99px; min-width: 28px; height: 28px; padding: 0 9px; display: inline-grid; place-items: center; }
.count.rose { background: var(--rose); color: #fff; }
.sendbox { padding: 26px 28px; display: grid; gap: 14px; }
.goal-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 1.08rem; font-weight: 600; }
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .6s var(--ease); }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--paper); }
.stepper button { width: 40px; height: 38px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 1.15rem; }
.stepper button:hover { background: var(--tint-2); }
.stepper b { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.autoline { display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: .98rem; }
.mobile-only { display: none; }

.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none; cursor: pointer; transition: border-color .18s; }
.item:hover { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.item b { display: block; font-size: 1.04rem; line-height: 1.3; overflow-wrap: anywhere; }
.item .muted { font-size: .92rem; margin-top: 3px; }
.item .go { color: var(--ink-3); }
.item p { margin: 4px 0 0; font-size: .95rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.empty { padding: 24px 26px; border: 2px dashed var(--line); border-radius: var(--r-panel); color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }
.plan-h { margin: 40px 0 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--good); animation: pulse 1.6s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; } }
.feed { display: grid; gap: 10px; font-size: .95rem; color: var(--ink-2); }
.feed div { display: flex; gap: 12px; }
.feed time { color: var(--ink-3); min-width: 46px; font-variant-numeric: tabular-nums; }

/* ---------- rows (Leads) ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 22px; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: var(--r-ctl); cursor: pointer; transition: border-color .18s; }
.lead:hover { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.lead .name { font-weight: 600; font-size: 1.12rem; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lead .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead .name .i { color: var(--rose); }
.lead .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .93rem; color: var(--ink-2); margin-top: 5px; align-items: center; }
.lead .n { display: none; }
.mini { display: flex; gap: 6px; }
.mini button { min-height: 44px; padding: 0 14px; border-radius: 99px; border: 2px solid var(--line); background: var(--paper); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .92rem; cursor: pointer; transition: color .15s, border-color .15s, transform .12s var(--ease); }
.mini button:hover { color: var(--ink); }
.mini button:active { transform: scale(.95); }
.mini button.liked { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 45%, transparent); background: var(--rose-tint); }

/* tabs: wrap on desktop, 2-column grid on phones (never sideways scroll) */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.tabs button { min-height: 52px; padding: 0 20px; border-radius: var(--r-ctl); border: 2px solid var(--line); background: var(--paper); color: var(--ink-2);
  font-weight: 600; font-size: 1rem; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.tabs button em { font-style: normal; opacity: .8; font-variant-numeric: tabular-nums; }
.searchbar { margin-bottom: 16px; }
.searchbar input { max-width: 560px; }
.more { padding-top: 16px; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; opacity: 0; transition: opacity .26s var(--ease); }
.scrim.open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 100vw); z-index: 41; background: var(--bg); border-left: 1px solid var(--line);
  overflow-y: auto; transform: translateX(104%); transition: transform .34s var(--ease); overscroll-behavior: contain; }
.drawer.open { transform: none; }
.drawer .dh { position: sticky; top: 0; z-index: 2; display: flex; gap: 12px; align-items: flex-start; padding: 22px 28px; border-bottom: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.drawer .dh h2 { flex: 1; font-size: 1.8rem; line-height: 1.2; overflow-wrap: anywhere; }
.drawer .db { padding: 24px 28px 70px; display: grid; gap: 24px; }
.facts { display: grid; gap: 12px; font-size: 1.02rem; }
.facts div { display: flex; gap: 12px; align-items: center; min-width: 0; }
.facts .i { color: var(--blue); }
.facts a, .facts span { overflow-wrap: anywhere; }
.letter { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-panel); padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.letter textarea { min-height: 320px; font-size: 1.02rem; line-height: 1.6; }
.msgs { display: grid; gap: 12px; }
.msg { padding: 16px 18px; border-radius: var(--r-ctl); background: var(--paper); border: 1px solid var(--line-2); font-size: 1rem; }
.msg.out { background: var(--tint-2); border-color: transparent; margin-left: 36px; }
.msg.in { margin-right: 36px; }
.msg .mh { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--ink-3); margin-bottom: 8px; flex-wrap: wrap; }
.msg pre { margin: 0; white-space: pre-wrap; font: inherit; color: var(--ink); overflow-wrap: anywhere; }
.menu { position: relative; display: inline-block; }
.pop { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; min-width: 180px; padding: 6px; border-radius: var(--r-ctl); background: var(--paper);
  border: 1px solid var(--line); box-shadow: 0 20px 44px -16px rgba(13, 19, 48, .4); display: grid; transform-origin: top left; animation: popIn .16s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } }
.pop button { text-align: left; padding: 11px 12px; border: 0; background: transparent; color: var(--ink); border-radius: 10px; font-weight: 600; font-size: .98rem; cursor: pointer; }
.pop button:hover { background: var(--tint-2); }

/* ---------- Mail ---------- */
.mail { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px; align-items: start; }
.mlist { display: grid; gap: 8px; }
.mrow { padding: 14px 16px; border-radius: var(--r-ctl); cursor: pointer; display: grid; gap: 3px; border: 1px solid var(--line-2); background: var(--paper); }
.mrow:hover { border-color: color-mix(in srgb, var(--blue) 35%, var(--line)); }
.mrow.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.mrow .t { display: flex; justify-content: space-between; gap: 10px; }
.mrow .t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow.unread .t b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-right: 8px; vertical-align: 2px; }
.mrow .s { font-size: .9rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { min-height: 320px; }
.replybox { display: grid; gap: 12px; margin-top: 20px; }

/* ---------- Find ---------- */
.find { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.niches { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.niche { text-align: left; padding: 16px 18px; border-radius: var(--r-ctl); border: 2px solid var(--line-2); background: var(--paper); color: var(--ink);
  cursor: pointer; display: grid; gap: 4px; transition: border-color .15s, background .15s, transform .12s var(--ease); }
.niche:hover { border-color: var(--line); }
.niche:active { transform: scale(.98); }
.niche.on { border-color: var(--blue); background: var(--tint-2); }
.niche b { font-weight: 600; font-size: 1.02rem; }
.niche span { font-size: .9rem; color: var(--ink-2); }
.niche small { font-size: .85rem; color: var(--blue); font-weight: 600; }
.cities { display: flex; flex-wrap: wrap; gap: 8px; }
.cities button { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid var(--line); background: var(--paper); color: var(--ink-2); font-weight: 600; font-size: .95rem; cursor: pointer; }
.cities button.on { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.addrow { display: flex; gap: 10px; margin-top: 14px; }
.units { display: grid; font-size: 1rem; }
.units div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.units div:first-child { border-top: 0; }
.findbar { position: sticky; bottom: 20px; z-index: 5; margin-top: 26px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px;
  border-radius: var(--r-panel); background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow); backdrop-filter: blur(10px); }

/* ---------- Setup ---------- */
.steps { display: grid; gap: 20px; }
.vars { display: flex; flex-wrap: wrap; gap: 8px; }
.vars button { min-height: 36px; padding: 0 12px; border-radius: 99px; border: 2px dashed var(--line); background: transparent; color: var(--blue); font-weight: 600; font-size: .85rem; cursor: pointer; }
.preview { background: var(--paper-2); border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 18px; font-size: 1rem; white-space: pre-wrap; color: var(--ink-2); overflow-wrap: anywhere; }
.preview b { color: var(--ink); display: block; margin-bottom: 10px; }
.ibox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line-2); }
.ibox:first-child { border-top: 0; }
.ibox .em { font-weight: 600; overflow-wrap: anywhere; }
.hrow { padding: 12px 0; border-top: 1px solid var(--line-2); }
.hrow b { color: var(--ink); }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }

/* ---------- toast + login ---------- */
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 60; transform: translate(-50%, 16px); opacity: 0; display: flex; gap: 16px; align-items: center;
  padding: 14px 16px 14px 22px; border-radius: 99px; background: var(--ink); color: var(--bg); box-shadow: 0 18px 40px -14px rgba(13, 19, 48, .5);
  transition: transform .28s var(--ease), opacity .28s var(--ease); max-width: calc(100vw - 32px); font-size: 1rem; font-weight: 500; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast button { border: 0; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.login form { width: min(400px, 100%); display: grid; gap: 18px; }
.login .brand b { font-size: 48px; }
.login .brand { margin: 0 0 8px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .nav a { padding: 11px 12px; }
  .pilot span { display: none; }
  .pilot { padding: 0 14px; }
}
@media (max-width: 960px) {
  .today, .mail, .find, .setup-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .desk-only { display: none !important; }
  .mobile-only { display: grid; }
  .sendbox.mobile-only { margin-bottom: 24px; }
  .thread:has(> .empty) { display: none; }
}
@media (max-width: 760px) {
  :root { --head-h: 64px; --pad: 18px; }
  body { font-size: 18px; }
  .nav { display: none; }
  main { padding: 26px var(--pad) 120px; }
  .brand b { font-size: 24px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; color: var(--ink-3); text-decoration: none; font-size: .72rem; font-weight: 600; position: relative; }
  .tabbar a.on { color: var(--blue); }
  .tabbar .i { width: 24px; height: 24px; }
  .tabbar .badge { position: absolute; top: 0; left: 56%; height: 18px; min-width: 18px; font-size: .65rem; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tabs button { justify-content: space-between; padding: 0 16px; }
  .lead { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 18px; }
  .mini button span { display: none; }
  .mini button { width: 48px; padding: 0; justify-content: center; }
  .form .two { grid-template-columns: 1fr; }
  .card, .sendbox { padding: 22px 20px; }
  .next { padding: 26px 22px 24px; }
  .btn-row-full .btn { flex: 1 1 100%; }
  .drawer .dh, .drawer .db { padding-left: 18px; padding-right: 18px; }
  .msg.out { margin-left: 14px; } .msg.in { margin-right: 14px; }
  .toast { bottom: 96px; }
  .niches { grid-template-columns: 1fr; }
  .alert { grid-template-columns: auto 1fr; }
  .alert .btn { grid-column: 1 / -1; justify-self: start; }
  .findbar { bottom: 86px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.stack { display: grid; gap: 24px; }
.findbar #fpick { flex: 1 1 220px; min-width: 0; }

/* ---------- CASh site effects: blue glow + frosted glass (both themes) ---------- */
:root {  /* light = Silva-plain: solid paper, no glow */
  --glass: var(--paper);
  --glass-row: var(--paper);
  --glass-edge: transparent;
  --glass-line: var(--line-2);
  --glow-a: transparent; --glow-b: transparent; --glow-c: transparent;
  --lift: var(--shadow);
  --corner: transparent;
}
:root[data-theme="dark"] {
  --glass: rgba(14, 18, 40, .58);
  --glass-row: rgba(14, 18, 40, .62);
  --glass-edge: rgba(255, 255, 255, .08);
  --glass-line: rgba(255, 255, 255, .08);
  --glow-a: rgba(46, 82, 255, .34);
  --glow-b: rgba(138, 108, 255, .10);
  --glow-c: rgba(20, 40, 160, .22);
  --lift: 0 30px 90px -30px rgba(18, 50, 220, .45);
  --corner: rgba(61, 102, 255, .24);
}
body::before {
  background:
    radial-gradient(70% 42% at 50% -12%, var(--glow-a), transparent 70%),
    radial-gradient(38% 34% at 92% 28%, var(--glow-b), transparent 70%),
    radial-gradient(45% 40% at 4% 78%, var(--glow-c), transparent 70%);
}
.card, .drawer .letter, .pop { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-edge), var(--lift); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .drawer .letter, :root[data-theme="dark"] .pop {
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.next, .sendbox {
  background: radial-gradient(90% 70% at 100% 0%, var(--corner), transparent 62%), var(--glass);
}
.item, .lead, .mrow, .niche, .msg, .tabs button, .cities button, .sortbtn, .mini button, .btn:not(.primary):not(.ghost), .stepper, .pilot, input, textarea, select {
  background-color: var(--glass-row);
}
.item, .lead, .mrow, .niche { border-color: var(--glass-line); box-shadow: inset 0 1px 0 var(--glass-edge); }
.tabs button.on, .cities button.on { background: var(--blue); }
.niche.on { background: radial-gradient(100% 80% at 100% 0%, var(--corner), transparent 70%), var(--glass-row); }
.msg.out { background: var(--tint-2); }
[data-theme="dark"] .btn.primary {
  background: radial-gradient(120% 140% at 50% 0%, #6a92ff 0%, #3366ff 45%, #2049e0 100%);
  border-color: transparent; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 34px -6px rgba(0, 85, 255, .5);
}
[data-theme="dark"] .btn.primary:hover { background: radial-gradient(120% 140% at 50% 0%, #7a9eff 0%, #4373ff 45%, #2a52ea 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 14px 44px -6px rgba(0, 85, 255, .62); }
[data-theme="dark"] .bar i { background: linear-gradient(90deg, #2049e0, #6a92ff); box-shadow: 0 0 14px rgba(51, 102, 255, .55); }
[data-theme="dark"] .count { background: radial-gradient(120% 140% at 50% 0%, #6a92ff, #2453f0); color: #fff; }
[data-theme="dark"] .drawer { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); }
[data-theme="dark"] .top { background: color-mix(in srgb, var(--bg) 70%, transparent); }
@media (prefers-reduced-transparency: reduce) {
  .card, .drawer, .drawer .letter, .pop, .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--paper); }
}

/* her real CASh logo (white webp from cash.studio-merlin.com), used as a mask so it is white in dark mode, navy in light */
.brand { align-items: center; gap: 14px; }
.brand .logo { display: block; width: 134px; height: 49px; background: var(--ink);
  -webkit-mask: url(/static/cash-logo.webp) left center / contain no-repeat; mask: url(/static/cash-logo.webp) left center / contain no-repeat; }
.brand span { padding-left: 14px; border-left: 1px solid var(--line); line-height: 1.1; }
.login .brand { justify-content: flex-start; }
.login .brand .logo { width: 210px; height: 76px; }
@media (max-width: 760px) { .brand .logo { width: 94px; height: 34px; } .brand span { display: none; } }

/* inbox how-to guide */
.guide details { border-top: 1px solid var(--line, rgba(127,127,127,.2)); padding: 14px 0; }
.guide details:last-child { padding-bottom: 0; }
.guide summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
.guide ol { margin: 10px 0 0; padding-left: 1.3em; display: grid; gap: 6px; }
.replybox .quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
