:root {
  --navy-950: #06162f;
  --navy-900: #0a2147;
  --navy-800: #123461;
  --navy-700: #244c80;
  --blue-100: #eaf2ff;
  --blue-50: #f5f8fd;
  --red-600: #ed2636;
  --red-500: #ff3443;
  --green-500: #18b86a;
  --gold-500: #f6b51f;
  --ink-900: #0b2348;
  --ink-700: #3d4d66;
  --ink-500: #6b7485;
  --line: #dce5f2;
  --white: #ffffff;
  --surface: #f7f9fc;
  --shadow-sm: 0 8px 24px rgba(18, 43, 78, 0.08);
  --shadow-md: 0 18px 50px rgba(18, 43, 78, 0.13);
  --shadow-lg: 0 28px 80px rgba(5, 25, 56, 0.22);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --font: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(50, 93, 151, 0.12), transparent 30rem),
    var(--blue-50);
  color: var(--ink-900);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-screen="welcome"] {
  background: #eef3fa;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:not(:disabled),
a[href],
summary {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

img,
svg {
  display: block;
}

svg {
  width: 1em;
  height: 1em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(50, 118, 221, 0.42);
  outline-offset: 3px;
}

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

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: screen-in 220ms ease both;
}

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

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

/* Abertura */
.screen-welcome {
  position: relative;
  isolation: isolate;
  width: min(100% - 28px, 680px);
  min-height: calc(100svh - 28px);
  margin: 14px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 36px;
  background:
    radial-gradient(circle at 24% 8%, rgba(60, 103, 166, 0.26), transparent 28%),
    radial-gradient(circle at 95% 70%, rgba(92, 69, 119, 0.2), transparent 34%),
    linear-gradient(155deg, #102a57 0%, #091d3d 55%, #06162f 100%);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.screen-welcome::before,
.screen-welcome::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.screen-welcome::before {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -130px;
  background: rgba(122, 49, 82, 0.42);
}

.screen-welcome::after {
  width: 270px;
  height: 270px;
  right: -90px;
  bottom: 90px;
  border: 28px solid rgba(255, 255, 255, 0.035);
  box-shadow: -44px -50px 0 rgba(255, 255, 255, 0.025);
}

.welcome-watermark {
  position: absolute;
  z-index: -1;
  right: -58px;
  bottom: -20px;
  width: 270px;
  opacity: 0.055;
  pointer-events: none;
}

.welcome-content {
  display: flex;
  min-height: calc(100svh - 30px);
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 4vh, 42px);
  padding: clamp(34px, 5.5vh, 64px) clamp(28px, 7vw, 72px);
  text-align: center;
}

.welcome-brand {
  display: grid;
  justify-items: center;
  gap: 13px;
}

.welcome-logo {
  width: clamp(108px, 24vw, 146px);
  height: auto;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.16));
}

.welcome-brand p {
  margin: 0;
  color: rgba(235, 241, 251, 0.76);
  font-size: clamp(0.76rem, 2.1vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.015em;
}

.welcome-copy {
  display: grid;
  gap: 18px;
}

.welcome-copy h1 {
  max-width: 560px;
  margin: 0 auto;
  color: var(--white);
  font-size: clamp(2.6rem, 9.8vw, 4.65rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.welcome-copy p {
  max-width: 480px;
  margin: 0 auto;
  color: rgba(227, 235, 247, 0.78);
  font-size: clamp(0.92rem, 2.6vw, 1.08rem);
  font-weight: 500;
  line-height: 1.62;
}

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

.metric-card {
  display: grid;
  min-width: 0;
  place-items: center;
  gap: 7px;
  padding: 18px 8px;
  border: 1px solid rgba(190, 211, 242, 0.26);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(216, 230, 251, 0.55);
  border-radius: 50%;
  color: #dce9fb;
}

.metric-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.metric-card strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--white);
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card small {
  color: rgba(224, 233, 247, 0.68);
  font-size: clamp(0.68rem, 2.3vw, 0.79rem);
  font-weight: 600;
  line-height: 1.2;
}

.welcome-actions {
  display: grid;
  gap: 15px;
}

.primary-btn {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  box-shadow: 0 14px 30px rgba(237, 38, 54, 0.25);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-btn:hover:not(:disabled) {
  box-shadow: 0 17px 36px rgba(237, 38, 54, 0.32);
  filter: brightness(1.035);
  transform: translateY(-1px);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(0);
}

.welcome-btn {
  width: 100%;
  min-height: 64px;
  justify-content: space-between;
  padding-inline: 28px;
  border-radius: 20px;
  font-size: clamp(1.05rem, 3.5vw, 1.28rem);
}

.welcome-btn span {
  flex: 1;
  text-align: center;
}

.welcome-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.free-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0;
  color: rgba(225, 233, 246, 0.7);
  font-size: 0.88rem;
  font-weight: 600;
}

.free-note svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--gold-500);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Telas internas */
.screen-page {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.compact-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  min-height: 72px;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: max(11px, env(safe-area-inset-top)) 20px 11px;
  border-bottom: 1px solid rgba(12, 40, 78, 0.08);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px);
}

.mini-action,
.trust-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: #edf3fb;
  color: var(--navy-800);
  font-size: 1.55rem;
  font-weight: 600;
}

.mini-action {
  transition: background 150ms ease, transform 150ms ease;
}

.mini-action:hover {
  background: #e2ebf8;
  transform: translateY(-1px);
}

.trust-mark {
  justify-self: end;
  font-size: 1.05rem;
}

.brand-mini {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.brand-mini img {
  width: 37px;
  height: 37px;
  object-fit: contain;
}

.brand-mini div {
  display: grid;
  min-width: 0;
  text-align: left;
}

.brand-mini strong {
  color: #22242a;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-mini span {
  overflow: hidden;
  color: #545a64;
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-inner {
  position: relative;
  z-index: 1;
  padding: clamp(26px, 5vw, 44px) clamp(20px, 5.8vw, 44px) 76px;
}

.watermark-page::after {
  position: fixed;
  z-index: -1;
  right: max(calc((100vw - 760px) / 2 + 22px), 22px);
  bottom: 22px;
  width: 150px;
  height: 120px;
  background: url("assets/logo-u-color.png") center / contain no-repeat;
  content: "";
  opacity: 0.018;
  pointer-events: none;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-pill,
.result-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid #d4e1f2;
  border-radius: 999px;
  background: #eaf2fc;
  color: var(--navy-800);
  font-size: 0.72rem;
  font-weight: 800;
}

.progress-label {
  color: var(--red-600);
  font-size: 0.8rem;
  font-weight: 800;
}

.progress-track {
  height: 6px;
  margin: 14px 0 26px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ebf5;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy-700), var(--red-500));
  transition: width 280ms ease;
}

.page-inner h2,
.page-inner h3,
.page-inner p {
  overflow-wrap: anywhere;
}

.page-inner > h2 {
  max-width: 650px;
  margin: 0;
  color: var(--ink-900);
  font-size: clamp(1.45rem, 5.6vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.muted {
  margin: 10px 0 0;
  color: var(--ink-500);
  font-size: 0.94rem;
  line-height: 1.65;
}

.answers-grid {
  display: grid;
  gap: 11px;
  margin-top: 24px;
}

.answer-card {
  display: grid;
  width: 100%;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  padding: 15px 14px;
  border: 1px solid #e4eaf3;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 7px 21px rgba(20, 49, 86, 0.06);
  color: var(--ink-900);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.answer-card:hover:not(:disabled) {
  border-color: #b8cde8;
  box-shadow: 0 11px 28px rgba(20, 49, 86, 0.1);
  transform: translateY(-2px);
}

.answer-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: #eef4fd;
  color: #3064a6;
}

.answer-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.answer-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.answer-copy strong {
  color: var(--ink-900);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.answer-copy > span {
  color: var(--ink-500);
  font-size: 0.75rem;
  line-height: 1.45;
}

.answer-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf4fd;
  color: #2e5d98;
  font-size: 1.25rem;
}

/* Captura do lead */
.lead-page {
  max-width: 650px;
  margin-inline: auto;
}

.lead-page > h2 {
  margin-top: 18px;
}

.lead-form {
  display: grid;
  gap: 17px;
  margin-top: 28px;
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid #e1e8f2;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.lead-form > label:not(.consent-field) {
  display: grid;
  gap: 8px;
  color: var(--ink-900);
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-form input[type="text"],
.lead-form input[type="tel"] {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid #d8e1ed;
  border-radius: 14px;
  background: #fbfcfe;
  color: var(--ink-900);
  font-size: 0.92rem;
  outline: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.lead-form input[type="text"]:focus,
.lead-form input[type="tel"]:focus {
  border-color: #7fa6d8;
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(62, 116, 186, 0.11);
}

.lead-form input::placeholder {
  color: #9aa4b3;
}

.consent-field {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--ink-500);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.5;
}

.consent-field input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--navy-700);
}

.form-message {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: #fff0f2;
  color: #b8182a;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.45;
}

.lead-form .primary-btn {
  width: 100%;
  margin-top: 2px;
}

/* Resultado */
.result-page {
  display: grid;
  gap: 20px;
}

.result-hero {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 18px;
  padding: clamp(22px, 5vw, 30px);
  border-radius: 25px;
  background:
    radial-gradient(circle at 95% 0%, rgba(124, 52, 80, 0.48), transparent 42%),
    linear-gradient(145deg, #102d5f, #173c72);
  box-shadow: 0 16px 35px rgba(13, 45, 88, 0.18);
  color: var(--white);
}

.result-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-700);
}

.result-icon svg {
  width: 31px;
  height: 31px;
  fill: currentColor;
}

.eyebrow {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.result-hero h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.5rem, 6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.result-hero p:last-child {
  margin: 12px 0 0;
  color: rgba(244, 248, 255, 0.82);
  font-size: 0.87rem;
  line-height: 1.6;
}

.trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trait-chip,
.bridge-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.trait-chip {
  padding: 8px 12px;
  background: #eaf2fc;
  color: #234f85;
}

.result-section {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.result-section > h3,
.cta-box h3 {
  margin: 0;
  color: var(--ink-900);
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

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

.course-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 19px;
  border: 1px solid #e0e7f0;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.course-rank {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--red-500), var(--red-600));
  box-shadow: 0 9px 20px rgba(237, 38, 54, 0.2);
  color: var(--white);
  font-size: 1rem;
  font-weight: 800;
}

.course-content {
  min-width: 0;
}

.course-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.course-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.course-heading strong {
  color: var(--ink-900);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.28;
}

.course-heading small {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--red-600);
  font-size: 0.7rem;
  font-weight: 700;
}

.bridge-badge {
  padding: 3px 7px;
  background: #fff0f2;
  color: #bb2130;
}

.match-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf3fb;
  color: var(--navy-800);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.course-short {
  margin: 12px 0 0;
  color: var(--ink-700);
  font-size: 0.82rem;
  line-height: 1.55;
}

.market-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 15px;
}

.market-tile {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.market-tile:first-child {
  padding-left: 0;
  border-left: 0;
}

.market-tile span {
  color: var(--ink-500);
  font-size: 0.65rem;
  font-weight: 700;
}

.market-tile b {
  color: var(--ink-900);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.market-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--ink-900);
  font-size: 0.76rem;
  font-weight: 700;
}

.market-status svg {
  width: 19px;
  height: 19px;
  fill: var(--green-500);
}

.areas-box {
  margin-top: 14px;
}

.areas-box b {
  color: var(--ink-500);
  font-size: 0.66rem;
  font-weight: 700;
}

.areas-box p {
  margin: 4px 0 0;
  color: var(--ink-700);
  font-size: 0.76rem;
  line-height: 1.5;
}

.course-details {
  margin-top: 15px;
}

.course-details summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #eaf2fc;
  color: var(--navy-800);
  font-size: 0.73rem;
  font-weight: 800;
  list-style: none;
  user-select: none;
}

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

.details-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  font-size: 1rem;
  transition: transform 150ms ease;
}

.course-details[open] .details-icon {
  transform: rotate(45deg);
}

.course-detail-grid {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.course-detail-grid > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 13px;
  background: #f5f8fc;
}

.course-detail-grid b {
  color: var(--ink-900);
  font-size: 0.7rem;
  font-weight: 800;
}

.course-detail-grid span {
  color: var(--ink-700);
  font-size: 0.74rem;
  line-height: 1.5;
}

.consultor-tip {
  margin: 10px 0 0;
  padding: 11px 12px;
  border-left: 3px solid var(--red-500);
  border-radius: 0 10px 10px 0;
  background: #fff6f7;
  color: var(--ink-700);
  font-size: 0.73rem;
  line-height: 1.5;
}

.market-source {
  display: block;
  margin-top: 9px;
  color: #8993a2;
  font-size: 0.59rem;
  line-height: 1.45;
}

.market-note-box,
.cta-box {
  padding: 19px;
  border-radius: 20px;
}

.market-note-box {
  border: 1px solid #dce6f2;
  background: #edf4fc;
}

.market-note-box strong {
  color: var(--ink-900);
  font-size: 0.82rem;
  font-weight: 800;
}

.market-note-box p,
.cta-box p {
  margin: 6px 0 0;
  color: var(--ink-700);
  font-size: 0.76rem;
  line-height: 1.55;
}

.cta-box {
  display: grid;
  gap: 13px;
  border: 1px solid #dfe7f1;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.link-btn {
  width: 100%;
  margin-top: 3px;
}

.ghost-btn {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid #d7e1ee;
  border-radius: 14px;
  background: #f6f8fb;
  color: var(--navy-800);
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease;
}

.ghost-btn:hover {
  border-color: #bdcee2;
  background: #edf3fa;
}


.result-restart {
  width: 100%;
}

/* WhatsApp */
.floating-whatsapp {
  position: fixed;
  z-index: 30;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: #22c76f;
  box-shadow: 0 12px 28px rgba(20, 153, 83, 0.3);
  color: var(--white);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.floating-whatsapp:hover {
  box-shadow: 0 15px 34px rgba(20, 153, 83, 0.38);
  transform: translateY(-2px);
}

.floating-whatsapp svg {
  width: 31px;
  height: 31px;
  fill: currentColor;
}

body[data-screen="welcome"] .floating-whatsapp {
  display: none !important;
}

/* Responsividade */
@media (min-width: 761px) {
  .screen-page {
    margin-block: 24px;
    min-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 28px;
  }

  .compact-header {
    border-radius: 28px 28px 0 0;
  }

  .course-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .screen-welcome {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .welcome-content {
    min-height: 100svh;
    padding: max(28px, env(safe-area-inset-top)) 20px max(26px, env(safe-area-inset-bottom));
  }

  .welcome-logo {
    width: 112px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.45rem, 12.4vw, 3.45rem);
  }

  .metric-card {
    min-height: 108px;
    padding: 15px 5px;
    border-radius: 17px;
  }

  .metric-icon {
    width: 34px;
    height: 34px;
  }

  .metric-card strong {
    font-size: clamp(0.96rem, 4.7vw, 1.2rem);
  }

  .metric-card small {
    font-size: clamp(0.59rem, 2.7vw, 0.71rem);
  }

  .compact-header {
    min-height: 66px;
    padding-inline: 14px;
  }

  .page-inner {
    padding-inline: 17px;
  }

  .course-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    padding: 16px 14px;
    border-radius: 21px;
  }

  .course-rank {
    width: 39px;
    height: 39px;
  }

  .course-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .match-badge {
    width: fit-content;
  }

  .market-tile {
    padding-inline: 8px;
  }
}

@media (max-width: 370px) {
  .welcome-content {
    gap: 20px;
    padding-inline: 16px;
  }

  .welcome-logo {
    width: 96px;
  }

  .welcome-brand p {
    font-size: 0.7rem;
  }

  .welcome-copy {
    gap: 13px;
  }

  .welcome-copy h1 {
    font-size: 2.35rem;
  }

  .welcome-copy p {
    font-size: 0.84rem;
  }

  .welcome-metrics {
    gap: 7px;
  }

  .metric-card {
    min-height: 98px;
  }

  .welcome-btn {
    min-height: 58px;
    padding-inline: 20px;
  }

  .brand-mini div {
    display: none;
  }

  .answer-card {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    gap: 10px;
    padding: 13px 11px;
  }

  .answer-icon {
    width: 42px;
    height: 42px;
  }

  .market-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .market-tile,
  .market-tile:first-child {
    padding: 0;
    border: 0;
  }
}

@media (max-height: 740px) and (max-width: 560px) {
  .welcome-content {
    justify-content: flex-start;
    gap: 18px;
    padding-top: max(22px, env(safe-area-inset-top));
  }

  .welcome-logo {
    width: 88px;
  }

  .welcome-brand {
    gap: 8px;
  }

  .welcome-copy h1 {
    font-size: clamp(2.15rem, 10.5vw, 2.8rem);
  }

  .welcome-copy p {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .metric-card {
    min-height: 88px;
    padding-block: 11px;
  }

  .metric-icon {
    width: 30px;
    height: 30px;
  }

  .welcome-btn {
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
