:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: #23332d;
  background: #f5f6f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
  --ink: #23332d;
  --muted: #728078;
  --green: #2f7255;
  --green-dark: #245c43;
  --line: #e4e9e2;
  --paper: #fff;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

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

button {
  font: inherit;
}

.topbar {
  width: min(1120px, calc(100% - 64px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  border-radius: 12px;
  object-fit: cover;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.sync-status {
  font-size: 12px;
  font-weight: 600;
  color: #8a8f98;
}

.sync-status.is-required {
  color: #c98a4b;
}

.sync-status.is-uploading {
  color: #8a8f98;
}

.sync-status.is-complete {
  color: #4f9a70;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #55a879;
  box-shadow: 0 0 0 3px #55a87920;
}

.connection.is-offline .connection-dot {
  background: #d78a56;
  box-shadow: 0 0 0 3px #d78a5620;
}

.install-button,
.primary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 650;
  transition: background-color 160ms ease, transform 160ms ease;
}

.install-button {
  padding: 11px 17px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}

.install-button:hover,
.primary-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #78ad8d;
  outline-offset: 4px;
}

main {
  flex: 1;
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
}

.survey {
  max-width: 440px;
  margin: 0 auto;
  padding: 78px 0;
}

.survey h1 {
  font-size: clamp(40px, 7vw, 64px);
}

#start-title {
  margin-bottom: 1em;
}

.survey-form {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.survey-form label {
  font-weight: 650;
}

.survey-form input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

.survey-form input:focus-visible {
  outline: 3px solid #78ad8d;
  outline-offset: 2px;
}

.survey-form button {
  justify-self: end;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

#survey-message {
  min-height: 1.5em;
}

.welcome {
  min-height: 490px;
  padding: 78px 0 70px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
}

.eyebrow span {
  padding-right: 5px;
  font-size: 13px;
}

h1 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(52px, 7.5vw, 88px);
  font-weight: 550;
  letter-spacing: -0.075em;
  line-height: 0.98;
}

h1 span {
  color: var(--green);
}

.intro {
  max-width: 440px;
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.welcome-actions {
  min-height: 48px;
  margin-top: 27px;
}

.primary-button {
  padding: 14px 20px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
}

.request-link {
  display: inline-block;
  white-space: nowrap;
  text-decoration: none;
}

.survey-home {
  max-width: 700px;
}

.survey-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.survey-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.survey-list li {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.survey-select {
  width: 100%;
  padding: 20px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.survey-select:hover {
  background: #f5faf6;
}

.question-form > button {
  display: block;
  margin-left: auto;
}

.start-button {
  display: block;
  margin-left: auto;
  margin-top: 32px;
}

.question-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.read-aloud-button {
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: 20px;
  cursor: pointer;
}

.read-aloud-button[hidden] {
  display: none;
}

.question-form legend {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.3;
}

.question-answers {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.question-answers label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
}

.question-answers input {
  accent-color: var(--green);
}

.survey-list h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.survey-list p,
#surveys-message {
  color: var(--muted);
}

.survey-list p {
  margin: 0;
  font-size: 13px;
}

.primary-button span {
  padding-left: 12px;
}

.install-hint {
  margin: 0;
  color: #89948d;
  font-size: 12px;
  line-height: 1.6;
}

.welcome-art {
  width: 350px;
  height: 340px;
  position: absolute;
  top: 50%;
  right: 7%;
  transform: translateY(-48%);
  display: grid;
  place-items: center;
}

.art-orbit {
  position: absolute;
  border: 1px solid #dfe7dd;
  border-radius: 50%;
}

.orbit-one {
  width: 295px;
  height: 295px;
}

.orbit-two {
  width: 235px;
  height: 235px;
  border-style: dashed;
  border-color: #e0e7e0;
}

.art-card {
  width: 184px;
  height: 196px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid #e6ebe4;
  border-radius: 30px;
  background: linear-gradient(145deg, #fff, #f8faf6);
  box-shadow: 0 26px 65px #30433512, 0 4px 12px #30433508;
  transform: rotate(-5deg);
}

.art-card img {
  width: 108px;
  height: 102px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px #4e6d4920);
}

.art-sparkle {
  position: absolute;
  color: var(--green);
}

.sparkle-one {
  top: 21px;
  right: 20px;
  font-size: 21px;
}

.sparkle-two {
  bottom: 23px;
  left: 23px;
  color: #e4a77b;
  font-size: 17px;
}

.art-caption {
  position: absolute;
  right: 0;
  bottom: 3px;
  color: #89948d;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.features {
  padding: 25px 0 45px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
}

.feature-card {
  min-height: 173px;
  padding: 21px 22px;
  border: 1px solid #e8ece6;
  border-radius: 16px;
  background: #ffffffa6;
}

.feature-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 15px;
}

.feature-icon-green {
  background: #e7f2e9;
  color: #3e835d;
}

.feature-icon-peach {
  background: #f9eee5;
  color: #c27b4f;
}

.feature-icon-lilac {
  background: #efedf7;
  color: #7970a2;
}

.feature-card h2 {
  margin: 17px 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-card p {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

footer {
  width: min(1120px, calc(100% - 64px));
  min-height: 63px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: #89948d;
  font-size: 10px;
}

.footer-mark {
  color: var(--green);
}

.footer-link {
  padding: 0;
  border: 0;
  background: none;
  color: #0000ee;
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.privacy-dialog {
  width: min(540px, calc(100% - 40px));
  max-height: calc(100% - 40px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
}

.privacy-dialog::backdrop {
  background: #23332d80;
}

.privacy-dialog h1 {
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.privacy-dialog p {
  line-height: 1.6;
}

.privacy-dialog form {
  text-align: right;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .topbar,
  main,
  footer {
    width: min(100% - 40px, 540px);
  }

  .topbar {
    min-height: 72px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
  }

  .welcome {
    min-height: 610px;
    padding: 56px 0 270px;
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(54px, 12vw, 76px);
  }

  .intro {
    max-width: 390px;
    font-size: 14px;
  }

  .welcome-art {
    width: 260px;
    height: 255px;
    top: auto;
    right: 50%;
    bottom: 12px;
    transform: translateX(50%);
  }

  .orbit-one {
    width: 220px;
    height: 220px;
  }

  .orbit-two {
    width: 175px;
    height: 175px;
  }

  .art-card {
    width: 142px;
    height: 153px;
    border-radius: 24px;
  }

  .art-card img {
    width: 84px;
    height: 80px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .feature-card {
    min-height: 0;
    padding: 18px;
  }

  .feature-card h2 {
    margin-top: 12px;
  }

  footer {
    min-height: 56px;
  }
}

@media (max-width: 430px) {
  .brand {
    gap: 9px;
    font-size: 13px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .connection,
  .sync-status {
    font-size: 10px;
  }

  .install-button {
    padding: 10px 12px;
    font-size: 11px;
  }
}

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