/* ── tokens ──────────────────────────────────────────────────────────────── */
:root {
  /* Colors - Dark Slate/Indigo Palette */
  --bg: #0f172a;
  --surface: rgba(30, 41, 59, 0.85); /* For glassmorphism */
  --surface-solid: #1e293b;
  --surface-alt: #334155;
  --border: #334155;
  --border-focus: #6366f1;
  --text: #f8fafc;
  --text-mid: #cbd5e1;
  --text-muted: #94a3b8;
  
  --primary: #818cf8;
  --primary-light: rgba(99, 102, 241, 0.15);
  --primary-border: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);

  /* Status Colors (Adjusted for dark mode) */
  --s1: #fb7185; --s1-bg: rgba(225, 29, 72, 0.15); --s1-border: #e11d48;
  --s2: #fbbf24; --s2-bg: rgba(245, 158, 11, 0.15); --s2-border: #f59e0b;
  --s3: #fb923c; --s3-bg: rgba(217, 119, 6, 0.15); --s3-border: #d97706;
  --s4: #34d399; --s4-bg: rgba(16, 185, 129, 0.15); --s4-border: #10b981;
  --s5: #10b981; --s5-bg: rgba(5, 150, 105, 0.15); --s5-border: #059669;

  --veto-bg: rgba(225, 29, 72, 0.1); --veto-border: #e11d48;
  --correct-bg: rgba(16, 185, 129, 0.1); --correct-border: #10b981;
  --fail-bg: rgba(225, 29, 72, 0.1); --fail-border: #e11d48;

  /* Geometry */
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 50px;

  /* Elevation */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);

  --header-h: 72px;
  --nav-h: 56px;
}

/* Login Overlay Styling */
.login-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at top left, #1e293b, #0f172a);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.login-box {
  background: var(--surface-solid);
  padding: 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 440px;
  width: 90%;
  border: 1px solid var(--border);
}

.login-box h2 { 
  margin-top: 0; 
  color: var(--text); 
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.login-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.login-box input {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--surface-alt);
}
.login-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface-solid);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.login-box button {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.login-box button:hover { 
  background: #6366f1; 
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

/* ── reset / base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { 
  font-size: 18px; 
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .app-title, .card-title {
  font-family: 'Outfit', sans-serif;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #4338ca; }

h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: .6rem; }
h4 { font-size: .875rem; font-weight: 600; color: var(--text-mid); margin-bottom: .4rem; }
p  { color: var(--text-mid); }
details summary { cursor: pointer; user-select: none; }
details summary::-webkit-details-marker { display: none; }

/* ── header ──────────────────────────────────────────────────────────────── */
.app-header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--header-h);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.app-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #fff;
  font-size: 1rem; font-weight: 700; letter-spacing: .05em;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.app-title { font-size: 1.1rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.session-info { font-size: .82rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

.header-right { display: flex; align-items: center; gap: 1rem; }
.dataset-select {
  padding: .5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-alt); font-size: .875rem; color: var(--text);
  cursor: pointer; max-width: 320px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.dataset-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.save-status { font-size: .82rem; color: var(--primary); font-weight: 600; min-width: 80px; text-align: right; }

/* ── tab nav ─────────────────────────────────────────────────────────────── */
/* ── overall progress ────────────────────────────────────────────────────── */
.overall-progress-container {
  height: 18px;
  background: var(--bg);
  width: 100%;
  position: sticky;
  top: var(--header-h);
  z-index: 1100;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.overall-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7c3aed, var(--primary));
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
  box-shadow: 2px 0 10px rgba(79, 70, 229, 0.4);
  animation: shine 4s infinite linear;
}

.overall-progress-text {
  position: relative;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.tab-nav {
  position: sticky; top: var(--header-h); z-index: 900;
  height: var(--nav-h);
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: flex-end; gap: .5rem;
}
.tab-btn {
  padding: .5rem 1rem; border: none; background: transparent;
  font-size: .95rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -1px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Outfit', sans-serif;
}
.tab-btn:hover { color: var(--text); background: var(--surface-alt); }
.tab-btn.active { 
  color: var(--primary); 
  border-bottom-color: var(--primary); 
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.05);
}

/* ── content ─────────────────────────────────────────────────────────────── */
.content {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* loading */
.loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 6rem; color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  animation: fadeIn 0.4s easeOut;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--primary-light); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 15px var(--primary-glow);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.empty-state { 
  padding: 5rem; text-align: center; color: var(--text-muted); 
  background: var(--surface-solid); border: 1px dashed var(--border); 
  border-radius: var(--radius-lg); margin: 2rem 0;
  font-family: 'Outfit', sans-serif;
}

/* ── two-column layout ───────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.25rem;
  align-items: start;
}
.col-source, .col-scores { display: flex; flex-direction: column; gap: 1rem; }

.resume-tab, .jd-tab { width: 100%; min-height: 0; }

.tab-main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  min-height: 0;
}

.tab-side-scores {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-right: 0.5rem;
}

.tab-side-scores .rubric-panel {
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .tab-main-layout { grid-template-columns: 1fr; }
  .tab-side-scores { overflow-y: visible; padding-right: 0; }
}

/* ── card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card:last-child { margin-bottom: 0; }

.card-title {
  font-size: .875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .075em; color: var(--text-muted);
  margin-bottom: 1.25rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Outfit', sans-serif;
}

/* ── source textarea ─────────────────────────────────────────────────────── */
.source-text {
  width: 100%; height: 400px; resize: vertical;
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); font-size: .875rem;
  color: var(--text-mid); font-family: 'Inter', monospace; line-height: 1.6;
  box-shadow: var(--shadow-inner);
}
.source-text:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

/* ── parsed box (HTML content from API) ──────────────────────────────────── */
.parsed-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-size: .83rem;
  max-height: 420px;
  overflow-y: auto;
  color: var(--text-mid);
}
.parsed-box h3 { font-size: .9rem; color: var(--text); margin-bottom: .5rem; }
.parsed-box p  { margin-bottom: .35rem; }
.parsed-box ul { padding-left: 1.2rem; margin-bottom: .4rem; }
.parsed-box li { margin-bottom: .15rem; }
.parsed-box strong { color: var(--text); }

/* ── binary check (stage 1) ──────────────────────────────────────────────── */
.binary-check { display: flex; flex-direction: column; gap: .75rem; }
.binary-check label { font-size: .875rem; font-weight: 500; color: var(--text-mid); }
.binary-buttons { display: flex; gap: .4rem; }
.binary-btn {
  /* flex: 1;  */
  padding: .3rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-solid);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-mid);
  height: 28px; display: flex; align-items: center; justify-content: center;
}
.binary-btn:hover { border-color: var(--primary); color: var(--primary); }
.binary-btn.selected.correct { background: var(--s5-bg); border-color: var(--s5); color: var(--s5); }
.binary-btn.selected.fail    { background: var(--s1-bg); border-color: var(--s1); color: var(--s1); }

/* ── mark-remaining bulk action ──────────────────────────────────────────── */
.mark-remaining-container {
  margin: .75rem 0 1.25rem;
  padding: .85rem 1rem;
  background: var(--s4-bg);
  border: 1px solid var(--s4-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.mark-remaining-note {
  flex: 1;
  margin: 0;
  font-size: .82rem;
  color: var(--s5);
  line-height: 1.45;
}
.mark-remaining-btn {
  flex-shrink: 0;
  padding: .45rem 1rem;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  background: #16a34a;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
}
.mark-remaining-btn:hover { background: #15803d; }

.rubric-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.rubric-header {
  padding: 1.25rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.dimension-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.rubric-question {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}

.rubric-reasoning {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.4;
}

.rubric-main {
  display: flex;
  min-height: 120px;
}

.rubric-left {
  flex: 0 0 35%;
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.rubric-right {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: var(--surface-solid);
}

.star-rating {
  display: flex;
  gap: 0.4rem;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.star {
  cursor: pointer;
  color: var(--surface-alt);
  transition: all 0.2s ease;
  user-select: none;
}

.star.selected {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.star:hover {
  transform: scale(1.15);
}

.dimensions-container {
  margin-top: 1rem;
}

.dims-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dims-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.dim-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.dim-checkbox:hover {
  border-color: var(--primary);
  color: var(--text);
}

.dim-checkbox input[type="checkbox"] {
  display: none;
}

.dim-checkbox:has(input[type="checkbox"]:checked) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* ── static rubric list ────────────────────────────────────────────────── */
.rubric-static-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0.5rem 0;
}

.rubric-level {
  display: flex;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.75rem;
  font-style: italic;
  opacity: 0.5;
  border: 1px solid transparent;
}

.rubric-level.active {
  opacity: 1;
  background: var(--primary-faint);
  border-color: var(--primary-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.rubric-level.hover {
  opacity: 1;
  background: var(--surface);
  border-color: var(--border);
}

.level-stars {
  font-weight: 800;
  min-width: 30px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rubric-level.active .level-stars {
  color: var(--primary);
}

.level-desc {
  line-height: 1.45;
  color: var(--text-mid);
}

.rubric-level.active .level-desc {
  color: var(--text);
  font-weight: 500;
}

/* ── old score buttons (hidden) ──────────────────────────────────────────── */
.score-row { display: none; }
.score-row-label { font-size: .82rem; font-weight: 600; color: var(--text-muted); flex: 1; text-transform: uppercase; letter-spacing: 0.025em; }
.score-buttons { display: flex; gap: .5rem; }
.score-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-solid); font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all .2s cubic-bezier(0.4, 0, 0.2, 1); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.score-btn:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.05); }
.score-btn[data-value="1"].selected { background: var(--s1); border-color: var(--s1); color: white; box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3); }
.score-btn[data-value="2"].selected { background: var(--s2); border-color: var(--s2); color: white; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.score-btn[data-value="3"].selected { background: var(--s3); border-color: var(--s3); color: white; box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3); }
.score-btn[data-value="4"].selected { background: var(--s4); border-color: var(--s4); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.score-btn[data-value="5"].selected { background: var(--s5); border-color: var(--s5); color: white; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3); }

/* ── resume display ──────────────────────────────────────────────────────── */
.pdf-viewer {
  width: 100%; height: 100%; min-height: 600px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.no-pdf {
  padding: 1.5rem; text-align: center; color: var(--text-muted);
  background: var(--surface-alt); border: 1px dashed var(--border);
  border-radius: var(--radius-sm); font-size: .83rem;
}
.parsed-resume { display: flex; flex-direction: column; gap: .85rem; font-size: .83rem; }
.resume-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.resume-role { color: var(--primary); font-weight: 500; font-size: .85rem; }
.resume-meta { color: var(--text-muted); font-size: .8rem; margin-top: .15rem; }
.resume-degrees { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.degree-tag {
  padding: .15rem .5rem; border-radius: 3px; font-size: .75rem;
  background: var(--primary-light); border: 1px solid var(--primary-border);
  color: var(--primary);
}
.resume-section { border-top: 1px solid var(--border); padding-top: .75rem; }
.exp-entry { margin-bottom: .85rem; }
.exp-entry:last-child { margin-bottom: 0; }
.exp-header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.exp-company { font-weight: 600; color: var(--text); }
.exp-dates   { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.exp-role    { font-size: .8rem; color: var(--text-mid); margin-bottom: .3rem; }
.exp-resp    { padding-left: 1.1rem; color: var(--text-mid); margin-bottom: .35rem; }
.exp-resp li { margin-bottom: .15rem; font-size: .78rem; line-height: 1.5; }
.skills-cloud { display: flex; flex-wrap: wrap; gap: .3rem; }
.skill-tag {
  padding: .15rem .45rem; border-radius: 3px; font-size: .73rem;
  background: var(--surface-alt); border: 1px solid var(--border);
  color: var(--text-mid);
}
.tech-tag {
  padding: .1rem .35rem; border-radius: 3px; font-size: .72rem;
  background: var(--primary-light); border: 1px solid var(--primary-border);
  color: var(--primary);
}

/* ── thread card ─────────────────────────────────────────────────────────── */
.thread-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.thread-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.thread-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1.25rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-family: 'Outfit', sans-serif;
}
.thread-num  { font-weight: 800; color: var(--text); font-size: 0.9rem; }
.thread-label {
  padding: .2rem .75rem; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 700;
  background: var(--primary-light); border: 1px solid var(--primary-border); color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.thread-time { margin-left: auto; font-size: .82rem; color: var(--text-muted); font-weight: 600; }

.thread-body {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
}
.thread-left  { padding: 1rem; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 1rem; }
.thread-right { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; background: var(--bg); }

/* question box */
.question-text { font-size: .84rem; font-weight: 500; color: var(--text); line-height: 1.55; margin-bottom: .5rem; }
.skills-assessed { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .4rem; }

details.expected-answer summary {
  font-size: .75rem; color: var(--text-muted);
  padding: .25rem 0;
}
details.expected-answer p {
  font-size: .78rem; color: var(--text-mid);
  margin-top: .35rem; padding: .5rem .6rem;
  background: var(--surface-alt); border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-focus);
}

/* conversation */
.conversation-scroll {
  max-height: 250px; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
  box-shadow: var(--shadow-inner);
}
.chat-line { display: flex; gap: .75rem; font-size: .875rem; }
.chat-line.recruiter .speaker  { color: var(--primary); font-weight: 700; white-space: nowrap; font-size: .75rem; text-transform: uppercase; }
.chat-line.candidate .speaker  { color: var(--s5);       font-weight: 700; white-space: nowrap; font-size: .75rem; text-transform: uppercase; }
.chat-text { color: var(--text-mid); line-height: 1.5; }

/* ai evaluation */
.ai-eval-box {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; font-size: .8rem;
}
.ai-eval-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .45rem .7rem; background: var(--surface-alt);
  border-bottom: 1px solid var(--border); font-weight: 600; font-size: .78rem;
}
.ai-score {
  padding: .15rem .5rem; border-radius: 3px; font-size: .75rem; font-weight: 700;
  border: 1px solid;
}
.ai-score.high   { background: var(--s5-bg); border-color: var(--s5-border); color: var(--s5); }
.ai-score.mid    { background: var(--s3-bg); border-color: var(--s3-border); color: var(--s3); }
.ai-score.low    { background: var(--s1-bg); border-color: var(--s1-border); color: var(--s1); }
.eval-answered, .eval-missed {
  padding: .35rem .7rem; border-bottom: 1px solid var(--border); color: var(--text-mid);
  font-size: .78rem;
}
.eval-answered { border-left: 3px solid var(--s4-border); }
.eval-missed   { border-left: 3px solid var(--s1-border); }
.eval-answered strong { color: var(--s4); }
.eval-missed   strong { color: var(--s1); }
details.ai-reasoning summary { padding: .35rem .7rem; font-size: .75rem; color: var(--text-muted); }
details.ai-reasoning p { padding: .4rem .7rem .5rem; color: var(--text-muted); font-size: .78rem; line-height: 1.5; }

/* follow-up */
.followup-box {
  border: 1px solid var(--s4-border); border-radius: var(--radius-sm);
  background: var(--s4-bg); overflow: hidden;
}
.followup-header { padding: .35rem .7rem; font-size: .75rem; font-weight: 600; color: var(--s5); }
.followup-text   { padding: .35rem .7rem .5rem; font-size: .8rem; color: var(--text-mid); }
.no-followup {
  padding: .45rem .7rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .78rem; color: var(--text-muted); background: var(--surface-alt);
}

/* thread right scoring */
.thread-right h4 { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

/* session coherence */
.session-coherence {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--primary);
  margin-top: 3rem;
}
.session-coherence h3 { 
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; 
}
.session-coherence p { font-size: .95rem; color: var(--text-mid); margin-bottom: 1.25rem; }

/* ── misc ────────────────────────────────────────────────────────────────── */
.muted { color: var(--text-muted) !important; font-style: italic; }
.stage-section-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--primary); margin: 1rem 0 .5rem;
  padding-bottom: .3rem; border-bottom: 1px solid var(--primary-border);
}
.section-label {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted); margin-bottom: .5rem;
}
.alert {
  padding: .5rem .75rem; border-radius: var(--radius-sm);
  font-size: .8rem; border: 1px solid;
}
.alert-warn { background: var(--s3-bg); border-color: var(--s3-border); color: #854d0e; }

/* ── tab header labels ───────────────────────────────────────────────────── */
.tab-header-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  padding-left: 0.25rem;
  width: 100%;
}
.tab-status-count {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 800;
  border: 1px solid var(--primary-border);
  box-shadow: 0 2px 6px var(--primary-glow);
}

.tab-header-label .icon {
  font-size: 0.9rem;
  color: var(--primary);
  opacity: 0.9;
  font-family: 'Inter', monospace;
  font-weight: 700;
}


/* ── interview questions tab ─────────────────────────────────────────────── */
.iq-strategy-card { margin-bottom: 1.25rem; }
.iq-summary { font-size: .84rem; color: var(--text-mid); line-height: 1.6; }
.iq-coverage { display: flex; flex-direction: column; gap: .4rem; margin-top: .75rem; }
.iq-coverage-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.iq-coverage-label { font-size: .73rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); min-width: 80px; }
.skill-tag.covered { background: var(--s4-bg); border-color: var(--s4-border); color: var(--s4); }

/* ── guide toggle system ─────────────────────────────────────────────────── */
.guide-wrap {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-alt); font-size: .78rem; margin: .5rem 0;
}
.guide-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .7rem;
}
.guide-title { font-size: .73rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); }
.guide-toggle-btn {
  font-size: .72rem; color: var(--text-muted); background: none; border: none;
  cursor: pointer; padding: .1rem .3rem; border-radius: 3px;
}
.guide-toggle-btn:hover { background: var(--border); }
.guide-body { padding: .4rem .7rem .6rem; border-top: 1px solid var(--border); }
.guide-body.guide-hidden { display: none; }

.guide-table { width: 100%; border-collapse: collapse; font-size: .77rem; }
.guide-table tr { border-bottom: 1px solid var(--border); }
.guide-table tr:last-child { border-bottom: none; }
.guide-table td { padding: .3rem .5rem; vertical-align: top; }
.gt-label { font-weight: 600; white-space: nowrap; width: 120px; color: var(--text-mid); }
.gt-e { color: #15803d; }
.gt-g { color: #2563eb; }
.gt-a { color: #ca8a04; }
.gt-i { color: #ea580c; }
.gt-p { color: #dc2626; }

/* ── during interview tab ────────────────────────────────────────────────── */

/* Reference guides card */
.di-guides { margin-bottom: 1.25rem; padding: .85rem 1rem; }
.di-guides-header { display: flex; align-items: baseline; gap: .75rem; margin-bottom: .75rem; }
.di-guides-hint { font-size: .75rem; color: var(--text-muted); }
.di-guides-body {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
}
.di-guide-section { border-right: 1px solid var(--border); padding: 0; }
.di-guide-sec-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .7rem; background: var(--surface-alt);
  font-size: .75rem; font-weight: 600; color: var(--text-mid);
  border-bottom: 1px solid var(--border);
}
.di-guide-content { padding: .4rem .1rem; }
.di-guide-content.guide-hidden { display: none; }
.di-guide-row {
  display: flex; gap: .5rem; padding: .25rem .6rem;
  font-size: .75rem; line-height: 1.4; border-bottom: 1px solid var(--border);
  color: var(--text-mid);
}
.di-guide-row:last-child { border-bottom: none; }
.di-guide-row .gt-label { flex-shrink: 0; width: 110px; font-weight: 600; }

/* Pre-interview block */
.pre-interview-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1rem;
  margin-bottom: 1rem; font-size: .82rem; color: var(--text-muted);
}
.pre-interview-block summary { font-weight: 500; cursor: pointer; }

/* ── Chronological stream ─────────────────────────────────────────────────── */
.di-stream {
  display: flex; flex-direction: column; gap: .15rem;
  max-width: 900px; margin: 0 auto;
}

/* Transcript messages */
.di-msg {
  display: flex; flex-direction: column; gap: 0.15rem;
  font-size: .83rem; line-height: 1.5;
  margin-bottom: 0.75rem;
  max-width: 80%;
}
.di-msg--interviewer {
  align-self: flex-start;
}
.di-msg--interviewee {
  align-self: flex-end;
}
.di-msg-name {
  font-weight: 600; white-space: nowrap; flex-shrink: 0;
  font-size: .75rem; color: var(--text-muted);
  padding: 0 0.5rem;
}
.di-msg--interviewer .di-msg-name { color: var(--primary); text-align: left; }
.di-msg--interviewee .di-msg-name { color: var(--s5); text-align: right; }
.di-msg-text {
  color: var(--text-mid);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.di-msg--interviewer .di-msg-text {
  background: #f0f7ff;
  border-color: #e0f0ff;
  color: #1e3a8a;
  border-top-left-radius: 4px;
}
.di-msg--interviewee .di-msg-text {
  background: #fdf4ff;
  border-color: #fce7f3;
  color: #831843;
  border-top-right-radius: 4px;
}

/* Classification Cards - Professional Evaluation Style */
.di-classif-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0 2.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.di-classif-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.di-classif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 1rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.di-classif-header-left, .di-classif-header-right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.di-classif-num {
  font-weight: 700;
  color: var(--text-muted);
  font-size: .8rem;
  margin-right: .2rem;
}

.di-classif-badge2 {
  padding: .35rem .85rem;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 800;
  border: 1px solid transparent;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-family: 'Outfit', sans-serif;
}
.bc-cont { background: #64748b; }
.bc-end  { background: #1e293b; }
.bc-oop  { background: #b45309; }
.bc-newq { background: var(--primary); }

.inline-btn {
  padding: .2rem .55rem;
  font-size: .75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  transition: background .1s, color .1s, border-color .1s;
}
.inline-btn:hover { background: var(--border); color: var(--text); }
.inline-btn.selected.correct {
  background: #dcfce7;
  border-color: #16a34a;
  color: #15803d;
}
.inline-btn.selected.fail {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}

.inline-select {
  padding: .15rem .3rem;
  font-size: .75rem;
  width: auto;
}

.di-classif-body {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 42%);
}

.di-classif-left {
  padding: 1rem;
  border-right: 1px solid var(--border);
}

.di-classif-right {
  padding: 1rem;
  background: var(--bg);
}

.target-message {
  margin-bottom: 1rem;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border-left: 4px solid var(--primary);
  padding: .7rem .8rem;
}
.target-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .4rem;
}
.target-speaker { font-size: .75rem; font-weight: 500; color: var(--primary); }
.target-badge { font-size: .65rem; font-weight: 700; color: var(--s1); letter-spacing: .05em; text-transform: uppercase; }
.target-msg-text {
  font-size: .8rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.avail-qs {
  margin-bottom: 1rem;
}
.avail-qs summary {
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  border: none;
  background: transparent;
  padding: .2rem 0;
}
.avail-qs-body {
  padding: .4rem 0;
  font-size: .75rem;
}
.avail-qs-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: .7rem;
  margin-bottom: .2rem;
  margin-top: .4rem;
}
.avail-qs-body ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
  color: var(--text-mid);
}

.avail-qs-empty {
  font-size: .75rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  padding: .4rem .6rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
}

.classif-reasoning {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.classif-reasoning summary {
  padding: .3rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-mid);
}
.classif-reasoning p {
  padding: .5rem;
  font-size: .75rem;
  color: var(--text-mid);
  margin: 0;
}

.conv-hist-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: .5rem;
}
.conv-hist-details summary {
  padding: .3rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  background: var(--surface-alt);
}
.conv-hist-body {
  padding: .5rem .6rem;
  font-size: .75rem;
  max-height: 200px;
  overflow-y: auto;
}
.conv-hist-line {
  margin-bottom: .4rem;
  line-height: 1.4;
}
.conv-hist-role {
  font-weight: 600;
  margin-right: .3rem;
}
.conv-hist-role.recruiter { color: var(--primary); }
.conv-hist-role.candidate { color: var(--s5); }
.conv-hist-text { color: var(--text-muted); }

.ai-output-box {
  margin-top: .75rem;
  background: var(--surface-alt);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 0.85rem;
  border-left: 4px solid var(--primary);
  margin-bottom: 1.5rem;
}
.ai-output-header {
  font-size: .65rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: .6rem;
  letter-spacing: .1em;
}

/* ───────────────────────────────────────────────────────── */
/*  FLOW METRICS (Stage 6)                                   */
/* ───────────────────────────────────────────────────────── */

.flow-metrics-box {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.flow-metric {
  flex: 1 1 calc(33.333% - 1rem); /* Standard 3 column layout */
  min-width: 280px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem;
}

.rubric-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: .8rem;
}

.rubric-details summary {
  padding: .4rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  background: var(--surface-alt);
}

.rubric-content {
  padding: .6rem;
  font-size: .75rem;
  color: var(--text-mid);
  line-height: 1.5;
  background: var(--surface-solid);
  border-top: 1px solid var(--border);
}

.rubric-content strong {
  color: var(--text-base);
}

.classif-extra-line {
  font-size: .75rem;
  margin-bottom: .25rem;
  display: flex;
}
.classif-extra-label {
  flex-shrink: 0;
  padding-right: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .025em;
}
.ai-output-value {
  color: var(--text-mid);
}

.progress-box {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .7rem;
  font-size: .8rem;
  font-family: inherit;
  word-break: break-word;
}
.progress-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.progress-box li {
  margin-bottom: .3rem;
  color: var(--text-mid);
}

/* Rubric badge */
.di-rubric-badge {
  display: inline-block; padding: .15rem .6rem; border-radius: var(--radius-pill);
  font-size: .7rem; font-weight: 800; white-space: nowrap; border: 1px solid; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: .05em;
}
.di-rubric-badge.gt-e { background: var(--s5-bg); border-color: var(--s5-border); color: var(--s5); }
.di-rubric-badge.gt-g { background: var(--s4-bg); border-color: var(--s4-border); color: var(--s4); }
.di-rubric-badge.gt-a { background: var(--s3-bg); border-color: var(--s3-border); color: var(--s3); }
.di-rubric-badge.gt-i { background: var(--s2-bg); border-color: var(--s2-border); color: var(--s2); }
.di-rubric-badge.gt-p { background: var(--s1-bg); border-color: var(--s1-border); color: var(--s1); }

/* Evaluation card - Stage 7/8 */
.di-eval-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin: .75rem 0 1.25rem;
  box-shadow: var(--shadow);
}
.di-eval-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.di-eval-title { 
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 1rem; color: var(--text); 
  display: flex; align-items: center; gap: 0.5rem;
}
.di-eval-title::before {
  content: "📊"; font-size: 1.1rem;
}
.di-eval-qtext {
  font-size: .875rem; color: var(--text-mid);
  margin-top: 0.5rem; font-weight: 500; line-height: 1.5;
  background: var(--surface-alt);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-focus);
}
.di-eval-ann {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

/* 2-column grid for Stage 7 rubric panels */
.di-eval-ann {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  align-items: start;
}
/* section label spans full width */
.di-eval-ann > .stage-section-label {
  grid-column: 1 / -1;
  margin-bottom: .1rem;
}

.di-followup-section {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.di-followup-ann {
  margin-top: .6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  align-items: start;
}
/* necessity (veto) and section label span full width */
.di-followup-ann > .stage-section-label,
.di-followup-ann > .rubric-panel.veto {
  grid-column: 1 / -1;
}

/* Shared annotation helpers */
.di-annotate-label { font-size: .8rem; color: var(--text-mid); }
.di-select {
  padding: .35rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-alt); font-size: .82rem; color: var(--text);
  cursor: pointer; width: 100%;
}
.di-select:focus { outline: none; border-color: var(--primary); }



.jd-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 0;
}

.jd-panel-header {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--primary);
  padding: .65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.download-btn-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--primary);
  color: white !important;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px var(--primary-glow);
  text-transform: none;
  letter-spacing: normal;
}

.download-btn-inline:hover {
  background: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.jd-textarea {
  flex: 1;
  resize: none;
  border: none;
  outline: none;
  padding: .9rem 1rem;
  font-family: inherit;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface-solid);
  overflow-y: auto;
  min-height: 0;
}

.jd-parsed-scroll {
  padding: .9rem 1.25rem;
  font-size: .82rem;
  line-height: 1.6;
  min-height: 0;
}

/* Stage 1 compact binary card — base styles (display/flex set in scores-row block) */
.jd-sidebar-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  box-shadow: var(--shadow-sm);
}

.jd-sidebar-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .45rem;
}

.jd-sidebar-q {
  font-size: .8rem;
  color: var(--text-mid);
  margin: 0 0 .55rem;
}

/* ── Interview Analysis tab ──────────────────────────────────────────────── */
.ia-tab { display: flex; flex-direction: column; gap: 1.25rem; }

/* Two-column annotated row: content left, rubric panel right */
.ia-annotated-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .ia-annotated-row { grid-template-columns: 1fr; }
}

.ia-annotated-content {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Full-width section (no paired rubric) */
.ia-full-section {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Section heading inside a card */
.ia-section-header {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--primary-border);
}

/* Overall banner */
.ia-overall-banner {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ia-overall-summary {
  font-size: .84rem;
  line-height: 1.6;
  color: var(--text-mid);
  margin: 0;
}

/* Performance summary */
.ia-summary-text {
  font-size: .84rem;
  line-height: 1.65;
  color: var(--text-mid);
  margin: 0;
}

/* Role suitability grid */
.ia-suitability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
}
.ia-suitability-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
}
.ia-suitability-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
  flex-wrap: wrap;
}
.ia-criterion {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 120px;
}
.ia-evidence {
  font-size: .79rem;
  line-height: 1.55;
  color: var(--text-mid);
  margin: 0;
}

/* Skill assessment list */
.ia-skills-list { display: flex; flex-direction: column; gap: .7rem; }
.ia-skill-card {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
}
.ia-skill-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
  flex-wrap: wrap;
}
.ia-skill-area {
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.ia-skill-tags { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .35rem; }
.ia-skill-summary {
  font-size: .79rem;
  line-height: 1.55;
  color: var(--text-mid);
  margin: 0;
}

/* Discussion points */
.ia-discussion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.ia-discussion-item {
  border-left: 3px solid var(--primary-border);
  padding: .55rem .85rem;
  background: var(--surface-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ia-discussion-topic {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .35rem;
}
.ia-discussion-row {
  display: flex;
  gap: .5rem;
  font-size: .79rem;
  line-height: 1.5;
  color: var(--text-mid);
  margin-top: .2rem;
}
.ia-dl-label {
  flex-shrink: 0;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: .05rem;
  min-width: 38px;
}
.ia-dl-label.focus { color: var(--primary); }

/* ── question expansion ─────────────────────────────────────────────────── */
.q-expansion {
  width: 100%;
}
.q-expansion-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  cursor: pointer;
  list-style: none; /* hide default arrow */
}
.q-expansion-summary::-webkit-details-marker { display: none; }

.expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.expand-btn::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-left: 4px;
  margin-bottom: 1px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.q-expansion[open] .expand-btn::after {
  transform: rotate(45deg);
}

.expand-btn:hover {
  background: var(--primary);
  color: white;
}

.q-expanded-content {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  animation: slideDown 0.3s ease;
}

.context-p {
    font-size: 0.8rem;
    color: var(--text-mid);
    line-height: 1.5;
    margin: 0.5rem 0 0;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.questions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ── scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-focus); }
