/* ─────────────────────────────────────────────────────────────
   Shortlist design system
   Paper + ink, one highlighter-yellow signature.
   Display: Schibsted Grotesk · Body: Public Sans · Labels: IBM Plex Mono
   ───────────────────────────────────────────────────────────── */

:root {
  --paper: #FAFAF7;
  --ink: #191A1E;
  --graphite: #5C5F66;
  --faint: #9A9DA3;
  --line: #E5E3DB;
  --card: #FFFFFF;
  --hl: #FFE25A;
  --hl-soft: #FFF3B8;
  --danger: #B3261E;
  --ok: #1B6E4B;
  --radius: 10px;
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--ink); }
::selection { background: var(--hl); color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* The signature: a highlighter sweep */
.mark {
  background: linear-gradient(transparent 55%, var(--hl) 55%, var(--hl) 92%, transparent 92%);
  padding: 0 .1em;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--graphite);
  display: inline-block;
  margin-bottom: 10px;
}
.eyebrow b {
  font-weight: 500;
  color: var(--ink);
  background: linear-gradient(transparent 30%, var(--hl) 30%, var(--hl) 95%, transparent 95%);
  padding: 0 4px;
}

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 9px;
}
.brand-mark { width: 14px; height: 14px; background: var(--ink); border-radius: 3px; box-shadow: 4px 4px 0 var(--hl); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-user { color: var(--graphite); font-size: 14px; }
@media (max-width: 560px) { .nav-user { display: none; } }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: var(--radius);
  border: 1.5px solid var(--ink); cursor: pointer; text-decoration: none;
  transition: background .15s ease, color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--hl); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: wait; }
.btn-danger { border-color: transparent; color: var(--danger); background: transparent; font-size: 13.5px; padding: 6px 8px; }
.btn-danger:hover { text-decoration: underline; }

/* ── Chips ───────────────────────────────────────────────── */
.chip {
  font-family: var(--font-mono); font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--card);
  color: var(--ink);
}
.chip-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--hl); border: 1px solid var(--ink); }
.chip-score { cursor: pointer; }
.chip-score.good .chip-dot { background: var(--ok); border-color: var(--ok); }
.chip-score.low .chip-dot { background: var(--danger); border-color: var(--danger); }

/* ── Forms ───────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--graphite); margin-bottom: 6px;
}
.field .opt { color: var(--faint); text-transform: none; letter-spacing: 0; }
.input, textarea.input, select.input {
  width: 100%; font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 11px 13px; transition: border-color .15s ease;
}
.input:focus { outline: none; border-color: var(--ink); }
textarea.input { resize: vertical; line-height: 1.55; }
.hint { font-size: 13px; color: var(--graphite); margin-top: 5px; }
.error-box {
  background: #FBEDEC; border: 1px solid #E8C5C2; color: var(--danger);
  border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin-bottom: 16px;
}

/* ── Layout shells ───────────────────────────────────────── */
.wrap { max-width: 1080px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px); }
.wrap-narrow { max-width: 660px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 4vw, 32px); }
.footer {
  font-family: var(--font-mono); font-size: 12px; color: var(--faint);
  text-align: center; padding: 40px 16px 28px;
}

/* ── Landing ─────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 6vw, 72px); align-items: center; padding-top: clamp(28px, 6vw, 72px); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 700; letter-spacing: -0.02em; }
.hero .lede { font-size: clamp(16px, 2vw, 19px); color: var(--graphite); max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-points { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 30px; padding: 0; list-style: none; }
.hero-points li { font-family: var(--font-mono); font-size: 12.5px; color: var(--graphite); }
.hero-points li::before { content: "— "; color: var(--ink); }

/* draft → final motif */
.df { display: grid; gap: 14px; }
.df-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.df-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.df-draft { font-family: var(--font-mono); font-size: 13px; color: var(--graphite); line-height: 1.7; transform: rotate(-0.4deg); }
.df-arrow { text-align: center; font-family: var(--font-mono); color: var(--graphite); font-size: 13px; }
.df-final { transform: rotate(0.3deg); box-shadow: 0 10px 24px rgba(25,26,30,.07); }
.df-line { height: 9px; border-radius: 3px; background: var(--ink); opacity: .88; margin-bottom: 8px; }
.df-line.thin { height: 6px; opacity: .28; }
.df-line.hl { background: var(--hl); opacity: 1; outline: 1px solid var(--ink); }
.df-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin-bottom: 8px; }

/* ── Auth ────────────────────────────────────────────────── */
.auth { max-width: 420px; margin: clamp(24px, 7vh, 72px) auto; }
.auth h1 { font-size: 27px; }
.auth .sub { color: var(--graphite); margin-bottom: 24px; }
.auth-alt { font-size: 14px; color: var(--graphite); margin-top: 18px; text-align: center; }

/* ── Dashboard ───────────────────────────────────────────── */
.dash-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.resume-card { display: flex; flex-direction: column; gap: 6px; }
.resume-card h3 { font-size: 17px; margin: 0; }
.resume-meta { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }
.resume-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.empty {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 48px 24px; text-align: center; color: var(--graphite);
}

/* ── Builder ─────────────────────────────────────────────── */
.steps { display: flex; gap: 10px; margin-bottom: 26px; font-family: var(--font-mono); font-size: 12px; }
.step { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--faint); background: var(--card); }
.step.on { color: var(--ink); border-color: var(--ink); background: var(--hl-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

/* loading overlay */
.overlay {
  position: fixed; inset: 0; background: rgba(250,250,247,.94); z-index: 50;
  display: none; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.overlay.show { display: flex; }
.overlay .pen { width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 10px; background: var(--ink); box-shadow: 8px 8px 0 var(--hl); animation: write 1.1s ease-in-out infinite alternate; }
@keyframes write { from { transform: rotate(-4deg); } to { transform: rotate(4deg) translateY(-4px); } }
.overlay h2 { font-size: 22px; }
.overlay .msg { font-family: var(--font-mono); font-size: 13px; color: var(--graphite); min-height: 1.4em; }
@media (prefers-reduced-motion: reduce) { .overlay .pen { animation: none; } }

/* ── Editor ──────────────────────────────────────────────── */
.editor-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px clamp(16px, 3vw, 28px); border-bottom: 1px solid var(--line); background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.editor-bar .spacer { flex: 1; }
.title-input {
  font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink);
  background: transparent; border: 1.5px solid transparent; border-radius: 8px; padding: 5px 9px; max-width: 240px;
}
.title-input:hover, .title-input:focus { border-color: var(--line); background: var(--card); outline: none; }
.save-state { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }

.editor-main { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: calc(100vh - 130px); }
.pane-edit { padding: clamp(16px, 3vw, 28px); border-right: 1px solid var(--line); overflow-y: auto; }
.pane-preview { background: #ECEAE2; padding: clamp(14px, 3vw, 28px); overflow-y: auto; }
.preview-frame {
  width: 100%; min-height: 1120px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; box-shadow: 0 14px 34px rgba(25,26,30,.10);
}
.pane-tabs { display: none; }
@media (max-width: 920px) {
  .editor-main { grid-template-columns: 1fr; }
  .pane-edit, .pane-preview { display: none; border-right: 0; }
  .editor-main.show-edit .pane-edit { display: block; }
  .editor-main.show-preview .pane-preview { display: block; }
  .pane-tabs { display: flex; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--paper); }
}

.sec { margin-bottom: 26px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec-head h3 { font-size: 13px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0; }
.btn-ai {
  font-family: var(--font-mono); font-size: 12px; padding: 6px 11px;
  background: var(--hl-soft); border: 1px solid var(--ink); border-radius: 99px; cursor: pointer;
  transition: background .15s ease;
}
.btn-ai:hover { background: var(--hl); }
.btn-ai[disabled] { opacity: .5; cursor: wait; }

.entry-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; position: relative; }
.entry-rm { position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--faint); font-size: 17px; cursor: pointer; line-height: 1; padding: 4px; }
.entry-rm:hover { color: var(--danger); }
.add-link {
  background: none; border: 1.5px dashed var(--line); width: 100%; border-radius: 12px;
  padding: 10px; font-family: var(--font-mono); font-size: 12.5px; color: var(--graphite); cursor: pointer;
}
.add-link:hover { border-color: var(--ink); color: var(--ink); }

/* template picker */
.tpl-pick { display: flex; gap: 8px; }
.tpl-pick label {
  font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; cursor: pointer; background: var(--card);
}
.tpl-pick input { position: absolute; opacity: 0; }
.tpl-pick input:checked + span { font-weight: 500; }
.tpl-pick label:has(input:checked) { border-color: var(--ink); background: var(--hl-soft); }
.tpl-pick label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ATS popover */
.ats-pop {
  position: absolute; top: 110%; right: 0; z-index: 30; width: 290px;
  background: var(--card); border: 1px solid var(--ink); border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(25,26,30,.12); display: none; text-align: left;
}
.ats-pop.show { display: block; }
.ats-pop ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.ats-pop li { margin-bottom: 5px; color: var(--graphite); }
.ats-pop li.pass { color: var(--ok); }

/* toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: var(--paper); font-size: 14px; padding: 10px 18px;
  border-radius: 99px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 60;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

/* mode toggle buttons reuse .step pills */
button.step { cursor: pointer; font-family: var(--font-mono); font-size: 12px; }
button.step:hover { border-color: var(--ink); color: var(--ink); }

/* photo control */
.photo-row { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.photo-thumb { width: 54px; height: 54px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; background: #fff; }

/* upload zone */
.upload-zone {
  display: block; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 22px 14px; font-family: var(--font-mono); font-size: 13px; color: var(--graphite);
  background: var(--card); transition: border-color .15s ease, color .15s ease;
}
.upload-zone:hover { border-color: var(--ink); color: var(--ink); }
.upload-zone:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ── pricing (upgrade.php) ── */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.price-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 28px 22px 24px; text-align: center; position: relative; }
.price-card.popular { border-color: var(--ink); box-shadow: 10px 10px 0 var(--hl); }
.price-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--hl); border: 1px solid var(--ink); border-radius: 99px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 12px; white-space: nowrap; }
.price-card h3 { font-size: 13px; font-family: var(--font-mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); margin-bottom: 8px; }
.price-amount { font-family: var(--font-display); font-weight: 700; font-size: 42px; letter-spacing: -.02em; line-height: 1; }
.price-credits { font-family: var(--font-mono); font-size: 13px; background: var(--hl-soft); display: inline-block; padding: 4px 13px; border-radius: 99px; margin: 10px 0 14px; }
.price-points { list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--graphite); }
.price-points li { margin-bottom: 6px; }
.pay-note { font-family: var(--font-mono); font-size: 12px; color: var(--faint); text-align: center; margin-top: 28px; }

/* ── admin reports ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.stat .v { font-family: var(--font-display); font-weight: 700; font-size: 26px; margin-top: 3px; }
.stat .s { font-size: 12px; color: var(--faint); margin-top: 2px; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .grid-2col { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 150px; margin-top: 16px; }
.bar-day { flex: 1; display: flex; flex-direction: column; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.bar { flex: 1; background: var(--ink); border-radius: 3px 3px 0 0; min-height: 3px; }
.bar.alt { background: var(--hl); border: 1px solid var(--ink); border-bottom: none; }
.bar-x { font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); text-align: center; margin-top: 5px; white-space: nowrap; }
.legend { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 11.5px; color: var(--graphite); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--graphite); text-align: left; padding: 6px; border-bottom: 1px solid var(--ink); }
.table td { padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.tpl-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.tpl-row .nm { width: 86px; font-family: var(--font-mono); font-size: 12px; flex-shrink: 0; }
.tpl-bar { height: 13px; background: var(--hl); border: 1px solid var(--ink); border-radius: 3px; }
.tpl-row .ct { font-family: var(--font-mono); font-size: 12px; color: var(--graphite); }

/* ── batch 1 UX ── */
.voice-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.voice-lang { width: auto; padding: 6px 9px; font-size: 12.5px; font-family: var(--font-mono); }
.btn-ai.rec { background: #FBEDEC; border-color: var(--danger); color: var(--danger); }
.toast-act {
  margin-left: 12px; background: var(--hl); color: var(--ink); border: none; border-radius: 99px;
  font-family: var(--font-body); font-weight: 600; font-size: 13px; padding: 5px 13px; cursor: pointer;
}
.entry-tools { position: absolute; top: 9px; right: 9px; display: flex; gap: 2px; }
.btn-icon {
  background: none; border: none; color: var(--faint); font-size: 13px; cursor: pointer;
  line-height: 1; padding: 5px 6px; border-radius: 6px;
}
.btn-icon:hover { color: var(--ink); background: var(--hl-soft); }
.btn-icon.rm { font-size: 16px; }
.btn-icon.rm:hover { color: var(--danger); background: #FBEDEC; }
.preview-wrap { overflow: hidden; }
.preview-frame { width: 794px; max-width: none; transform-origin: 0 0; display: block; }
.fun-row { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.fun-label { width: 140px; font-family: var(--font-mono); font-size: 12px; flex-shrink: 0; }
.fun-bar { height: 16px; background: var(--hl); border: 1px solid var(--ink); border-radius: 4px; }
.fun-n { font-family: var(--font-mono); font-size: 12.5px; }
.fun-pct { font-family: var(--font-mono); font-size: 11.5px; color: var(--graphite); }
