:root {
  --ink: #1d2433;
  --muted: #687386;
  --line: #dce1e8;
  --soft: #f6f8fa;
  --paper: #ffffff;
  --coral: #f04f43;
  --coral-dark: #d94136;
  --green: #238b57;
  --strength: #147d83;
  --weakness: #bd4d32;
  --peaceful: #238b57;
  --perfect: #2d6fc4;
  --popular: #e75555;
  --powerful: #d99208;
  --shadow: 0 12px 34px rgba(29, 36, 51, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button { letter-spacing: 0; }

.app-shell { min-height: 100vh; background: var(--paper); }

.load-error {
  width: min(620px, calc(100% - 32px));
  margin: 72px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.load-error h1 { margin: 0; font-size: 24px; letter-spacing: 0; }
.load-error p { margin: 10px 0 0; color: var(--muted); }

.app-header {
  min-height: 74px;
  padding: 0 clamp(20px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 650;
}

.brand-mark {
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
}

.header-right, .header-tools, .report-actions, .account-actions { display: flex; align-items: center; gap: 10px; }
.global-language select { min-height: 40px; padding: 7px 30px 7px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 700; }
.account-actions { padding-left: 10px; border-left: 1px solid var(--line); }
.account-name { max-width: 180px; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 40px; height: 40px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: var(--muted); background: #fff; cursor: pointer; }
.icon-button:hover { color: var(--ink); border-color: #9fa8b5; }
.icon-button svg { width: 19px; height: 19px; }
.view-mode-button[aria-pressed="true"] { color: #fff; border-color: var(--green); background: var(--green); }
.admin-login-button { min-height: 40px; padding: 7px 12px; font-size: 13px; }

body.mobile-preview {
  padding: 24px 0;
  background: #e8ebef;
}

body.mobile-preview .app-shell {
  width: min(430px, 100%);
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(29, 36, 51, 0.18);
}

body.mobile-preview .app-header { min-height: 64px; padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
body.mobile-preview .brand { gap: 8px; font-size: 13px; }
body.mobile-preview .brand > span:last-child { display: none; }
body.mobile-preview .brand-mark { font-size: 22px; }
body.mobile-preview .header-right { margin-left: auto; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
body.mobile-preview .header-tools { gap: 6px; }
body.mobile-preview .global-language select { max-width: 105px; }
body.mobile-preview .admin-login-button { width: 42px; min-height: 42px; padding: 8px; }
body.mobile-preview .admin-login-button span { display: none; }
body.mobile-preview .account-name { display: none; }
body.mobile-preview .account-actions { padding-left: 0; border-left: 0; }
body.mobile-preview .report-actions .button { width: 42px; min-height: 42px; padding: 8px; }
body.mobile-preview .report-actions .button span { display: none; }
body.mobile-preview .auth-screen,
body.mobile-preview .dashboard-screen,
body.mobile-preview .details-screen { width: calc(100% - 28px); min-height: auto; }
body.mobile-preview .auth-screen { padding: 32px 0 44px; }
body.mobile-preview .auth-heading h1 { font-size: 27px; }
body.mobile-preview .auth-heading p { font-size: 14px; }
body.mobile-preview .access-grid,
body.mobile-preview .dashboard-stats,
body.mobile-preview .details-screen,
body.mobile-preview .top-results,
body.mobile-preview .interpretations { grid-template-columns: 1fr; }
body.mobile-preview .access-panel { padding: 19px; }
body.mobile-preview .dashboard-screen { padding-top: 32px; }
body.mobile-preview .dashboard-heading,
body.mobile-preview .section-heading,
body.mobile-preview .questions-heading,
body.mobile-preview .question-editor-filters,
body.mobile-preview .question-editor-actions { align-items: stretch; flex-direction: column; }
body.mobile-preview .dashboard-heading .button,
body.mobile-preview .question-editor-actions .button,
body.mobile-preview .question-editor-filters select,
body.mobile-preview .search-input { width: 100%; }
body.mobile-preview .dashboard-stat + .dashboard-stat { padding-left: 4px; border-left: 0; border-top: 1px solid var(--line); }
body.mobile-preview .reports-table { min-width: 760px; }
body.mobile-preview .stepper { width: calc(100% - 24px); padding: 18px 0 10px; }
body.mobile-preview .step-label { font-size: 11px; }
body.mobile-preview .screen h1 { font-size: 24px; }
body.mobile-preview .details-screen { padding: 28px 0 48px; gap: 28px; }
body.mobile-preview .details-intro { padding-bottom: 0; }
body.mobile-preview .details-form { padding: 18px; }
body.mobile-preview .language-options,
body.mobile-preview .option-grid { grid-template-columns: 1fr; }
body.mobile-preview .questions-heading { width: calc(100% - 24px); }
body.mobile-preview .question-list { width: calc(100% - 40px); border: 0; border-radius: 0; overflow: visible; background: transparent; }
body.mobile-preview .question-row { margin-bottom: 18px; overflow: hidden; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: 7px; }
body.mobile-preview .question-row:last-child { margin-bottom: 0; border-bottom: 1px solid var(--line); }
body.mobile-preview .question-meta { min-height: 48px; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); gap: 0; flex-direction: row; align-items: stretch; justify-content: stretch; }
body.mobile-preview .question-meta > strong { order: 2; width: 56px; display: grid; place-items: center; color: #fff; background: var(--coral); font-size: 18px; }
body.mobile-preview .type-label { order: 1; min-height: 48px; padding: 0 18px; display: flex; align-items: center; flex: 1; color: #fff; font-size: 14px; }
body.mobile-preview .type-label.strength { color: #fff; background: var(--strength); }
body.mobile-preview .type-label.weakness { color: #fff; background: var(--weakness); }
body.mobile-preview .question-option { min-height: 76px; padding: 16px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
body.mobile-preview .question-option .word-display { color: var(--ink); font-size: 15px; }
body.mobile-preview .question-option:last-child { border-bottom: 0; }
body.mobile-preview .assessment-footer { left: 50%; right: auto; width: min(430px, 100%); min-height: 126px; grid-template-columns: 1fr; gap: 10px; padding: 10px 12px; transform: translateX(-50%); }
body.mobile-preview .progress-track { width: 100%; }
body.mobile-preview .footer-actions { display: grid; grid-template-columns: 86px minmax(0, 1fr); }
body.mobile-preview .footer-actions .button,
body.mobile-preview .submit-wrap .button { min-width: 0; width: 100%; }
body.mobile-preview .questions-screen { padding-bottom: 170px; background: var(--soft); }
body.mobile-preview .report-screen { width: calc(100% - 28px); }
body.mobile-preview .top-result { padding: 16px 8px; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; }
body.mobile-preview .top-result + .top-result,
body.mobile-preview .interpretation + .interpretation { border-left: 0; border-top: 1px solid var(--line); }
body.mobile-preview .interpretation { grid-template-columns: 1fr; gap: 12px; }

.button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.button svg, .privacy-note svg, .time-note svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.button.primary { color: #fff; background: var(--coral); }
.button.primary:hover:not(:disabled) { background: var(--coral-dark); transform: translateY(-1px); }
.button.secondary { border-color: #aeb6c2; }
.button.secondary:hover { border-color: var(--ink); background: var(--soft); }
.button:focus-visible, input:focus-visible { outline: 3px solid rgba(240, 79, 67, 0.22); outline-offset: 2px; }
.button:disabled { color: #fff; background: #e9a19b; cursor: not-allowed; }

.stepper {
  width: min(650px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #7c8696;
  font-size: 13px;
  font-weight: 650;
}

.step::before, .step::after {
  content: "";
  position: absolute;
  top: 16px;
  width: 50%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.step::before { left: 0; }
.step::after { right: 0; }
.step:first-child::before, .step:last-child::after { display: none; }
.step.complete::before, .step.complete::after, .step.active::before { background: var(--green); }

.step-dot {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1px solid #cbd1d9;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  font-weight: 800;
}

.step-dot svg { width: 17px; height: 17px; }
.step.active, .step.complete { color: var(--ink); }
.step.active .step-dot, .step.complete .step-dot { color: #fff; border-color: var(--green); background: var(--green); }

main { width: 100%; padding: 0; }
.screen[hidden] { display: none; }

.screen h1, .screen h2, .screen h3, .screen h4, .screen p { margin: 0; letter-spacing: 0; }
.screen h1 { font-size: 30px; line-height: 1.2; }
.screen h2 { font-size: 19px; line-height: 1.3; }
.screen p { color: var(--muted); }

.auth-screen {
  width: min(1060px, calc(100% - 48px));
  min-height: calc(100vh - 74px);
  margin: 0 auto;
  padding: 46px 0 64px;
}

.auth-heading { max-width: 720px; margin: 0 auto; text-align: center; }
.auth-heading h1 { font-size: 34px; }
.auth-heading p { margin-top: 12px; font-size: 16px; }
.access-grid { width: min(500px, 100%); margin: 32px auto 0; display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.access-panel { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.access-title { display: flex; align-items: flex-start; gap: 13px; }
.access-title p { margin-top: 4px; font-size: 13px; }
.access-icon { width: 40px; height: 40px; padding: 9px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--coral); }
.access-icon.admin { background: var(--green); }
.access-icon svg { width: 22px; height: 22px; }
.access-panel > form { margin-top: 24px; }
.auth-error { min-height: 20px; margin: -4px 0 10px !important; color: #b52f2f !important; font-size: 13px; font-weight: 650; }
.auth-submit { width: 100%; }
.text-button { width: 100%; margin-top: 12px; padding: 7px; border: 0; color: #b43a31; background: transparent; font-size: 13px; font-weight: 750; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.demo-credential { margin-top: 18px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 3px; color: var(--muted); font-size: 12px; }
.demo-credential strong { color: var(--ink); font-size: 13px; }
.demo-credential.admin strong { color: var(--green); }
.signup-form { margin-top: 14px !important; padding-top: 18px; border-top: 1px solid var(--line); }
.signup-form h3 { margin-bottom: 16px !important; }
.local-access-note { margin-top: 18px; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; }
.local-access-note svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--green); }

.dashboard-screen { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 72px; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dashboard-heading p { margin-top: 7px; }
.dashboard-nav { margin-top: 28px; display: flex; align-items: center; gap: 26px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.dashboard-tab { min-height: 44px; padding: 2px 0 10px; border: 0; border-bottom: 3px solid transparent; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.dashboard-tab:hover { color: var(--ink); }
.dashboard-tab.active { color: var(--ink); border-bottom-color: var(--coral); }
.dashboard-tab span { min-width: 24px; padding: 2px 6px; border-radius: 10px; color: var(--muted); background: var(--soft); font-size: 11px; text-align: center; }
.dashboard-tab.active span { color: #fff; background: var(--coral); }
.dashboard-stats { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.admin-dashboard .dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-stat { min-width: 0; padding: 18px 20px; }
.dashboard-stat + .dashboard-stat { border-left: 1px solid var(--line); }
.dashboard-stat strong { display: block; font-size: 27px; line-height: 1.1; }
.dashboard-stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
.dashboard-section { margin-top: 28px; }
.section-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading > div:first-child { min-width: 0; }
.section-description { margin-top: 5px !important; font-size: 13px; }
.section-tools { display: flex; align-items: center; gap: 9px; }
.question-editor-heading { align-items: flex-end; }
.question-editor-filters { display: flex; align-items: flex-end; gap: 12px; }
.question-editor-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.question-editor-filters select { min-width: 170px; min-height: 40px; padding: 7px 32px 7px 10px; border: 1px solid #cbd2dc; border-radius: 6px; color: var(--ink); background: #fff; font-size: 13px; }
.question-editor-wrap { max-height: 640px; }
.question-editor-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.question-editor-table th, .question-editor-table td { padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.question-editor-table thead th { position: sticky; z-index: 1; top: 0; color: var(--muted); background: var(--soft); font-size: 11px; text-transform: uppercase; }
.question-editor-table th:first-child { width: 110px; }
.question-editor-table th:last-child, .question-editor-table td:last-child { border-right: 0; }
.question-editor-table tbody tr:last-child th, .question-editor-table tbody tr:last-child td { border-bottom: 0; }
.question-editor-table tbody th strong, .question-editor-table tbody th span { display: block; }
.question-editor-table tbody th strong { font-size: 14px; }
.question-editor-table tbody th span { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.question-editor-table input, .question-editor-table textarea { width: 100%; padding: 7px 9px; border: 1px solid #cbd2dc; border-radius: 5px; color: var(--ink); background: #fff; font-size: 13px; }
.question-editor-table input { min-height: 38px; font-weight: 750; }
.question-editor-table textarea { min-height: 92px; margin-top: 7px; resize: vertical; line-height: 1.4; }
.question-editor-table input:focus, .question-editor-table textarea:focus { border-color: var(--coral); outline: 3px solid rgba(240, 79, 67, 0.14); }
.question-editor-actions { min-height: 52px; padding-top: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.editor-status { margin-right: auto !important; color: var(--green) !important; font-size: 13px; font-weight: 700; }
.search-input { width: min(280px, 45vw); min-height: 40px; padding: 8px 12px; border: 1px solid #cbd2dc; border-radius: 6px; color: var(--ink); background: #fff; font-size: 13px; }
.filter-select { min-width: 150px; min-height: 40px; padding: 8px 30px 8px 10px; border: 1px solid #cbd2dc; border-radius: 6px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 650; }
.reports-table-wrap { margin-top: 0; }
.reports-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.reports-table th, .reports-table td { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 13px; }
.reports-table thead th { color: var(--muted); background: var(--soft); font-size: 11px; text-transform: uppercase; }
.reports-table tbody tr:hover { background: #fafbfc; }
.reports-table th:last-child, .reports-table td:last-child { width: 126px; border-right: 0; text-align: right; }
.reports-table tr:last-child td { border-bottom: 0; }
.report-user strong, .report-user small { display: block; }
.report-user small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.report-style { color: var(--style); font-weight: 800; }
.view-report-button { min-height: 34px; padding: 6px 10px; border: 1px solid #aeb6c2; border-radius: 5px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.view-report-button:hover { border-color: var(--ink); background: var(--soft); }
.users-table { min-width: 900px; }
.count-badge { min-width: 28px; min-height: 25px; padding: 3px 8px; border-radius: 13px; display: inline-grid; place-items: center; color: #fff; background: var(--green); font-size: 12px; font-weight: 800; }
.no-report-action { color: var(--muted); font-size: 12px; }
.empty-state { padding: 46px 20px; border: 1px solid var(--line); text-align: center; }
.empty-state p { margin-top: 6px; font-size: 14px; }

.details-screen {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 36px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1fr);
  align-items: center;
  gap: clamp(58px, 9vw, 130px);
}

.details-intro { align-self: center; padding-bottom: 70px; }
.details-intro p { margin-top: 15px; max-width: 440px; font-size: 17px; }

.privacy-note {
  margin-top: 58px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 350px;
  color: #7a8595;
  font-size: 14px;
}

.privacy-note svg { color: #929cab; }

.details-form {
  width: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.field { display: grid; gap: 7px; margin-bottom: 17px; font-size: 14px; font-weight: 700; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #cbd2dc;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  font-weight: 450;
}

.field input::placeholder { color: #929bab; }
.field input.invalid { border-color: #c93838; }
.field-error { min-height: 0; color: #b52f2f; font-size: 12px; font-weight: 600; }
.field-error:empty { display: none; }

.language-fieldset { margin: 2px 0 22px; padding: 0; border: 0; }
.language-fieldset legend { margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.language-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.language-option, .question-option {
  position: relative;
  cursor: pointer;
}

.language-option {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbd2dc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 650;
}

.language-option:has(input:checked) { border-color: var(--green); background: #f5fbf7; box-shadow: inset 0 0 0 1px var(--green); }
.language-option input, .question-option input { position: absolute; opacity: 0; pointer-events: none; }

.radio-mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid #a9b2bf;
  border-radius: 50%;
  background: #fff;
  flex: 0 0 auto;
}

input:checked + .radio-mark { border: 5px solid var(--coral); }
.language-option input:checked + .radio-mark { border-color: var(--green); }

.start-button { width: 100%; min-height: 52px; }
.time-note { margin-top: 14px !important; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }
.time-note svg { width: 17px; height: 17px; }

.questions-screen { padding: 22px 0 104px; }
.questions-heading {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.questions-heading p { margin-top: 7px; }
.question-legend { display: flex; gap: 18px; color: var(--muted); font-size: 13px; }
.question-legend span { display: flex; align-items: center; gap: 7px; }
.question-legend i { width: 8px; height: 8px; border-radius: 50%; }
.strength-key { background: var(--strength); }
.weakness-key { background: var(--weakness); }

.question-list {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  display: block;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.question-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.question-row:last-child { border-bottom: 0; }
.question-meta { padding: 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; border-right: 1px solid var(--line); }
.question-meta > strong { font-size: 17px; }
.type-label { font-size: 12px; font-weight: 800; }
.type-label.strength { color: var(--strength); }
.type-label.weakness { color: var(--weakness); }

.option-grid { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.question-option { min-width: 0; min-height: 106px; padding: 16px; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-content: start; border-right: 1px solid var(--line); }
.question-option:last-child { border-right: 0; }
.question-option:hover { background: var(--soft); }
.question-option:has(input:checked) { background: #fff7f6; box-shadow: inset 0 0 0 2px var(--coral); }
.question-option .radio-mark { margin-top: 2px; }
.option-copy { min-width: 0; }
.option-copy strong { display: block; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.option-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.42; }

.assessment-footer {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 86px;
  padding: 14px clamp(20px, 4vw, 58px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 34px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 26px rgba(29, 36, 51, 0.07);
}

.answer-progress strong { display: block; margin-bottom: 7px; font-size: 14px; }
.progress-track { width: min(580px, 100%); height: 8px; border-radius: 4px; overflow: hidden; background: #e7e9ed; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--green); transition: width 180ms ease; }
.footer-actions { display: flex; align-items: flex-start; gap: 12px; }
.footer-actions .button { min-width: 150px; }
.submit-wrap { display: grid; justify-items: stretch; gap: 3px; }
.submit-wrap .button { min-width: 240px; }
.submit-wrap > span { min-height: 17px; color: var(--muted); text-align: center; font-size: 11px; }

.report-screen { width: min(1360px, calc(100% - 56px)); margin: 0 auto; padding: 18px 0 54px; }
.report-heading { display: flex; justify-content: space-between; gap: 24px; }
.report-heading p { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.report-heading p strong { color: var(--ink); }
.meta-divider { width: 1px; height: 16px; background: #b8bec8; }

.top-results { margin-top: 28px; padding: 4px 0 26px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.top-result { --style: var(--ink); padding: 6px clamp(20px, 5vw, 70px); display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.top-result + .top-result { border-left: 1px solid var(--line); }
.top-result.peaceful, .score-bar-row.peaceful, tr.peaceful, .interpretation.peaceful { --style: var(--peaceful); }
.top-result.perfect, .score-bar-row.perfect, tr.perfect, .interpretation.perfect { --style: var(--perfect); }
.top-result.popular, .score-bar-row.popular, tr.popular, .interpretation.popular { --style: var(--popular); }
.top-result.powerful, .score-bar-row.powerful, tr.powerful, .interpretation.powerful { --style: var(--powerful); }
.result-symbol { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--style); font-size: 22px; font-weight: 850; }
.top-result small { display: block; color: var(--style); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.top-result strong { display: block; margin-top: 3px; color: var(--style); font-size: 27px; line-height: 1.1; }
.result-score { display: grid; justify-items: center; color: var(--style); }
.result-score b { font-size: 42px; line-height: 1; }
.result-score span { color: var(--muted); font-size: 13px; }

.report-section { margin-top: 25px; }
.score-bars { margin-top: 15px; display: grid; gap: 14px; }
.score-bar-row { --style: var(--ink); display: grid; grid-template-columns: 105px minmax(0, 1fr) 62px; align-items: center; gap: 14px; color: var(--style); }
.score-bar-row > strong, .score-bar-row > b { font-size: 13px; }
.score-track { height: 14px; overflow: hidden; background: #eef0f2; }
.score-track span { display: block; height: 100%; background: var(--style); }

.table-wrap { margin-top: 11px; overflow-x: auto; border: 1px solid var(--line); }
.score-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; }
.score-table th, .score-table td { padding: 10px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.score-table thead th { color: var(--ink); background: var(--soft); }
.score-table tbody th { color: var(--style); }
.score-table th:last-child, .score-table td:last-child { border-right: 0; }
.score-table tr:last-child th, .score-table tr:last-child td { border-bottom: 0; }

.interpretations { margin-top: 11px; border: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.interpretation { --style: var(--ink); min-width: 0; padding: 18px; display: grid; grid-template-columns: 0.75fr 1fr 1fr; gap: 18px; }
.interpretation + .interpretation { border-left: 1px solid var(--line); }
.interpretation-title span { color: var(--style); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.interpretation-title h3 { margin-top: 3px; color: var(--style); font-size: 22px; }
.interpretation h4 { font-size: 13px; }
.interpretation ul { margin: 7px 0 0; padding-left: 16px; color: var(--muted); font-size: 12px; }
.interpretation li + li { margin-top: 3px; }
.report-note { margin-top: 24px !important; font-size: 12px; }

.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; }

@media (max-width: 900px) {
  .app-header { min-height: 64px; padding: 0 18px; }
  .brand { gap: 10px; font-size: 13px; }
  .brand-mark { font-size: 22px; }
  .account-name { display: none; }
  .account-actions { padding-left: 0; border-left: 0; }
  .auth-screen { width: min(720px, calc(100% - 32px)); min-height: auto; padding: 38px 0 48px; }
  .access-grid { grid-template-columns: 1fr; }
  .dashboard-screen { width: calc(100% - 32px); padding-top: 34px; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-stat + .dashboard-stat { padding-left: 4px; border-left: 0; border-top: 1px solid var(--line); }
  .admin-dashboard .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-dashboard .dashboard-stat { padding: 17px 18px; }
  .admin-dashboard .dashboard-stat + .dashboard-stat { border-top: 0; border-left: 1px solid var(--line); }
  .admin-dashboard .dashboard-stat:nth-child(odd) { border-left: 0; }
  .admin-dashboard .dashboard-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stepper { padding-top: 20px; }
  .details-screen { width: min(640px, calc(100% - 32px)); min-height: auto; padding: 28px 0 48px; grid-template-columns: 1fr; gap: 28px; }
  .details-intro { padding-bottom: 0; }
  .details-intro p { font-size: 15px; }
  .privacy-note { margin-top: 22px; }
  .questions-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .question-row { grid-template-columns: 96px minmax(0, 1fr); }
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-option { border-bottom: 1px solid var(--line); }
  .question-option:nth-child(2n) { border-right: 0; }
  .question-option:nth-last-child(-n+2) { border-bottom: 0; }
  .assessment-footer { grid-template-columns: 1fr; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .progress-track { width: 100%; }
  .footer-actions { justify-content: flex-end; }
  .questions-screen { padding-bottom: 150px; }
  .report-actions .button span { display: none; }
  .report-actions .button { width: 42px; min-height: 42px; padding: 8px; }
  .top-results { grid-template-columns: 1fr; }
  .top-result { padding: 16px 8px; }
  .top-result + .top-result { border-left: 0; border-top: 1px solid var(--line); }
  .interpretations { grid-template-columns: 1fr; }
  .interpretation + .interpretation { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
  body.mobile-preview { padding: 0; }
  body.mobile-preview .app-shell { width: 100%; box-shadow: none; }
  .app-header { padding-top: 8px; padding-bottom: 8px; gap: 10px; flex-wrap: wrap; }
  .brand > span:last-child { display: none; }
  .header-tools { gap: 6px; }
  .global-language select { max-width: 105px; }
  .admin-login-button { width: 42px; min-height: 42px; padding: 8px; }
  .admin-login-button span { display: none; }
  .auth-heading h1 { font-size: 27px; }
  .auth-heading p { font-size: 14px; }
  .access-panel { padding: 19px; }
  .dashboard-heading { align-items: stretch; flex-direction: column; }
  .dashboard-heading .button { width: 100%; }
  .dashboard-nav { gap: 20px; }
  .admin-dashboard .dashboard-stats { grid-template-columns: 1fr; }
  .admin-dashboard .dashboard-stat + .dashboard-stat { padding-left: 18px; border-left: 0; border-top: 1px solid var(--line); }
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-tools { align-items: stretch; flex-direction: column; }
  .section-tools .search-input, .filter-select { width: 100%; }
  .question-editor-filters { align-items: stretch; flex-direction: column; }
  .question-editor-filters select { width: 100%; }
  .question-editor-actions { align-items: stretch; flex-direction: column; }
  .question-editor-actions .button { width: 100%; }
  .editor-status { min-height: 20px; margin-right: 0 !important; }
  .search-input { width: 100%; }
  .reports-table { min-width: 760px; }
  .stepper { width: calc(100% - 24px); padding-bottom: 10px; }
  .step-label { font-size: 11px; }
  .screen h1 { font-size: 24px; }
  .details-form { padding: 18px; }
  .language-options { grid-template-columns: 1fr; }
  .questions-heading { width: calc(100% - 24px); }
  .question-list { width: calc(100% - 40px); border: 0; border-radius: 0; overflow: visible; background: transparent; }
  .question-legend { flex-wrap: wrap; }
  .question-row { margin-bottom: 18px; overflow: hidden; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: 7px; }
  .question-row:last-child { margin-bottom: 0; border-bottom: 1px solid var(--line); }
  .question-meta { min-height: 48px; padding: 0; border-right: 0; border-bottom: 1px solid var(--line); gap: 0; flex-direction: row; align-items: stretch; justify-content: stretch; }
  .question-meta > strong { order: 2; width: 56px; display: grid; place-items: center; color: #fff; background: var(--coral); font-size: 18px; }
  .type-label { order: 1; min-height: 48px; padding: 0 18px; display: flex; align-items: center; flex: 1; color: #fff; font-size: 14px; }
  .type-label.strength { color: #fff; background: var(--strength); }
  .type-label.weakness { color: #fff; background: var(--weakness); }
  .option-grid { grid-template-columns: 1fr; }
  .question-option { min-height: 76px; padding: 16px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .question-option .word-display { color: var(--ink); font-size: 15px; }
  .question-option:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .question-option:last-child { border-bottom: 0; }
  .assessment-footer { min-height: 126px; }
  .footer-actions { display: grid; grid-template-columns: 86px minmax(0, 1fr); }
  .footer-actions .button, .submit-wrap .button { min-width: 0; width: 100%; }
  .questions-screen { padding-bottom: 170px; background: var(--soft); }
  .report-screen { width: calc(100% - 28px); }
  .report-heading p { gap: 7px; }
  .meta-divider { display: none; }
  .top-result { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; }
  .result-symbol { width: 44px; height: 44px; }
  .top-result strong { font-size: 22px; }
  .result-score b { font-size: 32px; }
  .score-bar-row { grid-template-columns: 76px minmax(0, 1fr) 52px; gap: 8px; }
  .score-table { min-width: 520px; }
  .interpretation { grid-template-columns: 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@page { size: A4; margin: 12mm; }

@media print {
  body { background: #fff; }
  body.mobile-preview { padding: 0; }
  body.mobile-preview .app-shell { width: 100%; box-shadow: none; }
  .app-header, .stepper, [data-screen="1"], [data-screen="2"] { display: none !important; }
  .report-screen[hidden] { display: block !important; }
  .report-screen { width: 100%; padding: 0; }
  .report-screen h1 { font-size: 24px; }
  .top-results { margin-top: 16px; padding-bottom: 14px; }
  .top-result { padding: 4px 18px; }
  .result-symbol { width: 44px; height: 44px; }
  .top-result strong { font-size: 21px; }
  .result-score b { font-size: 30px; }
  .report-section { margin-top: 16px; break-inside: avoid; }
  .score-bars { gap: 8px; }
  .score-track { height: 10px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .interpretations { break-inside: avoid; }
  .interpretation { padding: 12px; gap: 10px; }
  .result-symbol, .step-dot, .score-track span { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
