/* ATM CV Builder — internal UI. Lato (self-hosted, OFL). No external CDNs (strict CSP). */
@font-face { font-family: "Lato"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/lato-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-weight: 900; font-style: normal; font-display: swap; src: url("../fonts/lato-latin-900-normal.woff2") format("woff2"); }

:root {
  --paper: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8f8fa;
  --ink: #1d2230;
  --ink-2: #3a4152;
  --muted: #5f6777;
  --line: #e2e4e9;
  --line-strong: #cdd1d9;
  --brand: #9b1b34;
  --brand-hover: #84152b;
  --brand-tint: #f7e9ec;
  --brand-ink: #7a1229;
  --excellent: #1e7a52;
  --excellent-tint: #e6f3ec;
  --good: #2f6fb3;
  --good-tint: #e8f0f9;
  --moderate: #a86a12;
  --moderate-tint: #fbf2e2;
  --weak: #c0531b;
  --weak-tint: #fbece3;
  --poor: #a61b1b;
  --poor-tint: #f9e6e6;
  --focus: #2f6fb3;
  --shadow: 0 1px 2px rgba(20, 24, 36, .06), 0 4px 14px rgba(20, 24, 36, .05);
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --mono-nums: tabular-nums;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111318;
    --surface: #191c23;
    --surface-2: #1f232b;
    --ink: #e9ebef;
    --ink-2: #c9cdd5;
    --muted: #99a1b0;
    --line: #2a2f39;
    --line-strong: #3a404c;
    --brand: #d4566f;
    --brand-hover: #e06a82;
    --brand-tint: #2c1b21;
    --brand-ink: #f0a4b3;
    --excellent: #4cc08b;
    --excellent-tint: #16291f;
    --good: #6ea8e6;
    --good-tint: #172433;
    --moderate: #e0a548;
    --moderate-tint: #2c2416;
    --weak: #ec8a55;
    --weak-tint: #2e1f17;
    --poor: #ef6b6b;
    --poor-tint: #2f1919;
    --focus: #6ea8e6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "kern", "liga";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--ink); }
h1 { font-size: 26px; font-weight: 900; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .6em; }
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: var(--mono-nums); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brandmark-square { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); position: relative; }
.brandmark-square::after { content: ""; position: absolute; inset: 7px 7px auto auto; width: 7px; height: 7px; border-radius: 2px; background: var(--surface); }
.brandmark-name { font-weight: 900; font-size: 16px; letter-spacing: -.01em; }
.brandmark-sub { font-size: 12px; color: var(--muted); }
.topbar-spacer { flex: 1; }
.userchip { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); font-weight: 700; font-size: 13px; }

/* ---------- layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 120px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.page-head .lede { color: var(--muted); max-width: 62ch; margin-top: 6px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 17px; }
.card-step { font-size: 12px; color: var(--muted); font-weight: 700; }
.section { margin-top: 28px; }
.section > h2 { margin-bottom: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .05s;
}
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line); }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- workspace ---------- */
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: 18px; background: var(--surface-2); transition: border-color .15s, background-color .15s;
}
.dropzone.is-over { border-color: var(--brand); background: var(--brand-tint); }
.filecard { display: flex; gap: 14px; align-items: flex-start; }
.fileicon { flex: none; width: 42px; height: 50px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 900; letter-spacing: .04em; color: #fff; background: var(--ink-2); }
.fileicon.pdf { background: #b3261e; }
.fileicon.docx { background: #2b579a; }
.filecard-name { font-weight: 700; word-break: break-word; }
.empty-state { text-align: left; color: var(--muted); }
.empty-state strong { color: var(--ink); display: block; margin-bottom: 2px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
textarea, input[type="text"] {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); padding: 12px 14px; line-height: 1.5; resize: vertical;
}
textarea:focus, input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.addendum { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.addendum textarea { min-height: 120px; }
.savebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.jd-text { min-height: 230px; }
.analyse-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.notice { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

.history { list-style: none; margin: 0; padding: 0; }
.history li + li { border-top: 1px solid var(--line); }
.history a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; color: inherit; text-decoration: none; }
.history a:hover { background: var(--surface-2); }
.history .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-score { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- tones ---------- */
.tone-excellent { --tone: var(--excellent); --tone-tint: var(--excellent-tint); }
.tone-good { --tone: var(--good); --tone-tint: var(--good-tint); }
.tone-moderate { --tone: var(--moderate); --tone-tint: var(--moderate-tint); }
.tone-weak { --tone: var(--weak); --tone-tint: var(--weak-tint); }
.tone-poor { --tone: var(--poor); --tone-tint: var(--poor-tint); }
.mini-score { background: var(--tone-tint, var(--surface-2)); color: var(--tone, var(--muted)); }

/* ---------- score cards (signature element) ---------- */
.scores { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .scores { grid-template-columns: 1fr; } }
.score { position: relative; padding: 20px 22px 18px; overflow: hidden; }
.score-name { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.score-what { font-size: 13px; color: var(--muted); margin-top: 2px; min-height: 2.6em; }
.score-figure { display: flex; align-items: flex-end; gap: 14px; margin-top: 12px; }
.score-value { font-size: 56px; line-height: .9; font-weight: 900; letter-spacing: -.03em; color: var(--tone); font-variant-numeric: tabular-nums; }
.score-value small { font-size: 22px; font-weight: 700; letter-spacing: 0; margin-left: 2px; }
.score-label { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--tone-tint); color: var(--tone); font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.meter { position: relative; height: 8px; border-radius: 999px; margin-top: 16px; background: linear-gradient(90deg, var(--poor-tint) 0 40%, var(--weak-tint) 40% 55%, var(--moderate-tint) 55% 70%, var(--good-tint) 70% 85%, var(--excellent-tint) 85%); }
.meter-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--tone); width: 0; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.meter-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.score-foot { margin-top: 12px; font-size: 13px; color: var(--muted); }
.score-foot strong { color: var(--ink); }
.score.primary { border-color: color-mix(in srgb, var(--tone) 35%, var(--line)); }
@media (prefers-reduced-motion: reduce) { .meter-fill { transition: none; } }

/* ---------- alerts ---------- */
.alerts { display: grid; gap: 10px; margin: 18px 0 0; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-warn { border-color: color-mix(in srgb, var(--moderate) 40%, var(--line)); background: var(--moderate-tint); }
.alert-warn svg { color: var(--moderate); }
.alert-info { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: var(--good-tint); }
.alert-info svg { color: var(--good); }
.alert-danger { border-color: color-mix(in srgb, var(--poor) 35%, var(--line)); background: var(--poor-tint); }
.alert-danger svg { color: var(--poor); }
.alert .btn { margin-left: auto; min-height: 32px; font-size: 13px; }

/* ---------- requirement ledger ---------- */
.ledger-group { margin-top: 14px; }
.ledger-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.ledger-group > summary::-webkit-details-marker { display: none; }
.ledger-group > summary h3 { font-size: 15px; }
.chev { width: 16px; height: 16px; transition: transform .2s; color: var(--muted); }
details[open] > summary .chev { transform: rotate(90deg); }
.group-stats { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.req { border-bottom: 1px solid var(--line); }
.req:last-child { border-bottom: 0; }
.req > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 13px 22px; }
.req > summary::-webkit-details-marker { display: none; }
.req > summary:hover { background: var(--surface-2); }
.req-label { font-weight: 700; }
.req-sub { font-size: 13px; color: var(--muted); }
.calc { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.calc strong { color: var(--ink); font-size: 14px; }
@media (max-width: 700px) { .req > summary { grid-template-columns: 16px minmax(0, 1fr); } .req > summary .pills, .req > summary .calc { grid-column: 2; justify-self: start; } }
.pills { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-full { background: var(--excellent-tint); color: var(--excellent); }
.st-partial { background: var(--moderate-tint); color: var(--moderate); }
.st-notstated { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.st-notmet { background: var(--poor-tint); color: var(--poor); }
.ev { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.ev::before { display: none; }
.src-add { background: var(--brand-tint); color: var(--brand-ink); }
.src-add::before { display: none; }
.req-body { padding: 4px 22px 18px 50px; display: grid; gap: 14px; }
@media (max-width: 700px) { .req-body { padding-left: 22px; } }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .quotes { grid-template-columns: 1fr; } }
.quote { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border-left: 3px solid var(--line-strong); font-size: 14px; }
.quote.cv { border-left-color: var(--brand); }
.quote figcaption { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.quote blockquote { margin: 0; }
.quote .none { color: var(--muted); font-style: italic; }
.explain { font-size: 14px; color: var(--ink-2); }
.details-toggle > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.details-toggle > summary::-webkit-details-marker { display: none; }
.details-toggle[open] > summary { color: var(--ink); }
.details-body { margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; color: var(--ink-2); display: grid; gap: 6px; }

/* ---------- breakdown bars ---------- */
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px 12px; align-items: center; }
.bar-name { font-size: 14px; }
.bar-name .w { color: var(--muted); font-size: 12px; margin-left: 6px; }
.bar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar { grid-column: 1 / -1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; background: var(--tone, var(--brand)); border-radius: 999px; }
.bar-notes { grid-column: 1 / -1; margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

.list-plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.sev-high { color: var(--poor); font-weight: 700; }
.sev-medium { color: var(--moderate); font-weight: 700; }
.sev-low { color: var(--muted); font-weight: 700; }

/* ---------- action bar ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 12px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.actionbar p { margin: 0; color: var(--muted); font-size: 14px; max-width: 60ch; }

/* ---------- progress ---------- */
.progress { max-width: 640px; margin: 40px auto; }
.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 4px; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 10px 4px; color: var(--muted); }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.steps li.done { color: var(--ink-2); }
.steps li.done .dot { border-color: var(--excellent); background: var(--excellent); color: #fff; }
.steps li.active { color: var(--ink); font-weight: 700; }
.steps li.active .dot { border-color: var(--brand); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .steps li.active .dot { animation: none; border-top-color: var(--brand); } }

/* ---------- before / after ---------- */
.ba { padding: 20px 22px; }
.ba-figures { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.ba-before { font-size: 28px; font-weight: 700; color: var(--muted); }
.ba-arrow { color: var(--muted); }
.ba-after { font-size: 48px; font-weight: 900; color: var(--tone); letter-spacing: -.02em; line-height: 1; }
.ba-delta { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--excellent-tint); color: var(--excellent); font-weight: 900; }
.ba-delta.neg { background: var(--poor-tint); color: var(--poor); }
.ba-delta.zero { background: var(--surface-2); color: var(--muted); }
.ba-track { position: relative; height: 10px; margin-top: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.ba-track .b { position: absolute; inset: 0 auto 0 0; background: var(--line-strong); border-radius: 999px; }
.ba-track .a { position: absolute; inset: 0 auto 0 0; background: var(--tone); border-radius: 999px; opacity: .9; transition: width .9s cubic-bezier(.2,.7,.2,1); }

.changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.changes li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 14px; }
.changes .tag { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: capitalize; }

.synopsis { position: relative; padding: 24px 26px; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.synopsis::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.synopsis h3 { font-size: 18px; margin-bottom: 10px; }
.synopsis ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.download { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 22px; }
.download .doc-preview { width: 56px; height: 72px; border-radius: 8px; background: #2b579a; color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 12px; flex: none; }
.download-meta { flex: 1; min-width: 220px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--poor); color: #fff; }

/* ---------- skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(480px, 100%); padding: 0; overflow: hidden; }
.login-banner { display: block; width: 100%; height: auto; background: #fff; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.login-body { padding: 26px 28px 30px; }
.login-body h1 { font-size: 24px; margin-bottom: 8px; }
.login-body p { color: var(--muted); }
.google-btn { width: 100%; margin-top: 18px; background: var(--surface); }
.google-btn svg { width: 20px; height: 20px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--muted); }
.skeleton-block { height: 140px; }
.skeleton-line { height: 14px; margin: 8px 0; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.mt { margin-top: 12px; }
[hidden] { display: none !important; }


/* ---------- Simon Acres burgundy theme (v1.0.8): one theme in light and dark mode ----------
   Page #991b34, panels a step darker (#7d0019), light text. Tone colours are lightened so they
   stay readable on burgundy; red is used sparingly because the background is already red. */
:root, :root:not([data-theme]) {
  --paper: #991b34;
  --surface: #7d0019;
  --surface-2: #6d0016;
  --ink: #fbf4f5;
  --ink-2: #f0dfe2;
  --muted: #d9b7be;
  --line: rgba(255, 255, 255, .13);
  --line-strong: rgba(255, 255, 255, .24);
  --brand: #ffffff;
  --brand-hover: #f6e7ea;
  --brand-tint: rgba(255, 255, 255, .12);
  --brand-ink: #ffffff;
  --excellent: #7ee2ad;
  --excellent-tint: rgba(126, 226, 173, .14);
  --good: #9fcbff;
  --good-tint: rgba(159, 203, 255, .14);
  --moderate: #ffd27a;
  --moderate-tint: rgba(255, 210, 122, .14);
  --weak: #ffb183;
  --weak-tint: rgba(255, 177, 131, .15);
  --poor: #ffc2c2;
  --poor-tint: rgba(255, 194, 194, .16);
  --focus: #ffffff;
  --shadow: 0 1px 2px rgba(40, 0, 8, .25), 0 6px 18px rgba(40, 0, 8, .18);
  color-scheme: dark;
}
body { background: var(--paper); color: var(--ink); }

.topbar { background: color-mix(in srgb, var(--paper) 88%, black); border-bottom-color: var(--line); backdrop-filter: none; }
.brandmark-logo { display: block; height: 40px; width: auto; }
.brandmark-divider { width: 1px; height: 32px; background: var(--line-strong); }
.avatar { background: rgba(255, 255, 255, .16); color: var(--ink); }
@media (max-width: 640px) { .brandmark-logo { height: 32px; } .brandmark-divider { display: none; } }

/* Primary action: white button with burgundy text (burgundy on burgundy would disappear). */
.btn { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn:hover { border-color: var(--ink-2); background: rgba(255, 255, 255, .06); }
.btn-primary { background: #ffffff; border-color: #ffffff; color: #7d0019; }
.btn-primary:hover { background: #f6e7ea; border-color: #f6e7ea; color: #7d0019; }
.btn-ghost { border-color: transparent; color: var(--muted); }

textarea, input[type="text"] { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); }
textarea::placeholder { color: var(--muted); }
.tab[aria-selected="true"] { background: rgba(255, 255, 255, .14); color: var(--ink); box-shadow: none; }
.dropzone.is-over { border-color: #ffffff; background: rgba(255, 255, 255, .08); }
.fileicon.pdf { background: #b3261e; }
.fileicon.docx, .download .doc-preview { background: #2b579a; }

.meter { background: rgba(255, 255, 255, .12); }
.score.primary { border-color: var(--line-strong); }
.quote { background: var(--surface-2); }
.quote.cv { border-left-color: #ffffff; }
.src-add { background: rgba(255, 255, 255, .14); color: #ffffff; }
.bullets-dot, .pill.ev { background: rgba(255, 255, 255, .08); }
.synopsis::before { background: #ffffff; }
.history a:hover, .req > summary:hover { background: rgba(255, 255, 255, .05); }
.actionbar { background: color-mix(in srgb, var(--surface) 94%, transparent); border-top-color: var(--line); }
.toast { background: #ffffff; color: #7d0019; }
.toast.error { background: #ffc2c2; color: #5a0012; }
.alert-danger { color: var(--ink); }
.login-banner { background: #ffffff; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%); background-size: 400% 100%; }
textarea:disabled { opacity: .55; cursor: not-allowed; }
