/* =========================================================
   연프트립 — Modern Korean unicorn-inspired UI
   Refs: Toss(whitespace/soft shadow/strong CTA)
         Karrot(warm tone/large tap target)
         Musinsa(bold headings/clean grid)
         LINE(clarity) · Naver(accessibility)
   ========================================================= */

:root {
  color-scheme: light;

  /* Neutral scale (Toss-style cool gray) */
  --ink: #14181f;
  --muted: #6b7280;
  --subtle: #9aa1ac;
  --paper: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-soft-2: #eef1f5;
  --line: #e6e8ec;
  --line-strong: #d3d7de;

  /* Accents */
  --coral: #ff5a3c;          /* primary CTA (Karrot-warm + modernized) */
  --coral-press: #e8462a;
  --coral-soft: #fff0ec;
  --teal: #0c8f7e;           /* secondary accent */
  --teal-soft: #e6f6f3;
  --gold: #f2a93b;           /* highlight on dark */
  --charcoal: #161a21;

  /* Effects */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(20, 24, 31, 0.04);
  --shadow-sm: 0 2px 8px rgba(20, 24, 31, 0.06);
  --shadow: 0 8px 24px rgba(20, 24, 31, 0.08);
  --shadow-md: 0 12px 32px rgba(20, 24, 31, 0.10);
  --shadow-lg: 0 24px 60px rgba(20, 24, 31, 0.14);
  --shadow-coral: 0 10px 24px rgba(255, 90, 60, 0.30);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Nanum Gothic", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(255, 90, 60, 0.18);
}

/* ============ Header ============ */
.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(230, 232, 236, 0.7);
  display: flex;
  gap: 28px;
  height: 64px;
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(20px, 5vw, 64px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  font-size: 19px;
  gap: 10px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--coral), #ff7a52);
  border-radius: 10px;
  color: white;
  display: inline-flex;
  font-size: 15px;
  height: 32px;
  justify-content: center;
  width: 32px;
  box-shadow: 0 4px 12px rgba(255, 90, 60, 0.32);
}

.brand-mark__svg {
  width: 20px;
  height: 20px;
  display: block;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 30px;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a {
  color: #4b5160;
  position: relative;
  transition: color 180ms var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 200ms var(--ease);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* ============ Buttons ============ */
.ghost-button,
.secondary-button,
.primary-button {
  align-items: center;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  font-size: 15px;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  transition:
    transform 160ms var(--ease),
    background-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    color 160ms var(--ease);
  letter-spacing: -0.01em;
}

.ghost-button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.ghost-button:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.primary-button {
  background: var(--coral);
  color: white;
  box-shadow: var(--shadow-coral);
}

.primary-button:hover {
  background: #ff6a4f;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 90, 60, 0.36);
}

.primary-button:active {
  background: var(--coral-press);
  transform: translateY(0);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.secondary-button:hover {
  background: #fff;
  transform: translateY(-2px);
}

.full-button {
  width: 100%;
}

/* ============ Hero ============ */
.hero-section {
  min-height: 90vh;
  overflow: hidden;
  padding: 140px clamp(20px, 6vw, 80px) 64px;
  position: relative;
}

.hero-media {
  background-image: url("assets/hero-korea.png");
  background-position: center;
  background-size: cover;
  inset: 0;
  position: absolute;
  transform: scale(1.04);
}

.hero-overlay {
  background:
    linear-gradient(95deg, rgba(8, 10, 14, 0.78), rgba(8, 10, 14, 0.4) 55%, rgba(8, 10, 14, 0.12)),
    linear-gradient(0deg, rgba(8, 10, 14, 0.5), rgba(8, 10, 14, 0.06) 45%, rgba(8, 10, 14, 0.2));
  inset: 0;
  position: absolute;
}

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

.eyebrow {
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #ffd27a;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-content .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
  display: inline-block;
}

.hero-content h1 {
  font-size: clamp(54px, 10vw, 116px);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: -0.045em;
  margin: 0;
}

.hero-copy {
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.55;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  margin: 24px 0 0;
  max-width: 680px;
}

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

.hero-actions .primary-button {
  padding: 0 28px;
  min-height: 52px;
  font-size: 16px;
}

.hero-actions .secondary-button {
  padding: 0 28px;
  min-height: 52px;
  font-size: 16px;
}

.hero-facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 44px 0 0;
  max-width: 920px;
}

.hero-facts div {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 200ms var(--ease);
}

.hero-facts div:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-facts dt {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-facts dd {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ============ Section shells ============ */
.section-shell {
  margin: 0 auto;
  max-width: 1200px;
  padding: 96px clamp(20px, 4vw, 44px);
}

.section-heading {
  margin-bottom: 40px;
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.038em;
  margin: 0;
}

.section-heading p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  margin: 18px 0 0;
}

.compact-heading h2 {
  font-size: clamp(30px, 4vw, 46px);
}

/* ============ Status band ============ */
.status-band {
  background: linear-gradient(135deg, #161a21, #1f242d);
  color: white;
}

.status-grid {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  padding-bottom: 40px;
  padding-top: 40px;
}

.status-grid h2 {
  font-size: clamp(22px, 2.6vw, 32px);
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.status-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 20px;
  transition: background-color 200ms var(--ease), transform 200ms var(--ease);
}

.status-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.status-label,
.status-card small {
  color: rgba(255, 255, 255, 0.62);
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.status-card strong {
  display: block;
  font-size: 30px;
  margin: 8px 0;
  letter-spacing: -0.025em;
}

.status-card strong::after {
  content: "";
}

/* ============ Programs ============ */
.program-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.program-card,
.review-card,
.test-panel,
.application-form,
.policy-card,
.question-card,
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.program-card {
  overflow: hidden;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.program-card img {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.program-body {
  padding: 30px;
}

.program-tag {
  display: inline-block;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
}

.accent-card .program-tag {
  color: var(--coral);
  background: var(--coral-soft);
}

.program-body h3,
.review-card h3 {
  font-size: 28px;
  margin: 14px 0 12px;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.program-body p,
.program-body li,
.review-card p,
.process-list p {
  color: var(--muted);
  line-height: 1.68;
}

.program-body ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.program-body li {
  position: relative;
  padding-left: 22px;
}

.program-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.accent-card .program-body li::before {
  background: var(--teal);
}

/* ============ Process ============ */
.process-section {
  background: var(--surface-soft);
}

.process-list {
  counter-reset: process;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.process-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.process-list li:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.process-list li::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--coral-soft);
  opacity: 0;
  transition: opacity 200ms var(--ease);
}

.process-list li:hover::after {
  opacity: 1;
}

.process-list span {
  color: var(--coral);
  font-size: 14px;
  font-weight: 800;
  position: relative;
}

.process-list strong {
  display: block;
  font-size: 22px;
  margin-top: 12px;
  letter-spacing: -0.02em;
}

/* ============ Split (test) + apply ============ */
.split-section,
.apply-grid {
  align-items: start;
  display: grid;
  gap: 40px;
  grid-template-columns: 0.9fr 1.1fr;
}

.test-panel,
.application-form {
  padding: 30px;
}

.test-entry-panel strong {
  display: block;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.test-entry-panel p {
  color: var(--muted);
  line-height: 1.66;
  margin: 0;
}

/* ============ Forms ============ */
.mbti-grid,
.form-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  color: #3b414c;
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: -0.01em;
}

input,
select,
textarea {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  min-height: 48px;
  padding: 13px 15px;
  width: 100%;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

input::placeholder,
textarea::placeholder {
  color: var(--subtle);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 90, 60, 0.12);
}

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

.test-panel,
.application-form {
  display: grid;
  gap: 18px;
}

.test-result {
  background: #fff8ef;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  color: #6b4d1f;
  display: block;
  font-weight: 700;
  line-height: 1.62;
  min-height: 76px;
  padding: 16px;
}

.apply-section {
  background: var(--surface-soft);
}

.checkbox-row {
  align-items: start;
  display: flex;
  gap: 10px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
}

.checkbox-row input {
  min-height: auto;
  width: auto;
  accent-color: var(--coral);
  margin-top: 2px;
}

.form-note {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  text-align: center;
}

/* ============ Reviews ============ */
.review-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-card {
  padding: 28px;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.review-card span {
  display: inline-block;
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
  background: var(--coral-soft);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}

/* ============ Policies ============ */
.policy-section {
  background: var(--surface-soft);
}

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

.policy-card {
  overflow: hidden;
  padding: 0;
  transition: box-shadow 200ms var(--ease);
}

.policy-card[open] {
  box-shadow: var(--shadow);
}

.policy-card summary {
  cursor: pointer;
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 26px;
  position: relative;
}

.policy-card summary::-webkit-details-marker {
  display: none;
}

.policy-card summary::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 36px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--subtle);
  border-bottom: 2px solid var(--subtle);
  transform: rotate(45deg);
  transition: transform 200ms var(--ease);
}

.policy-card[open] summary::after {
  transform: rotate(-135deg);
  top: 40px;
}

.policy-card summary span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.policy-card summary strong {
  font-size: 20px;
  line-height: 1.35;
  padding-right: 32px;
  letter-spacing: -0.02em;
}

.policy-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding: 0 26px 26px;
}

.policy-body p,
.policy-body li {
  color: var(--muted);
  line-height: 1.62;
}

.policy-body ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 16px;
}

/* ============ Footer ============ */
.site-footer {
  align-items: center;
  background: var(--charcoal);
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 36px clamp(20px, 4vw, 64px);
}

.site-footer strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.6);
  margin: 6px 0 0;
}

.site-footer a {
  color: #fff;
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 160ms var(--ease);
}

.site-footer a:hover {
  opacity: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* ============ Format-test legacy page ============ */
.test-page {
  background: var(--surface-soft);
}

.page-main {
  padding-top: 68px;
}

.test-hero {
  background:
    linear-gradient(95deg, rgba(10, 12, 16, 0.9), rgba(10, 12, 16, 0.62)),
    url("assets/hero-korea.png") center / cover;
  color: white;
}

.test-hero .section-shell {
  padding-bottom: 76px;
  padding-top: 88px;
}

.test-hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.test-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.58;
  max-width: 760px;
}

.test-layout {
  align-items: start;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.test-sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  display: grid;
  gap: 18px;
  padding: 26px;
  position: sticky;
  top: 92px;
}

.test-sidebar h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.test-sidebar p {
  color: var(--muted);
  line-height: 1.62;
  margin: 0;
}

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

.test-meta span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #4b5160;
  font-size: 13px;
  font-weight: 700;
  min-height: 42px;
  padding: 12px 8px;
  text-align: center;
}

.gender-toggle {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
}

.segment-option {
  cursor: pointer;
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.segment-option input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.segment-option span {
  align-items: center;
  border-radius: 8px;
  color: #62666b;
  display: flex;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.segment-option input:checked + span {
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
}

.question-area {
  min-width: 0;
}

.question-area-header {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.question-area-header h2 {
  font-size: clamp(26px, 3vw, 38px);
  margin: 0;
  letter-spacing: -0.03em;
}

.question-area-header a {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  min-height: 42px;
  padding: 11px 16px;
}

.question-list {
  display: grid;
  gap: 14px;
}

.question-card {
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.question-card fieldset {
  border: 0;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.question-card legend {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.question-kicker {
  color: var(--teal);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.answer-option {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #3b414c;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  gap: 10px;
  line-height: 1.45;
  min-height: 58px;
  padding: 14px;
  transition:
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    transform 160ms var(--ease),
    background-color 160ms var(--ease);
}

.answer-option:hover {
  border-color: rgba(12, 143, 126, 0.4);
  box-shadow: 0 8px 20px rgba(12, 143, 126, 0.08);
  transform: translateY(-1px);
}

.answer-option input {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.option-indicator {
  border: 2px solid #b9bfc9;
  border-radius: 50%;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.answer-option:has(input:checked) {
  background: var(--teal-soft);
  border-color: var(--teal);
  box-shadow: 0 10px 22px rgba(12, 143, 126, 0.14);
}

.answer-option:has(input:checked) .option-indicator {
  background: radial-gradient(circle, var(--teal) 0 42%, transparent 46%);
  border-color: var(--teal);
}

.answer-option:has(input:focus-visible),
.segment-option:has(input:focus-visible) span {
  outline: 3px solid rgba(255, 90, 60, 0.24);
  outline-offset: 2px;
}

.result-card {
  display: none;
  margin-top: 20px;
  padding: 28px;
}

.result-card.is-visible {
  display: grid;
  gap: 14px;
}

.result-card {
  border-color: rgba(12, 143, 126, 0.24);
  box-shadow: 0 16px 40px rgba(12, 143, 126, 0.12);
}

.result-card h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin: 0;
  letter-spacing: -0.035em;
}

.result-card p {
  color: var(--muted);
  line-height: 1.66;
  margin: 0;
}

.result-tagline {
  color: var(--ink) !important;
  font-size: 18px;
}

.score-bars {
  display: grid;
  gap: 12px;
}

.score-bar {
  display: grid;
  gap: 6px;
}

.score-bar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.score-fill {
  background: linear-gradient(90deg, var(--teal), #14b8a6);
  height: 100%;
  width: 0;
}

/* ============ Auth dialog ============ */
.auth-dialog {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
  animation: dialog-in 240ms var(--ease);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.auth-dialog::backdrop {
  background: rgba(10, 12, 16, 0.5);
  backdrop-filter: blur(4px);
}

.auth-panel {
  display: grid;
  gap: 16px;
  padding: 32px;
  position: relative;
}

.auth-panel h2 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -0.03em;
}

.auth-panel p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.58;
  margin: 0;
}

.close-button {
  background: transparent;
  border: 0;
  color: var(--subtle);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  position: absolute;
  right: 18px;
  top: 16px;
  transition: color 160ms var(--ease);
}

.close-button:hover {
  color: var(--ink);
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .site-header {
    gap: 12px;
    height: auto;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .nav-links {
    display: none;
  }

  .hero-section {
    min-height: 84vh;
    padding-top: 120px;
  }

  .hero-facts,
  .status-grid,
  .program-grid,
  .process-list,
  .split-section,
  .apply-grid,
  .review-grid,
  .policy-grid,
  .test-layout {
    grid-template-columns: 1fr;
  }

  .test-sidebar {
    position: static;
  }

  .question-area-header {
    align-items: start;
    flex-direction: column;
  }

  .status-grid {
    padding-bottom: 28px;
    padding-top: 28px;
  }
}

@media (max-width: 620px) {
  .brand {
    font-size: 16px;
  }

  .ghost-button,
  .primary-button,
  .secondary-button {
    min-height: 44px;
    padding: 0 16px;
  }

  .hero-section {
    min-height: 88vh;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions a {
    width: 100%;
  }

  .section-shell {
    padding-bottom: 72px;
    padding-top: 72px;
  }

  .mbti-grid,
  .form-row,
  .gender-toggle,
  .test-meta {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

/* ============ Format test flow ============ */
.test-page {
  background: #f7f8fa;
}

.test-page .site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(230, 232, 236, 0.86);
}

.flow-main {
  --flow-bg: #f7f8fa;
  --flow-surface: #ffffff;
  --flow-ink: #14181f;
  --flow-muted: #6b7280;
  --flow-soft: #f1f3f6;
  --flow-soft-strong: #e8edf3;
  --flow-line: #e6e8ec;
  --flow-line-strong: #d3d7de;
  --flow-radius: 16px;
  background: var(--flow-bg);
  min-height: 100vh;
  padding-top: 64px;
}

.flow-main button,
.flow-main a {
  -webkit-tap-highlight-color: transparent;
  line-height: 1.2;
}

.flow-main button {
  appearance: none;
  font: inherit;
}

.flow-hero {
  background: var(--flow-surface);
  border-bottom: 1px solid var(--flow-line);
}

.flow-hero-inner {
  margin: 0 auto;
  max-width: 820px;
  padding: 34px clamp(20px, 5vw, 44px) 24px;
}

.flow-badge,
.flow-step-kicker {
  color: var(--coral);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 10px;
}

.flow-step-kicker {
  color: var(--flow-muted);
}

.flow-hero h1 {
  color: var(--flow-ink);
  font-size: clamp(32px, 3.3vw, 44px);
  line-height: 1.1;
  margin: 0;
  max-width: 680px;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.flow-hero p:not(.flow-badge) {
  color: var(--flow-muted);
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.62;
  margin: 12px 0 0;
  max-width: 650px;
}

.flow-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.flow-facts span {
  background: var(--coral-soft);
  color: var(--coral);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
}

.flow-section {
  margin: 0 auto;
  max-width: 820px;
  padding: 20px clamp(18px, 4vw, 34px) 96px;
}

.flow-card {
  background: var(--flow-surface);
  border: 1px solid var(--flow-line);
  border-radius: var(--flow-radius);
  box-shadow: 0 16px 40px rgba(20, 24, 31, 0.06);
  overflow: hidden;
}

.flow-card-top {
  align-items: center;
  border-bottom: 1px solid #eef1f5;
  display: grid;
  grid-template-columns: 86px 1fr 86px;
  min-height: 64px;
  padding: 0 24px;
}

.flow-card-top::after {
  content: "";
}

.flow-card-top > span {
  color: #858c96;
  font-size: 14px;
  font-weight: 700;
  justify-self: center;
}

.flow-back-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--flow-radius);
  color: var(--flow-muted);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  justify-self: start;
  min-height: 40px;
  padding: 0 12px;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.flow-back-button:hover:not(:disabled) {
  background: var(--flow-soft);
  color: var(--flow-ink);
}

.flow-back-button:disabled {
  opacity: 0;
  pointer-events: none;
}

.flow-progress {
  background: #f0f2f5;
  height: 4px;
}

.flow-progress span {
  background: var(--coral);
  display: block;
  height: 100%;
  transition: width 220ms var(--ease);
  width: 0;
}

.flow-panel {
  min-height: 380px;
  padding: clamp(26px, 3.4vw, 38px);
}

.flow-copy h2,
.flow-result h2 {
  color: var(--flow-ink);
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.flow-copy p,
.flow-result p {
  color: var(--flow-muted);
  font-size: 17px;
  line-height: 1.62;
  margin: 12px 0 0;
}

.flow-choice-grid,
.flow-options {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

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

.flow-choice-card,
.flow-option {
  background: var(--flow-surface);
  border: 1px solid var(--flow-line);
  border-radius: var(--flow-radius);
  color: var(--flow-ink);
  cursor: pointer;
  position: relative;
  text-align: left;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    transform 160ms var(--ease);
  width: 100%;
}

.flow-choice-card {
  display: flex;
  flex-direction: column;
  min-height: 132px;
  padding: 22px 50px 22px 24px;
}

.flow-choice-card::after,
.flow-option::after {
  color: #a6adb8;
  border-right: 2px solid currentColor;
  border-top: 2px solid currentColor;
  content: "";
  height: 9px;
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 9px;
}

.flow-choice-card:hover,
.flow-option:hover {
  background: #fbfcfd;
  border-color: var(--flow-line-strong);
  box-shadow: 0 10px 24px rgba(20, 24, 31, 0.06);
  transform: translateY(-2px);
}

.flow-choice-card:active,
.flow-option:active {
  background: var(--flow-soft);
  box-shadow: none;
  transform: translateY(0);
}

.flow-choice-card span {
  color: var(--coral);
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.flow-choice-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.flow-choice-card small {
  color: var(--flow-muted);
  display: block;
  font-size: 15px;
  line-height: 1.5;
  margin-top: 8px;
  max-width: 560px;
}

.flow-option {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 38px 1fr;
  min-height: 76px;
  padding: 16px 54px 16px 18px;
}

.flow-option-index {
  align-items: center;
  background: var(--flow-soft);
  border-radius: 50%;
  color: #505762;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.flow-option span:last-child {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.flow-choice-card:focus-visible,
.flow-option:focus-visible,
.flow-back-button:focus-visible,
.flow-test-primary:focus-visible,
.secondary-flow-button:focus-visible {
  outline: 3px solid rgba(255, 90, 60, 0.22);
  outline-offset: 2px;
}

.flow-result {
  display: grid;
  gap: 18px;
}

.flow-result-tagline {
  color: var(--flow-ink) !important;
  font-size: 20px !important;
  font-weight: 800;
  margin-top: 0 !important;
}

.flow-score-list {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

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

.flow-score-row > div:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.flow-score-row strong {
  color: var(--flow-ink);
  font-size: 15px;
}

.flow-score-row span {
  color: #858c96;
  font-size: 14px;
  font-weight: 700;
}

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

.flow-score-track span {
  background: linear-gradient(90deg, var(--coral), #ff7a52);
  display: block;
  height: 100%;
}

.flow-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 160px;
  margin-top: 16px;
}

.flow-test-primary,
.secondary-flow-button {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  text-decoration: none;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.flow-test-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: var(--shadow-coral);
}

.flow-test-primary:hover {
  background: #ff6a4f;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 90, 60, 0.36);
}

.secondary-flow-button {
  background: var(--flow-soft);
  color: #3f454d;
}

.secondary-flow-button:hover {
  background: var(--flow-soft-strong);
  color: var(--flow-ink);
  transform: translateY(-2px);
}

.flow-test-primary:active,
.secondary-flow-button:active {
  transform: translateY(0);
}

@media (max-width: 760px) {
  .flow-hero-inner {
    padding-bottom: 40px;
    padding-top: 42px;
  }

  .flow-section {
    padding-top: 22px;
  }

  .flow-card-top {
    grid-template-columns: 72px 1fr 72px;
    padding: 0 14px;
  }

  .flow-panel {
    min-height: 500px;
    padding: 28px 18px;
  }

  .flow-choice-grid {
    grid-template-columns: 1fr;
  }

  .flow-choice-card {
    padding: 20px 48px 20px 18px;
  }

  .flow-option {
    grid-template-columns: 34px 1fr;
    min-height: 78px;
    padding: 16px 46px 16px 14px;
  }

  .flow-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .flow-hero-inner {
    padding-bottom: 14px;
    padding-top: 24px;
  }

  .flow-hero h1 {
    font-size: 30px;
  }

  .flow-hero p:not(.flow-badge) {
    font-size: 15px;
    line-height: 1.52;
  }

  .flow-facts {
    display: none;
  }

  .flow-card-top {
    min-height: 54px;
  }

  .flow-panel {
    min-height: 410px;
    padding: 22px 18px;
  }

  .flow-copy h2,
  .flow-result h2 {
    font-size: 26px;
  }

  .flow-copy p,
  .flow-result p {
    font-size: 15px;
  }

  .flow-choice-grid,
  .flow-options {
    margin-top: 18px;
  }

  .flow-choice-card {
    min-height: 118px;
    padding: 17px 46px 17px 18px;
  }

  .flow-choice-card span {
    margin-bottom: 6px;
  }

  .flow-choice-card strong {
    font-size: 18px;
  }

  .flow-choice-card small {
    font-size: 14px;
    margin-top: 6px;
  }

  .flow-card {
    border-left: 0;
    border-right: 0;
  }

  .flow-section {
    padding-left: 0;
    padding-right: 0;
  }
}
