/* Director Relay v6 viewer. Dark skin to match the logo; base 18px, nothing under 16px. */
:root { color-scheme: dark; --bg:#07090b; --panel:#10141a; --field:#161b22; --line:#2f3742; --text:#e8e6e1; --muted:#bdb8ad; --gold:#d4a352; --gold-hi:#f0cd84; --on-gold:#0b0c0e; --focus:#f6d58e; }
html { font-size: 18px; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.6; margin: 0; background: var(--bg); color: var(--text); }
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--panel); }
header img { max-width: 100%; height: auto; display: block; }
nav.top { display: flex; gap: 1.25rem; align-items: center; }
main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
footer { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; color: var(--muted); font-size: 16px; }
a { color: var(--gold); } a:hover { color: var(--gold-hi); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 1.7rem; line-height: 1.25; } h2 { font-size: 1.3rem; margin-top: 2rem; } h3 { font-size: 1.05rem; margin: 1.25rem 0 .35rem; color: var(--gold-hi); }
.card, section.element { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.25rem; margin: 1.25rem 0; }
section.element h2 { margin-top: 0; }
table.list { width: 100%; border-collapse: collapse; margin: .75rem 0; }
table.list th, table.list td { text-align: left; vertical-align: top; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
table.list th { color: var(--muted); font-weight: 600; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: .75rem 1rem; }
.empty, .help, .crumb { color: var(--muted); } .empty { font-style: italic; }
.tag { display: inline-block; font-size: 16px; border: 1px solid var(--line); border-radius: 4px; padding: 0 .4rem; color: var(--muted); }
.tag.current, .tag.summation, .tag.outcome { border-color: var(--gold); color: var(--gold); } .tag.loop { border-color: #9cc3ff; color: #9cc3ff; }
details { margin: .6rem 0; } summary { cursor: pointer; color: var(--gold); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; } dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }
.pager a { margin-right: 1.5rem; }
form.narrow { max-width: 28rem; display: grid; gap: 1rem; }
label { display: grid; gap: .3rem; }
input { font: inherit; padding: .5rem .6rem; background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 6px; }
button { font: inherit; cursor: pointer; }
button.primary { background: var(--gold); color: var(--on-gold); border: 0; border-radius: 6px; padding: .6rem 1rem; font-weight: 600; }
button.link { background: none; border: 0; color: var(--gold); text-decoration: underline; padding: 0; }
form.inline { display: inline; }
.flash { border: 1px solid var(--gold); border-radius: 6px; padding: .6rem 1rem; margin: 1rem 0; }
/* v6.1 design pages: same skin, a few more pieces. No scripts anywhere. */
textarea, select { font: inherit; padding: .5rem .6rem; background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 6px; width: 100%; box-sizing: border-box; }
textarea { white-space: pre-wrap; line-height: 1.5; resize: vertical; }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; }
dd input:not([type=checkbox]), .stack input:not([type=checkbox]):not([type=file]) { width: 100%; box-sizing: border-box; }
button { background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: .45rem .9rem; }
button:disabled { opacity: .45; cursor: default; }
button.small { padding: .2rem .6rem; font-size: 16px; }
button.danger { border-color: #e08a7a; color: #f3b1a4; }
a.button { display: inline-block; background: var(--gold); color: var(--on-gold); border-radius: 6px; padding: .35rem .9rem; font-weight: 600; text-decoration: none; }
.flash.err { border-color: #e08a7a; white-space: pre-wrap; } .flash.ok { border-color: var(--gold); white-space: pre-wrap; }
.links { display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; align-items: center; }
nav.pager { display: flex; align-items: center; gap: 1.25rem; padding: .6rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 1rem 0; font-size: 1.1rem; }
nav.pager strong { flex: 1; }
details.settings > summary { color: var(--text); }
.grid { display: grid; gap: .75rem; margin: .75rem 0; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: .5rem .9rem; margin: 0; }
legend { color: var(--muted); padding: 0 .3rem; }
label.tick { display: inline-flex; align-items: center; gap: .4rem; margin-right: 1rem; }
label.tick.danger { color: #f3b1a4; }
dl.fields { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: .9rem 1.25rem; margin: 1.5rem 0; }
dl.fields dt { color: var(--gold-hi); font-weight: 600; padding-top: .45rem; }
dl.fields dd { margin: 0; min-width: 0; }
ul.arrows { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .6rem; }
ul.arrows li { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .75rem; }
ul.arrows .end { font-weight: 600; } ul.arrows .label { color: var(--muted); } ul.arrows .text { margin: .4rem 0; }
.waits { color: var(--gold); margin: .4rem 0 0; }
form.row, div.row { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: .6rem 0; }
form.stack { display: grid; gap: .8rem; margin: .75rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.note { border-left: 3px solid var(--line); padding-left: .9rem; margin: .9rem 0; }
fieldset.note { border-left-width: 3px; }
ul.problems li { margin: .35rem 0; }
td.text-cell { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 700px) { dl.fields { grid-template-columns: 1fr; } dl.fields dt { padding-top: 0; } }
/* v6.2.1 Stage list: the three buttons, one row per stage, Remove Stage. */
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: center; margin: 1rem 0 1.25rem; }
span.button { display: inline-block; border-radius: 6px; padding: .35rem .9rem; font-weight: 600; border: 1px solid var(--line); }
span.button.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
span.button.off { color: var(--muted); opacity: .55; cursor: not-allowed; }
a.button.ghost { background: none; color: var(--gold); border: 1px solid var(--gold); padding: calc(.35rem - 1px) calc(.9rem - 1px); }
a.button.ghost:hover { color: var(--gold-hi); border-color: var(--gold-hi); }
a.button.danger { background: none; color: #f3b1a4; border: 1px solid #e08a7a; font-weight: 400; }
a.button.small { padding: .1rem .6rem; font-size: 16px; }
table.stages td { vertical-align: middle; }
table.stages td.num { width: 2.5rem; color: var(--muted); }
table.stages td.end { text-align: right; white-space: nowrap; }
p.back { margin: .25rem 0 .5rem; font-weight: 600; }
/* v6.2.2: textareas fit their text (field-sizing where the browser has it; rows from the server otherwise), still resizable. */
textarea { field-sizing: content; min-height: 4.8em; max-height: none; resize: vertical; }
/* v6.2.2: an arrow's delete control folds behind a quiet "delete…" toggle. */
details.del { display: inline-block; margin: 0; }
details.del > summary { color: var(--muted); font-size: 16px; }
details.del[open] > form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: .4rem; }
dl.fields dt[id], details[id] { scroll-margin-top: 1rem; }
/* v6.2.3: Copy as JSON and Paste field list (JSON) under the header editors. */
details.json textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; }
details.json textarea[readonly] { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; background: var(--field); border: 1px solid var(--line); border-radius: 4px; padding: 0 .3rem; overflow-wrap: anywhere; }
details[id^="paste-"] { scroll-margin-top: 1rem; }
/* v6.3: the stage-list layout (name, function word, Function line, settling step on one line) and the stage settings. */
table.stages tr.start td { color: var(--muted); }
table.stages tr.start strong a { color: var(--gold); }
.fword { font-style: italic; }
.settle { color: var(--gold-hi); white-space: nowrap; }
@media (max-width: 700px) { .settle { white-space: normal; } }
p.stageline { margin: .25rem 0 .75rem; }
input.wide { width: 100%; box-sizing: border-box; }
ul.problems.warn li { color: var(--muted); }
label.tick input[type=radio] { width: 1.1rem; height: 1.1rem; }
q { quotes: "\201C" "\201D"; }
/* v6.4: running a relay. Sandbox runs say so on every page; run stage status; the handoff box. */
p.sandbox { border: 1px dashed #9cc3ff; color: #cfe1ff; border-radius: 6px; padding: .5rem 1rem; margin: .75rem 0; }
.tag.sandbox { border-color: #9cc3ff; color: #9cc3ff; }
.tag.rs-open, .tag.rs-decide { border-color: var(--gold); color: var(--gold); }
.tag.rs-decide { background: var(--gold); color: var(--on-gold); }
.tag.rs-approved, .tag.out-advance { border-color: #8fd19e; color: #8fd19e; }
.tag.rs-stopped, .tag.out-reject { border-color: #e08a7a; color: #f3b1a4; }
ul.choices { list-style: none; padding: 0; display: grid; gap: .75rem; }
#handoff-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; color: var(--muted); }
section[id], h2[id] { scroll-margin-top: 1rem; }
/* v6.5: the stage result page. The Next line, the item table, marks, Stage notes, replies side by side. */
p.next { font-weight: 600; color: var(--gold-hi); margin: .25rem 0 1rem; }
.tag.rs-revise, .tag.out-send_back { border-color: #9cc3ff; color: #9cc3ff; }
table.items td { vertical-align: top; }
table.items td.pick, table.items th.pick { width: 2.5rem; }
table.items td.mark { white-space: nowrap; }
table.items td.mark label.tick { display: block; margin: .1rem 0; }
table.items td.rank input { width: 3.5rem; }
table.items textarea { width: 100%; box-sizing: border-box; min-height: 2.6em; }
label.small { font-size: 16px; display: block; margin-top: .4rem; }
.tag.mark-keep { border-color: #8fd19e; color: #8fd19e; }
.tag.mark-drop { border-color: #e08a7a; color: #f3b1a4; }
.tag.mark-hold { border-color: #9cc3ff; color: #9cc3ff; }
p.stagenote { border-left: 3px solid var(--gold); padding-left: .6rem; margin: .4rem 0; }
div.reply { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
div.reply form.inline { margin-top: .4rem; }
details.sub { margin-top: 1rem; }
ul.gone { list-style: none; padding: 0; }
ul.gone li { margin: .5rem 0; color: var(--muted); }
/* v6.5.1: a refused save kept in the form; the function glossary page */
.flash.warn { border-color: #e0c27a; }
section.fn .row { display: flex; gap: 1rem; flex-wrap: wrap; }
section.fn label { margin-bottom: .4rem; }
/* v6.6: actors, rounds and answers */
.tag.stale { border-color: #e0c27a; color: #e0c27a; }
.tag.missing { border-color: #e08a7a; color: #f3b1a4; }
tr.closed td { opacity: .7; }
.tick-row { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin: .3rem 0; }
details.sub > summary { cursor: pointer; }
/* v6.6.1: resources */
section.resources { margin: .75rem 0; } section.resources h3 { margin: .25rem 0; font-size: 1rem; }
ul.reslist { margin: .25rem 0 .5rem; padding-left: 1.25rem; }
.tag.prov { border-color: #b9a6e8; color: #cbbcf0; }
div.att { border-top: 1px solid var(--line); padding: .5rem 0; } div.att h3 { margin: .25rem 0; font-size: 1rem; }
ul.ticks { list-style: none; padding: 0; margin: .25rem 0; }
table.items td { vertical-align: top; } table.fields input { width: 100%; }
/* v6.7.6: show what you act on; fold the rest. A result box is exactly 10 rows and scrolls inside (no growing, no resize).
   One batch at a time with Previous and Next; every Advance asks first. */
textarea.fixed { field-sizing: fixed; resize: none; overflow-y: auto; min-height: 0; max-height: none; height: auto; }
details.fold > summary, details.item > summary { overflow-wrap: anywhere; }
details.item { margin: 0; } details.item > summary { color: var(--text); } details.item[open] > summary { color: var(--gold); }
#batch-text, textarea[name=handoff_view], textarea[name=sendback_view] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; color: var(--muted); }
nav.batchnav { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0 .75rem; }
p.batchlist { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; color: var(--muted); font-size: 16px; }
ul.results { list-style: none; padding: 0; margin: .25rem 0; } ul.results li { border-bottom: 1px solid var(--line); padding: .2rem 0; } ul.results details { margin: 0; }
div.done { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: .5rem; }
div.done h3 { margin-top: .5rem; }
div.confirm { border: 1px solid var(--gold); border-radius: 6px; padding: .6rem 1rem; margin: .75rem 0; background: var(--field); }
div.confirm[hidden] { display: none; }
div.confirm .actions { margin: .5rem 0 0; }
/* v6.8.0: the spreadsheet preview (?p=import) */
.tag.changed { border-color: #e0c27a; color: #e0c27a; }
ul.reslist > li { margin: .6rem 0; }
ul.reslist > li ul { margin: .3rem 0 .4rem 1.2rem; }
#load { position: sticky; bottom: 0; background: var(--panel); border: 1px solid var(--gold); border-radius: 8px; padding: .75rem 1.25rem; margin: 1.25rem 0; }
#load h3 { margin: 0 0 .5rem; }
/* v6.8.4: Copy and Download beside long text; the batch marker; the outcome block */
p.texttools { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin: .5rem 0; }
.tag.batch { border-color: #b9a6e8; color: #cbbcf0; }
p.batches { margin: .25rem 0 .75rem; }
section.outcome { margin: 1.5rem 0; }
