:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #64706a;
  --line: #d9e1dd;
  --panel: #ffffff;
  --paper: #f5f7f1;
  --accent: #0f766e;
  --accent-dark: #0b5d56;
  --gold: #bd8b13;
  --rose: #b84343;
  --blue: #356bb3;
  --shadow: 0 18px 50px rgba(24, 32, 29, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 38%),
    linear-gradient(240deg, rgba(189, 139, 19, 0.1), transparent 42%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

.topbar,
.intro,
.survey,
.results {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(217, 225, 221, 0.86);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 8px 8px 0 0;
}

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

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

h1 {
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  line-height: 1.12;
}

h3 {
  font-size: 1rem;
}

.score-pill {
  flex: 0 0 auto;
  min-width: 122px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf7;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.intro {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 34px 24px;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.intro p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.survey,
.results {
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.section-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.section-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.section-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.question-card {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  min-height: 520px;
}

.question-meta {
  padding: 34px 28px;
  border-right: 1px solid var(--line);
  background: rgba(248, 250, 247, 0.72);
}

.question-meta p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.question-number {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f3f1;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.question-body {
  padding: 34px 28px;
}

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

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

.option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

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

.option span {
  line-height: 1.35;
}

.helper {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

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

.rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

select,
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
  white-space: nowrap;
}

.field-error {
  margin-top: 14px;
  color: var(--rose);
  font-weight: 750;
}

.results {
  padding: 24px;
}

.result-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 8px;
  background: #eef6f4;
}

.result-hero p {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.score-ring {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  border: 10px solid var(--accent);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.18);
}

.score-ring span {
  font-size: 2.6rem;
  font-weight: 950;
  line-height: 0.9;
}

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

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

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
}

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

.muted-panel {
  margin-top: 18px;
  background: #fafbf9;
}

.benchmark-panel,
.report-panel,
.full-report,
.next-step-panel {
  margin-top: 18px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-header p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.bars {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

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

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 780;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edea;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.signal-list,
.recommendations,
.snapshot,
.benchmark-summary {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.signal,
.recommendation,
.snapshot-row,
.benchmark-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #fff;
}

.benchmark-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  background: #f4fbf9;
  border-color: rgba(15, 118, 110, 0.22);
}

.metric {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 86px;
  color: var(--accent-dark);
  font-size: 2.2rem;
  font-weight: 950;
}

.metric small {
  font-size: 0.95rem;
}

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

.benchmark-grid div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.benchmark-grid strong {
  font-size: 1.3rem;
}

.benchmark-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.signal strong,
.recommendation strong,
.snapshot-row strong {
  display: block;
  margin-bottom: 5px;
}

.signal p,
.recommendation p,
.snapshot-row p,
.benchmark-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.signal.warning {
  border-color: rgba(184, 67, 67, 0.32);
  background: #fff8f7;
}

.signal.good {
  border-color: rgba(15, 118, 110, 0.32);
  background: #f4fbf9;
}

.report-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

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

.form-grid label,
.consent-line {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.consent-line {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--ink);
  font-weight: 650;
}

.consent-line input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.inline-actions {
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border-top: 0;
}

.form-status {
  margin: 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.form-status.error {
  color: var(--rose);
}

.report-content {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.report-content section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbf9;
}

.report-content h4 {
  margin: 0 0 8px;
}

.report-content p,
.report-content li {
  color: var(--muted);
  line-height: 1.55;
}

.report-content p {
  margin: 8px 0 0;
}

.report-content ol {
  margin: 0;
  padding-left: 22px;
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .topbar,
  .intro,
  .result-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  .question-card,
  .grid.two,
  .form-grid,
  .benchmark-grid {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .inline-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .question-card {
    min-height: auto;
  }

  .question-meta {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rank-row {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 118px;
    height: 118px;
  }
}
