@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-light: #f3f4f6;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --amber: #d97706;
  --emerald: #059669;
  --bridge-border: #e8ebf0;
  --bridge-muted-bg: #fafbfc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.5;
  background: #f5f5f5;
  color: var(--text);
}

body {
  min-height: 100vh;
}

#root {
  min-height: 100vh;
}

.embed-mode,
.embed-mode body,
.embed-mode #root {
  min-height: 0;
  background: transparent;
}

.embed-mode .page,
.embed-mode .center-shell,
.embed-mode .quiz-shell,
.embed-mode .results-page {
  min-height: auto;
}

.embed-mode .center-shell,
.embed-mode .results-page {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embed-mode .quiz-shell {
  min-height: clamp(26rem, 56vh, 36rem);
  justify-content: center;
}

.embed-mode .progress-wrap,
.embed-mode .results-wrap {
  width: min(100%, 72rem);
  margin: 0 auto;
}

.embed-mode .quiz-card {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

.embed-mode .results-page {
  min-height: clamp(34rem, 72vh, 46rem);
  padding: 2rem 0;
}

.bridge-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.bridge-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.bridge-inner {
  width: min(74rem, calc(100% - 2rem));
  margin: 0 auto;
}

.bridge-header .bridge-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bridge-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.bridge-brand img {
  height: 2rem;
  width: auto;
  display: block;
}

.bridge-home-link {
  text-decoration: none;
  color: #4b5563;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.36rem 0.82rem;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.bridge-home-link:hover {
  color: #111827;
  border-color: #d1d5db;
  background: #f9fafb;
}

.bridge-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bridge-content .page {
  min-height: auto;
}

.bridge-content .center-shell {
  flex: 1;
  min-height: auto;
}

.bridge-content .quiz-shell {
  flex: 1;
  min-height: auto;
}

.bridge-content .results-page {
  min-height: auto;
  padding-bottom: 2.5rem;
}

.bridge-footer {
  border-top: 1px solid var(--bridge-border);
  background: #f5f5f5;
  padding: 1.45rem 0;
}

.bridge-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bridge-credit-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.bridge-credit {
  margin: 0;
  color: #737373;
  font-size: 0.92rem;
}

.bridge-time {
  margin: 0;
  color: #737373;
  font-size: 0.82rem;
}

.bridge-socials {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bridge-icon-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  color: #737373;
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bridge-icon-button:hover {
  background: #ebebeb;
  color: #23262a;
}

.bridge-icon-button:focus-visible {
  outline: 2px solid #23262a;
  outline-offset: 2px;
}

.bridge-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  background-color: currentColor;
}

.bridge-icon-mask {
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.bridge-icon-x {
  mask-image: url("/X_logo_2023_original.svg");
  -webkit-mask-image: url("/X_logo_2023_original.svg");
}

.bridge-icon-github {
  mask-image: url("/github-142-svgrepo-com.svg");
  -webkit-mask-image: url("/github-142-svgrepo-com.svg");
}

.bridge-icon-linkedin {
  mask-image: url("/linkedin-svgrepo-com.svg");
  -webkit-mask-image: url("/linkedin-svgrepo-com.svg");
}

.bridge-icon-image {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  opacity: 0.78;
}

.bridge-icon-button:hover .bridge-icon-image {
  opacity: 0.95;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bridge-soft .bridge-header {
  border-bottom: 1px solid var(--bridge-border);
  background: #ffffff;
}

.bridge-line .bridge-header {
  border-bottom: 1px solid #d7dde6;
  background: #ffffff;
}

.bridge-line .bridge-home-link {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.bridge-glass .bridge-header {
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
}

.bridge-glass .bridge-brand img {
  filter: grayscale(1) contrast(1.05);
}

.bridge-glass .bridge-footer {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.page {
  min-height: 100vh;
}

.center-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.home-card {
  max-width: 34rem;
  text-align: center;
}

.home-title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.home-subtitle {
  margin: 0 0 2.4rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.6vw, 1.15rem);
}

.primary-button,
.secondary-button {
  border-radius: 999px;
  padding: 0.82rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-button {
  border: 0;
  background: var(--blue);
  color: #fff;
}

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

.primary-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.secondary-button {
  border: 2px solid var(--line);
  background: #fff;
  color: #374151;
}

.secondary-button:hover {
  border-color: #d1d5db;
}

.quiz-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.quiz-shell.fade-in {
  animation: quiz-fade-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-shell.fade-out {
  animation: quiz-fade-out 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes quiz-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes quiz-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.progress-wrap {
  width: 100%;
}

.progress-track {
  height: 5px;
  background: #f3f4f6;
  width: 100%;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  transition: width 0.5s cubic-bezier(0, 0, 0.2, 1);
}

.progress-label {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.quiz-card {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.question {
  margin: 0 0 2.5rem;
  text-align: center;
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.4;
  font-weight: 500;
}

.answer-row {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  max-width: 32rem;
  margin-inline: auto;
}

.answer-button {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  background: #fff;
  color: #4b5563;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
}

.answer-button:hover {
  border-color: #60a5fa;
  color: var(--blue);
}

.answer-button.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: scale(1.1);
}

.answer-legend {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
  width: min(100%, 32rem);
  margin-inline: auto;
  padding: 0 0.5rem;
}

.results-page {
  min-height: 100vh;
  padding: 2rem 1.5rem;
}

.results-wrap {
  max-width: 42rem;
  margin: 0 auto;
}

.email-gate-card {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: #fff;
  padding: 2rem;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.06);
}

.email-gate-copy {
  margin: 0 0 1.5rem;
  color: #4b5563;
  line-height: 1.7;
}

.email-gate-form {
  display: grid;
  gap: 0.85rem;
}

.email-gate-input {
  width: 100%;
  min-height: 3.1rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0 1rem;
  font: inherit;
  color: #111827;
  background: #fff;
}

.email-gate-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.14);
  outline-offset: 2px;
  border-color: #93c5fd;
}

.email-gate-button {
  min-height: 3.1rem;
}

.email-gate-error {
  margin: 0.9rem 0 0;
  color: #dc2626;
  font-size: 0.95rem;
}

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.results-title {
  margin: 0;
  font-size: clamp(1.4rem, 4.2vw, 2rem);
  letter-spacing: -0.01em;
}

.chart-host {
  margin: 0 0 2rem;
  padding-left: 2.6rem;
  padding-right: 0.6rem;
}

.chart {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: #fff;
  overflow: visible;
}

.grid-line {
  position: absolute;
  background: var(--line);
}

.grid-line.v {
  width: 1px;
  top: 0;
  bottom: 0;
}

.grid-line.h {
  height: 1px;
  left: 0;
  right: 0;
}

.grid-line.main {
  background: #d1d5db;
}

.grid-line.light {
  background: var(--line-light);
}

.label-corner {
  position: absolute;
  font-size: 0.67rem;
  color: #9ca3af;
  font-weight: 600;
}

.label-corner.top-left {
  top: 0.45rem;
  left: 0.5rem;
}

.label-corner.top-right {
  top: 0.45rem;
  right: 0.5rem;
}

.label-corner.bottom-left {
  bottom: 0.45rem;
  left: 0.5rem;
}

.label-corner.bottom-right {
  bottom: 0.45rem;
  right: 0.5rem;
}

.axis-x {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5rem;
  font-size: 0.67rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.axis-x span:nth-child(2) {
  font-weight: 600;
}

.axis-y {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2.2rem;
  width: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.67rem;
}

.axis-y .mid {
  font-weight: 600;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.dot {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  transition: all 0.7s cubic-bezier(0, 0, 0.2, 1);
}

.dot.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.scores-row {
  display: flex;
  justify-content: center;
  gap: 3.2rem;
  margin: 2.8rem 0 2.3rem;
}

.score-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.score-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  color: #111827;
  text-align: center;
}

.score-value span {
  font-size: 1.1rem;
  color: #9ca3af;
}

.copy-blocks {
  display: grid;
  gap: 1.2rem;
  margin-bottom: 2.2rem;
}

.copy-heading {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.copy-heading.blue {
  color: var(--blue);
}

.copy-heading.amber {
  color: var(--amber);
}

.copy-heading.green {
  color: var(--emerald);
}

.copy-text {
  margin: 0;
  line-height: 1.65;
  color: #374151;
}

.button-stack {
  display: grid;
  gap: 0.75rem;
}

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

.home-start-button {
  width: auto;
  min-width: 8.5rem;
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}

.button-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.nf-wrap {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  background: #f8fafc;
}

.nf-card {
  width: 100%;
  max-width: 30rem;
  text-align: center;
}

.nf-code {
  margin: 0;
  font-size: 5rem;
  color: #cbd5e1;
  line-height: 1;
  font-weight: 300;
}

.nf-bar {
  width: 4rem;
  height: 2px;
  margin: 0.7rem auto 1.4rem;
  background: #e2e8f0;
}

.nf-title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  color: #1e293b;
}

.nf-text {
  margin: 0 0 1.6rem;
  color: #475569;
  line-height: 1.6;
}

.nf-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f1f5f9;
  padding: 0.08rem 0.35rem;
  border-radius: 0.35rem;
  color: #334155;
}

@media (max-width: 640px) {
  .bridge-inner {
    width: calc(100% - 1.25rem);
  }

  .bridge-header .bridge-inner {
    min-height: 3.75rem;
  }

  .bridge-brand img {
    height: 1.7rem;
  }

  .bridge-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .quiz-card {
    padding: 1rem;
  }

  .email-gate-card {
    padding: 1.35rem;
  }

  .scores-row {
    gap: 2rem;
  }

  .score-value {
    font-size: 1.7rem;
  }

  .answer-legend {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }
}

@media (min-width: 768px) {
  .email-gate-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .email-gate-button {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .answer-button {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
  }

  .answer-legend {
    font-size: 0.875rem;
  }

  .dot {
    width: 1.25rem;
    height: 1.25rem;
  }
}
