.interview-page {
  --ink: #171b36;
  --quiet: #4d5a4b;
  --green: #355b46;
  --cream: #faf1de;
  --display: Georgia, "Times New Roman", serif;
  color: var(--ink);
}

.khattaba-experience {
  min-height: 100dvh;
  background: #ecefdf url("/interview/interview-light.jpg") center top / 100% max(100dvh, 880px) no-repeat;
}

.interview-page .masthead {
  position: relative;
  justify-content: center;
  padding: 21px 16px 12px;
  border: 0;
}

.interview-page .brand {
  gap: 13px;
  font-size: clamp(18px, 4.8vw, 26px);
  letter-spacing: -.025em;
  line-height: 1;
}

.interview-page .wordmark {
  display: block;
  padding: 10px 10px 11px;
  font-size: clamp(21px, 5.7vw, 29px);
  line-height: 1;
  background: #dce4d2;
  color: var(--ink);
}

.research-badge {
  position: absolute;
  top: 13px;
  left: clamp(10px, 3vw, 28px);
  padding: 4px 7px;
  border: 1px solid #aeba9f;
  border-radius: 20px;
  background: #f8f5e8;
  color: var(--green);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.interview-page .preview-label {
  position: absolute;
  top: 17px;
  right: clamp(13px, 3vw, 28px);
  color: var(--quiet);
  white-space: nowrap;
  font-size: 10px;
  gap: 4px;
}

.interview-page .preview-label i { width: 5px; height: 5px; background: #918675; }
.interview-page .preview-label[data-live="true"] i { background: #5b8263; }

.interview-page main {
  width: 100%;
  max-width: 770px;
  margin-inline: auto;
  padding: 0 0 14px;
}

.interview-page .stage {
  overflow: visible;
  justify-content: start;
  min-height: 0;
  padding: 17px 12px 0;
  background: transparent;
  text-align: center;
}

.interview-page h1,
#draft-title {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.042em;
}

.interview-page h1 {
  font-size: clamp(32px, 8.7vw, 46px);
  line-height: 1.12;
  text-wrap: balance;
}

.interview-page .portrait-wrap {
  width: min(69vw, 298px);
  max-width: 86%;
  margin: 34px 0 32px;
}

.interview-page .portrait { filter: none; }

.interview-page .portrait-wrap::before,
.interview-page .portrait-wrap::after {
  content: "";
  position: absolute;
  border: 1px solid #9aaf9073;
  border-radius: 50%;
  pointer-events: none;
}

.interview-page .portrait-wrap::before { inset: -20px; }
.interview-page .portrait-wrap::after { inset: -29px; border-color: #aabb9a45; }
.interview-page .portrait-ring { inset: -12px; border-color: #829d7e; }
.interview-page .stage[data-state="listening"] .portrait-ring { inset: -13px; border-color: #729672; }
.interview-page .stage[data-state="thinking"] .portrait-ring { inset: -12px; border-color: #978ca1; }
.interview-page .stage[data-state="speaking"] .portrait-ring { inset: -14px; border-color: #a88b68; }

.portrait-invitation {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: white;
}

.mic-seal {
  position: absolute;
  bottom: 2%;
  right: 2%;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 2px solid #f4f1dd;
  border-radius: 50%;
  background: #3e6850;
  box-shadow: 0 4px 14px #415c4338;
  transition: transform .2s, background .2s;
}

.mic-seal svg { width: 19px; height: 19px; }
.portrait-invitation:hover .mic-seal { background: #294d37; transform: scale(1.05); }
.portrait-invitation:disabled { cursor: default; }

.scene-status {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--green);
  font-size: 15px;
  font-style: italic;
  font-weight: 600;
}

.interview-page .state-indicator { height: 18px; margin: 0; gap: 5px; }
.interview-page .state-indicator span { background: #87a382; width: 5px; height: 5px; border-radius: 5px; }
.interview-page .stage[data-state="thinking"] .state-indicator span { background: #8b8196; }
.interview-page .stage[data-state="speaking"] .state-indicator span { background: #9b785a; }
.review-label { display: none; }

#scene-caption { width: min(100vw - 36px, 615px); margin-inline: auto; }

.spoken-caption {
  margin: 18px auto 0;
  font-family: var(--display);
  font-size: clamp(23px, 6.4vw, 35px);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.spoken-caption:empty { margin: 0; }
.spoken-caption:dir(rtl) { font-family: "Segoe UI", Tahoma, Arial, sans-serif; font-weight: 650; }
.spoken-caption[data-long="true"] { font-size: clamp(18px, 4.95vw, 25px); }

.scene-hint, .draft-hint {
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.55;
}
.scene-hint { margin-top: 7px; }

.draft-summary {
  width: min(100%, 555px);
  margin: 22px auto 0;
  text-align: center;
}

.notebook {
  padding: 0 24px;
}

#draft-title { font-size: 27px; line-height: 1.12; }
#draft-count { color: var(--quiet); font-size: 12px; }
.draft-status { color: var(--green); font-size: 12px; font-weight: 700; }
.interview-page:has(.interview-map:not([hidden])) .draft-summary .notebook {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
}

.interview-map {
  width: min(100% - 34px, 422px);
  margin: 0 auto 20px;
  padding: 14px 16px 16px;
  text-align: start;
  background: #f8f5e8c9;
  border: 1px solid #aeba9f70;
  border-radius: 14px;
}

.interview-map h3 {
  margin: 0;
  font: 400 23px/1.2 var(--display);
}

.path-side { margin: 2px 0 10px; color: var(--green); font-size: 11px; }
.path-nodes, .path-branch { list-style: none; margin: 0; padding: 0; }
.path-nodes { margin-inline-start: 6px; border-inline-start: 1px solid #b0bda5; }
.path-node { position: relative; padding: 2px 0 2px 13px; }
.path-node::before {
  content: "";
  position: absolute;
  top: 14px;
  inset-inline-start: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid #759071;
  border-radius: 50%;
  background: #f7f5e8;
}
.path-node[data-status="answered"]::before { background: #759071; }
.path-node[aria-current]::before { background: #355b46; box-shadow: 0 0 0 3px #d3e0cb; }
.path-branch { margin-inline-start: 8px; border-inline-start: 1px dashed #a4b399; }
.path-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  min-height: 26px;
  padding: 4px 7px;
  border-radius: 6px;
}
.path-node[aria-current] > .path-line { background: #dce8d5; }
.path-title { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.path-condition { display: block; color: var(--green); font-size: 10px; font-weight: 600; }
.path-status { flex: none; color: var(--green); font-size: 10px; }
.path-node[aria-current] > .path-line .path-status { font-weight: 700; }

.topic-trail {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  position: relative;
  padding: 0;
  margin: 20px clamp(18px, 10vw, 50px) 14px;
}

.topic-trail:empty { display: none; }
.topic-trail::before {
  content: "";
  position: absolute;
  top: 7px;
  inset-inline: 10%;
  height: 1px;
  background: #a2b596;
}

.trail-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  font-style: italic;
  line-height: 1.2;
  text-align: center;
}

.trail-knot {
  width: 15px;
  height: 15px;
  border: 1.5px solid #527558;
  border-radius: 50%;
  background: #f2f1e3;
}

.trail-step[data-recorded="true"] .trail-knot {
  background: #597d59;
  border-color: #597d59;
}

.trail-step[aria-current="step"] .trail-knot { outline: 1px solid #60865b; outline-offset: 3px; }
.trail-step[aria-current="step"] { font-weight: 700; }

.draft-hint { padding: 0 22px; }
.live-note {
  width: min(100% - 34px, 422px);
  margin: 0 auto 14px;
  padding: 10px 16px;
  text-align: start;
  border: 1px solid #aeba9f70;
  border-radius: 14px;
  background: #f8f5e8e8;
}
.live-note h3 { margin: 0 0 4px; color: var(--green); font-size: 12px; }
.live-note dl { margin: 0; }
.live-note .note-detail { border-top: 0; }
.live-note p { margin: 1px 0 0; color: var(--quiet); font-size: 11px; }
.draft-glimpse { margin: 18px auto 0; width: min(100% - 44px, 470px); text-align: start; }
.note-topic h3 { color: var(--green); font-size: 11px; margin: 12px 0 5px; }
.note-topic dl { margin: 0; }
.note-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #71806538;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.note-detail dt { color: var(--quiet); }
.note-detail dd { margin: 0; font-weight: 600; }

.interview-page[data-scene="review"] .khattaba-experience {
  background: #eee2cb url("/interview/interview-dusk.jpg") center top / 100% max(100dvh, 845px) no-repeat;
}

.interview-page[data-scene="review"] .masthead { color: #fcf2df; }
.interview-page[data-scene="review"] .preview-label { color: #f0e7d7; }
.interview-page[data-scene="review"] .stage { padding-top: 10px; }
.interview-page[data-scene="review"] .stage h1,
.interview-page[data-scene="review"] #state-title {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.interview-page[data-scene="review"] .portrait-wrap { width: min(63vw, 259px); margin: 1px 0 26px; }
.interview-page[data-scene="review"] .portrait-wrap::before,
.interview-page[data-scene="review"] .portrait-wrap::after { display: none; }
.interview-page[data-scene="review"] .stage .portrait-ring { inset: -2px; border: 2px solid #c9e4ee; opacity: 1; }

.interview-page[data-scene="review"] .scene-status {
  flex-direction: column;
  gap: 4px;
  color: #fff5e3;
  font: italic 16px/1.25 var(--display);
}
.interview-page[data-scene="review"] .state-indicator { height: 20px; }
.interview-page[data-scene="review"] .state-indicator span { background: #c6d3b9; }
.interview-page[data-scene="review"] .review-label { display: block; }
.interview-page[data-scene="review"] .draft-summary { margin-top: 15px; width: min(100%, 520px); }

.interview-page[data-scene="review"] .notebook {
  min-height: clamp(272px, 76vw, 325px);
  padding: clamp(28px, 8vw, 42px) clamp(37px, 11vw, 62px) clamp(31px, 9vw, 44px);
  background: url("/interview/profile-notebook.png") center / 100% 100% no-repeat;
}

.interview-page[data-scene="review"] #draft-title {
  font-size: clamp(25px, 6.7vw, 36px);
  padding-bottom: 10px;
  border-bottom: 1px solid #8a9570;
}
.interview-page[data-scene="review"] #draft-count { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.brief-focus { margin-top: 11px; text-align: start; }
.brief-topic { margin: 0 0 6px; color: #4d6550; font-size: 11px; font-weight: 650; }
.brief-lines { margin: 0; }

.brief-line {
  padding: 8px 10px;
  border-inline-start: 3px solid transparent;
  border-radius: 7px;
  overflow-wrap: anywhere;
}
.brief-line + .brief-line { margin-top: 4px; }
.brief-line[data-focused="true"] { border-inline-start-color: #bd8335; background: #edcb886b; }
.brief-line dt { color: #4b5f4e; font-size: 13px; font-weight: 650; }
.brief-line dd { font: clamp(19px, 5.6vw, 26px)/1.22 var(--display); margin: 2px 0 0; }
.brief-priority { display: block; color: #5f492a; font: 600 11px/1.5 "Segoe UI", Arial, sans-serif; margin-top: 3px; }

#review-caption .spoken-caption { font-size: clamp(20px, 5.5vw, 27px); margin-top: 13px; }
#review-caption .spoken-caption[data-long="true"] { font-size: clamp(18px, 4.65vw, 23px); }
.interview-page[data-scene="review"] .draft-status {
  display: inline-block;
  padding: 2px 9px;
  margin: 10px auto 4px;
  border-radius: 20px;
  background: #e0e3d0;
}
.interview-page[data-scene="review"] .draft-hint { font-style: italic; padding-inline: 28px; }

.interview-error {
  margin-top: 12px;
  max-width: 48ch;
  color: #7d3128;
  font-size: 13px;
}

.interview-page footer { justify-content: center; text-align: center; padding: 14px 22px 4px; }
.interview-page footer p { flex: unset; color: var(--quiet); }
.sr-only {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

@media (min-width: 700px) {
  .khattaba-experience {
    background-size: 100% max(100dvh, 890px);
  }
  .interview-page[data-scene="review"] .khattaba-experience {
    background: #eee2cb url("/interview/review-room.jpg") center top / 100% 890px no-repeat;
  }
}

@media (max-width: 480px) {
  .interview-page .masthead { padding-top: 39px; }
  .research-badge { top: 9px; }
}

@media (max-width: 340px) {
  .interview-page .brand { gap: 9px; }
  .interview-page .preview-label { right: 7px; top: 8px; font-size: 9px; }
  .interview-map { width: calc(100% - 24px); padding-inline: 12px; }
  .trail-step { font-size: 10px; }
}
