:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #17202f;
  --muted: #697386;
  --line: #dbe1eb;
  --blue: #2563eb;
  --blue-dark: #1749b5;
  --green: #0f9f6e;
  --coral: #e65f4f;
  --yellow: #f2b84b;
  --shadow: 0 24px 80px rgba(29, 41, 57, 0.14);
  --soft-shadow: 0 14px 40px rgba(29, 41, 57, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.12), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(15, 159, 110, 0.12), transparent 22rem),
    linear-gradient(135deg, #fbfcff 0%, var(--bg) 48%, #eef4f3 100%);
}

html {
  scroll-behavior: smooth;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.side-panel {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 76px;
  padding: 12px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(219, 225, 235, 0.9);
  background: rgba(255, 255, 255, 0.94);
  color: #112033;
  box-shadow: 0 10px 28px rgba(29, 41, 57, 0.08);
  backdrop-filter: blur(14px);
}

.sidebar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.sidebar-cta,
.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.nav-link {
  width: 100%;
  width: auto;
  min-height: 42px;
  padding: 0 13px;
  background: transparent;
  color: #344054;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-link span {
  display: none;
}

.nav-link:hover,
.nav-link.is-active {
  border-color: #dbeafe;
  background: #eef4ff;
  color: var(--blue);
}

.nav-button {
  justify-content: flex-start;
  font: inherit;
  cursor: pointer;
}

.sidebar-cta {
  justify-content: center;
  min-height: 44px;
  margin-top: 0;
  padding: 0 16px;
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sidebar-cta:hover {
  background: var(--blue-dark);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

.nav-link:active,
.sidebar-cta:active,
.icon-button:active {
  transform: translateY(1px);
}

.sidebar-cta svg,
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #eef4ff;
  color: var(--blue);
}

.info-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  width: min(440px, 100%);
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  overflow-y: auto;
  background: #112033;
  color: #f8fbff;
  box-shadow: -24px 0 70px rgba(17, 32, 51, 0.34);
  animation: drawer-in 0.24s ease both;
}

.info-menu[hidden] {
  display: none;
}

.info-menu::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(15, 23, 42, 0.36);
}

.info-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.info-menu-header h2 {
  margin: 0;
  font-size: 1.6rem;
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--blue);
}

.brand-mark svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-block h1,
.screen h2,
.result-header h2,
.summary-panel h3,
.score-panel h3,
.insight-grid h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand-block h1 {
  font-size: 1.6rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.side-panel .eyebrow {
  color: var(--blue);
}

.info-menu .eyebrow {
  color: #8fc4ff;
}

.type-orbit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.type-orbit span {
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #dcecff;
  font-weight: 800;
}

.dimension-list {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.info-menu .dimension-list {
  margin-top: 0;
}

.dimension-list div {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.dimension-list span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fbff;
  color: #112033;
  font-weight: 800;
}

.dimension-list strong {
  font-size: 0.92rem;
}

.dimension-list small {
  color: #b8c7da;
}

.main-panel {
  display: block;
  padding: 0;
}

.screen {
  width: 100%;
  animation: screen-in 0.28s ease both;
}

.is-hidden {
  display: none;
}

.screen.is-hidden {
  display: none;
}

.intro-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.landing-screen {
  display: block;
}

.site-page.is-hidden {
  display: none;
}

.hero-section {
  position: relative;
  min-height: calc(100vh - 76px);
  min-height: calc(100dvh - 76px);
  display: flex;
  align-items: center;
  padding: 72px clamp(24px, 7vw, 92px);
  overflow: hidden;
  background-image: url("assets/hero-personality.png");
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.86) 35%, rgba(248, 251, 255, 0.18) 72%),
    linear-gradient(180deg, rgba(17, 32, 51, 0.04), rgba(17, 32, 51, 0.18));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-content h2,
.section-heading h2 {
  margin: 0;
  color: #101828;
  letter-spacing: 0;
}

.hero-content h2 {
  font-size: clamp(2.6rem, 7vw, 5.9rem);
  line-height: 0.98;
}

.hero-content p {
  max-width: 650px;
  margin: 24px 0 0;
  color: #475467;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.ghost-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #253044;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.content-band,
.source-band {
  padding: 72px clamp(24px, 7vw, 92px);
}

.muted-band {
  background: #eef4f8;
}

.section-heading {
  max-width: 840px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.feature-grid article,
.deep-content-grid article,
.process-list div,
.timeline-panel,
.type-guide-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.feature-grid article {
  padding: 24px;
}

.deep-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.deep-content-grid article {
  padding: 24px;
}

.feature-grid span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.feature-grid h3,
.deep-content-grid h3,
.timeline-panel h3,
.type-guide-grid h3,
.process-list strong {
  display: block;
  margin-top: 14px;
  color: #17202f;
  font-size: 1.08rem;
}

.feature-grid p,
.deep-content-grid p,
.process-list p,
.timeline-panel li,
.type-guide-grid p,
.type-guide-grid small,
.source-band p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.process-list {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin-top: 30px;
}

.process-list div {
  padding: 22px 24px;
}

.timeline-panel {
  max-width: 860px;
  margin-top: 18px;
  padding: 24px;
}

.timeline-panel h3 {
  margin-top: 0;
}

.timeline-panel ol {
  margin: 12px 0 0;
  padding-left: 22px;
}

.source-band {
  background: #112033;
}

.source-band p {
  max-width: 900px;
  margin: 0;
  color: #cfe0f5;
}

.info-page {
  min-height: calc(100vh - 76px);
}

.info-page .type-orbit,
.info-page .dimension-list {
  max-width: 900px;
}

.info-page .type-orbit span {
  border-color: var(--line);
  background: #ffffff;
  color: #17202f;
  box-shadow: var(--soft-shadow);
}

.info-page .dimension-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.info-page .dimension-list div {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.info-page .dimension-list small {
  color: var(--muted);
}

.type-guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.type-guide-grid article {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 20px;
}

.type-guide-grid span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
}

.type-guide-grid h3 {
  margin-top: 16px;
}

.type-guide-grid small {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.86rem;
}

.intro-copy,
.start-panel,
.quiz-screen,
.summary-panel,
.score-panel,
.insight-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-copy {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.intro-copy h2 {
  max-width: 720px;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.intro-copy > p {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.home-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.home-info-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.home-info-grid h3,
.start-panel h3 {
  margin: 0;
  color: #17202f;
  letter-spacing: 0;
}

.home-info-grid h3 {
  font-size: 1rem;
}

.home-info-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.start-panel {
  display: flex;
  max-width: 720px;
  margin: 72px auto;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px;
}

.start-panel-hidden {
  display: none;
}

.start-panel label {
  margin-top: 4px;
  color: #344054;
  font-weight: 700;
}

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

.start-panel input,
.start-panel select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #ffffff;
}

.start-panel input:focus,
.start-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.start-panel input.is-invalid,
.start-panel select.is-invalid {
  border-color: #e65f4f;
  background: #fff6f5;
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: #c0352b;
  font-size: 0.88rem;
  font-weight: 700;
}

.admin-page {
  min-height: calc(100vh - 76px);
}

.admin-auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: center;
}

.admin-auth-panel > div:first-child h2,
.dashboard-header h2 {
  margin: 0;
  color: #101828;
  letter-spacing: 0;
}

.admin-auth-panel > div:first-child h2 {
  max-width: 640px;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.admin-auth-panel > div:first-child p:not(.eyebrow),
.dashboard-header p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-form,
.type-summary-panel,
.participant-panel,
.dashboard-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.login-form {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.login-form label,
.table-toolbar h3,
.type-summary-panel h3 {
  color: #17202f;
  font-weight: 800;
}

.login-form input,
.table-toolbar input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #ffffff;
}

.login-form input:focus,
.table-toolbar input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.dashboard-panel {
  display: grid;
  gap: 18px;
}

.admin-auth-panel.is-hidden,
.dashboard-panel.is-hidden {
  display: none;
}

.dashboard-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.dashboard-header h2 {
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.08;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-actions a {
  text-decoration: none;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-stats article {
  padding: 20px;
}

.dashboard-stats span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.dashboard-stats strong {
  display: block;
  margin-top: 10px;
  color: #17202f;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  gap: 16px;
}

.type-summary-panel,
.participant-panel {
  padding: 22px;
}

.type-summary-panel h3,
.participant-panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.type-summary-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.type-summary-row {
  display: grid;
  grid-template-columns: 48px 1fr 36px;
  gap: 10px;
  align-items: center;
}

.type-summary-row strong {
  color: var(--blue);
}

.type-summary-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.type-summary-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf6;
}

.type-summary-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.table-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.table-toolbar input {
  max-width: 280px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #ffffff;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f6;
  color: #344054;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fbff;
  color: #17202f;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.type-badge {
  display: inline-flex;
  min-width: 52px;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 800;
}

.dashboard-empty {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.save-status {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.save-status:empty {
  display: none;
}

.save-status.is-saving {
  background: #eef4ff;
  color: var(--blue-dark);
}

.save-status.is-saved {
  background: #e8f7ef;
  color: #08734e;
}

.save-status.is-error {
  background: #fff0ee;
  color: #c0352b;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.primary-button:active,
.ghost-button:active {
  transform: translateY(1px);
}

.primary-button {
  background: var(--blue);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #a9b6cb;
}

.ghost-button {
  border-color: var(--line);
  background: #ffffff;
  color: #253044;
}

.ghost-button:hover {
  background: #f3f6fb;
}

.primary-button svg,
.ghost-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiz-screen {
  padding: 32px;
}

.quiz-topbar {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.quiz-topbar h2 {
  max-width: 760px;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.mobile-progress-track {
  display: none;
  width: 100%;
  height: 10px;
  margin: 10px 0 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.mobile-progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.25s ease;
}

.progress-ring {
  position: relative;
  width: 104px;
  min-width: 104px;
  height: 104px;
}

.progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-value {
  fill: none;
  stroke-width: 10;
}

.ring-bg {
  stroke: #e8edf5;
}

.ring-value {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset 0.25s ease;
}

.progress-ring strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.answers {
  display: grid;
  gap: 12px;
  margin: 32px 0;
}

.answers-enter {
  animation: answers-in 0.22s ease both;
}

@keyframes answers-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}

.question-pair div {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.question-pair span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.question-pair strong {
  display: block;
  color: #1d2939;
  line-height: 1.45;
}

.answer-option {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #263245;
  text-align: left;
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.answer-option:hover,
.answer-option.is-selected {
  border-color: var(--blue);
  background: #eff5ff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.13);
  transform: translateY(-1px);
}

.answer-option:active {
  transform: scale(0.99);
}

.answer-option span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e8eef8;
  color: #223048;
  font-weight: 800;
}

.answer-option.is-selected span {
  background: var(--blue);
  color: #ffffff;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.scale-hint,
.source-note {
  margin: -12px 0 26px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.source-note {
  margin: 18px 0 0;
}

.result-screen {
  display: block;
}

.result-screen.is-hidden {
  display: none;
}

.result-header {
  margin-bottom: 18px;
}

.result-header h2 {
  color: var(--blue);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
}

.result-header p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 18px;
}

.summary-panel,
.score-panel,
.insight-grid article {
  padding: 24px;
}

.summary-panel h3,
.score-panel h3,
.insight-grid h3 {
  font-size: 1.2rem;
}

.summary-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.summary-panel .participant-meta {
  display: inline-flex;
  width: fit-content;
  margin: 12px 0 0;
  padding: 7px 10px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue-dark);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.score-bars {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.score-row {
  display: grid;
  gap: 8px;
}

.score-label {
  display: flex;
  justify-content: space-between;
  color: #344054;
  font-weight: 800;
}

.score-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #e7edf6;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--yellow), var(--green));
}

.score-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.insight-grid ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.insight-grid p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

  .side-panel {
    min-height: auto;
    padding: 20px 24px;
  }

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

  .main-panel {
    padding: 24px;
  }

  .intro-screen,
  .home-info-grid,
  .feature-grid,
  .deep-content-grid,
  .type-guide-grid,
  .admin-auth-panel,
  .dashboard-content,
  .result-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-header {
    flex-direction: column;
  }

  .dashboard-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 580px) {
  body {
    background: #f5f7fb;
  }

  .app-shell {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .side-panel {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 9px;
    height: auto;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(219, 225, 235, 0.95);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(29, 41, 57, 0.1);
  }

  .sidebar-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    width: auto;
    min-height: 36px;
    flex: 0 0 auto;
    padding: 0 12px;
    border-color: #dbe4f0;
    background: #f8fbff;
    color: #344054;
    font-size: 0.78rem;
  }

  .nav-link:hover,
  .nav-link.is-active {
    border-color: #bfdbfe;
    background: #eef4ff;
    color: var(--blue);
  }

  .nav-link span {
    display: none;
  }

  .sidebar-cta {
    grid-column: 2;
    grid-row: 1;
    min-height: 40px;
    margin-top: 0;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--blue);
    color: #ffffff;
    font-size: 0.86rem;
  }

  .sidebar-cta svg {
    display: none;
  }

  .info-menu {
    width: 100%;
    padding: 18px;
  }

  .brand-block {
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-mark svg {
    width: 27px;
    height: 27px;
  }

  .brand-block h1 {
    font-size: 1rem;
  }

  .brand-block .eyebrow {
    margin-bottom: 2px;
    font-size: 0.64rem;
  }

  .main-panel {
    align-items: flex-start;
    min-height: auto;
    padding: 14px;
  }

  .landing-screen {
    margin: -14px;
  }

  .hero-section {
    min-height: 620px;
    align-items: flex-end;
    padding: 34px 18px 36px;
    background-position: 60% center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(17, 32, 51, 0.06) 0%, rgba(248, 251, 255, 0.76) 45%, rgba(248, 251, 255, 0.98) 78%),
      linear-gradient(90deg, rgba(248, 251, 255, 0.96), rgba(248, 251, 255, 0.2));
  }

  .hero-content {
    padding: 18px;
    border: 1px solid rgba(219, 225, 235, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 45px rgba(29, 41, 57, 0.16);
    backdrop-filter: blur(10px);
  }

  .hero-content h2 {
    font-size: 2.18rem;
    line-height: 1.04;
  }

  .hero-content p {
    margin-top: 16px;
    font-size: 0.94rem;
    line-height: 1.58;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 22px;
    flex-direction: column;
  }

  .hero-actions .primary-button,
  .ghost-link {
    width: 100%;
  }

  .content-band,
  .source-band {
    padding: 44px 18px;
  }

  .section-heading h2 {
    font-size: 1.85rem;
  }

  .feature-grid {
    gap: 12px;
    margin-top: 22px;
  }

  .deep-content-grid,
  .type-guide-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }

  .feature-grid article,
  .deep-content-grid article,
  .process-list div,
  .timeline-panel,
  .type-guide-grid article {
    padding: 18px;
  }

  .type-guide-grid article {
    min-height: auto;
  }

  .start-panel {
    width: calc(100% - 28px);
    margin: 44px auto;
  }

  .intro-copy,
  .start-panel,
  .quiz-screen,
  .login-form,
  .type-summary-panel,
  .participant-panel,
  .summary-panel,
  .score-panel,
  .insight-grid article {
    padding: 18px;
  }

  .admin-auth-panel {
    gap: 18px;
  }

  .admin-auth-panel > div:first-child h2 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .dashboard-header h2 {
    font-size: 1.8rem;
  }

  .dashboard-actions,
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-actions .primary-button,
  .dashboard-actions .ghost-button,
  .table-toolbar input {
    width: 100%;
    max-width: none;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-stats article {
    padding: 16px;
  }

  .dashboard-stats strong {
    font-size: 1.65rem;
  }

  .intro-screen {
    gap: 12px;
  }

  .intro-copy {
    min-height: auto;
    box-shadow: var(--soft-shadow);
  }

  .intro-copy h2 {
    font-size: 2rem;
    line-height: 1.08;
  }

  .intro-copy > p {
    margin-top: 16px;
    font-size: 0.96rem;
    line-height: 1.58;
  }

  .home-info-grid {
    gap: 10px;
    margin-top: 18px;
  }

  .home-info-grid article {
    padding: 14px;
  }

  .start-panel {
    box-shadow: var(--soft-shadow);
  }

  .start-panel input,
  .start-panel select,
  .primary-button,
  .ghost-button {
    min-height: 52px;
  }

  .quiz-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100vh - 95px);
    min-height: calc(100dvh - 95px);
    border-radius: 8px;
    box-shadow: var(--soft-shadow);
  }

  .quiz-screen.is-hidden {
    display: none;
  }

  .quiz-topbar {
    flex-direction: column;
    gap: 10px;
    margin: -18px -18px 0;
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.96);
  }

  .quiz-topbar h2 {
    color: #17202f;
    font-size: 1.35rem;
    line-height: 1.28;
  }

  .progress-ring {
    display: none;
  }

  .mobile-progress-track {
    display: block;
  }

  .answers {
    gap: 10px;
    margin: 18px 0;
  }

  .answer-option {
    grid-template-columns: 34px 1fr;
    min-height: 58px;
    padding: 12px;
    gap: 12px;
    color: #17202f;
  }

  .answer-option span {
    width: 34px;
    height: 34px;
  }

  .answer-option strong {
    color: #17202f;
    line-height: 1.25;
  }

  .scale-hint {
    color: #4c596d;
    margin: 14px 0 0;
    font-size: 0.82rem;
  }

  .quiz-actions,
  .result-actions {
    flex-direction: column;
  }

  .quiz-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin: auto -18px -18px;
    padding: 12px 18px 18px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -12px 32px rgba(29, 41, 57, 0.08);
  }

  .quiz-actions button,
  .result-actions button {
    width: 100%;
  }

  .result-header h2 {
    font-size: 4rem;
  }

  .result-header p:last-child,
  .summary-panel p,
  .insight-grid p,
  .insight-grid ul,
  .source-note,
  .score-note {
    color: #4c596d;
  }

  .summary-panel .participant-meta {
    color: var(--blue-dark);
  }

  .summary-panel,
  .score-panel,
  .insight-grid article {
    box-shadow: var(--soft-shadow);
  }
}

@media (max-width: 380px) {
  .main-panel {
    padding: 10px;
  }

  .quiz-topbar h2 {
    font-size: 1.18rem;
  }

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