/*
 * LineUp 2026 product workspace
 * Visual layer only. Resume document rendering and application behavior are unchanged.
 */

:root {
  --ui-accent:#002fa7;
  --ui-accent-hover:#002582;
  --ui-accent-soft:#eef3ff;
  --ui-accent-border:#ccd9ff;
  --ui-ink:#15171c;
  --ui-muted:#69707d;
  --ui-subtle:#9299a5;
  --ui-line:#e3e6eb;
  --ui-line-strong:#cfd4dc;
  --ui-canvas:#f5f6f8;
  --ui-surface:#ffffff;
  --ui-surface-raised:#ffffff;
  --ui-danger:#c83232;
  --ui-danger-soft:#fff1f1;
  --ui-warning:#a76700;
  --ui-warning-soft:#fff7e6;
  --ui-success:#168447;
  --ui-success-soft:#edf9f2;
  --ui-radius-xs:8px;
  --ui-radius-sm:10px;
  --ui-radius-md:14px;
  --ui-radius-lg:20px;
  --ui-radius-xl:28px;
  --ui-shadow-sm:0 1px 2px rgba(16,24,40,.04),0 1px 4px rgba(16,24,40,.03);
  --ui-shadow-md:0 12px 32px rgba(16,24,40,.08);
  --ui-shadow-lg:0 30px 80px rgba(16,24,40,.14);
  --ui-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
}

html,body,button,input,textarea,select { font-family:var(--ui-font); }
html { background:var(--ui-canvas); }
body { color:var(--ui-ink); background:var(--ui-canvas); font-size:14px; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
button { transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease; }
button:active { transform:translateY(1px); }
:focus-visible { outline:3px solid rgba(0,47,167,.2); outline-offset:2px; }

/* Shared controls */
.btn {
  min-height:40px;
  padding:9px 14px;
  border:1px solid var(--ui-line-strong);
  border-radius:var(--ui-radius-sm);
  color:var(--ui-ink);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-sm);
  font-size:12px;
  font-weight:650;
  letter-spacing:0;
  text-transform:none;
}
.btn:hover { border-color:#aeb5c0; background:#fafbfc; box-shadow:0 3px 10px rgba(16,24,40,.07); }
.btn.primary {
  min-height:42px;
  padding-inline:17px;
  color:#fff;
  border-color:var(--ui-accent);
  background:var(--ui-accent);
  box-shadow:0 8px 18px rgba(0,47,167,.2);
}
.btn.primary:hover { border-color:var(--ui-accent-hover); background:var(--ui-accent-hover); }
.btn.danger { color:var(--ui-danger); border-color:transparent; background:transparent; box-shadow:none; }
.btn.danger:hover { color:var(--ui-danger); border-color:#f1c8c8; background:var(--ui-danger-soft); }
.text-btn,.add-btn,.file-button { border-radius:var(--ui-radius-sm); }

input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),textarea,select {
  min-height:48px;
  padding:11px 13px;
  border:1px solid var(--ui-line-strong);
  border-radius:var(--ui-radius-sm);
  color:var(--ui-ink);
  background:var(--ui-surface);
  box-shadow:inset 0 1px 0 rgba(16,24,40,.015);
  font-size:14px;
  line-height:1.45;
}
textarea { padding:13px; }
input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):hover,textarea:hover,select:hover { border-color:#aeb5c0; }
input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,textarea:focus,select:focus {
  border-color:var(--ui-accent);
  outline:0;
  box-shadow:0 0 0 3px rgba(0,47,167,.1);
}
input::placeholder,textarea::placeholder { color:#a3a9b3; }

/* Top command bar */
.app-header {
  position:sticky;
  top:0;
  z-index:80;
  height:72px;
  padding:0 20px;
  border-bottom:1px solid var(--ui-line);
  background:rgba(255,255,255,.96);
  box-shadow:0 1px 0 rgba(16,24,40,.02);
  backdrop-filter:blur(18px);
}
.brand {
  min-width:132px;
  padding:0;
  color:var(--ui-ink);
  font-size:25px;
  font-weight:800;
  line-height:1;
  letter-spacing:-.04em;
}
.brand span { color:var(--ui-accent); }
.brand::after { margin-left:9px; color:var(--ui-muted); font-size:8px; letter-spacing:.12em; }
.header-actions { gap:7px; }
.mobile-header-actions { display:flex; }
.account-email,.header-account-shortcut { display:none !important; }
.saved {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:32px;
  padding:0 11px;
  border:1px solid #cfe8d9;
  border-radius:999px;
  color:#21633d;
  background:var(--ui-success-soft);
  font-size:11px;
  font-weight:650;
  letter-spacing:0;
  text-transform:none;
}
.saved::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--ui-success); box-shadow:0 0 0 3px rgba(22,132,71,.1); }
.account-email { max-width:145px; margin:0 2px; color:var(--ui-muted); font-size:12px; }
.theme-toggle { border-color:var(--ui-line); background:#f7f8fa; }
.theme-toggle svg { width:17px; height:17px; }

/* Desktop builder shell */
.workspace {
  display:grid;
  grid-template-columns:minmax(700px,50%) minmax(600px,50%);
  min-height:calc(100dvh - 72px);
  background:var(--ui-canvas);
}
.editor {
  display:grid;
  grid-template-columns:222px minmax(0,1fr);
  grid-template-rows:132px 3px minmax(0,1fr);
  height:calc(100dvh - 72px);
  overflow:hidden;
  border-right:1px solid var(--ui-line);
  background:var(--ui-canvas);
}
.score-strip {
  grid-column:1 / -1;
  grid-row:1;
  display:grid;
  grid-template-columns:222px minmax(0,1fr);
  gap:12px;
  min-height:132px;
  padding:14px;
  border:0;
  background:var(--ui-canvas) !important;
}
.score-number {
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  padding:18px 20px;
  border-radius:var(--ui-radius-md);
  color:#fff !important;
  background:var(--ui-accent) !important;
  box-shadow:0 10px 24px rgba(0,47,167,.16);
}
.score-value { align-items:flex-end; gap:5px; }
.score-number strong { font-size:45px; font-weight:720; line-height:.9; letter-spacing:-.035em; }
.score-max { padding-bottom:3px; font-size:13px; font-weight:650; }
.score-label { margin-top:10px; font-size:11px; font-weight:650; letter-spacing:.01em; text-transform:none; opacity:.82; }
.score-copy {
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  padding:20px 24px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-md);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-sm);
}
.score-copy h1 {
  max-width:28ch;
  margin:0 0 7px;
  font-size:22px;
  font-weight:680;
  line-height:1.15;
  letter-spacing:-.01em;
}
.score-copy p { max-width:60ch; margin:0; color:var(--ui-muted); font-size:12px; line-height:1.5; }
.progress { grid-column:1 / -1; grid-row:2; height:3px; border:0; background:var(--ui-line); }
.progress i,.progress[data-score-band] i { background:var(--ui-accent); }

/* Desktop sidebar */
.tabs,.editor > .tabs {
  grid-column:1;
  grid-row:3;
  display:flex;
  flex-direction:column;
  gap:4px;
  min-height:0;
  overflow-y:auto;
  padding:14px 12px 22px;
  border:0;
  border-right:1px solid var(--ui-line);
  background:var(--ui-canvas);
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar { display:none; }
.tab {
  position:relative;
  flex:0 0 auto;
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:11px;
  margin:0;
  padding:7px 9px;
  border:1px solid transparent;
  border-radius:var(--ui-radius-sm);
  color:#596170;
  background:transparent;
  font-size:13px;
  font-weight:590;
  line-height:1.25;
  letter-spacing:0;
  text-align:left;
  text-transform:none;
}
.tab::before {
  position:static;
  flex:0 0 29px;
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
  border:1px solid var(--ui-line-strong);
  border-radius:50%;
  color:#7d8592;
  background:var(--ui-surface);
  font-size:10px;
  font-weight:700;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.tab:nth-child(1)::before { content:"01"; }
.tab:nth-child(2)::before { content:"02"; }
.tab:nth-child(3)::before { content:"03"; }
.tab:nth-child(4)::before { content:"04"; }
.tab:nth-child(5)::before { content:"05"; }
.tab:nth-child(6)::before { content:"06"; }
.tab:nth-child(7)::before { content:"07"; }
.tab:nth-child(8)::before { content:"08"; }
.tab:nth-child(9)::before { content:"09"; }
.tab:nth-child(10)::before { content:"10"; }
.tab:hover { color:var(--ui-ink); border-color:var(--ui-line); background:var(--ui-surface); }
.tab.active {
  color:var(--ui-accent);
  border-color:var(--ui-accent-border);
  background:var(--ui-accent-soft);
  box-shadow:none;
}
.tab.active::before { color:#fff; border-color:var(--ui-accent); background:var(--ui-accent); }
.tab-badges { display:inline-flex; gap:4px; margin-left:auto; }
.tab-badge {
  min-width:23px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:750;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.tab-badge.critical { color:#fff; background:var(--ui-danger); }
.tab-badge.warning { color:#754a00; background:#ffd975; }

/* Editor content */
.panel,.panel.active {
  grid-column:2;
  grid-row:3;
  min-height:0;
  overflow-y:auto;
  padding:34px clamp(26px,2.7vw,48px) 110px;
  border:0;
  background:var(--ui-surface);
  scrollbar-width:thin;
  scrollbar-color:var(--ui-line-strong) transparent;
}
.panel:not(.active) { display:none; }
.panel-head { align-items:flex-start; margin-bottom:30px; }
.panel-head h2 {
  max-width:24ch;
  margin:10px 0 0;
  font-size:clamp(29px,2.25vw,38px);
  font-weight:680;
  line-height:1.1;
  letter-spacing:-.015em;
}
.eyebrow {
  display:inline-flex;
  align-items:center;
  min-height:27px;
  padding:0 9px;
  border:1px solid var(--ui-accent-border);
  border-radius:999px;
  color:var(--ui-accent);
  background:var(--ui-accent-soft);
  font-size:11px;
  font-weight:680;
  letter-spacing:0;
  text-transform:none;
}
.field-grid { gap:0 16px; }
.field { margin-bottom:18px; }
.field > label,.repeat-card > label {
  margin-bottom:8px;
  color:#515967;
  font-size:12px;
  font-weight:650;
  letter-spacing:0;
  text-transform:none;
}
.clear-field { width:30px; height:30px; top:9px; right:8px; border-radius:50%; color:#7c8490; background:#f3f4f6; }
.clear-field:hover { color:var(--ui-ink); background:#e9ebef; }
.hint { margin-top:-8px; margin-bottom:20px; color:var(--ui-muted); font-size:11px; line-height:1.55; }
.skills-count-guidance { display:inline-flex; align-items:center; min-height:28px; margin:-10px 0 0; padding:5px 9px; border:1px solid var(--ui-line); border-radius:999px; color:var(--ui-muted); background:var(--ui-canvas); font-size:10px; font-weight:700; line-height:1.35; }
.skills-count-guidance.is-warning { color:var(--ui-warning); border-color:var(--ui-warning); background:var(--ui-warning-soft); }
.notice {
  margin-bottom:22px;
  padding:14px 16px;
  border:1px solid #d7e1fb;
  border-left:3px solid var(--ui-accent);
  border-radius:var(--ui-radius-sm);
  color:#4f5c73;
  background:#f6f8fe;
  font-size:12px;
  line-height:1.55;
}
.repeat-card,.headline-card,.design-card,.evidence-card,.source-receipt {
  margin-bottom:14px;
  padding:18px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-md);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-sm);
}
.repeat-card:hover,.headline-card:hover,.design-card:hover { border-color:var(--ui-line-strong); }
.add-btn { min-height:44px; color:var(--ui-accent); border:1px solid var(--ui-accent-border); background:var(--ui-accent-soft); font-size:12px; font-weight:650; }
.add-btn:hover { color:#fff; border-color:var(--ui-accent); background:var(--ui-accent); }
.text-btn { color:var(--ui-accent); font-size:12px; font-weight:650; }
.text-btn:hover { background:var(--ui-accent-soft); }
.workflow-actions,.headline-actions { gap:9px; margin-bottom:22px; }
.check { border-radius:var(--ui-radius-md); border-color:var(--ui-line); box-shadow:var(--ui-shadow-sm); }
.check-mark { border-radius:50%; }
.check-mark svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.file-name { max-width:min(280px,48vw); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.job-import-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.job-import-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.select-source { position:absolute !important; width:1px !important; height:1px !important; overflow:hidden !important; clip:rect(0,0,0,0); white-space:nowrap; }
.custom-select { position:relative; }
.custom-select-trigger { width:100%; min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border:1px solid var(--ui-line-strong); color:var(--ui-ink); background:var(--ui-surface); text-align:left; font-weight:600; }
.custom-select-trigger svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; transition:transform .16s ease; }
.custom-select-trigger[aria-expanded="true"] { border-color:var(--ui-accent); box-shadow:0 0 0 3px rgba(0,47,167,.1); }
.custom-select-trigger[aria-expanded="true"] svg { transform:rotate(180deg); }
.custom-select-menu { position:absolute; z-index:70; top:calc(100% + 6px); right:0; left:0; overflow:hidden; padding:5px; border:1px solid var(--ui-line-strong); border-radius:var(--ui-radius-sm); background:var(--ui-surface-raised); box-shadow:var(--ui-shadow-lg); }
.custom-select-menu button { width:100%; min-height:42px; padding:8px 10px; border:0; border-radius:var(--ui-radius-xs); color:var(--ui-ink); background:transparent; text-align:left; font-weight:580; }
.custom-select-menu button:hover,.custom-select-menu button:focus,.custom-select-menu button[aria-selected="true"] { color:var(--ui-accent); background:var(--ui-accent-soft); }
.field.has-critical,.repeat-card.has-critical { border-left-width:3px; border-radius:var(--ui-radius-md); background:var(--ui-danger-soft); }
.field.has-warning,.repeat-card.has-warning { border-left-width:3px; border-radius:var(--ui-radius-md); background:var(--ui-warning-soft); }
.field-issue { position:relative; display:block; min-width:0; padding-left:28px; }
.field-issue::before { position:absolute; top:1px; left:0; border-radius:50%; }
.field-issue-title { display:block; color:var(--ui-ink); font-size:12px; font-weight:700; line-height:1.4; overflow-wrap:anywhere; }
.field-issue-fix { margin:4px 0 0 !important; color:var(--ui-ink); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.field-issue-details { margin-top:8px; }
.field-issue-details summary { width:max-content; max-width:100%; cursor:pointer; color:var(--ui-muted); font-size:10px; font-weight:750; letter-spacing:.035em; text-transform:uppercase; }
.field-issue-details p { margin:6px 0 0 !important; color:var(--ui-muted); font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.issue-guidance { display:grid; gap:9px; margin:0; }
.issue-guidance > div { display:grid; grid-template-columns:96px minmax(0,1fr); gap:10px; }
.issue-guidance dt { color:var(--ui-muted); font-size:10px; font-weight:750; line-height:1.45; letter-spacing:.045em; text-transform:uppercase; }
.issue-guidance dd { margin:0; color:var(--ui-ink); font-size:12px; line-height:1.45; }
.review-guidance { margin-top:10px; }
.dialog-guidance { margin-top:8px; }
.dialog-guidance > div { grid-template-columns:88px minmax(0,1fr); }

.role-skill-assistant { margin:22px 0 28px; overflow:hidden; border:1px solid var(--ui-line-strong); border-radius:var(--ui-radius-md); background:var(--ui-surface-raised); box-shadow:var(--ui-shadow-sm); }
.role-skill-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px; border-bottom:1px solid var(--ui-line); }
.role-skill-head > div { display:grid; grid-template-columns:42px minmax(0,1fr); column-gap:12px; }
.role-skill-head h3 { align-self:end; margin:0; font-size:17px; line-height:1.2; letter-spacing:-.015em; }
.role-skill-head p { grid-column:2; margin:5px 0 0; color:var(--ui-muted); font-size:12px; line-height:1.45; }
.role-skill-index { grid-row:1 / 3; display:grid; place-items:center; width:42px; height:42px; color:#fff; background:var(--ui-accent); font-size:18px; font-weight:760; font-variant-numeric:tabular-nums; }
.role-skill-safety { margin:0; padding:12px 20px; color:var(--ui-muted); border-bottom:1px solid var(--ui-line); background:var(--ui-canvas); font-size:11px; line-height:1.45; }
.role-skill-search-toggle { flex:none; display:inline-flex; align-items:center; gap:8px; }
.role-skill-search-toggle svg,.role-skill-search > svg,.role-skill-search button svg,.role-skill-chip svg,.role-skill-current-chip svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.role-skill-current-shell { padding:14px 20px 12px; border-bottom:1px solid var(--ui-line); }
.role-skill-current-shell > span { display:block; margin-bottom:9px; color:var(--ui-muted); font-size:9px; font-weight:750; letter-spacing:.045em; text-transform:uppercase; }
.role-skill-current { display:flex; gap:7px; padding-bottom:4px; overflow-x:auto; scrollbar-width:thin; }
.role-skill-current-chip { flex:none; min-height:34px; display:inline-flex; align-items:center; gap:7px; padding:6px 9px 6px 11px; border:1px solid var(--ui-accent); border-radius:999px; color:var(--ui-accent); background:var(--ui-accent-soft); font-size:10px; font-weight:700; }
.role-skill-current-chip:hover { color:#fff; background:var(--ui-accent); }
.role-skill-current-chip svg { width:13px; height:13px; }
.role-skill-current-empty { margin:0 !important; color:var(--ui-muted); font-size:11px !important; text-transform:none !important; }
.role-skill-search { position:relative; margin:14px 20px 0; }
.role-skill-search > svg { position:absolute; top:50%; left:13px; z-index:1; transform:translateY(-50%); color:var(--ui-muted); pointer-events:none; }
.role-skill-search input { width:100%; min-height:42px; padding:9px 42px 9px 40px !important; }
.role-skill-search button { position:absolute; top:50%; right:7px; width:30px; height:30px; display:grid; place-items:center; border:0; border-radius:50%; color:var(--ui-muted); background:transparent; transform:translateY(-50%); }
.role-skill-search button:hover { color:var(--ui-ink); background:var(--ui-canvas); }
.role-skill-list { max-height:260px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:14px 20px 18px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.role-skill-chip { position:relative; min-height:44px; display:grid; grid-template-columns:minmax(0,1fr) auto 20px; align-items:center; gap:8px; padding:8px 9px 8px 12px; border:1px solid var(--ui-line); border-radius:var(--ui-radius-xs); color:var(--ui-ink); background:var(--ui-surface); cursor:pointer; text-align:left; font-size:11px; font-weight:650; }
.role-skill-chip:hover { color:var(--ui-accent); border-color:var(--ui-accent); background:var(--ui-accent-soft); }
.role-skill-chip small { color:var(--ui-muted); font-size:8px; font-weight:700; letter-spacing:.035em; text-transform:uppercase; }
.role-skill-chip svg { width:18px; height:18px; }
.role-skill-empty { grid-column:1 / -1; margin:0; color:var(--ui-muted); font-size:12px; }
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }

/* Lightweight rich text fields */
.rich-editor-shell {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--control-radius);
  background:var(--paper);
  transition:border-color .16s ease,box-shadow .16s ease;
}
.rich-editor-shell:focus-within {
  border-color:var(--blue);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 14%,transparent);
}
.rich-toolbar {
  min-height:42px;
  display:flex;
  align-items:center;
  gap:3px;
  padding:5px 7px;
  border-bottom:1px solid var(--line);
  background:color-mix(in srgb,var(--wash) 78%,var(--paper));
}
.rich-toolbar button {
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid transparent;
  border-radius:7px;
  color:var(--muted);
  background:transparent;
}
.rich-toolbar button:hover {
  border-color:var(--line);
  color:var(--ink);
  background:var(--paper);
}
.rich-toolbar button.active {
  border-color:color-mix(in srgb,var(--blue) 28%,var(--line));
  color:var(--blue);
  background:color-mix(in srgb,var(--blue) 10%,var(--paper));
}
.rich-toolbar button:focus-visible {
  outline:2px solid var(--blue);
  outline-offset:1px;
}
.rich-toolbar svg {
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.rich-toolbar [data-rich-command="bold"] svg { stroke-width:2.8; }
.rich-toolbar-rule {
  width:1px;
  height:21px;
  margin:0 4px;
  background:var(--line);
}
.rich-editor {
  min-height:112px;
  padding:14px 15px;
  color:var(--ink);
  background:var(--paper);
  line-height:1.55;
  outline:0;
  overflow-wrap:anywhere;
}
.rich-editor:empty::before {
  content:attr(data-placeholder);
  color:var(--muted);
  pointer-events:none;
}
.rich-editor p,.rich-editor div { margin:0 0 7px; }
.rich-editor p:last-child,.rich-editor div:last-child { margin-bottom:0; }
.rich-editor ul,.rich-editor ol { margin:0; padding-left:22px; }
.rich-editor li + li { margin-top:3px; }
.field.has-critical .rich-editor-shell { border-color:#b42318; }
.field.has-warning .rich-editor-shell { border-color:#d89b00; }
.rich-resume-content p,.rich-resume-content div { margin:0 0:.35em; }
.rich-resume-content p:last-child,.rich-resume-content div:last-child { margin-bottom:0; }
.rich-resume-content ul,.rich-resume-content ol { margin:.2em 0 0; padding-left:1.3em; }
.rich-resume-content li + li { margin-top:.15em; }

html[data-theme="dark"] .rich-editor-shell,
html[data-theme="dark"] .rich-editor { background:#171a20; }
html[data-theme="dark"] .rich-toolbar { background:#111419; }

@media (max-width:640px) {
  .rich-toolbar { min-height:48px; padding:6px 8px; }
  .rich-toolbar button { width:38px; height:36px; }
  .rich-editor { min-height:132px; padding:14px; }
}

/* Consistent multiline resize control */
.resize-shell {
  position:relative;
  width:100%;
}
.resize-shell textarea {
  display:block;
  margin:0;
  background-image:none !important;
  resize:none !important;
}
.field-control .resize-shell textarea { padding-right:46px; }
.rich-editor-shell { position:relative; }
.rich-editor { padding-right:36px; padding-bottom:30px; }
.resize-handle {
  position:absolute;
  z-index:4;
  right:5px;
  bottom:5px;
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid transparent;
  border-radius:7px !important;
  color:var(--muted);
  background:transparent;
  cursor:ns-resize;
  touch-action:none;
}
.resize-handle:hover,
.resize-handle:focus-visible,
.resize-handle.dragging {
  border-color:var(--line);
  color:var(--blue);
  background:var(--paper);
  outline:none;
}
.resize-handle:focus-visible { box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 22%,transparent); }
.resize-handle svg {
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
}
body.resizing-field,
body.resizing-field * { cursor:ns-resize !important; user-select:none !important; }
html[data-theme="dark"] .resize-handle:hover,
html[data-theme="dark"] .resize-handle:focus-visible,
html[data-theme="dark"] .resize-handle.dragging { background:#171a20; }

@media (max-width:640px) {
  .resize-handle { right:6px; bottom:6px; width:34px; height:34px; }
  .resize-handle svg { width:18px; height:18px; }
  .rich-editor { padding-right:42px; padding-bottom:38px; }
}
.keyword,.headline-angle,.evidence-tag { border-radius:999px; }

/* Preview workspace */
.preview-area {
  position:sticky;
  top:72px;
  height:calc(100dvh - 72px);
  padding:18px clamp(18px,2.5vw,38px) 70px;
  border:0;
  background-color:#f2f4f7;
  background-image:radial-gradient(circle at 1px 1px,rgba(79,91,113,.12) 1px,transparent 0);
  background-size:22px 22px;
}
.preview-toolbar {
  position:sticky;
  top:0;
  z-index:12;
  max-width:880px;
  min-height:62px;
  margin:0 auto 18px;
  padding:10px 12px 10px 16px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-md);
  background:rgba(255,255,255,.95);
  box-shadow:var(--ui-shadow-md);
  backdrop-filter:blur(18px);
}
.preview-toolbar > span { color:#596170; font-size:11px; font-weight:680; letter-spacing:0; }
.toolbar-controls { gap:10px; }
.control-label { color:var(--ui-muted); font-size:10px; font-weight:650; letter-spacing:0; text-transform:none; }
.preview-toolbar select { min-height:36px; padding-block:7px; border-color:var(--ui-line); border-radius:var(--ui-radius-xs); background:var(--ui-surface); font-size:12px; }
.styles { gap:4px; }
.style-btn { min-height:36px; padding:8px 10px; border-color:var(--ui-line); border-radius:var(--ui-radius-xs); color:#5c6471; background:var(--ui-surface); font-size:11px; font-weight:620; }
.style-btn:hover { border-color:#aeb5c0; background:#f8f9fb; }
.style-btn.active { color:#fff; border-color:var(--ui-accent); background:var(--ui-accent); }
.resume-stack { gap:24px; }
.resume { border:1px solid #d8dce3; box-shadow:0 20px 55px rgba(26,35,52,.13); }
.preview-zoom { filter:drop-shadow(0 8px 18px rgba(16,24,40,.12)); }
.zoom-controls { border-color:var(--ui-line); border-radius:999px; overflow:hidden; }
.zoom-btn,.zoom-reset { background:var(--ui-surface); }

/* Premium start page */
.welcome {
  position:fixed;
  z-index:100;
  inset:0;
  display:grid;
  grid-template-columns:minmax(320px,36%) minmax(640px,64%);
  gap:20px;
  min-height:100dvh;
  padding:20px;
  overflow:auto;
  background:var(--ui-canvas);
}
.welcome-intro {
  position:sticky;
  top:0;
  min-height:calc(100dvh - 40px);
  max-height:calc(100dvh - 40px);
  padding:clamp(30px,4vw,58px);
  border-radius:var(--ui-radius-xl);
  color:#fff;
  background-color:var(--ui-accent);
  background-image:linear-gradient(rgba(255,255,255,.085) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.085) 1px,transparent 1px);
  background-size:64px 64px;
  box-shadow:0 24px 60px rgba(0,47,167,.2);
}
.welcome-intro::before,.welcome-intro::after { display:none; }
.welcome-brand { font-size:29px; font-weight:800; letter-spacing:-.04em; }
.welcome-top { gap:24px; }
.welcome-account {
  max-width:390px;
  padding:17px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:var(--ui-radius-md);
  background:rgba(9,24,69,.14);
  box-shadow:none;
  backdrop-filter:blur(12px);
}
.welcome-account small { font-size:10px; font-weight:650; letter-spacing:.02em; text-transform:none; }
.welcome-account strong { font-size:14px; }
.welcome-account span { font-size:12px; }
.welcome-account-actions button { min-height:34px; padding:0 11px; border-radius:var(--ui-radius-xs); font-size:11px; font-weight:620; }
.welcome-folio { font-size:clamp(100px,14vw,210px); font-weight:650; letter-spacing:-.04em; opacity:.11; }
.welcome-scan-graphic {
  width:min(100%,390px);
  margin:6px 0 22px;
  padding:14px 0;
  border-top:1px solid rgba(255,255,255,.22);
  border-bottom:1px solid rgba(255,255,255,.22);
}
.welcome-scan-graphic svg { display:block; width:100%; height:auto; fill:none; stroke:rgba(255,255,255,.84); stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.welcome-scan-graphic .scan-line { stroke:#fff; stroke-width:3; }
.free-label { margin-bottom:14px; padding:7px 10px; border-radius:999px; font-size:10px; font-weight:650; letter-spacing:.02em; text-transform:none; }
.welcome-intro p { max-width:38ch; font-size:14px; line-height:1.6; }
.welcome-actions {
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  min-height:calc(100dvh - 40px);
  padding:clamp(54px,6vw,92px) clamp(34px,5vw,76px) 54px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-xl);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-sm);
}
.welcome-actions::before { content:""; position:absolute; inset:0 0 auto; height:4px; border-radius:var(--ui-radius-xl) var(--ui-radius-xl) 0 0; background:var(--ui-accent); }
.welcome-actions-top { top:26px; right:clamp(28px,4vw,58px); color:var(--ui-muted); }
.welcome-actions-top strong { font-size:11px; font-weight:650; letter-spacing:0; text-transform:none; }
.welcome-actions-top .welcome-tour-button { min-height:38px; margin:0; box-shadow:none; }
.welcome-actions h1 {
  max-width:13ch;
  margin:20px 0 15px;
  font-size:clamp(42px,4.2vw,64px);
  font-weight:690;
  line-height:1.04;
  letter-spacing:-.015em;
}
.welcome-actions > p { max-width:62ch; margin:0 0 24px; color:var(--ui-muted); font-size:15px; line-height:1.6; }
.welcome-tour-button {
  align-self:flex-start;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0 0 30px;
  padding:0 15px;
  border:1px solid var(--ui-line-strong);
  border-radius:var(--ui-radius-sm);
  color:var(--ui-ink);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-sm);
  font-size:12px;
  font-weight:650;
}
.welcome-tour-button svg,.welcome-meta button svg { width:17px; height:17px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.welcome-tour-button:hover { color:var(--ui-accent); border-color:var(--ui-accent-border); background:var(--ui-accent-soft); }
.entry-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  overflow:visible;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.paste-resume-card { width:min(760px,calc(100vw - 32px)); }
.paste-resume-input { min-height:260px; resize:vertical; }
.paste-resume-receipt { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:14px; border:1px solid var(--ui-line); border-radius:var(--ui-radius-sm); background:var(--ui-canvas); }
.paste-receipt-item { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--ui-line); border-radius:var(--ui-radius-xs); background:var(--ui-surface); font-size:12px; }
.paste-receipt-item strong { color:var(--ui-ink); }
.paste-receipt-item span { color:var(--ui-muted); }
.entry-card,.entry-card.linkedin-card {
  grid-column:auto;
  min-height:280px;
  display:flex;
  padding:22px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-lg) !important;
  color:var(--ui-ink);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-sm);
}
.entry-card + .entry-card,.entry-card.linkedin-card { border-left:1px solid var(--ui-line); border-top:1px solid var(--ui-line); }
.entry-card:hover { border-color:#b8c0cb; background:#fafbfc; box-shadow:0 12px 28px rgba(16,24,40,.08); transform:translateY(-2px); }
.entry-card.primary { color:#fff; border-color:var(--ui-accent); background:var(--ui-accent); box-shadow:0 16px 32px rgba(0,47,167,.2); }
.entry-card.primary:hover { border-color:var(--ui-accent-hover); background:var(--ui-accent-hover); }
.entry-card svg,.entry-card.linkedin-card svg { width:28px; height:28px; margin-bottom:auto; }
.entry-card strong { margin:28px 0 8px; font-size:18px; font-weight:680; line-height:1.25; letter-spacing:-.008em; }
.entry-card span { font-size:12px; line-height:1.55; }
.entry-card.linkedin-card strong { margin-top:12px; }
.demo-entry-card { overflow:hidden; }
.demo-entry-card .demo-entry-score { display:flex; align-items:baseline; gap:6px; margin-bottom:auto; color:#fff; }
.demo-entry-card .demo-entry-score b { font-size:52px; font-weight:720; line-height:.9; letter-spacing:-.055em; }
.demo-entry-card .demo-entry-score small { font-size:13px; font-weight:700; }
.demo-entry-card strong { max-width:13ch; font-size:22px; line-height:1.12; }
:root[data-theme="dark"] .demo-entry-card .demo-entry-score { color:#fff; }
.premium-tag { margin:18px 0 0; padding:5px 8px; border-radius:999px; font-size:9px; font-weight:650; letter-spacing:.02em; text-transform:none; }
.language-note { margin:10px 0 12px; color:var(--ui-muted); font-size:11px; font-weight:540; white-space:normal; }
.welcome-community { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }
.welcome-community a,.welcome-community button { min-height:38px; display:inline-flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--ui-line); border-radius:999px; color:var(--ui-ink); background:var(--ui-surface); font-size:11px; font-weight:650; text-decoration:none; }
.welcome-community svg { width:16px; height:16px; fill:currentColor; }
.welcome-community svg.email-icon,.welcome-community svg.outline-icon { fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.issue-dialog-score svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; }
.review-preview { display:grid; grid-template-columns:minmax(180px,.75fr) minmax(0,1.25fr); gap:24px; margin-top:22px; padding:22px; border:1px solid var(--ui-line); border-radius:var(--ui-radius-lg); background:var(--ui-canvas); }
.review-preview h2 { margin:8px 0 0; font-size:22px; letter-spacing:-.015em; }
#welcomeReviews { display:grid; gap:10px; }
.public-review { padding:16px; border:1px solid var(--ui-line); border-radius:var(--ui-radius-sm); background:var(--ui-surface); }
.review-card-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.review-source { padding:4px 7px; border:1px solid var(--ui-line); border-radius:999px; color:var(--ui-muted); font-size:9px; font-weight:700; }
.public-review h3 { margin:10px 0 0; color:var(--ui-ink); font-size:13px; line-height:1.3; }
.public-review p { margin:6px 0 12px; font-size:12px; line-height:1.55; }
.public-review footer { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:11px; }
.public-review footer span { color:var(--ui-muted); font-weight:650; text-align:right; }
.review-stars { display:flex; gap:2px; }
.review-stars svg { width:16px; height:16px; fill:#c9ced7; }
.review-stars svg.active { fill:#f5b700; }
.rating-field { margin:0; padding:0; border:0; }
.rating-field legend { margin-bottom:10px; font-size:11px; font-weight:700; text-transform:uppercase; }
.rating-options { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.rating-options label { position:relative; }
.rating-options input { position:absolute; opacity:0; }
.rating-options span { min-height:44px; display:grid; place-items:center; border:1px solid var(--ui-line); border-radius:var(--ui-radius-sm); font-weight:700; }
.rating-options input:checked + span { color:#fff; border-color:var(--ui-accent); background:var(--ui-accent); }
.whats-new-list article { display:grid; gap:5px; padding:14px 0; border-bottom:1px solid var(--ui-line); }
.whats-new-list article:last-child { border-bottom:0; }
.whats-new-list span { color:var(--ui-muted); font-size:12px; line-height:1.5; }
.welcome-meta { margin-top:16px; }
.welcome-meta button {
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 13px;
  border:1px solid var(--ui-accent-border);
  border-radius:999px;
  color:var(--ui-accent);
  background:var(--ui-accent-soft);
  font-size:12px;
  font-weight:650;
}
.welcome-meta button:hover { color:#fff; border-color:var(--ui-accent); background:var(--ui-accent); }
.welcome-links { gap:8px 16px; margin-top:18px; padding-top:17px; border-top:1px solid var(--ui-line); }
.welcome-links a { color:var(--ui-muted); font-size:11px; font-weight:550; }
.welcome-links a:hover { color:var(--ui-accent); }

/* Premium access page */
.auth-gate {
  position:fixed;
  z-index:220;
  inset:0;
  display:grid;
  grid-template-columns:minmax(340px,38%) minmax(580px,62%);
  gap:20px;
  padding:20px;
  overflow:auto;
  background:var(--ui-canvas);
}
.auth-visual {
  position:sticky;
  top:0;
  min-height:calc(100dvh - 40px);
  max-height:calc(100dvh - 40px);
  padding:clamp(34px,4.5vw,68px);
  border-radius:var(--ui-radius-xl);
  color:#fff;
  background-color:var(--ui-accent);
  background-image:linear-gradient(rgba(255,255,255,.085) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.085) 1px,transparent 1px);
  background-size:64px 64px;
  box-shadow:0 24px 60px rgba(0,47,167,.2);
}
.auth-visual::before,.auth-visual::after { display:none; }
.auth-visual strong { font-size:29px; font-weight:800; letter-spacing:-.04em; }
.auth-visual h2 { max-width:9ch; font-size:clamp(42px,4.2vw,62px); font-weight:680; line-height:1.05; letter-spacing:-.015em; }
.auth-visual p { max-width:40ch; font-size:14px; line-height:1.6; }
.auth-form-wrap {
  display:flex;
  align-items:flex-start;
  justify-content:center;
  min-height:calc(100dvh - 40px);
  padding:clamp(40px,5vw,74px);
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-xl);
  background:var(--ui-surface);
  background-image:none;
  box-shadow:var(--ui-shadow-sm);
}
.auth-form {
  width:min(640px,100%);
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.auth-tabs { gap:4px; margin-bottom:20px; padding:4px; border:1px solid var(--ui-line); border-radius:999px; background:var(--ui-canvas); }
.auth-tab { min-height:40px; border-radius:999px; color:var(--ui-muted); font-size:12px; font-weight:650; }
.auth-tab[aria-selected="true"] { color:#fff; background:var(--ui-accent); box-shadow:0 4px 12px rgba(0,47,167,.16); }
.linkedin-signin { min-height:48px; margin-bottom:18px; border-color:var(--ui-line-strong); border-radius:var(--ui-radius-sm); background:var(--ui-surface); box-shadow:var(--ui-shadow-sm); font-size:13px; font-weight:650; }
.linkedin-signin:hover { border-color:#98a0ac; background:#fafbfc; }
.auth-divider { margin-bottom:22px; color:var(--ui-muted); font-size:11px; font-weight:550; letter-spacing:0; text-transform:none; }
.auth-form .eyebrow { margin-bottom:10px; }
.auth-form h1 { max-width:15ch; margin:0 0 10px; font-size:clamp(34px,3.2vw,48px); font-weight:680; line-height:1.08; letter-spacing:-.015em; }
.auth-lead { margin-bottom:26px; color:var(--ui-muted); font-size:14px; line-height:1.6; }
.auth-grid { gap:0 14px; }
.auth-form .field { margin-bottom:16px; }
.consent-list { gap:9px; margin:8px 0 20px; padding:0; background:transparent; }
.consent-list label {
  align-items:flex-start;
  gap:11px;
  padding:12px 13px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-sm);
  background:#fafbfc;
  font-size:12px;
  line-height:1.5;
}
.consent-list input[type="checkbox"] { margin-top:2px; border-radius:5px; }
.auth-submit { width:100%; min-height:48px; font-size:13px; }
.auth-back { color:var(--ui-muted); font-size:12px; font-weight:600; }
.auth-code { border-radius:var(--ui-radius-md) !important; font-size:28px !important; font-weight:650; letter-spacing:.18em !important; }

/* Loading experience */
body.auth-checking .auth-loader { background:var(--ui-canvas); }
.auth-loader-card {
  width:min(390px,calc(100vw - 40px));
  padding:34px;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-lg);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-md);
}
.auth-loader-mark { font-size:58px; font-weight:800; letter-spacing:-.04em; }
.auth-loader-rail { height:6px; gap:4px; margin-top:24px; }
.auth-loader-rail span { border:0; border-radius:999px; background:#e5e8ed; }
.auth-loader-rail::after { border-radius:999px; background:var(--ui-accent); }
.auth-loader-copy { margin-top:14px; color:var(--ui-muted); font-size:12px; font-weight:600; letter-spacing:0; text-transform:none; }

/* Dialogs, status surfaces, and drawers */
.issue-dialog { background:rgba(19,24,33,.58); backdrop-filter:blur(12px); }
.issue-dialog-card,.photo-import-card,.tour-card,.consent-banner {
  overflow:hidden;
  border:1px solid var(--ui-line);
  border-radius:var(--ui-radius-lg);
  background:var(--ui-surface);
  box-shadow:var(--ui-shadow-lg);
}
.consent-banner { width:min(420px,calc(100vw - 40px)); padding:17px; }
.consent-banner h2 { font-size:18px; letter-spacing:-.015em; }
.consent-banner p { font-size:12px; line-height:1.5; }
.consent-banner-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:13px; }
.consent-banner-actions .btn { min-height:40px; padding-inline:10px; }
.consent-banner-actions .primary { grid-column:1 / -1; }
.issue-dialog-head { border-bottom-color:var(--ui-line); }
.issue-dialog-score { color:#fff; border-radius:var(--ui-radius-sm); background:var(--ui-accent); }
.issue-dialog-copy h2,.photo-import-head h2 { font-weight:680; line-height:1.15; letter-spacing:-.02em; }
.dialog-issue { border-radius:var(--ui-radius-sm); }
.dialog-issue-dot { border-radius:50%; }
.dialog-issue > span { border-radius:999px; }
.issue-dialog-actions { border-top-color:var(--ui-line); background:#fafbfc; }
.dialog-close { border-radius:50%; }
.bug-fab { border:1px solid var(--ui-line-strong); border-radius:999px; color:var(--ui-ink); background:var(--ui-surface); box-shadow:var(--ui-shadow-md); font-size:12px; font-weight:650; }
.bug-fab:hover { color:#fff; border-color:var(--ui-accent); background:var(--ui-accent); }
.consent-banner { border-radius:var(--ui-radius-lg); }
.consent-banner h2 { font-weight:680; letter-spacing:-.02em; }
.mobile-drawer { border-color:var(--ui-line); border-radius:var(--ui-radius-lg) 0 0 var(--ui-radius-lg); box-shadow:-24px 0 80px rgba(0,0,0,.2); }
.drawer-head { border-bottom-color:var(--ui-line); }
.drawer-account { background:var(--ui-accent); }
.drawer-action { border-color:var(--ui-line); border-radius:var(--ui-radius-sm); font-size:13px; font-weight:600; }
.drawer-action:hover,.drawer-action:focus { color:var(--ui-accent); border-color:var(--ui-accent-border); background:var(--ui-accent-soft); }
.drawer-action.primary:hover { color:#fff; background:var(--ui-accent-hover); }
.drawer-community-version { color:var(--ui-muted); font-size:11px; }

/* Dark mode */
:root[data-theme="dark"] {
  --ui-accent:#7aa2ff;
  --ui-accent-hover:#94b5ff;
  --ui-accent-soft:#17243f;
  --ui-accent-border:#2f4777;
  --ui-ink:#f4f6f9;
  --ui-muted:#a6adba;
  --ui-subtle:#7f8795;
  --ui-line:#2b3039;
  --ui-line-strong:#404751;
  --ui-canvas:#0b0d11;
  --ui-surface:#13161b;
  --ui-surface-raised:#191d23;
  --ui-danger-soft:#341a1d;
  --ui-warning-soft:#302817;
  --ui-success-soft:#13271d;
}
:root[data-theme="dark"] body,:root[data-theme="dark"] .workspace,:root[data-theme="dark"] .editor { background:var(--ui-canvas); }
:root[data-theme="dark"] .app-header { background:rgba(19,22,27,.96); }
:root[data-theme="dark"] .score-copy,:root[data-theme="dark"] .panel,:root[data-theme="dark"] .tab::before,:root[data-theme="dark"] .repeat-card,:root[data-theme="dark"] .headline-card,:root[data-theme="dark"] .design-card,:root[data-theme="dark"] .evidence-card,:root[data-theme="dark"] .source-receipt { color:var(--ui-ink); border-color:var(--ui-line); background:var(--ui-surface); }
:root[data-theme="dark"] .tab:hover { background:var(--ui-surface); }
:root[data-theme="dark"] .tab.active { background:var(--ui-accent-soft); }
:root[data-theme="dark"] .saved { color:#9cdbb7; border-color:#29563d; background:var(--ui-success-soft); }
:root[data-theme="dark"] .theme-toggle,:root[data-theme="dark"] .btn:not(.primary):not(.danger),:root[data-theme="dark"] .preview-toolbar,:root[data-theme="dark"] .style-btn,:root[data-theme="dark"] .issue-dialog-card,:root[data-theme="dark"] .photo-import-card,:root[data-theme="dark"] .tour-card,:root[data-theme="dark"] .consent-banner,:root[data-theme="dark"] .bug-fab,:root[data-theme="dark"] .auth-loader-card { color:var(--ui-ink); border-color:var(--ui-line); background:var(--ui-surface-raised); }
:root[data-theme="dark"] input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),:root[data-theme="dark"] textarea,:root[data-theme="dark"] select { color:var(--ui-ink) !important; border-color:var(--ui-line-strong); background:var(--ui-surface-raised) !important; box-shadow:none; }
:root[data-theme="dark"] .clear-field { color:var(--ui-muted); background:#242932; }
:root[data-theme="dark"] .notice { color:#c5d2ed; border-color:#2d426d; background:#121b2d; }
:root[data-theme="dark"] .preview-area { background-color:#090b0e; background-image:radial-gradient(circle at 1px 1px,rgba(160,174,201,.12) 1px,transparent 0); }
:root[data-theme="dark"] .welcome,:root[data-theme="dark"] .auth-gate { background:var(--ui-canvas); }
:root[data-theme="dark"] .welcome-intro {
  color:#f7f9ff;
  background-color:#102a66;
  background-image:linear-gradient(rgba(170,196,255,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(170,196,255,.11) 1px,transparent 1px);
  box-shadow:0 24px 60px rgba(0,0,0,.34);
}
:root[data-theme="dark"] .welcome-brand,:root[data-theme="dark"] .welcome-account strong { color:#fff; }
:root[data-theme="dark"] .welcome-account {
  color:#f7f9ff;
  border-color:rgba(190,209,255,.42);
  background:rgba(4,14,38,.52);
}
:root[data-theme="dark"] .welcome-account small,:root[data-theme="dark"] .welcome-account span,:root[data-theme="dark"] .welcome-account p,:root[data-theme="dark"] .welcome-product-note p { color:#e8efff; opacity:1; }
:root[data-theme="dark"] .welcome-account-actions button { color:#fff; border-color:rgba(211,223,255,.68); background:rgba(255,255,255,.04); }
:root[data-theme="dark"] .welcome-account-actions button:hover { color:#102a66; border-color:#fff; background:#fff; }
:root[data-theme="dark"] .welcome-folio { color:#9bb8ff; opacity:.2; }
:root[data-theme="dark"] .free-label { color:#fff; border-color:rgba(211,223,255,.68); background:rgba(255,255,255,.05); }
:root[data-theme="dark"] .welcome-scan-graphic { border-color:rgba(190,209,255,.32); }
:root[data-theme="dark"] .welcome-scan-graphic svg { stroke:#dbe6ff; }
:root[data-theme="dark"] .welcome-scan-graphic .scan-line { stroke:#fff; }
:root[data-theme="dark"] .entry-card.primary { color:#fff; border-color:#255fc7; background:#174aa8; }
:root[data-theme="dark"] .entry-card.primary:hover { border-color:#3974df; background:#1d58c7; }
:root[data-theme="dark"] .welcome-actions,:root[data-theme="dark"] .auth-form-wrap,:root[data-theme="dark"] .entry-card:not(.primary) { color:var(--ui-ink); border-color:var(--ui-line); background:var(--ui-surface); }
:root[data-theme="dark"] .entry-card:not(.primary):hover { background:var(--ui-surface-raised); }
:root[data-theme="dark"] .welcome-tour-button,:root[data-theme="dark"] .linkedin-signin { color:var(--ui-ink); border-color:var(--ui-line-strong); background:var(--ui-surface-raised); }
:root[data-theme="dark"] .auth-tabs,:root[data-theme="dark"] .consent-list label { border-color:var(--ui-line); background:var(--ui-canvas); }
:root[data-theme="dark"] .issue-dialog-actions { background:var(--ui-canvas); }
:root[data-theme="dark"] .mobile-drawer,:root[data-theme="dark"] .mobile-nav,:root[data-theme="dark"] .mobile-nav button { color:var(--ui-ink); background:var(--ui-surface); }
:root[data-theme="dark"] .evidence-card-head,:root[data-theme="dark"] .evidence-tags,:root[data-theme="dark"] .evidence-tag { color:var(--ui-ink); border-color:var(--ui-line); background:var(--ui-surface-raised); }
:root[data-theme="dark"] .evidence-source { color:var(--ui-muted); border-color:var(--ui-line); background:var(--ui-canvas); }

/* Mid-size desktop */
@media (max-width:1380px) and (min-width:1025px) {
  .workspace { grid-template-columns:minmax(0,53%) minmax(0,47%); }
  .editor { grid-template-columns:202px minmax(0,1fr); }
  .score-strip { grid-template-columns:202px minmax(0,1fr); }
  .tab { font-size:12px; }
  .app-header { padding-inline:14px; }
  .header-actions { gap:5px; }
  .btn { padding-inline:10px; font-size:11px; }
  .account-email { display:none; }
  .entry-grid { grid-template-columns:1fr 1fr; }
  .entry-card.linkedin-card { grid-column:1 / -1; min-height:220px; }
}

@media (min-width:1025px) {
  .header-actions #themeToggle,.header-actions #openTour,.header-actions #clearCv,.header-actions #loadDemo { display:none; }
  .mobile-header-actions { display:flex; }
  .mobile-drawer { width:min(390px,90vw); }
}

/* Tablet and mobile workspace */
@media (max-width:1024px) {
  body { padding-top:68px; }
  .app-header { position:fixed; top:0; right:0; left:0; height:68px; padding:0 16px; }
  .brand { min-width:0; font-size:24px; }
  .workspace { display:block; min-height:calc(100dvh - 68px); }
  .editor { display:block; height:auto; min-height:calc(100dvh - 136px); overflow:visible; border:0; background:var(--ui-surface); }
  .score-strip { display:grid; grid-template-columns:128px minmax(0,1fr); gap:9px; min-height:112px; padding:10px; }
  .score-number { padding:15px; border-radius:var(--ui-radius-sm); }
  .score-number strong { font-size:38px; }
  .score-copy { padding:16px 18px; border-radius:var(--ui-radius-sm); }
  .score-copy h1 { font-size:19px; }
  .tabs,.editor > .tabs {
    position:sticky;
    top:68px;
    z-index:25;
    display:flex;
    flex-direction:row;
    gap:5px;
    min-height:58px;
    overflow-x:auto;
    padding:8px 10px;
    border-right:0;
    border-bottom:1px solid var(--ui-line);
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(16px);
  }
  .tab { width:auto; min-height:40px; padding:6px 11px; border-radius:999px; white-space:nowrap; }
  .tab::before { display:none; }
  .tab.active { box-shadow:none; }
  .tab-badges { margin-left:3px; }
  .panel,.panel.active { display:none; overflow:visible; padding:30px 22px 112px; }
  .panel.active { display:block; }
  .panel-head h2 { font-size:34px; }
  .preview-area { position:static; height:auto; min-height:calc(100dvh - 136px); padding:14px 12px 100px; }
  .preview-toolbar { top:68px; margin-bottom:16px; border-radius:var(--ui-radius-sm); }
  .preview-zoom { right:50%; bottom:calc(82px + env(safe-area-inset-bottom)); transform:translateX(50%); }
  .zoom-controls { display:flex; border-radius:999px; }
  .zoom-btn { width:44px; height:44px; }
  #zoomOut,#zoomReset,#zoomIn { grid-row:auto; border:0; }
  #zoomReset { width:34px; height:44px; border-right:1px solid var(--ui-line); border-left:1px solid var(--ui-line); }
  body.mobile-preview .editor { display:none; }
  body.mobile-preview .preview-area { display:block; }
  body.mobile-editor .editor { display:block; }
  body.mobile-editor .preview-area { display:none; }
  .mobile-nav { height:calc(70px + env(safe-area-inset-bottom)); border-top-color:var(--ui-line); background:rgba(255,255,255,.96); backdrop-filter:blur(18px); }
  .mobile-nav button { background:transparent; font-size:12px; font-weight:650; }
  .mobile-nav button.active { color:var(--ui-accent); border-top-color:var(--ui-accent); }
  .mobile-nav small { font-size:10px; font-weight:520; }
  .welcome,.auth-gate { grid-template-columns:1fr; gap:14px; padding:14px; }
  .welcome-intro,.auth-visual { position:relative; min-height:280px; max-height:none; border-radius:var(--ui-radius-lg); }
  .welcome-account { display:none !important; }
  .welcome-folio { display:none; }
  .welcome-scan-graphic { display:none; }
  .welcome-actions,.auth-form-wrap { min-height:auto; padding:42px 28px 100px; border-radius:var(--ui-radius-lg); }
  .entry-grid { grid-template-columns:1fr 1fr; }
  .entry-card.linkedin-card { grid-column:1 / -1; min-height:220px; }
  :root[data-theme="dark"] .tabs,:root[data-theme="dark"] .mobile-nav { background:rgba(19,22,27,.96); }
}
@media (max-width:700px) {
  .paste-resume-receipt { grid-template-columns:1fr; }
  .paste-resume-input { min-height:220px; }
}

@media (max-width:640px) {
  body { padding-top:58px; }
  .app-header { position:fixed; top:0; right:0; left:0; height:58px; padding:0 12px; }
  .brand { font-size:23px; }
  .menu-toggle { width:40px; height:40px; border-color:var(--ui-line-strong); border-radius:var(--ui-radius-sm); }
  .score-strip { grid-template-columns:124px minmax(0,1fr); min-height:108px; padding:8px; }
  .score-number { padding:14px; }
  .score-number strong { font-size:36px; }
  .score-max { flex:0 0 auto; font-size:11px; }
  .score-label { margin-top:7px; font-size:10px; }
  .score-copy { padding:13px 14px; }
  .score-copy h1 { font-size:17px; line-height:1.2; }
  .score-copy p { display:-webkit-box; overflow:hidden; font-size:11px; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .tabs,.editor > .tabs { top:58px; min-height:56px; padding:8px; }
  .tab { min-height:38px; padding:6px 10px; font-size:11px; }
  .tab-badge { min-width:20px; height:20px; padding-inline:6px; }
  .panel,.panel.active { padding:26px 15px 106px; }
  .panel-head { margin-bottom:24px; }
  .panel-head h2 { max-width:18ch; margin-top:9px; font-size:30px; line-height:1.12; letter-spacing:-.012em; }
  .field-grid { gap:0; }
  input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),textarea,select { min-height:50px; font-size:16px; }
  .repeat-card,.headline-card,.design-card,.evidence-card { padding:15px; border-radius:var(--ui-radius-sm); }
  .preview-area { padding:8px 6px 94px; }
  .preview-toolbar { top:58px; margin-bottom:10px; padding:10px; }
  .welcome,.auth-gate { gap:0; padding:0; }
  .welcome-intro { min-height:132px; padding:15px 16px; border-radius:0; }
  .auth-visual { min-height:210px; padding:20px; border-radius:0; }
  .welcome-top { align-items:flex-start; }
  .welcome-product-note { margin-top:14px; }
  .welcome-product-note .free-label { margin-bottom:8px; padding:5px 8px; font-size:8px; }
  .welcome-product-note p { display:-webkit-box; overflow:hidden; max-width:none; padding:0; border:0; font-size:11px; line-height:1.4; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
  .welcome-account { position:static; width:100%; margin-top:18px; }
  .welcome-brand,.auth-visual strong { font-size:25px; }
  .auth-visual h2 { margin-block:38px 16px; font-size:36px; }
  .welcome-actions { padding:14px 12px 82px; border-radius:0; }
  .auth-form-wrap { padding:24px 12px 88px; border-radius:0; }
  .welcome-actions-top { margin:0 0 6px; }
  .welcome-actions-top { align-items:flex-end; }
  .welcome-actions-top .welcome-tour-button { min-height:34px; margin:0; padding:0 10px; }
  .welcome-meta-primary { min-height:0; margin:0 0 10px; }
  .welcome-meta-primary button { width:100%; min-height:42px; padding:0 14px; border:1px solid var(--ui-accent-border); border-radius:var(--ui-radius-sm); color:#fff; background:var(--ui-accent); text-align:left; }
  .welcome-actions h1 { max-width:none; margin:8px 0 7px; font-size:27px; line-height:1.06; letter-spacing:-.025em; }
  .welcome-actions > p { margin:0 0 10px; font-size:12px; line-height:1.45; }
  .welcome-tour-button { min-height:36px; margin:0 0 10px; padding:0 12px; font-size:11px; }
  .language-note { margin:0 0 10px; font-size:10px; line-height:1.35; }
  .entry-grid { grid-template-columns:1fr; gap:7px; border:0; }
  .entry-card,.entry-card.linkedin-card { grid-column:auto; min-height:88px; display:grid; grid-template-columns:34px minmax(0,1fr); grid-template-rows:auto auto; column-gap:12px; align-items:start; padding:13px; border:1px solid var(--ui-line) !important; border-radius:var(--ui-radius-sm) !important; }
  .entry-card svg,.entry-card.linkedin-card svg { grid-column:1; grid-row:1 / 3; width:24px; height:24px; margin:0; }
  .entry-card strong { grid-column:2; margin:0 0 2px; font-size:15px; line-height:1.2; }
  .entry-card span { grid-column:2; display:block; overflow:visible; max-width:none; font-size:11px; line-height:1.4; }
  .entry-card.linkedin-card { grid-template-rows:auto auto auto; }
  .entry-card.linkedin-card svg { grid-row:1 / 4; }
  .premium-tag { grid-column:2; width:max-content; margin:0 0 3px; padding:3px 6px; font-size:7px; }
  .demo-entry-card { min-height:132px; grid-template-columns:86px minmax(0,1fr); grid-template-rows:auto auto; align-items:center; }
  .demo-entry-card .demo-entry-score { grid-column:1; grid-row:1 / 3; display:flex; flex-direction:column; align-items:flex-start; gap:1px; margin:0; overflow:visible; }
  .demo-entry-card .demo-entry-score b { font-size:48px; line-height:.86; }
  .demo-entry-card .demo-entry-score small { font-size:10px; }
  .demo-entry-card strong { grid-column:2; max-width:14ch; margin:0 0 5px; font-size:17px; }
  .demo-entry-card > span:last-child { grid-column:2; display:block; overflow:visible; font-size:11px; line-height:1.4; }
  .welcome-community { margin-top:12px; }
  .review-preview { grid-template-columns:1fr; padding:17px; }
  .welcome-community { display:grid; grid-template-columns:1fr 1fr; }
  .welcome-community a,.welcome-community button { justify-content:center; text-align:center; }
  .auth-form-wrap { align-items:flex-start; }
  .auth-grid { grid-template-columns:1fr; }
  .auth-form h1 { font-size:34px; }
  .auth-form .eyebrow { margin-top:2px; }
  .auth-loader-card { padding:26px; }
  .drawer-community { padding-bottom:calc(12px + env(safe-area-inset-bottom)); }
  .bug-fab { display:none !important; }
  .photo-actions { min-width:0; }
  .photo-row:not(.has-photo) .photo-actions { display:grid; grid-template-columns:max-content minmax(0,1fr); }
  .photo-row:not(.has-photo) .file-name { max-width:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .photo-row.has-photo .file-name { flex:0 0 100%; display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .custom-select-menu { top:calc(100% + 5px); }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition-duration:.01ms !important; }
}

/* Native select affordance. The icon lives outside the select so browsers cannot tile it. */
.native-select-shell {
  position:relative;
  display:block;
  width:100%;
  min-width:0;
}
.native-select-shell::after {
  content:'';
  position:absolute;
  top:50%;
  right:16px;
  width:8px;
  height:8px;
  border-right:2px solid var(--ui-muted);
  border-bottom:2px solid var(--ui-muted);
  transform:translateY(-68%) rotate(45deg);
  pointer-events:none;
}
.native-select-shell:focus-within::after { border-color:var(--ui-accent); }
.native-select-shell select:not(.select-source) {
  width:100%;
  appearance:none;
  -webkit-appearance:none;
  padding-right:42px !important;
  background-color:var(--ui-surface) !important;
  background-image:none !important;
}
:root[data-theme="dark"] .native-select-shell select:not(.select-source) {
  background-color:var(--ui-surface-raised) !important;
}

@media(max-width:680px) {
  .issue-guidance > div,.dialog-guidance > div { grid-template-columns:1fr; gap:2px; }
  .role-skill-head { display:grid; }
  .role-skill-head .btn { width:100%; }
  .role-skill-list { grid-template-columns:1fr 1fr; }
}

@media(max-width:430px) {
  .role-skill-list { grid-template-columns:1fr; }
}

@media print {
  .app-header,.editor,.preview-toolbar,.mobile-nav,.mobile-drawer-shell,.bug-fab,.auth-loader { display:none !important; }
  .workspace { display:block; }
  .preview-area { display:block !important; padding:0 !important; background:transparent !important; }
  .resume { box-shadow:none; }
}
