:root {
  color-scheme: light;
  --paper: #f3f3eb;
  --surface: #fffefa;
  --ink: #183029;
  --quiet: #48594f;
  --leaf: #20503e;
  --dark: #14362d;
  --lime: #d9e4b1;
  --line: #d5dad0;
  --error: #882f23;
  --bar-1: #92543b;
  --bar-2: #e0aa86;
  --bar-3: #c2c6b9;
  --bar-4: #8eaa8f;
  --bar-5: #255a47;
  font: 16px/1.55 "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
a { color: var(--leaf); }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #ba5c35; outline-offset: 4px; }
main:focus, h1[tabindex]:focus, h2[tabindex]:focus { outline: none; }
[hidden] { display: none !important; }
.skip-link { position: absolute; transform: translateY(-160%); z-index: 5; padding: 12px; background: white; }
.skip-link:focus { transform: translateY(0); }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-inner { width: min(100%, 1192px); margin: auto; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem clamp(1.2rem, 5vw, 3.4rem); }
.brand { display: inline-flex; align-items: center; column-gap: .8rem; color: var(--ink); text-decoration: none; font-size: .88rem; line-height: 1.3; font-weight: 680; }
.brand small { display: block; margin-top: .15rem; color: var(--quiet); font-size: .76rem; font-weight: 450; }
.brand-mark { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; background: var(--dark); color: var(--lime); font-family: Georgia, serif; font-size: 1.3rem; border-radius: 2px 2px 12px; }
.top-link { font-size: .84rem; white-space: nowrap; text-decoration: none; font-weight: 630; }
.top-link:hover { text-decoration: underline; }
.top-link span { margin-left: .15rem; }
main { width: min(100% - 2.25rem, 1130px); margin: clamp(1.5rem, 5vw, 4.5rem) auto; flex: 1 0 auto; }
main.narrow { width: min(100% - 2rem, 740px); }
main.login { width: min(100% - 2.25rem, 530px); }
h1, h2 { font-family: Georgia, "Instrument Serif", serif; font-weight: 500; letter-spacing: -.045em; line-height: 1.07; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 7vw, 5.1rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { margin: 0 0 .25em; font-size: 1.05rem; line-height: 1.35; }
p { margin: .5rem 0 0; }
.eyebrow { font-size: .75rem; font-weight: 720; letter-spacing: .11em; text-transform: uppercase; margin: 0 0 .85rem; color: var(--leaf); }
.section-heading { margin-bottom: 1.5rem; }
.muted { color: var(--quiet); }
.meta { font-size: .84rem; }
.loading { min-height: 12rem; display: grid; place-items: center; color: var(--quiet); }
.hero { background: var(--dark); color: #fbfcf3; padding: clamp(2.2rem, 8vw, 5.4rem) clamp(1.6rem, 7vw, 5.4rem); border-radius: 5px 5px 54px 5px; position: relative; overflow: hidden; }
.hero h1 { max-width: 9em; }
.hero .eyebrow { color: var(--lime); }
.hero p:not(.eyebrow) { margin-top: 1rem; max-width: 37ch; color: #f2f4e8; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.1rem, 4vw, 2.1rem); }
.card + .card { margin-top: 1rem; }
.join-card, .intro-card { margin-top: 1rem; }
.join-card h2 { margin-bottom: .85rem; }
.intro-card p { max-width: 56ch; }
.intro-card .actions { margin-top: 1.2rem; }
form { margin: 0; }
.field-form, .field-form label { display: grid; gap: .5rem; }
.field-form { gap: 1rem; margin-top: 1.3rem; }
.field-form label, .form-label { font-size: .92rem; font-weight: 660; }
.inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.inline-form label { display: grid; gap: .35rem; flex: 1 1 12rem; }
input:not([type=radio],[type=checkbox]), textarea { min-height: 46px; border: 1px solid #aab5a8; background: #fff; border-radius: 7px; color: var(--ink); padding: .6rem .8rem; width: 100%; }
input[readonly] { min-width: 0; }
textarea { min-height: 118px; resize: vertical; display: block; margin-top: .7rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.button { border: 1px solid transparent; border-radius: 7px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: .65rem 1.05rem; font-weight: 660; font-size: .92rem; line-height: 1.25; cursor: pointer; text-decoration: none; }
.button.primary { background: var(--leaf); color: #fff; }
.button.primary:hover { background: #123b2e; }
.button.secondary { border-color: #becabe; color: var(--leaf); background: var(--surface); }
.button.secondary:hover { background: #ecf1e8; }
.button.text { min-height: 38px; padding: .35rem .15rem; color: var(--leaf); text-decoration: underline; text-underline-offset: .2rem; background: transparent; }
.button.danger { color: var(--error); }
.button:disabled { opacity: .55; cursor: wait; }
.notice { min-width: 0; }
.notice:empty { display: none; }
.notice.error { color: var(--error); font-size: .9rem; padding: .65rem .8rem; border-radius: 6px; background: #fff1ea; margin: .75rem 0; }
.notice.success { color: var(--leaf); font-size: .88rem; }
.progress-wrap { margin-bottom: 1rem; }
.progress-caption { display: flex; justify-content: space-between; gap: .6rem; color: var(--quiet); font-size: .83rem; margin-bottom: .35rem; }
.progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.progress span { height: 4px; background: #d4ded2; border-radius: 20px; }
.progress span.current { background: var(--leaf); }
.survey-title { font-size: clamp(2.3rem, 6vw, 3.4rem); }
fieldset { margin: 0; border: 0; padding: 0; min-width: 0; }
fieldset + fieldset, fieldset + .open-question { border-top: 1px solid var(--line); margin-top: 1.4rem; padding-top: 1.2rem; }
legend { padding: 0; font-weight: 680; line-height: 1.4; width: 100%; }
fieldset + fieldset > legend { float: left; margin-bottom: .25rem; }
fieldset + fieldset > .choice-list { clear: left; }
.choice-list { display: grid; gap: .42rem; margin-top: .65rem; }
.choice { display: flex; align-items: center; gap: .65rem; padding: .58rem .72rem; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: .94rem; line-height: 1.3; }
.choice:hover { border-color: #92a593; }
.choice:has(input:checked) { border-color: #57816b; background: #edf3e7; }
.choice input { flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--leaf); margin: 0; }
.likert-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: .32rem; }
.likert-options .choice { display: grid; place-content: center; min-height: 43px; text-align: center; padding: .45rem; font-weight: 650; position: relative; }
.likert-options input { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.likert-options .choice:has(input:checked) { color: white; background: var(--leaf); border-color: var(--leaf); }
.likert-options .choice:has(:focus-visible) { outline: 3px solid #ba5c35; outline-offset: 2px; }
.likert-options input:focus-visible { outline: none; }
.skip-choice { display: inline-flex; border-color: transparent; color: var(--quiet); font-size: .84rem; min-height: 36px; padding-left: .12rem; }
.scale-key { display: flex; gap: .45rem .8rem; flex-wrap: wrap; margin-top: .8rem; }
.scale-key span { font-size: .8rem; }
.scale-key b { display: inline-grid; place-content: center; min-width: 1.45rem; height: 1.45rem; border-radius: 4px; margin-right: .2rem; background: #e9eee2; }
.step-actions { margin-top: 1.15rem; justify-content: space-between; }
.step-actions .primary { margin-left: auto; }
.detail { font-size: .88rem; color: var(--quiet); margin-bottom: .35rem; }
.complete { text-align: center; padding: clamp(2rem, 8vw, 5rem) clamp(1rem, 5vw, 3rem); }
.complete-mark { width: 52px; height: 52px; display: grid; place-content: center; background: var(--lime); color: var(--dark); border-radius: 50%; margin: 0 auto 1.2rem; font-size: 1.5rem; }
.complete h1 { font-size: clamp(2.5rem, 7vw, 4rem); }
.admin-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .9rem 1.5rem; margin-bottom: 1.6rem; }
.admin-heading h1 { font-size: clamp(2.65rem, 6vw, 4.15rem); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; }
.admin-grid .card { margin: 0; }
.session-list { margin-top: 1.2rem; }
.session-list > h2 { margin-bottom: .9rem; }
.session { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.15rem; }
.session h3 { overflow-wrap: anywhere; }
.session .actions { justify-content: flex-end; }
.status { display: inline-block; padding: .14rem .53rem; border-radius: 5px; background: #e8ebe3; color: var(--quiet); margin-right: .36rem; font-size: .78rem; font-weight: 700; }
.status.open { background: #e7f1d9; color: #275640; }
dialog { width: min(100% - 2rem, 505px); border-radius: 12px; padding: 0; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: #122c24ac; }
.dialog-inner { padding: 1.5rem; }
.dialog-inner .actions { margin-top: 1rem; }
.qr { display: block; width: min(54vw, 280px); image-rendering: pixelated; margin: 1rem auto; aspect-ratio: 1; background: white; border: 1px solid var(--line); }
.back { display: inline-block; margin-bottom: 1rem; font-size: .85rem; }
.legend-chart { display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; margin-top: .9rem; }
.legend-chart span { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; }
.swatch { display: inline-block; width: .85rem; height: .85rem; border-radius: 2px; flex: 0 0 auto; }
.results h2 { font-size: clamp(1.75rem, 4vw, 2.55rem); }
.plot { margin-top: 1rem; }
.plot-row { padding: .8rem 0; border-top: 1px solid var(--line); }
.plot-name { display: flex; justify-content: space-between; gap: .6rem; font-weight: 600; }
.plot-count { white-space: nowrap; font-weight: 500; color: var(--quiet); }
.plot-bar { position: relative; height: 20px; border-radius: 4px; background: #eeefe9; overflow: hidden; margin-top: .35rem; }
.plot-bar .part { position: absolute; top: 0; bottom: 0; }
.plot-bar .center-line { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed #192d27ac; }
.plot-values { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: .27rem; color: var(--quiet); font-size: .79rem; font-variant-numeric: tabular-nums; }
.plot-values span { display: inline-flex; gap: .25rem; align-items: center; }
.plot-values .swatch { width: .55rem; height: .55rem; }
.multi-plot { display: grid; gap: .7rem; margin-top: 1rem; }
.multi-plot .bar-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .7rem; }
.bar-pair strong { font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; display: block; height: 13px; border-radius: 4px; background: #e9eee5; overflow: hidden; }
.bar-track span { display: block; height: 100%; background: #43836c; border-radius: 3px; }
.debrief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem; margin: 1.15rem 0; }
.debrief-grid div { border-top: 2px solid #a0b59c; padding-top: .45rem; }
details { margin-top: 1rem; }
summary { color: var(--leaf); font-weight: 680; cursor: pointer; }
.item-meta { display: grid; gap: .65rem; }
.item-meta dd, .item-meta dt { margin: 0; }
.item-meta dt { font-size: .78rem; font-weight: 700; color: var(--quiet); }
.item-meta dd { overflow-wrap: anywhere; }
.item-meta a { text-underline-offset: .15rem; }
footer { width: min(100% - 2.25rem, 1130px); margin: 0 auto; padding: 1rem 0 1.2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; color: var(--quiet); font-size: .8rem; }
@media (max-width: 730px) {
  .admin-grid, .session, .debrief-grid { grid-template-columns: 1fr; }
  .session .actions { justify-content: flex-start; }
  .hero { border-bottom-right-radius: 38px; }
  .plot-values { font-size: .72rem; }
  .plot-values .swatch { display: none; }
}
@media (max-width: 410px) {
  .top-inner { padding-inline: .85rem; }
  .brand { gap: .45rem; font-size: .75rem; }
  .brand-mark { width: 33px; height: 33px; }
  .top-link { font-size: .75rem; }
  .button { padding-inline: .8rem; }
}
@media print {
  body { background: #fff; }
  .topbar, footer, .no-print, dialog { display: none; }
  main { width: 100%; margin: 0; }
  .card, .plot-row { break-inside: avoid; }
  .plot-bar, .swatch, .bar-track { print-color-adjust: exact; }
}
.plot-axis { display: flex; justify-content: space-between; font-size: .79rem; color: var(--quiet); margin-bottom: .35rem; }
