:root {
  --bg: #f7f7f5; --surface: #ffffff; --text: #1b1b1a; --muted: #6b6a66; --border: #e3e2de;
  --accent: #2a78d6; --accent-ink: #ffffff; --ok: #1a7f37; --warn: #b35900; --bad: #c4312f;
  --chip: #eef3fb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413; --surface: #1d1d1c; --text: #ecebe7; --muted: #a3a29b; --border: #33332f;
    --accent: #3987e5; --chip: #22303f; --ok: #4cc26b; --warn: #f0a050; --bad: #ef6b6a;
  }
}
:root[data-theme="dark"] {
  --bg: #141413; --surface: #1d1d1c; --text: #ecebe7; --muted: #a3a29b; --border: #33332f;
  --accent: #3987e5; --chip: #22303f; --ok: #4cc26b; --warn: #f0a050; --bad: #ef6b6a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
main.container { padding-bottom: 48px; }
h1 { font-size: 1.6rem; margin: 20px 0 8px; }
h2 { font-size: 1.15rem; margin: 16px 0 8px; }
h3 { font-size: 1rem; margin: 14px 0 6px; }
.small { font-size: .85rem; } .dim { color: var(--muted); }
.ok { color: var(--ok); } .warn { color: var(--warn); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
pre { white-space: pre-wrap; word-break: break-word; }

.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-weight: 700; color: var(--text); }
.nav nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nav-search { margin-left: auto; flex: 1 1 220px; max-width: 340px; }
.nav-search input { width: 100%; }

input, select, textarea, button { font: inherit; color: var(--text); }
input[type=search], input[type=text], select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; }
textarea { width: 100%; resize: vertical; }
button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
button:disabled { opacity: .5; cursor: default; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.chip { background: var(--chip); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: .85rem; }
.chip.skill { border-color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin: 14px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .hide-sm { display: none; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text); display: flex; flex-direction: column; }
a.kpi:hover { text-decoration: none; border-color: var(--accent); }
.kpi-n { font-size: 1.8rem; font-weight: 600; line-height: 1.1; }
.kpi-l { font-size: .85rem; color: var(--muted); }
.chart-wrap { position: relative; height: 300px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 8px 0 12px; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 2px; }
.filters label.grow { flex: 1 1 200px; }
.filters label.grow input { width: 100%; }

.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
table.list { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; }

.badge { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--text); border: 1px solid var(--border); white-space: nowrap; }
.status-interested, .status-preparing { border-color: #2a78d6; }
.status-applied, .status-interviewing, .status-offer, .status-accepted { background: #2a78d6; color: #fff; border-color: #2a78d6; }
.status-rejected, .status-nixed, .status-withdrawn, .status-closed { color: var(--muted); }
.rel-known { background: #1a7f37; color: #fff; border-color: #1a7f37; }
.rel-second-degree { background: #eda100; color: #1b1b1a; border-color: #eda100; }
.rel-target { color: var(--muted); }
.prio-high { background: #c4312f; color: #fff; border-color: #c4312f; }
.prio-medium { background: #eda100; color: #1b1b1a; border-color: #eda100; }
.fit { color: var(--accent); letter-spacing: 1px; font-size: .8rem; } .fit .dim { opacity: .35; }

ul.plain, ul.timeline, ul.todos, ul.postings { list-style: none; padding: 0; margin: 0; }
ul.plain li, ul.timeline li, ul.todos li, ul.postings li { padding: 5px 0; border-bottom: 1px dashed var(--border); }
ul.plain li:last-child, ul.timeline li:last-child, ul.todos li:last-child { border-bottom: 0; }
.timeline .date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
ul.inline-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
blockquote.salary { margin: 6px 0; padding: 4px 10px; border-left: 3px solid var(--accent); font-style: italic; }
.estimate { font-size: 1.1rem; font-weight: 600; margin: 4px 0; }
.meta { margin: 4px 0; }
.prose img { max-width: 100%; } .prose table { margin: 8px 0; }
.errors pre { background: var(--bg); padding: 6px; border-radius: 6px; }
.gitlog { background: var(--bg); padding: 8px; border-radius: 6px; }
.graph { height: 520px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }

/* Claude transcript */
.ask-transcript { margin-top: 14px; }
.small-btn { font-size: .8rem; padding: 3px 10px; margin-top: 8px; }
.turn { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.turn .you { font-weight: 600; margin-bottom: 6px; white-space: pre-wrap; }
.turn .tool { color: var(--muted); font-size: .82rem; font-family: ui-monospace, Menlo, monospace; padding: 1px 0; }
.turn .tool::before { content: "› "; }
.turn .status { color: var(--muted); font-size: .85rem; font-style: italic; }
.turn .error { color: var(--bad); white-space: pre-wrap; }
.turn .meta-line { color: var(--muted); font-size: .78rem; margin-top: 6px; }
.turn .answer { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.flash { padding: 8px 12px; border-radius: 6px; background: var(--chip); }
.flash.err { color: var(--bad); }
.nav-logout { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.nav-logout .small-btn { margin-top: 0; }
