body.portal { --ink: #203c39; --muted: #5e716d; --brand: #216557; --line: #dce6df; background: #f5f7f4; color: var(--ink); }
.portal [hidden] { display: none !important; }
.portal-brand { max-width: 48rem; margin: auto; display: flex; gap: .65rem; align-items: center; padding: 1.5rem 1.5rem 1rem; font-size: .9rem; font-weight: 700; letter-spacing: .04em; }
.portal-symbol { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: white; font: 700 24px Georgia, serif; }
.portal-brand-light { font-weight: 400; }
.portal-brand-name { font-size: 1rem; letter-spacing: 0; color: var(--brand); }
.portal-brand-caption { margin-left: auto; font-size: .75rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.portal .container.narrow { max-width: 48rem; padding: 1rem 1.5rem 3rem; }
.portal h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.25; letter-spacing: -.035em; margin: .5rem 0 1.3rem; }
.portal-eyebrow { font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); font-weight: 650; margin: 1rem 0 .5rem; }
.portal-context { background: #eaf1ec; border-left: 3px solid var(--brand); padding: .6rem .9rem; margin: .5rem 0 1.2rem; border-radius: 0 8px 8px 0; font-size: .95rem; }
.portal-instructions { background: #eaf1ec; border: 1px solid #dce6df; border-radius: 12px; padding: 1rem 1.2rem; margin: 1rem 0 1.5rem; }
.portal-instructions summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; }
.description { color: var(--muted); white-space: pre-line; font-size: .95rem; margin-top: .75rem; }
#questionnaire { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 1.7rem; box-shadow: 0 6px 24px #203c3905; }
.progress-wrap { margin-bottom: 1.8rem; }
.progress { color: var(--muted); font-weight: 600; font-size: .8rem; margin: 0 0 .65rem; }
#progress-bar { display: block; width: 100%; height: 6px; border: 0; border-radius: 8px; overflow: hidden; appearance: none; background: #e8efea; color: var(--brand); }
#progress-bar::-webkit-progress-bar { background: #e8efea; border-radius: 8px; }
#progress-bar::-webkit-progress-value { background: var(--brand); border-radius: 8px; }
#progress-bar::-moz-progress-bar { background: var(--brand); border-radius: 8px; }
.question { border: 0; padding: 0; margin: 1.5rem 0; min-width: 0; }
.question legend { font-size: 1.2rem; line-height: 1.5; font-weight: 650; padding: 0; width: 100%; overflow-wrap: anywhere; }
.question .number { color: var(--muted); margin-right: .25rem; font-weight: 400; }
.question .help { color: var(--muted); font-size: .95rem; margin: .5rem 0; }
.question-hint { font-size: .78rem; color: var(--muted); margin: .55rem 0 1.2rem; }
.question-error { color: #b42318; font-size: .9rem; margin-bottom: 0; }
.question.missing legend { color: #b42318; }
.option { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; margin: .65rem 0; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; cursor: pointer; min-height: 58px; transition: background-color .12s, border-color .12s; }
.option:hover { background: #f7faf7; border-color: #9cb9aa; }
.option:has(input:checked) { border-color: var(--brand); background: #edf5ef; box-shadow: inset 0 0 0 1px var(--brand); }
.option:has(input:focus-visible) { outline: 3px solid #a56722; outline-offset: 3px; }
.option input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); flex-shrink: 0; margin: 0; }
.option span { overflow-wrap: anywhere; }
.question input[type=number], .question textarea { width: 100%; padding: .9rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.portal :focus-visible { outline: 3px solid #a56722; outline-offset: 3px; }
.portal legend:focus, .portal #summary h2:focus { outline: none; }
.nav { display: flex; gap: .75rem; justify-content: space-between; margin-top: 1.8rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.nav button { min-height: 48px; padding: .8rem 1.2rem; border-radius: 9px; border: 1px solid var(--line); background: white; color: var(--ink); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; }
.nav button[type=submit], .nav #next { background: var(--brand); color: #fff; border-color: var(--brand); margin-left: auto; }
.nav button:disabled { opacity: .55; cursor: not-allowed; }
#summary ol { padding-left: 1.4rem; }
#summary li { margin: .8rem 0; padding: .7rem 0 1rem .3rem; border-bottom: 1px solid var(--line); }
#summary li p { margin: 0 0 .4rem; }
#summary strong { display: block; font-size: .95rem; color: var(--brand); white-space: pre-wrap; overflow-wrap: anywhere; }
.portal .summary-edit { background: transparent; color: var(--brand); border: 0; text-decoration: underline; text-underline-offset: 4px; padding: .6rem 0; font-size: .85rem; min-height: 44px; cursor: pointer; }
.preview-banner { background: #fff4d6; border: 1px solid #f0c36d; padding: .8rem 1rem; border-radius: 10px; font-size: .9rem; }
.portal a { color: var(--brand); text-underline-offset: 3px; }
.portal-footnote { color: var(--muted); font-size: .8rem; padding: .5rem .25rem; line-height: 1.65; }
.portal-complete { text-align: center; padding: 3rem 1.5rem; background: white; border: 1px solid var(--line); border-radius: 16px; margin-top: 2rem; }
.completion-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #eaf1ec; color: var(--brand); font-size: 1.6rem; margin-bottom: .8rem; }
@media (max-width: 520px) {
  .portal-brand { padding: 1rem; }
  .portal-brand-caption { display: none; }
  .portal .container.narrow { padding: .5rem 1rem 2rem; }
  #questionnaire { padding: 1.2rem; }
  .question legend { font-size: 1.1rem; }
  .option { padding: .9rem; }
  .nav { gap: .5rem; }
  .nav button { padding: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .option { transition: none; } }

.portal-intro { background: white; padding: 1.5rem; border: 1px solid var(--line); border-radius: 14px; }
.portal-intro h2 { font-size: 1.3rem; margin-top: 0; }
.portal-intro button { padding: .9rem 1.2rem; min-height: 48px; border-radius: 9px; font-weight: 600; }
