:root {
  --bg: #f5f7fb; --card: #fff; --ink: #19202d; --muted: #5b6579; --line: #dde2eb;
  --brand: #0f766e; --brand-ink: #fff; --ok: #1f7a4a; --warn: #a15c00; --bad: #b3261e; --soft: #eef6f5;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1318; --card: #181e26; --ink: #e7ebf1; --muted: #a1abbc; --line: #2a323e; --brand: #3fc1b3; --brand-ink: #062320; --ok: #5fd08f; --warn: #f0b44c; --bad: #ff8a80; --soft: #13302d; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--card); padding: 8px; }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: 12px 0; }
h1 { margin: 0; font-size: 1.5em; } h1 span { color: var(--brand); }
.sub, .muted { color: var(--muted); } .small { font-size: .85em; }
h2 { margin: 0 0 12px; font-size: 1.3em; }
h3 { margin: 1.4em 0 .4em; font-size: 1em; display: flex; align-items: center; gap: 10px; }
.lead { color: var(--muted); margin: 20px 0; }
.lead2 { font-size: 1.05em; margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .two { grid-template-columns: 1fr; } }
.lbl { display: block; font-weight: 600; margin-bottom: 6px; }
textarea { width: 100%; font-size: 15px; line-height: 1.5; font-family: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; resize: vertical; }
textarea:focus, button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.meta { margin: 8px 0 14px; font-size: .9em; }
button { font: inherit; cursor: pointer; }
.primary { width: 100%; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px; padding: 14px; font-weight: 700; }
.primary:disabled { opacity: .6; cursor: wait; }
.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; font-size: .8em; font-weight: 400; }
.link { background: none; border: 0; color: var(--brand); text-decoration: underline; padding: 0; }
.privacy { color: var(--muted); font-size: .8em; margin: 12px 0 0; }
.hidden { display: none !important; }
#status { min-height: 1.6em; margin-bottom: 12px; color: var(--muted); }
#status.err { color: var(--bad); }

.scoreRow { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.scoreRow p { margin: 2px 0; }
.big { font-size: 1.2em; font-weight: 700; }
.ring { --p: 0; --c: var(--brand); width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ring span { width: 76px; height: 76px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 1.6em; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 999px; padding: 2px 12px; font-size: .85em; border: 1px solid var(--line); }
.chip.hit { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); border-color: transparent; }
.chip.miss { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.checks li:last-child { border: 0; }
.checks .d { color: var(--muted); font-size: .85em; margin-left: auto; }
.bullet { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.bullet .old { color: var(--muted); text-decoration: line-through; margin: 0 0 6px; font-size: .92em; }
.bullet .new { margin: 0 0 6px; font-weight: 600; }
.bullet .why { margin: 0; color: var(--muted); font-size: .85em; }
.quote { background: var(--soft); border-radius: 10px; padding: 12px 14px; margin: 0; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }
.foot { color: var(--muted); font-size: .8em; padding-bottom: 32px; }

/* ---- Upload + two-pane workspace ---- */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pane-left { position: sticky; top: 16px; }
@media (max-width: 900px) { .workspace { grid-template-columns: 1fr; } .pane-left { position: static; } }
.h2like { font-size: 1.3em; margin-bottom: 10px; }
.center { text-align: center; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 2px dashed var(--line);
  border-radius: 12px; padding: 36px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.dropIcon { font-size: 2em; }
.fileInfo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.badge { background: var(--brand); color: var(--brand-ink); border-radius: 6px; padding: 1px 8px; font-size: .75em; font-weight: 700; }
.fname { font-weight: 600; overflow-wrap: anywhere; }
.preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.preview iframe, .preview object { display: block; width: 100%; height: 75vh; min-height: 480px; border: 0; }
.preview pre, #extracted { margin: 0; padding: 16px; white-space: pre-wrap; font: 14px/1.5 ui-monospace, Consolas, monospace; color: #1c2230; max-height: 75vh; overflow: auto; }
#textBox { margin-top: 12px; }
#extracted { background: var(--bg); color: var(--ink); border-radius: 8px; max-height: 300px; margin-top: 8px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pdfPages { max-height: 75vh; overflow: auto; background: #e9ecf2; }
.pdfPages canvas { display: block; width: 100%; height: auto; background: #fff; margin: 0 0 8px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pdfPages p { padding: 8px; margin: 0; }

/* ---- "Your last resume" card + view-only viewer ---- */
.lastCard { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.lastIcon { font-size: 1.4em; }
.lastBody { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lastBody .fname { font-size: .95em; }
.lastActions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lastActions .ghost { font-size: .85em; padding: 4px 14px; }
.viewer { width: min(860px, 94vw); max-height: 92vh; border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--card); color: var(--ink); }
.viewer::backdrop { background: rgba(15, 23, 42, .55); }
.viewerHead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.viewerBody { margin: 14px 18px; user-select: none; }
.viewerNote { margin: 0 18px 14px; text-align: center; }

/* ---- Accept / edit suggestions + download ---- */
.pick { display: flex; align-items: center; gap: 8px; font-size: .85em; font-weight: 600; color: var(--brand); margin-bottom: 6px; cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--brand); }
.bullet.notfound { opacity: .7; }
.bullet.notfound .pick { color: var(--warn); cursor: default; }
textarea.editable { width: 100%; font: inherit; font-size: .95em; color: inherit; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; }
.bullet textarea.editable { font-weight: 600; margin: 0 0 6px; }
textarea.quote.editable { background: var(--soft); border-style: solid; border-color: transparent; }
textarea.editable:focus { border-style: solid; border-color: var(--brand); outline: none; }
.exportBox { margin-top: 18px; border: 1px solid var(--brand); border-radius: 12px; padding: 16px; background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.exportHead { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.exportIcon { font-size: 1.4em; }
.exportWarn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: .9em; margin: 0 0 10px; }
#exportResult { margin: 10px 0 0; }

/* "by zetene" link back to the Zetene home page */
.byz { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
.byz:hover { color: var(--ink); border-color: var(--brand); }
.byz b { color: var(--ink); letter-spacing: -.02em; }

/* signed-in account chip in the header */
.acct { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.acct .ghost { padding: 6px 12px; border-radius: 999px; font-size: 14px; cursor: pointer; }
.top .row > .byz { margin-left: 12px; }
@media (max-width: 560px) { .acct #acctName { display: none; } }
