:root {
  --bg: #f5f8fc;
  --bg-soft: #eaf1f8;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(31, 53, 84, 0.14);
  --text: #17243a;
  --muted: #5f6f86;
  --accent: #1f7ad1;
  --accent-2: #27a36f;
  --danger: #ff6b57;
  --ok: #27a36f;
  --radius: 18px;
  --shadow: 0 18px 46px rgba(36, 58, 92, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 12% 8%, #e9f5ff 0%, var(--bg) 42%, #eef4fb 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  margin-top: 0;
}

p {
  line-height: 1.6;
}

a {
  color: #1f6db5;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.orb-a {
  width: 380px;
  height: 380px;
  background: #a8d8ff;
  top: -120px;
  right: -80px;
}

.orb-b {
  width: 320px;
  height: 320px;
  background: #b6ecd4;
  left: -80px;
  bottom: -120px;
  animation-delay: -2s;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(31, 53, 84, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 53, 84, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, #000 40%, transparent 85%);
  z-index: 0;
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 18px 50px;
}

.app-shell.compact {
  max-width: 640px;
}

.app-shell.compact-wide {
  max-width: 1220px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
  color: #17243a;
  text-decoration: none;
  font-weight: 700;
}

.nav-actions {
  display: flex;
  gap: 10px;
}

.hero {
  margin-bottom: 22px;
  animation: rise 0.8s ease both;
}

.eyebrow {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-2);
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  line-height: 1.1;
}

.hero-text {
  margin: 0;
  color: var(--muted);
  max-width: 700px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn-large {
  padding: 13px 18px;
  font-size: 1rem;
}

.split-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: center;
}

.home-access-card,
.access-gate {
  border: 1px solid rgba(31, 122, 209, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  padding: 22px;
}

.home-access-card h2 {
  margin-bottom: 12px;
}

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

.path-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  padding: 18px;
}

.path-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #7d8bff);
  color: #fff;
  font-weight: 800;
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 12px;
}

.inline-notice {
  margin: 14px 0 0;
}

.brand-visual {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, rgba(77, 150, 255, 0.25), rgba(255, 255, 255, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.visual-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(31, 53, 84, 0.2);
}

.ring-1 {
  width: 180px;
  height: 180px;
}

.ring-2 {
  width: 130px;
  height: 130px;
}

.ring-3 {
  width: 82px;
  height: 82px;
}

.visual-label {
  position: relative;
  z-index: 2;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.offer-card,
.notice-card,
.panel,
.quiz-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 18px;
}

.notice-card {
  margin: 0 0 16px;
  border-color: rgba(31, 53, 84, 0.13);
  background: rgba(255, 255, 255, 0.72);
}

.notice-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.offer-tag {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.text-link {
  font-weight: 700;
}

.section-title {
  margin-bottom: 4px;
}

.section-subtitle {
  margin-top: 0;
  color: var(--muted);
}

.quiz-panel {
  animation: rise 1s ease both;
}

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

.identity-grid label,
.stack-form label,
.combo-card label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
}

.identity-grid input,
.stack-form input,
.stack-form textarea,
.stack-form select,
.combo-card input,
.combo-card textarea,
.inline-form input,
.inline-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.code-confirm {
  border: 1px solid rgba(39, 163, 111, 0.28);
  border-radius: 12px;
  padding: 11px;
  background: rgba(39, 163, 111, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-confirm span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.code-confirm strong {
  color: #176a4a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.identity-grid input:focus,
.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus,
.combo-card input:focus,
.combo-card textarea:focus,
.inline-form input:focus,
.inline-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 150, 255, 0.2);
}

.stack-form {
  display: grid;
  gap: 12px;
}

.stack-form.inline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.flash {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
}

.flash.success {
  background: rgba(74, 214, 160, 0.18);
  border: 1px solid rgba(74, 214, 160, 0.35);
}

.flash.error {
  background: rgba(255, 107, 87, 0.18);
  border: 1px solid rgba(255, 107, 87, 0.35);
}

.small-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--muted);
}

.progress-track {
  margin-top: 8px;
  height: 10px;
  border-radius: 100px;
  background: rgba(31, 53, 84, 0.08);
  overflow: hidden;
}

.progress-bar {
  width: 5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 240ms ease;
}

.question-deck {
  margin-top: 20px;
  min-height: 330px;
  position: relative;
}

.question-card {
  display: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  padding: 18px;
}

.question-card.is-active {
  display: block;
  animation: fadeSlide 0.35s ease;
}

.question-index {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-card h2 {
  margin: 9px 0 16px;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  line-height: 1.35;
}

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

.answers-grid.scale-10,
.answers-grid.scale-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.answers-grid.scale-7 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-intro {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(87, 204, 153, 0.32);
  border-radius: 12px;
  background: rgba(39, 163, 111, 0.08);
}

.module-intro h2 {
  margin: 10px 0 6px;
}

.module-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.cvf-statement {
  margin: 12px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.cvf-statement p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
}

.scale-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.pair-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
}

.pair-item p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
}

.pair-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(77, 150, 255, 0.26);
  color: #fff;
  font-weight: 800;
  font-family: "Space Grotesk", sans-serif;
}

.choice-pill {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  min-height: 56px;
}

.choice-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 122, 209, 0.38);
}

.choice-pill input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.choice-pill span {
  font-size: 0.84rem;
  line-height: 1.2;
}

.choice-pill strong {
  display: inline-block;
  min-width: 14px;
}

.choice-pill:has(input:checked) {
  border-color: var(--accent);
  background: rgba(77, 150, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(77, 150, 255, 0.3);
}

.validation-hint {
  margin: 14px 0 0;
  min-height: 22px;
  color: #b33b2f;
  font-weight: 600;
}

.quiz-actions {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease, opacity 170ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent), #7d8bff);
  color: #fff;
  box-shadow: 0 12px 24px rgba(77, 150, 255, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.hidden {
  display: none;
}

.site-footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
}

.stat-card h2 {
  margin: 6px 0 0;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #314965;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-form.vertical {
  flex-direction: column;
  align-items: stretch;
}

.small-input {
  max-width: 110px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.code-block {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  padding: 12px;
}

.checkbox-col {
  width: 40px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-preview {
  border-color: rgba(87, 204, 153, 0.45);
}

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

.combo-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.combo-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 1rem;
  margin: 0;
}

.chip {
  font-size: 0.75rem;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #375472;
}

.sticky-actions {
  position: sticky;
  bottom: 10px;
  margin-top: 12px;
  padding-top: 10px;
  backdrop-filter: blur(10px);
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@media (max-width: 1080px) {
  .offers-grid,
  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .combo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .answers-grid,
  .identity-grid,
  .offers-grid,
  .path-grid,
  .stack-form.inline-grid {
    grid-template-columns: 1fr;
  }

  .forced-pair {
    grid-template-columns: 1fr;
  }

  .answers-grid.scale-10,
  .answers-grid.scale-5,
  .answers-grid.scale-7 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-hero {
    grid-template-columns: 1fr;
  }

  .top-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-top: 20px;
  }

  .quiz-panel,
  .panel,
  .offer-card {
    padding: 14px;
  }

  .quiz-actions {
    justify-content: stretch;
    flex-direction: column-reverse;
  }

  .btn {
    width: 100%;
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .answers-grid.scale-10,
  .answers-grid.scale-5,
  .answers-grid.scale-7 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  .top-nav,
  .nav-actions,
  .inline-form,
  .btn {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .panel {
    border: 1px solid #ccc;
    box-shadow: none;
    background: #fff;
    color: #000;
  }
}
