:root {
  --paper: #f3f5f7;
  --surface: #ffffff;
  --ink: #16202a;
  --muted: #64748b;
  --line: #d9dee5;
  --teal: #0f766e;
  --teal-soft: #e6f3f1;
  --amber: #b45309;
  --amber-soft: #fdf1e3;
  --red: #b42318;
  --red-soft: #fcebea;
  --radius: 6px;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--teal); }
button, input, textarea, select { font: inherit; color: inherit; }
h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
h2 { font-size: 17px; font-weight: 600; margin: 28px 0 10px; }
p.lede { color: var(--muted); margin: 0 0 22px; max-width: 60ch; }

.app { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; padding: 22px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.rail a { color: var(--ink); text-decoration: none; padding: 7px 10px; border-radius: var(--radius); }
.rail a.active { background: var(--paper); font-weight: 500; }
.rail .brand { font-weight: 600; margin-bottom: 18px; padding-left: 10px; }
.rail-foot { margin-top: auto; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 40px 48px 80px; max-width: 820px; width: 100%; }
.app.bare { grid-template-columns: 1fr; }
.app.bare .main { max-width: 440px; margin: 10vh auto 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

button.primary, button.secondary, button.ghost, .btn {
  border-radius: var(--radius); padding: 8px 14px; border: 1px solid transparent; cursor: pointer; font-weight: 500; text-decoration: none; display: inline-block;
}
button.primary { background: var(--ink); color: #fff; }
button.primary:hover { background: #0b1118; }
button.secondary { background: var(--surface); border-color: var(--line); }
button.secondary:hover { border-color: var(--muted); }
button.ghost { background: transparent; color: var(--muted); padding: 4px 8px; }
button.ghost:hover { color: var(--ink); }
button.link { background: none; border: 0; padding: 0; color: var(--teal); cursor: pointer; text-align: left; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

label.field { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
label.field input, label.field textarea, textarea.plain, input.plain {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } .app { grid-template-columns: 1fr; } .rail { position: static; height: auto; flex-direction: row; align-items: center; } .rail-foot { margin-left: auto; } .main { padding: 24px 16px; } }

.dropzone { display: block; cursor: pointer; border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); background: var(--surface); }
.dropzone.over { border-color: var(--teal); background: var(--teal-soft); }
.dropzone input { display: none; }
.filelist { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* experiences */
.exp { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.exp + .exp { margin-top: 10px; }
.exp-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.exp-title { font-weight: 600; }
.exp-org { color: var(--muted); }
.exp-dates { color: var(--muted); font-size: 13px; white-space: nowrap; }
.bullets { list-style: none; margin: 8px 0 0; padding: 0; }
.bullets li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.bullets li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); margin-top: 9px; flex: none; }
.bullets textarea { min-height: 0; padding: 4px 8px; border-color: transparent; background: transparent; }
.bullets textarea:hover, .bullets textarea:focus { border-color: var(--line); background: var(--surface); }
.bullets li.changed textarea { border-left: 3px solid var(--amber); }
.bullets li.new textarea { border-left: 3px solid var(--teal); }

.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.create { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.tag.update { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.tag.warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.tag.ok { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.tag.bad { background: var(--red-soft); color: var(--red); border-color: transparent; }
.diff { font-size: 13px; color: var(--muted); margin: 2px 0 0 13px; }
.diff del { color: var(--red); text-decoration: line-through; }
.diff ins { color: var(--teal); text-decoration: none; }

/* resumes list */
.joblist { list-style: none; padding: 0; margin: 0; }
.joblist li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.joblist a { color: var(--ink); text-decoration: none; font-weight: 500; }
.joblist .meta { color: var(--muted); font-size: 13px; }

/* progress */
.steps { display: flex; gap: 6px; margin: 14px 0; }
.steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps span.done { background: var(--teal); }
.steps span.now { background: var(--amber); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .steps span.now { animation: none; } }

/* resume review: generated line | its sources */
.review { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.review .colhead { font-size: 13px; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.review .pair { display: contents; }
.review .gen, .review .src { padding: 8px 0; border-bottom: 1px solid var(--line); }
.review .gen { font-family: var(--serif); font-size: 15.5px; line-height: 1.5; }
.review .gen textarea { font-family: var(--serif); font-size: 15.5px; width: 100%; min-height: 0; border-color: transparent; background: transparent; padding: 2px 6px; }
.review .gen textarea:hover, .review .gen textarea:focus { border-color: var(--line); background: var(--surface); }
.review .src { color: var(--muted); font-size: 13.5px; }
.review .src .b { padding-left: 10px; border-left: 2px solid var(--teal); margin: 2px 0; }
.review .pair:hover .gen, .review .pair:hover .src { background: var(--teal-soft); }
.review .exphead { grid-column: 1 / -1; margin-top: 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.review .exphead small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.review .pair.removed .gen textarea { text-decoration: line-through; color: var(--muted); }
.gen .tools { display: flex; gap: 8px; margin-top: 2px; }
.dropped { color: var(--muted); font-size: 13.5px; }
.dropped li { margin: 4px 0; }
.pdf { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

.notice { padding: 10px 14px; border-radius: var(--radius); font-size: 14px; }
.notice.warn { background: var(--amber-soft); color: var(--amber); }
.notice.bad { background: var(--red-soft); color: var(--red); }
.notice.ok { background: var(--teal-soft); color: var(--teal); }
.empty { color: var(--muted); padding: 28px 0; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius); font-size: 14px; box-shadow: 0 6px 24px rgba(22,32,42,.18); }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0; }
.provider { width: 100%; text-align: left; display: flex; gap: 10px; align-items: center; }

[hidden] { display: none !important; }

.jd { margin: 14px 0 0; }
.jd summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.md textarea.mono { width: 100%; min-height: 420px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-sizing: border-box; resize: vertical; }
.jd pre { white-space: pre-wrap; font: inherit; font-size: 13.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 8px; max-height: 320px; overflow: auto; }

/* ---------- landing (logged-out front page) ---------- */
.app.bare .main.landing { max-width: 1040px; margin: 0 auto; padding: 0 32px 48px; }
.landing h2 { font-size: 22px; margin: 64px 0 18px; letter-spacing: -0.01em; }
.landing h3 { font-size: 15.5px; font-weight: 600; margin: 0 0 6px; }
.lp-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.lp-brand { font-weight: 600; font-size: 17px; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--muted); }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 48px 0 8px; }
.hero h1 { font-family: var(--serif); font-size: 44px; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero .lede { font-size: 17px; max-width: 46ch; }
.demo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; box-shadow: 0 18px 50px rgba(22, 32, 42, .08); }
.demo-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.demo-line { font-family: var(--serif); font-size: 16.5px; line-height: 1.5; margin: 10px 0 14px; }
.demo-src { border-left: 3px solid var(--teal); background: var(--teal-soft); padding: 10px 12px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; color: var(--ink); }
.demo-src span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); margin-bottom: 2px; }
.demo-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 13px; color: var(--teal); }
.proof { list-style: none; padding: 18px 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.proof strong { display: block; color: var(--ink); font-size: 17px; }
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.how li > span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.how p, .feat p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.feat h3::before { content: ""; display: block; width: 24px; height: 3px; background: var(--teal); border-radius: 2px; margin-bottom: 12px; }
.start { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-top: 64px; padding: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.start h2 { margin-top: 0; }
.start-cards { display: grid; gap: 16px; }
.start.two .start-cards { grid-template-columns: 1fr; }
.start .card { background: var(--paper); }
.start .card h3 { margin-bottom: 2px; }
.opt { color: var(--muted); font-weight: 400; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq details p { color: var(--muted); margin: 8px 0 0; max-width: 70ch; }
.lp-foot { margin-top: 56px; color: var(--muted); font-size: 13px; }
@media (max-width: 820px) {
  .app.bare .main.landing { padding: 0 16px 40px; }
  .hero, .start { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 34px; }
  .proof { grid-template-columns: repeat(2, 1fr); }
  .how, .feats { grid-template-columns: 1fr; }
  .start { padding: 22px 16px; }
}
