* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;

  --bg: #f8f7f4;
  --surface: #ffffff;
  --surface-2: #f1f0f3;

  --border: #dedce1;
  --border-soft: #e9e7ea;

  --text: #454149;
  --text-strong: #39363d;
  --muted: #77737b;

  --lavender: #aeb8df;
  --lavender-strong: #9da8d4;

  --orange: #ffb43f;
  --orange-strong: #f1a62f;

  --danger: #c96b6b;

  --radius: 22px;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(174, 184, 223, .18),
      transparent 32rem
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.eyebrow {
  display: inline-block;

  color: var(--text);

  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero {
  max-width: 760px;
  margin: 14vh auto 0;
  text-align: left;
}

.start-hero {
  width: min(100%, 720px);
  margin: 14vh auto 0;
  text-align: left;
}

.hero h1 {
  max-width: 680px;

  margin: 20px 0 24px;

  color: var(--text-strong);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.06em;
}

.lead {
  max-width: 650px;

  margin: 0;

  color: var(--muted);

  font-size: 1.08rem;
  line-height: 1.75;
}

.start-disclaimer {
  margin: 28px 0 34px;

  color: var(--text-strong);

  font-size: .92rem;
  font-weight: 700;
}

.start-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.start-meta {
  margin: 12px 0 0;

  color: var(--muted);

  font-size: .78rem;
  line-height: 1.5;
}

#start-button {
  min-height: 52px;
  padding-inline: 24px;
}


.question-card,
.ai-card,
.center-card,
.result-card,
.resume-card {
  border: 1px solid var(--border);

  background: rgba(255, 255, 255, .82);

  border-radius: var(--radius);

  box-shadow:
    0 18px 50px rgba(69, 65, 73, .07);
}

.trust-card span,
.microcopy,
.counter,
.progress-label {
  color: var(--muted);
}

.microcopy {
  margin-top: 14px;

  font-size: .78rem;
}

/* Buttons */

.button {
  border: 1px solid transparent;

  border-radius: 999px;

  padding: 13px 22px;

  font-weight: 800;

  transition:
    transform .15s ease,
    background .15s ease,
    border-color .15s ease,
    box-shadow .15s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button.primary {
  color: #3d3428;
  background: var(--orange);

  box-shadow:
    0 8px 22px rgba(255, 180, 63, .18);
}

.button.primary:hover:not(:disabled) {
  background: var(--orange-strong);

  box-shadow:
    0 10px 26px rgba(255, 180, 63, .25);
}

.button.ghost {
  color: var(--text);

  background: transparent;

  border-color: var(--border);
}

.button.ghost:hover:not(:disabled) {
  background: var(--surface);
  border-color: #c9c6cc;
}

.button.small {
  padding: 9px 15px;
  font-size: .84rem;
}

/* Scan header */

.scan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin: 24px 0 12px;
}

.progress-track {
  height: 5px;

  overflow: hidden;

  border-radius: 999px;

  background: var(--border-soft);

  margin-bottom: 28px;
}

.progress-bar {
  width: 0;
  height: 100%;

  border-radius: inherit;

  background: var(--lavender);

  transition: width .25s ease;
}

/* Questions */

.question-number {
  margin-bottom: 14px;

  color: var(--muted);

  font-size: .86rem;
}

.question-card {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 36px);
}

.question-card h2 {
  color: var(--text-strong);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(1.8rem, 3.5vw, 2.8rem);

  font-weight: 400;

  line-height: 1.08;

  letter-spacing: -.035em;

  margin-bottom: 20px;
}

.field {
  margin-top: 20px;
}

.field label {
  display: block;

  margin-bottom: 9px;

  color: var(--text-strong);

  font-weight: 700;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;

  border: 1px solid var(--border);

  border-radius: 14px;

  outline: none;

  background: var(--surface-2);

  color: var(--text);

  padding: 14px 15px;

  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: var(--lavender);

  background: var(--surface);

  box-shadow:
    0 0 0 3px rgba(174, 184, 223, .18);
}

textarea {
  resize: vertical;
  min-height: 130px;
}

.choice-grid {
  display: grid;
  gap: 0px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.choice label {
  display: block;

  padding: 15px 17px;

  border: 1px solid var(--border);

  border-radius: 14px;

  background: var(--surface);

  color: var(--text);

  cursor: pointer;

  transition:
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.choice label:hover {
  border-color: #c8c5cc;
}

.choice input:checked + label {
  border-color: var(--lavender);

  background: rgba(174, 184, 223, .14);

  box-shadow:
    0 0 0 1px var(--lavender) inset;
}

.scale {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.scale button {
  width: 48px;
  min-height: 48px;

  border: 1px solid var(--border);

  border-radius: 12px;

  color: var(--text);

  background: var(--surface);

  transition:
    background .15s ease,
    border-color .15s ease;
}

.scale button:hover {
  border-color: var(--lavender);
}

.scale button.selected {
  border-color: var(--lavender);

  background: var(--lavender);

  color: #39363d;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* AI interview */

.ai-card {
  max-width: 760px;

  margin: 0 auto;

  overflow: hidden;
}

.chat-messages {
  display: flex;

  flex-direction: column;

  align-items: stretch;

  gap: 12px;

  min-height: 360px;

  max-height: 58vh;

  overflow-y: auto;

  padding: 24px;

  background:
    linear-gradient(
      180deg,
      rgba(174, 184, 223, .06),
      transparent 35%
    );
}

.message {
  display: block;

  position: static;

  flex: 0 0 auto;

  width: fit-content;

  max-width: 85%;

  height: auto !important;

  min-height: 0 !important;

  max-height: none;

  margin: 0;

  padding: 10px 14px;

  border-radius: 16px;

  line-height: 1.5;

  white-space: pre-wrap;

  overflow: visible;

  overflow-wrap: anywhere;

  box-sizing: border-box;

  animation: message-in .25s ease-out both;
}

@keyframes message-in {
  from {
    opacity: 0;

    transform: translateY(8px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

.message.user {
  align-self: flex-end;

  background: var(--lavender);

  color: #3e3b43;
}

.message.ai {
  align-self: flex-start;

  background: var(--surface-2);

  border: 1px solid var(--border);
}

.ai-form {
  border-top: 1px solid var(--border);

  padding: 16px;

  background: rgba(255, 255, 255, .72);
}

.form-footer {
  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 15px;

  margin-top: 9px;
}

/* Processing / result */

.center-card,
.result-card {
  max-width: 760px;

  margin: 13vh auto 0;

  padding: clamp(26px, 5vw, 48px);
}

.center-card h2,
.result-card h1 {
  margin: 14px 0;

  color: var(--text-strong);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(2.2rem, 5vw, 3.8rem);

  font-weight: 400;

  line-height: 1.02;

  letter-spacing: -.045em;
}

.center-card p {
  color: var(--muted);

  line-height: 1.6;
}

.spinner {
  width: 32px;

  height: 32px;

  margin-bottom: 24px;

  border: 3px solid var(--border-soft);

  border-top-color: var(--lavender);

  border-radius: 50%;

  animation: spin .8s linear infinite;
}

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

.result-section {
  margin: 24px 0;
}

.result-section h3 {
  margin-bottom: 9px;

  color: var(--text-strong);
}

.result-section p,
.result-section li {
  color: var(--muted);

  line-height: 1.65;
}

.result-section ul {
  padding-left: 20px;
}

.next-step {
  border: 1px solid var(--border);

  border-radius: 16px;

  padding: 18px;

  background: var(--surface-2);
}

/* Resume */

.resume-card {
  max-width: 760px;

  margin: 13vh auto 0;

  padding: clamp(26px, 5vw, 48px);

  border: 1px solid var(--border);

  background: rgba(255, 255, 255, .86);

  border-radius: var(--radius);

  box-shadow:
    0 20px 70px rgba(69, 65, 73, .08);
}

.resume-card h1 {
  margin: 18px 0 14px;

  color: var(--text-strong);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(2.2rem, 5vw, 4rem);

  font-weight: 400;

  line-height: 1;

  letter-spacing: -.045em;
}

.resume-card p {
  max-width: 620px;

  color: var(--muted);

  line-height: 1.7;

  font-size: 1.05rem;
}

.resume-actions {
  display: flex;

  gap: 12px;

  margin-top: 30px;

  flex-wrap: wrap;
}

/* Error */

.error-card {
  border-color: rgba(201, 107, 107, .28);
}

.error-card .eyebrow {
  color: var(--danger);
}

.button-row {
  display: flex;

  gap: 10px;

  flex-wrap: wrap;

  margin-top: 24px;
}

/* Turnstile */

.turnstile-host {
  position: fixed;

  left: -10000px;

  bottom: 0;

  width: 1px;

  height: 1px;

  overflow: hidden;
}

/* Toast */

.toast {
  position: fixed;

  left: 50%;

  bottom: 24px;

  transform: translate(-50%, 20px);

  opacity: 0;

  pointer-events: none;

  max-width: min(90vw, 520px);

  padding: 12px 16px;

  border: 1px solid var(--border);

  border-radius: 14px;

  background: var(--text-strong);

  color: #ffffff;

  transition:
    opacity .2s ease,
    transform .2s ease;
}

.toast.visible {
  opacity: 1;

  transform: translate(-50%, 0);
}

/* Accessibility */

.sr-only {
  position: absolute;

  width: 1px;

  height: 1px;

  padding: 0;

  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}


.result-card {
  max-width: 920px;
}

.result-hero {
  padding-bottom: 10px;
}

.result-headline {
  max-width: 780px;
  margin: 14px 0 30px;
  color: var(--text-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.0rem, 5vw, 3.0rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.045em;
}

.result-subtitle {
  margin: 0 0 14px;
  color: var(--text-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-weight: 400;
  line-height: 1.08;
}

.result-balance,
.result-priorities,
.result-profile,
.result-lgt,
.result-narrative,
.result-confidence,
.result-handoff,
.result-next-step,
.result-gate {
  margin-top: 38px;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.balance-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.balance-label {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.balance-value {
  margin-top: 8px;
  color: var(--text-strong);
  font-size: 1.08rem;
  font-weight: 800;
}

.priority-list {
  display: grid;
  gap: 10px;
}

.priority-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.priority-number,
.narrative-number {
  color: var(--lavender-strong);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.priority-title {
  color: var(--text-strong);
  font-weight: 800;
}

.priority-status {
  margin-top: 4px;
  color: var(--muted);
  font-size: .86rem;
}

.priority-description {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-group {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.profile-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.profile-group-title {
  margin-bottom: 9px;
  color: var(--text-strong);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.profile-items {
  display: grid;
  gap: 8px;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface-2);
}

.profile-item-name {
  color: var(--text);
}

.profile-item-status {
  color: var(--text-strong);
  font-weight: 800;
  text-align: right;
}

.result-block {
  margin-top: 22px;
}

.result-block-title {
  margin-bottom: 8px;
  color: var(--text-strong);
  font-size: 1rem;
}

.result-block-text,
.result-list-item,
.narrative-text {
  color: var(--muted);
  line-height: 1.65;
}

.result-list {
  margin: 0;
  padding-left: 20px;
}

.narrative-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--border-soft);
}

.narrative-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.narrative-label {
  margin-top: 8px;
  color: var(--text-strong);
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.narrative-text {
  margin: 4px 0 0;
}

.confidence-level {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(174, 184, 223, .18);
  color: var(--text-strong);
  font-weight: 900;
}

.handoff-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}

.handoff-row:first-of-type {
  border-top: 0;
}

.handoff-online,
.handoff-physical {
  color: var(--text-strong);
  font-weight: 700;
}

.handoff-physical {
  text-align: right;
}

.handoff-arrow {
  color: var(--muted);
}

.result-next-title {
  margin: 0 0 8px;
  color: var(--text-strong);
}

.result-gate {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-2);
}

.result-gate-title {
  margin: 10px 0 10px;
  color: var(--text-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 400;
  line-height: 1.08;
}

.result-gate-summary {
  color: var(--muted);
  line-height: 1.6;
}

.result-gate-list {
  margin: 16px 0 22px;
  padding-left: 20px;
}

.result-email-form {
  display: grid;
  gap: 10px;
}

.result-email-label {
  color: var(--text-strong);
  font-weight: 800;
}

.result-email-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  padding: 14px 15px;
}

.result-email-input:focus {
  border-color: var(--lavender);
  box-shadow: 0 0 0 3px rgba(174, 184, 223, .18);
}

.result-email-button {
  justify-self: start;
}

.result-email-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}

.result-footer {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

/* Mobile */

@media (max-width: 700px) {
  .app-shell {
    padding-inline: 14px;
  }

  .hero {
    margin-top: 10vh;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 14vw, 4rem);
    line-height: .96;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  .start-disclaimer {
    margin-top: 24px;
    margin-bottom: 28px;
  }

  .start-action,
  #start-button {
    width: 100%;
  }

  #start-button {
    text-align: center;
  }

  .start-meta {
    width: 100%;
    text-align: center;
  }

  .scan-header {
    align-items: flex-start;
  }

  .scale {
    grid-template-columns: repeat(5, 1fr);
  }

  .question-card,
  .center-card,
  .result-card,
  .resume-card {
    border-radius: 18px;
  }

  .message {
    max-width: 90%;
  }

  .balance-grid {
    grid-template-columns: 1fr;
  }

  .priority-card,
  .narrative-card {
    grid-template-columns: 46px 1fr;
  }

  .profile-item {
    flex-direction: column;
  }

  .profile-item-status,
  .handoff-physical {
    text-align: left;
  }

  .handoff-row {
    grid-template-columns: 1fr;
  }

  .handoff-arrow {
    display: none;
  }

  .result-email-button {
    width: 100%;
  }
}


.loading-card {
  text-align: center;
}

.loading-card .spinner {
  margin-left: auto;
  margin-right: auto;
}

.button-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: -2px;

  border: 2px solid rgba(61, 52, 40, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;

  animation: button-spin 0.7s linear infinite;
}

.button.loading {
  pointer-events: none;
}

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

.ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-dot 1.2s infinite ease-in-out;
}

.ai-typing span:nth-child(2) {
  animation-delay: .15s;
}

.ai-typing span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes typing-dot {
  0%, 60%, 100% {
    opacity: .3;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.ai-intro {
  max-width: 760px;
  margin: 0 auto 14px;
  padding: 14px 18px;

  border: 1px solid var(--border-soft);
  border-radius: 16px;

  background: rgba(255, 255, 255, .65);
}

.ai-intro strong {
  display: block;
  margin-bottom: 4px;

  color: var(--text-strong);
  font-size: .9rem;
}

.ai-intro p {
  margin: 0;

  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.ai-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-actions .button {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .ai-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    width: 100%;
  }

  .ai-actions .button {
    width: 100%;
  }
}

#ai-screen .scan-header {
  display: block;
  max-width: 760px;
  margin: 24px auto 12px;
}

#ai-screen .scan-header > div {
  display: block;
}

#ai-screen .ai-intro {
  max-width: 760px;
  margin: 0 auto 14px;
}

#ai-screen .ai-card {
  max-width: 760px;
  margin: 0 auto;
}