@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/montserrat-600.ttf") format("truetype");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/montserrat-700.ttf") format("truetype");
}

:root {
  --lf-dark: #344c44;
  --lf-yellow: #e8b923;
  --lf-plum: #8b5a7f;
  --bg: #3a5452;
  --card-bg: #ffffff;
  --border: #e2e2e2;
  --text: #344c44;
  --muted: #5a5a5a;
  --error: #b3261e;
  --font-body: Arial, Helvetica, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Montserrat", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 8px;
}

.page {
  width: 90%;
  max-width: 1200px;
}

.logo-row {
  display: flex;
  justify-content: center;
  padding: 0 0 20px;
}

.logo-row img {
  height: 42px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 32px;
}

.card + .card {
  margin-top: 16px;
}

h1,
h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.35;
  margin: 0 0 14px;
  color: var(--text);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 18px;
}

p {
  line-height: 1.5;
  margin: 0 0 14px;
}

.confidential {
  font-weight: 600;
  text-decoration: underline;
}

.scope-intro {
  font-style: italic;
}

.helper-text {
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
  margin: -8px 0 12px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.question-block + .question-block {
  margin-top: 22px;
}

.question-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 14px;
}

.question-label.is-plain {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
}

.required-star {
  color: var(--error);
}

.select-all-hint {
  font-style: italic;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 10px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
}

.option input[type="checkbox"],
.option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--lf-dark);
}

.none-of-above-row {
  margin-top: 4px;
  padding-top: 10px;
}

.select-all-hint-inline {
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  margin-left: 6px;
}

.subject-columns {
  column-count: 3;
  column-gap: 32px;
}

.subject-kla-group {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .subject-columns {
    column-count: 1;
  }
}

.subject-columns--single {
  column-count: 1;
}

.subject-pool {
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
}

.subject-pool summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
}

.subject-pool[open] summary {
  margin-bottom: 14px;
}

.sba-block {
  margin: 0;
  border: 2px solid var(--lf-dark);
  border-radius: 8px;
  padding: 20px 24px;
}

.sba-block legend {
  padding: 0 8px;
  margin-left: -8px;
  font-size: 17px;
}

.sba-two-col {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.sba-two-col > .sba-col {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 700px) {
  .sba-two-col {
    flex-direction: column;
    gap: 0;
  }
}

.specify-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.specify-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.specify-row[hidden] {
  display: none;
}

.specify-row-label {
  min-width: 220px;
}

.specify-suffix {
  display: none;
}

.option input:checked ~ span .specify-suffix {
  display: inline;
}

.specify-row-full {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 420px;
}

.specify-row-full .helper-text {
  margin: 0;
}

.specify-row-full .inline-text-input {
  margin-top: 4px;
  max-width: none;
}

.error-banner {
  background: #fbeaea;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 15px;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--lf-dark);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--lf-dark);
  color: #fff;
}

.btn-primary:hover {
  background: #fff;
  color: var(--lf-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--lf-dark);
}

.btn-secondary:hover {
  background: var(--lf-dark);
  color: #fff;
}

a {
  color: var(--lf-plum);
}

.inline-text-input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 15px;
  flex: 1;
  max-width: 260px;
}

.numeric-table {
  margin-top: 6px;
  max-width: 420px;
  border-top: 1px solid var(--border);
}

.numeric-table-header {
  text-align: right;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0;
  padding-right: max(96px, 12%);
}

.numeric-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding: 10px 0;
}

.numeric-table-input {
  width: 96px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 16px;
}

.usefulness-matrix-scroll {
  overflow-x: auto;
  margin-top: 10px;
}

.usefulness-matrix {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
}

.usefulness-matrix th,
.usefulness-matrix td {
  border: 1px solid var(--border);
  padding: 6px 6px;
  text-align: center;
  font-size: 14px;
  min-width: 62px;
}

.usefulness-matrix td {
  padding: 0;
}

.usefulness-matrix td label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 36px;
  padding: 6px;
  box-sizing: border-box;
  cursor: pointer;
}

.usefulness-matrix input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--lf-dark);
  cursor: pointer;
}

.usefulness-matrix thead th {
  background: #f4f4f4;
  color: var(--muted);
  font-weight: normal;
  vertical-align: bottom;
  word-break: normal;
  overflow-wrap: break-word;
}

.usefulness-matrix tbody th {
  text-align: left;
  font-weight: normal;
  background: #f9f9f9;
  white-space: normal;
  overflow-wrap: break-word;
  min-width: 140px;
  width: 26%;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--lf-dark);
  box-shadow: 0 0 0 1px var(--lf-dark);
}

.answers-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.answer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.answer-key {
  flex: 0 0 200px;
  font-weight: 600;
  color: var(--muted);
}

.answer-value {
  flex: 1 1 260px;
  min-width: 0;
  overflow-wrap: break-word;
}

.answer-sublist {
  margin: 0;
  padding-left: 18px;
}

.answer-value-empty {
  font-style: italic;
  color: var(--muted);
}

.answers-raw {
  margin-top: 16px;
}

.answers-raw summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}

.answers-raw pre {
  background: #f6f6f6;
  padding: 12px;
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin-top: 8px;
}

.comment-textarea {
  display: block;
  width: 100%;
  max-width: 500px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
}

.question-label-followup {
  margin-top: 16px;
}

.sub-question-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  margin-top: 14px;
  margin-bottom: 8px;
}

.usefulness-matrix tr.matrix-divider td {
  background: var(--lf-dark);
  color: #fff;
  font-weight: 600;
  padding: 8px 10px;
}
