:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --ink: #1e2421;
  --muted: #5e6861;
  --line: #d8ded6;
  --panel: #ffffff;
  --panel-soft: #eef3ef;
  --green: #157f5f;
  --teal: #0e7081;
  --gold: #d49322;
  --coral: #cc6047;
  --shadow: 0 22px 60px rgba(28, 45, 38, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(21, 127, 95, 0.13), transparent 34%),
    linear-gradient(220deg, rgba(212, 147, 34, 0.14), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 170px;
}

.brand-mark {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: #173c35;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-mark span {
  position: absolute;
  bottom: 18px;
  width: 16px;
  border-radius: 4px 4px 0 0;
}

.brand-mark span:nth-child(1) {
  left: 22px;
  height: 32px;
  background: var(--coral);
}

.brand-mark span:nth-child(2) {
  left: 42px;
  height: 52px;
  background: var(--gold);
}

.brand-mark span:nth-child(3) {
  left: 62px;
  height: 68px;
  background: #69c7a3;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2.15rem, 5vw, 4.65rem);
  line-height: 0.98;
}

.lede {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.quiz-panel,
.score-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.quiz-panel {
  padding: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input[type="number"] {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
}

input[type="number"]:focus,
.option:focus-within,
.segmented label:focus-within {
  outline: 3px solid rgba(14, 112, 129, 0.22);
  outline-offset: 2px;
}

.money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.money-input span {
  padding-left: 13px;
  color: var(--muted);
  font-weight: 900;
}

.money-input input {
  border: 0;
  border-radius: 0;
  padding-left: 6px;
}

fieldset {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  font-weight: 900;
}

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

.option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 15px;
  cursor: pointer;
}

.option:has(input:checked) {
  border-color: rgba(21, 127, 95, 0.6);
  background: #edf7f2;
}

.option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
}

.option strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.option span {
  color: var(--muted);
  line-height: 1.45;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.segmented label {
  min-width: 0;
  border-radius: 7px;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 900;
}

.segmented input:checked + span {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 8px 20px rgba(33, 49, 43, 0.09);
}

.score-panel {
  position: sticky;
  top: 18px;
  padding: 22px;
}

.score-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.score-ring {
  display: grid;
  width: 142px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--score-color, var(--green)) calc(var(--score) * 1%), #e7ece7 0);
}

.score-ring > div {
  display: grid;
  width: 104px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}

#score-value {
  font-size: 2.75rem;
  font-weight: 950;
  line-height: 0.9;
}

.score-ring small {
  color: var(--muted);
  font-weight: 800;
}

.score-card h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}

.summary {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.metrics div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.metrics dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metrics dd {
  margin: 6px 0 0;
  font-size: 1.12rem;
  font-weight: 950;
}

.summary-box {
  border-radius: 8px;
  background: #173c35;
  color: #f4fbf8;
  padding: 18px;
}

.report-actions {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
}

.report-button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

.report-button:hover {
  background: #0b5f6e;
}

.report-button:focus {
  outline: 3px solid rgba(14, 112, 129, 0.28);
  outline-offset: 2px;
}

.report-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.summary-box h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.summary-box ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.summary-box li {
  line-height: 1.45;
}

.summary-box li::marker {
  color: #69c7a3;
  font-weight: 950;
}

@media (max-width: 940px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .score-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .intro-panel,
  .score-card,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 72px;
    height: 72px;
  }

  .quiz-panel,
  .score-panel {
    padding: 16px;
  }

  .metrics,
  .segmented {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 128px;
  }
}


.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;
}

.report-eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.report-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.report-email-form {
  display: grid;
  gap: 10px;
}

.report-email-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
}

.report-email-input:focus {
  outline: 3px solid rgba(14, 112, 129, 0.22);
  outline-offset: 2px;
}

.report-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.report-status {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.report-status.is-pending {
  color: var(--teal);
}

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

.report-status.is-error {
  color: var(--coral);
}
