:root {
  --ink: #293d4d;
  --muted: #687b88;
  --line: #d8dde2;
  --paper: #ffffff;
  --page: #f2f2f2;
  --blue: #04a8d8;
  --gold: #d49a20;
  --warning: #ff5a1f;
  --deck: #17191b;
  color-scheme: light;
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
}

button {
  font: inherit;
}

.mobile-walkthrough {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0) 130px),
    var(--page);
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5e5e5;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.mobile-header img {
  width: 126px;
  height: auto;
  display: block;
}

.mobile-header div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mobile-header span {
  color: #777777;
  font: 700 11px/1.1 Lato, Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mobile-header strong {
  color: #202b34;
  font: 700 13px/1.15 Lato, Helvetica, Arial, sans-serif;
}

.mobile-content {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 12px 12px calc(126px + env(safe-area-inset-bottom));
}

.step-card {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.step-copy,
.form-slice,
.note-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(18, 34, 49, 0.08);
}

.step-copy {
  padding: 16px 16px 15px;
}

.step-copy span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--gold);
  font: 800 11px/1 Lato, Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-copy h1 {
  margin: 0;
  color: #565656;
  font: 800 clamp(23px, 7vw, 31px)/1.05 Lato, Helvetica, Arial, sans-serif;
}

.step-copy p {
  margin: 9px 0 0;
  color: var(--muted);
  font: 600 14px/1.45 "Open Sans", Helvetica, Arial, sans-serif;
}

.form-slice {
  overflow: hidden;
}

.form-slice-bar {
  min-height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5e5e5;
  background: #f7f7f7;
  color: #7a8790;
  font: 700 11px/1.2 Lato, Helvetica, Arial, sans-serif;
  text-transform: uppercase;
}

.form-preview {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(90deg, #f3f3f3 0, #f3f3f3 12px, transparent 12px, transparent calc(100% - 12px), #f3f3f3 calc(100% - 12px)),
    #ffffff;
}

.form-section {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.form-section h2 {
  margin: 0;
  color: #444444;
  font: 800 18px/1.2 Lato, Helvetica, Arial, sans-serif;
}

.form-section p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #415765;
  font: 600 13px/1.45 "Open Sans", Helvetica, Arial, sans-serif;
}

.form-section ul {
  margin: 0;
  padding-left: 18px;
  color: #415765;
  font: 700 13px/1.55 "Open Sans", Helvetica, Arial, sans-serif;
}

.form-section li + li {
  margin-top: 4px;
}

.form-section.focus-card {
  padding: 11px 12px;
  background: #ffffff;
}

.field,
.choice,
.checkbox-line,
.summary-row,
.notice-block,
.button-row,
.example-card,
.breakdown {
  min-width: 0;
  border: 1px solid #e1e1e1;
  background: #ffffff;
}

.field {
  padding: 8px 10px 9px;
}

.field label,
.choice > span,
.checkbox-line span,
.summary-row span {
  display: block;
  margin-bottom: 5px;
  color: #202b34;
  font: 800 12px/1.2 Lato, Helvetica, Arial, sans-serif;
}

.required::after {
  content: "*";
  color: var(--warning);
}

.field div {
  min-height: 30px;
  padding: 7px 8px;
  overflow-wrap: anywhere;
  border: 1px solid #d6d6d6;
  background: #fbfbfb;
  color: #66727b;
  font: 600 13px/1.2 "Open Sans", Helvetica, Arial, sans-serif;
}

.field .money::before {
  content: "$ ";
  color: #31485a;
  font-weight: 800;
}

.field .muted-value {
  color: #9a9a9a;
}

.field .fine {
  margin: 6px 0 0;
  color: #687b88;
  font: 700 11px/1.35 "Open Sans", Helvetica, Arial, sans-serif;
}

.choice {
  padding: 9px 10px;
  display: grid;
  gap: 8px;
}

.choice label,
.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #263b4b;
  font: 700 13px/1.35 "Open Sans", Helvetica, Arial, sans-serif;
}

.radio-dot,
.check-box {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1px solid #b7c0c7;
  background: #ffffff;
}

.radio-dot {
  border-radius: 50%;
}

.radio-dot.selected {
  border: 4px solid #304c5f;
}

.check-box.checked {
  border-color: #304c5f;
  background: #304c5f;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.checkbox-line {
  padding: 10px;
}

.summary-row {
  padding: 10px;
}

.summary-row strong {
  display: block;
  overflow-wrap: anywhere;
  color: #263b4b;
  font: 800 15px/1.2 Lato, Helvetica, Arial, sans-serif;
}

.breakdown {
  display: grid;
  overflow: hidden;
}

.breakdown .summary-row {
  border: 0;
}

.breakdown .summary-row + .summary-row {
  border-top: 1px solid #e6e6e6;
}

.notice-block {
  padding: 11px 12px;
  overflow-wrap: anywhere;
  background: #f5f7f8;
  color: #405665;
  font: 700 13px/1.45 "Open Sans", Helvetica, Arial, sans-serif;
}

.notice-block.warning {
  border-color: #ffb38f;
  background: #fff7f2;
  color: #c84212;
}

.button-row {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-color: transparent;
}

.button-row > span:not(.form-button) {
  min-width: 0;
  color: #687b88;
  font-size: 11px;
  text-align: center;
}

.form-button {
  min-width: 84px;
  min-height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #04a8d8;
  background: #08afdd;
  color: #ffffff;
  font: 800 12px/1 Lato, Helvetica, Arial, sans-serif;
  text-transform: uppercase;
}

.save-link {
  width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dedede;
  color: #53788c;
  font: 800 11px/1 Lato, Helvetica, Arial, sans-serif;
  text-decoration: underline;
}

.example-card {
  position: relative;
  padding: 12px;
  overflow: hidden;
  border: 7px solid #f26622;
}

.example-card::before {
  content: "EXAMPLE";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(242, 102, 34, 0.13);
  font: 900 36px/1 Lato, Helvetica, Arial, sans-serif;
  transform: rotate(-14deg);
}

.example-card > * {
  position: relative;
}

.focus-card {
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 154, 32, 0.12), 0 12px 28px rgba(18, 34, 49, 0.12);
}

.note-card {
  padding: 14px 15px;
  border-color: #e7bf68;
  background: #fffaf0;
}

.note-card span {
  display: inline-block;
  margin-bottom: 7px;
  color: #aa7112;
  font: 800 10px/1 Lato, Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.note-card strong {
  display: block;
  color: #382912;
  font: 800 15px/1.28 Lato, Helvetica, Arial, sans-serif;
}

.note-card p {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: #6b5330;
  font: 700 12px/1.45 "Open Sans", Helvetica, Arial, sans-serif;
}

.mobile-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  min-height: 96px;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 48px 58px 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: var(--deck);
  color: #ffffff;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.22);
}

.round-button,
.play-button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
}

.round-button {
  width: 44px;
  height: 44px;
  background: #272a2d;
  font: 700 29px/1 Lato, Helvetica, Arial, sans-serif;
}

.play-button {
  width: 58px;
  height: 58px;
  background: var(--blue);
  font: 700 22px/1 Lato, Helvetica, Arial, sans-serif;
}

.round-button:disabled {
  opacity: 0.4;
}

.round-button:focus,
.play-button:focus,
.step-dots button:focus {
  outline: 3px solid rgba(4, 168, 216, 0.35);
  outline-offset: 2px;
}

.progress-wrap {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.progress-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #595b5d;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  transition: width 260ms ease;
}

.step-dots {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.step-dots::-webkit-scrollbar {
  display: none;
}

.step-dots button {
  flex: 0 0 16px;
  width: 16px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #5e6062;
  cursor: pointer;
}

.step-dots button.active {
  background: var(--gold);
}

@media (max-width: 360px) {
  .mobile-content {
    padding-right: 9px;
    padding-left: 9px;
  }

  .mobile-header img {
    width: 112px;
  }

  .mobile-controls {
    grid-template-columns: 44px 52px 44px minmax(0, 1fr);
    gap: 8px;
  }

  .play-button {
    width: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
