:root {
  --ink: #2f3942;
  --muted: #65717c;
  --line: #d7dcdf;
  --green: #34404a;
  --green-dark: #26313a;
  --green-pale: #eef2f4;
  --orange: #596775;
  --bg: #f5f7f8;
  --white: #ffffff;
  --warning: #a52929;
  --shadow: 0 16px 44px rgba(35, 66, 51, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

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

.progress {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background: #dce5e0;
}

.progress__fill {
  display: block;
  width: 7.7%;
  height: 100%;
  background: var(--orange);
  transition: width 180ms ease;
}

.shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 7px 20px 54px;
}

.browser-gate {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 70px 20px 40px;
}

.browser-gate__panel {
  text-align: center;
}

.browser-gate__icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 50%;
  background: #f0a33b;
  color: white;
  font-size: 38px;
  font-weight: 800;
}

.browser-gate__button {
  width: 100%;
  margin-top: 10px;
}

.browser-gate__store {
  display: block;
  margin-top: 22px;
  color: var(--green-dark);
  font-weight: 700;
}

.study-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 760;
}

.brand img {
  display: block;
  width: clamp(82px, 16vw, 128px);
  height: auto;
}

.step-count {
  color: var(--muted);
  font-weight: 650;
}

.withdraw-button {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #aeb7bd;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.panel {
  width: min(100%, 760px);
  margin: 24px auto 0;
  padding: 42px;
  border: 1px solid #dce2df;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel.wide {
  width: 100%;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 780;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
}

.lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 19px;
}

.field-label {
  display: block;
  margin: 22px 0 8px;
  font-weight: 720;
}

input[type="text"],
input[type="email"],
input[type="password"],
input:not([type]),
textarea {
  width: 100%;
  min-height: 58px;
  padding: 13px 15px;
  border: 2px solid #bfc7cf;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

input:focus,
textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(8, 122, 82, 0.14);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.question {
  min-width: 0;
  margin: 30px 0 0;
  padding: 26px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.question legend {
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  font-weight: 740;
  line-height: 1.45;
}

.question label,
.consent-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 50px;
  padding: 10px 8px;
  border-radius: 6px;
}

.question label:hover,
.consent-choice:hover {
  background: var(--green-pale);
}

input[type="radio"],
input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.consent-choice {
  margin-top: 26px;
  border: 2px solid var(--green);
  font-weight: 760;
}

.document-text {
  margin-top: 28px;
  padding: 2px 4px;
}

.document-text h2 {
  margin: 30px 0 8px;
  font-size: 23px;
}

.document-text p {
  margin: 0 0 15px;
}

.document-text ul {
  margin: 8px 0 18px;
  padding-left: 26px;
}

.document-text li {
  margin: 8px 0;
}

.document-title {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.account-experience {
  width: 100%;
  height: 100%;
}

.study-site-frame {
  display: block;
  width: 100%;
  height: min(840px, 82vh);
  min-height: 660px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

body.account-step-active {
  overflow: hidden;
  background: white;
}

body.account-step-active .shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.account-step-active .study-header {
  display: none;
}

body.account-step-active .screen[data-screen="simulated-account"] {
  position: fixed;
  z-index: 20;
  inset: 7px 0 0;
  display: block;
  background: white;
}

body.account-step-active .study-site-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.site-button {
  width: 100%;
  min-height: 58px;
  margin-top: 28px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: white;
  font-weight: 760;
}

.status {
  min-height: 26px;
  margin: 16px 0 0;
  color: var(--warning);
  font-weight: 680;
}

.status.success {
  color: var(--green-dark);
}

.quiz-grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.quiz-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.quiz-item h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

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

.quiz-options button {
  min-height: 52px;
  padding: 10px;
  border: 2px solid var(--green);
  border-radius: 6px;
  background: white;
  color: var(--green-dark);
  font-weight: 700;
}

.quiz-options button.selected {
  background: var(--green);
  color: white;
}

.quiz-feedback {
  min-height: 25px;
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.actions {
  width: min(100%, 760px);
  margin: 24px auto 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn {
  min-height: 54px;
  padding: 11px 22px;
  border: 2px solid var(--green);
  border-radius: 6px;
  background: white;
  color: var(--green-dark);
  font-weight: 760;
}

.btn.primary {
  background: var(--green);
  color: white;
}

.restart-button {
  width: 100%;
  margin-top: 12px;
}

.btn.subtle {
  margin-right: auto;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn:disabled {
  opacity: 0.45;
}

@media (max-width: 680px) {
  html {
    font-size: 17px;
  }

  .shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .study-header {
    min-height: 72px;
    gap: 10px;
  }

  .brand {
    font-size: 17px;
  }

  .brand img {
    width: min(30vw, 112px);
  }

  .step-count {
    font-size: 14px;
  }

  .withdraw-button {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 12px;
  }

  .panel {
    margin-top: 12px;
    padding: 26px 20px;
  }

  h1 {
    font-size: 30px;
  }

  .study-site-frame {
    min-height: 760px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  body.account-step-active .study-site-frame {
    min-height: 0;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-wrap: wrap;
  }

  .btn {
    flex: 1 1 42%;
    padding-right: 12px;
    padding-left: 12px;
  }

  .btn.subtle {
    order: 3;
    flex-basis: 100%;
    margin: 0;
  }
}
