:root {
  --ink:#173936;
  --muted:#637471;
  --teal:#176e62;
  --lime:#deedac;
  --line:#dce3dd;
  --paper:#fffefa;
  --bg:#f4f5ef;
  --amber:#8f662b;
  --red:#a34739;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;
  color:var(--ink);
  background:var(--bg);
  font-synthesis:none}

* {
  box-sizing:border-box}

body {
  margin:0;
  font-size:14px;
  line-height:1.65}

button,input,textarea,select {
  font:inherit}

button,a,input,textarea,select {
  outline-offset:4px}

button {
  cursor:pointer;
  border:1px solid var(--line);
  background:white;
  color:var(--ink);
  border-radius:8px;
  padding:9px 15px;
  font-weight:550;
  transition:background .15s}

button:hover {
  background:#edf2e9}

button:disabled {
  cursor:not-allowed;
  opacity:.45}

button.primary {
  background:var(--teal);
  color:white;
  border-color:var(--teal)}

button.primary:hover {
  background:#115a50}

button.quiet {
  background:transparent;
  border-color:transparent;
  padding:6px 8px}

a {
  color:var(--teal);
  text-underline-offset:3px}

h1,h2,h3,p {
  margin-top:0}

h1 {
  font-size:30px;
  line-height:1.3;
  letter-spacing:-1px;
  margin-bottom:12px;
  font-weight:650}

h2 {
  font-size:19px;
  line-height:1.4;
  margin-bottom:12px}

h3 {
  font-size:15px;
  margin-bottom:8px}

p {
  margin-bottom:12px}

small,.muted {
  color:var(--muted)}

small {
  font-size:12px}

textarea,input,select {
  border:1px solid #ccd6cd;
  border-radius:7px;
  background:#fffefa;
  color:var(--ink);
  padding:10px 12px;
  max-width:100%}

textarea {
  resize:vertical;
  width:100%;
  line-height:1.7}

input:not([type=checkbox]),select {
  width:100%}

input[type=checkbox] {
  accent-color:var(--teal);
  width:17px;
  height:17px}

label {
  display:block;
  font-size:12px;
  font-weight:600;
  margin:12px 0 5px}

pre {
  white-space:pre-wrap;
  word-break:break-word;
  font-size:12px}

.shell {
  display:grid;
  grid-template-columns:224px 1fr;
  min-height:100vh}

.sidebar {
  background:#183d37;
  color:#e9eee3;
  padding:30px 23px;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh}

.brand {
  font-size:22px;
  letter-spacing:-1px;
  font-weight:650;
  line-height:1.2}

.brand-icon {
  display:inline-block;
  background:var(--lime);
  color:#183d37;
  width:29px;
  height:29px;
  border-radius:8px;
  text-align:center;
  margin-right:7px}

.subbrand {
  font-size:10px;
  letter-spacing:2.4px;
  color:#9bb8a7;
  margin-top:12px}

.sidebar nav {
  margin-top:43px}

.nav-label {
  font-size:10px;
  letter-spacing:1.8px;
  color:#9bb8a7;
  margin:26px 9px 9px}

.nav-item {
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  text-align:left;
  background:none;
  border:0;
  color:#b9cfc2;
  border-radius:8px;
  margin:4px 0;
  padding:11px 12px;
  font-weight:450}

.nav-item:hover {
  background:#244d44}

.nav-item.active {
  background:#deedac;
  color:#163a31;
  font-weight:650}

.nav-no {
  font-size:11px;
  opacity:.7;
  width:18px}

.side-bottom {
  margin-top:auto;
  font-size:12px;
  padding:22px 9px 0;
  color:#acbfaf;
  border-top:1px solid #33554c}

.avatar {
  width:32px;
  height:32px;
  background:#38574b;
  border-radius:50%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#e0edc7;
  margin-right:8px}

.main {
  min-width:0}

.topbar {
  padding:21px 38px;
  background:#fafbf6;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px}

.breadcrumb {
  color:var(--muted);
  font-size:12px}

.top-status {
  font-size:11px;
  display:flex;
  align-items:center;
  gap:15px}

.dot {
  width:7px;
  height:7px;
  background:#5f9764;
  border-radius:50%;
  display:inline-block;
  margin-right:6px}

.workspace {
  max-width:1480px;
  margin:auto;
  padding:32px 38px 55px}

.eyebrow {
  font-size:10px;
  letter-spacing:2px;
  color:var(--teal);
  font-weight:700;
  margin-bottom:12px}

.heading {
  display:flex;
  justify-content:space-between;
  gap:25px;
  align-items:flex-start;
  margin-bottom:25px}

.heading p {
  max-width:690px;
  color:var(--muted);
  font-size:13px}

.buttons {
  display:flex;
  gap:9px;
  align-items:center;
  flex-wrap:wrap}

.job-bar {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:12px;
  padding:17px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:22px}

.job-bar label {
  margin:0 0 3px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:1px}

.job-bar select {
  background:none;
  border:none;
  padding:0;
  min-width:340px;
  font-weight:650;
  font-size:14px}

.job-bar small {
  display:block;
  margin-top:3px}

.pill {
  font-size:10px;
  letter-spacing:.2px;
  border-radius:5px;
  background:#edf0e9;
  color:#57675b;
  padding:4px 8px;
  display:inline-block;
  white-space:nowrap}

.pill.direct,.pill.good {
  background:#e0eee3;
  color:#286342}

.pill.transferable {
  background:#ebedda;
  color:#6a702e}

.pill.gap,.pill.warn {
  background:#f5eada;
  color:#906022}

.pill.unknown {
  background:#eeefee;
  color:#62696a}

.pill.danger {
  background:#f8e5df;
  color:#974936}

.workflow {
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px;
  margin:22px 0 26px}

.workflow button {
  text-align:left;
  padding:12px 14px;
  background:transparent;
  font-size:12px;
  border:0;
  border-bottom:2px solid #d3dcd3;
  border-radius:0}

.workflow .current {
  border-color:var(--teal);
  color:var(--teal)}

.workflow span {
  margin-right:7px;
  font-size:10px;
  opacity:.55}

.grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 300px;
  gap:24px;
  align-items:start}

.card {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:12px;
  padding:23px;
  margin-bottom:18px}

.card-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:14px}

.card-header h2,.card-header h3 {
  margin:0}

.thesis {
  background:#e9efdf;
  border-color:#d8e1ca}

.thesis p {
  font-size:14px;
  line-height:1.85;
  margin-bottom:0}

.kpis {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-bottom:22px}

.kpi {
  background:var(--paper);
  padding:17px 18px;
  border:1px solid var(--line);
  border-radius:10px}

.kpi strong {
  font-size:26px;
  display:block;
  line-height:1.4;
  font-weight:550}

.kpi small {
  font-size:11px}

.filters {
  display:flex;
  gap:5px}

.filters button {
  font-size:12px;
  border:0;
  padding:7px 13px;
  background:transparent}

.filters button.active {
  background:var(--ink);
  color:white}

.requirement {
  padding:21px 0;
  border-top:1px solid var(--line)}

.requirement:first-of-type {
  border-top:0}

.requirement-top {
  display:flex;
  justify-content:space-between;
  gap:10px}

.requirement h3 {
  font-size:15px}

.rid {
  color:#839086;
  font-size:11px;
  display:inline-block;
  margin-right:8px;
  font-weight:500}

.req-meta {
  display:flex;
  gap:6px;
  align-items:center}

.source {
  font-size:11px;
  border-left:2px solid #d6ddcf;
  padding:2px 0 2px 12px;
  color:#738076;
  margin:12px 0}

.field-title {
  color:#6b786c;
  font-size:10px;
  font-weight:700;
  letter-spacing:1px;
  margin-bottom:4px}

.req-fields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  margin-top:13px}

.req-fields p {
  font-size:12px;
  line-height:1.8;
  margin:0}

.tokens {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin-top:10px}

.token {
  font-family:ui-monospace,SFMono-Regular,monospace;
  font-size:10px;
  padding:3px 6px;
  background:#f0f3ea;
  color:#536854;
  border-radius:4px}

.aside-title {
  font-size:10px;
  letter-spacing:1.7px;
  color:#708076;
  margin-bottom:18px}

.aside-item {
  border-bottom:1px solid var(--line);
  padding:0 0 15px;
  margin-bottom:15px;
  font-size:12px}

.aside-item:last-child {
  border-bottom:0;
  padding-bottom:0;
  margin-bottom:0}

.aside-item strong {
  display:block;
  font-size:13px;
  margin-bottom:5px}

.aside-item p {
  color:var(--muted);
  line-height:1.85;
  margin:0}

.notice {
  padding:12px 16px;
  border:1px solid #e4dabd;
  background:#fbf5e7;
  color:#806532;
  border-radius:8px;
  font-size:12px;
  margin:15px 0}

.notice.error {
  border-color:#ebc2b5;
  background:#fff1e9;
  color:#9f4938}

.empty {
  padding:45px 25px;
  text-align:center}

.empty p {
  color:var(--muted);
  max-width:550px;
  margin:10px auto 23px}

.compare-table {
  width:100%;
  border-collapse:collapse;
  font-size:12px}

.compare-table th,.compare-table td {
  padding:13px 9px;
  text-align:left;
  border-bottom:1px solid var(--line);
  vertical-align:top}

.compare-table th {
  font-size:10px;
  color:var(--muted);
  letter-spacing:.5px}

.job-tile {
  padding:20px;
  border:1px solid var(--line);
  border-radius:10px;
  margin:12px 0;
  display:flex;
  justify-content:space-between;
  gap:24px}

.job-tile h3 {
  font-size:17px}

.job-tile p {
  font-size:12px;
  color:var(--muted);
  max-width:650px}

.evidence-list {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px}

.evidence-list .card {
  margin:0}

.evidence-list p {
  font-size:12px}

.monospace {
  font-family:ui-monospace,SFMono-Regular,monospace;
  font-size:12px}

.large-editor {
  min-height:620px}

.diff {
  display:grid;
  grid-template-columns:1fr 1.25fr;
  gap:24px;
  margin:12px 0}

.original {
  font-size:13px;
  color:#7a837c;
  line-height:1.8;
  background:#f3f4ee;
  padding:14px;
  border-radius:7px}

.diff textarea {
  font-size:13px;
  min-height:145px}

.bullet-head {
  display:flex;
  justify-content:space-between;
  align-items:center}

.bullet-head label {
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  font-size:12px}

.rationale {
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:14px}

.rationale textarea {
  min-height:74px;
  font-size:12px}

.resume-preview {
  padding:36px;
  background:white;
  color:#242a27;
  box-shadow:0 3px 15px #183d3706;
  border:1px solid #dfe4dc}

.resume-preview h1 {
  text-align:center;
  font-size:25px}

.resume-preview h2 {
  font-size:13px;
  border-bottom:1px solid #ddd;
  margin-top:22px;
  padding-bottom:5px;
  text-transform:uppercase}

.resume-preview h3 {
  font-size:13px;
  margin-top:15px}

.resume-preview p,.resume-preview li {
  font-size:12px;
  line-height:1.65}

.resume-preview ul {
  padding-left:19px}

.resume-preview li {
  padding-left:4px;
  margin-bottom:9px}

.qa-list {
  padding-left:18px;
  font-size:12px;
  color:var(--muted);
  max-height:250px;
  overflow:auto}

.qa-list li {
  margin:7px 0}

.sticky {
  position:sticky;
  top:20px}

.section-label {
  font-size:11px;
  letter-spacing:1px;
  color:var(--muted);
  margin-bottom:6px}

.loading {
  padding:40px}

.footer-note {
  font-size:11px;
  color:#7c897c;
  margin-top:24px}

.settings-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px}

.setting-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px}

dialog {
  border:1px solid var(--line);
  border-radius:14px;
  padding:28px;
  width:min(850px,94vw);
  max-height:88vh;
  box-shadow:0 20px 90px #163a3133;
  color:var(--ink);
  background:var(--paper)}

dialog::backdrop {
  background:#15362d70;
  backdrop-filter:blur(2px)}

dialog textarea {
  min-height:320px}

.dialog-top {
  display:flex;
  justify-content:space-between;
  gap:15px}

.dialog-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px}

.history-entry {
  border-top:1px solid var(--line);
  padding:13px 0}

.history-entry summary {
  cursor:pointer}

#toast {
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  border-radius:9px;
  background:#173b34;
  color:white;
  padding:12px 22px;
  font-size:13px;
  z-index:10;
  display:none;
  box-shadow:0 4px 24px #173b3422}

#toast.visible {
  display:block}

#toast.error {
  background:#934b3d}

.busy-overlay {
  position:fixed;
  bottom:22px;
  right:22px;
  background:var(--paper);
  border:1px solid var(--line);
  padding:12px 18px;
  border-radius:9px;
  z-index:5}

.mobile-brand {
  display:none}

@media(min-width:1550px) {
  .workspace {
  padding-top:42px}

.grid {
  grid-template-columns:minmax(0,1fr) 320px}

.card {
  padding:26px}

}

@media(max-width:1150px) {
  .shell {
  grid-template-columns:190px 1fr}

.sidebar {
  padding:25px 15px}

.workspace {
  padding:26px 24px}

.topbar {
  padding:19px 24px}

.grid {
  grid-template-columns:1fr}

.aside {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px}

.sticky {
  position:static}

.evidence-list {
  grid-template-columns:1fr}

.job-bar select {
  min-width:260px}

.heading h1 {
  font-size:27px}

}

@media(max-width:760px) {
  .shell {
  display:block}

.sidebar {
  position:static;
  height:auto;
  padding:18px}

.brand {
  font-size:20px}

.subbrand,.nav-label,.side-bottom {
  display:none}

.sidebar nav {
  margin-top:16px;
  display:flex;
  overflow-x:auto;
  gap:5px}

.nav-item {
  width:auto;
  flex-shrink:0;
  font-size:12px;
  padding:8px}

.nav-no {
  display:none}

.topbar {
  padding:12px 18px}

.top-status {
  font-size:10px}

.workspace {
  padding:23px 18px}

.heading {
  display:block}

.heading .buttons {
  margin-top:14px}

.job-bar {
  display:block}

.job-bar .buttons {
  margin-top:12px}

.job-bar select {
  min-width:0;
  max-width:100%}

.workflow {
  gap:0}

.workflow button {
  font-size:10px;
  padding:9px 4px}

.workflow span {
  display:none}

.kpis {
  grid-template-columns:1fr 1fr}

.grid,.req-fields,.diff,.rationale,.settings-grid,.aside {
  display:block}

.aside .card {
  margin-top:18px}

.card {
  padding:18px}

.req-fields>div {
  margin-top:12px}

.diff textarea {
  margin-top:12px}

.job-tile {
  display:block}

.resume-preview {
  padding:20px}

.requirement-top {
  display:block}

.req-meta {
  margin-bottom:12px}

.card-header {
  align-items:flex-start;
  flex-wrap:wrap}

.compare-table {
  font-size:10px}

.compare-table td {
  padding:10px 4px}

.sticky {
  position:static}

}


/* ---------- v0.4 refinements ---------- */
:focus-visible { outline:2px solid var(--teal); outline-offset:3px; border-radius:6px }
@media (prefers-reduced-motion: reduce) { * { transition:none !important; scroll-behavior:auto !important } }
h1 { font-size:26px; letter-spacing:-.5px; margin-bottom:6px }
.heading { margin-bottom:22px }
.heading p { font-size:13px; margin:0; max-width:760px; line-height:1.7 }
.field-title { letter-spacing:0; font-size:11px }
.small { font-size:12px }
.hidden { display:none !important }
mark { background:#f7e7b4; color:inherit; padding:0 2px; border-radius:3px }

/* sidebar */
.sidebar nav { margin-top:34px }
.nav-label { letter-spacing:0; font-size:11px; margin:22px 12px 6px; color:#8fae9f }
.nav-item { justify-content:space-between }
.nav-count { font-size:11px; background:#2c5a4f; color:#dfeec0; border-radius:9px; padding:0 7px; line-height:18px; min-width:18px; text-align:center }
.nav-item.active .nav-count { background:#173936; color:#deedac }
.breadcrumb span { margin-left:10px; padding-left:10px; border-left:1px solid var(--line); color:var(--ink) }

/* job board */
.board-filter { display:grid; grid-template-columns:repeat(4,1fr); gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--paper); margin-bottom:18px }
.board-filter button { border:0; border-radius:0; border-right:1px solid var(--line); background:transparent; padding:14px 18px; text-align:left; font-weight:500; color:var(--muted); display:flex; align-items:baseline; gap:10px }
.board-filter button:last-child { border-right:0 }
.board-filter button strong { font-size:24px; font-weight:600; color:var(--ink); line-height:1 }
.board-filter button.pass strong { color:#286342 }
.board-filter button.review strong { color:#906022 }
.board-filter button.exclude strong { color:#974936 }
.board-filter button.active { background:#eef3e4; color:var(--ink); box-shadow:inset 0 -3px 0 var(--teal) }
.board { display:flex; flex-direction:column; gap:10px; margin-bottom:22px }
.job-row { display:grid; grid-template-columns:minmax(0,1fr) auto 190px; gap:24px; align-items:center; background:var(--paper); border:1px solid var(--line); border-left:4px solid #c9d3c8; border-radius:10px; padding:16px 20px }
.job-row.pass { border-left-color:#3f8a5c }
.job-row.review { border-left-color:#c59443 }
.job-row.exclude { border-left-color:#c27a69; background:#fdfcf8 }
.job-row.exclude h3, .job-row.exclude .job-company { opacity:.72 }
.job-company { font-size:12px; color:var(--muted); font-weight:600 }
.job-row h3 { font-size:16px; margin:2px 0 6px }
.job-meta { display:flex; flex-wrap:wrap; gap:4px 16px; font-size:12px; color:var(--muted) }
.job-row details { margin-top:6px; font-size:12px }
.job-row summary { cursor:pointer; color:var(--teal); width:max-content }
.job-stage { display:flex; flex-direction:column; align-items:flex-end; gap:8px }
.gate-strip { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:white }
.gate { display:flex; flex-direction:column; align-items:center; padding:5px 12px; font-size:11px; border-right:1px solid var(--line); min-width:62px; line-height:1.4 }
.gate:last-child { border-right:0 }
.gate b { font-size:10px; font-weight:500; color:var(--muted) }
.gate.pass { background:#e7f1e8; color:#286342 }
.gate.review { background:#f8efdc; color:#906022 }
.gate.exclude { background:#f9e6e0; color:#974936 }
.gate-reasons { list-style:none; margin:8px 0 2px; padding:0; font-size:12px; line-height:1.6 }
.gate-reasons li { margin:3px 0; padding-left:10px; border-left:2px solid var(--line) }
.gate-reasons li.pass { border-color:#9cc7a6 } .gate-reasons li.review { border-color:#e0bf7f } .gate-reasons li.exclude { border-color:#d99a8a }
.gate-reasons b { font-weight:600; margin-right:8px }
.table-wrap { overflow-x:auto }

/* job bar & workflow */
.job-bar label { letter-spacing:0; font-size:11px }
.job-bar-side { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end }
.workflow { grid-template-columns:repeat(3,1fr); margin:18px 0 22px }
.workflow button { font-size:13px; display:flex; align-items:center; gap:8px }
.workflow span { opacity:1; width:20px; height:20px; border-radius:50%; background:#e3e8df; display:inline-flex; align-items:center; justify-content:center; font-size:11px; margin:0 }
.workflow .done span { background:#cfe3d2; color:#286342 }
.workflow .current span { background:var(--teal); color:white }

/* analysis */
.kpi { display:flex; align-items:baseline; gap:10px }
.kpi strong { font-size:28px }
.kpi small { font-size:12px }
.kpi.gap strong { color:#974936 } .kpi.direct strong { color:#286342 }
.requirement.gap h3 .rid { color:#974936 }
blockquote.source { margin:10px 0 }
.fit { font-weight:650; font-size:15px; margin-bottom:6px }
.aside h3 { margin-bottom:8px }

/* tailor */
.toolbar { display:flex; align-items:center; gap:18px; flex-wrap:wrap; font-size:12px; color:var(--muted); margin-bottom:14px }
.toolbar .switch { display:flex; align-items:center; gap:7px; margin:0; font-weight:500; margin-left:auto }
.bullet-flags { display:flex; align-items:center; gap:14px }
.draft-bullet.unselected { opacity:.6 }
.diffview { color:#3f4a44 }
.diffview del { color:#a35a49; text-decoration:line-through; text-decoration-color:#c9897a; background:#fbeeea }
.diffview ins { text-decoration:none; background:#ddefd9; color:#1f5a35; border-radius:2px }
.rationale-box { border-top:1px solid var(--line); padding-top:10px; margin-top:4px }
.rationale-box summary { cursor:pointer; font-size:12px; color:var(--muted) }
.rationale-box summary .ids { margin-left:10px; font-family:ui-monospace,SFMono-Regular,monospace; font-size:11px; color:#8a958c }
.rationale-box[open] summary { margin-bottom:8px }
.sticky-actions { position:sticky; bottom:12px; background:var(--bg); padding:10px 0; z-index:2 }

/* review & exports */
.button-link { display:inline-block; border:1px solid var(--line); border-radius:8px; padding:8px 13px; text-decoration:none; font-weight:550; background:white; font-size:13px }
.button-link:hover { background:#edf2e9 }
.resume-preview { font-family:Calibri, Carlito, "Segoe UI", Arial, sans-serif }

/* evidence */
.chips { margin-bottom:16px; flex-wrap:wrap }
.chips button { border:1px solid var(--line); background:var(--paper) }
.token.risky { background:#f9e6e0; color:#974936 }
.evidence h3 { font-size:14px }

/* master */
.master-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; align-items:start }
.master-grid .card { margin:0 }
.resume-preview.compact { padding:26px; max-height:760px; overflow:auto; position:sticky; top:20px }

/* settings & dialogs */
.setting-row.three { grid-template-columns:1fr 1fr 1fr }
hr { border:0; border-top:1px solid var(--line); margin:22px 0 }
#import-jd { min-height:180px }

@media(max-width:1150px){
  .job-row { grid-template-columns:minmax(0,1fr) 170px }
  .job-gates { grid-column:1 / -1; order:3 }
  .master-grid { grid-template-columns:1fr }
  .resume-preview.compact { position:static; max-height:none }
}
@media(max-width:760px){
  h1 { font-size:22px }
  .board-filter { grid-template-columns:1fr 1fr }
  .board-filter button:nth-child(2) { border-right:0 }
  .board-filter button:nth-child(-n+2) { border-bottom:1px solid var(--line) }
  .job-row { display:block; padding:14px 16px }
  .job-gates { margin:12px 0 }
  .job-stage { flex-direction:row; justify-content:space-between; align-items:center }
  .gate { min-width:0; flex:1; padding:5px 8px }
  .gate-strip { display:flex; width:100% }
  .job-bar-side { justify-content:flex-start; margin-top:10px }
  .workflow button { font-size:11px; padding:9px 2px; gap:5px }
  .workflow span { display:inline-flex; width:17px; height:17px; font-size:10px }
  .toolbar .switch { margin-left:0 }
  .setting-row, .setting-row.three { grid-template-columns:1fr; gap:0 }
  .sticky-actions { position:static }
  .breadcrumb span { display:none }
}
.rewrite-note { display:block; font-size:11px; color:var(--muted); margin-bottom:4px }

/* ---------- v0.5: fetch, fit, compare ---------- */
.fetch-panel { border-color:#cfdcc9; background:#f8faf3 }
.fetch-main { display:flex; justify-content:space-between; gap:20px; align-items:flex-start }
.fetch-main h2 { margin-bottom:4px }
.fetch-main p { margin:0; max-width:760px }
.fetch-stats { display:flex; flex-wrap:wrap; gap:6px 18px; font-size:12px; color:var(--muted); margin-top:14px; padding-top:12px; border-top:1px solid var(--line) }
.fetch-stats b { color:var(--ink) }
.fetch-stats b.bad, .bad { color:#974936 }
.ok { color:#286342 }
.failed-list { margin:8px 0 10px; padding-left:18px; color:var(--muted); max-height:220px; overflow:auto }
.board-tools { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px }
.board-tools input[type=search] { width:280px; background:white }
.board-tools .switch { display:flex; align-items:center; gap:7px; margin:0; font-weight:500 }
.job-row { grid-template-columns:auto minmax(0,1fr) auto 190px }
.job-row.closed { opacity:.65 }
.pick { margin:0; align-self:start; padding-top:2px }
.job-company { display:flex; align-items:center; gap:8px }
.row-links { display:flex; gap:12px; font-size:12px }
.small-btn { font-size:12px; padding:5px 10px; margin-top:8px }
.fit { margin-top:10px; padding:10px 12px; background:#f3f6ee; border-radius:8px; font-size:12px }
.fit-head { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px }
.fit-head span:last-child { color:var(--ink) }
.fit dl { display:grid; grid-template-columns:44px 1fr; gap:3px 10px; margin:8px 0 0 }
.fit dt { color:var(--muted) }
.fit dd { margin:0 }
.fit-card { margin-bottom:18px }
.notice.soft { background:#f2f6ea; border-color:#d9e4c9; color:var(--ink) }
.profile-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:6px }
.profile-grid .card { margin-bottom:12px }
dl.profile { display:grid; grid-template-columns:76px 1fr; gap:6px 12px; font-size:12px; margin:0 0 10px }
dl.profile dt { color:var(--muted) }
dl.profile dd { margin:0 }
ul.traits { padding-left:18px; font-size:12px; margin:4px 0 0 }
ul.traits li { margin:3px 0 }
.compare-table.wide { min-width:720px }
.compare-table.wide th { font-size:12px; color:var(--ink); min-width:220px; font-weight:600 }
.compare-table.wide th:first-child { min-width:120px }
.compare-table .rowlabel { color:var(--muted); font-size:12px; white-space:nowrap }
.compare-table tr.group td { background:#eef3e4; font-weight:600; font-size:12px; color:var(--teal) }
.req-cell { margin-bottom:6px; line-height:1.55 }
.req-cell small { margin-left:4px; color:#906022 }
.compare-table td.diffview { font-size:12px; line-height:1.6 }
.companies-card { grid-column:1 / -1 }
.add-company { display:grid; grid-template-columns:1fr 140px 1fr auto; gap:8px; margin:10px 0 14px }
.company-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:6px; max-height:420px; overflow:auto }
.company-item { display:grid; grid-template-columns:auto 1fr; gap:0 8px; align-items:center; margin:0; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-weight:500; background:white }
.company-item small { grid-column:2; font-weight:400 }
.company-item.bad { border-color:#ebc2b5 }
@media(max-width:1150px){
  .profile-grid { grid-template-columns:1fr }
  .job-row { grid-template-columns:auto minmax(0,1fr) 170px }
}
@media(max-width:760px){
  .fetch-main { display:block }
  .fetch-main button { margin-top:12px }
  .board-tools input[type=search] { width:100% }
  .pick { float:right }
  .add-company { grid-template-columns:1fr 1fr }
}

/* ---------- v0.6: background, market, tracker, job detail ---------- */
.upload-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:6px 0 10px }
.upload-row input[type=file] { width:auto; background:white }
.positioning { font-style:italic; color:var(--teal); margin:8px 0 }
.cap-list { list-style:none; padding:0; margin:0 }
.cap-list li { display:grid; grid-template-columns:auto 1fr; gap:2px 8px; padding:7px 0; border-top:1px solid var(--line); font-size:12px }
.cap-list li:first-child { border-top:0 }
.cap-list li small { grid-column:2 }
.role-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px }
.role-card { border:1px solid var(--line); border-radius:10px; padding:14px 16px; background:white }
.role-card h3 { margin:0 }
.role-card p { font-size:12px; margin-bottom:8px }
.profile-grid.two { grid-template-columns:1fr 1fr; margin-top:14px }
.market-card h2 { margin-bottom:2px }
.chip-check { display:inline-flex; align-items:center; gap:6px; margin:0 10px 0 0; font-weight:500; font-size:13px }
.proposal { margin-top:14px; border-top:1px solid var(--line); padding-top:12px }
.proposal-item { padding:10px 0; border-bottom:1px solid var(--line) }
.proposal-item label { display:flex; align-items:center; gap:8px; margin:0 0 6px; font-size:12px }
.proposal-item .diffview { font-size:13px; line-height:1.65; margin-bottom:4px }
.pipeline { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--paper); margin-bottom:18px }
.pipeline button { border:0; border-right:1px solid var(--line); border-radius:0; background:transparent; padding:10px 8px; display:flex; flex-direction:column; align-items:flex-start; font-weight:500; color:var(--muted); font-size:12px }
.pipeline button:last-child { border-right:0 }
.pipeline button strong { font-size:20px; color:var(--ink); font-weight:600 }
.pipeline button.active { background:#eef3e4; box-shadow:inset 0 -3px 0 var(--teal); color:var(--ink) }
.tracker-table td { vertical-align:middle }
.status-select { width:auto; padding:5px 8px; font-size:12px; background:white }
.status-select.compact { margin-bottom:2px }
.job-head { display:flex; justify-content:space-between; gap:24px; align-items:flex-start; margin-bottom:16px }
.job-head h1 { margin:4px 0 6px }
.job-head-side { display:flex; flex-direction:column; align-items:flex-end; gap:10px }
label.inline { display:flex; align-items:center; gap:8px; margin:0; font-weight:500 }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--line); margin-bottom:18px; overflow-x:auto }
.tabs button { border:0; border-radius:0; background:transparent; padding:10px 14px; font-weight:500; color:var(--muted); white-space:nowrap }
.tabs button.active { color:var(--teal); box-shadow:inset 0 -2px 0 var(--teal) }
.jd-text { font-size:13px; line-height:1.7; max-height:none; white-space:pre-wrap; font-family:inherit }
.unique-list article { padding:10px 0; border-top:1px solid var(--line) }
.unique-list article:first-child { border-top:0 }
.unique-list h3 { margin-bottom:4px }
.unique-list p { font-size:12px; margin:2px 0 }
.timeline { padding-left:18px; font-size:12px }
.timeline li { margin:8px 0 }
.buttons.stack { flex-direction:column; align-items:stretch }
.family-chips { margin-bottom:12px }
@media(max-width:1150px){ .pipeline { grid-template-columns:repeat(5,minmax(0,1fr)) } .pipeline button:nth-child(5) { border-right:0 } }
@media(max-width:760px){
  .job-head { display:block } .job-head-side { align-items:flex-start; margin-top:12px }
  .pipeline { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .profile-grid.two { grid-template-columns:1fr }
}

/* v0.6.1 fetch progress */
.fetch-progress{display:grid;gap:6px;margin-top:12px;font-size:.9rem}
.fetch-progress progress{width:100%;height:6px;border:0;border-radius:3px;background:var(--line);overflow:hidden;appearance:none}
.fetch-progress progress::-webkit-progress-bar{background:var(--line);border-radius:3px}
.fetch-progress progress::-webkit-progress-value{background:var(--teal);border-radius:3px}
.fetch-progress progress::-moz-progress-bar{background:var(--teal)}

/* v0.6.4 analysis ledger, re-analysis, language switch */
.seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:white }
.seg button { border:0; border-radius:0; background:transparent; padding:6px 12px; font-size:.86rem; box-shadow:none }
.seg button + button { border-left:1px solid var(--line) }
.seg button.active { background:var(--lime); color:var(--ink); font-weight:600 }
.reanalyze textarea { width:100%; margin:6px 0 10px }
.ledger-table td { vertical-align:top }
.ledger-table td:first-child { min-width:200px }
.lang-switch { display:flex; gap:4px }
.lang-switch button { padding:3px 9px; font-size:.78rem; background:white; color:var(--ink); border:1px solid var(--line); border-radius:6px; box-shadow:none }
.lang-switch button.active { background:var(--lime); color:var(--ink); border-color:var(--lime) }
@media (max-width: 720px) { .board-tools input[type=search] { width:100% } }
.ledger-table { min-width:1180px }
.ledger-table th, .ledger-table td:not(:first-child):not(:nth-child(9)) { white-space:nowrap }
.ledger-table td:nth-child(9) { min-width:160px; max-width:240px }
.heading .button-link { white-space:nowrap }

/* ---------- v0.7: five pages with tabs ---------- */
.subheading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin:4px 0 14px }
.subheading h2 { margin-bottom:4px }
.subheading p { margin:0; max-width:760px }
.tab-count { margin-left:6px; font-size:11px; background:var(--lime); color:var(--ink); border-radius:9px; padding:0 6px }
.nav-item.recent { align-items:flex-start }
.recent-text { display:flex; flex-direction:column; min-width:0; line-height:1.35 }
.recent-text b, .recent-text small { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:160px; color:inherit }
.nav-item.recent small { opacity:.8 }
.crumb-back { margin-right:8px; color:var(--teal) }
.link-title { border:0; background:none; padding:0; font:inherit; font-weight:inherit; color:inherit; text-align:left; cursor:pointer }
.link-title:hover { background:none; color:var(--teal); text-decoration:underline; text-underline-offset:3px }
td .link-title { font-weight:600 }
.saved-filters { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:-4px 0 14px }
.saved-chip { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:16px; background:white; padding-left:4px }
.saved-chip button { padding:3px 7px }
.pager { display:flex; align-items:center; justify-content:center; gap:14px; margin:18px 0 }
.table-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px }
.col-chooser summary { cursor:pointer; font-weight:550; font-size:13px }
.col-list { display:flex; flex-wrap:wrap; gap:6px 4px; padding:10px 0 }
.jobs-table td, .jobs-table th { white-space:nowrap; font-size:13px; vertical-align:middle }
.jobs-table td:nth-child(3) { white-space:normal; min-width:220px }
.jobs-table tr.exclude td { opacity:.6 }
.jobs-table .status-select { min-width:110px; padding:4px 6px }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0) }
.today-card { display:grid; grid-template-columns:64px minmax(0,1fr) 150px; gap:20px; align-items:center; background:var(--paper); border:1px solid var(--line); border-left:4px solid #c9d3c8; border-radius:10px; padding:16px 20px; margin-bottom:10px }
.today-card.pass { border-left-color:var(--teal) }
.today-card.review { border-left-color:#d2ae6d }
.today-score { text-align:center; border-radius:10px; background:#eef4e3; padding:8px 4px }
.today-score strong { display:block; font-size:24px; line-height:1.1 }
.today-actions { display:flex; flex-direction:column; gap:7px }
.score-parts { display:block; margin-top:6px }
.todo-list { list-style:none; padding:0; margin:0 }
.todo-list li { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--line) }
.todo-list li:last-child { border-bottom:0 }
.undo-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap }
.center { text-align:center }
.variant-list { display:grid; gap:10px }
.variant { border:1px solid var(--line); border-radius:9px; padding:12px 14px; background:white }
.variant.stale { border-style:dashed }
.variant h3 { margin:0 }
.question textarea { margin:6px 0 }
.question.answered { border-left:4px solid var(--teal) }
.question.dismissed { opacity:.7 }
.question h3 { margin:0; font-weight:600 }
.wide-card { margin-top:18px }
.model-table select { min-width:190px }
.model-table td { vertical-align:middle }
.inline-num { display:inline-block; width:64px !important; padding:3px 6px; margin:0 4px }
label.switch { display:flex; align-items:center; gap:8px; font-weight:500; font-size:13px; margin:10px 0 }
.mode-switch { margin-bottom:14px }
.docx-check { border:1px solid var(--line); border-radius:8px; padding:8px 10px; margin:10px 0; background:#fbfcf7 }
.docx-check p { margin:4px 0 0 }
.button-link.primary-link { background:var(--teal); color:white; border-color:var(--teal) }
.button-link.primary-link:hover { background:#115a50 }
.spaced { margin-top:22px }
.eval-pick { max-height:240px; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:10px; margin-bottom:10px }
.bad { color:var(--red) }
.ok { color:var(--teal) }
@media (max-width: 900px) {
  .today-card { grid-template-columns:1fr; }
  .today-actions { flex-direction:row; flex-wrap:wrap }
  .subheading { flex-direction:column }
}
.fetch-panel.compact { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 16px; font-size:13px; flex-wrap:wrap }
.fetch-panel.compact .buttons { margin:0 }
.todo-list button { white-space:nowrap }
@media (max-width: 900px) {
  .today-score { display:flex; gap:6px; align-items:baseline; width:max-content; padding:4px 12px }
  .today-score strong { font-size:20px }
}


/* ---------- v0.8 accounts ---------- */
.auth-body { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px 16px; background:var(--bg) }
.auth-shell { width:100%; max-width:420px }
.auth-brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px; margin:0 0 18px; color:var(--ink) }
.auth-brand .brand-icon { background:var(--lime); color:var(--ink); width:32px; height:32px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center }
.auth-card { background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:26px 26px 22px }
.auth-card h1 { font-size:22px; margin:0 0 8px }
.auth-card label { display:block; margin:12px 0 4px }
.auth-card input { width:100% }
.auth-submit { width:100%; margin-top:18px; padding:11px 15px }
.auth-error { color:var(--red); background:#f8ebe7; border:1px solid #ecc9c0; border-radius:8px; padding:9px 12px; margin:10px 0 }
.auth-foot { text-align:center; margin-top:14px }
.auth-or { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:12px; margin:16px 0 4px }
.auth-or::before, .auth-or::after { content:""; flex:1; border-top:1px solid var(--line) }
.google-btn { display:flex; align-items:center; justify-content:center; gap:10px; border:1px solid var(--line); border-radius:8px; padding:10px 14px; background:white; color:var(--ink); text-decoration:none; font-weight:600; margin-top:14px }
.google-btn:hover { background:#edf2e9 }
.g-mark { width:22px; height:22px; border-radius:50%; border:1px solid var(--line); display:inline-flex; align-items:center; justify-content:center; font-weight:700; color:var(--teal); font-size:13px }
.side-user { display:flex; align-items:center; margin:0 0 6px }
.side-user-text { display:flex; flex-direction:column; min-width:0; line-height:1.35 }
.side-user-text b { color:#e0edc7; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.side-user-text small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:150px }
.side-actions { display:flex; gap:4px; margin:0 0 6px -8px }
.side-actions .side-link { color:#acbfaf; font-size:12px; font-weight:500 }
.side-actions .side-link:hover { background:#2c4b42; color:#e0edc7 }
.onboarding { margin-bottom:18px; border-color:var(--teal) }
.onboard-steps { margin:12px 0 0; padding:0; list-style:none; display:grid; gap:8px }
.onboard-steps li { display:grid; grid-template-columns:28px 1fr auto; gap:12px; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:white }
.onboard-steps li b { display:block }
.onboard-steps li .muted { display:block }
.onboard-steps .step-no { width:26px; height:26px; border-radius:50%; background:var(--lime); display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:12px }
.onboard-steps li.done { background:transparent }
.onboard-steps li.done .step-no { background:var(--teal); color:white }
.onboard-steps li.done b { color:var(--teal) }
@media (max-width:640px) { .onboard-steps li { grid-template-columns:28px 1fr } .onboard-steps li button { grid-column:2 } }
.invite-link { margin-top:14px; display:grid; grid-template-columns:1fr auto; gap:8px; align-items:end }
.invite-link label { grid-column:1 / -1; margin:0 }
.invite-link input { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px }
.users-table td { vertical-align:top }
.row-actions { white-space:nowrap }
.muted-row td { opacity:.6 }
.danger-text { color:var(--red) }
button.danger { background:var(--red); border-color:var(--red); color:white }

/* ---------- v0.8.1 role families ---------- */
.roles-card { margin-bottom:18px }
.family-group { margin-top:14px }
.family-group .field-title { margin-bottom:6px }
.family-chips, .city-chips { display:flex; flex-wrap:wrap; gap:8px }
.city-chips { margin-bottom:10px }
.family-chip { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:999px; background:white; padding:2px 4px 2px 10px }
.family-chip.on { border-color:var(--teal); background:#eef5ec }
.family-chip label { display:inline-flex; align-items:center; gap:6px; margin:0; font-weight:500; font-size:13px; cursor:pointer }
.family-chip input { margin:0 }
.family-chip .chip-edit { padding:2px 7px; font-size:12px; color:var(--muted) }
.family-chip .chip-edit:hover { color:var(--teal); background:transparent }
