:root {
  --bg: #0b0d10;
  --panel: #151922;
  --card: #1d2330;
  --input: #10141c;
  --line: #2c3444;
  --line-strong: #3a4558;
  --text: #f4f6fb;
  --muted: #9aa5b8;
  --muted-2: #707b91;
  --accent: #2f80ed;
  --accent-hover: #4b93f3;
  --accent-2: #19a974;
  --warn: #e5484d;
  --print-text: #111827;
  --radius: 8px;
  --shadow: 0 18px 52px rgba(0, 0, 0, .24);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -10%, rgba(47, 128, 237, .14), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(25, 169, 116, .08), transparent 28%),
    linear-gradient(180deg, #0d1118 0%, var(--bg) 48%, #090b0f 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
textarea, input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--text);
  padding: 12px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea:focus, input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .18);
}
textarea::placeholder, input::placeholder { color: var(--muted-2); }
textarea { resize: vertical; min-height: 100px; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 650; font-size: 13px; }
.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.password-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.password-toggle:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.password-toggle:focus-visible { outline: 3px solid rgba(47, 128, 237, .3); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 26px; line-height: 1.15; }
h2 { font-size: 17px; }
h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.app-shell { max-width: 1320px; margin: 0 auto; padding: 20px 24px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 4px 0 2px;
}
body.interview-active .topbar { display: none; }
body.interview-active .app-shell { max-width: none; padding: 0 24px; }
body.interview-active main { min-height: 100vh; display: flex; align-items: center; }
body.interview-active #interviewPanel { width: 100%; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.brand-version { font-size: 12px; color: var(--accent); font-weight: 600; margin-left: 6px; }
.subtitle { color: var(--muted); font-size: 13px; }
.user-greeting { color: var(--muted); font-size: 13px; font-weight: 600; }
.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 6px 12px;
  white-space: nowrap;
  font-size: 13px;
}
.status-pill.ok { color: #d8fff0; border-color: rgba(25,169,116,.5); background: rgba(25,169,116,.12); }
.status-pill.fail { color: #ffe3e4; border-color: rgba(229,72,77,.5); background: rgba(229,72,77,.12); }

.panel { display: none; }
.panel.active { display: block; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: linear-gradient(180deg, rgba(29, 35, 48, .86), rgba(21, 25, 34, .98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .025), 0 18px 44px rgba(0, 0, 0, .12);
}
.card h2 { margin-bottom: 14px; letter-spacing: .005em; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 6px 0 16px;
}
.page-header h1 { margin: 0 0 5px; }
.page-header p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 14px;
}
.split-header { align-items: center; }

/* Home screen */
.home-actions { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.recent-list { margin-top: 12px; }
.recent-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
  font-size: 14px;
  background: rgba(255, 255, 255, .018);
}
.recent-item:hover { border-color: var(--accent); background: rgba(47, 128, 237, .055); transform: translateY(-1px); }
.recent-item .ri-main { display: flex; flex-direction: column; gap: 2px; }
.recent-item .ri-title { font-weight: 700; }
.recent-item .ri-sub { color: var(--muted); font-size: 12px; }
.recent-item .ri-score { font-weight: 800; font-size: 18px; color: var(--accent-2); }
.recent-item .ri-date { color: var(--muted); font-size: 12px; }
.recent-item .ri-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.ri-badge.hire { background: rgba(25,169,116,.15); color: #19a974; }
.ri-badge.nothire { background: rgba(229,72,77,.15); color: #e5484d; }
.ri-badge.conditional { background: rgba(47,128,237,.15); color: var(--accent); }

.ri-actions { display: flex; gap: 6px; align-items: center; }
.ri-btn { font-size: 11px; padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.ri-btn:hover { border-color: var(--accent); background: rgba(47, 128, 237, .1); }
.ri-more { position: relative; }
.ri-more-btn { font-size: 16px; padding: 2px 8px; line-height: 1; }
.ri-menu { position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,.3); z-index: 100; min-width: 160px; overflow: hidden; }
.ri-menu.hidden { display: none; }
.ri-menu-item { display: block; width: 100%; text-align: left; padding: 8px 14px; font-size: 13px; border: none; background: transparent; color: var(--fg); cursor: pointer; }
.ri-menu-item:hover { background: rgba(47, 128, 237, .1); }
.ri-delete-btn { color: #e5484d; }
.ri-delete-btn:hover { background: rgba(229,72,77,.1); }

/* Setup card styles */
.settings-card { margin-top: 14px; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.file-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--muted);
  text-align: center;
  transition: border-color .15s, background .15s;
  font-size: 13px;
}
.file-drop.dragging { border-color: var(--accent); background: rgba(47, 128, 237, .12); color: var(--text); }
.file-drop input { display: none; }
.small-status { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }
.resume-confidence {
  border: 1px solid rgba(25, 169, 116, .36);
  background: rgba(25, 169, 116, .1);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 10px;
  color: #d8fff0;
  font-size: 12px;
}
.resume-confidence strong { color: #eafff7; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.skill-chips span {
  border: 1px solid rgba(216, 255, 240, .22);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  font-size: 11px;
}
.error { color: #ffb4b6; min-height: 18px; margin-top: 8px; font-size: 13px; }
.primary, .secondary {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease, color .14s ease;
}
.primary { background: linear-gradient(180deg, var(--accent-hover), var(--accent)); color: #fff; box-shadow: 0 10px 24px rgba(47, 128, 237, .22); }
.secondary { background: rgba(255, 255, 255, .02); color: var(--text); border-color: var(--line); }
.danger { background: rgba(229,72,77,.04); color: #ff9ea2; border: 1px solid rgba(229,72,77,.4); border-radius: var(--radius); padding: 10px 14px; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .14s ease, border-color .14s ease, background .14s ease; }
.primary:hover, .secondary:hover, .danger:hover { transform: translateY(-1px); }
.primary:hover { box-shadow: 0 14px 30px rgba(47, 128, 237, .28); }

/* Membership Wall */
.membership-wall { max-width: 560px; margin: 60px auto; text-align: center; padding: 40px 32px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.membership-icon { font-size: 48px; margin-bottom: 16px; }
.membership-wall h1 { font-size: 24px; font-weight: 800; margin-bottom: 12px; color: var(--fg); }
.membership-intro { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.membership-wall p { color: var(--text); font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.membership-price { font-weight: 700; color: var(--fg); margin-top: 20px; }
.membership-perks { list-style: none; padding: 0; margin: 12px 0 24px; }
.membership-perks li { padding: 6px 0; font-size: 14px; color: var(--text); }
.membership-perks li::before { content: "✓ "; color: #19a974; font-weight: 700; }
.membership-cta { font-weight: 700; color: var(--fg); font-size: 15px; margin: 20px 0; }
.membership-buttons { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 24px; }
.membership-btn { font-size: 16px; padding: 14px 32px; }

.membership-plans { display: flex; gap: 12px; justify-content: center; margin: 8px 0 4px; }
.membership-plan-option { cursor: pointer; }
.membership-plan-option input { position: absolute; opacity: 0; pointer-events: none; }
.membership-plan-card { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; min-width: 140px; padding: 16px 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.membership-plan-option input:checked + .membership-plan-card { border-color: #2f80ed; box-shadow: 0 0 0 3px rgba(47, 128, 237, .15); }
.membership-plan-name { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.membership-plan-amount { font-size: 22px; font-weight: 800; color: var(--fg); }
.membership-plan-amount small { font-size: 13px; font-weight: 600; color: var(--muted); }
.membership-plan-compare { font-size: 14px; font-weight: 600; color: var(--muted-2); text-decoration: line-through; }
.membership-plan-compare small { font-size: 12px; }
.membership-plan-compare:empty { display: none; }
.membership-plan-badge { position: absolute; top: -10px; right: -8px; background: #19a974; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }

.membership-coupon { margin: 16px 0 0; text-align: center; }
.membership-coupon label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.coupon-row { display: flex; gap: 8px; justify-content: center; max-width: 320px; margin: 0 auto; }
.coupon-row input { flex: 1; min-width: 0; }
.coupon-row button { flex-shrink: 0; padding: 8px 16px; }
.coupon-status { font-size: 13px; margin-top: 8px; min-height: 18px; }
.coupon-status.success { color: #19a974; font-weight: 600; }
.coupon-status.error { color: #e5484d; }
.secondary:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .04); }
.danger:hover { background: rgba(229,72,77,.08); }
.primary:focus-visible, .secondary:focus-visible, .danger:focus-visible { outline: 3px solid rgba(47, 128, 237, .3); outline-offset: 2px; }
.primary:disabled, .secondary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.full-width { width: 100%; }

/* Interview room — one consolidated screen: ready -> live -> ended, no navigation */
.call-screen {
  position: relative;
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 18px;
}
.call-stage {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

/* Interviewer avatar — small fixed size, never a big video feed */
.avatar-ring {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(47, 128, 237, .24);
  background: radial-gradient(circle, rgba(47, 128, 237, .14), rgba(47, 128, 237, .02) 68%);
  transition: box-shadow .2s ease, transform .2s ease;
  flex-shrink: 0;
}
.avatar-ring.speaking {
  border-color: rgba(25, 169, 116, .7);
  animation: speakingPulse 1.6s ease-in-out infinite;
}
.avatar-ring.thinking {
  animation: thinkingPulse 1.1s ease-in-out infinite;
}
.interviewer-avatar-img {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  background: #24324a;
}

/* Name/title/company/duration sit BELOW the photo, never overlaid on it */
.interviewer-meta { display: flex; flex-direction: column; gap: 2px; }
.interviewer-meta h1 { margin: 0; font-size: 22px; }
.interviewer-subtitle { color: var(--muted); font-size: 14px; }
.interviewer-duration { color: var(--muted-2); font-size: 12px; }

.call-live-content { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.question-text {
  max-width: 660px;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.25;
  font-weight: 750;
  text-wrap: balance;
}
.mic-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 15px;
}
.voice-meter {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.voice-meter span {
  width: 6px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  opacity: .32;
}
.voice-meter.active span { animation: voiceBar .75s ease-in-out infinite; opacity: 1; }
.voice-meter span:nth-child(2) { animation-delay: .08s; }
.voice-meter span:nth-child(3) { animation-delay: .16s; }
.voice-meter span:nth-child(4) { animation-delay: .24s; }
.voice-meter span:nth-child(5) { animation-delay: .32s; }
.interview-progress { width: min(460px, 100%); margin: 6px 0 0; }
.progress-wrap { margin: 0; }
.progress-label { color: var(--muted); margin-bottom: 8px; font-size: 15px; }
.progress-track { height: 8px; background: var(--input); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent-2); transition: width .3s; }

/* Ended state — inline on the same screen, not a separate screen/modal */
.call-ended-content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ended-title { font-size: 20px; font-weight: 700; }
.ended-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Bottom control bar */
.call-controls { display: flex; align-items: center; gap: 14px; }
.control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.control-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(47, 128, 237, .12); }
.call-toggle-btn { padding: 12px 34px; font-size: 16px; }

/* Decorative "meeting chrome" — purely cosmetic realism, never interactive.
   Deliberately muted/blurred so it reads as inert, distinct from the real
   controls in .call-controls. */
.fake-titlebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, .02);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
  user-select: none;
}
/* Self ("you") tile — small PiP corner tile, initials only by default,
   swaps to a live local camera mirror if the user opts in. Never recorded. */
.self-tile {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 216px;
  height: 160px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  z-index: 5;
  gap: 4px;
  overflow: hidden;
  transition: box-shadow .2s ease;
  z-index: 4;
}
.self-tile.dragging { cursor: grabbing; opacity: .9; transition: none; }
.self-tile.speaking {
  border-color: rgba(25, 169, 116, .7);
  animation: speakingPulse 1.6s ease-in-out infinite;
}
.self-camera-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.self-tile-initials { font-size: 34px; font-weight: 800; color: var(--text); }
.self-tile-name { font-size: 18px; color: var(--muted); }
.self-tile:has(.self-camera-video:not(.hidden)) .self-tile-name {
  position: absolute; bottom: 4px; left: 6px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7);
}

@keyframes voiceBar {
  0%, 100% { height: 10px; }
  50% { height: 34px; }
}
@keyframes thinkingPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.98); opacity: .72; }
}
@keyframes speakingPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(25, 169, 116, .16), 0 0 30px rgba(25, 169, 116, .26); }
  50% { box-shadow: 0 0 0 15px rgba(25, 169, 116, .22), 0 0 56px rgba(25, 169, 116, .42); }
}

/* Dark theme (default) — elevated card, rounder/friendlier, blends both app accents. */
[data-variant="enhanced2"] .call-stage {
  background: linear-gradient(180deg, rgba(47,128,237,.06), rgba(25,169,116,.04)), var(--card);
  border-radius: 22px;
  padding: 40px 32px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .28);
}
[data-variant="enhanced2"] .avatar-ring {
  border-radius: 22px;
  width: 172px;
  height: 172px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
}
[data-variant="enhanced2"] .avatar-ring.speaking { border-color: rgba(25, 169, 116, .7); }
[data-variant="enhanced2"] .interviewer-avatar-img { border-radius: 16px; width: 144px; height: 144px; }
[data-variant="enhanced2"] .self-tile { border-radius: 16px; }
[data-variant="enhanced2"] .call-controls { background: var(--bg); border-radius: 999px; padding: 8px 18px; }
[data-variant="enhanced2"] .call-toggle-btn { border-radius: 999px; }

/* Light theme — high-contrast light card on the dark page, LinkedIn-style
   corporate polish. Needs its own text-color overrides since it flips to a
   light surface. */
[data-variant="enhanced5"] .call-stage {
  background: #f4f6fb;
  border-radius: 10px;
  padding: 40px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}
[data-variant="enhanced5"] .avatar-ring { border-radius: 10px; background: #e8ecf5; border: 1px solid #d3dae8; }
[data-variant="enhanced5"] .avatar-ring.speaking { border-color: #19a974; }
[data-variant="enhanced5"] .interviewer-avatar-img { border-radius: 6px; }
[data-variant="enhanced5"] .interviewer-meta h1 { color: #111827; }
[data-variant="enhanced5"] .interviewer-subtitle { color: #4b5563; }
[data-variant="enhanced5"] .interviewer-duration { color: #6b7280; }
[data-variant="enhanced5"] .question-text { color: #111827; }
[data-variant="enhanced5"] .mic-status { color: #6b7280; }
[data-variant="enhanced5"] .progress-label { color: #6b7280; }
[data-variant="enhanced5"] .progress-track { background: #d3dae8; }
[data-variant="enhanced5"] .ended-title { color: #111827; }
[data-variant="enhanced5"] .secondary { background: #e8ecf5; color: #111827; border-color: #d3dae8; }
[data-variant="enhanced5"] .self-tile { background: #e8ecf5; border: 1px solid #d3dae8; border-radius: 8px; }
[data-variant="enhanced5"] .self-tile-initials { color: #111827; }
[data-variant="enhanced5"] .self-tile-name { color: #4b5563; }
[data-variant="enhanced5"] .call-controls { background: #e8ecf5; border-radius: 999px; padding: 8px 18px; }
[data-variant="enhanced5"] .control-btn { background: #f4f6fb; color: #4b5563; }
[data-variant="enhanced5"] .call-toggle-btn { border-radius: 999px; }
[data-variant="enhanced5"] .fake-titlebar { background: rgba(0, 0, 0, .03); color: #6b7280; }

/* Report panel */
.report-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }

/* ─── Report output: consulting-style ───────────────────────────────────────── */
.report-output {
  background: #ffffff;
  color: #111827;
  padding: 40px 44px;
  border-radius: var(--radius);
  min-height: 400px;
  max-width: 1080px;
  margin: 0 auto;
  overflow-x: auto;
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  box-shadow: var(--shadow);
}
.report-output h1 {
  font-size: 21px;
  font-weight: 800;
  color: #1e3a5f;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1e3a5f;
  text-transform: none;
  letter-spacing: -.01em;
  text-align: left;
}
.report-output h2 {
  font-size: 11px;
  font-weight: 700;
  color: #1e3a5f;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 26px 0 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #d1d5db;
}
.report-output h3 {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin: 18px 0 5px;
  text-transform: none;
  letter-spacing: 0;
}
.report-output hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 22px 0;
}
.report-output p {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: #111827;
}
.report-output ul {
  padding-left: 20px;
  margin: 6px 0 12px;
}
.report-output li {
  margin-bottom: 5px;
  font-size: 13.5px;
  line-height: 1.55;
}
.report-output table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  margin: 10px 0 18px;
  font-size: 12.5px;
}
.report-output th {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #374151;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  text-align: left;
  vertical-align: middle;
}
.report-output td {
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  vertical-align: top;
  line-height: 1.5;
  color: #111827;
}
.report-output tr:nth-child(even) td { background: #fafafa; }
.report-output strong { font-weight: 700; }
.report-output em { font-style: italic; color: #4b5563; font-size: 12.5px; }
.report-output button.secondary,
.report-output .secondary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.report-output button.secondary:hover,
.report-output .secondary:hover {
  background: #1f2937;
  border-color: #1f2937;
}

/* Tracker */
.tracker-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.tracker-search {
  max-width: 320px;
  padding: 8px 12px;
  font-size: 13px;
}
.tracker-filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tracker-filters select {
  width: auto;
  min-width: 140px;
  padding: 6px 10px;
  font-size: 13px;
}
.tracker-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tracker-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
}
.tracker-table th:hover { color: var(--text); }
.tracker-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.tracker-table tr { cursor: pointer; transition: background .1s; }
.tracker-table tbody tr:hover { background: rgba(47, 128, 237, .06); }
.tracker-score { font-weight: 800; font-size: 15px; }
.tracker-score.high { color: var(--accent-2); }
.tracker-score.mid { color: var(--accent); }
.tracker-score.low { color: var(--warn); }

/* Loading */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 13, .72);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.loading-box {
  min-width: 240px;
  display: grid;
  gap: 12px;
  justify-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
/* Camera error modal — same overlay/box treatment as .loading-overlay so it
   reads as part of the same UI system, but its own stacking layer since it
   can appear on top of an in-progress interview call screen. */
.camera-error-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 13, .72);
  backdrop-filter: blur(8px);
  z-index: 30;
  padding: 20px;
}
.camera-error-box {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.camera-error-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.camera-error-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.camera-error-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.camera-error-actions .primary,
.camera-error-actions .secondary {
  min-height: 44px;
  padding: 10px 20px;
}
@media (max-width: 520px) {
  .camera-error-box { padding: 20px; }
  .camera-error-actions { flex-direction: column-reverse; }
  .camera-error-actions .primary,
  .camera-error-actions .secondary { width: 100%; }
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Tabs (home) */
.home-tabs { display: flex; gap: 0; margin-bottom: 16px; }
.home-tab {
  padding: 9px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: all .15s;
}
.home-tab:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.home-tab:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.home-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .018);
  color: var(--muted);
  padding: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.table-wrap { width: 100%; overflow-x: auto; }

/* Responsive */
@media (max-width: 900px) {
  .grid.two, .grid.three, .settings-grid { grid-template-columns: 1fr; }
  .topbar, .report-header, .tracker-header, .page-header { flex-direction: column; align-items: stretch; }
  .recent-item { grid-template-columns: 1fr auto; }
  .avatar-ring { width: 140px; height: 140px; }
  .interviewer-avatar-img { width: 116px; height: 116px; }
  .tracker-search { max-width: none; }
  .button-row > button { flex: 1 1 170px; }
}

@media (max-width: 640px) {
  .app-shell { padding: 16px; }
  body.interview-active .app-shell { padding: 0 16px; }
  h1 { font-size: 23px; }
  .card { padding: 15px; }
  .home-actions button { flex: 1 1 100%; }
  .home-tabs { width: 100%; }
  .home-tab { flex: 1; padding: 9px 10px; }
  .recent-item { grid-template-columns: 1fr; gap: 6px; }
  .recent-item .ri-score { font-size: 16px; }
  .tracker-filters select { width: 100%; }
  .report-output { padding: 24px 18px; border-radius: 6px; }
  .report-output table { min-width: 560px; }
}

/* ─── Site Footer ────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding: 28px 0 20px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer .footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}
.site-footer .footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.site-footer .footer-links a:hover { color: var(--text); }
.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 12px;
}
.site-footer .footer-email a { color: var(--accent); text-decoration: none; }
.site-footer .footer-email a:hover { text-decoration: underline; }

/* ─── Legal Pages ────────────────────────────────────────────────────────── */
.legal-topbar {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 24px 0;
}
.legal-topbar a { text-decoration: none; }
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}
.legal-page .legal-header { margin-bottom: 32px; }
.legal-page .legal-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.legal-page .legal-updated { font-size: 13px; color: var(--muted); }
.legal-page h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  text-transform: none;
  letter-spacing: 0;
}
.legal-page p { color: var(--muted); margin-bottom: 12px; line-height: 1.7; }
.legal-page ul { color: var(--muted); padding-left: 20px; margin-bottom: 14px; line-height: 1.7; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--accent); text-decoration: none; }
.legal-page a:hover { text-decoration: underline; }
/* AI Content Factory: brand-name mentions inside generated article bodies —
   clickable, bold (already wrapped in <strong> at generation time), and
   visually highlighted so they stand out from ordinary body links. Not
   scoped to .legal-page so it also renders correctly in the admin editor's
   preview pane, which shares the same renderArticleHtml() output. */
a.brand-mention {
  background: rgba(47, 128, 237, .14);
  padding: 1px 5px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--accent);
}
a.brand-mention:hover { background: rgba(47, 128, 237, .24); text-decoration: none; }
.legal-intro { font-size: 15px; color: var(--text); line-height: 1.7; margin-bottom: 20px; }

/* About page */
.about-mission {
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  margin: 20px 0;
  background: rgba(47,128,237,.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
.contact-page { max-width: 900px; }
.contact-form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .12);
}
.contact-form-card h2 { margin-top: 0; margin-bottom: 18px; border: none; padding: 0; font-size: 17px; }
.contact-form-card label { margin-bottom: 13px; }
.contact-form-card label:last-of-type { margin-bottom: 16px; }
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-question { font-weight: 700; color: var(--text); font-size: 14px; margin-bottom: 6px; }
.faq-answer { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; }
.contact-success {
  display: none;
  background: rgba(25,169,116,.1);
  border: 1px solid rgba(25,169,116,.36);
  border-radius: var(--radius);
  padding: 14px;
  color: #d8fff0;
  font-size: 14px;
  margin-top: 12px;
}

/* Blog index + article pages */
.blog-page { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
.blog-hero { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.blog-hero h1 { font-size: 34px; font-weight: 800; margin-bottom: 10px; }
.blog-hero-sub { color: var(--muted); font-size: 16px; line-height: 1.6; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.blog-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 14px 32px rgba(0,0,0,.28); }
.blog-card-media {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(47,128,237,.4), rgba(25,169,116,.28));
}
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-media .blog-card-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: rgba(10,12,16,.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 9px;
  border-radius: 999px;
}
.blog-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-title { font-size: 17px; font-weight: 750; line-height: 1.35; color: var(--text); }
.blog-card-excerpt {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-cta { color: var(--accent); font-size: 13px; font-weight: 700; margin-top: 2px; }

.blog-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; }
.blog-featured .blog-card-media { aspect-ratio: auto; min-height: 240px; }
.blog-featured .blog-card-body { padding: 30px 34px; justify-content: center; gap: 10px; }
.blog-featured .blog-card-title { font-size: 25px; }
.blog-featured .blog-card-excerpt { -webkit-line-clamp: 4; font-size: 14.5px; }

.blog-empty { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1 / -1; }

.blog-post { max-width: 760px; margin: 0 auto; padding: 32px 24px 60px; }
.blog-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.blog-back:hover { color: var(--accent); }
.blog-post-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; aspect-ratio: 21 / 9; }
.blog-post-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.blog-post-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  background: rgba(47,128,237,.1);
}
.blog-post-header h1 { font-size: 30px; font-weight: 800; margin-bottom: 10px; line-height: 1.25; }
.blog-post-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.blog-post-meta .dot { color: var(--muted-2); }
.blog-post-content { margin-top: 28px; }
.blog-post-content h2 {
  font-size: 20px;
  font-weight: 750;
  color: var(--text);
  margin: 30px 0 12px;
}
.blog-post-content h3 { font-size: 16.5px; font-weight: 700; color: var(--text); margin: 22px 0 10px; }
.blog-post-content p { color: var(--muted); line-height: 1.75; margin-bottom: 14px; font-size: 15px; }
.blog-post-content ul, .blog-post-content ol { color: var(--muted); line-height: 1.75; margin-bottom: 14px; padding-left: 22px; }
.blog-post-content li { margin-bottom: 6px; }
.blog-post-content a { color: var(--accent); text-decoration: none; }
.blog-post-content a:hover { text-decoration: underline; }
.blog-post-content strong { color: var(--text); }
.blog-post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 18px;
  margin: 20px 0;
  background: rgba(47,128,237,.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
}

.blog-related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.blog-related h2 { font-size: 18px; font-weight: 750; margin-bottom: 16px; }
.blog-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.blog-cta {
  margin-top: 44px;
  padding: 30px 32px;
  text-align: center;
  background: linear-gradient(180deg, rgba(47,128,237,.1), rgba(25,169,116,.06)), var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.blog-cta h3 { font-size: 19px; font-weight: 750; color: var(--text); text-transform: none; letter-spacing: 0; margin-bottom: 8px; }
.blog-cta p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.blog-cta .primary { display: inline-block; text-decoration: none; padding: 11px 22px; }

@media (max-width: 760px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured .blog-card-media { aspect-ratio: 16 / 9; min-height: 0; }
  .blog-post-hero { aspect-ratio: 16 / 9; }
}

@media (max-width: 680px) {
  .contact-grid { grid-template-columns: 1fr; }
  .legal-page { padding: 24px 16px 48px; }
  .legal-topbar { padding: 16px 16px 0; }
  .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
  .blog-page { padding: 28px 16px 60px; }
  .blog-hero h1 { font-size: 26px; }
}

@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body { background: #fff; color: #111827; }
  .topbar, #homePanel, #interviewPanel, #trackerPanel, .report-header, .loading-overlay { display: none !important; }
  .app-shell { max-width: none; padding: 0; margin: 0; }
  #reportPanel { display: block !important; }
  .report-output {
    border: none;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    background: #fff;
  }
  .report-output h1 { border-bottom: 2.5px solid #1e3a5f !important; color: #1e3a5f !important; }
  .report-output h2 { border-bottom: 1px solid #d1d5db !important; color: #1e3a5f !important; background: none !important; }
  .report-output th { background: #f1f5f9 !important; }
  .report-output tr:nth-child(even) td { background: #fafafa !important; }
  .report-output hr { border-top: 1px solid #e5e7eb !important; }
  @page { size: letter; margin: 0.65in 0.65in 0.75in 0.65in; }
}
