.mss-app {
  color: #20272b;
  background: #f7f8f4;
}

.mss-hero {
  padding: clamp(48px, 7vw, 86px) clamp(20px, 6vw, 76px) 28px;
  border-bottom: 1px solid #d7ddd8;
}

.mss-hero h1 {
  max-width: 880px;
  font-size: clamp(42px, 7vw, 82px);
}

.mss-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: #586168;
  font-size: 18px;
}

.mss-notice,
.mss-attribution,
.mss-shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.mss-notice {
  margin-top: 28px;
  padding: 18px;
  background: #fff;
  border: 1px solid #cfd8d3;
  border-left: 5px solid #25594b;
  border-radius: 6px;
}

.mss-notice p {
  margin: 8px 0 0;
  color: #4e5960;
}

.mss-notice.compact {
  width: 100%;
  margin: 18px 0 0;
}

.mss-panel {
  margin: 28px 0;
  padding: clamp(20px, 4vw, 34px);
  background: #fff;
  border: 1px solid #d7ddd8;
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(25, 35, 32, 0.07);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
}

.intro-panel h2,
.questionnaire-head h2,
.review-panel h2,
.results-header h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.intro-panel p,
.review-panel p,
.result-section p {
  color: #586168;
}

.intro-actions,
.form-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dark-button {
  background: #173c33;
  color: #fff;
  border-color: #173c33;
}

.secondary-button {
  background: #fff;
  color: #173c33;
  border-color: #b9c5bf;
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.questionnaire-head,
.results-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.progress-track {
  height: 12px;
  margin: 18px 0 24px;
  overflow: hidden;
  background: #e7ece8;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: #25594b;
}

.form-error,
.missing-list {
  padding: 12px 14px;
  background: #fff7e8;
  border: 1px solid #d59a47;
  border-radius: 6px;
  color: #583b15;
}

.mss-item {
  min-width: 0;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #dce2de;
  border-radius: 8px;
}

.mss-item legend {
  width: 100%;
  padding: 0;
  font-weight: 720;
}

.mss-item legend span {
  display: block;
  margin-bottom: 4px;
  color: #6a747a;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.response-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.response-option {
  position: relative;
  display: grid;
  min-height: 56px;
  align-items: center;
  justify-items: center;
  padding: 10px;
  border: 1px solid #c9d2ce;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
}

.response-option:has(input:checked) {
  background: #e9f1ed;
  border-color: #25594b;
  box-shadow: inset 0 0 0 2px #25594b;
}

.response-option:focus-within {
  outline: 3px solid #244f75;
  outline-offset: 2px;
}

.response-option input {
  position: absolute;
  opacity: 0;
}

.response-option span {
  font-size: 14px;
  font-weight: 700;
}

.assistive-note {
  color: #586168;
}

.review-panel .missing-list p {
  margin-bottom: 0;
  color: inherit;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.summary-grid article {
  min-width: 0;
  padding: 16px;
  background: #f5f7f5;
  border: 1px solid #dce2de;
  border-radius: 8px;
}

.summary-grid span {
  display: block;
  margin-bottom: 8px;
  color: #173c33;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 820;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.summary-grid strong {
  display: block;
}

.summary-grid p {
  margin: 8px 0 0;
  color: #586168;
}

.result-section {
  margin-top: 28px;
}

.result-section h3 {
  margin: 0 0 12px;
  font-size: 23px;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.top-list {
  display: grid;
  gap: 8px;
  padding-left: 24px;
}

.top-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e3e8e4;
}

.top-list span {
  display: block;
  color: #586168;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  padding: 8px 10px;
  background: #eef3f1;
  border: 1px solid #cbd8d1;
  border-radius: 6px;
  font-weight: 700;
}

.pill-list span {
  color: #25594b;
}

.empty-state {
  padding: 12px;
  background: #f5f7f5;
  border: 1px solid #dce2de;
  border-radius: 6px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
}

.bar-label strong,
.bar-label span {
  display: block;
}

.bar-label span {
  color: #586168;
  font-size: 14px;
}

.bar-track {
  position: relative;
  height: 24px;
  overflow: hidden;
  background: linear-gradient(90deg, #eef2ef, #e3e8e5);
  border: 1px solid #cfd8d3;
  border-radius: 999px;
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #6e8794;
  border-radius: 999px;
}

.bar-fill.is-moderate {
  background: #b77c2f;
}

.bar-fill.is-strong {
  background: #25594b;
}

.moderate-marker,
.strong-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 2px;
  background: #20272b;
}

.strong-marker {
  background: #9b4a2a;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #dce2de;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e1e6e2;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f2f5f2;
}

td span {
  display: block;
  color: #586168;
  font-size: 14px;
}

.mss-attribution {
  padding: 0 0 46px;
  color: #586168;
}

@media (max-width: 860px) {
  .intro-panel,
  .questionnaire-head,
  .results-header,
  .two-column,
  .summary-grid,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .questionnaire-head,
  .results-header {
    display: grid;
  }

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

  .response-option {
    justify-items: start;
    text-align: left;
  }
}

@media print {
  .site-header,
  .no-print,
  .result-actions,
  .mss-hero,
  .mss-attribution {
    display: none !important;
  }

  body,
  .mss-app {
    background: #fff;
    color: #000;
  }

  .mss-shell,
  .mss-notice {
    width: 100%;
  }

  .mss-panel,
  .mss-notice,
  .summary-grid article,
  .table-wrap {
    box-shadow: none;
    border-color: #999;
  }

  .mss-panel {
    margin: 0;
    padding: 0;
  }

  .result-section,
  .summary-grid,
  .two-column {
    break-inside: avoid;
  }

  .bar-track {
    border-color: #777;
  }
}
