/* JobSearch: a warm, roomy marketplace-style look. White space, soft rounded cards, a coral-red accent,
   near-black type, pill search, underlined category tabs. Tokens first; dark mode below. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --surface-3: #ebebeb;
  --border: #ebebeb;
  --border-strong: #dddddd;
  --text: #222222;
  --text-2: #3f3f3f;
  --muted: #6a6a6a;
  --accent: #ff385c;
  --accent-deep: #e00b41;
  --accent-grad: linear-gradient(to right, #e61e4d 0%, #e31c5f 50%, #d70466 100%);
  --accent-soft: #fff0f3;
  --accent-text: #222222;
  --link: #222222;
  --focus: #222222;

  --high: #00754a; --high-bg: #e5f5ee;
  --medium: #a35a00; --medium-bg: #fff3e0;
  --low: #c13515; --low-bg: #fdecea;
  --none: #6a6a6a; --none-bg: #f2f2f2;

  --you: #6c3fd8; --you-bg: #f1ecfd;
  --claude: #d95d2b; --claude-bg: #fff0e8;

  --danger: #c13515;
  --ok: #00754a;
  --warn: #a35a00; --warn-bg: #fff3e0;

  --bubble-out: #222222; --bubble-out-text: #ffffff;

  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, .12);
  --shadow-pill: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 12px rgba(0, 0, 0, .05);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .28);
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #1b1b1b; --surface-2: #232323; --surface-3: #2e2e2e;
    --border: #2c2c2c; --border-strong: #3d3d3d;
    --text: #f2f2f2; --text-2: #d0d0d0; --muted: #a0a0a0;
    --accent: #ff4d6d; --accent-deep: #ff385c; --accent-soft: #3a1a22; --accent-text: #f2f2f2;
    --link: #f2f2f2; --focus: #f2f2f2;
    --high: #4cd39b; --high-bg: #133126; --medium: #f5b54a; --medium-bg: #3a2a10;
    --low: #ff8a70; --low-bg: #3d1a12; --none: #a0a0a0; --none-bg: #2a2a2a;
    --you: #b69bff; --you-bg: #2b2342; --claude: #ff9d6f; --claude-bg: #3d2416;
    --danger: #ff8a70; --ok: #4cd39b; --warn: #f5b54a; --warn-bg: #3a2a10;
    --bubble-out: #f2f2f2; --bubble-out-text: #121212;
    --shadow: none; --shadow-hover: 0 6px 20px rgba(0, 0, 0, .5);
    --shadow-pill: 0 0 0 1px #2c2c2c, 0 4px 12px rgba(0, 0, 0, .4); --shadow-lg: 0 8px 28px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1b1b1b; --surface-2: #232323; --surface-3: #2e2e2e;
  --border: #2c2c2c; --border-strong: #3d3d3d;
  --text: #f2f2f2; --text-2: #d0d0d0; --muted: #a0a0a0;
  --accent: #ff4d6d; --accent-deep: #ff385c; --accent-soft: #3a1a22; --accent-text: #f2f2f2;
  --link: #f2f2f2; --focus: #f2f2f2;
  --high: #4cd39b; --high-bg: #133126; --medium: #f5b54a; --medium-bg: #3a2a10;
  --low: #ff8a70; --low-bg: #3d1a12; --none: #a0a0a0; --none-bg: #2a2a2a;
  --you: #b69bff; --you-bg: #2b2342; --claude: #ff9d6f; --claude-bg: #3d2416;
  --danger: #ff8a70; --ok: #4cd39b; --warn: #f5b54a; --warn-bg: #3a2a10;
  --bubble-out: #f2f2f2; --bubble-out-text: #121212;
  --shadow: none; --shadow-hover: 0 6px 20px rgba(0, 0, 0, .5);
  --shadow-pill: 0 0 0 1px #2c2c2c, 0 4px 12px rgba(0, 0, 0, .4); --shadow-lg: 0 8px 28px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
a.link:hover { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- top bar ---------- */
.shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar-in { max-width: 1320px; margin: 0 auto; height: 80px; padding: 0 40px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -.03em; color: var(--accent); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-grad); color: #fff; font-size: 18px; font-weight: 800;
}
.topnav { display: flex; gap: 4px; align-items: stretch; height: 80px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap;
}
.nav-item svg.i { width: 18px; height: 18px; }
.nav-item:hover { color: var(--text); }
.nav-item:hover::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 18px; height: 2px; background: var(--border-strong); border-radius: 2px; }
.nav-item.active { color: var(--text); }
.nav-item.active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 18px; height: 2px; background: var(--text); border-radius: 2px; }
.nav-item .count {
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff;
}
.top-right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.last-run { font-size: 13px; color: var(--muted); white-space: nowrap; }
.link-btn { all: unset; cursor: pointer; font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

main { min-width: 0; padding: 36px 40px 96px; max-width: 1320px; margin: 0 auto; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: 15px; }

.tabbar { display: none; }

@media (max-width: 1180px) { .last-run { display: none; } .nav-item { padding: 0 10px; } .nav-item span.lbl-long { display: none; } }
@media (max-width: 900px) {
  .topbar-in { height: 60px; padding: 0 16px; grid-template-columns: 1fr auto; }
  .topnav { display: none; }
  main { padding: 20px 16px 104px; }
  h1 { font-size: 24px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--bg); border-top: 1px solid var(--border);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 2px 0; position: relative; }
  .tab.active { color: var(--accent); }
  .tab svg.i { width: 22px; height: 22px; stroke-width: 1.7; }
  .tab .dot { position: absolute; top: -2px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; background: var(--accent); color: #fff; font-weight: 700; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--text); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform .08s ease, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent-grad); color: #fff; border-color: transparent; }
.btn.primary:hover { filter: brightness(.95); }
.btn.accent { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.accent:hover { opacity: .88; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text); text-decoration: underline; text-underline-offset: 2px; padding: 0 8px; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.ghost.icon { text-decoration: none; }
.btn.danger { color: var(--danger); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.ghost.sm { padding: 0 8px; }
.btn.icon { width: 40px; padding: 0; border-radius: 50%; }
.btn.sm.icon { width: 32px; height: 32px; }

input[type=text], input[type=search], input[type=password], input[type=url], input[type=email], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  outline: none; min-width: 0; width: 100%; font-size: 15px;
}
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select { padding-right: 34px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none' stroke='%23717171' stroke-width='1.8'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
input:focus, select:focus, textarea:focus { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
select.inline { height: 36px; width: auto; font-size: 13.5px; font-weight: 600; border-radius: 18px; padding-left: 14px; }
label.field, div.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text); }
label.field .hint { font-weight: 400; color: var(--muted); }

/* segmented / category tabs */
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.seg button {
  all: unset; cursor: pointer; padding: 8px 14px; border-radius: 20px; font-size: 13.5px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface);
  transition: border-color .15s, background .15s;
}
.seg button:hover { border-color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.seg button.on.you { background: var(--you); border-color: var(--you); color: #fff; }
.seg button.on.claude { background: var(--claude); border-color: var(--claude); color: #fff; }
.seg .n { font-size: 12px; opacity: .65; font-weight: 600; }

.cats { display: flex; gap: 28px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button {
  all: unset; cursor: pointer; padding: 10px 0 12px; font-size: 14px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cats button:hover { color: var(--text); border-bottom-color: var(--border-strong); }
.cats button.on { color: var(--text); border-bottom-color: var(--text); }
.cats .n { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 0 7px; line-height: 18px; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: var(--none-bg); color: var(--none);
}
.pill.high { background: var(--high-bg); color: var(--high); }
.pill.medium { background: var(--medium-bg); color: var(--medium); }
.pill.low { background: var(--low-bg); color: var(--low); }
.pill.self { background: var(--you-bg); color: var(--you); }
.pill.agent { background: var(--claude-bg); color: var(--claude); }
.pill.undecided { background: var(--surface); color: var(--text); box-shadow: var(--shadow-pill); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-2); font-weight: 600; }
.pill.ok { background: var(--high-bg); color: var(--high); }
.pill .score { font-variant-numeric: tabular-nums; }
.dot-s { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-body { padding: 20px 22px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 16px; }

/* ---------- attention strip ---------- */
.attention { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 32px; }
.att {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: box-shadow .2s, transform .2s;
}
.att:hover { box-shadow: var(--shadow-hover); }
.att .num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.02em; }
.att .lbl { font-size: 14.5px; font-weight: 700; margin-top: 4px; }
.att .why { font-size: 13px; color: var(--muted); }
.att.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.att.hot .num { color: var(--accent); }
.att.zero .num { color: var(--border-strong); }
@media (max-width: 1080px) { .attention { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .attention { display: flex; overflow-x: auto; gap: 10px; margin: 0 -16px 24px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .attention::-webkit-scrollbar { display: none; }
  .att { flex: 0 0 42%; scroll-snap-align: start; padding: 14px 16px; }
  .att .num { font-size: 24px; }
  .att .why { display: none; }
}

/* ---------- filters ---------- */
.searchbar {
  display: flex; align-items: center; gap: 0; height: 64px; padding: 0 8px 0 0; margin-bottom: 20px;
  border: 1px solid var(--border-strong); border-radius: 32px; background: var(--surface); box-shadow: var(--shadow-pill);
  max-width: 860px;
}
.searchbar .seg-part { display: flex; flex-direction: column; justify-content: center; padding: 0 22px; height: 100%; border-radius: 32px; min-width: 0; }
.searchbar .seg-part:hover { background: var(--surface-2); }
.searchbar .seg-part + .seg-part { border-left: 1px solid var(--border); }
.searchbar .seg-part:hover + .seg-part, .searchbar .seg-part:hover { border-color: transparent; }
.searchbar .cap { font-size: 12px; font-weight: 700; }
.searchbar input, .searchbar select { border: 0; box-shadow: none !important; height: 22px; padding: 0; background-color: transparent; font-size: 14px; color: var(--text); }
.searchbar select { padding-right: 22px; background-position: right 0 center; }
.searchbar .q-part { flex: 1.6; }
.searchbar .go { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); color: #fff; margin-left: 4px; }
.searchbar .go svg.i { width: 18px; height: 18px; stroke-width: 2.6; }
@media (max-width: 700px) {
  .searchbar { height: auto; flex-wrap: wrap; border-radius: 20px; padding: 6px; }
  .searchbar .seg-part { flex: 1 1 45%; padding: 10px 14px; border: 0 !important; }
  .searchbar .q-part { flex: 1 1 100%; border-bottom: 1px solid var(--border) !important; border-radius: 14px; }
  .searchbar .go { display: none; }
}
.filter-note { margin: -6px 0 18px; }

/* ---------- job list ---------- */
.jobs { display: flex; flex-direction: column; gap: 14px; }
.job {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; padding: 20px 22px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: box-shadow .2s ease, transform .2s ease;
}
.job:hover { box-shadow: var(--shadow-hover); }
.avatar {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: #fff; flex: none;
}
.avatar.lg { width: 76px; height: 76px; font-size: 32px; border-radius: 18px; }
.avatar.logo { background: #fff; border: 1px solid var(--border); overflow: hidden; padding: 6px; }
.avatar.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.avatar.lg.logo { padding: 9px; }
.avatar.person { border-radius: 50%; width: 40px; height: 40px; font-size: 16px; }
.job-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 17px; }
.job-title strong { font-weight: 700; }
.job-title .role { color: var(--text-2); font-weight: 500; }
.job-sub { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; color: var(--text-2); align-items: center; }
.job-meta .m { display: inline-flex; align-items: center; gap: 5px; }
.job-meta svg.i { width: 15px; height: 15px; color: var(--muted); }
.job-next { margin-top: 12px; font-size: 14px; display: flex; gap: 8px; align-items: baseline; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-md); }
.job-next .who { font-weight: 700; flex: none; }
.job-next .who.me { color: var(--you); }
.job-next .who.claude { color: var(--claude); }
.job-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.job-side .row { gap: 6px; }
.signals { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.signals .sig { display: inline-flex; align-items: center; gap: 4px; }
.signals .sig.hot { color: var(--accent); font-weight: 700; }
.signals svg.i { width: 14px; height: 14px; }
@media (max-width: 700px) {
  .job { grid-template-columns: 48px 1fr; gap: 14px; padding: 16px; }
  .avatar { width: 48px; height: 48px; font-size: 19px; border-radius: 12px; }
  .job-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* ---------- company page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; margin-bottom: 20px; text-decoration: underline; text-underline-offset: 2px; }
.back:hover { color: var(--muted); }
.co-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.co-head h1 { font-size: 32px; }
.co-head .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.co-head .links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 14px; }
.co-head .links a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.co-grid > .stack:last-child { position: sticky; top: 104px; }
@media (max-width: 1080px) { .co-grid { grid-template-columns: 1fr; } .co-grid > .stack:last-child { position: static; } }
.section-title { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
.section-title h2 { flex: 1; font-size: 22px; }

.role-card { scroll-margin-top: 100px; overflow: hidden; }
.role-card.focus { box-shadow: 0 0 0 2px var(--text); }
.role-top { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.role-top h2 { font-size: 20px !important; }
.role-controls { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.role-controls .ctl { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; flex-wrap: wrap; }
.track-help { font-size: 13.5px; color: var(--muted); padding: 12px 22px 0; }

.match-box { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border); }
@media (max-width: 600px) { .match-box { grid-template-columns: 1fr; gap: 14px; } }
.match-score { display: flex; flex-direction: column; gap: 8px; }
.match-score .big { font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.match-score .big small { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.meter { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: currentColor; }
.sg-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.sg-list li { display: flex; gap: 8px; align-items: baseline; }
.sg-list .mk { font-weight: 800; width: 14px; flex: none; text-align: center; }
.sg-list.good .mk { color: var(--high); }
.sg-list.gap .mk { color: var(--medium); }
.sg-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
@media (max-width: 600px) { .sg-cols { grid-template-columns: 1fr; } }
.label { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.005em; }

.collapsible { position: relative; max-height: 240px; overflow: hidden; color: var(--text-2); }
.collapsible.open { max-height: none; }
.collapsible:not(.open)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--surface)); }
.more-btn { all: unset; cursor: pointer; font-size: 15px; font-weight: 700; margin-top: 10px; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; gap: 4px; }
.more-btn::after { content: '›'; font-size: 18px; text-decoration: none; display: inline-block; }

.next-action { display: grid; grid-template-columns: 120px 1fr 170px auto; gap: 10px; align-items: center; }
.next-action .btn { height: 48px; }
@media (max-width: 700px) { .next-action { grid-template-columns: 1fr 1fr; } .next-action input[type=text] { grid-column: 1 / -1; order: -1; } .next-action .btn { grid-column: 1 / -1; } }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px; background: var(--warn-bg); color: var(--warn); }
.banner svg.i { margin-top: 2px; }

/* people */
.person { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 22px; }
.person + .person { border-top: 1px solid var(--border); }
.person .name { font-weight: 700; font-size: 15.5px; }
.person .lines { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 13.5px; }
.contact-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.contact-line a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }
.contact-line svg.i { width: 15px; height: 15px; color: var(--muted); }
.copy { all: unset; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; }
.copy:hover { background: var(--surface-2); color: var(--text); }
.copy svg.i { width: 14px; height: 14px; }
.conf { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; flex: none; }
.conf.verified { background: var(--high-bg); color: var(--high); }
.conf.likely { background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.conf.guess { background: var(--warn-bg); color: var(--warn); }
.conf.unknown { background: var(--none-bg); color: var(--none); }

.people-table { width: 100%; border-collapse: collapse; }
.people-table th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 14px 22px; border-bottom: 1px solid var(--border); }
.people-table td { padding: 16px 22px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.people-table tr:last-child td { border-bottom: 0; }
.people-table tbody tr:hover td { background: var(--surface-2); }
@media (max-width: 760px) {
  .people-table thead { display: none; }
  .people-table, .people-table tbody, .people-table tr, .people-table td { display: block; width: 100%; }
  .people-table tr { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .people-table td { border: 0; padding: 4px 18px; }
}

/* threads list (company sidebar + inbox) */
.thread-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px 20px; cursor: pointer; transition: background .15s; }
.thread-item + .thread-item { border-top: 1px solid var(--border); }
.thread-item:hover { background: var(--surface-2); }
.thread-item.active { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--text); }
.ch { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.ch svg.i { width: 18px; height: 18px; }
.ch.linkedin { background: #e8f1fb; color: #0a66c2; }
.ch.email { background: var(--accent-soft); color: var(--accent-deep); }
.ch.wellfound { background: #f2f2f2; color: #111; font-weight: 800; font-size: 15px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ch.linkedin { background: #172a40; color: #6aa9ec; } :root:not([data-theme="light"]) .ch.wellfound { background: #2a2a2a; color: #eee; } }
:root[data-theme="dark"] .ch.linkedin { background: #172a40; color: #6aa9ec; }
:root[data-theme="dark"] .ch.wellfound { background: #2a2a2a; color: #eee; }
.thread-item .top { display: flex; gap: 6px; align-items: baseline; }
.thread-item .who { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .when { font-size: 12.5px; color: var(--muted); flex: none; }
.thread-item .subj { font-size: 13.5px; color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .snip { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.thread-item .flags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 400px 1fr; height: calc(100vh - 80px - 36px - 100px); min-height: 560px; overflow: hidden; }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.inbox-list .tools { padding: 16px 20px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.inbox-list .tools .cats { margin-bottom: 0; border-bottom: 0; gap: 20px; }
.inbox-list .tools .seg { padding: 4px 0 14px; }
.inbox-list .items { overflow-y: auto; flex: 1; }
.inbox-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.th-head { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.th-head .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--muted); margin-top: 6px; align-items: center; }
.th-head .meta a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.msgs { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.msg { max-width: min(640px, 86%); display: flex; flex-direction: column; gap: 6px; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg .bubble { padding: 14px 18px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.55; background: var(--surface-2); }
.msg.in .bubble { border-bottom-left-radius: 6px; }
.msg.out .bubble { background: var(--bubble-out); color: var(--bubble-out-text); border-bottom-right-radius: 6px; }
.msg.draft .bubble { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 2px var(--claude); border-bottom-right-radius: 6px; }
.msg.approved .bubble { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 2px var(--ok); }
.msg .by { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.msg .by strong { color: var(--text); font-weight: 700; }
.msg .subject { font-weight: 700; margin-bottom: 6px; display: block; }
.msg .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.composer { border-top: 1px solid var(--border); padding: 14px 24px 18px; display: flex; flex-direction: column; gap: 10px; }
.composer textarea { border-radius: var(--radius-md); }
.inbox-empty { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 24px; }
@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; height: auto; min-height: 0; overflow: visible; border: 0; background: transparent; box-shadow: none; border-radius: 0; }
  .inbox-list { border-right: 0; }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox:not(.has-thread) .inbox-thread { display: none; }
  .inbox-list, .inbox-thread { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
  .msgs { min-height: 50vh; padding: 16px; }
  .th-head { padding: 14px 16px; }
  .composer { padding: 12px 16px 16px; }
}

/* ---------- activity ---------- */
.runs { display: flex; flex-direction: column; }
.run { padding: 16px 22px; display: grid; grid-template-columns: 10px 1fr; gap: 14px; }
.run + .run { border-top: 1px solid var(--border); }
.run .st { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.run .st.done { background: var(--ok); }
.run .st.failed { background: var(--danger); }
.run .st.running { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 22px; font-size: 14.5px; }
.feed li + li { border-top: 1px solid var(--border); }
.feed .kind { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 2px; text-transform: capitalize; }
.feed .day { font-size: 14px; font-weight: 800; display: block; padding: 18px 22px 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- forms / modal ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
dialog.modal {
  border: 0; border-radius: 24px; padding: 0; width: min(680px, calc(100vw - 24px));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px);
}
dialog.modal[open] { animation: rise .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.modal::backdrop { background: rgba(0, 0, 0, .5); }
dialog.modal form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.modal-head { padding: 0 24px; height: 64px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.modal-head h2 { grid-column: 2; text-align: center; font-size: 16px; font-weight: 800; }
.modal-head [data-close] { grid-column: 1; grid-row: 1; justify-self: start; text-decoration: none; width: 32px; height: 32px; border-radius: 50%; padding: 0; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.modal-foot .btn:not(.primary) { border: 0; background: transparent; text-decoration: underline; text-underline-offset: 2px; padding: 0 6px; }
.modal-foot .btn.primary { height: 48px; padding: 0 24px; font-size: 15px; }
@media (max-width: 600px) {
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 94vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
}

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  transition: .25s; z-index: 100; pointer-events: none; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--danger); color: #fff; }
@media (max-width: 900px) { .toast { bottom: 92px; } }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(420px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 18px; border-radius: 24px; box-shadow: var(--shadow-hover); }
.login .btn.primary { height: 48px; font-size: 16px; }
.err-text { color: var(--danger); font-size: 13.5px; }

.loading { padding: 60px; text-align: center; color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-2); }
kbd, code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* theme switch */
.theme-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 20px; border: 1px solid var(--border-strong); }
.theme-seg button { all: unset; cursor: pointer; padding: 4px 11px; border-radius: 16px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: center; }
.theme-seg button:hover { color: var(--text); }
.theme-seg button.on { background: var(--text); color: var(--bg); }
div.field .theme-seg { align-self: flex-start; }

/* ---------- my to-do list ---------- */
.todo-card { margin-bottom: 28px; }
.todo-card .card-head { padding: 14px 20px; }
.todo-list { list-style: none; margin: 0; padding: 6px 0; }
.todo { display: flex; align-items: center; gap: 12px; padding: 8px 20px; }
.todo-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todo.done .todo-text { color: var(--muted); text-decoration: line-through; }
.todo-check { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.todo-check svg { width: 14px; height: 14px; }
.todo.done .todo-check { background: var(--accent); border-color: var(--accent); }
.todo-del { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; opacity: .5; }
.todo:hover .todo-del, .todo-del:focus-visible { opacity: 1; }
@media (hover: none) { .todo-del { opacity: .8; } }
.todo-empty { padding: 8px 20px; }
.todo-add { display: flex; gap: 8px; padding: 10px 20px 16px; border-top: 1px solid var(--border); }
.todo-add input { flex: 1; min-width: 0; }
.todo-add .btn { align-self: stretch; }
