@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap");

body[data-page="ai-lab"] {
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at top left, rgba(47, 123, 255, 0.1), transparent 26%),
    radial-gradient(circle at top right, rgba(229, 179, 95, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

html[data-theme="dark"] body[data-page="ai-lab"] {
  background:
    radial-gradient(circle at top left, rgba(121, 168, 255, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(241, 190, 104, 0.12), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0b1424 100%);
}

.ai-lab-hero .hero-copy h1 {
  max-width: 13ch;
}

.ai-lab-hero .lead {
  max-width: 62ch;
}

.lab-visual-card,
.tool-panel,
.interview-panel,
.insight-card {
  border: 1px solid rgba(8, 18, 34, 0.08);
  box-shadow: 0 18px 38px rgba(8, 18, 34, 0.08);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease;
}

.lab-visual-card:hover,
.tool-panel:hover,
.interview-panel:hover,
.insight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 46px rgba(8, 18, 34, 0.12);
}

.lab-visual-card {
  position: relative;
  padding: 28px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 250, 241, 0.14), rgba(255, 250, 241, 0.06)),
    rgba(255, 250, 241, 0.04);
  border-color: rgba(255, 244, 225, 0.12);
  color: #fff4e1;
  overflow: hidden;
}

.lab-visual-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -56px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 179, 95, 0.22), transparent 70%);
}

.lab-visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lab-status-pill,
.assistant-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.lab-status-pill {
  background: rgba(47, 123, 255, 0.16);
  border: 1px solid rgba(47, 123, 255, 0.2);
  color: #dce8ff;
}

.lab-logo-stage {
  display: grid;
  place-items: center;
  margin: 26px 0;
}

.lab-logo-core {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 244, 225, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.lab-logo-core::before,
.lab-logo-core::after {
  content: "";
  position: absolute;
  border-radius: 28px;
  background: rgba(255, 244, 225, 0.08);
  border: 1px solid rgba(255, 244, 225, 0.14);
}

.lab-logo-core::before {
  width: 82%;
  height: 82%;
  transform: rotate(10deg);
}

.lab-logo-core::after {
  width: 68%;
  height: 68%;
  transform: rotate(-10deg);
}

.lab-logo-core img {
  position: relative;
  z-index: 1;
  width: 48%;
  height: 48%;
  object-fit: contain;
}

.lab-visual-copy h3 {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.lab-visual-copy p {
  margin: 10px 0 0;
  color: rgba(255, 244, 225, 0.82);
  line-height: 1.65;
}

.lab-capability-grid,
.tool-grid,
.input-grid,
.insight-grid {
  display: grid;
  gap: 18px;
}

.lab-capability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.lab-capability {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 250, 241, 0.08);
  border: 1px solid rgba(255, 244, 225, 0.12);
}

.lab-capability strong,
.lab-capability span {
  display: block;
}

.lab-capability span {
  margin-top: 8px;
  color: rgba(255, 244, 225, 0.76);
  line-height: 1.55;
}

.ai-lab-section {
  padding: 0 0 82px;
}

.tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.tool-panel,
.interview-panel,
.insight-card {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
}

.tool-panel h2,
.interview-panel h2,
.insight-card h3,
.quiz-shell h3 {
  margin: 12px 0 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.04;
}

.tool-panel > p,
.interview-panel > p,
.insight-card p {
  margin: 14px 0 0;
  color: #58657d;
  line-height: 1.65;
}

.tool-form,
.interview-controls,
.interview-answer-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.input-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #30425f;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(8, 18, 34, 0.08);
  border-radius: 18px;
  background: #f8fbff;
  color: #172238;
  padding: 14px 16px;
  font: inherit;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.tool-panel a:focus-visible,
.interview-panel a:focus-visible,
.solid-btn:focus-visible,
.ghost-btn:focus-visible {
  outline: 3px solid rgba(47, 123, 255, 0.28);
  outline-offset: 3px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.prompt-field,
.wide-field {
  grid-column: 1 / -1;
}

.tool-actions,
.interview-actions,
.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.assistant-badge {
  background: rgba(47, 123, 255, 0.1);
  border: 1px solid rgba(47, 123, 255, 0.16);
  color: #2f7bff;
}

.assistant-badge.is-live {
  background: rgba(17, 154, 114, 0.12);
  border-color: rgba(17, 154, 114, 0.18);
  color: #119a72;
}

.assistant-badge.is-fallback {
  background: rgba(229, 179, 95, 0.14);
  border-color: rgba(229, 179, 95, 0.2);
  color: #8b6113;
}

.assistant-badge.is-busy {
  background: rgba(18, 36, 68, 0.08);
  border-color: rgba(18, 36, 68, 0.12);
  color: #30425f;
}

.ai-result,
.interview-thread {
  margin-top: 22px;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(47, 123, 255, 0.05), rgba(255, 255, 255, 0.92)),
    #fff;
  border: 1px solid rgba(8, 18, 34, 0.08);
  min-height: 220px;
}

.result-placeholder {
  color: #58657d;
  line-height: 1.7;
}

.notes-stack {
  display: grid;
  gap: 16px;
}

.notes-stack h3,
.notes-stack h4 {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
}

.notes-stack p,
.notes-stack li {
  color: #30425f;
  line-height: 1.7;
}

.notes-stack ul {
  margin: 0;
  padding-left: 18px;
}

.quiz-shell {
  display: grid;
  gap: 18px;
}

.quiz-shell p {
  margin: 0;
  color: #58657d;
  line-height: 1.65;
}

.quiz-form {
  display: grid;
  gap: 14px;
}

.quiz-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(47, 123, 255, 0.04);
  border: 1px solid rgba(47, 123, 255, 0.08);
}

.quiz-card strong {
  display: block;
  margin-bottom: 12px;
  color: #172238;
  line-height: 1.5;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(8, 18, 34, 0.08);
}

.quiz-option input {
  margin-top: 2px;
}

.score-banner,
.quiz-review-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(8, 18, 34, 0.08);
}

.score-banner {
  background:
    linear-gradient(135deg, rgba(17, 154, 114, 0.12), rgba(255, 255, 255, 0.92)),
    #fff;
}

.score-banner strong,
.quiz-review-card strong {
  display: block;
}

.score-banner span,
.quiz-review-card span {
  display: block;
  margin-top: 8px;
  color: #58657d;
  line-height: 1.6;
}

.quiz-review {
  display: grid;
  gap: 12px;
}

.interview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.74fr);
  gap: 20px;
}

.interview-thread {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
}

.thread-message {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.thread-message.is-assistant {
  justify-self: start;
  background: rgba(8, 18, 34, 0.05);
  border-top-left-radius: 8px;
}

.thread-message.is-user {
  justify-self: end;
  color: #fff;
  background: linear-gradient(135deg, #2f7bff, #4f92ff);
  border-top-right-radius: 8px;
}

.interview-meta {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.interview-meta article {
  padding: 18px;
  border-radius: 22px;
  background: rgba(8, 18, 34, 0.03);
  border: 1px solid rgba(8, 18, 34, 0.06);
}

.interview-meta strong,
.insight-card strong {
  display: block;
}

.interview-meta span,
.insight-card span {
  display: block;
  margin-top: 8px;
  color: #58657d;
  line-height: 1.6;
}

.insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html[data-theme="dark"] .tool-panel,
html[data-theme="dark"] .interview-panel,
html[data-theme="dark"] .insight-card,
html[data-theme="dark"] .quiz-card,
html[data-theme="dark"] .interview-meta article,
html[data-theme="dark"] .thread-message.is-assistant,
html[data-theme="dark"] .tool-output {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .field,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--text);
}

@media (max-width: 1100px) {
  .tool-grid,
  .interview-layout,
  .insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .lab-capability-grid,
  .input-grid {
    grid-template-columns: 1fr;
  }

  .tool-panel,
  .interview-panel,
  .insight-card {
    padding: 22px;
  }

  .tool-actions,
  .interview-actions,
  .quiz-footer {
    align-items: stretch;
  }

  .tool-actions > *,
  .interview-actions > *,
  .quiz-footer > * {
    width: 100%;
    justify-content: center;
  }
}
