/* =========================================
   Petra Coaching — Interview Designer
   Depends on: styles.css (design tokens)
   ========================================= */

/* ---- Container ---- */
.id-container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 0 80px;
  min-height: calc(100vh - var(--nav-h) - 180px);
}

.id-container:has(.id-landing) {
  max-width: 960px;
}

/* ---- Step Progress ---- */
.id-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 48px;
}

.id-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
}

.id-step-dot.active {
  background: var(--navy);
  transform: scale(1.4);
}

.id-step-dot.done {
  background: var(--amber);
}

/* ---- Eyebrow ---- */
.id-eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 10px;
}

/* ---- Screen: Landing (Screen 0) ---- */
.id-landing {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.id-landing-header {
  margin-bottom: 48px;
}

.id-landing h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 20px;
}

.id-landing .id-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--body-text);
  max-width: 600px;
  margin-bottom: 32px;
}

.id-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.id-stat-card {
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
}

.id-stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 6px;
}

.id-stat-label {
  font-size: 0.85rem;
  color: var(--body-text);
  line-height: 1.5;
}

.id-stat-source {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 6px;
}

.id-warning-box {
  background: #FFF8E6;
  border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  margin-bottom: 36px;
}

.id-warning-box p {
  font-size: 0.9rem;
  color: var(--body-text);
  margin: 0;
}

.id-warning-box strong {
  color: var(--navy);
}

.id-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---- Screen: Sample (Screen 1) ---- */
.id-sample {
  display: flex;
  flex-direction: column;
}

.id-sample h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.id-sample .id-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 32px;
}

.id-sample-card {
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.id-sample-card h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 12px;
}

.id-sample-company {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.id-sample-role {
  font-size: 0.95rem;
  color: var(--body-text);
  margin-bottom: 0;
}

.id-competency-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.id-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--body-text);
  font-family: var(--font-sans);
}

.id-chip-num {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.7rem;
  margin-right: 4px;
}

.id-chip.id-chip-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.id-chip.id-chip-amber {
  background: #FFF8E6;
  border-color: var(--amber);
  color: var(--amber-text);
}

.id-sample-rounds {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}

.id-sample-round {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}

.id-sample-round-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.id-round-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.id-sample-round-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  margin: 0;
  flex: 1;
}

.id-sample-round-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.id-sample-q {
  font-size: 0.85rem;
  color: var(--body-text);
  font-style: italic;
  padding-left: 40px;
}

/* ---- Screen: Company Context (Screen 2) ---- */
.id-form-screen {
  display: flex;
  flex-direction: column;
}

.id-form-screen h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.id-form-screen .id-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Tab Switcher */
.id-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}

.id-tab {
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.id-tab.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.id-tab-panel {
  display: none;
}

.id-tab-panel.active {
  display: block;
}

/* Form fields */
.id-field {
  margin-bottom: 20px;
}

.id-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--body-text);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.id-label .id-optional {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

.id-input,
.id-textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--body-text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.id-input:focus,
.id-textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 36, 97, 0.1);
}

.id-textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

.id-textarea.id-jd {
  min-height: 200px;
}

.id-helper {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
}

/* ---- Screen: Competencies (Screen 3) ---- */
.id-comp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.id-comp-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.id-comp-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  font-family: var(--font-sans);
}

.id-comp-body {
  flex: 1;
  min-width: 0;
}

.id-comp-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 2px;
}

.id-comp-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.id-comp-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.id-comp-remove:hover {
  color: var(--error);
  background: var(--error-bg);
}

.id-comp-counter {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.id-comp-counter .id-count-num {
  font-weight: 700;
  color: var(--navy);
}

.id-add-comp-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.id-add-comp-row .id-input {
  flex: 1;
}

/* ---- Screen: Role Input (Screen 4) ---- */
/* Uses .id-form-screen */

/* ---- Screen: Interview Loop (Screen 5) ---- */
.id-loop-intro {
  margin-bottom: 32px;
}

.id-loop-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.id-loop-intro .id-sub {
  font-size: 0.9rem;
  color: var(--muted);
}

.id-rounds {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 36px;
}

.id-round-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.id-round-head {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy);
  padding: 14px 20px;
}

.id-round-head .id-round-num {
  background: var(--amber);
  color: var(--navy);
  font-size: 0.75rem;
}

.id-round-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  flex: 1;
}

.id-round-meta-row {
  display: flex;
  gap: 20px;
  padding: 12px 20px;
  background: var(--snow);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.id-round-meta-item strong {
  color: var(--body-text);
}

.id-round-purpose {
  padding: 10px 20px 14px;
  font-size: 0.85rem;
  color: var(--body-text);
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}

.id-questions {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.id-question-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.id-question-option:hover {
  border-color: var(--sky);
  background: #F0F8FC;
}

.id-question-option.selected {
  border-color: var(--navy);
  background: #F0F3FB;
}

.id-question-option input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--navy);
}

.id-question-body {
  flex: 1;
  min-width: 0;
}

.id-question-type {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 5px;
}

.id-question-text {
  font-size: 0.9rem;
  color: var(--body-text);
  line-height: 1.5;
  font-weight: 500;
}

.id-question-competency {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 3px;
}

.id-select-hint {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0 20px 8px;
}

/* ---- Screen: Final Plan (Screen 6) ---- */
.id-plan-header {
  margin-bottom: 32px;
}

.id-plan-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.id-plan-header .id-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.id-plan-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.id-plan-section {
  margin-bottom: 36px;
}

.id-plan-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--navy);
}

.id-plan-section-head h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0;
}

.id-copy-btn {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.id-copy-btn:hover {
  color: var(--navy);
  border-color: var(--navy);
}

.id-copy-btn.copied {
  color: #1a7a4a;
  border-color: #1a7a4a;
}

.id-comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.id-comp-table th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 10px 14px;
}

.id-comp-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--body-text);
  vertical-align: top;
  line-height: 1.5;
}

.id-comp-table tr:nth-child(even) td {
  background: var(--snow);
}

.id-comp-info-btn {
  background: none;
  border: none;
  padding: 0 0 0 6px;
  color: var(--navy, #122461);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
  opacity: 0.8;
}
.id-comp-info-btn:hover { opacity: 1; }

.id-comp-def-row td {
  background: #f0f6ff !important;
  padding: 8px 14px 10px 24px;
  font-size: 0.82rem;
  color: #4a5568;
  line-height: 1.55;
  border-bottom: 1px solid var(--border);
}

.id-matrix-subhead {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 10px 0;
}

@media print {
  .id-comp-def-row { display: table-row !important; }
  .id-comp-info-btn { display: none; }
}

.id-plan-round {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.id-plan-round-head {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  padding: 14px 20px;
}

.id-plan-round-head .id-round-num {
  background: var(--amber);
  color: var(--navy);
}

.id-plan-round-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  flex: 1;
}

.id-plan-round-meta {
  display: flex;
  gap: 20px;
  padding: 10px 20px;
  background: var(--snow);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.id-plan-round-meta strong {
  color: var(--body-text);
}

.id-plan-questions {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.id-plan-question {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.id-plan-question:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.id-plan-question-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 6px;
}

.id-plan-question-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 10px;
}

.id-plan-probes {
  margin-bottom: 12px;
}

.id-plan-probes-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--body-text);
  margin-bottom: 4px;
}

.id-plan-probes ul {
  list-style: disc;
  padding-left: 18px;
}

.id-plan-probes ul li {
  font-size: 0.85rem;
  color: var(--body-text);
  line-height: 1.5;
  margin-bottom: 2px;
}

.id-plan-wgl {
  background: #F0F3FB;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.id-plan-wgl-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  margin-bottom: 4px;
}

.id-plan-wgl-text {
  font-size: 0.85rem;
  color: var(--body-text);
  line-height: 1.5;
}

.id-rubric-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.id-rubric-table th {
  background: var(--snow);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  color: var(--body-text);
}

.id-rubric-table td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: top;
  color: var(--body-text);
  line-height: 1.4;
}

.id-rubric-table td.rubric-score {
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.id-scoring-guide {
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--body-text);
  line-height: 1.6;
}

/* ---- Loading State ---- */
.id-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  gap: 20px;
}

.id-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: id-spin 0.8s linear infinite;
}

@keyframes id-spin {
  to { transform: rotate(360deg); }
}

.id-loading-msg {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.id-loading-detail {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ---- Generation progress steps ---- */
.id-gen-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  max-width: 440px;
  width: 100%;
}

.id-gen-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--muted);
}

.id-gen-step.active {
  color: var(--navy);
}

.id-gen-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 4px;
}

.id-gen-step.active .id-gen-step-dot {
  background: var(--navy);
  border-color: var(--navy);
  animation: id-pulse 1.2s ease-in-out infinite;
}

@keyframes id-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.id-gen-step.pending .id-gen-step-dot {
  border-color: var(--border);
}

.id-gen-step-detail {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.id-gen-step.done {
  color: #374151;
}

.id-gen-step.done .id-gen-step-dot {
  background: #22c55e;
  border-color: #22c55e;
  animation: none;
}

.id-gen-step.error {
  color: var(--error, #8b2020);
}

.id-gen-step.error .id-gen-step-dot {
  background: var(--error, #8b2020);
  border-color: var(--error, #8b2020);
  animation: none;
}

.id-retry-btn {
  background: none;
  border: 1px solid var(--error, #8b2020);
  color: var(--error, #8b2020);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
}

.id-retry-btn:hover {
  background: var(--error-bg, #fff3f3);
}

/* ---- Inline meta loading / error (coverage, debrief) ---- */
.id-meta-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 16px 0;
}

.id-spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: id-spin 0.8s linear infinite;
  flex-shrink: 0;
}

.id-meta-error {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 12px 0;
}

/* ---- Error / Info Banners ---- */
.id-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--error);
  margin-bottom: 16px;
}

.id-info {
  background: #EEF4FF;
  border: 1px solid #BDCFFF;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #1a2f80;
  margin-bottom: 16px;
}

/* ---- Buttons ---- */
.id-btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 28px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  border: 2px solid var(--navy);
  border-radius: 4px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  transition: color 0.2s;
}

.btn-secondary:hover {
  color: var(--navy);
}

/* ---- Utility ---- */
.id-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.id-mt-8 { margin-top: 8px; }
.id-mt-16 { margin-top: 16px; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .id-stat-grid {
    grid-template-columns: 1fr;
  }

  .id-cta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .id-plan-round-meta {
    flex-direction: column;
    gap: 4px;
  }

  .id-rubric-table {
    font-size: 0.72rem;
  }

  .id-rubric-table th,
  .id-rubric-table td {
    padding: 6px 6px;
  }
}

/* ---- Job Description Block ---- */
.id-jd-block {
  padding: 4px 0;
}

.id-jd-hook {
  font-size: 1rem;
  color: var(--body-text);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.id-jd-h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 20px 0 8px;
}

.id-jd-list {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 8px;
}

.id-jd-list li {
  font-size: 0.9rem;
  color: var(--body-text);
  line-height: 1.6;
  margin-bottom: 4px;
}

.id-jd-about {
  font-size: 0.9rem;
  color: var(--body-text);
  line-height: 1.6;
}

/* ---- Coverage Matrix Badges ---- */
.id-badge-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 2px 8px;
}

.id-badge-secondary {
  display: inline-block;
  background: var(--snow);
  color: var(--muted);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 2px 8px;
}

/* ---- Candidate Notes ---- */
.id-candidate-note {
  background: #F0F8FC;
  border-left: 3px solid var(--sky);
  padding: 10px 14px;
  margin: 0 0 0;
  font-size: 0.85rem;
  color: var(--body-text);
  line-height: 1.6;
}

.id-candidate-note-label {
  font-weight: 700;
  color: var(--navy);
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

/* ---- Debrief Protocol ---- */
.id-calibration-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #FFF8EC;
  border: 1px solid #F59E0B;
  border-left: 4px solid #F59E0B;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--body-text);
  line-height: 1.6;
}

.id-calibration-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.id-debrief-note {
  font-size: 0.85rem;
  color: var(--body-text);
  background: #EBF4FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.55;
}

.id-debrief-block {
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}

.id-debrief-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.id-debrief-list li {
  font-size: 0.9rem;
  color: var(--body-text);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.id-debrief-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--amber-text);
  font-weight: 700;
}

/* ---- JD Banner (values screen) ---- */
.id-jd-banner {
  background: #FFF8E6;
  border-left: 3px solid var(--amber, #F4A500);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  font-size: 0.83rem;
  color: var(--navy, #122461);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* ---- Source pill (competency screen) ---- */
.id-comp-source-row {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.id-source-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--navy, #122461);
  color: var(--navy, #122461);
  border-radius: 10px;
  padding: 2px 8px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ---- Success anchor (role screen) ---- */
.id-success-anchor-section {
  margin-bottom: 20px;
}

.id-success-anchor-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.id-success-anchor-toggle:hover {
  border-color: var(--navy);
  background: var(--snow);
}

.id-success-anchor-icon {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy, #122461);
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.id-success-anchor-panel {
  padding: 12px 0 0;
}

.id-success-anchor-panel[hidden] {
  display: none;
}

/* ---- Auto-assign question card (Screen 5) ---- */
.id-questions-wrap {
  padding: 16px 20px;
}

.id-autoq-card {
  border: 2px solid var(--navy, #122461);
  border-left: 4px solid var(--navy, #122461);
  border-radius: 8px;
  padding: 14px 16px;
  background: #F0F3FB;
  margin-bottom: 12px;
}

.id-autoq-card .id-question-text {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.5;
  margin: 6px 0 4px;
}

.id-autoq-card .id-question-competency {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---- Alternates toggle ---- */
.id-altq-toggle {
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy, #122461);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: block;
  margin-bottom: 10px;
}

.id-altq-toggle:hover { color: var(--navy-deep, #0c1840); }

.id-altq-list[hidden] { display: none; }

.id-altq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.id-altq-card {
  border: 1px solid #ccd9f0;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--white);
}

.id-altq-card .id-question-text {
  font-size: 0.87rem;
  color: var(--body-text);
  line-height: 1.5;
  margin: 5px 0 3px;
}

.id-altq-card .id-question-competency {
  font-size: 0.73rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.id-swap-btn {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.id-swap-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ---- Pre-debrief contamination warning ---- */
.id-predebrief-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fffbf0;
  border: 1px solid #f5a623;
  border-left: 3px solid #f5a623;
  border-radius: 0 6px 6px 0;
  padding: 14px 18px;
  font-size: 0.87rem;
  color: var(--body-text);
  line-height: 1.6;
  margin-bottom: 20px;
}

.id-predebrief-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
  color: #d97706;
}

/* ---- Split panel protocol (collapsible inside debrief) ---- */
.id-split-protocol {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.id-split-protocol summary {
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--navy, #122461);
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
}

.id-split-protocol summary::-webkit-details-marker { display: none; }
.id-split-protocol summary::marker { display: none; }

.id-split-protocol-body {
  margin-top: 10px;
  background: #f0f4ff;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--body-text);
  line-height: 1.6;
}

@media print {
  .id-split-protocol { display: block !important; }
  .id-split-protocol-body { display: block !important; }
  .id-altq-toggle, .id-altq-list, .id-success-anchor-section { display: none !important; }
}

/* ---- Recruiter Screen Checklist ---- */
.id-recruiter-checklist {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.id-cl-category {
  background: var(--snow, #F7F8FA);
  border-radius: 6px;
  padding: 12px 16px;
}

.id-cl-category-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-text, #946800);
  margin-bottom: 8px;
}

.id-cl-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.id-cl-item {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink, #0D0F1A);
  padding-left: 20px;
  position: relative;
}

.id-cl-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--border, #E4E6EC);
  border-radius: 2px;
  background: #fff;
}

.id-situational-block {
  border-top: 1px solid var(--border, #E4E6EC);
  padding-top: 16px;
  margin-top: 4px;
}

.id-situational-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #666F7D);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.id-situational-question {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink, #0D0F1A);
  line-height: 1.5;
  margin-bottom: 10px;
}

.id-clf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.id-clf-table th {
  background: var(--snow, #F7F8FA);
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  border: 1px solid var(--border, #E4E6EC);
}

.id-clf-table td {
  padding: 8px 10px;
  border: 1px solid var(--border, #E4E6EC);
  vertical-align: top;
  line-height: 1.4;
}

.id-clf-unclear {
  color: #92400e;
  background: #fffbeb;
}

.id-clf-redflag {
  color: #991b1b;
  background: #fff1f2;
}

/* ---- Print ---- */
@media print {
  .site-nav,
  .site-footer,
  .id-plan-actions,
  .id-btn-row,
  .id-copy-btn,
  .id-progress,
  .cta-band {
    display: none !important;
  }

  .id-container {
    padding: 0;
    max-width: 100%;
    width: 100%;
  }

  .id-plan-round,
  .id-plan-section {
    break-inside: avoid;
  }
}

/* ---- Screen 5: Interviewer Lineup ---- */
.id-lineup-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}

.id-lineup-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.id-lineup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--navy);
  gap: 10px;
}

.id-lineup-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.id-lineup-duration {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
  flex-shrink: 0;
  font-family: var(--font-sans);
}

/* Type badges for lineup */
.id-type-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.id-type-badge-recruiter {
  background: var(--amber);
  color: var(--navy);
}

.id-type-badge-working {
  background: var(--navy-deep, #0c1840);
  color: #fff;
}

.id-type-badge-standard {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

.id-lineup-body {
  padding: 14px 16px;
}

.id-lineup-field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}

@media (max-width: 560px) {
  .id-lineup-field-pair {
    grid-template-columns: 1fr;
  }
}

.id-label-sm {
  font-size: 0.72rem;
}

.id-load-counter {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 16px;
  margin-bottom: 4px;
}

.id-add-cointerviewer,
.id-remove-cointerviewer {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}

.id-add-cointerviewer {
  color: var(--navy, #122461);
}

.id-add-cointerviewer:hover {
  color: var(--navy);
}

.id-remove-cointerviewer {
  color: var(--muted);
  margin-top: 8px;
}

.id-remove-cointerviewer:hover {
  color: var(--error);
}

.id-panel-fields {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.id-panel-confirm {
  margin-top: 10px;
}

.id-panel-confirm-error .id-checkbox-label {
  color: var(--error);
}

.id-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--body-text);
  cursor: pointer;
  line-height: 1.4;
}

.id-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--navy);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.id-lineup-card-error {
  font-size: 0.78rem;
  color: var(--error);
  margin-top: 6px;
}

.id-lineup-footer {
  border-top: 1px solid var(--border);
  padding: 8px 16px 10px;
}

.id-lineup-footer-toggle {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.id-lineup-footer-toggle:hover {
  color: var(--navy);
}

.id-lineup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.id-chip {
  display: inline-block;
  background: var(--snow);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--body-text);
  padding: 3px 10px;
  font-family: var(--font-sans);
}

.id-chip-sm {
  font-size: 0.7rem;
  padding: 2px 8px;
}

.id-lineup-purpose {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.id-lineup-add-round {
  display: block;
  background: none;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  width: 100%;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 20px;
  transition: color 0.2s, border-color 0.2s;
}

.id-lineup-add-round:hover {
  color: var(--navy);
  border-color: var(--navy);
}

.id-lineup-cta-block {
  margin-top: 24px;
}

.id-lineup-cta-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

.id-lineup-reset-row {
  margin-top: 14px;
}

.id-lineup-reset-link {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.id-lineup-reset-link:hover {
  color: var(--navy);
}

/* ---- Retry/Rebuild Modal ---- */
.id-retry-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.id-retry-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.id-retry-modal-box {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.id-retry-modal-box h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.id-retry-modal-box p {
  font-size: 0.875rem;
  color: var(--body-text);
  line-height: 1.6;
}

.id-retry-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.id-retry-modal-close:hover {
  color: var(--navy);
}

/* ---- Screen 6: Competency Assignment ---- */
.id-assign-section {
  margin-bottom: 32px;
}

.id-assign-grid-heading {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.id-assign-grid-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Coverage grid */
.id-grid-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.id-assign-grid {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.82rem;
}

.id-assign-grid-th {
  background: var(--snow);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.id-assign-grid-th:first-child {
  text-align: left;
  min-width: 160px;
}

.id-assign-grid-name {
  padding: 8px 12px;
  font-weight: 600;
  color: var(--body-text);
  /* Sticky first column for horizontal scroll on mobile */
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--white);
  border-right: 1px solid var(--border);
}

.id-assign-grid-row--uncovered .id-assign-grid-name {
  background: #FFF3F3;
}

.id-assign-grid-row--validated .id-assign-grid-name {
  background: #EFF8FF;
}

.id-assign-grid-cell {
  padding: 8px 12px;
  text-align: center;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.id-assign-grid-cell--checked {
  color: var(--navy);
  font-weight: 700;
}

.id-assign-grid tr:last-child td {
  border-bottom: none;
}

.id-assign-grid-row--uncovered {
  background: #FFF3F3;
}

.id-assign-grid-row--validated {
  background: #EFF8FF;
}

.id-assign-uncovered-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--error);
  margin-left: 6px;
  vertical-align: middle;
}

.id-assign-validated-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--navy, #122461);
  margin-left: 6px;
  vertical-align: middle;
  background: #EFF8FF;
  border-radius: 3px;
  padding: 1px 4px;
}

/* Assignment cards */
.id-assign-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.id-assign-card .id-lineup-header {
  align-items: center;
}

.id-assign-card-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.id-assign-slot-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
  font-family: var(--font-sans);
}

.id-assign-card-body {
  padding: 14px 16px;
}

.id-assign-card-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.id-assign-added-note {
  margin-bottom: 12px;
}

.id-assign-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.id-assign-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--body-text);
  cursor: pointer;
  line-height: 1.4;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.id-assign-label:hover {
  background: var(--snow);
}

.id-assign-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--navy);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.id-assign-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.id-assign-label--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.id-assign-label--disabled input[type="checkbox"] {
  cursor: not-allowed;
}

.id-assign-max-msg {
  font-size: 0.78rem;
  color: var(--amber-text);
  background: #FFF8E6;
  border-left: 3px solid var(--amber);
  padding: 8px 10px;
  border-radius: 0 4px 4px 0;
  margin-top: 10px;
}

@media (max-width: 560px) {
  .id-assign-grid-th,
  .id-assign-grid-name,
  .id-assign-grid-cell {
    padding: 6px 8px;
    font-size: 0.75rem;
  }
}
