:root {
  --bg: #f4fbfb;
  --surface: #ffffff;
  --surface-soft: #eef8f7;
  --ink: #163039;
  --muted: #667987;
  --brand: #0d7d86;
  --brand-dark: #075d66;
  --brand-soft: #d9f4f1;
  --accent: #ec6f8f;
  --accent-soft: #ffe4eb;
  --line: #d6e7e6;
  --shadow: 0 24px 70px rgba(8, 64, 73, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(236, 111, 143, 0.18), transparent 28%),
    linear-gradient(135deg, #eaf8f7 0%, #fbfdfd 46%, #f8eef2 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 32px clamp(28px, 5vw, 72px);
  color: #f9ffff;
  background:
    linear-gradient(120deg, rgba(7, 93, 102, 0.96), rgba(11, 127, 134, 0.88)),
    url("data:image/svg+xml,%3Csvg width='1600' height='1100' viewBox='0 0 1600 1100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%23065b63'/%3E%3Cstop offset='1' stop-color='%2312a7a1'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='1100' fill='url(%23a)'/%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.16' stroke-width='4'%3E%3Cpath d='M152 762c262-230 449-259 722-86 205 130 355 121 582-33'/%3E%3Cpath d='M74 348c207-143 388-154 541-33 198 157 405 143 701-52'/%3E%3Cpath d='M233 961c159-116 312-135 458-57 198 106 378 70 539-107'/%3E%3C/g%3E%3Cg fill='%23fff' fill-opacity='.24'%3E%3Ccircle cx='243' cy='309' r='8'/%3E%3Ccircle cx='611' cy='313' r='10'/%3E%3Ccircle cx='889' cy='684' r='12'/%3E%3Ccircle cx='1240' cy='796' r='9'/%3E%3Ccircle cx='1378' cy='260' r='11'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 16px;
  letter-spacing: 0;
}

.brand-lockup small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.brand-content {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
  padding: 92px 0 84px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-panel .eyebrow {
  color: #ffdbe5;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand-content p:not(.eyebrow) {
  max-width: 560px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.65;
}

.journey-strip {
  display: grid;
  width: min(520px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.journey-strip span {
  padding: 16px 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.journey-strip span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.mind-visual {
  position: absolute;
  right: -72px;
  bottom: -96px;
  width: min(48vw, 560px);
  aspect-ratio: 1;
  opacity: 0.85;
}

.orb,
.pulse-ring,
.node {
  position: absolute;
  border-radius: 50%;
}

.orb-one {
  inset: 9%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.65), transparent 19%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(236, 111, 143, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.orb-two {
  inset: 28%;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
}

.pulse-ring {
  inset: 1%;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.node {
  width: 16px;
  height: 16px;
  background: #ffdbe5;
  box-shadow: 0 0 0 9px rgba(255, 219, 229, 0.18);
}

.node-a {
  top: 18%;
  left: 32%;
}

.node-b {
  top: 42%;
  right: 18%;
}

.node-c {
  right: 35%;
  bottom: 16%;
}

.node-d {
  bottom: 34%;
  left: 16%;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  align-items: center;
  padding: 32px clamp(20px, 4vw, 56px);
}

.auth-card,
.dashboard-preview {
  width: min(460px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(214, 231, 230, 0.85);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.auth-card {
  padding: clamp(24px, 5vw, 42px);
}

.auth-header p:not(.eyebrow) {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tab-button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.tab-button.active {
  color: var(--brand-dark);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(8, 64, 73, 0.1);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: grid;
}

.auth-form label:not(.check-line) {
  margin-bottom: 8px;
  color: #314b55;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
  width: 100%;
  min-height: 48px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfefe;
  color: var(--ink);
  outline: none;
  padding: 0 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.auth-form input:focus {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(13, 125, 134, 0.12);
}

.auth-form input::placeholder {
  color: #9aabb2;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 20px;
}

.check-line {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.check-line input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.terms-line {
  margin: 4px 0 20px;
}

.password-note {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--brand-dark);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.form-link {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.link-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.back-link {
  width: max-content;
  margin-bottom: 18px;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  box-shadow: 0 14px 26px rgba(13, 125, 134, 0.26);
}

.primary-button:hover {
  filter: brightness(1.04);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.5;
}

.secondary-button {
  width: 100%;
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.form-message {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.form-message.error {
  color: #b53655;
}

.dashboard-preview {
  display: grid;
  gap: 26px;
  padding: clamp(24px, 5vw, 42px);
  width: min(780px, 100%);
}

.dashboard-preview p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.assessment-header {
  display: grid;
  gap: 2px;
}

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

.status-grid article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfefe;
  padding: 14px 10px;
  text-align: center;
}

.status-grid strong,
.status-grid span {
  display: block;
}

.status-grid strong {
  color: var(--brand-dark);
  font-size: 20px;
  line-height: 1.1;
}

.status-grid span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.assessment-form {
  display: grid;
  gap: 16px;
}

.question-progress {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfefe;
  padding: 14px;
}

.question-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.question-progress span,
.question-progress strong {
  font-size: 12px;
  font-weight: 900;
}

.question-progress span {
  color: var(--brand-dark);
}

.question-progress strong {
  color: var(--muted);
  white-space: nowrap;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

#question-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-dark), var(--accent));
  transition: width 180ms ease;
}

#questions-list {
  min-height: 430px;
}

.question-card {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfefe;
  padding: 22px;
  box-shadow: 0 14px 34px rgba(8, 64, 73, 0.08);
}

.question-card.active {
  display: block;
}

.question-card.answered .question-number {
  background: var(--brand);
  color: #ffffff;
}

.question-title {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.22;
}

.question-number {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
}

.answer-grid {
  display: grid;
  gap: 10px;
}

.answer-option {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-option::before {
  content: attr(data-scale);
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.answer-option span {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.answer-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(13, 125, 134, 0.1);
}

.answer-option:has(input:checked)::before {
  background: var(--brand);
  color: #ffffff;
}

.question-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.question-actions .primary-button,
.question-actions .secondary-button {
  width: 100%;
}

.question-actions #save-assessment {
  grid-column: 2;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 18px;
}

.result-card h3 {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 22px;
  line-height: 1.2;
}

.result-card p:last-child {
  margin-bottom: 0;
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel,
  .auth-panel {
    min-height: auto;
  }

  .brand-panel {
    padding-bottom: 44px;
  }

  .brand-content {
    padding: 72px 0 40px;
  }

  .mind-visual {
    width: 360px;
    opacity: 0.5;
  }

  .auth-panel {
    padding-top: 38px;
    padding-bottom: 56px;
  }

}

@media (max-width: 640px) {
  .brand-panel {
    display: none;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 26px;
  }

  .brand-content p:not(.eyebrow) {
    margin-bottom: 22px;
    font-size: 15px;
    line-height: 1.55;
  }

  .journey-strip {
    grid-template-columns: 1fr;
  }

  .journey-strip span + span {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 0;
  }

  .auth-panel {
    padding: 18px 14px 40px;
  }

  .auth-card,
  .dashboard-preview {
    box-shadow: 0 18px 46px rgba(8, 64, 73, 0.14);
  }

  .dashboard-preview {
    gap: 18px;
    padding: 24px 18px;
  }

  #questions-list {
    min-height: 428px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-grid {
    display: none;
  }

  .question-card {
    padding: 18px;
  }

  .question-title {
    font-size: 20px;
  }

  .answer-option {
    min-height: 54px;
  }

}
