:root {
  color-scheme: dark;
  --desk: #201d19;
  --paper: #f3e8d2;
  --ink: #28251f;
  --muted: #62584a;
  --rule: #c7b89e;
  --accent: #833b30;
  --accent-hover: #692c24;
  --mono: Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 32% 0%, #43362a, transparent 65%),
    repeating-linear-gradient(94deg, #ffffff06 0 1px, transparent 1px 22px),
    var(--desk);
  color: var(--paper);
  font: 1rem / 1.5 system-ui, sans-serif;
}

a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: .14em; }
button, input { font: inherit; }

:focus-visible {
  outline: 3px solid #287f84;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  inset: .5rem auto auto .5rem;
  padding: .5rem 1rem;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }
.shell { width: min(100% - 2rem, 72rem); margin-inline: auto; }

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .8rem 1.25rem;
  min-height: 5rem;
  border-bottom: 1px solid #ffffff26;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font: 700 1rem / 1.2 var(--mono);
  text-decoration: none;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-no { padding: .35rem; border: 1px solid #e8c9a4; color: #e8c9a4; }
.top-nav { display: flex; align-items: center; gap: 1.15rem; font-size: .9rem; }
.top-nav form { margin: 0; }

.nav-button {
  color: inherit;
  padding: .25rem 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .22em;
}

main { padding-block: clamp(1rem, 4vw, 3.5rem) 3rem; }

.paper {
  color-scheme: light;
  min-width: 0;
  padding: clamp(1.15rem, 4vw, 3.25rem);
  background: linear-gradient(155deg, #f8eedc, var(--paper));
  color: var(--ink);
  border-top: 4px solid var(--accent);
  box-shadow: 0 1rem 2.5rem #130d0970;
}

.paper a:not(.button) { color: var(--accent-hover); }
.login, .questionnaire { max-width: 45rem; margin-inline: auto; }
.login { max-width: 32rem; }
.report { max-width: 60rem; margin-inline: auto; }

.eyebrow {
  color: var(--accent-hover);
  font: 700 .79rem / 1.45 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.14;
  overflow-wrap: anywhere;
}

h1 { margin: .55rem 0 1rem; font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { margin: .65rem 0 .5rem; font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { margin: 0; font-size: 1.2rem; }
.questionnaire h1 { font-size: clamp(1.75rem, 4.5vw, 2.8rem); }
.block-name { margin: 1.1rem 0 0; font-weight: 650; color: var(--muted); }
.lede { max-width: 58ch; color: var(--muted); margin: 0 0 1.4rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.stack { display: grid; gap: 1rem; }
.stack label { display: grid; gap: .35rem; font-weight: 600; }
.compact-form { max-width: 24rem; }

.stack input {
  width: 100%;
  min-height: 2.8rem;
  padding: .5rem .7rem;
  border: 1px solid #877861;
  border-radius: .15rem;
  background: #fff9ee;
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: .65rem;
  min-height: 2.85rem;
  padding: .55rem .95rem;
  border: 1px solid transparent;
  border-radius: .15rem;
  background: var(--accent);
  color: #fff9ef;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { background: var(--accent-hover); }
.notice { padding: .7rem .85rem; border-left: 3px solid var(--accent); background: #e8d9bd; }

.progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .4rem 1rem;
  max-width: 30rem;
  margin: 1rem 0 1.3rem;
  color: var(--muted);
  font: 700 .82rem / 1.35 var(--mono);
}

progress {
  grid-column: 1 / -1;
  width: 100%;
  height: .5rem;
  border: 0;
  border-radius: 1rem;
  background: #d8cbb1;
  accent-color: var(--accent);
  overflow: hidden;
}

progress::-webkit-progress-bar { background: #d8cbb1; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }

fieldset { display: grid; gap: .55rem; min-width: 0; margin: 1.3rem 0; padding: 0; border: 0; }

.option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: .7rem;
  padding: .85rem .9rem;
  background: #fff9ee;
  border: 1px solid var(--rule);
  border-radius: .15rem;
  cursor: pointer;
}

.option input { margin: 0; accent-color: var(--accent); }
.option:hover { border-color: #877861; }
.option:has(:checked) { border-color: var(--accent); background: #f2dfcf; }
.option-skip { color: var(--muted); }
.actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem 1.25rem; }
.report-actions { justify-content: flex-start; margin-bottom: 1.6rem; }
.quiet { display: inline-flex; align-items: center; min-height: 2.5rem; }
.question-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; margin-top: 1.45rem; border-top: 1px solid var(--rule); padding-top: .85rem; }
.question-footer .progress { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 1.5rem 0; }
.stats > div { border: 1px solid var(--rule); background: #fff9ee; padding: .65rem .75rem; }
.stats dt { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.stats dd { margin: 0; font: 700 clamp(1.35rem, 3vw, 2rem) / 1.4 var(--mono); }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .65rem .5rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
th small { display: block; color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
tbody th { overflow-wrap: anywhere; }
.result-section { margin-top: 1.85rem; padding-top: .7rem; border-top: 1px solid var(--rule); }
.answer-list, .tally { list-style: none; padding: 0; }
.answer-list li { display: grid; gap: .2rem; padding: .55rem 0; }
.answer-list li span { color: var(--muted); }
.group-card { background: #fff9ee; border: 1px solid var(--rule); margin: .8rem 0; padding: .85rem 1rem; }
.group-card p { margin: .25rem 0 .55rem; }
.tally { margin: 0; }
.tally li { display: flex; justify-content: space-between; gap: .75rem; padding: .28rem 0; }

@media (max-width: 24rem) {
  .question-footer { grid-template-columns: 1fr; }
}

.portrait-frame {
  padding: .42rem .42rem .68rem;
  background: #f5ead4;
  box-shadow: 0 .25rem .55rem #35251445;
}

.portrait-image, .portrait-placeholder {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 6 / 7;
  background: #d9c7a8;
}

.portrait-image { object-fit: cover; object-position: center 38%; }
.portrait-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  padding: .4rem;
  color: #655139;
  text-align: center;
  font: 700 .75rem/1.3 "Courier New", monospace;
}

.portrait-placeholder svg { width: 52%; max-height: 67%; }
.photo-editor {
  display: grid;
  grid-template-columns: minmax(6.75rem, 10rem) minmax(0, 1fr);
  align-items: start;
  gap: 1rem 1.35rem;
  margin-top: 1rem;
}

.photo-editor .stack input { padding: .4rem; }
.photo-editor .field-hint { margin: -.4rem 0 0; color: var(--muted); font-size: .9rem; }

.quiet-button {
  min-height: 2.75rem;
  padding: .35rem 0;
  border: 0;
  background: none;
  color: var(--accent-hover);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .22em;
}

@media (max-width: 25rem) {
  .photo-editor { grid-template-columns: minmax(0, 1fr); }
  .photo-editor > .portrait-frame { width: min(100%, 9rem); }
}
/* Participant identity assets in the organizer's dossier. */
.nameplate-preview { width:min(100%,360px); min-height:80px; padding:16px; margin-bottom:18px; box-sizing:border-box; background:repeating-conic-gradient(#e7dfd1 0 25%,#f7f1e7 0 50%) 0/16px 16px; border:1px solid #c6b596; }
.nameplate-preview img { display:block; width:100%; max-height:100px; object-fit:contain; object-position:left center; }
.admin-person-polaroid { width:216px; max-width:100%; padding:7px 7px 0; box-sizing:border-box; background:#fffdf6; box-shadow:1px 3px 10px #37271130; }
.admin-person-polaroid .portrait-frame { width:100%; max-width:100%; padding:0; box-shadow:none; }
.admin-person-note { min-height:32px; padding:10px 6px 13px; white-space:pre-wrap; overflow-wrap:anywhere; text-align:center; background:#fffdf6; color:#392c1f; font:italic 15px/1.3 Georgia,serif; }

.activation-check { display:flex !important; align-items:center; gap:10px; }.activation-check input[type=checkbox] { width:20px; height:20px; min-height:20px; margin:0; flex:none; accent-color:#843f30; }
