
/* Layout: fixed left rail + one dense working table per screen; detail opens inline, never in a modal. */
:root { --bg: #f6f6fb; --surface: #ffffff; --sunken: #f1f0f8; --line: #e5e3f0; --line-strong: #cfcbe3; --fg: #15132b; --fg-2: #3d3a57; --muted: #6e6b86; --faint: #9a97b2; --accent: #4636f5; --accent-soft: #eeecfe; --accent-fg: #ffffff; --accent-deep: #2e22c8; --pink: #ff6fd8; --good: #16794a; --good-soft: #e2f4ea; --warn: #9a5800; --warn-soft: #fcefd9; --bad: #b4313b; --bad-soft: #fbe5e6; --reddit: #c2410c; --reddit-soft: #fdeee4; --agg: #5b3fb3; --agg-soft: #efe9fb; --pub: #136f63; --pub-soft: #e6f4f1; --shadow: 0 1px 2px rgba(21,19,43,.05), 0 4px 16px rgba(21,19,43,.04); --font: "Manrope", "Helvetica Neue", Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0f0e1a; --surface: #17162a; --sunken: #121122; --line: #2a2843; --line-strong: #3a3759; --fg: #ecebf7; --fg-2: #c9c7de; --muted: #9592b0; --faint: #6f6c8c; --accent: #8b80ff; --accent-soft: #241f5c; --accent-fg: #100c3a; --accent-deep: #a79fff; --pink: #ff8fe1; --good: #5fcf96; --good-soft: #14301f; --warn: #e8b55d; --warn-soft: #362810; --bad: #f28b93; --bad-soft: #3b1b20; --reddit: #f39a62; --reddit-soft: #33200f; --agg: #c3b0f5; --agg-soft: #2a2140; --pub: #7fd6c6; --pub-soft: #13302b; --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #0f0e1a; --surface: #17162a; --sunken: #121122; --line: #2a2843; --line-strong: #3a3759; --fg: #ecebf7; --fg-2: #c9c7de; --muted: #9592b0; --faint: #6f6c8c; --accent: #8b80ff; --accent-soft: #241f5c; --accent-fg: #100c3a; --accent-deep: #a79fff; --pink: #ff8fe1; --good: #5fcf96; --good-soft: #14301f; --warn: #e8b55d; --warn-soft: #362810; --bad: #f28b93; --bad-soft: #3b1b20; --reddit: #f39a62; --reddit-soft: #33200f; --agg: #c3b0f5; --agg-soft: #2a2140; --pub: #7fd6c6; --pub-soft: #13302b; --shadow: none; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.app { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100%; }
.rail { border-right: 1px solid var(--line); background: var(--surface); padding: 18px 12px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brandmark { display: flex; align-items: center; gap: 9px; padding: 0 8px; }
.brandmark .sq { width: 22px; height: 22px; border-radius: 5px; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.brandmark b { font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.brandmark span { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.2; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--sunken); color: var(--fg); }
.nav a.on { background: var(--sunken); color: var(--fg); }
.nav a .n { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.nav a.later { color: var(--faint); pointer-events: none; }
.nav a.later em { font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.navlabel { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: 0 8px 4px; }
.rail .me { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 11.5px; flex: none; }
.me small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.2; }

main { min-width: 0; padding-block: 22px 60px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.sub { color: var(--muted); margin-top: 3px; }
.sample { font-family: var(--mono); font-size: 11px; color: var(--warn); background: var(--warn-soft); padding: 2px 7px; border-radius: 4px; }

.btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; padding: 5px 11px; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--sunken); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--fg); background: var(--sunken); }
.btn.sm { padding: 3px 8px; font-size: 12.5px; }
.kbd { font-family: var(--mono); font-size: 10.5px; color: var(--faint); border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 4px; }

/* Summary strip */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.strip > div { padding: 12px 16px; border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip .lab { color: var(--muted); font-size: 12px; }
.strip .val { font-family: var(--mono); font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 2px; }
.strip .val small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.meter { height: 4px; border-radius: 2px; background: var(--sunken); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

/* Sections + tables */
.section { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.section-h h2 { font-size: 13.5px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-h h2 .c { font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 12px; }
.section-h p { margin: 0; color: var(--muted); font-size: 12.5px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px; padding: 7px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sunken); }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child > td { border-bottom: 0; }
tbody tr.row { cursor: pointer; }
tbody tr.row:hover > td { background: var(--sunken); }
tr.open > td { background: var(--sunken); }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.brandcell { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.logo { width: 22px; height: 22px; border-radius: 5px; background: var(--sunken); border: 1px solid var(--line); display: grid; place-items: center; font-size: 10.5px; font-weight: 600; color: var(--muted); flex: none; text-transform: uppercase; }
.brandcell b { font-weight: 500; }
.brandcell a { text-decoration: none; }
.brandcell a:hover { text-decoration: underline; }
.dim { color: var(--muted); }
.why { color: var(--muted); max-width: 340px; min-width: 210px; }
.who { min-width: 160px; }
@media (max-width: 1180px) { .col-preview { display: none; } }
.who b { font-weight: 500; }
.who span { display: block; color: var(--muted); font-size: 12px; }
.preview { color: var(--muted); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag { font-size: 11.5px; color: var(--warn); display: block; margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; border-radius: 4px; padding: 1px 7px; white-space: nowrap; }
.pill.cpa { background: var(--accent-soft); color: var(--accent); }
.pill.reddit { background: var(--reddit-soft); color: var(--reddit); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.plain { background: var(--sunken); color: var(--muted); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.grade { font-family: var(--mono); font-size: 11.5px; font-weight: 500; width: 20px; height: 20px; border-radius: 4px; display: inline-grid; place-items: center; background: var(--sunken); }
.grade.A { background: var(--good-soft); color: var(--good); }
.grade.B { background: var(--accent-soft); color: var(--accent); }
.grade.C { background: var(--warn-soft); color: var(--warn); }

.actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

/* Inline email editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; padding: 4px 4px 8px; }
.mail { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.mail .hdr { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 4px 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mail .hdr span { color: var(--muted); }
.mail .hdr input { border: 0; background: transparent; font: inherit; color: var(--fg); padding: 0; width: 100%; }
.mail textarea { width: 100%; border: 0; background: transparent; resize: vertical; font: inherit; color: var(--fg); padding: 12px 14px; min-height: 190px; line-height: 1.6; display: block; }
.mail .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.side h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.side ul { margin: 0 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.side li { display: flex; gap: 7px; }
.side li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); margin-top: 8px; flex: none; }
.rules li::before { background: var(--good); }

.done td { color: var(--muted); }
.donemsg { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.donemsg b { color: var(--good); font-weight: 500; }

.skipbox { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.skipbox span { color: var(--muted); font-size: 12px; margin-right: 2px; }

.replytext { border-left: 2px solid var(--line-strong); padding: 2px 0 2px 10px; color: var(--fg); margin: 2px 0 6px; max-width: 480px; }

/* Brand page */
.crumb { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.bhead { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.bhead .logo { width: 40px; height: 40px; font-size: 15px; border-radius: 8px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pad { padding: 14px 16px; }
.facts { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 9px 14px; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.internal { display: inline-flex; gap: 5px; align-items: center; font-size: 11px; color: var(--bad); background: var(--bad-soft); border-radius: 4px; padding: 1px 6px; margin-left: 6px; }
.bars { display: flex; gap: 6px; align-items: flex-end; height: 56px; margin-top: 8px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars i { display: block; width: 100%; background: var(--accent); opacity: .85; border-radius: 3px 3px 0 0; }
.bars span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.hook { line-height: 1.6; }
select { font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px 6px; font-size: 12.5px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { font-family: var(--mono); color: var(--muted); font-size: 11.5px; }
.timeline .by { color: var(--muted); }
.names { display: flex; gap: 6px; flex-wrap: wrap; }
.names .pill { font-weight: 400; }
.nextbox { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--accent-soft); border-radius: 8px; }
.nextbox b { font-weight: 600; }
.nextbox p { margin: 0; }

/* Pipeline */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tabs button .c { font-family: var(--mono); font-size: 11px; margin-left: 5px; color: var(--faint); }
.tabs button.on { background: var(--sunken); color: var(--fg); }
.tabs button:hover { color: var(--fg); }

.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(16px); background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 7px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 20; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0,1fr); }
  .rail { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px max(16px, env(safe-area-inset-left, 0px)); gap: 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .rail .me, .navlabel, .nav a.later, .brandmark span { display: none; }
  .nav { flex-direction: row; }
  main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .grid2, .editor { grid-template-columns: minmax(0,1fr); }
  .facts { grid-template-columns: 110px minmax(0,1fr); }
}

/* app additions */
.banner { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 14px; border-radius:8px; background:var(--warn-soft); color:var(--warn); font-size:13px; }
.banner b { font-weight:600; }
.empty { padding:22px 16px; color:var(--muted); text-align:center; }
.search { border:1px solid var(--line-strong); background:var(--surface); border-radius:6px; padding:5px 10px; font:inherit; color:var(--fg); min-width:200px; }
.gate { min-height:100%; display:grid; place-items:center; padding:24px; }
.gate .card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:28px; max-width:360px; width:100%; display:flex; flex-direction:column; gap:14px; }
.spin { opacity:.6; pointer-events:none; }
.kv { display:grid; grid-template-columns:160px minmax(0,1fr); gap:10px 14px; }
.kv dt { color:var(--muted); } .kv dd { margin:0; }
.small { font-size:12px; }
.err { color:var(--bad); }
.instr { display:flex; gap:6px; margin-top:6px; } .instr input { flex:1; border:1px solid var(--line-strong); border-radius:5px; padding:3px 8px; font:inherit; font-size:12.5px; background:var(--surface); color:var(--fg); }
.eyebrow { margin:0 0 6px; font-size:11.5px; font-weight:500; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.caution { font-size: 11.5px; color: var(--bad); display: block; margin-top: 3px; font-weight: 500; }
.notebox { width: 100%; min-height: 70px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 9px; font: inherit; font-size: 13px; color: var(--fg); background: var(--surface); resize: vertical; }
.btn.err { color: var(--bad); }

.chip2 { display: inline-flex; align-items: center; gap: 4px; background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font-size: 12.5px; margin: 1px 0; }
.chip2 .x { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 0 2px; }
.report { white-space: pre-wrap; font-family: var(--font); font-size: 13px; line-height: 1.55; margin: 0 0 6px; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* navigation */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: -6px; }
.backbtn { font-weight: 500; color: var(--fg); border: 1px solid var(--line-strong); background: var(--surface); }
.prevnext { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-bottom: -10px; }
.btn.disabled { opacity: .4; pointer-events: none; }
.rail .nav + .nav { margin-top: 4px; }
.kbdhint { text-align: center; padding: 4px 0 10px; }
/* team scorecards */
.scores { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.score .big { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; margin: 2px 0; }
.score.bad { border-color: var(--bad); }
.score.bad .big { color: var(--bad); }
/* meetings */
.meeting .mhead { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
/* reports */
.weekbars { display: flex; gap: 14px; align-items: flex-end; height: 140px; margin: 8px 0 10px; }
.weekbars .wk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.weekbars .stack { display: flex; flex-direction: column-reverse; width: 100%; max-width: 48px; height: 96px; justify-content: flex-start; }
.weekbars i { display: block; width: 100%; }
.weekbars i.fi, .lg.fi { background: var(--accent); }
.weekbars i.fu, .lg.fu { background: var(--accent-soft); border: 1px solid var(--accent); }
.weekbars span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.weekbars b { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin: 0 4px 0 8px; }
@media (max-width: 900px) { .scores { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rail .navlabel { display: none; } }

.btn.li { color: #0a66c2; border-color: color-mix(in srgb, #0a66c2 40%, var(--line-strong)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.li { color: #70b5f9; } }
.reach { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill.agg { background: #efe9fb; color: #5b3fb3; }
.pill.pub { background: #e6f4f1; color: #136f63; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.agg { background: #2a2140; color: #c3b0f5; } :root:not([data-theme="light"]) .pill.pub { background: #13302b; color: #7fd6c6; } }
.trackchips { margin-bottom: -10px; }
.mixin { min-width: 0 !important; width: 52px; }
.testtools summary { cursor: pointer; list-style: none; }
.testtools summary::-webkit-details-marker { display: none; }
.testtools summary::before { content: "▸ "; color: var(--muted); }
.testtools[open] summary::before { content: "▾ "; }
.liedit { display: inline-flex; gap: 4px; align-items: center; }
.liedit input { min-width: 0; width: 230px; padding: 3px 8px; font-size: 12px; }
.lilink { font-size: 11.5px; padding: 2px 6px; }
.guide-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; }
.guide-step h3 { margin: 2px 0 4px; font-size: 14.5px; font-weight: 600; }
.guide-step p { margin: 0; color: var(--fg); line-height: 1.6; max-width: 72ch; }
.gnum { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--mono); font-weight: 500; }

/* simplified Today */
.statusline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: -10px; }
.statusline .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.statusline a { color: var(--accent); }
.todaytabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: -10px; }
.todaytabs button { border: 0; background: transparent; padding: 9px 14px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; }
.todaytabs button.on { color: var(--fg); border-bottom-color: var(--accent); }
.todaytabs .c { font-family: var(--mono); font-size: 11.5px; margin-left: 6px; background: var(--sunken); border-radius: 9px; padding: 1px 7px; }
.todaytabs button.on .c { background: var(--accent-soft); color: var(--accent); }
.rail .nav.more a { font-size: 13px; padding: 4px 8px; }
.rail .nav.main a { font-size: 14px; padding: 7px 8px; }

/* brand page: people list */
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.people li:last-child { border-bottom: 0; }
.people .pact { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kebab { position: relative; }
.kebab summary { list-style: none; cursor: pointer; padding: 2px 8px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.kebab summary::-webkit-details-marker { display: none; }
.kebab summary:hover { background: var(--sunken); }
.kebab .menu { position: absolute; right: 0; top: 28px; z-index: 5; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 230px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.moreinfo summary { cursor: pointer; color: var(--muted); font-size: 13px; }

.filters { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: -10px; }
.filters .trackchips { margin-bottom: 0; }
.ownerline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-top: -8px; }
.addperson { display: flex; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.addperson input { min-width: 0; width: 200px; }
.chk { white-space: nowrap; margin-right: 8px; }

.morning .mrow { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.morning .mrow > div:first-child { font-size: 13.5px; line-height: 1.6; }
.mstat { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.mstat b { font-family: var(--mono); font-size: 26px; font-weight: 500; }
.mstat span { color: var(--muted); font-size: 12px; }
.flag a { color: var(--accent); white-space: nowrap; }

/* ================= v2 flow: top tabs, Home, Review, My deals, deal page ================= */
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.who b, .brandcell b, .t { color: var(--fg); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 15px; font-weight: 700; margin: 0; }
h3 { font-size: 11.5px; font-weight: 700; margin: 0 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.m0 { margin: 0; } .small { font-size: 12.5px; } .mono { font-family: var(--mono); } .grow { flex: 1; } .err { color: var(--bad); }
.btn { border-radius: 8px; font-weight: 700; font-size: 13px; padding: 6px 12px; color: var(--fg); }
.btn.primary { color: var(--accent-fg); } .btn.primary:hover { background: var(--accent-deep); filter: none; }
.btn.big { padding: 9px 17px; font-size: 14px; }
.btn.sm { padding: 3px 9px; font-size: 12.5px; }
.btn:hover { text-decoration: none; }
.pill { border-radius: 999px; padding: 2px 9px; font-weight: 700; font-size: 12px; }
.pill.agg { background: var(--agg-soft); color: var(--agg); } .pill.pub { background: var(--pub-soft); color: var(--pub); }
select { border-radius: 8px; padding: 5px 8px; }
.search { background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; font: inherit; color: var(--fg); min-width: 0; }
.actions.start, .decide.start { justify-content: flex-start; }
.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.pad { padding: 14px 18px; }
.internal { margin-left: 4px; }
.alert { border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.plain { background: var(--sunken); color: var(--fg-2); }
.alert a { color: inherit; text-decoration: underline; }

/* top bar */
main { padding-block: 26px 80px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.top-row { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 20px; height: 60px; }
.dlogo { display: flex; align-items: center; gap: 10px; color: var(--fg); flex: none; } .dlogo:hover { text-decoration: none; }
.dmark { background: #4636f5; color: #fff; border-radius: 6px; padding: 6px 8px 5px; font-weight: 800; font-size: 10.5px; line-height: 1; letter-spacing: .04em; position: relative; }
.dmark::after { content: ""; position: absolute; left: 8px; bottom: -3px; width: 18px; height: 3px; background: var(--pink); border-radius: 2px; }
.dtext { font-weight: 700; font-size: 15px; line-height: 1.25; } .dtext small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.ttabs { display: flex; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.ttabs a { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.ttabs a:hover { color: var(--fg); text-decoration: none; }
.ttabs a.on { color: var(--fg); border-bottom-color: var(--accent); }
.n { font-family: var(--mono); font-size: 11px; background: var(--pink); color: #3b0a30; border-radius: 9px; padding: 0 6px; }
.tsearch { width: 180px; flex: none; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; font: inherit; color: var(--fg); }
.topmenu { position: relative; flex: none; }
.topmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; padding: 4px 6px; border-radius: 8px; }
.topmenu summary::-webkit-details-marker { display: none; }
.topmenu summary:hover { background: var(--sunken); }
.topmenu .menu { position: absolute; right: 0; top: 42px; z-index: 30; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px; min-width: 220px; box-shadow: 0 8px 28px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.topmenu .menu a { color: var(--fg); padding: 7px 10px; border-radius: 6px; display: flex; justify-content: space-between; font-weight: 600; }
.topmenu .menu a:hover, .topmenu .menu a.on { background: var(--sunken); text-decoration: none; }
.mlabel { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: 8px 10px 3px; }
.mme { border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 10px 4px; font-weight: 600; font-size: 13px; } .mme small { display: block; color: var(--muted); font-weight: 500; }

/* page parts */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head .sub { margin: 4px 0 0; max-width: 72ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2 .c { font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 12px; }
.card-foot { padding: 11px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.vstack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.explain { margin: 0; padding: 10px 18px; color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; color: var(--fg); }
a.stat:hover { border-color: var(--line-strong); text-decoration: none; }
.stat .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat .val { font-family: var(--mono); font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.stat .val small { font-size: 13px; color: var(--muted); }
.stat .note { color: var(--muted); font-size: 12px; }
.leadmsg { padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; }
.leadmsg .av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.leadmsg p { margin: 0; line-height: 1.6; }
.leadmsg .report { margin: 4px 0 0; }
.daycard { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.dayhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dayhead h3 { margin: 0; }
.daysteps { display: flex; gap: 10px; flex-wrap: wrap; }
.dstep { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
.dstep .num, .sb .num { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; flex: none; }
.dstep.done .num, .sb.done .num { background: var(--good); border-color: var(--good); color: #fff; }
.dstep b, .sb b { font-size: 13.5px; display: block; } .dstep span, .sb span { font-size: 12px; color: var(--muted); }
.progress { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--good); transition: width .3s; }
@media (prefers-reduced-motion: reduce) { .progress i { transition: none; } }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--fg); }
.li:last-child { border-bottom: 0; }
.li .grow { min-width: 0; }
.li .t { font-weight: 700; } .li .d { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.li.click { cursor: pointer; } .li.click:hover { background: var(--sunken); text-decoration: none; }
.li.hot { box-shadow: inset 3px 0 0 var(--good); }
.li .report { margin-top: 6px; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; vertical-align: middle; }
.spark i { width: 6px; background: var(--accent); border-radius: 1px; } .spark i.part { opacity: .35; }

/* review */
.stepbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sb { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; cursor: pointer; text-align: left; color: var(--fg); }
.sb.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sb.on .num { background: var(--accent); border-color: var(--accent); color: #fff; }
.focus { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); overflow: hidden; }
.focus .l { padding: 20px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.focus .r { padding: 20px 22px; background: var(--sunken); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fmeta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.co { display: flex; gap: 12px; align-items: center; }
.co .logo, .co.big .logo { width: 40px; height: 40px; border-radius: 9px; font-size: 14px; font-weight: 800; }
.co h2 { font-size: 19px; } .co h2 a { color: var(--fg); }
.reply { border-left: 3px solid var(--good); padding: 4px 0 4px 12px; font-size: 15px; line-height: 1.55; white-space: pre-line; }
.decide { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.decide span { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.donecard { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.donecard .tick { font-size: 38px; color: var(--good); }
.focus .facts, .card .facts { grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; }
.mail { border-radius: 10px; }

/* board */
.board { display: grid; grid-template-columns: repeat(8, minmax(145px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.lane { background: var(--sunken); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.lane-h { display: flex; justify-content: space-between; padding: 2px 4px; font-weight: 800; font-size: 13px; }
.lane-h .c { font-family: var(--mono); color: var(--muted); font-weight: 500; }
.lane .hint { font-size: 11.5px; color: var(--muted); padding: 0 4px; margin-top: -6px; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; color: var(--fg); }
.bcard:hover { border-color: var(--accent); text-decoration: none; }
.bcard.hot { box-shadow: inset 3px 0 0 var(--good); } .bcard.wait { box-shadow: inset 3px 0 0 var(--warn); }
.bcard .t { font-weight: 700; } .bcard .nx { font-size: 12.5px; } .bcard .m { font-size: 11.5px; color: var(--muted); }

/* tables in cards */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 5px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--fg-2); }
.chip.on { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.chip .c { font-family: var(--mono); font-size: 11.5px; opacity: .7; margin-left: 5px; }
.card table th { background: transparent; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; padding: 10px 14px; }
.card table td { padding: 11px 14px; vertical-align: middle; }

/* deal page */
.stepper { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.stepper div { flex: 1; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); text-align: center; }
.stepper div:last-child { border-right: 0; }
.stepper .past { background: var(--good-soft); color: var(--good); } .stepper .now { background: var(--accent); color: #fff; }
.nextcard { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--accent-soft); border-radius: 12px; padding: 14px 18px; }
.nextcard b { font-size: 15px; } .nextcard p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.tl { list-style: none; margin: 0; padding: 16px 18px 18px 36px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.tl::before { content: ""; position: absolute; left: 23px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.tl li { position: relative; }
.tl li::before { content: ""; position: absolute; left: -18px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.tl li.out::before { border-color: var(--accent); } .tl li.in::before { border-color: var(--good); background: var(--good); }
.tl li.sys::before { width: 8px; height: 8px; left: -16px; top: 7px; border-color: var(--muted); }
.msg { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; }
.msg.in { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.msg .mh { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 5px; flex-wrap: wrap; }
.msg .mh b { color: var(--fg); }
.msg p { margin: 0; white-space: pre-line; font-size: 13.5px; line-height: 1.55; }
.sysline { font-size: 12.5px; color: var(--fg-2); }
.people li { padding: 10px 18px; }
.moreinfo summary { padding: 14px 18px; }
.moreinfo .pad { padding-top: 0; display: flex; flex-direction: column; gap: 12px; }



/* progress */
.wbars { display: flex; gap: 16px; align-items: flex-end; height: 180px; padding: 18px; }
.wcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.wset { display: flex; gap: 3px; align-items: flex-end; height: 120px; }
.wset i { width: 14px; border-radius: 2px; min-height: 1px; }
.b1, .k1 { background: var(--accent); color: var(--accent); } .b2, .k2 { background: var(--good); color: var(--good); } .b3, .k3 { background: var(--pink); color: var(--pink); }
.k1, .k2, .k3 { background: none; }
.funnel { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.frow { display: grid; grid-template-columns: 130px 1fr 44px 110px; gap: 10px; align-items: center; }
.fbar { background: var(--sunken); border-radius: 4px; height: 16px; } .fbar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } .stats, .stats.four { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tsearch { width: 120px; } }
@media (max-width: 720px) {
  .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .top-row { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; } .ttabs { order: 3; flex: 1 1 100%; height: 40px; }
  .dlogo { margin-right: auto; }
  .stats, .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepbar, .focus { grid-template-columns: minmax(0, 1fr); } .focus .l { border-right: 0; border-bottom: 1px solid var(--line); }
  .frow { grid-template-columns: 100px 1fr 34px; } .frow > span:last-child { display: none; }
}
@media (max-width: 1180px) { .tsearch { width: 150px; } .tsearch:focus { width: 260px; } .topmenu summary .small { display: none; } .ttabs a { padding: 0 8px; } }

.btn.libtn { background: #0a66c2; border-color: #0a66c2; color: #fff; font-weight: 700; gap: 5px; }
.btn.libtn:hover { background: #004182; border-color: #004182; color: #fff; }
.inmark { background: #fff; color: #0a66c2; border-radius: 2px; font-size: 10px; font-weight: 800; line-height: 1; padding: 1px 2px 0; }
.welcome .li { gap: 12px; }
.welcome .num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; flex: none; }
.welcome .num.ok { background: var(--good); border-color: var(--good); color: #fff; }
.wprog { width: 160px; }
.explain.card { border-radius: 12px; border: 1px dashed var(--line-strong); }
[hidden] { display: none !important; }

.dstep.none { opacity: .6; } .dstep.none .num { background: transparent; }
table.today .faded td { opacity: .55; }

.sb.none { opacity: .6; } .sb.none .num { background: transparent; }
.rvgrid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.qrail { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.qhead { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.qbig b { font-size: 22px; font-weight: 500; color: var(--good); } .qbig span { color: var(--muted); font-size: 12.5px; }
.qlist { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.qi { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--fg); font: inherit; font-size: 13px; }
.qi:hover { background: var(--sunken); } .qi.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.qi .logo { width: 22px; height: 22px; font-size: 9.5px; }
.qn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.qv { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.qi.gone { opacity: .5; cursor: default; } .qi.gone .qv { color: var(--good); }
.qwarn { font-style: normal; background: var(--warn-soft); color: var(--warn); border-radius: 50%; width: 15px; height: 15px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; }
.qfoot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1000px) { .rvgrid { grid-template-columns: minmax(0, 1fr); } .qrail { position: static; max-height: none; } .qlist { max-height: 240px; } }

.worklog { border-top: 1px solid var(--line); padding: 10px 18px; font-size: 12.5px; }
.worklog summary { cursor: pointer; color: var(--muted); }
.worklog ul { margin: 8px 0 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.moreinfo .actions { flex-wrap: wrap; white-space: normal; justify-content: flex-start; }
.moreinfo .facts { grid-template-columns: max-content minmax(0, 1fr); }
.moreinfo select { max-width: 100%; }
.moreinfo dd { min-width: 0; overflow-wrap: anywhere; }

.stylegrid { display: flex; flex-direction: column; gap: 14px; }
.stylegrid label { display: flex; flex-direction: column; gap: 4px; }
.stylegrid textarea { width: 100%; font-size: 13px; line-height: 1.55; }
.pvbody { white-space: pre-line; padding: 12px 14px; font-size: 13.5px; line-height: 1.6; }

.slots { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.bookrow { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.bookrow label { display: flex; flex-direction: column; gap: 4px; }
.bookrow input { font: inherit; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--fg); }
.prep .facts dd { line-height: 1.5; }
.checks { display: flex; flex-direction: column; }
.ck { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ck:last-child { border-bottom: 0; }
.ck input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--good); }
.ck span { display: flex; flex-direction: column; } .ck em { font-style: normal; font-size: 12px; color: var(--good); } .ck small { color: var(--muted); font-size: 11.5px; }
.ck.done b { color: var(--good); }
.dealval { display: flex; align-items: center; gap: 4px; } .dealval input { width: 90px; font: inherit; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--fg); }

.segtabs { display: inline-flex; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 10px; padding: 3px; align-self: flex-start; margin-bottom: -8px; }
.segtabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; gap: 6px; align-items: center; }
.segtabs button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.segtabs .c { font-family: var(--mono); font-size: 11px; background: var(--pink); color: #3b0a30; border-radius: 9px; padding: 0 6px; }
.inboxsub { margin: 0; }

.modes { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.mode { flex: 1 1 260px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; cursor: pointer; }
.mode.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mode span { display: flex; flex-direction: column; gap: 2px; } .mode small { color: var(--muted); font-size: 12.5px; }
.sk { border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px 16px; background: var(--surface); font-family: -apple-system, "Segoe UI", Lato, sans-serif; font-size: 14px; display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.sk-h { font-weight: 800; font-size: 17px; } .sk-hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.sk-s { line-height: 1.45; } .sk-a { display: flex; gap: 8px; flex-wrap: wrap; }
.sk-btn { border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 12px; font-weight: 700; font-size: 13px; } .sk-btn.p { background: #007a5a; border-color: #007a5a; color: #fff; }

.daysum { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--fg-2); max-width: 70ch; }
.dayhead { align-items: flex-start; }


@media (max-width: 760px) { .tsearch { display: none; } }
.tsearch:focus { width: 300px; transition: width .15s; }

/* rank A/B/C */
.pill.rank { min-width: 20px; text-align: center; font-weight: 600; }
.pill.rank.rA { background: var(--good-bg, #e6f4ea); color: var(--good, #1e7b34); }
.pill.rank.rB { background: var(--sunken, #f1f3f5); color: var(--fg, #222); }
.pill.rank.rC { background: transparent; color: var(--dim, #777); border: 1px solid var(--line, #ddd); }
