:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5e6862;
  --line: #d7ddd8;
  --paper: #fff;
  --wash: #f7f7f4;
  --brand: #075f50;
  --brand-dark: #064b40;
  --soft: #e8f3ef;
  --danger: #b42318;
  --focus: #f2b705;
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--wash); }
body, button, input, select, textarea { font: inherit; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { min-height: 2.75rem; }
button, .button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 20ch; margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.08; letter-spacing: -.035em; }
h2 { margin-bottom: .75rem; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2; letter-spacing: -.02em; }
h3 { margin-bottom: .35rem; font-size: 1.08rem; line-height: 1.3; }
footer { max-width: 78rem; margin: 3rem auto 0; padding: 1.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.shell { min-height: 100vh; }
.shell > main, .shell > section { width: min(100% - 2rem, 52rem); margin-inline: auto; }
.shell.wide > main, .shell.wide > section { width: min(100% - 2rem, 78rem); }
.site-head { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; width: min(100% - 2rem, 78rem); margin: auto; border-bottom: 1px solid var(--line); }
.site-head nav { display: flex; gap: 1.25rem; }
.site-head a { color: var(--ink); text-decoration: none; }
.brand { font-weight: 760; letter-spacing: -.02em; }
.site-head nav a { font-size: .94rem; }
.intro { padding-block: clamp(3.5rem, 8vw, 7rem); }
.intro .lede { max-width: 48rem; }
.eyebrow { margin-bottom: .55rem; color: var(--brand); font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.lede { max-width: 60ch; color: #3d4942; font-size: clamp(1.08rem, 2vw, 1.3rem); }
.section { padding-block: 2.75rem; border-top: 1px solid var(--line); }
.section-head, .moderator-head { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.4rem; }
.section-head h2, .moderator-head h1 { margin-bottom: 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.row.grow > input { flex: 1 1 12rem; }
.stack { display: grid; gap: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.code, code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .65rem 1rem; border: 1px solid var(--brand); border-radius: .25rem; color: #fff; background: var(--brand); font-weight: 680; line-height: 1.2; text-decoration: none; }
button:hover, .button:hover { border-color: var(--brand-dark); color: #fff; background: var(--brand-dark); }
.secondary, .ghost { border-color: #9aa59f; color: var(--ink); background: transparent; }
.secondary:hover, .ghost:hover { border-color: var(--ink); color: var(--ink); background: #eef0ed; }
.compact { min-height: 2.2rem; padding: .35rem .65rem; font-size: .84rem; }
.text-button { min-height: 2rem; padding: .2rem .1rem; border: 0; color: var(--brand); background: transparent; font-size: .86rem; font-weight: 650; }
.text-button:hover { color: var(--brand-dark); background: transparent; text-decoration: underline; }
.danger, .danger-button { color: var(--danger); }
.danger-button { border-color: #e6a9a3; background: transparent; }
.danger-button:hover { border-color: var(--danger); color: #fff; background: var(--danger); }
.event-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.event-card { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: start; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.event-date { color: var(--brand); font-size: 1.15rem; font-weight: 760; }
.event-card h3 { margin-top: .45rem; }
.event-card h3 a { color: var(--ink); text-decoration: none; }
.event-card p { max-width: 60ch; margin-bottom: .45rem; }
.arrow-link { align-self: center; font-weight: 700; }
.status-tag { display: inline-flex; align-items: center; width: max-content; padding: .18rem .48rem; border-radius: 999px; color: #425049; background: #e7eae7; font-size: .75rem; font-weight: 720; white-space: nowrap; }
.status-tag.open, .status-tag.answered { color: #075544; background: #d9eee7; }
.status-tag.reported { color: #8d2018; background: #fbe4e1; }
.guide-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4rem; margin-top: 1.5rem; }
.guide-grid article { padding-top: .8rem; border-top: 3px solid var(--brand); }
.guide-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.guide-link { margin: 1.5rem 0 0; font-weight: 700; }
.guide-page { padding-bottom: 3rem; }
.guide-intro { padding-block: clamp(3rem, 7vw, 6rem); }
.guide-intro .lede { max-width: 50rem; }
.guide-role-nav { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.guide-role-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .55rem .85rem; border: 1px solid #9aa59f; border-radius: .2rem; color: var(--ink); background: var(--paper); font-weight: 680; text-decoration: none; }
.guide-role-nav a:hover { border-color: var(--brand); color: var(--brand); }
.service-boundary { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); padding: 2rem; border-top: 4px solid var(--brand); background: var(--soft); }
.service-boundary h2 { margin-bottom: .55rem; }
.service-boundary p { margin-bottom: 0; }
.service-boundary dl { display: grid; gap: 1rem; margin: 0; }
.service-boundary dt { color: var(--brand); font-size: .8rem; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.service-boundary dd { margin: .2rem 0 0; font-weight: 650; }
.guide-block { scroll-margin-top: 1rem; display: grid; grid-template-columns: minmax(14rem, .65fr) minmax(0, 1.35fr); column-gap: clamp(2rem, 6vw, 5rem); padding-block: clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--line); }
.guide-block > header { align-self: start; position: sticky; top: 1rem; }
.guide-block > header .button, .guide-block > header .path-example { margin-top: .5rem; }
.path-example { display: inline-block; padding: .65rem .8rem; border: 1px solid var(--line); background: var(--paper); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.task-list { margin: 0; padding: 0; list-style: none; counter-reset: guide-task; }
.task-list > li { counter-increment: guide-task; padding: 0 0 1.45rem; }
.task-list > li + li { padding-top: 1.45rem; border-top: 1px solid var(--line); }
.task-list h3 { font-size: 1.12rem; }
.task-list p { max-width: 65ch; margin-bottom: 0; color: #3d4942; }
.anchor-target { position: relative; top: -5rem; }
.recovery { grid-column: 2; margin-top: 1rem; border: 1px solid #bbc4be; background: var(--paper); }
.recovery summary { min-height: 2.75rem; padding: .75rem 1rem; color: var(--brand); font-weight: 720; cursor: pointer; }
.recovery ul { margin: 0; padding: 0 1.25rem 1rem 2.25rem; }
.recovery li + li { margin-top: .55rem; }
.data-guide { display: block; max-width: 58rem; border-bottom: 0; }
.data-guide p:last-child { max-width: 70ch; font-size: 1.08rem; }
.form-page, .panel { padding: clamp(1.4rem, 4vw, 2.5rem); border: 1px solid var(--line); background: var(--paper); }
.form-page { margin-block: 3rem; }
.compact-form { max-width: 30rem; margin-inline: auto; }
label { display: grid; gap: .38rem; font-weight: 680; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; padding: .65rem .75rem; border: 1px solid #8a958f; border-radius: .2rem; color: var(--ink); background: #fff; }
textarea { min-height: 7rem; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.notice, .empty, .loading { padding: 1rem; border-left: 4px solid #7c8982; background: #ecefeb; }
.notice.success { border-color: var(--brand); background: var(--soft); }
.empty, .loading { margin-block: 1.5rem; border: 1px dashed #aeb7b1; text-align: center; }
.link-line, .code-row { display: grid; grid-template-columns: 6rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.link-line a { overflow-wrap: anywhere; }
.qr { display: block; width: min(100%, 20rem); padding: .5rem; background: #fff; }
.event-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(15rem, .75fr); gap: clamp(2rem, 6vw, 5rem); padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.event-hero h1 { margin-top: .7rem; }
.event-facts { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; margin: 2rem 0 0; }
.event-facts dt { margin-bottom: .2rem; color: var(--muted); font-size: .8rem; font-weight: 720; text-transform: uppercase; }
.event-facts dd { margin: 0; font-weight: 650; }
.next-action { align-self: start; padding: 1.25rem; border-top: 4px solid var(--brand); background: var(--paper); }
.next-action .button { width: 100%; }
.next-action p:last-child { margin: .8rem 0 0; }
.room-area { padding-bottom: 3rem; }
.tabs { display: flex; gap: 1.5rem; margin: 0 0 1rem; border-bottom: 1px solid var(--line); }
.tabs button { padding: .8rem 0; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); background: transparent; }
.tabs button:hover, .tabs button.active { color: var(--ink); background: transparent; border-bottom-color: var(--brand); }
.composer { display: grid; gap: .65rem; margin-bottom: 1.4rem; padding: 1rem; border: 1px solid var(--line); background: var(--paper); }
.composer-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .7rem; }
.composer-row textarea { min-height: 5rem; }
.composer-actions { display: flex; gap: .7rem; }
.composer-actions input { flex: 1; }
.thread-list { border-top: 1px solid var(--line); }
.thread { position: relative; margin-left: calc(min(var(--depth), 4) * 1.25rem); border-left: calc(min(var(--depth), 4) * 2px) solid transparent; }
.thread[style*="--depth:1"], .thread[style*="--depth:2"], .thread[style*="--depth:3"], .thread[style*="--depth:4"], .thread[style*="--depth:5"], .thread[style*="--depth:6"] { border-left-color: #d8deda; }
.post { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .75rem; padding: 1rem .35rem; border-bottom: 1px solid var(--line); background: transparent; }
.post.pinned { box-shadow: inset 4px 0 var(--brand); background: var(--soft); }
.post.hidden { opacity: .62; }
.post-body { min-width: 0; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; color: var(--muted); font-size: .8rem; }
.post-meta strong { color: var(--ink); }
.post-text { margin-top: .4rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.post-link { display: block; max-width: 100%; margin-top: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.vote { display: grid; align-content: center; gap: .05rem; align-self: start; min-width: 3rem; min-height: 3rem; padding: .3rem; border-color: var(--line); color: var(--muted); background: transparent; }
.vote:hover, .vote.active { border-color: var(--brand); color: var(--brand); background: var(--soft); }
.vote span { font-size: .65rem; }
.post-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: .55rem; }
.answer { margin-top: .75rem; padding: .65rem .8rem; border-left: 3px solid var(--brand); background: var(--soft); white-space: pre-wrap; }
.reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; flex-basis: 100%; }
.reply-form textarea { min-height: 4rem; }
.moderator-head { padding-block: 2rem 1rem; }
.moderator-head h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.host-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(19rem, .8fr); gap: 1.5rem; padding-block: 2rem; }
.host-tools { display: grid; align-content: start; gap: 1rem; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.admin-section { min-width: 0; padding: 1rem; border: 1px solid var(--line); background: var(--paper); }
.admin-section .section-head { margin-bottom: .5rem; }
.admin-section h2 { font-size: 1.15rem; }
.admin-event { display: grid; gap: .6rem; padding: .8rem 0; border-top: 1px solid var(--line); }
dialog { width: min(100% - 2rem, 38rem); padding: 1.5rem; border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgb(10 20 15 / .55); }
#toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 10; max-width: min(25rem, calc(100% - 2rem)); padding: .8rem 1rem; color: #fff; background: #17211c; transform: translateY(8rem); transition: transform .18s ease; }
#toast.show { transform: translateY(0); }
.presenter { min-height: 100vh; color: #fff; background: #101713; }
.presenter-inner { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; padding: clamp(1.25rem, 3vmin, 3rem) clamp(1.5rem, 5vw, 5rem); }
.presenter-header { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 2vmin; border-bottom: 1px solid #47534c; color: #d9e2dc; font-size: clamp(.9rem, 1.7vmin, 1.35rem); }
.presenter-code { font-family: ui-monospace, monospace; letter-spacing: .12em; }
.presenter-current, .presenter-empty { display: flex; flex-direction: column; justify-content: center; min-height: 0; padding-block: 3vmin; }
.presenter-kicker { margin-bottom: 2vmin; color: #79d5bd; font-size: clamp(.9rem, 1.8vmin, 1.5rem); font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.presenter-question { max-width: 24ch; font-size: clamp(2.2rem, 6.4vmin, 6rem); font-weight: 720; line-height: 1.08; letter-spacing: -.035em; overflow-wrap: anywhere; }
.presenter-question.long { max-width: 34ch; font-size: clamp(1.65rem, 4.5vmin, 4rem); }
.presenter-meta { display: flex; gap: 2rem; margin-top: 3vmin; color: #dbe4de; font-size: clamp(1.05rem, 2.5vmin, 2rem); }
.presenter-answer { max-width: 60ch; margin-top: 3vmin; padding: 2vmin 2.5vmin; border-left: .45vmin solid #79d5bd; color: #eef5f0; background: #1c2922; font-size: clamp(1rem, 2.2vmin, 1.8rem); white-space: pre-wrap; }
.presenter-empty { align-items: center; text-align: center; }
.presenter-empty h1 { max-width: 20ch; font-size: clamp(2.5rem, 7vmin, 6rem); }
.inverse { color: #fff; background: #101713; }
@media (max-width: 900px) {
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .host-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .shell > main, .shell > section, .shell.wide > main, .shell.wide > section, .site-head { width: min(100% - 1.25rem, 52rem); }
  .site-head nav { gap: .8rem; }
  .site-head nav a:first-child { display: none; }
  .site-head nav a { font-size: .86rem; }
  .intro { padding-block: 3rem; }
  .section { padding-block: 2rem; }
  .event-card { grid-template-columns: 3.5rem minmax(0, 1fr); gap: .8rem; }
  .event-card .arrow-link { display: none; }
  .event-card-body .row .small { flex-basis: 100%; }
  .guide-grid, .form-grid, .event-facts, .admin-grid { grid-template-columns: 1fr; }
  .service-boundary, .guide-block { grid-template-columns: 1fr; }
  .service-boundary { gap: 1.5rem; padding: 1.25rem; }
  .guide-block > header { position: static; margin-bottom: 2rem; }
  .recovery { grid-column: 1; }
  .event-hero { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 2.3rem; }
  .next-action { position: sticky; bottom: .5rem; z-index: 2; box-shadow: 0 2px 10px rgb(0 0 0 / .12); }
  .form-page, .panel { padding: 1.1rem; }
  .form-page { margin-block: 1.5rem; }
  .composer-row { grid-template-columns: 1fr; }
  .composer-actions { align-items: stretch; flex-direction: column; }
  .thread { margin-left: calc(min(var(--depth), 2) * .65rem); }
  .post { grid-template-columns: 2.8rem minmax(0, 1fr); gap: .5rem; }
  .reply-form { grid-template-columns: 1fr; }
  .moderator-head, .section-head { align-items: start; flex-direction: column; }
  .moderator-head > .row, .moderator-head > .row > * { width: 100%; }
  .link-line { grid-template-columns: 1fr auto; }
  .link-line strong { grid-column: 1 / -1; }
  .link-line a, .link-line code { min-width: 0; }
}
@media (max-aspect-ratio: 4/5) {
  .presenter-question { font-size: clamp(2rem, 7vw, 4.5rem); }
  .presenter-question.long { font-size: clamp(1.45rem, 5.2vw, 3rem); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .presenter-inner { padding-block: 1rem; }
  .presenter-current { padding-block: 1rem; }
  .presenter-question { font-size: clamp(1.6rem, 8vh, 3rem); }
  .presenter-answer { margin-top: 1rem; font-size: clamp(.9rem, 3.5vh, 1.3rem); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #toast { transition: none; }
}
