:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24211c;
  background: #f5f3ee;
  font-size: 17px;
  line-height: 1.55;
  --muted: #635e56;
  --border: #d7d1c7;
  --accent: #9a3710;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #87320f; text-underline-offset: .2em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, summary, a { touch-action: manipulation; }
button { min-height: 48px; padding: .75rem 1.15rem; border: 1px solid #24211c; border-radius: 10px; background: #24211c; color: white; cursor: pointer; font-weight: 600; }
button:hover { background: #484138; }
button.secondary { color: #24211c; background: transparent; border-color: var(--border); }
button.secondary:hover { background: #e9e4da; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid #a23e16; outline-offset: 4px; }
.site-header { max-width: 1080px; margin: auto; padding: 1.2rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border); }
.brand { color: #24211c; font-weight: 700; text-decoration: none; }
.site-header > a:last-child { font-size: .9rem; }
main { max-width: 900px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; min-height: 65vh; }
footer { max-width: 900px; margin: auto; padding: 1rem 1.5rem 2.5rem; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--border); }
h1 { margin: .5rem 0 1rem; line-height: 1.18; font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.035em; font-weight: 700; }
h2 { margin: 0 0 .6rem; font-size: 1.35rem; line-height: 1.3; }
h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
p { margin: .65rem 0 1rem; }
.lead { font-size: 1.1rem; color: #49443d; max-width: 45rem; }
.hint, figcaption { color: var(--muted); font-size: .9rem; }
form { padding: 1.25rem; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 650; margin-bottom: .4rem; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-width: 0; min-height: 48px; padding: .65rem .8rem; color: #24211c; border: 1px solid #9b9388; border-radius: 7px; background: white; }
input[type="file"] { font-size: .95rem; padding: .7rem; }
input[type="file"]::file-selector-button { min-height: 38px; padding: .3rem .7rem; margin-right: .7rem; border: 1px solid #afa89b; border-radius: 6px; background: #f5f3ee; font: inherit; cursor: pointer; }
textarea { resize: vertical; }
.checkbox { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: 1rem; }
.checkbox input { margin-top: .4rem; width: 22px; height: 22px; flex: 0 0 22px; accent-color: #9a3710; }
.notice { padding: 1rem 1.1rem; border-left: 4px solid #b66a12; border-radius: 4px; background: #fff0d6; color: #563909; }
.notice.error { background: #fff0ec; border-color: #b12f18; color: #7b2113; }
#notice:empty { display: none; }
.progress { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.5rem; font-size: .88rem; color: var(--muted); }
.progress p { margin: 0; }
.progress strong { color: #24211c; text-align: right; }
.selection { border-left: 3px solid var(--accent); padding-left: .75rem; }
.instruction { padding: 1.3rem; margin: 1.3rem 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.eyebrow { font-size: .85rem; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .7rem; }
img, video { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.instruction img { max-height: 65vh; width: 100%; object-fit: contain; margin-top: 1rem; background: #f5f3ee; }
.example { margin: 1.4rem 0; }
.example img { width: 100%; border: 1px solid var(--border); }
figcaption { margin-top: .6rem; }
.installer { background: #fff2df; border: 1px solid #d8b68c; border-radius: 10px; padding: 1rem; margin: 1rem 0; }
.installer p { margin-top: 0; }
.installer code { display: block; font-size: 1.2rem; overflow-wrap: anywhere; user-select: all; }
.support { margin: 2rem 0; padding: 1.1rem 0; border-top: 1px solid var(--border); }
.support h2 { font-size: 1.05rem; }
.support p { font-size: .95rem; }
.support ul { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; padding-left: 1.2rem; }
.journal, .stop, .return-help { margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; }
summary { cursor: pointer; font-weight: 650; }
.journal[open] > summary, .stop[open] > summary, .return-help[open] > summary { margin-bottom: 1rem; }
.facts, .event-data { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr); gap: .3rem 1rem; font-size: .95rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.events { padding-left: 1.3rem; }
.events > li { border-bottom: 1px solid var(--border); padding: .6rem 0; }
.events time { display: block; font-size: .82rem; color: var(--muted); }
.events strong { font-size: .95rem; }
.event-data { font-size: .85rem; }
.event-data .event-data { display: block; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; margin: 1.2rem 0; }
.media-card { min-width: 0; padding: 1rem; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.media-card img { width: 100%; max-height: 280px; object-fit: contain; background: #f5f3ee; }
.media-card video { width: 100%; max-height: 320px; }
.media-card p { font-size: .9rem; }
.badge { display: inline-block; margin: .7rem 0 .2rem; padding: .2rem .55rem; background: #eeeae3; border-radius: 5px; font-size: .82rem !important; }
.badge.accepted { color: #1d573a; background: #e7f3e9; }
.badge.rejected, .badge.error { color: #7b2113; background: #fff0ec; }
.session-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.7rem 0 0; }
.session-actions > p { flex-basis: 100%; }
.runs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.run-summary { background: #fff; padding: 1.2rem; border-radius: 12px; border: 1px solid var(--border); }
.run-summary .facts { grid-template-columns: 1fr 1fr; }
.selected-run { margin-top: 1.5rem; }
.skip { position: absolute; left: -10000px; top: 0; }
.skip:focus { position: fixed; left: 1rem; top: 1rem; padding: .8rem; background: white; z-index: 10; }
.review-banner { margin: 0 0 2rem; padding: 1.2rem; border: 3px solid #955300; border-radius: 12px; background: #fff1c9; color: #4d3000; }
.review-banner > strong { display: block; font-size: 1.08rem; line-height: 1.3; }
.review-banner p { font-size: .92rem; margin: .7rem 0; }
.review-banner nav { display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; font-weight: 600; }
.review-banner a { color: #684000; }
.review-table { overflow-x: auto; }
.review-table table { width: 100%; border-collapse: collapse; background: white; }
.review-table td, .review-table th { text-align: left; vertical-align: top; padding: 1rem; border-bottom: 1px solid var(--border); }
.review-table th { min-width: 10rem; }
#app { container: screen / inline-size; }
@media (max-width: 540px) {
  main { padding: 1.2rem 1rem 2rem; }
  .site-header { padding: 1rem; align-items: flex-start; }
  .site-header a { max-width: 60%; }
  .site-header > a:last-child { text-align: right; }
}
@container screen (max-width: 508px) {
  h1 { font-size: 1.8rem; }
  .progress { flex-direction: column; align-items: flex-start; }
  .progress strong { text-align: left; }
  form, .instruction { padding: 1rem; }
  form > button { width: 100%; }
  .facts, .event-data { grid-template-columns: 1fr; gap: .1rem; }
  dd { margin-bottom: .6rem; }
  .journal, .stop, .return-help { padding: .8rem; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .15s; }
}
