:root {
  --ink: #171313;
  --muted: #716767;
  --paper: #f7f4f1;
  --panel: #fffdfb;
  --line: #e5ded9;
  --field: #f1ebe7;
  --green: #721923;
  --green-2: #230d0f;
  --lime: #d9a45f;
  --coral: #9b1f2b;
  --blue: #4c4242;
  --shadow: 0 24px 70px rgba(35, 13, 15, 0.15);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", Verdana, sans-serif;
  background:
    linear-gradient(135deg, rgba(155, 31, 43, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(217, 164, 95, 0.16), transparent 36%),
    var(--paper);
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.quiz-shell,
.dashboard-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.quiz-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.quiz-hero,
.quiz-card,
.result-card,
.panel,
.metric-card {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.quiz-hero {
  width: 100%;
  min-width: 0;
  min-height: 680px;
  padding: clamp(22px, 4vw, 54px);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.quiz-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -24% 18%;
  height: 260px;
  background: repeating-linear-gradient(90deg, rgba(24, 32, 28, 0.08) 0 1px, transparent 1px 18px);
  transform: rotate(-7deg);
  pointer-events: none;
}

.brand-row,
.eyebrow,
.trust-strip,
.dashboard-lede,
.lede,
.progress-wrap span {
  color: var(--muted);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--green-2), var(--coral), var(--lime), var(--green-2));
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 1px rgba(24, 32, 28, 0.18);
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 0 0 1px rgba(24, 32, 28, 0.12), 0 10px 24px rgba(24, 32, 28, 0.12);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  min-height: 560px;
}

.hero-grid > * {
  min-width: 0;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Sora", "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.4rem, 7vw, 5.9rem);
  line-height: 0.96;
}

h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.lede {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions,
.result-actions,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.primary-button,
.secondary-button,
.ghost-button,
.back-button {
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--green-2);
  box-shadow: 0 12px 28px rgba(24, 59, 43, 0.24);
}

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

.primary-button.small {
  min-height: 42px;
}

.secondary-button {
  color: var(--ink);
  background: transparent;
  border-color: rgba(24, 32, 28, 0.22);
}

.ghost-button {
  color: var(--green-2);
  background: var(--field);
  min-height: 38px;
  padding: 0 12px;
}

.text-link {
  color: var(--green-2);
  font-weight: 800;
  text-underline-offset: 4px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  font-size: 0.94rem;
  font-weight: 700;
}

.trust-strip span {
  border: 1px solid rgba(24, 32, 28, 0.13);
  background: rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  padding: 8px 12px;
}

.trust-strip.compact {
  margin-top: 20px;
}

.foot-panel {
  position: relative;
  min-height: 480px;
}

.sole-shape {
  width: min(330px, 76vw);
  height: 520px;
  margin-left: auto;
  border-radius: 46% 52% 50% 48% / 18% 18% 38% 38%;
  background:
    radial-gradient(circle at 46% 22%, rgba(217, 164, 95, 0.74), transparent 18%),
    radial-gradient(circle at 50% 72%, rgba(155, 31, 43, 0.7), transparent 18%),
    linear-gradient(160deg, #fbfaf8, #e6ded8 58%, #cab4ad);
  border: 1px solid rgba(24, 32, 28, 0.16);
  box-shadow: 22px 28px 70px rgba(24, 32, 28, 0.2), inset 0 0 0 12px rgba(255, 255, 255, 0.44);
  transform: rotate(8deg);
  position: relative;
}

.sole-line {
  position: absolute;
  width: 62%;
  height: 70%;
  left: 19%;
  top: 14%;
  border-left: 2px dashed rgba(114, 25, 35, 0.42);
  border-radius: 50%;
}

.pressure-dot {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 12px rgba(155, 31, 43, 0.13);
}

.dot-heel {
  left: 47%;
  bottom: 18%;
}

.dot-arch {
  left: 35%;
  top: 44%;
  background: var(--blue);
  box-shadow: 0 0 0 12px rgba(76, 66, 66, 0.13);
}

.dot-front {
  left: 52%;
  top: 18%;
  background: var(--lime);
  box-shadow: 0 0 0 12px rgba(217, 164, 95, 0.2);
}

.sole-card {
  position: absolute;
  z-index: 5;
  width: 150px;
  border-radius: var(--radius);
  padding: 14px;
  border: 1px solid transparent;
  background: var(--green-2);
  color: #fff;
  box-shadow: 0 18px 40px rgba(24, 32, 28, 0.22);
  text-align: left;
}

.sole-card span {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
}

.sole-card strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.25rem;
}

.sole-card.is-active,
.sole-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(24, 32, 28, 0.26);
}

.sole-card.is-active {
  border-color: rgba(217, 164, 95, 0.65);
}

.sole-card-main {
  left: 0;
  top: 34%;
}

.sole-card-alt {
  right: 8%;
  bottom: 8%;
  background: #fff;
  color: var(--ink);
}

.sole-card-alt span {
  color: var(--muted);
}

.sole-card-front {
  right: 1%;
  top: 17%;
  background: #fff;
  color: var(--ink);
}

.sole-card-front span {
  color: var(--muted);
}

.visual-callout {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 36%;
  bottom: -56px;
  border: 1px solid rgba(35, 13, 15, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 253, 251, 0.94);
  box-shadow: 0 20px 42px rgba(35, 13, 15, 0.16);
  padding: 14px 16px;
  pointer-events: none;
  overflow-wrap: anywhere;
}

.visual-callout strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.visual-callout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.quiz-card,
.result-card {
  width: min(760px, 100%);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 38px);
}

.quiz-flow {
  width: min(760px, 100%);
}

.quiz-topline {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}

.back-button {
  padding: 0;
  width: 48px;
  background: var(--field);
  color: var(--ink);
  border-color: rgba(24, 32, 28, 0.12);
}

.back-button:disabled {
  opacity: 0.42;
  cursor: default;
  transform: none;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--field);
  overflow: hidden;
}

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

.question-title {
  margin-bottom: 10px;
}

.question-help {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.45;
}

.option-grid {
  display: grid;
  gap: 10px;
}

.option-button {
  width: 100%;
  min-height: 62px;
  border: 1px solid rgba(24, 32, 28, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 14px 16px;
  text-align: left;
  font-weight: 800;
  transition: border 160ms ease, transform 160ms ease, background 160ms ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.option-button:hover,
.option-button.is-selected {
  border-color: var(--green);
  background: #fff;
  transform: translateX(3px);
}

.option-button::after {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  border: 2px solid rgba(23, 19, 19, 0.24);
}

.option-button.is-selected::after {
  border-color: var(--coral);
  background: radial-gradient(circle, var(--coral) 0 42%, transparent 45%);
}

.continue-row {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
}

.result-card p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.result-reasons {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.reason {
  border-left: 4px solid var(--green);
  background: var(--field);
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 800;
}

.dashboard-body {
  min-height: 100vh;
}

.dashboard-shell {
  padding: 34px 0 56px;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-header h1 {
  font-size: clamp(2rem, 5vw, 4.25rem);
}

.dashboard-lede {
  max-width: 650px;
  line-height: 1.55;
  margin-bottom: 0;
}

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

.metric-card {
  border-radius: var(--radius);
  padding: 18px;
}

.metric-label {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  display: block;
  margin-top: 10px;
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

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

.panel {
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}

.panel.wide {
  grid-column: 1 / -1;
}

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

.panel-heading h2 {
  font-size: 1.08rem;
}

.panel-heading span {
  color: var(--muted);
  font-weight: 800;
}

.bar-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-weight: 800;
}

.bar-meta span:first-child {
  overflow-wrap: anywhere;
}

.bar-meta span:last-child {
  color: var(--green-2);
  white-space: nowrap;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--field);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--lime));
}

.answer-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.answer-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

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

.answer-table th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.empty-state {
  color: var(--muted);
  padding: 14px 0;
}

@media (max-width: 860px) {
  .hero-grid,
  .dashboard-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .quiz-hero {
    min-height: auto;
    padding: 24px;
  }

  .hero-grid {
    min-height: auto;
    gap: 26px;
  }

  .foot-panel {
    width: min(560px, 100%);
    min-height: auto;
    margin: 0 auto;
    display: block;
    position: relative;
  }

  .sole-shape {
    width: min(310px, 68vw);
    height: 400px;
    margin: 0 auto;
  }

  .sole-card {
    position: absolute;
    width: 132px;
    min-height: 76px;
    padding: 12px;
    display: grid;
    align-content: center;
    transform: none;
  }

  .sole-card strong {
    font-size: 1rem;
    line-height: 1.1;
  }

  .sole-card.is-active,
  .sole-card:hover {
    transform: translateY(-1px);
  }

  .sole-card-main {
    left: 2%;
    top: 43%;
  }

  .sole-card-front {
    right: 0;
    top: 17%;
  }

  .sole-card-alt {
    right: 4%;
    top: 58%;
    bottom: auto;
  }

  .visual-callout {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 16px 0 0;
    width: 100%;
  }

  .dashboard-header {
    display: grid;
    align-items: start;
  }
}

@media (max-width: 560px) {
  .quiz-shell,
  .dashboard-shell {
    width: calc(100% - 20px);
    max-width: 370px;
  }

  .quiz-shell {
    padding: 10px 0 18px;
    justify-items: stretch;
    overflow: hidden;
  }

  .quiz-hero,
  .quiz-card,
  .result-card {
    border-radius: 8px;
  }

  .quiz-hero {
    padding: 18px;
    width: 100%;
  }

  .brand-row {
    font-size: 0.92rem;
  }

  .eyebrow {
    font-size: 0.7rem;
    margin-bottom: 10px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.82rem, 7.8vw, 2.25rem);
    line-height: 1.06;
    overflow-wrap: normal;
  }

  .lede {
    margin-top: 16px;
    max-width: 100%;
    font-size: 0.98rem;
    line-height: 1.48;
  }

  .hero-actions {
    margin-top: 20px;
    width: 100%;
    min-width: 0;
  }

  .primary-button {
    max-width: 100%;
  }

  .hero-actions,
  .result-actions,
  .header-actions {
    align-items: stretch;
  }

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

  .trust-strip span {
    flex: 1 1 100%;
    text-align: center;
    min-width: 0;
  }

  .foot-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .foot-panel > * {
    min-width: 0;
  }

  .sole-shape {
    width: min(245px, 70vw);
    height: 315px;
  }

  .sole-card {
    width: 112px;
    min-width: 0;
    min-height: 56px;
    padding: 9px 7px;
  }

  .sole-card span {
    font-size: 0.68rem;
  }

  .sole-card strong {
    font-size: clamp(0.72rem, 3.15vw, 0.86rem);
    overflow-wrap: anywhere;
  }

  .sole-card-main {
    left: 0;
    top: 42%;
  }

  .sole-card-front {
    right: 0;
    top: 15%;
  }

  .sole-card-alt {
    right: 6%;
    top: 56%;
  }

  .visual-callout {
    font-size: 0.94rem;
    padding: 12px;
    overflow: hidden;
  }

  .visual-callout strong {
    font-size: 0.98rem;
  }
}
