/* Version: v1.0.0001
   CHANGELOG: Add configurable group colors for screen and print. Initial shared workspace, participant timeline and print styles. */
:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg2: #0f1117;
  --bg3: #161820;
  --white: #f2f0eb;
  --muted: #b1b4bd;
  --accent: #f0b429;
  --border: #343841;
  --display: Syne, Inter, system-ui, sans-serif;
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--white); }
body:has(.topbar) { padding-top: 80px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.14; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .5rem 0 1rem; }
h2 { margin: 1rem 0 .8rem; }
a { color: #ffd877; text-underline-offset: .2em; }
input, select, textarea, button, .button { font: inherit; }
input:not([type=checkbox], [type=radio]), select, textarea {
  max-width: 100%; padding: .62rem .72rem; color: var(--white); background: var(--bg);
  border: 1px solid #565b66; border-radius: .38rem;
}
textarea { width: 100%; min-height: 6rem; resize: vertical; }
button, .button { display: inline-block; padding: .63rem .95rem; border: 1px solid #5d626e; border-radius: .4rem;
  color: var(--white); background: var(--bg3); font-weight: 650; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { border-color: var(--accent); }
button:disabled { cursor: default; opacity: .55; }
.primary { color: #18130b; background: var(--accent); border-color: var(--accent); }
:focus-visible { outline: 3px solid #8fc5ff; outline-offset: 3px; }
main, .wrap { width: min(100% - 2rem, 70rem); margin: 1.5rem auto 4rem; }
.panel, .card { background: var(--bg2); border: 1px solid var(--border); padding: clamp(1rem, 3vw, 1.7rem); border-radius: .7rem; }
.panel + .panel, .card + .card { margin-top: 1rem; }
.muted, small { color: var(--muted); }
.error { color: #ffb6b6; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.topbar { position: fixed; inset: 0 0 auto; height: 64px; z-index: 10; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; padding: 0 clamp(1rem, 4vw, 3rem); background: var(--bg2); border-bottom: 1px solid var(--border); }
.wordmark { font: 700 1.375rem var(--display); color: var(--white); text-decoration: none; }
.sr-only { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.timetable { width: min(100%, 58rem); margin: 1rem auto 3rem; padding: clamp(1rem, 4vw, 2.5rem); border: 1px solid var(--border);
  border-top: .32rem solid var(--org-accent, var(--accent)); border-radius: .5rem; background: var(--bg2); }
.tt-identity { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-weight: 650; }
.tt-logo { display: block; width: auto; height: auto; max-height: 3.4rem; max-width: min(9rem, 50%); object-fit: contain; }
.tt-heading-line { margin-top: .8rem; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; }
.tt-heading-line h1, .tt-heading-line h2 { margin: 0; font-size: clamp(1.75rem, 5vw, 3rem); line-height: 1.06; letter-spacing: -.035em; overflow-wrap: anywhere; }
.tt-version { font-size: .9rem; font-weight: 650; white-space: nowrap; }
.tt-meta { display: flex; flex-wrap: wrap; gap: .1rem 1rem; color: var(--muted); margin: .6rem 0 0; }
.tt-meta > * { overflow-wrap: anywhere; }
.tt-notice { padding: .75rem 1rem; border-left: .25rem solid var(--org-secondary); background: var(--bg3); white-space: pre-line; }
.tt-tools { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0; }
.tt-tools[hidden] { display: none; }
.tt-tools label { display: grid; gap: .2rem; font-size: .9rem; color: var(--muted); }
.tt-tools select, .tt-print { font-size: 1rem; }
.tt-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tt-table th { color: var(--muted); text-align: left; font-size: .88rem; font-weight: 600; }
.tt-table td, .tt-table th { padding: .75rem .55rem; border-bottom: 1px solid var(--border); vertical-align: baseline; }
.tt-table td:first-child, .tt-table th:first-child { padding-left: 0; }
.tt-table td:last-child, .tt-table th:last-child { padding-right: 0; }
.tt-swatch { display:inline-block; width:.6em; height:.85em; margin-right:.4em; border-radius:.12em; background:var(--swatch); print-color-adjust:exact; -webkit-print-color-adjust:exact; }
.tt-activity { font-weight: 650; overflow-wrap: anywhere; }
.tt-note { display: block; font-size: .9em; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.tt-start, .tt-length { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tt-start { width: 6.5rem; font-weight: 600; }
.tt-table .tt-length { width: 5rem; text-align: right; color: var(--muted); }
.tt-group-name, .tt-ordinal { margin-left: .35rem; font-size: .86em; color: var(--muted); }
.tt-hold .tt-swatch { display:inline-block; width:.6em; height:.85em; margin-right:.4em; border-radius:.12em; background:var(--swatch); print-color-adjust:exact; -webkit-print-color-adjust:exact; }
.tt-activity { color: #ffc8a1; }
.tt-rules { margin-top: 1.7rem; padding-left: 1rem; border-left: .25rem solid var(--org-secondary); }
.tt-rules h3 { margin: 0 0 .6rem; }
.tt-rules dl { margin: 0; }
.tt-rules dl > div { display: flex; flex-wrap: wrap; gap: .1rem .6rem; padding: .13rem 0; }
.tt-rules dt { font-weight: 650; }
.tt-rules dd { margin: 0; color: var(--muted); }
@media screen {
  .tt-filtered { display: none !important; }
}
@media screen and (max-width: 36rem) {
  main, .wrap { width: min(100% - 1.25rem, 70rem); }
  .timetable { border-left: 0; border-right: 0; border-radius: 0; padding: 1rem .7rem; }
  .tt-heading-line { display: grid; }
  .tt-meta { font-size: .92rem; }
  .tt-tools { margin: 1rem 0; }
  .tt-table td, .tt-table th { padding: .72rem .3rem; }
  .tt-start { width: 5.3rem; font-size: .87rem; }
  .tt-table .tt-length { width: 3.2rem; font-size: .83rem; }
  .tt-ordinal { display: block; margin-left: 0; }
}
@page { size: auto; margin: .44in; }
@media print {
  :root { color-scheme: light; font-family: Arial, sans-serif; --white: black; --muted: #333; --border: #bbb; }
  body:has(.timetable) { padding: 0; background: white; color: black; }
  body:has(.timetable) :not(.timetable, .timetable *, :has(.timetable)) { display: none !important; }
  body :has(.timetable), .timetable { display: block; position: static; width: auto; max-width: none; min-height: 0; margin: 0; padding: 0;
    background: white; border: 0; box-shadow: none; }
  .tt-tools, .tt-tools[hidden], .tt-filtered.tt-tools { display: none !important; }
  .tt-heading { border-bottom: 1px solid #444; padding-bottom: 3pt; }
  .tt-heading-line { margin-top: 2pt; }
  .tt-heading-line h1, .tt-heading-line h2 { font: bold 16pt/1.05 Arial, sans-serif; }
  .tt-identity, .tt-meta, .tt-version, .tt-rules { font-size: 8pt; line-height: 1.1; }
  .tt-meta { margin: 2pt 0 0; }
  .tt-logo { max-height: 20pt; }
  .tt-notice { margin: 4pt 0; padding: 2pt 4pt; font-size: 9pt; color: black; background: white; }
  .tt-table { font: 10pt/1.16 Arial, sans-serif; }
  .tt-table thead { display: table-header-group; }
  .tt-table tr, .tt-heading, .tt-rules { break-inside: avoid; }
  .tt-table td, .tt-table th { padding: 2.2pt 3pt; border-color: #ccc; }
  .tt-table th, .tt-note, .tt-ordinal, .tt-group-name { font-size: 9pt; }
  .tt-table .tt-start { width: 54pt; }
  .tt-note { display: inline; padding-left: 3pt; }
  .tt-hold .tt-swatch { display:inline-block; width:.6em; height:.85em; margin-right:.4em; border-radius:.12em; background:var(--swatch); print-color-adjust:exact; -webkit-print-color-adjust:exact; }
.tt-activity { color: black; }
  .tt-rules { border: 0; padding: 0; margin-top: 5pt; }
  .tt-rules h3 { font-size: 10pt; margin: 0 0 2pt; }
  .tt-rules dl > div { padding: 1pt 0; }
}
fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; }
legend { font: 700 1.4rem var(--display); margin-bottom: 1rem; }
.panel label { display: grid; gap: .25rem; margin: .65rem 0; }
.panel input, .panel select { min-width: 0; }
.group-row,.rule-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(11rem,100%),1fr)); gap:.65rem; align-items:end; border-top:1px solid var(--border); padding:.8rem 0; }
.multiline { white-space:pre-line; }
[hidden] { display:none !important; }
.day-list { list-style:none; padding:0; }
.day-list li { padding:.75rem 0; border-bottom:1px solid var(--border); }
.ledger { text-align:left; border-collapse:collapse; }
.ledger td,.ledger th { padding:.3rem .65rem; border-bottom:1px solid var(--border); }
