@import url("../../prototype/styles.css");

body, .app-shell { background: #ececee; }
.prototype-frame { box-shadow: 0 28px 72px rgb(38 39 43 / 16%); }

/* A stable graphite plane gives the entry its frame. */
.welcome { position: relative; overflow: hidden; background: var(--paper); color: var(--ink); }
.welcome::before { content: ""; position: absolute; inset: 0 0 0 auto; z-index: 0; width: 38%; background: var(--graphite); }
.welcome::after { content: ""; position: absolute; inset: 0 auto 0 0; z-index: 0; width: clamp(16px, 2vw, 30px); background: var(--coral); }
.welcome > * { position: relative; z-index: 1; }
.welcome .topbar { color: var(--ink); }
.welcome .topbar > span:last-child { margin-right: 38%; color: var(--paper); }
.welcome__main { grid-template-columns: minmax(0, 1fr); gap: 46px; align-content: center; padding: clamp(54px, 10vh, 110px) 44% clamp(46px, 8vh, 82px) clamp(48px, 9vw, 108px); }
.welcome h1 { max-width: 7ch; color: var(--graphite); font-size: clamp(62px, 8vw, 96px); }
.welcome__summary { max-width: 33ch; color: var(--ink); }
.language-panel { width: min(100%, 620px); border-color: var(--ink); }
.language-panel p { color: var(--graphite); }
.language-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.language-button { min-height: 64px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); }
.language-button + .language-button { border-left: 0; }
.language-button:hover { background: var(--coral); color: var(--ink); }
.welcome__footer { padding-left: clamp(48px, 9vw, 108px); color: var(--graphite); }
.welcome__footer span:last-child { display: none; }

.form-screen, .question-screen, .results-screen { background: #fcfcfb; }
.form-content, .question-content, .results-content { width: min(100%, 900px); }
.score-button, .priority-card, .priority-card:nth-child(2), .email-strip { border-radius: 0; }
.report-screen { background: var(--graphite); }
.report-screen .screen-title, .report-screen .screen-description { color: var(--paper); }

/* Live confirmation only: saved assessment, associated email, then the next action. */
.confirmation-screen { background: #fcfcfb; justify-content: flex-start; }
.confirmation-screen .confirmation-content { width: 100%; max-width: 640px; padding: 40px 32px 56px; }
.confirmation-screen .screen-title { max-width: none; color: var(--graphite); font-family: "Rajdhani", sans-serif; font-size: clamp(36px, 4vw, 48px); line-height: 1.08; text-wrap: balance; }
.confirmation-email { margin: 32px 0 0; color: var(--graphite); }
.confirmation-email dt { font-size: 16px; line-height: 1.4; }
.confirmation-email dd { margin: 6px 0 0; font-size: 20px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.confirmation-test-note { max-width: 52ch; margin: 24px auto 0; color: var(--graphite); font-size: 16px; line-height: 1.5; }
.confirmation-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.confirmation-actions > button { min-height: 54px; }
.confirmation-actions .primary-button { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; text-align: center; }
.confirmation-actions .confirmation-back { padding: 12px 20px; color: var(--graphite); text-decoration: underline; text-underline-offset: 4px; }
body[data-live="true"] .answer-recovery-note { margin: 0 0 24px; color: var(--graphite); font-size: 18px; line-height: 1.45; }
body[data-live="true"] .submission-screen .report-actions { flex-direction: column; align-items: center; }
body[data-live="true"] .submission-screen .secondary-button { color: var(--paper); border-color: var(--paper); }
@media (max-width: 720px) {
  .confirmation-screen .confirmation-content { padding: 32px 22px 40px; }
  .confirmation-actions .primary-button { width: 100%; }
}

@media (max-width: 720px) {
  .welcome::before { inset: 0 0 0 auto; width: 30%; height: 100%; }
  .welcome::after { width: 16px; }
  .welcome .topbar { color: var(--ink); }
  .welcome .topbar > span:last-child { display: none; }
  .welcome__main { gap: 36px; padding: 72px 32% 30px 38px; }
  .welcome h1 { font-size: clamp(56px, 16vw, 80px); }
  .language-grid { grid-template-columns: 1fr; }
  .language-button + .language-button { border-top: 0; border-left: 1px solid var(--ink); }
  .welcome__footer { padding-left: 38px; color: var(--graphite); }
}
body[data-live="true"] .question-screen { display: flex; flex-direction: column; }
body[data-live="true"] .question-back-footer { margin-top: auto; padding: 24px clamp(22px, 4vw, 40px) max(24px, env(safe-area-inset-bottom, 0px)); display: flex; justify-content: flex-end; }
body[data-live="true"] .question-back-footer button { min-height: 54px; min-width: 130px; }
body[data-live="true"] .saved-answers-screen { padding: clamp(32px, 5vw, 64px) clamp(22px, 4vw, 48px); }
body[data-live="true"] .saved-answers-screen .screen-title { max-width: none; margin: 0 0 32px; font-size: clamp(36px, 4vw, 48px); }
body[data-live="true"] .saved-answers-screen ol { margin: 0; padding-left: 24px; }
body[data-live="true"] .saved-answers-screen > button { align-self: flex-end; min-height: 54px; margin-top: 32px; }

/* The live entry fills the viewport; subsequent questionnaire screens keep their frame. */
body[data-live="true"] .app-shell:has(.welcome) { display: block; padding: 0; }
body[data-live="true"] .prototype-frame:has(> .welcome) { width: 100%; min-height: 100dvh; border-radius: 0; box-shadow: none; }
body[data-live="true"] .welcome { min-height: 100dvh; }
body[data-live="true"] .welcome::after { width: 12px; }
body[data-live="true"] .welcome .topbar { padding: clamp(24px, 4vh, 48px) clamp(32px, 5vw, 80px) 0; }
body[data-live="true"] .welcome .topbar > span:last-child { display: none; }
body[data-live="true"] .welcome__main { flex: 1; gap: clamp(24px, 4vh, 40px); padding: 32px 44% 32px clamp(32px, 5vw, 80px); }
body[data-live="true"] .welcome h1 { max-width: 11ch; font-size: clamp(56px, 6vw, 96px); line-height: 1; }
body[data-live="true"] .welcome__summary { max-width: 38ch; line-height: 1.4; }
body[data-live="true"] .welcome__footer { padding: 0 44% max(24px, env(safe-area-inset-bottom, 0px)) clamp(32px, 5vw, 80px); }
@media (max-width: 720px) {
  body[data-live="true"] .welcome::before { width: 12px; }
  body[data-live="true"] .welcome::after { width: 6px; }
  body[data-live="true"] .welcome .topbar { padding: 24px 30px 0; }
  body[data-live="true"] .welcome__main { padding: 32px 30px; }
  body[data-live="true"] .welcome h1 { font-size: clamp(48px, 12vw, 72px); letter-spacing: -.03em; }
  body[data-live="true"] .welcome__footer { padding: 0 30px max(24px, env(safe-area-inset-bottom, 0px)); }
}
