:root {
  --ink: #15263a;
  --ink-soft: #3f5063;
  --paper: #f5f0e7;
  --white: #fffdf9;
  --gold: #a97f3f;
  --gold-soft: #d8c399;
  --line: rgba(21, 38, 58, 0.15);
  --success: #2f6d59;
  --danger: #8b3f42;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 7%, rgba(169, 127, 63, 0.1), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(169, 127, 63, 0.35);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.serif { font-family: Georgia, "Times New Roman", serif; }

.topbar {
  align-items: center;
  background: var(--ink);
  color: white;
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 18px clamp(20px, 5vw, 72px);
}
.wordmark { align-items: baseline; display: flex; gap: 12px; }
.wordmark strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.wordmark span {
  color: #c8d0d9;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.privacy-pill {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #e7edf2;
  display: flex;
  font-size: 12px;
  gap: 8px;
  padding: 8px 12px;
}
.privacy-pill i {
  background: #8fc5ad;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}
.page-frame {
  margin: 0 auto;
  max-width: 1440px;
  min-height: calc(100vh - 154px);
  padding: clamp(26px, 4vw, 58px) clamp(18px, 5vw, 72px) 72px;
}
footer {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
  padding: 18px clamp(20px, 5vw, 72px);
  text-align: center;
}

.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.primary-button, .secondary-button, .mic-button, .text-button, .danger-button {
  border-radius: 999px;
  font-weight: 750;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.primary-button {
  background: var(--ink);
  border: 0;
  color: white;
  padding: 15px 24px;
}
.primary-button:hover, .mic-button:hover { transform: translateY(-1px); }
.primary-button:disabled, .secondary-button:disabled, .mic-button:disabled,
.text-button:disabled, input:disabled, textarea:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}
.secondary-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 18px;
}
.text-button {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 8px 2px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.danger-button {
  background: transparent;
  border: 1px solid rgba(139, 63, 66, 0.35);
  color: var(--danger);
  padding: 12px 18px;
}
.start-actions, .admin-actions, .detail-actions, .login-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.start-actions { margin-top: 32px; }
.error-text {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.55;
  margin: 12px 0 0;
  min-height: 1.3em;
}
.helper-text, .muted {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.resume-tools {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}

.resume-tools .text-button {
  text-align: left;
}

.resume-status {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
  margin: 10px 0 0;
}

.login-view {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 68vh;
}
.login-card {
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(21, 38, 58, 0.11);
  max-width: 660px;
  padding: clamp(28px, 6vw, 58px);
  width: 100%;
}
.login-card h1 {
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}
.login-copy {
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
  margin: 24px 0 30px;
}
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 9px;
}
.login-actions { align-items: stretch; }
.login-actions input {
  background: white;
  border: 1px solid rgba(21, 38, 58, 0.25);
  border-radius: 999px;
  color: var(--ink);
  flex: 1 1 260px;
  min-height: 50px;
  padding: 12px 18px;
}

.intro-grid {
  align-items: start;
  display: grid;
  gap: clamp(32px, 6vw, 88px);
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  padding: clamp(24px, 5vw, 68px) 0;
}
.intro-title {
  font-size: clamp(46px, 7vw, 88px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.94;
  margin: 0;
  max-width: 900px;
}
.intro-copy {
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.72;
  margin: 30px 0 0;
  max-width: 780px;
}
.fact-card {
  background: rgba(255, 253, 249, 0.78);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(21, 38, 58, 0.08);
  padding: 28px;
}
.fact-card h2 { font-size: 30px; font-weight: 500; margin: 0 0 20px; }
.fact-list { display: grid; gap: 18px; }
.fact-item { border-top: 1px solid var(--line); padding-top: 16px; }
.fact-item:first-child { border-top: 0; padding-top: 0; }
.fact-item strong { display: block; font-size: 13px; margin-bottom: 6px; }
.fact-item p { color: var(--ink-soft); font-size: 13px; line-height: 1.6; margin: 0; }

.interview-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 290px minmax(0, 1fr);
}
.interview-sidebar {
  align-self: start;
  background: var(--ink);
  border-radius: 24px;
  color: white;
  padding: 26px;
  position: sticky;
  top: 22px;
}
.sidebar-label {
  color: #aebdca;
  font-size: 11px;
  letter-spacing: 0.15em;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.section-name { font-size: 28px; font-weight: 500; line-height: 1.05; margin: 0; }
.progress-track {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  height: 6px;
  margin: 20px 0 8px;
  overflow: hidden;
}
.progress-fill {
  background: var(--gold-soft);
  height: 100%;
  transition: width 0.35s ease;
  width: 5%;
}
.progress-number { color: #c8d2dc; font-size: 12px; }
.topic-list {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 11px;
  list-style: none;
  margin: 28px 0 0;
  padding: 24px 0 0;
}
.topic-list li { color: #aebdca; font-size: 12px; line-height: 1.4; }
.topic-list li.active { color: white; font-weight: 750; }
.interview-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 26px 80px rgba(21, 38, 58, 0.09);
  min-height: 680px;
  overflow: hidden;
}
.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
}
.panel-head p { color: var(--ink-soft); font-size: 12px; margin: 0; }
.mode-badge {
  background: #efe6d7;
  border-radius: 999px;
  color: #775b2e;
  font-size: 11px;
  font-weight: 750;
  padding: 6px 10px;
}
.messages {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 480px;
  min-height: 370px;
  overflow-y: auto;
  padding: 30px clamp(20px, 4vw, 46px);
}
.message { max-width: 86%; }
.message.assistant { align-self: flex-start; }
.message.participant {
  align-self: flex-end;
  background: #edf0f2;
  border-radius: 18px 18px 3px 18px;
  padding: 16px 18px;
}
.message.skip {
  align-self: flex-end;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  padding: 9px 14px;
}
.message.skip .speaker { display: none; }
.message.skip .message-text { font-size: 12px; }
.speaker {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.message-text { font-size: 16px; line-height: 1.72; margin: 0; white-space: pre-wrap; }
.assistant .message-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.22;
}
.composer {
  background: #faf7f1;
  border-top: 1px solid var(--line);
  padding: 22px clamp(20px, 4vw, 38px) 26px;
}
.composer-label { color: var(--ink-soft); display: block; font-size: 12px; font-weight: 750; margin-bottom: 9px; }
.answer-box {
  background: white;
  border: 1px solid rgba(21, 38, 58, 0.22);
  border-radius: 16px;
  color: var(--ink);
  line-height: 1.6;
  min-height: 132px;
  padding: 16px;
  resize: vertical;
  width: 100%;
}
.answer-box:focus { border-color: var(--gold); }
.completion-note {
  background: rgba(47, 109, 89, 0.08);
  border-left: 4px solid var(--success);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  margin: 16px 0 0;
  padding: 12px 14px;
}
.completion-view {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 68vh;
}
.completion-card {
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(21, 38, 58, 0.11);
  max-width: 720px;
  padding: clamp(34px, 6vw, 64px);
  width: 100%;
}
.completion-card h1 {
  font-size: clamp(50px, 7vw, 78px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 24px;
}
.completion-card > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 24px;
}
.composer-actions { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-top: 14px; }
.left-actions, .right-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 11px; }
.mic-button {
  align-items: center;
  background: #ece4d7;
  border: 0;
  color: var(--ink);
  display: inline-flex;
  gap: 9px;
  padding: 11px 15px;
}
.mic-button.listening { background: var(--danger); color: white; }
.mic-icon { background: currentColor; border-radius: 50%; display: inline-block; height: 9px; width: 9px; }
.loading-dots { display: inline-flex; gap: 5px; padding: 10px 0; }
.loading-dots i {
  animation: pulse 1.1s infinite ease-in-out;
  background: var(--gold);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}
.loading-dots i:nth-child(2) { animation-delay: 0.15s; }
.loading-dots i:nth-child(3) { animation-delay: 0.3s; }

.summary-view { padding-top: clamp(20px, 4vw, 48px); }
.summary-head { max-width: 880px; }
.summary-title, .admin-title {
  font-size: clamp(46px, 7vw, 76px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}
.summary-deck { color: var(--ink-soft); font-size: 17px; line-height: 1.72; margin: 20px 0 0; }
.summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 42px;
}
.summary-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.summary-card h2 { font-size: 27px; font-weight: 500; margin: 0 0 13px; }
.summary-card ul, .admin-summary-section ul {
  color: var(--ink-soft);
  display: grid;
  gap: 8px;
  line-height: 1.55;
  margin: 0;
  padding-left: 19px;
}

.admin-view { padding-top: 14px; }
.admin-head { align-items: end; display: flex; justify-content: space-between; margin-bottom: 26px; }
.admin-title { font-size: clamp(44px, 6vw, 70px); }
.status-card {
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 14px;
  margin-bottom: 20px;
  padding: 16px 18px;
}
.status-card.ready { background: rgba(47, 109, 89, 0.08); border-left-color: var(--success); }
.status-card.needs-attention { background: rgba(169, 127, 63, 0.1); border-left-color: var(--gold); }
.status-card strong { display: block; font-size: 14px; margin-bottom: 4px; }
.status-card p { color: var(--ink-soft); font-size: 13px; line-height: 1.5; margin: 0; }
.api-key-form { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; }
.api-key-form label { display: block; font-size: 12px; font-weight: 750; margin-bottom: 8px; }
.api-key-controls { align-items: stretch; display: flex; flex-wrap: wrap; gap: 10px; }
.api-key-controls input {
  background: white;
  border: 1px solid rgba(21, 38, 58, 0.25);
  border-radius: 999px;
  color: var(--ink);
  flex: 1 1 300px;
  min-height: 44px;
  padding: 10px 15px;
}
.configuration-note { margin-top: 9px !important; }
.admin-layout { display: grid; gap: 20px; grid-template-columns: minmax(250px, 0.65fr) minmax(0, 1.7fr); }
.session-list-card, .session-detail-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.session-list-card { align-self: start; padding: 20px; }
.session-list-card h2 { font-size: 27px; font-weight: 500; margin: 0 0 16px; }
.session-list { display: grid; gap: 8px; }
.session-row {
  background: #f7f3ec;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  padding: 13px;
  text-align: left;
}
.session-row:hover { border-color: var(--gold-soft); }
.session-row strong { display: block; font-size: 13px; margin-bottom: 4px; }
.session-row span { color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.session-detail-card { min-height: 520px; padding: clamp(20px, 4vw, 34px); }
.empty-state { color: var(--ink-soft); padding: 40px 10px; text-align: center; }
.detail-head { align-items: start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; padding-bottom: 22px; }
.detail-head h2 { font-size: 36px; font-weight: 500; margin: 0 0 5px; }
.detail-head p { margin-top: 0; }
.transcript { display: grid; gap: 18px; padding: 28px 0; }
.transcript-message { border-left: 3px solid #e2d6c2; padding-left: 16px; }
.transcript-message strong {
  color: var(--gold);
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.transcript-message p { color: var(--ink-soft); line-height: 1.65; margin: 0; white-space: pre-wrap; }
.admin-summary { border-top: 1px solid var(--line); padding-top: 28px; }
.admin-summary > h2 { font-size: 36px; font-weight: 500; margin: 0 0 24px; }
.admin-summary-section { border-top: 1px solid var(--line); padding: 18px 0; }
.admin-summary-section h3 { font-size: 15px; margin: 0 0 10px; }

@keyframes pulse {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 980px) {
  .intro-grid, .interview-grid, .admin-layout { grid-template-columns: 1fr; }
  .interview-sidebar { position: static; }
  .topic-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .session-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .topbar { min-height: 66px; }
  .wordmark span, .privacy-pill span { display: none; }
  .page-frame { padding-left: 14px; padding-right: 14px; }
  .intro-grid { padding-top: 30px; }
  .intro-title { font-size: 51px; }
  .login-card { padding: 28px 22px; }
  .login-actions { display: grid; }
  .topic-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .message { max-width: 96%; }
  .composer-actions { align-items: stretch; display: grid; }
  .right-actions { justify-content: space-between; }
  .summary-grid, .session-list { grid-template-columns: 1fr; }
  .admin-head, .detail-head { align-items: start; display: grid; gap: 18px; }
  .detail-actions { align-items: stretch; display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
