:root {
  --ink: #1f4e4d;
  --copper: #8b5744;
  --sand: #d0c29d;
  --paper: #f8f6f0;
  --white: #fffefb;
  --text: #474a48;
  --rule: #d6ccb2;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #fbfaf7, var(--paper)); }
button, textarea, input { font: inherit; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px;
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; letter-spacing: .18em; font-weight: 700; }
.brand small { margin-top: 4px; color: var(--copper); font-size: 11px; letter-spacing: .08em; }
.prototype { color: var(--copper); font-size: 13px; }

.shell { width: min(880px, calc(100% - 32px)); margin: 56px auto 80px; }
.intro { max-width: 720px; }
.eyebrow { margin: 0 0 10px; color: var(--copper); font-size: 13px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { font-size: clamp(42px, 7vw, 68px); line-height: 1; }
h2 { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; }
.intro > p:last-child, .description { max-width: 680px; font-size: 18px; line-height: 1.65; }

.progress { height: 4px; margin: 40px 0 18px; background: #e9e3d5; }
.progress span { display: block; height: 100%; background: var(--ink); transition: width .25s ease; }

.question-card, .result-panel, .summary, .excluded, .disclaimer {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--rule);
  background: var(--white);
}
.description { margin: 14px 0 28px; }
.choice-list { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 17px 18px; border: 1px solid var(--rule); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--ink); background: #eef3f0; }
.choice input { width: 20px; height: 20px; accent-color: var(--ink); }
.choice span { line-height: 1.4; }

.text-field { display: grid; gap: 10px; font-weight: 700; }
textarea { width: 100%; resize: vertical; padding: 16px; border: 1px solid var(--rule); background: #fff; color: var(--text); line-height: 1.5; }
textarea:focus { outline: 2px solid var(--ink); outline-offset: 2px; }

.actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; }
button { min-height: 48px; padding: 12px 22px; border: 1px solid var(--ink); cursor: pointer; font-weight: 700; }
.primary { color: #fff; background: var(--ink); }
.secondary { color: var(--ink); background: transparent; }

.results { max-width: 880px; }
.result-panel { margin-top: 36px; padding-top: 0; padding-bottom: 0; }
.result-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.result-card:last-child { border-bottom: 0; }
.result-card h2 { font-size: 34px; }
.result-card ul { margin: 14px 0 0; padding-left: 20px; line-height: 1.55; }
.arrow { color: var(--copper); font-size: 34px; }
.summary, .excluded, .disclaimer { margin-top: 20px; line-height: 1.55; }
.excluded summary { color: var(--ink); cursor: pointer; font-weight: 700; }
.disclaimer { border-left: 4px solid var(--copper); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 640px) {
  .site-header { padding: 20px 16px; }
  .prototype { font-size: 11px; }
  .shell { margin-top: 34px; }
  .question-card, .result-panel, .summary, .excluded, .disclaimer { padding: 24px 20px; }
  .actions { align-items: stretch; }
  .actions button { flex: 1; }
}


.corpus-warning { margin: 0 0 34px; }
.search-field { margin: 36px 0 18px; }
.search-field input { min-height: 52px; padding: 12px 14px; border: 1px solid var(--rule); background: var(--white); }
.need-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; max-height: 390px; overflow: auto; padding-right: 4px; }
.need-button { display: grid; gap: 7px; text-align: left; color: var(--text); background: var(--white); border-color: var(--rule); }
.need-button small { color: var(--copper); }
.need-button span { color: var(--ink); font-weight: 700; }
.need-button.selected { border-color: var(--ink); background: #eef3f0; }
.empty-state { margin: 30px 0; padding: 24px; border: 1px dashed var(--rule); }
.need-detail { margin-top: 46px; padding-top: 38px; border-top: 4px solid var(--ink); }
.need-detail h3 { margin-top: 34px; color: var(--ink); font-size: 22px; }
.preference-bar { display: flex; flex-wrap: wrap; gap: 18px; margin: 24px 0; padding: 18px; background: #efece3; }
.preference-bar strong { width: 100%; color: var(--ink); }
.question-list details { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.question-list summary { color: var(--ink); cursor: pointer; font-weight: 700; }
.is-excluded { opacity: .55; }
.exclusion-note { color: var(--copper); font-weight: 700; }


.choice span { display: grid; gap: 5px; }
.choice small { color: #6a6d6a; font-weight: 400; }
.free-preference { margin-top: 28px; }
.alert-panel { margin-top: 20px; padding: 24px; border: 2px solid var(--copper); background: #fff8f1; }
