/* TailorProof — light SaaS style. Brand "Stitch Check" (2026-10-25, Claude Design artifact
   https://claude.ai/artifact/7KiSKDp39qftXe8WWA9zp1): Ink #14213D, Paper #F7F5EF, Thread #FF6B4A (accent: logo,
   active marks, bars), Thread-on-light #D9481F (drawn marks only). Buttons and orange text use #C23B14 — same hue,
   5.3:1 with white and 4.9:1 on Paper (#D9481F is only 4.3:1, too low for text). */
:root {
  --bg: #ffffff; --bg-alt: #f7f5ef; --ink: #14213d; --muted: #5b647a; --caption: #646d82;
  --line: #e7e9ee; --field: #d5d9e2; --soft: #f1f3f7;
  --accent: #ff6b4a; --accent-dark: #d9481f; --cta: #c23b14; --cta-hover: #9c2f0f; --accent-soft: #fff0eb;
  --ok: #16803d; --ok-bg: #e7f8ed; --warn: #9a3412; --warn-bg: #fff1e6; --bad: #c0271b; --bad-bg: #fdecea;
  --mark: #fde3cf; --mark-hot: #ffc79e;
  --radius: 16px; --shadow: 0 4px 14px rgba(20, 33, 61, 0.05); --tabbar-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* our display rules must never un-hide an element */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-alt); color: var(--ink);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
a { color: var(--cta); } a:hover { color: var(--cta-hover); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top); }
.topbar-inner { display: flex; align-items: center; gap: 36px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; display: block; flex: 0 0 auto; }
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand-name { font: 500 19px/1 Manrope, "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: -0.03em; }
.brand-name b { font-weight: 800; }
.appnav { display: flex; gap: 28px; flex: 1 1 auto; align-self: stretch; }
.appnav button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 3px 0 0; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 15px; }
.appnav button[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.guest, .who { display: flex; align-items: center; gap: 16px; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--ink); color: #fff; display: grid;
  place-items: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.who-email { font-size: 14px; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px;
  border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-hover); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--field); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; min-height: 50px; font-size: 16px; }
.linkbtn { background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--cta); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--cta-hover); }
.linkbtn.strong { font-weight: 700; }
.who .linkbtn, .guest .linkbtn { color: var(--muted); text-decoration: none; }
.guest .linkbtn.strong { color: var(--ink); font-size: 15px; }

/* ---------- page + cards ---------- */
main { min-height: calc(100vh - 65px); }
.screen { padding-top: 40px; padding-bottom: 72px; }
body[data-screen] .screen { display: none; }
body[data-screen="setup"] .screen[data-screen="setup"], body[data-screen="match"] .screen[data-screen="match"],
body[data-screen="result"] .screen[data-screen="result"], body[data-screen="history"] .screen[data-screen="history"],
body[data-screen="profile"] .screen[data-screen="profile"],
body[data-screen="admin"] .screen[data-screen="admin"] { display: block; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.page-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--caption); }
.sub { margin: 6px 0 0; font-size: 16px; color: var(--muted); }
.caption { font-size: 13px; color: var(--caption); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card + .card { margin-top: 24px; }
.card.flush { padding: 0; overflow: hidden; }
.card.empty { box-shadow: none; border-style: dashed; color: var(--muted); }
.card.empty p { margin: 0; }
.card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.card-title h2 { font-size: 20px; font-weight: 800; }
.card h2 { font-size: 20px; font-weight: 800; }
.step { width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wrap-gap { gap: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 12px 14px; font-size: 16px; font-weight: 500; color: var(--ink);
  background: #fff; border: 1px solid var(--field); border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.55; }
.pair { display: flex; flex-wrap: wrap; gap: 16px; }
.pair > .field { flex: 1 1 240px; min-width: 0; }
.hint { margin: -6px 0 0; font-size: 13px; color: var(--caption); }
.note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--warn); font-size: 14px; font-weight: 600; }
.error { margin: 8px 0 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.error:empty { display: none; }
.busy { margin: 4px 0 0; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  border: 2px dashed var(--field); border-radius: 14px; background: var(--bg-alt); padding: 32px 20px; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--cta); display: grid; place-items: center; }
.dropzone-text { font-size: 16px; font-weight: 700; }
.dropzone-text u { color: var(--cta); }
#paste-box { margin-top: 14px; }
#cv-form .row-between { margin-top: 12px; }

/* ---------- auth ---------- */
.auth-screen { background: var(--bg-alt); }
.auth-grid { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: 80px; padding-bottom: 80px; }
.auth-pitch { flex: 1 1 420px; min-width: 0; }
.auth-pitch h1 { font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.lead { margin: 0 0 28px; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 520px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-weight: 600; }
.checks li { display: flex; gap: 10px; align-items: center; }
.check { width: 22px; height: 22px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; flex: 0 0 auto; }
.auth-card { flex: 0 1 440px; min-width: 0; padding: 36px; box-shadow: 0 12px 32px rgba(20, 33, 61, 0.08); }
.auth-card h2 { font-size: 26px; font-weight: 800; margin-bottom: 22px; }
.auth-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0; }

/* ---------- intake ---------- */
.intake { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.intake-main { flex: 999 1 640px; min-width: 0; }
.recent { flex: 1 1 300px; min-width: 0; padding: 24px; }
.recent h2 { font-size: 16px; margin-bottom: 8px; }
.recent-list { list-style: none; margin: 0 0 8px; padding: 0; }
.recent-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.recent-list li:last-child { border-bottom: 0; }
.recent-list button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 700; font-size: 14px; color: var(--ink); }
.recent-list button:hover { color: var(--cta); }
.recent-list .caption { display: block; margin-top: 4px; }

/* ---------- match ---------- */
.segmented { display: inline-flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 999px; }
.segmented button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 10px 18px; min-height: 40px;
  font-size: 14px; font-weight: 700; cursor: pointer; }
.segmented button[aria-selected="true"] { background: var(--ink); color: #fff; }
.segmented button:disabled { opacity: 0.45; cursor: not-allowed; }
.summary { margin: 0; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.summary strong { color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.pills button { border: 1px solid var(--field); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 16px; min-height: 40px;
  font-size: 14px; font-weight: 700; cursor: pointer; }
.pills button span { font-weight: 600; opacity: 0.75; margin-left: 4px; }
.pills button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.match-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 14px 0 10px; border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--caption); }
.match { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.match-job { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.match-job p { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 600; }
.match-evidence { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.match blockquote { margin: 0; padding: 12px 14px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; line-height: 1.55; }
.reason { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.label { display: none; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--caption); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.badge.strong { background: var(--ok-bg); color: var(--ok); }
.badge.partial { background: var(--warn-bg); color: var(--warn); }
.badge.none { background: var(--bad-bg); color: var(--bad); }
.match-foot { margin: 16px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chips:last-child { margin-bottom: 0; }
.chip { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--warn); cursor: pointer; border: 1px solid transparent; }
.chip small { font-size: 12px; font-weight: 500; margin-left: 4px; }
.chip.hot { border-color: var(--cta); }
.chip.missing { background: #fff; color: var(--bad); border: 1px dashed var(--bad); cursor: default; }
.chip-title { margin: 18px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--caption); }
.texts { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.texts summary { cursor: pointer; font-weight: 700; color: var(--cta); }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }
.columns h3 { font-size: 13px; margin: 0 0 6px; color: var(--caption); text-transform: uppercase; letter-spacing: 0.06em; }
.columns pre { position: relative; white-space: pre-wrap; word-break: break-word; font: 13px/1.55 "Plus Jakarta Sans", system-ui, sans-serif;
  margin: 0; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--bg-alt); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; cursor: pointer; }
mark.hot { background: var(--mark-hot); }

/* ---------- result ---------- */
.report h2 { font-size: 18px; margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { border-radius: 12px; padding: 18px; background: var(--bg-alt); border: 1px solid var(--line); }
.stat b { display: block; font-size: 30px; font-weight: 800; line-height: 1.1; }
.stat span { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.stat.good { background: var(--ok-bg); border-color: transparent; } .stat.good b, .stat.good span { color: var(--ok); }
.stat.bad { background: var(--bad-bg); border-color: transparent; } .stat.bad b, .stat.bad span { color: var(--bad); }
.bar { height: 8px; border-radius: 999px; background: var(--line); margin-top: 10px; overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: var(--accent); }
.report-cols { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.report-cols > div { flex: 1 1 360px; min-width: 0; }
.report h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.report ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; }
.report .ok-line { margin: 0; color: var(--ok); font-weight: 600; font-size: 14px; }
.paper { max-width: 860px; margin: 28px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(20, 33, 61, 0.08); padding: 56px 64px; }
.paper header { text-align: center; margin-bottom: 28px; }
.paper .cv-name { font-size: 30px; font-weight: 800; }
.paper .cv-meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.paper h3 { margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.paper p, .paper li { font-size: 14px; line-height: 1.6; }
.paper p { margin: 0 0 8px; }
.role { margin-bottom: 16px; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.role-head strong { font-size: 15px; }
.role-head span { color: var(--muted); font-size: 14px; }
.role ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.skills { margin: 0; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.skills dt { font-weight: 700; } .skills dd { margin: 0; }

/* ---------- history ---------- */
.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.history-list li:last-child { border-bottom: 0; }
.history-list .h-main { flex: 1 1 420px; min-width: 0; }
.history-list .h-title { margin: 0; font-size: 16px; font-weight: 700; }
.history-list .h-meta { margin: 4px 0 0; font-size: 14px; color: var(--caption); }
.sent-note { margin: -12px 0 20px; padding: 10px 12px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 600; }
.paper.letter .paper-label { margin: 0 0 18px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--caption); text-align: center; }
.paper.letter .letter-meta { margin-bottom: 18px; }
.paper.letter .letter-body p { margin: 0 0 12px; text-align: justify; }
.paper.letter .letter-check { margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--caption); }
.status-progress { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--caption); }
.status-failed { font-size: 14px; font-weight: 600; color: var(--bad); background: var(--bad-bg); padding: 6px 12px; border-radius: 999px; }
.open-link { background: none; border: 0; cursor: pointer; color: var(--cta); font-size: 15px; font-weight: 700; padding: 10px 0; }
.open-link:hover { color: var(--cta-hover); }
.history-empty { padding: 28px; color: var(--muted); }

/* ---------- bottom tab bar (phone only) ---------- */
.tabbar { display: none; }

@media (max-width: 900px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { min-height: 56px; gap: 12px; flex-wrap: nowrap; }
  .appnav, .who-email, #install { display: none; }
  .brand-name { font-size: 17px; }
  .avatar { width: 34px; height: 34px; }
  main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .screen { padding-top: 22px; padding-bottom: 28px; }
  .page-head { margin-bottom: 18px; align-items: stretch; }
  .page-head > * { width: 100%; }
  .page-head h1 { font-size: 24px; }
  .page-head .actions .btn, .page-head > .btn { flex: 1 1 auto; }
  .card { padding: 18px; border-radius: 14px; }
  .card + .card { margin-top: 16px; }
  .auth-grid { gap: 24px; padding-top: 28px; padding-bottom: 32px; }
  .auth-pitch h1 { font-size: 28px; }
  .auth-pitch .lead { font-size: 15px; margin-bottom: 0; }
  .auth-pitch .checks { display: none; }
  .auth-card { padding: 24px 20px; }
  .recent { display: none; }
  .actions .btn { flex: 1 1 100%; min-height: 50px; }
  #result-actions .btn { flex: 1 1 calc(50% - 6px); }  /* four result actions: two per row */
  .sent-note { margin-top: 0; }
  .dropzone { padding: 22px 14px; }
  .segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .segmented button { padding: 10px 6px; min-height: 44px; }
  .pills { flex-wrap: nowrap; overflow-x: auto; margin-left: -18px; margin-right: -18px; padding: 0 18px 6px; }
  .pills button { flex: 0 0 auto; min-height: 44px; }
  .match-head { display: none; }
  .match { grid-template-columns: 1fr; gap: 10px; }
  .label { display: block; margin-bottom: 4px; }
  .columns { grid-template-columns: 1fr; }
  .columns pre { max-height: 40vh; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
  .stat { padding: 10px; border-radius: 10px; }
  .stat b { font-size: 22px; }
  .stat span { font-size: 12px; line-height: 1.3; }
  .report h2 { margin-bottom: 12px; }
  .paper { padding: 22px 18px; border-radius: 12px; margin-top: 16px; }
  .paper .cv-name { font-size: 22px; }
  .skills { grid-template-columns: 1fr; gap: 2px; }
  .skills dd { margin-bottom: 8px; }
  .history-list li { padding: 16px 18px; }
  .tabbar:not([hidden]) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; z-index: 20;
    left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
    padding: 6px env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 10px;
    min-height: 52px; background: none; border: 0; color: var(--caption); font-size: 12px; font-weight: 600; cursor: pointer; }
  .tabbar button[aria-current="page"] { color: var(--cta); font-weight: 700; }
  .tabbar .dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }
}

/* ---------- landing page (logged-out visitors) ---------- */
.sitenav { display: flex; gap: 28px; flex: 1 1 auto; }
.sitenav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.sitenav a:hover { color: var(--ink); }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 16px; }
.center { text-align: center; }
.hero { background: var(--bg); border-bottom: 1px solid var(--line); }
.hero-grid { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 88px; }
.hero-copy { flex: 1 1 460px; min-width: 0; }
.hero-copy h1 { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero-copy .lead { max-width: 560px; }
.hero-copy .actions { margin-bottom: 14px; }
.receipt { flex: 1 1 440px; min-width: 0; margin: 0; padding: 24px; box-shadow: 0 20px 48px rgba(20, 33, 61, 0.10); }
.receipt-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.receipt-head .summary { font-size: 14px; }
.receipt-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.receipt-job { margin: 0; font-weight: 600; }
.receipt blockquote { margin: 0; padding: 10px 12px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.receipt-removed { margin: 14px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 14px; }
.band { padding: 88px 0; background: var(--bg); }
.band, .hero { scroll-margin-top: 64px; }  /* clear the sticky top bar when jumping to a section */
.band.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow.center { text-align: center; }
#demo .section-sub { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 32px; font-size: 17px; }
.demo-frame { max-width: 1040px; margin: 0 auto 14px; border-radius: 18px; overflow: hidden; background: var(--ink);
  box-shadow: 0 24px 56px rgba(20, 33, 61, 0.18); }
.demo-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); }
.section-title { text-align: center; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin: 0 auto 14px; max-width: 760px; }
.section-sub { text-align: center; margin: 0 0 36px; color: var(--muted); }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.steps .card + .card { margin-top: 0; }
.steps h3 { font-size: 18px; margin: 14px 0 8px; }
.steps p, .feature p { margin: 0; color: var(--muted); line-height: 1.6; }
.features { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px 40px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; padding-left: 16px; position: relative; }
.feature h3::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.feature p { padding-left: 16px; }
.narrow-wrap { max-width: 860px; }
.table-box { margin-top: 32px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.compare-table th, .compare-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--caption); background: var(--bg-alt); }
.compare-table thead th:nth-child(2) { color: var(--cta); }
.compare-table tbody th { font-weight: 600; }
.compare-table td { color: var(--muted); }
.compare-table td.yes { color: var(--ok); font-weight: 700; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; max-width: 1020px; margin: 0 auto; }
.plans .card + .card { margin-top: 0; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; }
.plan h3 { font-size: 18px; }
.plan .price { margin: 0; color: var(--muted); }
.plan .price b { font-size: 40px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.plan ul { margin: 0 0 auto; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.plan .caption { margin: 0; }
.plan.featured { border: 2px solid var(--accent); }
.plan-tag { position: absolute; top: -13px; left: 24px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.soon { font-size: 12px; font-weight: 700; color: var(--warn); background: var(--warn-bg); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.faq { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style-position: outside; }
.faq details p { margin: 0 0 18px; color: var(--muted); line-height: 1.65; }
.cta-band { background: var(--ink); }
.cta-band .section-title { color: #fff; margin-bottom: 28px; }
.site-footer { background: var(--bg); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: var(--caption); }
.footer-links { display: flex; gap: 20px; align-items: center; }
.footer-links a { color: var(--caption); }
.back { display: inline-block; margin: -6px 0 14px; color: var(--muted); text-decoration: none; }

@media (max-width: 900px) {
  .sitenav { display: none; }
  .hero-grid { gap: 32px; padding-top: 36px; padding-bottom: 44px; }
  .hero-copy h1 { font-size: 34px; }
  .band { padding: 52px 0; }
  .section-title { font-size: 26px; }
  .features { gap: 22px; }
  .compare-table th, .compare-table td { padding: 12px 14px; font-size: 14px; }
  .receipt { padding: 18px; }
}

/* ---------- legal pages (privacy.html, terms.html) ---------- */
.legal-page { background: var(--bg); }
.legal { max-width: 760px; padding-top: 40px; padding-bottom: 72px; }
.legal h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.legal h2 { font-size: 19px; font-weight: 800; margin: 32px 0 10px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: #2c3546; }
.legal ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.draft-banner { margin: 0 0 28px; padding: 12px 16px; border-radius: 10px; background: var(--warn-bg); color: var(--warn) !important; font-size: 14px !important; }

/* ---------- job from screenshots ---------- */
.shot-box { border: 1px dashed var(--field); border-radius: 14px; background: var(--bg-alt); padding: 16px; margin-bottom: 20px; }
.shot-box.over { border-color: var(--accent); background: var(--accent-soft); }
.shot-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shot-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--cta); display: grid; place-items: center; flex: 0 0 auto; }
.shot-text { flex: 1 1 240px; min-width: 0; }
.shot-title { margin: 0 0 2px; font-weight: 700; }
.shot-text .caption { margin: 0; }
.shot-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.shot-thumbs img { width: 64px; height: 64px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.shot-box .busy, .shot-box .error { margin-top: 12px; }
.filled { animation: filled 1.6s ease-out; }
@keyframes filled { from { background: var(--accent-soft); border-color: var(--accent); } to { background: #fff; } }
@media (max-width: 900px) {
  .shot-head .btn { flex: 1 1 100%; min-height: 46px; }
}

/* ===== Profile (LinkedIn-style, read from the base CV) ===== */
.who-open { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border: 0; border-radius: 999px;
  background: none; color: var(--ink); cursor: pointer; font: inherit; }
.who-open:hover, [data-screen="profile"] .who-open { background: var(--accent-soft); }
.profile-cv { display: grid; gap: 4px; min-width: 240px; }
.profile-cv select { width: 100%; }
#profile-retry { margin-bottom: 20px; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-grid > div > .card + .card { margin-top: 24px; }
.profile-top { padding: 0; overflow: hidden; margin-bottom: 24px; }
.profile-banner { height: 96px; background: linear-gradient(120deg, var(--ink) 0%, #2c3b55 55%, var(--accent) 140%); }
.profile-id { display: flex; gap: 20px; align-items: flex-end; padding: 0 28px 24px; margin-top: -44px; flex-wrap: wrap; }
.profile-avatar { width: 104px; height: 104px; border-radius: 999px; border: 4px solid #fff; background: var(--cta); color: #fff;
  display: grid; place-items: center; font-size: 36px; font-weight: 800; flex: 0 0 auto; }
.profile-id > div { padding-top: 56px; }  /* only the avatar overlaps the banner */
.profile-id h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.profile-id .headline { margin: 4px 0 6px; font-size: 16px; color: var(--ink); }
.profile-id .meta { margin: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.profile-card h2 { margin: 0 0 16px; font-size: 18px; font-weight: 800; }
.profile-card p { margin: 0; line-height: 1.6; }
.p-item { display: flex; gap: 14px; }
.p-item + .p-item { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.p-logo { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--cta); display: grid;
  place-items: center; font-weight: 800; flex: 0 0 auto; }
.p-item h3 { margin: 0; font-size: 16px; font-weight: 700; }
.p-item .p-sub { margin: 2px 0 0; font-size: 14px; }
.p-item .p-dates { margin: 2px 0 0; font-size: 13px; color: var(--caption); }
.p-item ul { margin: 10px 0 0; padding-left: 18px; }
.p-item li { font-size: 14px; line-height: 1.55; }
.p-item li + li { margin-top: 4px; }
.profile-card .plain-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.profile-card .plain-list li + li { margin-top: 6px; }
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .profile-grid > div > .card + .card { margin-top: 16px; }
  .profile-top { margin-bottom: 16px; }
  .profile-banner { height: 72px; }
  .profile-id { padding: 0 18px 20px; margin-top: -36px; gap: 12px; }
  .profile-avatar { width: 80px; height: 80px; font-size: 28px; }
  .profile-id > div { padding-top: 0; flex: 1 1 100%; }
  .profile-id h2 { font-size: 22px; }
  .profile-cv { min-width: 0; }
  .who-open { padding: 0; }
}

/* profile editing */
.profile-edit .card + .card { margin-top: 24px; }
.profile-edit .card > .field + .field, .profile-edit .card > .pair + .field, .profile-edit .card > .field + .pair,
.profile-edit .card > .pair + .pair { margin-top: 16px; }
.pe-item { padding: 18px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 14px; }
.pe-list { display: grid; gap: 14px; margin-bottom: 14px; }
.pe-remove { justify-self: start; color: var(--bad); }
.pe-remove:hover { color: var(--bad); }
.pe-skills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pe-skill { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.pe-skill button { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pe-add { display: flex; gap: 10px; }
.pe-add input { flex: 1 1 auto; min-width: 0; }
.pe-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 24px; padding: 14px 0; background: var(--bg-alt); border-top: 1px solid var(--line); }
.pe-bar .error { flex: 1 1 100%; margin: 0; }
@media (max-width: 900px) {
  .pe-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }  /* above the tab bar */
  .pe-bar .btn { flex: 1 1 0; }
  .pe-item { padding: 14px; }
}

/* pencils: edit a section in place (like LinkedIn) */
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pc-head h2 { margin: 0; }
.pe-pencil { width: 40px; height: 40px; border-radius: 999px; border: 0; background: none; color: var(--muted); display: grid;
  place-items: center; cursor: pointer; flex: 0 0 auto; }
.pe-pencil:hover, .pe-pencil:focus-visible { background: var(--accent-soft); color: var(--cta); }
.profile-top { position: relative; }
.pe-pencil.on-banner { position: absolute; top: 12px; right: 12px; background: #fff; color: var(--ink); box-shadow: var(--shadow); }
[data-edit] { scroll-margin-top: 84px; }

/* download & send card: template picker + PDF / Word per document */
.downloads { margin-bottom: 24px; display: grid; gap: 18px; }
.downloads h2 { margin: 0; font-size: 18px; font-weight: 800; }
.downloads > .btn { justify-self: start; }
.downloads > .caption { margin: -8px 0 0; }
.dl-templates { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-templates button { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px;
  border: 1px solid var(--field); background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.dl-templates button[aria-checked="true"] { border-color: var(--cta); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--cta); }
.swatch { width: 30px; height: 38px; border-radius: 4px; border: 1px solid var(--line); background: #fff; position: relative;
  display: flex; flex-direction: column; gap: 3px; padding: 5px 4px; overflow: hidden; }
.swatch i { display: block; height: 3px; border-radius: 2px; background: #cfd5df; }
.swatch i:first-child { height: 4px; width: 60%; margin: 0 auto 2px; background: #1F3A5F; }
.swatch.modern { padding-top: 0; }
.swatch.modern i:first-child { width: auto; height: 10px; margin: 0 -4px 3px; border-radius: 0; background: #1A2332; }
.swatch.modern i:nth-child(2) { width: 40%; background: #0E7490; }
.swatch.executive { border-left: 3px solid #7A1F2B; }
.swatch.executive i:first-child { background: #7A1F2B; }
.swatch.executive i:nth-child(2) { border-top: 1px solid #7A1F2B; border-bottom: 1px solid #7A1F2B; background: none; height: 3px; }
.dl-rows { display: grid; gap: 10px; }
.dl-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.dl-label { font-weight: 700; font-size: 15px; flex: 1 1 140px; }
.dl-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) {
  .downloads { margin-bottom: 16px; gap: 14px; }
  .dl-templates button { flex: 1 1 0; flex-direction: column; gap: 6px; padding: 10px 6px; }
  .dl-buttons { flex: 1 1 100%; }
  .dl-buttons .btn { flex: 1 1 0; }
  .downloads > .btn { justify-self: stretch; }
}

/* plan line + pass picker (Tailor screen) */
.plan-bar { margin: -12px 0 20px; padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line);
  font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.plan-bar.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); font-weight: 600; }
.plan-bar.good { background: var(--ok-bg); border-color: transparent; color: var(--ok); font-weight: 600; }
.passes { margin-bottom: 24px; display: grid; gap: 12px; scroll-margin-top: 84px; }
.passes-head { display: flex; justify-content: space-between; align-items: center; }
.passes-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.passes .sub { margin: 0; }
.pass-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pass { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; }
.pass h3 { margin: 0; font-size: 16px; }
.pass .price { margin: 0; color: var(--muted); }
.pass .price b { font-size: 28px; font-weight: 800; color: var(--ink); }
@media (max-width: 900px) { .plan-bar { margin-top: -6px; } }

/* "Continue with Google" above the email form */
.google-box { display: grid; gap: 16px; margin-bottom: 16px; }
.google-btn { gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 13px; color: var(--caption); }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* main profile: include switches and sources */
#profile-merge { margin-bottom: 24px; }
.merge-card { display: grid; gap: 12px; }
.merge-card h2 { margin: 0; font-size: 18px; font-weight: 800; }
.merge-card p { margin: 0; }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }
.switch input { width: 44px; height: 24px; flex: 0 0 auto; appearance: none; -webkit-appearance: none; padding: 0;
  border-radius: 999px; background: var(--field); position: relative; cursor: pointer; border: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--cta); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.source-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 12px; }
.source-list .s-name { flex: 1 1 200px; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.source-list .s-meta { display: block; font-weight: 500; font-size: 13px; color: var(--caption); }
.merge-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
@media (max-width: 900px) {
  #profile-merge { margin-bottom: 16px; }
  .source-list .btn { flex: 1 1 100%; }
}

/* ===== landing: AI agent feel (typed title, live agent run, reveals). Without JS / with reduced motion the
   finished content shows as is; landing.js adds .motion to <html> only when animating. ===== */
.hero { background:
  radial-gradient(900px 360px at 85% -10%, rgba(255, 107, 74, 0.10), transparent 70%),
  radial-gradient(700px 300px at -5% 10%, rgba(14, 116, 144, 0.08), transparent 70%), var(--bg); }
.agent-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); text-transform: none; letter-spacing: 0;
  font-size: 13px; color: var(--ink); }
.live-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--ok); flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(22, 128, 61, 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 128, 61, 0.45); } 70% { box-shadow: 0 0 0 8px rgba(22, 128, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 128, 61, 0); } }

.typed-box { display: grid; }
.typed-box > .type-ghost, .typed-box > .type-live { grid-area: 1 / 1; }  /* same cell: ghost reserves the space */
.type-ghost { visibility: hidden; }
.typing::after { content: ""; display: inline-block; width: 0.08em; min-width: 2px; height: 0.95em; margin-left: 3px;
  vertical-align: -0.12em; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.agent { flex: 1 1 440px; min-width: 0; margin: 0; padding: 0; overflow: hidden; box-shadow: 0 24px 56px rgba(20, 33, 61, 0.12); }
.agent-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.agent-avatar { width: 26px; height: 26px; display: block; flex: 0 0 auto; }
.agent-avatar svg { display: block; }
.agent-name { font-weight: 800; font-size: 14px; }
.agent-state { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.agent-state.busy .live-dot { background: var(--accent); animation-name: pulse-busy; }
@keyframes pulse-busy { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 74, 0.5); } 70% { box-shadow: 0 0 0 8px rgba(255, 107, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 74, 0); } }
.agent-log { list-style: none; margin: 0; padding: 18px; display: grid; gap: 10px; font-size: 14px; }
.agent > .caption { padding: 0 18px 14px; margin: 0; }
.msg { margin: 0; }
.msg.user { justify-self: end; max-width: 85%; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--ink); color: #fff; }
.msg.user b { color: #fff; }
.msg.tool { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.msg.tool svg { flex: 0 0 auto; width: 18px; height: 18px; padding: 3px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.msg.req { display: grid; gap: 6px; justify-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.msg.req blockquote { margin: 0; padding: 8px 10px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.msg.req .reason { margin: 0; font-size: 13px; color: var(--muted); }
.msg.removed { padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 13px; }
.msg.agent-reply { max-width: 92%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--accent-soft); color: var(--ink); }

/* animated states */
.motion .agent-log > .msg { transition: opacity 0.35s ease, transform 0.35s ease; }
.motion .agent-log > .msg:not(.in) { opacity: 0; transform: translateY(6px); }
.motion .msg.tool.in:not(.done) svg { visibility: hidden; }
.motion .msg.tool.in:not(.done)::before { content: ""; flex: 0 0 auto; box-sizing: border-box; width: 18px; height: 18px; border-radius: 999px;
  border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.motion .msg.tool.in:not(.done) svg { position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }
.motion .reveal { opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s ease var(--delay, 0ms), transform 0.6s ease var(--delay, 0ms); }
.motion .reveal.in { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .agent-log { padding: 14px; }
  .msg.user, .msg.agent-reply { max-width: 100%; }
}

/* live run panel in the app (same look as the landing demo; .run-log, not .agent-log, so landing motion rules
   never hide it) */
.run { margin-top: 20px; box-shadow: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.run-log { list-style: none; margin: 0; padding: 16px; display: grid; gap: 8px; font-size: 14px; max-height: 460px; overflow-y: auto; }  /* no smooth scrolling: it broke following the stream */
.run-log .msg.tool { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.run-log .msg.tool b { color: var(--ink); font-weight: 600; }
.run-log .msg.tool .detail { color: var(--caption); }
.run-log .msg.tool svg { flex: 0 0 auto; width: 18px; height: 18px; padding: 3px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.run-log .msg.tool:not(.done) svg { display: none; }
.run-log .msg.tool:not(.done)::before { content: ""; flex: 0 0 auto; box-sizing: border-box; width: 18px; height: 18px;
  border-radius: 999px; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.run-log .msg.draft { margin-left: 28px; padding: 4px 0 4px 12px; border-left: 2px solid var(--accent-soft); font-size: 13px; color: var(--ink); }
.run-log .msg.removed b { font-weight: 700; }
.run-log .msg.error { padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 13px; }
.run-actions { display: flex; gap: 12px; flex-wrap: wrap; padding: 0 16px 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  .run-log .msg.fresh { animation: msg-in 0.35s ease both; animation-delay: var(--stagger, 0ms); }
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .run-log { max-height: 60vh; padding: 12px; }
  .run-log .msg.draft { margin-left: 14px; }
  .run-actions .btn { flex: 1 1 100%; }
}

/* where the wording comes from: green = straight from the base CV, purple = the AI's wording */
.source-bar { margin-top: 24px; display: grid; gap: 14px; }
.source-summary { display: grid; gap: 8px; }
.source-meter { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); }
.source-meter .cv { background: #22a05a; }
.source-meter .ai { background: #8b5cf6; }
.source-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.source-legend b { color: var(--ink); }
.swatch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.swatch-dot.cv { background: #22a05a; }
.swatch-dot.ai { background: #8b5cf6; }
mark.src-cv, mark.src-ai { color: inherit; border-radius: 3px; padding: 1px 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.src-cv { background: #dcf5e6; }
mark.src-ai { background: #ede4ff; }
.paper .src-line { cursor: pointer; border-radius: 4px; }
.paper .src-line:hover, .paper .src-line:focus-visible { outline: 2px solid #c9b6ff; outline-offset: 2px; }
.paper .src-line.open { outline: 2px solid #8b5cf6; outline-offset: 2px; }
.paper .src-note { display: block; margin: 8px 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-alt);
  border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); cursor: default; }
.paper .src-note b { color: var(--ink); }

mark.src-job { background: #dbeafe; color: inherit; border-radius: 3px; padding: 1px 0; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.src-frame { background: none; color: var(--caption); }
.source-meter .job { background: #3b82f6; }
.swatch-dot.job { background: #3b82f6; }
.swatch-dot.frame { background: var(--line); }
.paper.letter .letter-sources { margin: 0 0 18px; display: grid; gap: 8px; }

/* interview prep */
.prep { margin-bottom: 24px; display: grid; gap: 14px; }
.prep-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.prep-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.prep-head .caption { margin: 0; max-width: 640px; }
.prep h3 { margin: 10px 0 2px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--caption); }
.prep details.q { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.prep details.q + details.q { margin-top: 8px; }
.prep details.q > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-weight: 700; }
.prep details.q > summary::-webkit-details-marker { display: none; }
.prep details.q > summary::before { content: "+"; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--cta); font-weight: 800; line-height: 1; }
.prep details.q[open] > summary::before { content: "–"; }
.prep .q-body { padding: 0 16px 16px 50px; display: grid; gap: 12px; font-size: 14px; line-height: 1.55; }
.prep .q-why { margin: 0; color: var(--muted); }
.prep .q-why b, .prep .q-label { color: var(--ink); }
.prep .job-quote { margin: 6px 0 0; padding: 8px 10px; border-left: 3px solid #3b82f6; background: #eff6ff; border-radius: 0 8px 8px 0; font-size: 13px; color: var(--ink); }
.prep ol.points { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.prep ol.points li { display: grid; gap: 4px; }
.prep .pill { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); vertical-align: 1px; }
.prep .pill.framing { background: #f3efff; border-color: #e2d6ff; color: #6d28d9; }
.prep .cv-quote { margin: 0; font-size: 13px; color: #166534; }
.prep .q-avoid { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 13px; }
.prep .ask-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.prep .prep-removed { font-size: 13px; color: var(--caption); }
.prep .prep-removed summary { cursor: pointer; }
@media (max-width: 900px) {
  .prep { margin-bottom: 16px; }
  .prep .q-body { padding: 0 14px 14px 14px; }
  .prep-head .btn { flex: 1 1 100%; }
}

/* delete account */
.danger-zone { margin-top: 24px; border-color: #f5c2bd; display: grid; gap: 12px; }
.danger-zone h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--bad); }
.danger-zone p { margin: 0; font-size: 14px; color: var(--muted); }
.danger-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.danger-row .field { flex: 1 1 220px; }
.btn-danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-danger:hover { background: #9f1f15; color: #fff; }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }

/* admin */
.admin-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.admin-totals .stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.admin-totals .stat b { display: block; font-size: 24px; font-weight: 800; }
.admin-totals .stat span { font-size: 13px; color: var(--muted); }
.admin-row { display: grid; grid-template-columns: minmax(0, 2.4fr) 1fr repeat(5, minmax(0, 0.7fr)) 1fr 1.2fr; gap: 10px;
  align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-row.head { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--caption); background: var(--bg-alt); }
button.admin-row { width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; cursor: pointer; }
button.admin-row:hover, button.admin-row.selected { background: var(--accent-soft); }
.admin-row .who { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.admin-row .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.plan-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg-alt); border: 1px solid var(--line); }
.plan-badge.pass { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.plan-badge.unlimited, .plan-badge.admin { background: #ede4ff; color: #6d28d9; border-color: transparent; }
.admin-detail { margin-top: 24px; display: grid; gap: 18px; }
.admin-detail h2 { margin: 0; font-size: 20px; font-weight: 800; }
.admin-detail h3 { margin: 0 0 8px; font-size: 14px; font-weight: 800; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-actions input { width: 90px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--caption); font-weight: 700; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
@media (max-width: 900px) {
  .admin-row.head { display: none; }
  .admin-row { grid-template-columns: 1fr 1fr; padding: 14px 16px; }
  .admin-row .who { grid-column: 1 / -1; }
  .admin-row [data-label]::before { content: attr(data-label) ": "; color: var(--caption); }
  .danger-row .btn { flex: 1 1 100%; }
}

/* admin: AWS costs and activity */
.aws-card { margin-bottom: 24px; display: grid; gap: 18px; }
.aws-card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.aws-card .admin-actions select { width: auto; padding: 8px 12px; font-size: 14px; }
.aws-costs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.aws-big b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.aws-big span { font-size: 13px; color: var(--muted); }
.svc-bars { display: grid; gap: 8px; font-size: 13px; }
.svc-bar { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.svc-bar .track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.svc-bar .track i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.svc-bar .amount { text-align: right; font-variant-numeric: tabular-nums; }
.aws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.aws-tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; background: #fff; }
.aws-tile h3 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--caption); }
.aws-tile dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.aws-tile dt { color: var(--muted); }
.aws-tile dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.aws-tile dd.bad { color: var(--bad); }
.aws-tile .error { margin: 0; font-size: 13px; }
.spark { display: block; width: 100%; height: 34px; }
.spark rect { fill: var(--accent); opacity: 0.75; }
@media (max-width: 900px) { .aws-costs { grid-template-columns: 1fr; } }

/* Phones: iPhone Safari zooms in on any text field whose text is under 16px and does not zoom back out, which
   left Setup / Profile / Admin (the screens with fields) stuck at an odd zoom with margins. Every field is 16px+
   on phones; and nothing may make the page wider than the screen (zoom itself stays allowed for accessibility). */
html, body { overflow-x: hidden; }
body { overflow-wrap: break-word; }
img, svg, video, canvas, table, pre { max-width: 100%; }
@media (max-width: 900px) {
  input, select, textarea, .aws-card .admin-actions select, .admin-actions input { font-size: 16px !important; }
  select { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
}

/* profile visuals: career timeline + skills over time */
.insights-card { margin-bottom: 24px; }
.tl-legend { display: flex; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.tl-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.tl-legend { gap: 4px; }
.tl-legend i.education { margin-left: 10px; }
.tl-axis span.first { transform: none; }
.tl-axis span.last { transform: translateX(-100%); }
.tl-legend i.role, .tl-bar.role { background: var(--accent); }
.tl-legend i.education, .tl-bar.education { background: #0e7490; }
.tl-scroll { overflow-x: auto; }
.tl { position: relative; min-width: 560px; padding-top: 26px; }
.tl-axis { position: relative; height: 0; }
.tl-axis span { position: absolute; top: -24px; transform: translateX(-50%); font-size: 12px; color: var(--caption); }
.tl-axis span::after { content: ""; position: absolute; left: 50%; top: 18px; height: 9999px; border-left: 1px dashed var(--line); }
.tl { overflow: hidden; }
.tl-lanes { position: relative; }
.tl-bar { position: absolute; height: 32px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 700; display: flex;
  align-items: center; padding: 0 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.tl-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-now { position: absolute; top: -6px; bottom: -6px; border-left: 2px solid var(--ink); }
.top-skills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.top-skill { padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); font-size: 13px; color: var(--muted); }
.top-skill b { color: var(--ink); margin-right: 4px; }
.sk-chart { position: relative; display: grid; gap: 6px; padding-top: 26px; overflow: hidden; }
.sk-axis { margin-left: 130px; margin-right: 120px; }
.sk-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 110px; gap: 10px; align-items: center; font-size: 13px; }
.sk-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-track { position: relative; height: 12px; border-radius: 999px; background: var(--bg-alt); }
.sk-track i { position: absolute; top: 0; height: 100%; border-radius: 999px; background: var(--accent); opacity: 0.85; }
.sk-meta { color: var(--caption); font-size: 12px; text-align: right; }
.steps-title { margin: 18px 0 8px; font-size: 14px; font-weight: 800; }
.skill-steps { margin: 0 0 12px; padding-left: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.skill-steps .chips { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0 8px; }
.chip.new-skill { background: var(--ok-bg); color: var(--ok); cursor: default; font-size: 12px; padding: 3px 9px; }
@media (max-width: 900px) {
  .insights-card { margin-bottom: 16px; }
  .sk-row { grid-template-columns: 86px minmax(0, 1fr) 74px; gap: 6px; }
  .sk-axis { margin-left: 92px; margin-right: 80px; }
  .sk-meta { font-size: 11px; }
}

/* header on small phones: the longer name "TailorProof" plus Log in / Get started must stay on one line each */
.guest .btn, .guest .linkbtn, .brand-name { white-space: nowrap; }
@media (max-width: 380px) {
  .brand { gap: 8px; }
  .brand-name { font-size: 17px; }
  .guest { gap: 10px; }
  .guest .btn-sm { padding: 8px 12px; }
}
