:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #dfe3e8;
  --text: #1f2933;
  --text-muted: #5a6472;
  --brand: #1a56db;
  --brand-dark: #123f9e;
  --accent: #eab308;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}
.brand-break { display: none; }
@media (max-width: 480px) {
  .brand-logo { width: 1.75rem; height: 1.75rem; }
  .brand { font-size: 0.88rem; }
  .brand-break { display: block; }
}

.site-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.site-nav a { color: var(--text-muted); font-weight: 600; }
.site-nav a.active { color: var(--brand); }

.badge {
  display: inline-block;
  min-width: 1.2em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
}
.badge:empty { display: none; }

main#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: 60vh;
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 1rem;
}

h1 { font-size: 1.6rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.25rem; }

.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; }

/* Home: field grid */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.field-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.field-card:hover { box-shadow: 0 2px 10px rgba(20, 30, 50, 0.08); border-color: var(--brand); }

.field-card-link { display: block; color: inherit; padding-right: 2rem; }
.field-card-link:hover { text-decoration: none; }
.field-card-link p { color: var(--text-muted); font-size: 0.92rem; margin: 0.35rem 0 0; }

.field-card .star-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
}

/* Star buttons */
.star-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0.15rem;
}
.star-btn.active { color: var(--accent); }
.star-btn:hover { color: var(--accent); }

.item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.item-row:last-child { border-bottom: none; }
.item-row .item-text { flex: 1; }
.item-row .item-title { font-weight: 600; }
.item-row .item-sub { color: var(--text-muted); font-size: 0.88rem; }
.item-row .item-text p { margin: 0.4rem 0 0; color: var(--text-muted); font-size: 0.92rem; }
.media-list { margin-top: 0.5rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.88rem;
}

/* Pathway stepper */
.pathway {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pathway-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
}
.pathway-step summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  list-style: none;
}
.pathway-step summary::-webkit-details-marker { display: none; }
.pathway-step .step-heading { display: flex; align-items: baseline; gap: 0.6rem; }
.pathway-step .step-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.pathway-step .step-years { color: var(--text-muted); font-size: 0.85rem; }
.pathway-step .step-desc { margin: 0.6rem 0 0.2rem; color: var(--text-muted); }

/* Skills page */
.skill-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
}
.skill-block summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
  list-style: none;
}
.skill-block summary::-webkit-details-marker { display: none; }
.skill-block ul { margin: 0.6rem 0 0.2rem; padding-left: 1.2rem; color: var(--text-muted); }

/* Shortlist */
.shortlist-actions { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); color: var(--brand-dark); }
.btn-small { padding: 0.3rem 0.65rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.shortlist-group h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.empty-state { color: var(--text-muted); padding: 2rem 0; }
.muted-note { color: var(--text-muted); font-size: 0.88rem; }

/* Forms (shared: STAR builder, worksheet generator) */
.form-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }
.form-field label { font-weight: 600; font-size: 0.92rem; }
.form-field input[type="text"],
.form-field input[type="number"],
.form-field textarea,
.form-field select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.form-field textarea { resize: vertical; }
.worksheet-form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-field-inline { min-width: 200px; flex: 1; }
.privacy-note {
  background: #eef6ff;
  border: 1px solid #cfe3fb;
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
}

/* Interview Prep */
.interview-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}
.step-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem 0.35rem 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.step-pill:hover { text-decoration: none; border-color: var(--brand); }
.step-pill.current { border-color: var(--brand); color: var(--brand); }
.step-pill.done .step-pill-num { background: var(--brand); color: #fff; }
.step-pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--border);
  color: var(--text);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.step-pill-label { display: none; }
@media (min-width: 720px) {
  .step-pill-label { display: inline; }
}
.interview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.star-example {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.star-example p { margin: 0.4rem 0; }
.star-builder-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.star-combined-output {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 1.5rem;
  white-space: pre-wrap;
}
.star-saved-row { align-items: center; }

.question-jump-list { margin: 0.75rem 0; }
.question-chip { cursor: pointer; border: 1px solid var(--border); background: var(--surface); }
.question-chip.active { border-color: var(--brand); color: var(--brand); font-weight: 700; }
.question-chip.answered { background: #eaf7ea; }
.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem 0;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.question-counter { color: var(--text-muted); font-size: 0.9rem; }
.question-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.question-text { font-size: 1.1rem; font-weight: 600; margin-top: 0; }

.checklist { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.checklist-item { display: flex; align-items: flex-start; gap: 0.6rem; }
.checklist-item input[type="checkbox"] { margin-top: 0.25rem; width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.checklist-progress { color: var(--text-muted); font-size: 0.9rem; }
.guidance-list { padding-left: 1.2rem; }
.guidance-list li { margin-bottom: 0.5rem; }

.ready-banner {
  background: #fff8e1;
  border: 1px solid #f0dfa0;
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  margin: 1rem 0;
}
.ready-banner.ready-complete { background: #eafaf0; border-color: #b9e6c8; }
.progress-bar {
  height: 0.6rem;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.progress-bar-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.2s ease; }

/* Worksheet Generator */
.worksheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
  flex-wrap: wrap;
}
.answer-key-toggle { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.worksheet-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.worksheet-sheet-header { border-bottom: 2px solid var(--text); padding-bottom: 0.75rem; margin-bottom: 1rem; }
.worksheet-sheet-meta { color: var(--text-muted); font-size: 0.9rem; }
.worksheet-section { margin-bottom: 1.5rem; }
.worksheet-section ol { padding-left: 1.4rem; }
.worksheet-section li { margin-bottom: 0.9rem; line-height: 1.6; }
.write-line { display: inline-block; width: 12rem; border-bottom: 1px solid var(--text-muted); vertical-align: middle; }
.write-line-inline { display: inline-block; width: 8rem; border-bottom: 1px solid var(--text-muted); vertical-align: middle; }
.write-lines { border-bottom: 1px solid var(--text-muted); height: 1.6rem; margin-top: 0.5rem; }
.answer-key { background: #fffaf0; border: 1px dashed #e0c98a; border-radius: var(--radius); padding: 1.25rem; }
.answer-key h2 { margin-top: 0; }

@media print {
  .site-header, .site-footer, .shortlist-actions, .star-btn, .back-link, .no-print { display: none !important; }
  body { background: #fff; }
  main#app { max-width: none; padding: 0; }
  .shortlist-group { break-inside: avoid; }
  .worksheet-sheet { border: none; padding: 0; }
  .worksheet-section { break-inside: avoid; }
  .interview-steps, .interview-footer { display: none !important; }
}
/* ---------- Interview Guide additions ---------- */

.field-hint { color: var(--text-muted); font-size: 0.82rem; }
.save-indicator {
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  align-self: center;
}
.save-indicator.visible { opacity: 1; }

/* STAR letters */
.star-letters { display: flex; flex-direction: column; gap: 1rem; margin: 1rem 0; }
.star-letter-block {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.star-letter-block h3 { margin: 0 0 0.35rem; }
.star-letter-block ul { margin: 0; padding-left: 1.2rem; color: var(--text-muted); }
.star-letter-block li { margin-bottom: 0.3rem; }
.star-letter-badge {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
}

/* Tell Me About Yourself */
.tmay-framework {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.tmay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.tmay-card h3 { margin-top: 0; }
.tmay-prompt { font-weight: 600; margin: 0.3rem 0 0.5rem; }
.tmay-card ul { margin: 0; padding-left: 1.1rem; color: var(--text-muted); font-size: 0.9rem; }

/* Question bank */
.qb-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.75rem; }
.qb-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
}
.qb-tab.active { border-color: var(--brand); color: var(--brand); background: #eef4ff; }
.qb-tab-count { color: inherit; opacity: 0.75; font-weight: 400; }

.qb-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.25rem; }
.qb-filters .form-field-inline { min-width: 180px; }
.qb-count { margin: 0.25rem 0 0.75rem; }

.qb-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.4fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 860px) {
  .qb-layout { grid-template-columns: 1fr; }
}

.qb-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 34rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}
@media (max-width: 860px) {
  .qb-list { max-height: 20rem; }
}

.qb-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.qb-card:hover { border-color: var(--brand); }
.qb-card.selected { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.qb-card-select {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  background: none;
  border: none;
  padding: 0.65rem 2.25rem 0.65rem 0.8rem;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  width: 100%;
}
.qb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.qb-card-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.qb-card-question { font-size: 0.92rem; line-height: 1.35; }
.qb-practiced-check { color: #1c8a4b; font-weight: 700; }
.qb-card .qb-fav-star { position: absolute; top: 0.6rem; right: 0.6rem; font-size: 1.05rem; }

.qb-badge-difficulty { text-transform: capitalize; }
.qb-badge-introductory { background: #eafaf0; border-color: #b9e6c8; }
.qb-badge-intermediate { background: #fff8e1; border-color: #f0dfa0; }
.qb-badge-advanced { background: #fdeaea; border-color: #f3c1c1; }
.qb-badge-star { background: #eef4ff; border-color: #cfe0fb; color: var(--brand-dark); }

.qb-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.qb-detail-header { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.qb-tip-disclosure { margin: 0.5rem 0 1rem; }
.qb-tip-disclosure summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.qb-tip-disclosure p { margin: 0.5rem 0 0; }
.qb-tip-inline { margin: 0.5rem 0 1rem; }

/* Video practice */
.video-practice-panel { margin-top: 1rem; }
.video-preview-wrap {
  background: #10151c;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 32rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-preview-wrap.video-preview-empty { background: var(--bg); border: 1px dashed var(--border); }
.video-preview-placeholder { color: var(--text-muted); font-size: 0.9rem; padding: 1rem; text-align: center; }
.video-preview-el { width: 100%; height: 100%; object-fit: cover; background: #000; }
.video-controls { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.video-practice-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.video-recording-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #b3261e;
}
.rec-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #d32f2f;
  display: inline-block;
  animation: rec-pulse 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .rec-dot { animation: none; }
}
@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.video-error {
  background: #fdeaea;
  border: 1px solid #f3c1c1;
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  color: #7a1f1f;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .video-preview-wrap { max-width: 100%; }
  .qb-filters { flex-direction: column; }
  .qb-filters .form-field-inline { min-width: 0; width: 100%; }
}

@media print {
  .qb-tabs, .qb-filters, .video-practice-panel, .video-controls { display: none !important; }
}
