/* Seafoam Sales. Seafoam's palette (deep green ink, mint, forest green) on a calm, roomy app surface: the score chips,
   stale flags and overdue dates are the only loud things on screen. Light and dark. */
:root {
  --ink: #061E12; --ink-2: #3f4a44; --ink-3: #6b766f; --ink-4: #98a29c;
  --bg: #f6f8f7; --surface: #ffffff; --surface-2: #f0f4f2; --surface-3: #e7eeea; --line: #e2e8e4; --line-2: #d3dcd7;
  --mint: #93E9B3; --mint-soft: #e3f8ea; --green: #1d6b43; --green-2: #155234;
  --good: #1d6b43; --good-bg: #dff5e7; --mid: #8a5a00; --mid-bg: #fff1d6; --low: #6b766f; --low-bg: #eef1ef;
  --bad: #b8322a; --bad-bg: #fdecea; --info: #2856a3; --info-bg: #e7eefb;
  --shadow-1: 0 1px 2px rgba(6,30,18,.06), 0 1px 1px rgba(6,30,18,.04);
  --shadow-2: 0 8px 24px rgba(6,30,18,.10), 0 2px 6px rgba(6,30,18,.06);
  --shadow-3: 0 24px 64px rgba(6,30,18,.22);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --accent: #061E12; --on-accent: #ffffff; --on-green: #ffffff;
  --top: 56px; --col: 284px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7f0eb; --ink-2: #bcc8c1; --ink-3: #8c9a92; --ink-4: #66736c;
    --bg: #08110c; --surface: #0f1a14; --surface-2: #14221a; --surface-3: #1a2b21; --line: #1f2f26; --line-2: #2a3d32;
    --mint: #93E9B3; --mint-soft: #15301f; --green: #93E9B3; --green-2: #b6f0ca;
    --good: #93E9B3; --good-bg: #163222; --mid: #ffc56b; --mid-bg: #33260e; --low: #9aa69f; --low-bg: #1a2620;
    --bad: #ff8a80; --bad-bg: #3a1a18; --info: #9dbcf5; --info-bg: #17223a;
    --accent: #93E9B3; --on-accent: #061E12; --on-green: #061E12;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 24px rgba(0,0,0,.45); --shadow-3: 0 24px 64px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e7f0eb; --ink-2: #bcc8c1; --ink-3: #8c9a92; --ink-4: #66736c;
  --bg: #08110c; --surface: #0f1a14; --surface-2: #14221a; --surface-3: #1a2b21; --line: #1f2f26; --line-2: #2a3d32;
  --mint: #93E9B3; --mint-soft: #15301f; --green: #93E9B3; --green-2: #b6f0ca;
  --good: #93E9B3; --good-bg: #163222; --mid: #ffc56b; --mid-bg: #33260e; --low: #9aa69f; --low-bg: #1a2620;
  --bad: #ff8a80; --bad-bg: #3a1a18; --info: #9dbcf5; --info-bg: #17223a;
  --accent: #93E9B3; --on-accent: #061E12; --on-green: #061E12;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 24px rgba(0,0,0,.45); --shadow-3: 0 24px 64px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* boot + sign-in */
.boot, .signin { height: 100vh; display: grid; place-items: center; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: var(--mint); color: #061E12; display: grid; place-items: center; font-weight: 800; font-size: 20px; letter-spacing: -.02em; flex: none; }
.boot .mark { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }
.signin-card { width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow-2); text-align: center; }
.signin-card .mark { margin: 0 auto 18px; width: 48px; height: 48px; font-size: 26px; border-radius: 13px; }
.signin-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.02em; }
.signin-card p { color: var(--ink-3); margin: 0 0 22px; }

/* layout */
.shell { display: grid; grid-template-rows: var(--top) auto 1fr; height: 100vh; height: 100dvh; }
.top { display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 16px; white-space: nowrap; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; font-size: 16px; }
.brand span { color: var(--ink-3); font-weight: 600; }
.tabs { display: flex; gap: 2px; background: var(--surface-2); border-radius: 9px; padding: 3px; }
.tab { border: 0; background: none; padding: 6px 12px; border-radius: 7px; color: var(--ink-3); font-weight: 600; font-size: 13px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.grow { flex: 1; }
.search { position: relative; width: min(340px, 34vw); }
.search input { width: 100%; height: 34px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 0 34px 0 34px; outline: none; transition: border-color .15s, background .15s; }
.search input:focus { border-color: var(--green); background: var(--surface); }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--ink-4); }
.search kbd { position: absolute; right: 8px; top: 7px; }
kbd { font: 600 11px var(--font); color: var(--ink-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; background: var(--surface); }
.results { position: absolute; top: 40px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); max-height: 60vh; overflow: auto; padding: 4px; display: none; }
.results.open { display: block; }
.result { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 7px; }
.result:hover, .result.active { background: var(--surface-2); }
.result .t { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result .s { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13px; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { opacity: .9; }
.btn.good { background: var(--good-bg); border-color: transparent; color: var(--good); }
.btn.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { width: 34px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); color: var(--ink-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; text-transform: uppercase; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 4px; min-width: 200px; display: none; z-index: 20; }
.menu.open { display: block; }
.menu .who { padding: 8px 10px; color: var(--ink-3); font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu button, .menu a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }

/* sub bar: pipelines + KPIs */
.sub { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; scrollbar-width: none; }
.sub::-webkit-scrollbar { display: none; }
.pipes { display: flex; gap: 6px; }
.pipe { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.pipe[aria-pressed="true"] { background: var(--mint-soft); border-color: transparent; color: var(--green); }
.kpis { display: flex; gap: 22px; margin-left: auto; }
.sync { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; white-space: nowrap; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; }
.sync i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.sync[data-state="wait"] i { background: var(--mid); animation: syncpulse 1.6s ease-in-out infinite; }
.sync[data-state="bad"] { color: var(--bad); }
.sync[data-state="bad"] i { background: var(--bad); }
@keyframes syncpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sync[data-state="wait"] i { animation: none; } }
.kpi { white-space: nowrap; }
.kpi b { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink-3); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* board */
.main { overflow: hidden; position: relative; }
.board { height: 100%; display: flex; gap: 12px; padding: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; }
.col { flex: 0 0 var(--col); width: var(--col); min-width: 0; display: flex; flex-direction: column; background: var(--surface-2); border-radius: var(--r-lg); max-height: 100%; scroll-snap-align: start; border: 1px solid transparent; transition: border-color .15s, background .15s; }
.col.over { border-color: var(--green); background: var(--mint-soft); }
.col-h { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 8px; }
.col-h h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.col-h .n { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.col-h .sum { margin-left: auto; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.col-b { padding: 4px 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.empty-col { color: var(--ink-4); font-size: 12px; text-align: center; padding: 18px 8px; border: 1px dashed var(--line-2); border-radius: var(--r); }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px; box-shadow: var(--shadow-1); cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; user-select: none; position: relative; }
.card:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.card.dragging { opacity: .45; transform: rotate(1.5deg); }
.card.selected { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), var(--shadow-2); }
.card .row { display: flex; align-items: center; gap: 8px; }
.card .co { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.card .ti { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.card .meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: var(--ink-3); font-size: 12px; }
.card .next { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; }
.card .next .d { margin-left: auto; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.card .next .d.late { color: var(--bad); font-weight: 650; }
.card .val { margin-left: auto; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stale-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); flex: none; }
.days.stale { color: var(--bad); font-weight: 650; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.mid { background: var(--mid-bg); color: var(--mid); }
.chip.low { background: var(--low-bg); color: var(--low); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.plain { background: var(--surface-2); color: var(--ink-3); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(6,30,18,.28); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--shadow-3); transform: translateX(104%); transition: transform .26s cubic-bezier(.2,.8,.2,1); z-index: 31; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.d-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); }
.d-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.d-title { font-size: 21px; font-weight: 800; letter-spacing: -.025em; margin: 0; line-height: 1.2; }
.d-sub { color: var(--ink-3); margin-top: 3px; }
.d-body { flex: 1; overflow-y: auto; padding: 4px 20px 40px; }
.d-sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.d-sec:last-child { border-bottom: 0; }
.d-sec h4 { margin: 0 0 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.d-sec h4 .r { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.stepper { display: flex; gap: 3px; margin: 12px 0 2px; }
.step { flex: 1; height: 30px; border: 0; background: var(--surface-2); color: var(--ink-3); font-size: 11.5px; font-weight: 650; border-radius: 5px; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .15s, color .15s; }
.step:hover { background: var(--surface-3); color: var(--ink); }
.step.done { background: var(--mint-soft); color: var(--green); }
.step.now { background: var(--green); color: var(--on-green); }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.banner { margin-top: 12px; padding: 10px 12px; border-radius: var(--r); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.banner.won { background: var(--good-bg); color: var(--good); }
.banner.lost { background: var(--bad-bg); color: var(--bad); }
.banner.note { background: var(--info-bg); color: var(--info); font-weight: 500; }
.banner .btn { margin-left: auto; }

.score { display: flex; gap: 16px; align-items: center; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--ring, var(--green)) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; flex: none; }
.ring b { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.score .why { color: var(--ink-2); }
.score .v { font-weight: 700; margin-bottom: 2px; }
.crit { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; margin-top: 14px; }
.crit .n { font-weight: 600; }
.crit .n small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; width: 30px; height: 26px; border-radius: 6px; font-weight: 700; color: var(--ink-3); font-size: 12.5px; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg button[aria-pressed="true"].pulse { color: var(--info); }
.fit { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-weight: 650; }
.bar { flex: 1; height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }

.props { display: grid; grid-template-columns: 140px 1fr; gap: 2px 12px; }
.props .k { color: var(--ink-3); padding: 7px 0; font-size: 13px; }
.props .v { padding: 3px 0; min-width: 0; }
.edit { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 7px; padding: 4px 8px; margin-left: -8px; min-height: 30px; overflow-wrap: anywhere; }
.edit:hover { background: var(--surface-2); }
.edit.empty { color: var(--ink-4); }
.edit-in { width: 100%; height: 32px; border: 1px solid var(--green); border-radius: 7px; padding: 0 8px; background: var(--surface); outline: none; margin-left: -8px; box-shadow: 0 0 0 3px var(--mint-soft); }
textarea.edit-in { height: auto; min-height: 80px; padding: 8px; resize: vertical; }
details.more summary { cursor: pointer; color: var(--ink-3); font-weight: 600; font-size: 13px; padding: 6px 0; list-style: none; }
details.more summary::before { content: "▸ "; }
details.more[open] summary::before { content: "▾ "; }

.composer { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--mint-soft); }
.composer textarea { width: 100%; border: 0; outline: none; background: none; resize: none; padding: 10px 12px; min-height: 44px; }
.composer .bar2 { display: flex; justify-content: flex-end; padding: 0 8px 8px; gap: 8px; align-items: center; color: var(--ink-4); font-size: 12px; }
.tl { list-style: none; margin: 14px 0 0; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.ev { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 7px 0; position: relative; }
.ev .ic { width: 27px; height: 27px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; border: 2px solid var(--surface); z-index: 1; }
.ev.won .ic { background: var(--good-bg); } .ev.lost .ic { background: var(--bad-bg); } .ev.score .ic, .ev.alert .ic { background: var(--info-bg); }
.ev .h { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--ink-3); }
.ev .h b { color: var(--ink); font-weight: 650; }
.ev .h time { margin-left: auto; white-space: nowrap; }
.ev .h .via { font-size: 11px; font-weight: 650; color: var(--ink-3); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.ev .h .lock { font-size: 11px; font-weight: 650; color: var(--mid); background: var(--mid-bg); border-radius: 999px; padding: 1px 7px; }
.ev-hide { border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer; padding: 0 2px; opacity: 0; }
.ev:hover .ev-hide, .ev-hide:focus-visible { opacity: 1; }
.ev-hide:hover { color: var(--bad); }
@media (hover: none) { .ev-hide { opacity: 1; } }
.ev .b { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.ev .b.box { background: var(--surface-2); border-radius: var(--r); padding: 9px 11px; }
.ev.minor .b { margin-top: 0; }

/* history + reports */
.page { height: 100%; overflow: auto; padding: 20px 16px 60px; }
.page-in { max-width: 1120px; margin: 0 auto; }
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .muted { color: var(--ink-3); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.panel h3 { margin: 0 0 4px; font-size: 15px; letter-spacing: -.01em; }
.panel p.note { margin: 0 0 12px; color: var(--ink-3); font-size: 12.5px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr 44px; gap: 8px; align-items: center; margin: 7px 0; font-size: 13px; }
.hbar .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar .t { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.hbar .t i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.hbar .t i.alt { background: var(--mint); }
.hbar .n { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.cols { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 8px; }
.cols .c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; min-width: 0; position: relative; }
.cols .c i { display: block; background: var(--green); border-radius: 3px 3px 0 0; min-height: 2px; }
.cols .c i.sp { background: var(--line-2); border-radius: 0; }
.cols .c:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 11px; padding: 3px 7px; border-radius: 5px; white-space: nowrap; margin-bottom: 4px; }
.axis { display: flex; gap: 4px; color: var(--ink-4); font-size: 10.5px; margin-top: 4px; }
.axis span { flex: 1; text-align: left; white-space: nowrap; overflow: visible; min-width: 0; }
.legend { display: flex; gap: 14px; color: var(--ink-3); font-size: 12px; margin-top: 8px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--green); margin-right: 5px; }
.legend i.sp { background: var(--line-2); }
.big { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 16px; }

/* modal */
.modal { position: fixed; inset: 0; display: none; place-items: center; z-index: 40; background: rgba(6,30,18,.32); padding: 16px; }
.modal.open { display: grid; }
.modal-card { width: min(480px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); padding: 20px; animation: pop .16s ease-out; }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }
.modal-card h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: -.02em; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.form label.full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { height: 36px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; background: var(--surface); color: var(--ink); font-weight: 500; font-size: 14px; outline: none; }
.form textarea { height: 80px; padding: 8px 10px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--mint-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--bad); color: #fff; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--r); height: 74px; }
@keyframes sk { to { background-position: -200% 0; } }

/* phone */
.only-phone { display: none; }
@media (max-width: 760px) {
  :root { --col: 86vw; }
  .top { gap: 8px; padding: 0 12px; }
  .brand span, .search kbd, .hide-phone { display: none; }
  .brand { font-size: 0; gap: 0; }
  .search { width: auto; flex: 1; min-width: 36px; }
  .search input { padding-right: 8px; }
  .top .btn.primary { width: 34px; padding: 0; }
  .tabs .tab { padding: 6px 9px; }
  .grow { display: none; }
  .only-phone { display: inline-flex; }
  .kpis { gap: 16px; }
  .board { padding: 12px; gap: 10px; scroll-snap-type: x mandatory; }
  .drawer { width: 100vw; }
  .d-head, .d-body { padding-left: 16px; padding-right: 16px; }
  .props { grid-template-columns: 112px 1fr; }
  .form { grid-template-columns: 1fr; }
  .step { font-size: 0; height: 10px; }
  .table .hide-phone { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Price line and chance of closing (Nikki 2026-10-16: "the most important info alongside probability of closing"). */
.card .price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; font-weight: 700; font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.card .price i { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--ink-4); }
.card .price.none { font-weight: 500; font-size: 12.5px; color: var(--ink-4); letter-spacing: 0; }
.odds { display: inline-flex; align-items: baseline; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 22px; font-variant-numeric: tabular-nums; }
.odds b { font-size: 12.5px; font-weight: 750; }
.odds.good { background: var(--good-bg); color: var(--good); }
.odds.mid { background: var(--mid-bg); color: var(--mid); }
.odds.low { background: var(--low-bg); color: var(--low); }
.oddsbar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 2px 0 12px; }
.oddsbar i { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.oddsbar i.good { background: var(--good); } .oddsbar i.mid { background: var(--mid); } .oddsbar i.low { background: var(--low); }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.why-list li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; color: var(--ink-2); font-size: 13px; }
.why-list li b { font-variant-numeric: tabular-nums; color: var(--ink-3); flex: none; }
.why-list li b.up { color: var(--good); } .why-list li b.down { color: var(--bad); }
.why-list li span em { display: block; font-style: normal; font-weight: 700; color: var(--ink); font-size: 12.5px; }
.why-list li { padding: 6px 0; border-top: 1px solid var(--line); }
.why-list li:first-child { border-top: 0; }
.why-list li b.zero { color: var(--ink-4); }
.why-list li.total { border-top: 1px solid var(--line-2); font-weight: 700; }
.why-list li.total b { color: var(--ink); font-size: 15px; }
.d-sec p.how { margin: 10px 0 0; color: var(--ink-3); font-size: 12px; line-height: 1.45; }
.table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Home: the dashboard (Nikki 2026-10-16). */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .l { color: var(--ink-3); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.tile b { font-size: 28px; font-weight: 780; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .s { color: var(--ink-2); font-size: 12.5px; line-height: 1.35; }
.home .panel.snap { margin-bottom: 14px; }
.panel .ph { display: flex; align-items: center; gap: 10px; }
.panel .ph h3 { flex: 1; }
.srow { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 34px minmax(0, 150px) 120px; gap: 12px; align-items: center; width: 100%; padding: 8px 6px; margin: 0 -6px; border: 0; background: none; border-radius: 8px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.srow:hover { background: var(--surface-2); }
.srow .sn { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .sb { height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.srow:hover .sb { background: var(--bg); }
.srow .sb i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.srow .sc { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.srow .sm { color: var(--ink-2); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow .so { display: flex; gap: 6px; justify-content: flex-end; }
.drow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; margin: 0 -6px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.drow:first-of-type { border-top: 0; }
.drow:hover { background: var(--surface-2); border-radius: 8px; }
.drow .dn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drow .dn b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow .dn small { color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .tile { padding: 12px; }
  .tile b { font-size: 22px; }
  .tile .l { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .srow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 22px auto; gap: 8px; }
  .srow .so .chip { display: none; }
  .panel { padding: 14px; }
  .panel .ph .btn { padding: 0 8px; }
  .tabs .tab { padding: 6px 7px; font-size: 12.5px; }
  .tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; flex: none; }
  .brand { display: none; }
  .top .avatar { width: 30px; height: 30px; flex: none; }
  .srow .sm { display: none; }
}

/* ---------- pricing on the deal page (leadership only) ---------- */
.pq-now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--mint-soft); }
.pq-now b { display: block; font-size: 17px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pq-now small { color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.pq-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.pq-list button { width: 100%; min-width: 0; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 9px 12px; }
.pq-list button:hover { border-color: var(--line-2); background: var(--surface-2); }
.pq-list button > span { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pq-list small { flex-basis: 100%; min-width: 0; max-width: 100%; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-list time { color: var(--ink-4); font-size: 12px; white-space: nowrap; }
.pq-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- the calculator sheet ---------- */
.calc { position: fixed; inset: 0; z-index: 35; background: rgba(6,30,18,.32); display: none; padding: 16px; }
.calc.open { display: block; }
.calc-in { height: 100%; max-width: 1240px; margin: 0 auto; background: var(--bg); border-radius: var(--r-lg); box-shadow: var(--shadow-3); display: flex; flex-direction: column; overflow: hidden; animation: pop .18s ease-out; }
.calc-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.calc-t { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; }
.calc-t input { border: 1px solid transparent; background: none; font: inherit; font-size: 18px; font-weight: 750; letter-spacing: -.02em; color: var(--ink); padding: 3px 6px; border-radius: 7px; min-width: 0; outline: none; }
.calc-t input:hover { border-color: var(--line); }
.calc-t input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--mint-soft); }
.calc-t small { grid-column: 2; color: var(--ink-3); font-size: 12.5px; padding-left: 7px; }
.calc-hb { display: flex; gap: 6px; align-items: center; }
.calc-b { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.calc-form { overflow-y: auto; padding: 16px 20px 60px; display: grid; gap: 14px; align-content: start; }
.calc-side { overflow-y: auto; padding: 16px 18px 40px; background: var(--surface); border-left: 1px solid var(--line); }
.calc-bar { display: none; }
.cs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.cs h3 { margin: 0 0 12px; font-size: 15px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.cs h3 .num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.cs p.how { margin: -4px 0 12px; }
.sub-h { margin: 16px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 700; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opt { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--line-2); }
.opt b { font-size: 13.5px; }
.opt small { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.opt[aria-checked="true"] { border-color: var(--green); background: var(--mint-soft); box-shadow: inset 0 0 0 1px var(--green); }
.pt { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
b + .pt { margin-left: 6px; }
.opt .pt { margin-left: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.pill[aria-pressed="true"] { border-color: var(--green); background: var(--mint-soft); color: var(--ink); }
.tgls { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-bottom: 10px; }
.tgl { display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 10px 12px; }
.tgl > span:last-child { display: flex; flex-direction: column; }
.tgl small { color: var(--ink-3); font-size: 12px; }
.tgl[aria-pressed="true"] { border-color: var(--green); background: var(--mint-soft); }
.sw { flex: none; width: 30px; height: 18px; border-radius: 999px; background: var(--line-2); position: relative; margin-top: 1px; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .15s; }
.tgl[aria-pressed="true"] .sw { background: var(--green); }
.tgl[aria-pressed="true"] .sw::after { transform: translateX(12px); }
.stps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.stp { display: flex; align-items: center; gap: 12px; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--r); padding: 9px 12px; }
.stp > div:first-child { min-width: 0; }
.stp b { font-size: 13.5px; }
.stp small { display: block; color: var(--ink-3); font-size: 12px; }
.stp-c { flex: none; display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.stp-c button { width: 30px; height: 30px; border: 0; background: none; border-radius: 7px; font-size: 17px; font-weight: 700; color: var(--ink-2); }
.stp-c button:hover:not([disabled]) { background: var(--surface); box-shadow: var(--shadow-1); }
.stp-c button[disabled] { opacity: .35; }
.stp-c input { width: 38px; text-align: center; border: 0; background: none; font: inherit; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; outline: none; }
.addons { display: grid; gap: 10px; margin-bottom: 10px; }
.addon { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 8px; background: var(--surface-2); }
.addon .ar { display: flex; gap: 6px; }
.addon select, .addon input, .addon textarea, .calc-form > .cs textarea { width: 100%; min-width: 0; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; outline: none; }
.addon textarea, .calc-form > .cs textarea { height: auto; padding: 8px 10px; resize: vertical; }
.addon select:focus, .addon input:focus, .addon textarea:focus, .calc-form > .cs textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--mint-soft); }
.addon .ag { display: grid; grid-template-columns: 2fr .6fr 1fr 1fr; gap: 8px; }
.addon label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.flag { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.flag input { margin-top: 2px; accent-color: var(--green); }
.flag:has(input:checked) { border-color: var(--green); background: var(--mint-soft); }
.lvl { margin-top: 10px; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.side-tabs { display: inline-flex; margin-bottom: 14px; }
.tot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tot > div { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.tot span { display: block; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.tot b { font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tot i { font-style: normal; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.ondeal { margin-top: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; gap: 2px; }
.ondeal span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; font-weight: 700; }
.ondeal b { font-size: 18px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ondeal small { opacity: .8; font-size: 12.5px; }
.warns { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.warns li { background: var(--mid-bg); color: var(--mid); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; font-weight: 600; }
.lines h5 { margin: 16px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.lines ul { list-style: none; margin: 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.lines li span { color: var(--ink-2); min-width: 0; }
.lines li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines li.none { color: var(--ink-4); }
.scope-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scope-top .how { margin: 0; }
.tokens { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--info-bg); color: var(--info); font-size: 12.5px; }
.tokens ul { margin: 6px 0 0; padding-left: 18px; }
.scope-doc { margin-top: 14px; font-size: 13.5px; line-height: 1.5; }
.scope-doc h2 { font-size: 15px; margin: 18px 0 6px; letter-spacing: -.01em; }
.scope-doc p { margin: 6px 0; }
.scope-doc ul { margin: 4px 0 10px; padding-left: 20px; }
.scope-doc mark { background: var(--mid-bg); color: var(--mid); border-radius: 4px; padding: 0 3px; font-weight: 600; }
@media (max-width: 960px) {
  .calc { padding: 0; }
  .calc-in { border-radius: 0; }
  .calc-b { grid-template-columns: 1fr; overflow-y: auto; }
  .calc-form, .calc-side { overflow: visible; }
  .calc-side { border-left: 0; border-top: 1px solid var(--line); padding-bottom: 90px; }
  .calc-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
  .calc-hb #c-copy, .calc-hb #c-use { display: none; }
  .calc-form { padding: 12px 12px 20px; }
  .addon .ag { grid-template-columns: 1fr 1fr; }
}
