/* ============================================================
   ATSApply.com – Main Stylesheet
   Design system: Modern Professional SaaS
   Primary: #2563EB | Secondary: #7C3AED | BG: #F8FAFC
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary:       #2563EB;
  --primary-dark:  #1D4ED8;
  --primary-light: #DBEAFE;
  --secondary:     #7C3AED;
  --secondary-light: #EDE9FE;
  --success:       #10B981;
  --success-light: #D1FAE5;
  --warning:       #F59E0B;
  --warning-light: #FEF3C7;
  --danger:        #EF4444;
  --danger-light:  #FEE2E2;
  --bg:            #F8FAFC;
  --bg-alt:        #F1F5F9;
  --card:          #FFFFFF;
  --border:        #E2E8F0;
  --border-focus:  #93C5FD;
  --text:          #0F172A;
  --text-muted:    #64748B;
  --text-light:    #94A3B8;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.12);
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --transition:    all .2s ease;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

/* ---------- Typography ---------- */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--primary)    !important; }
.text-success { color: var(--success)    !important; }
.text-warning { color: var(--warning)    !important; }
.text-danger  { color: var(--danger)     !important; }

/* ---------- Navbar ---------- */
.app-navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text) !important;
}

.navbar-brand .brand-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
}

.navbar-brand span.accent { color: var(--primary); }

.autosave-indicator {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.autosave-indicator .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-light);
  transition: var(--transition);
}

.autosave-indicator.saving .dot { background: var(--warning); animation: pulse 1s infinite; }
.autosave-indicator.saved  .dot { background: var(--success); }

/* Navbar resume name (centered, builder only) */
.navbar-resume-name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  cursor: text;
  outline: none;
  border-bottom: 1.5px dashed transparent;
  padding-bottom: 1px;
  transition: border-color .2s;
  pointer-events: auto;
}
.navbar-resume-name:hover  { border-bottom-color: var(--border); }
.navbar-resume-name:focus  { border-bottom-color: var(--primary); }

/* ---------- Sidebar / Back Nav ---------- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  padding: .35rem .75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}

.back-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--border-focus);
}

/* ---------- Dashboard ---------- */
#page-dashboard { padding: 2rem 0 4rem; }

.dashboard-header {
  margin-bottom: 2rem;
}

.dashboard-header h1 { margin-bottom: .35rem; }

.resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* New Resume card */
.resume-card-new {
  background: var(--card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 220px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.resume-card-new:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.resume-card-new .icon-wrap {
  width: 56px; height: 56px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition);
}

.resume-card-new:hover .icon-wrap { background: var(--primary); color: #fff; }

/* Existing resume card */
.resume-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.resume-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.resume-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.resume-card-title { font-size: 1rem; font-weight: 700; margin-bottom: .15rem; }
.resume-card-subtitle { font-size: .82rem; color: var(--text-muted); }
.resume-card-date { font-size: .75rem; color: var(--text-light); margin-top: .5rem; }

.ats-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 99px;
}

.ats-badge.excellent { background: var(--success-light); color: var(--success); }
.ats-badge.good      { background: var(--primary-light); color: var(--primary); }
.ats-badge.fair      { background: var(--warning-light); color: #92400E; }
.ats-badge.poor      { background: var(--danger-light);  color: var(--danger); }

.card-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }

.card-actions .btn { flex: 1; min-width: 0; font-size: .78rem; padding: .35rem .5rem; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-state .empty-illustration {
  width: 120px; height: 120px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 3rem;
  color: var(--primary);
}

/* ---------- Builder Layout ---------- */
#page-builder { height: calc(100vh - 57px); display: flex; flex-direction: column; }

/* Builder topbar hidden — reserved for ad placement */
.builder-topbar { display: none !important; }

.builder-body {
  flex: 1;
  overflow: hidden;
  display: flex;
}

/* Form Panel */
.form-panel {
  width: 42%;
  min-width: 320px;
  overflow-y: auto;
  background: linear-gradient(180deg, #F5F8FF 0%, var(--bg) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.form-panel-inner { padding: .9rem 1rem 1rem; flex: 1; }

/* Section Accordion */
.section-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: .55rem;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.section-card:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37,99,235,.07), 0 1px 4px rgba(0,0,0,.04);
}

.section-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem .9rem;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(115deg, var(--card) 0%, var(--bg) 100%);
  transition: var(--transition);
}

.section-header:hover {
  background: linear-gradient(115deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.section-card.open > .section-header {
  background: linear-gradient(115deg, #EFF6FF 0%, #F0F7FF 60%, var(--bg) 100%);
  border-bottom: 1.5px solid #DBEAFE;
}

.section-header-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  background: linear-gradient(135deg, #DBEAFE 0%, #EDE9FE 100%);
  color: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(37,99,235,.18);
}

.section-header h6 { margin: 0; font-size: .82rem; font-weight: 700; flex: 1; letter-spacing: .01em; }

.section-toggle-icon { color: var(--text-light); transition: transform .25s ease; font-size: .7rem; }
.section-card.open .section-toggle-icon { transform: rotate(180deg); }

.section-body { padding: .85rem .9rem .75rem; border-top: none; display: none; }
.section-card.open .section-body { display: block; }

/* Form Controls */
.form-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: .22rem;
  text-transform: uppercase;
  letter-spacing: .45px;
}

.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text);
  background: #FAFBFD;
  transition: var(--transition);
  padding: .48rem .75rem;
  line-height: 1.5;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
  outline: none;
  background: #fff;
}

.form-control::placeholder { color: var(--text-light); font-size: 12px; }

textarea.form-control { resize: vertical; min-height: 72px; }

.char-count { font-size: .72rem; color: var(--text-light); text-align: right; margin-top: .2rem; }
.char-count.warn { color: var(--warning); }
.char-count.over { color: var(--danger); }

/* Personal Info — compact inline bottom-line rows */
.personal-fields { padding: .4rem .9rem .6rem; flex-direction: column; gap: 0; }
.section-card.open .personal-fields { display: flex; }

.pf-row {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  border-bottom: 1px solid var(--border);
  padding: .22rem 0;
  transition: border-color .2s;
}

.pf-row:last-child { border-bottom: none; }
.pf-row:focus-within { border-bottom-color: var(--primary); }

.pf-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-light);
  white-space: nowrap;
  width: 150px;
  flex-shrink: 0;
  padding-bottom: 1px;
}

.pf-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  padding: .18rem 0;
  line-height: 1.4;
  min-width: 0;
}

.pf-input::placeholder { color: var(--text-light); font-size: 12px; }

/* Skills tag input */
.skills-container {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .4rem .5rem;
  min-height: 42px;
  cursor: text;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
  background: #FAFBFD;
  transition: var(--transition);
}

.skills-container:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); background: #fff; }

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 99px;
  padding: .15rem .6rem;
  font-size: .78rem;
  font-weight: 600;
  cursor: default;
  transition: var(--transition);
}

.skill-tag:hover { background: var(--primary); color: #fff; }

.skill-tag .remove {
  cursor: pointer;
  opacity: .7;
  font-size: .65rem;
  line-height: 1;
}

.skill-tag .remove:hover { opacity: 1; }

.skills-input {
  border: none;
  outline: none;
  font-size: 12px;
  color: var(--text);
  background: transparent;
  min-width: 100px;
  flex: 1;
  padding: .15rem .25rem;
}

.skill-suggestions {
  position: absolute;
  z-index: 100;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 160px;
  overflow-y: auto;
  min-width: 180px;
}

.skill-suggestion-item {
  padding: .45rem .75rem;
  font-size: .82rem;
  cursor: pointer;
  transition: var(--transition);
}

.skill-suggestion-item:hover { background: var(--primary-light); color: var(--primary); }

/* Entry Cards (Experience, Education, etc.) */
.entry-list { display: flex; flex-direction: column; gap: .45rem; }

.entry-item {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.entry-item:hover {
  border-color: var(--border-focus);
  box-shadow: 0 2px 10px rgba(37,99,235,.09);
}

.entry-item-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  cursor: pointer;
  background: linear-gradient(115deg, var(--bg) 0%, var(--card) 100%);
  transition: var(--transition);
}

.entry-item.open .entry-item-header {
  background: linear-gradient(115deg, #EFF6FF 0%, #F8FBFF 100%);
  border-bottom: 1.5px solid #DBEAFE;
}

.entry-item-title { font-size: .81rem; font-weight: 700; flex: 1; }
.entry-item-subtitle { font-size: .73rem; color: var(--text-muted); }

.entry-actions { display: flex; gap: .2rem; margin-left: auto; }

.btn-icon {
  width: 24px; height: 24px;
  border: none;
  background: transparent;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
  padding: 0;
}

.btn-icon:hover { background: var(--bg-alt); color: var(--text); }
.btn-icon.danger:hover { background: var(--danger-light); color: var(--danger); }

.entry-item-body { padding: 0 .9rem .6rem; border-top: none; display: none; background: var(--card); }
.entry-item.open .entry-item-body { display: block; }

/* ── Entry Form rows — same visual language as personal fields ── */
/* display is NOT set here — inherits block from .entry-item.open .entry-item-body
   to avoid overriding the display:none collapse rule (same specificity issue) */
.ef-body { flex-direction: column; }
.entry-item.open .ef-body { display: flex; }

.ef-row {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  border-bottom: 1px solid var(--border);
  padding: .24rem 0;
  transition: border-color .2s;
}
.ef-row:last-child  { border-bottom: none; }
.ef-row:focus-within { border-bottom-color: var(--primary); }

.ef-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-light);
  white-space: nowrap;
  width: 88px;
  flex-shrink: 0;
  padding-bottom: 1px;
}

.ef-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  padding: .18rem 0;
  line-height: 1.4;
  min-width: 0;
  font-family: inherit;
}
.ef-input::placeholder { color: var(--text-light); font-size: 12px; }

/* Date / number inputs keep native picker but lose the box */
.ef-input[type="month"],
.ef-input[type="number"] {
  -webkit-appearance: none;
  appearance: none;
  color-scheme: light;
}

/* Pair row — two labelled inputs side by side (start / end, year / cgpa) */
.ef-pair {
  display: flex;
  flex: 1;
  gap: .5rem;
  min-width: 0;
}
.ef-pair-item {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  flex: 1;
  min-width: 0;
}
.ef-pair-label {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .35px;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Area rows — stacked label + textarea / bullet list */
.ef-row-area {
  flex-direction: column;
  align-items: stretch;
  padding: .35rem 0 .5rem;
  gap: .3rem;
}
.ef-row-area .ef-label { width: auto; }

.ef-textarea {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
  resize: none;
  min-height: 54px;
  font-family: inherit;
  padding: 0;
  width: 100%;
}
.ef-textarea::placeholder { color: var(--text-light); font-size: 12px; }

/* Checkbox row inside ef-body */
.ef-check-row {
  display: flex;
  align-items: center;
  padding: .3rem 0 .15rem;
  gap: .45rem;
  border-bottom: none;
}
.ef-check-row .form-check-label { font-size: .76rem; color: var(--text-muted); margin: 0; }

/* Bullet list for responsibilities */
/* Responsibilities bullet list — full width, no left indentation */
.ef-row-area .bullet-list { margin: 0; }

.bullet-list { list-style: none; display: flex; flex-direction: column; gap: .25rem; }

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
}

.bullet-item::before {
  content: '•';
  color: var(--primary);
  font-size: .85rem;
  line-height: 2;
  flex-shrink: 0;
}

/* Wrapper holds textarea + warning message stacked */
.bullet-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bullet-input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--border);
  outline: none;
  font-size: 12px;
  color: var(--text);
  background: transparent;
  padding: .22rem 0;
  line-height: 1.4;
  transition: border-color .2s;
  font-family: inherit;
}

.bullet-input:focus { border-color: var(--primary); }

/* Tiny inline warning below each bullet */
.bullet-warn { display: flex; flex-direction: column; gap: .1rem; min-height: 0; }

.bwarn {
  font-size: .66rem;
  color: var(--warning);
  line-height: 1.3;
  padding: .1rem 0 .05rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}

.bwarn::before {
  content: '⚠';
  font-size: .6rem;
  flex-shrink: 0;
}

/* Tighter field spacing inside form bodies */
.section-body .mb-3,
.entry-item-body .mb-3 { margin-bottom: .6rem !important; }

.section-body .mb-2,
.entry-item-body .mb-2 { margin-bottom: .4rem !important; }

/* Preview Panel */
.preview-panel {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
}

.preview-toolbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: .4rem .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: .5rem;
}

.preview-toolbar .zoom-controls { display: flex; align-items: center; gap: .35rem; }

.preview-toolbar .zoom-val { font-size: .8rem; font-weight: 600; width: 42px; text-align: center; }

.preview-tabs { display: flex; gap: .1rem; }

.preview-tab {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .7rem;
  border: none;
  background: transparent;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;   /* anchor for the badge */
}
.preview-tab:hover  { background: var(--bg-alt); color: var(--text); }
.preview-tab.active { background: var(--primary-light); color: var(--primary); }

/* ── ATS score badge (like a cart count chip) ────────────── */
.ats-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .3px;
  background: var(--danger);
  color: #fff;
  margin-left: .15rem;
  transition: background .4s ease, transform .2s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}

/* Colour states driven by JS data-grade attribute */
.ats-score-badge[data-grade="good"]      { background: #F59E0B; }  /* yellow  50-69 */
.ats-score-badge[data-grade="great"]     { background: #10B981; }  /* green   70-84 */
.ats-score-badge[data-grade="excellent"] { background: #059669; }  /* deep green 85+ */

/* Pulse animation when score first loads / updates */
@keyframes badge-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.ats-score-badge.pop { animation: badge-pop .35s ease; }

.preview-actions-bar { display: grid; grid-template-columns: 3fr 4fr 3fr; align-items: center; overflow: hidden; }

.toolbar-col { display: flex; align-items: center; }
.toolbar-col-left  { justify-content: flex-start; }
.toolbar-col-center { justify-content: center; }
.toolbar-col-right { justify-content: flex-end; gap: .4rem; }

.color-theme-dots { display: flex; align-items: center; gap: .3rem; }

.theme-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
  outline: none;
  padding: 0;
}

.theme-dot:hover  { transform: scale(1.2); }
.theme-dot.active { border-color: var(--text); box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; }

.preview-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.preview-scroll .proj-entry { margin-bottom: 10px; }

/* A4 Canvas — flex column of page divs */
.resume-canvas {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 794px;
  transform-origin: top center;
  transition: transform .2s ease;
  flex-shrink: 0;
}

.resume-page {
  background: #fff;
  width: 794px;
  min-height: 1123px;
  box-shadow: var(--shadow-lg);
  border-radius: 2px;
  flex-shrink: 0;
  overflow: hidden;
}

/* ---------- ATS Score Panel ---------- */
.ats-panel {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  display: none;
}

.ats-panel.visible { display: block; }

.ats-role-row {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .9rem;
}

.ats-role-label {
  font-size: .78rem; font-weight: 600;
  color: var(--text-muted); white-space: nowrap;
}

.score-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.score-ring {
  position: relative;
  width: 120px; height: 120px;
}

.score-ring svg { transform: rotate(-90deg); }

.score-ring .score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
}

.score-ring .score-label { font-size: .65rem; color: var(--text-muted); font-weight: 600; }

.ats-criteria { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }

.ats-criterion {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .82rem;
}

.criterion-label { flex: 1; font-weight: 500; }

.criterion-bar {
  width: 80px;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.criterion-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .5s ease;
}

.criterion-score { font-weight: 700; font-size: .75rem; width: 28px; text-align: right; }

.ats-suggestions { display: flex; flex-direction: column; gap: .4rem; }

.ats-suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .5rem .7rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  line-height: 1.4;
}

.ats-suggestion-item.warn { background: var(--warning-light); color: #92400E; }
.ats-suggestion-item.error { background: var(--danger-light); color: var(--danger); }
.ats-suggestion-item.tip  { background: var(--success-light); color: #065F46; }

/* Keyword chip row */
.keyword-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }

.keyword-chip {
  background: var(--secondary-light);
  color: var(--secondary);
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .55rem;
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
}

.keyword-chip:hover { background: var(--secondary); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  padding: .5rem 1rem;
  transition: var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid transparent;
  line-height: 1.4;
}

.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.btn-secondary:hover:not(:disabled) { background: #6D28D9; border-color: #6D28D9; color: #fff; }

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover:not(:disabled) { background: var(--primary-light); }

.btn-outline-secondary {
  background: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-outline-secondary:hover:not(:disabled) { background: var(--secondary-light); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) { background: var(--bg-alt); color: var(--text); }

.btn-ai {
  background: linear-gradient(135deg, #7C3AED, #2563EB);
  color: #fff;
  border-color: transparent;
}
.btn-ai:hover:not(:disabled) {
  background: linear-gradient(135deg, #6D28D9, #1D4ED8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) { background: #DC2626; color: #fff; }

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-outline-danger:hover:not(:disabled) { background: var(--danger-light); }

.btn-sm { font-size: .78rem; padding: .3rem .65rem; }
.btn-lg { font-size: 1rem; padding: .65rem 1.4rem; }
.btn-xs { font-size: .72rem; padding: .2rem .5rem; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: #059669; color: #fff; }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.97);
  transition: transform .2s ease;
}

.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-header h5 { margin: 0; font-size: 1.05rem; }
.modal-close { background: none; border: none; font-size: 1.1rem; color: var(--text-muted); cursor: pointer; padding: .2rem; border-radius: 4px; }
.modal-close:hover { color: var(--text); background: var(--bg-alt); }
.modal-footer { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ---------- Toast ---------- */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 340px;
  pointer-events: none;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .85rem;
  pointer-events: all;
  transform: translateX(120%);
  transition: transform .3s ease, opacity .3s ease;
  opacity: 0;
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { transform: translateX(120%); opacity: 0; }

.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.35; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: .8rem; padding: 0; }

.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info    .toast-icon { color: var(--primary); }

/* ---------- Progress / Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-alt) 50%, var(--border) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.spinner-wrap { display: flex; align-items: center; justify-content: center; gap: .65rem; }

/* ---------- Templates (resume rendering) ---------- */

/* ---- Template: Classic ATS ---- */
.tpl-classic {
  font-family: 'Arial', sans-serif;
  font-size: 11pt;
  color: #1a1a1a;
  padding: 36px 48px;
  line-height: 1.45;
}

.tpl-classic .res-name {
  font-size: 22pt;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: .3px;
}

.tpl-classic .res-title {
  font-size: 11.5pt;
  color: #374151;
  margin-bottom: 6px;
}

.res-contact {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  column-gap: 6px;
  row-gap: 4px;
}
.rc-item {
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rc-pipe {
  color: #9CA3AF;
  text-align: center;
  padding: 0 2px;
}

.tpl-classic .res-contact {
  font-size: 9.5pt;
  color: #4B5563;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #1a1a1a;
}
.tpl-classic .rc-pipe { color: #9CA3AF; }

.tpl-classic .sec-title {
  font-size: 11pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin: 14px 0 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid #9CA3AF;
  color: #111827;
}

.tpl-classic .exp-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1px; }
.tpl-classic .exp-company { font-weight: 700; font-size: 10.5pt; }
.tpl-classic .exp-dates   { font-size: 9.5pt; color: #6B7280; white-space: nowrap; }
.tpl-classic .exp-role    { font-size: 10pt; color: #374151; font-style: italic; }
.tpl-classic .exp-bullets { margin: 3px 0 0 12px; }
.tpl-classic .exp-bullets li { font-size: 10pt; margin-bottom: 2px; }

.tpl-classic .edu-entry  { margin-bottom: 6px; }
.tpl-classic .edu-header { display: flex; justify-content: space-between; align-items: baseline; }
.tpl-classic .edu-school { font-weight: 700; font-size: 10.5pt; }
.tpl-classic .edu-years  { font-size: 9.5pt; color: #6B7280; }
.tpl-classic .edu-degree { font-size: 10pt; color: #374151; }

.tpl-classic .skills-text { font-size: 10pt; line-height: 1.6; }

.tpl-classic .proj-name   { font-weight: 700; font-size: 10.5pt; }
.tpl-classic .proj-tech   { font-size: 9.5pt; color: #6B7280; font-style: italic; }
.tpl-classic .proj-desc   { font-size: 10pt; }

.tpl-classic .cert-entry  { margin-bottom: 4px; font-size: 10pt; }
.tpl-classic .cert-name   { font-weight: 700; }
.tpl-classic .cert-org    { color: #6B7280; }

.tpl-classic .achiev-list { list-style: disc; padding-left: 16px; font-size: 10pt; }
.tpl-classic .achiev-list li { margin-bottom: 2px; }

.tpl-classic .lang-list { font-size: 10pt; }

/* ---- Template: Professional ATS ---- */
.tpl-professional {
  font-family: 'Georgia', serif;
  font-size: 11pt;
  color: #111827;
  padding: 40px 52px;
  line-height: 1.5;
}

.tpl-professional .res-name {
  font-size: 24pt;
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 2px;
  letter-spacing: .5px;
}

.tpl-professional .res-title {
  font-size: 12pt;
  color: #4B5563;
  margin-bottom: 8px;
  letter-spacing: .2px;
}

.tpl-professional .res-contact {
  font-size: 9.5pt;
  color: #6B7280;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2.5px solid #1E3A5F;
}
.tpl-professional .rc-pipe { color: #CBD5E1; }

.tpl-professional .sec-title {
  font-size: 10.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 16px 0 5px;
  color: #1E3A5F;
  padding-bottom: 3px;
  border-bottom: 1px solid #CBD5E1;
}

.tpl-professional .exp-header { display: flex; justify-content: space-between; align-items: baseline; }
.tpl-professional .exp-company { font-weight: 700; font-size: 10.5pt; color: #1E3A5F; }
.tpl-professional .exp-dates   { font-size: 9.5pt; color: #9CA3AF; }
.tpl-professional .exp-role    { font-size: 10pt; color: #374151; }
.tpl-professional .exp-bullets { margin: 3px 0 0 14px; }
.tpl-professional .exp-bullets li { font-size: 10pt; margin-bottom: 2px; }

.tpl-professional .edu-header { display: flex; justify-content: space-between; align-items: baseline; }
.tpl-professional .edu-school { font-weight: 700; font-size: 10.5pt; color: #1E3A5F; }
.tpl-professional .edu-years  { font-size: 9.5pt; color: #9CA3AF; }
.tpl-professional .edu-degree { font-size: 10pt; color: #374151; }

.tpl-professional .skills-text { font-size: 10pt; }
.tpl-professional .proj-name  { font-weight: 700; color: #1E3A5F; font-size: 10.5pt; }
.tpl-professional .proj-tech  { font-size: 9.5pt; color: #9CA3AF; font-style: italic; }

/* ---- Template: Minimal ATS ---- */
.tpl-minimal {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 10pt;
  color: #1a1a1a;
  padding: 30px 42px;
  line-height: 1.4;
}

.tpl-minimal .res-name {
  font-size: 18pt;
  font-weight: 700;
  margin-bottom: 1px;
  letter-spacing: .2px;
}

.tpl-minimal .res-title { font-size: 10.5pt; color: #555; margin-bottom: 5px; }

.tpl-minimal .res-contact {
  font-size: 9pt;
  color: #666;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #ccc;
}
.tpl-minimal .rc-pipe { color: #bbb; }

.tpl-minimal .sec-title {
  font-size: 9.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 11px 0 3px;
  color: #333;
}

.tpl-minimal .exp-header { display: flex; justify-content: space-between; align-items: baseline; }
.tpl-minimal .exp-company { font-weight: 700; font-size: 10pt; }
.tpl-minimal .exp-dates   { font-size: 9pt; color: #999; }
.tpl-minimal .exp-role    { font-size: 9.5pt; color: #555; }
.tpl-minimal .exp-bullets { margin: 2px 0 0 12px; }
.tpl-minimal .exp-bullets li { font-size: 9.5pt; margin-bottom: 1.5px; }

.tpl-minimal .edu-header { display: flex; justify-content: space-between; align-items: baseline; }
.tpl-minimal .edu-school { font-weight: 700; font-size: 10pt; }
.tpl-minimal .edu-years  { font-size: 9pt; color: #999; }
.tpl-minimal .edu-degree { font-size: 9.5pt; color: #555; }

.tpl-minimal .skills-text { font-size: 9.5pt; }
.tpl-minimal .proj-name  { font-weight: 700; font-size: 10pt; }
.tpl-minimal .proj-tech  { font-size: 9pt; color: #999; font-style: italic; }

/* ---------- Template Picker ---------- */
.template-selector { display: flex; gap: .4rem; flex-wrap: wrap; }

.tpl-thumb {
  display: flex;
  align-items: center;
  gap: .35rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: .28rem .65rem;
  cursor: pointer;
  transition: var(--transition);
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}

.tpl-thumb:hover { border-color: var(--primary); color: var(--primary); }
.tpl-thumb.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 700; }

.tpl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Keyboard shortcut badge ---------- */
.kbd {
  display: inline-flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: .1rem .35rem;
  font-size: .72rem;
  font-family: monospace;
  color: var(--text-muted);
}

/* ---------- Animations ---------- */
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn .3s ease forwards; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .form-panel { width: 46%; min-width: 280px; }
}

@media (max-width: 768px) {
  #page-builder { height: auto; }

  .builder-body { flex-direction: column; overflow: visible; }

  .form-panel {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-y: visible;
  }

  .preview-panel { min-height: 400px; }

  .resume-canvas { width: 340px; }
  .resume-page { width: 340px; }

}

@media (max-width: 480px) {
  .resume-grid { grid-template-columns: 1fr; }
}

/* ---------- Sample Resumes Section ---------- */
.sample-section-header {
  margin-bottom: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.sample-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.sample-section-sub {
  color: var(--text-muted);
  font-size: .875rem;
  margin: 0;
  max-width: 560px;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.sample-role-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  position: relative;
  overflow: hidden;
}

.sample-role-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity .15s ease;
}

.sample-role-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.sample-role-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sample-role-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.sample-role-card:hover .sample-role-icon {
  transform: scale(1.1);
}

.sample-role-name {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.sample-role-cta {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: var(--transition);
}

.sample-role-card:hover .sample-role-cta {
  color: var(--primary);
}

@media (max-width: 480px) {
  .sample-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Print Styles ---------- */
@page { margin-top: 15mm; margin-bottom: 15mm; }

@media print {
  .app-navbar,
  .builder-topbar,
  .preview-toolbar,
  .form-panel,
  .ats-panel,
  #toast-container { display: none !important; }

  .preview-panel { overflow: visible; background: none; padding: 0; }

  .preview-scroll { padding: 0; }

  .resume-canvas {
    transform: none !important;
    gap: 0;
  }

  .resume-page {
    box-shadow: none;
    width: 100% !important;
    min-height: 0;
  }

  /* Strip template vertical padding — @page margin owns top/bottom on every page */
  .tpl-classic, .tpl-professional, .tpl-minimal {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .resume-page:not(:last-child) {
    page-break-after: always;
    break-after: page;
  }

  body { background: #fff; }
}

/* ============================================================
   JOB INPUT MODAL  (AI Optimisation flow)
   ============================================================ */
.ji-modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
}

/* Header */
.ji-header {
  background: linear-gradient(135deg, #4F1DEB, #1E40AF);
  border-bottom: none;
  padding: 1.25rem 1.5rem;
}
.ji-header-inner { flex: 1; }
.ji-eyebrow {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  margin-bottom: .2rem;
}
.ji-header .modal-title { color: #fff; font-weight: 800; font-size: 1.1rem; margin: 0; }

/* Steps indicator */
.ji-steps {
  display: flex;
  align-items: center;
  padding: .85rem 1.5rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.ji-step {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.ji-step span {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ji-step.active        { color: var(--primary); }
.ji-step.active span   { background: var(--primary); color: #fff; }
.ji-step.done span     { background: var(--success); color: #fff; }
.ji-step-line          { flex: 1; height: 2px; background: var(--border); margin: 0 .5rem; min-width: 16px; }

/* Body */
.ji-body { padding: 1.5rem; }
.ji-pane { animation: ji-fade .2s ease; }
@keyframes ji-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ji-hint { font-size: .875rem; color: var(--text-muted); margin-bottom: .75rem; }

.ji-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .75rem;
  font-size: .85rem;
  resize: vertical;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s;
}
.ji-textarea:focus { outline: none; border-color: var(--primary); }

.ji-error {
  margin-top: .5rem;
  font-size: .82rem;
  color: var(--danger);
  padding: .5rem .75rem;
  background: var(--danger-light);
  border-radius: 8px;
}

.ji-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.25rem;
}
.ji-actions-result { justify-content: space-between; }

/* JobSpec summary grid */
.ji-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-bottom: 1.25rem;
}
.ji-spec-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .9rem;
}
.ji-spec-wide { grid-column: 1 / -1; }
.ji-spec-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin-bottom: .25rem; }
.ji-spec-val   { font-size: .9rem; font-weight: 600; color: var(--text); }

.ji-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.ji-chip  {
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
}
.ji-chip-req  { background: var(--primary-light); color: var(--primary); }
.ji-chip-pref { background: var(--secondary-light); color: var(--secondary); }

/* Score row */
.ji-score-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.ji-score-card { flex: 1; text-align: center; }
.ji-score-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); margin-bottom: .15rem; }
.ji-score-num   { font-size: 2.2rem; font-weight: 900; color: var(--primary); line-height: 1; }
.ji-score-sub   { font-size: .7rem; color: var(--text-muted); margin-top: .1rem; }
.ji-score-after-empty .ji-score-num { color: var(--text-muted); }
.ji-score-after .ji-score-num { color: var(--success); }

.ji-score-arrow {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  color: var(--text-muted); font-size: 1.1rem;
}
.ji-score-arrow-green { color: var(--success); }
.ji-delta { font-size: .8rem; font-weight: 800; }

/* Result step */
.ji-result-hero { text-align: center; padding: .5rem 0 1.25rem; }
.ji-result-icon { font-size: 2.5rem; color: var(--success); display: block; margin-bottom: .5rem; }
.ji-result-title { font-weight: 800; font-size: 1.05rem; color: var(--text); margin: 0 0 .35rem; }
.ji-result-sub   { font-size: .875rem; color: var(--text-muted); margin: 0; }
