:root {
  --ink: #182a3b;
  --paper: #f5f3ed;
  --muted: #627080;
  --purple: #6c497d;
  --border: #dce0e1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.6 system-ui,
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #a37eb3;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  color: var(--ink);
  border-radius: 7px;
  padding: 10px 16px;
  min-height: 44px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
}
.dev {
  text-align: center;
  background: #e7ddc9;
  padding: 7px;
  font-size: 12px;
  letter-spacing: 0.03em;
}
header {
  height: 86px;
  display: flex;
  align-items: center;
  padding: 0 36px;
  gap: 35px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  gap: 6px;
  align-items: baseline;
  text-decoration: none;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -1px;
}
.brand span {
  font-size: 12px;
  letter-spacing: 2px;
}
.badge {
  font-size: 12px;
  border: 1px solid #dcd4e5;
  background: #f0ebf3;
  padding: 4px 9px;
  border-radius: 20px;
}
header > .badge {
  margin-left: auto;
}
.shell {
  display: grid;
  grid-template-columns: 228px 1fr;
  min-height: calc(100vh - 120px);
}
aside {
  background: #182a3b;
  color: white;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
aside .label {
  color: #abbbca;
  margin: 0 14px 18px;
}
nav {
  display: grid;
  gap: 7px;
}
nav button {
  color: #dbe3ec;
  background: transparent;
  border: 0;
  text-align: left;
}
nav button[aria-current="page"] {
  background: #ffffff17;
  color: #f0d9ab;
}
.aside-note {
  margin-top: auto;
  padding: 70px 14px 10px;
  font-size: 13px;
  color: #b9c6d1;
}
.aside-note strong {
  font:
    28px/1.2 Georgia,
    serif;
  color: #eee4d3;
}
.aside-note a {
  font-size: 12px;
}
.aside-note p {
  margin: 20px 0;
}
main {
  padding: 32px 5%;
  max-width: 1600px;
  width: 100%;
}
.label {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 750;
  color: var(--purple);
}
h1 {
  font:
    clamp(32px, 4vw, 52px)/1.1 Georgia,
    serif;
  letter-spacing: -1.8px;
  margin: 12px 0 18px;
}
h2 {
  font:
    26px/1.25 Georgia,
    serif;
  letter-spacing: -0.5px;
  margin: 12px 0;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
  margin: 12px 0 5px;
}
p {
  margin: 8px 0 16px;
}
.intro {
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 32px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 25px 0 40px;
}
.stats article {
  padding: 25px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.stats span {
  font-size: 12px;
  color: var(--muted);
  display: block;
}
.stats strong {
  display: block;
  font-size: 40px;
  line-height: 1.4;
}
.stats strong.date {
  font-size: 24px;
  margin-top: 15px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  align-content: start;
}
.event-card {
  text-align: left;
  padding: 24px;
  box-shadow: 0 8px 24px #14233306;
}
.event-card span:last-child {
  font-size: 12px;
  color: var(--purple);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}
.card {
  padding: 26px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
  min-width: 0;
}
.card > button {
  margin: 6px 6px 6px 0;
}
.callout {
  margin: 28px 0;
  padding: 28px;
  background: #eae6ec;
  border-radius: 12px;
}
.callout p {
  max-width: 780px;
}
.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.quiet {
  background: transparent;
}
.empty {
  border: 1px dashed #b4bdc4;
  padding: 25px;
  border-radius: 9px;
  color: var(--muted);
  margin: 20px 0;
}
form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #b6c0c9;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  min-height: 44px;
}
textarea {
  resize: vertical;
}
small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  overflow-wrap: anywhere;
}
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eceff1;
}
.check input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--purple);
}
.check small {
  margin-left: 8px;
  color: var(--purple);
}
.cue {
  display: flex;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #eceff1;
  flex-wrap: wrap;
}
.cue small {
  display: block;
  flex-basis: 100%;
}
.cue time {
  color: var(--purple);
  font-weight: 750;
}
.cue p {
  font-size: 13px;
  margin-bottom: 0;
}
.activity {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.notes {
  white-space: pre-wrap;
}
#notice:empty {
  display: none;
}
#notice {
  padding: 12px 18px;
  margin-bottom: 20px;
  border-radius: 7px;
}
.error {
  background: #fbe2df;
  color: #72241c;
}
.success {
  background: #e2eee4;
  color: #254c2c;
}
.skip {
  position: absolute;
  inset-inline-start: 20px;
  top: 0;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
  top: 20px;
  background: white;
  padding: 15px;
  z-index: 10;
}
@media (max-width: 900px) {
  header {
    padding: 15px;
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 10px;
  }
  aside > .label,
  .aside-note {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav button {
    white-space: nowrap;
  }
  main {
    padding: 25px 18px;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .stats {
    gap: 8px;
  }
  .stats article {
    padding: 14px;
  }
  .stats strong {
    font-size: 30px;
  }
  header > .badge {
    margin-left: 0;
  }
  .section-title {
    align-items: start;
    flex-wrap: wrap;
  }
}
.event-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.event-tabs [aria-current="page"] {
  background: var(--ink);
  color: white;
}
.preparation-status {
  padding: 18px 22px;
  border-radius: 10px;
  margin: 20px 0 30px;
}
.needs-review {
  background: #f1e7d5;
}
.clear {
  background: #e2eee4;
}
.preparation-status p {
  font-size: 12px;
  margin: 8px 0;
}
.warning {
  background: #fae5d8;
  color: #6e3823;
}
.run-sheet {
  max-width: 1000px;
}
.run-sheet h1 {
  font-size: 36px;
}
.run-sheet h2 {
  margin-top: 30px;
}
.run-sheet p {
  overflow-wrap: anywhere;
}
.run-sheet .no-print {
  border-bottom: 1px solid var(--border);
  margin-bottom: 25px;
}
details summary {
  cursor: pointer;
  min-height: 32px;
}
#band-form label {
  margin-bottom: 18px;
}
@media print {
  .dev,
  body > header,
  .shell > aside,
  .no-print,
  #notice,
  .skip {
    display: none !important;
  }
  .shell {
    display: block;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .run-sheet {
    border: 0;
    padding: 0;
    max-width: none;
  }
  .run-sheet h1 {
    font-size: 24pt;
  }
  .run-sheet h2 {
    font-size: 17pt;
    break-after: avoid;
  }
  .run-sheet .cue,
  .run-sheet p {
    break-inside: avoid;
  }
  body,
  .run-sheet {
    background: white;
    color: black;
    font-size: 10pt;
  }
  a {
    color: black;
  }
  .badge {
    border: 1px solid #888;
  }
  .run-sheet .label {
    color: black;
  }
  .run-sheet time {
    color: black;
  }
}
.sign-in {
  max-width: 760px;
  margin: 7vh auto;
  padding: 32px;
}
.sign-in-button {
  display: inline-block;
  background: var(--ink);
  color: white;
  padding: 16px 25px;
  border-radius: 8px;
  text-decoration: none;
  margin: 25px 0;
}
header #logout-form {
  margin: 0;
}
header [hidden] {
  display: none;
}
.sign-in .intro {
  margin-top: 25px;
}

#schedule-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
#schedule-filter button { width: auto; }
@media (max-width: 800px) {
  #schedule-filter { grid-template-columns: 1fr; }
}

.mapping-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
@media(max-width:800px) { .mapping-grid { grid-template-columns:1fr; } }

/* Provenance and message text must remain readable on narrow screens. */
pre.notes { font:inherit; overflow-wrap:anywhere; white-space:pre-wrap; }
.activity summary { cursor:pointer; overflow-wrap:anywhere; padding-block:.4rem; }

.cue-console-current { background:var(--ink);color:white;padding:clamp(20px,4vw,48px);border-radius:16px;margin-block:20px; }
.cue-console-current h2 { font-family:Georgia,serif;font-size:clamp(2rem,5vw,4rem);line-height:1.1;overflow-wrap:anywhere; }
.cue-console-current .label { color:#e9dba9; }
.cue-console-current p { color:inherit; }
.cue-complete { min-height:64px;font-size:1.1rem; }

.session-recovery { border:2px solid #8a5b14;background:#fff4da;color:#382708;padding:20px;border-radius:14px;margin-bottom:20px; }
.session-recovery[hidden] { display:none; }
.session-recovery a { color:inherit;font-weight:700; }

/* Grid items must shrink instead of widening the page around long names/menus. */
.shell > aside, .shell > main, .two > *, .mapping-grid > * { min-width:0; }
@media(max-width:900px) { nav { max-width:100%; } nav button { flex:0 0 auto;width:auto; } }
main h1, .card h2, .card h3 { overflow-wrap:anywhere; }
/* Locale controls and descriptions are available without hover, including on touch. */
.locale-picker{display:inline-flex;align-items:center;gap:.4rem;margin-inline-start:auto;font-size:.8rem}.locale-picker select{width:auto;max-width:11rem;padding:.4rem}.locale-picker span{font-size:.75rem}.help-mode-toggle{font-size:.75rem;padding:.5rem .65rem}.help-mode-toggle[aria-pressed="true"]{outline:3px solid var(--accent,#c7b5ff)}.control-help-popup{position:fixed;inset-inline:1rem;bottom:1rem;z-index:10000;max-width:48rem;margin-inline:auto;padding:1rem 1.2rem;border:1px solid #bca8f7;border-radius:.8rem;background:#201d35;color:#fff;box-shadow:0 8px 40px #0008;font-size:.9rem;line-height:1.5;pointer-events:auto}.control-help-popup[hidden]{display:none}.disabled-control-help{display:inline-flex;max-width:100%}.disabled-control-help:focus-visible{outline:3px solid #bca8f7;outline-offset:3px}html[dir="rtl"] .brand{direction:ltr;unicode-bidi:isolate}body{text-align:start}@media(max-width:600px){header{flex-wrap:wrap}.locale-picker{margin-inline-start:0}.locale-picker select{max-width:10rem}.control-help-popup{inset-inline:.5rem;bottom:.5rem;padding:.75rem}}
