/* Video Interview Practice — two-column tool (camera stage + settings panel) and
   page-specific explainer pieces. Shared rows and the CTA card live in ../css/tool-pages.css. */

[hidden] { display: none !important; }

/* ── Tool shell ── */
.ip-tool {
  background:
    radial-gradient(ellipse 70% 60% at 15% 0%, rgba(37, 99, 235, 0.16), transparent 70%),
    #05070a;
  padding: clamp(1.25rem, 3vw, 2.25rem) var(--page-pad-inline, 1.25rem) clamp(2rem, 5vw, 3.5rem);
}
.ip-tool__inner { max-width: 1280px; margin: 0 auto; }

.ip-intro { display: grid; gap: 0.75rem 2.5rem; align-items: end; margin-bottom: clamp(1rem, 2.5vw, 1.5rem); }
@media (min-width: 960px) { .ip-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ip-intro__title {
  margin: 0;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.ip-intro__title span { display: block; margin-top: 0.35rem; font-size: 0.5em; letter-spacing: -0.01em; color: var(--accent-bright, #60a5fa); }
.ip-intro__lead { margin: 0 0 0.75rem; color: #cbd5e1; font-size: 1rem; line-height: 1.6; }
.ip-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.ip-chips li {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ip-grid { display: grid; gap: 1rem; }
@media (min-width: 960px) {
  .ip-grid { grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); align-items: stretch; }
}

/* ── Left: stage ── */
.ip-stage {
  position: relative;
  min-height: 440px;
  border-radius: 20px;
  overflow: hidden;
  background: #070b14;
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
@media (min-width: 960px) { .ip-stage { min-height: 600px; } }

.ip-hero { position: absolute; inset: 0; display: flex; align-items: center; padding: clamp(1.5rem, 4vw, 3rem); }
.ip-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 35%; }
.ip-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 9, 18, 0.92) 0%, rgba(5, 9, 18, 0.72) 34%, rgba(5, 9, 18, 0.05) 64%, rgba(5, 9, 18, 0) 100%);
}
.ip-hero__copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; max-width: 20rem; }
.ip-hero__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 0 10px rgba(59, 130, 246, 0.08), 0 0 40px rgba(59, 130, 246, 0.35);
}
.ip-start-btn {
  padding: 1rem 1.9rem;
  border: none;
  border-radius: 999px;
  background: var(--accent, #3b82f6);
  color: #fff;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px var(--glow, rgba(37, 99, 235, 0.35));
  transition: background 0.15s;
}
.ip-start-btn:hover { background: var(--accent-bright, #60a5fa); }
.ip-note { margin: 0; font-size: 0.875rem; line-height: 1.5; color: #94a3b8; }
.ip-hero .ip-note { color: #cbd5e1; }
.ip-privacy { margin: 0; font-size: 0.8125rem; color: #94a3b8; }

@media (max-width: 959px) {
  .ip-hero { align-items: flex-end; }
  .ip-hero__img { object-position: 70% 25%; }
  .ip-hero::after { background: linear-gradient(180deg, rgba(5, 9, 18, 0) 20%, rgba(5, 9, 18, 0.75) 52%, rgba(5, 9, 18, 0.96) 100%); }
  .ip-hero__copy { max-width: none; }
  .ip-hero__icon { display: none; }
}

/* Error panels */
.ip-error {
  position: relative;
  z-index: 2;
  min-height: inherit;
  height: 100%;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: radial-gradient(ellipse at 30% 0%, rgba(127, 29, 29, 0.35), transparent 60%), #070b14;
  color: #e2e8f0;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.ip-error > * { max-width: 560px; }
.ip-error h2 { margin: 0 0 0.6rem; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.2rem; color: #fca5a5; }
.ip-error p { margin: 0 0 0.85rem; }

/* Live view */
.ip-live { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; }
.ip-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.ip-video.is-mirrored { transform: scaleX(-1); }
.ip-video--playback { object-fit: contain; z-index: 1; }

.ip-q {
  position: relative;
  z-index: 2;
  padding: clamp(0.9rem, 2.5vw, 1.4rem) clamp(1rem, 3vw, 1.75rem) 2.5rem;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.75) 65%, rgba(3, 7, 18, 0) 100%);
}
.ip-q__meta { display: block; margin-bottom: 0.35rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #93c5fd; }
.ip-q__text { margin: 0; max-width: 44rem; font-family: var(--font-display, "Sora", sans-serif); font-size: clamp(1.1rem, 2.3vw, 1.5rem); line-height: 1.3; color: #f8fafc; }
.ip-live.is-review .ip-q { padding-bottom: 1rem; background: rgba(3, 7, 18, 0.92); }

.ip-hud {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 2.5rem clamp(1rem, 3vw, 1.75rem) clamp(0.9rem, 2.5vw, 1.25rem);
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.7) 60%, rgba(3, 7, 18, 0) 100%);
}
.ip-live.is-review .ip-hud { padding-top: 0.9rem; background: rgba(3, 7, 18, 0.92); }
.ip-phase {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
}
.ip-phase__dot { width: 9px; height: 9px; border-radius: 50%; background: #facc15; }
.ip-live[data-phase="answer"] .ip-phase { background: rgba(185, 28, 28, 0.85); color: #fff; }
.ip-live[data-phase="answer"] .ip-phase__dot { background: #fff; animation: ip-blink 1s steps(2, start) infinite; }
.ip-live[data-phase="review"] .ip-phase__dot { background: #22c55e; }
@keyframes ip-blink { to { visibility: hidden; } }
.ip-timer {
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.ip-timer.is-low { color: #fca5a5; }
.ip-bar { flex: 1 1 8rem; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.ip-bar__fill { height: 100%; width: 0; background: #60a5fa; transition: width 0.25s linear; }
.ip-live[data-phase="answer"] .ip-bar__fill { background: #ef4444; }
.ip-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; flex-basis: 100%; }

.ghost-btn {
  padding: 0.55rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: #dbeafe;
  font-family: var(--font-display, "Sora", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.ghost-btn:hover { background: rgba(59, 130, 246, 0.3); border-color: rgba(96, 165, 250, 0.6); }
.ghost-btn--primary { background: var(--accent, #3b82f6); border-color: var(--accent, #3b82f6); color: #fff; }
.ghost-btn--primary:hover { background: var(--accent-bright, #60a5fa); }

/* ── Right: panel ── */
.ip-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border-radius: 20px;
  background: linear-gradient(180deg, #0f1a30 0%, #0b1324 100%);
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.ip-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(96, 165, 250, 0.1);
}
.ip-panel__title { margin: 0; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.1rem; color: #f1f5f9; }
.ip-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}
.ip-status__dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.ip-panel[data-state="starting"] .ip-status__dot { background: #facc15; }
.ip-panel[data-state="think"] .ip-status__dot { background: #facc15; }
.ip-panel[data-state="answer"] .ip-status__dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25); }
.ip-panel[data-state="review"] .ip-status__dot { background: #22c55e; }
.ip-panel[data-state="error"] .ip-status__dot { background: #f87171; }

.calc-label { display: block; margin: 0 0 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #64748b; }
.ip-select {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  background: #0a1122;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 10px;
  color: #e2e8f0;
  font: inherit;
  font-size: 0.9375rem;
}
.ip-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.ip-toggle { display: flex; align-items: center; gap: 0.6rem; color: #e2e8f0; font-size: 0.9375rem; cursor: pointer; }
.ip-toggle input { width: 1.1rem; height: 1.1rem; accent-color: #60a5fa; }

.ip-star { display: grid; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.ip-star li {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0.6rem;
  align-items: start;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #0a1122;
  border: 1px solid rgba(96, 165, 250, 0.14);
  font-size: 0.875rem;
  line-height: 1.4;
  color: #cbd5e1;
}
.ip-star b {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
  font-family: var(--font-display, "Sora", sans-serif);
}
.ip-star strong { color: #f1f5f9; }
.ip-count { margin: 0; color: #cbd5e1; font-size: 0.9375rem; }
.ip-count strong { color: #fff; font-variant-numeric: tabular-nums; }
.ip-panel .ip-note a { color: #93c5fd; }

/* ── Explainer pieces ── */
.ip-steps { max-width: 44rem; margin: 2rem auto 0; padding-left: 1.3rem; display: grid; gap: 0.6rem; color: #cbd5e1; line-height: 1.65; }
.ip-steps strong { color: #f1f5f9; }

.ip-flow {
  display: grid;
  gap: 0.6rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: 18px;
  background: #0b1324;
  border: 1px solid rgba(96, 165, 250, 0.16);
  counter-reset: flow;
}
.ip-flow__step { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.8rem; align-items: center; padding: 0.7rem 0.8rem; border-radius: 12px; background: #0f1a30; }
.ip-flow__step::before {
  counter-increment: flow;
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
  font-family: var(--font-display, "Sora", sans-serif);
  font-weight: 700;
}
.ip-flow__step strong { display: block; color: #f1f5f9; font-size: 0.95rem; }
.ip-flow__step span { color: #94a3b8; font-size: 0.85rem; line-height: 1.4; }
.ip-flow figcaption, .ip-starfig figcaption { margin-top: 0.4rem; color: #94a3b8; font-size: 0.85rem; }

.ip-starfig {
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: 18px;
  background: #0b1324;
  border: 1px solid rgba(96, 165, 250, 0.16);
}
.ip-starfig .ip-star li { background: #0f1a30; font-size: 0.9rem; }

.ip-bank { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 820px) { .ip-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ip-bank__cat {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: 16px;
  background: #0b1324;
  border: 1px solid rgba(96, 165, 250, 0.14);
}
.ip-bank__cat h3 { margin: 0 0 0.75rem; font-family: var(--font-display, "Sora", sans-serif); font-size: 1.15rem; color: #f1f5f9; }
.ip-bank__cat ol { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.4rem; color: #cbd5e1; line-height: 1.5; font-size: 0.95rem; }

.ip-round { display: grid; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.ip-round li {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: #0a1122;
  border: 1px solid rgba(96, 165, 250, 0.14);
  font-size: 0.875rem;
  color: #cbd5e1;
}
.ip-round strong { font-family: var(--font-display, "Sora", sans-serif); color: #f1f5f9; font-variant-numeric: tabular-nums; }
.tool-row .tool-steps + p { margin-top: 0.9rem; }

/* Review: the recording sits between the question and the buttons, so its own
   play / pause / seek controls are never covered by the overlays. */
.ip-live.is-review .ip-q { order: 0; }
.ip-live.is-review .ip-video--playback {
  order: 1;
  position: relative;
  inset: auto;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  width: 100%;
}
.ip-live.is-review .ip-hud { order: 2; margin-top: 0; }
