/* Presenters version 2 (Claude): one stylesheet for the showcase, the model sheet and the playground.
 * It follows the house style of bulletins.promptugal.news: black, teletext yellow and cyan, DejaVu Sans Mono.
 * No inline styles anywhere, so the pages run under Content-Security-Policy: default-src 'self'. */
:root { --ink: #fff; --dim: #9aa; --yellow: #ff0; --cyan: #7cf; --red: #f33; --green: #3d3; --line: #333; --panel: #0b0f1c; --u: 1px;
  --mono: "DejaVu Sans Mono", ui-monospace, Menlo, Consolas, monospace; --sans: "DejaVu Sans", Verdana, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: var(--ink); }
body { font: 16px/1.5 var(--mono); }
a { color: var(--cyan); }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.wrap { max-width: 1600px; margin: 0 auto; padding: 12px 16px 72px; }
.dim { color: var(--dim); }
.small { font-size: 13px; }

/* The teletext header row: page number, service, title. */
.tt-head { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; padding: 6px 0 10px; }
.tt-head .page { color: var(--ink); }
.tt-head h1 { margin: 0; font-size: 22px; line-height: 1.2; color: var(--yellow); font-weight: 700; }
.tt-head .what { color: var(--cyan); }
.tt-head .right { margin-left: auto; color: var(--green); }

/* The frame is what the video exporter photographs: the canvas and everything laid over it. */
.frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #060914; overflow: hidden; border: 1px solid var(--line); }
.frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.frame .strap { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: calc(18 * var(--u)); padding: calc(10 * var(--u)) calc(18 * var(--u)); font: 700 calc(19 * var(--u)) / 1.2 var(--mono); background: linear-gradient(#000c, #0000); pointer-events: none; }
.frame .strap .p { color: #fff; } .frame .strap .s { color: var(--yellow); } .frame .strap .c { color: #0ff; margin-left: auto; }
.frame .lower { position: absolute; left: calc(40 * var(--u)); bottom: calc(40 * var(--u)); max-width: 62%; pointer-events: none; }
.frame .lower b { display: inline-block; background: var(--yellow); color: #000; font: 700 calc(30 * var(--u)) / 1.15 var(--mono); padding: calc(5 * var(--u)) calc(12 * var(--u)); }
.frame .lower span { display: block; width: fit-content; margin-top: calc(4 * var(--u)); background: #000d; color: #fff; font: calc(21 * var(--u)) / 1.3 var(--sans); padding: calc(5 * var(--u)) calc(12 * var(--u)); }
.frame .lower span:empty, .frame .lower b:empty { display: none; }
.tag { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; text-align: center; white-space: nowrap; pointer-events: none; will-change: transform; }
.tag b { display: block; font: 700 calc(17 * var(--u)) / 1.15 var(--mono); color: var(--yellow); text-shadow: 0 0 calc(4 * var(--u)) #000, 0 calc(1 * var(--u)) calc(2 * var(--u)) #000; }
.tag i { display: block; font: normal calc(12 * var(--u)) / 1.2 var(--sans); color: #fff; text-shadow: 0 0 calc(4 * var(--u)) #000, 0 calc(1 * var(--u)) calc(2 * var(--u)) #000; }
.tag.off { display: none; }

/* Transport: play, scrub, speed, focus. */
.transport { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 14px; align-items: center; margin: 12px 0 6px; }
.transport .row2 { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.btn { background: #000; border: 2px solid var(--yellow); color: var(--yellow); padding: 6px 14px; min-width: 96px; cursor: pointer; font-weight: 700; }
.btn:hover { background: var(--yellow); color: #000; }
.btn.plain { border-color: var(--line); color: var(--ink); min-width: 0; font-weight: 400; }
.btn.plain:hover { background: #222; color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #000; }
select, input[type="number"], input[type="text"] { background: #000; border: 1px solid #556; padding: 5px 8px; }
input[type="range"] { width: 100%; accent-color: var(--yellow); }
label { color: var(--dim); }
label > select, label > input { margin-left: 6px; color: var(--ink); }
.time { color: var(--green); font-variant-numeric: tabular-nums; min-width: 14ch; text-align: right; }
.beats { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 14px; }
.beats button { background: #000; border: 1px solid var(--line); color: var(--cyan); padding: 4px 10px; cursor: pointer; }
.beats button:hover { border-color: var(--cyan); }
.beats button[aria-current="true"] { background: var(--cyan); color: #000; border-color: var(--cyan); }
.note { max-width: 78ch; font: 15px/1.6 var(--sans); color: #dde; }
.note h2 { font: 700 17px/1.3 var(--mono); color: var(--yellow); margin: 22px 0 6px; }
.err { background: #400; border: 1px solid var(--red); padding: 10px 14px; margin: 12px 0; font-family: var(--sans); }
.err[hidden] { display: none; }

/* Fastext: the four coloured keys at the foot of every teletext page are the way between the three pages. */
.fastext { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #000; border-top: 1px solid var(--line); z-index: 20; }
.fastext a { flex: 1; padding: 9px 8px; text-align: center; text-decoration: none; font-weight: 700; color: #000; }
.fastext a:nth-child(1) { background: #f33; } .fastext a:nth-child(2) { background: #3d3; } .fastext a:nth-child(3) { background: #ff0; } .fastext a:nth-child(4) { background: #0ff; }
.fastext a[aria-current="page"] { box-shadow: inset 0 -5px 0 #000; }
.fastext a:hover { filter: brightness(1.15); }

/* Model sheet. */
.sheet-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 18px; }
.sheet-nav a { border: 1px solid var(--line); padding: 3px 9px; text-decoration: none; }
.sheet-nav a:hover { border-color: var(--cyan); }
.char { border-top: 2px solid var(--yellow); padding: 14px 0 26px; }
.char header { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin-bottom: 10px; }
.char h2 { margin: 0; font-size: 22px; color: var(--yellow); }
.char .kind { color: var(--cyan); } .char .credit { color: var(--dim); font: 13px/1.4 var(--sans); flex-basis: 100%; }
.char h3 { font-size: 14px; font-weight: 400; color: var(--green); margin: 14px 0 6px; }
.cells { display: grid; gap: 0 6px; }
.cells.views { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cells.faces { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.cells.mouths { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.cells.poses { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.cell { margin: 0; position: relative; }
.cell canvas { display: block; width: 100%; height: auto; }
.cell figcaption { font: 12px/1.3 var(--sans); color: #cde; background: #000; padding: 3px 4px 5px; min-height: 2.9em; }
@media (max-width: 900px) { .cells.views { grid-template-columns: repeat(3, 1fr); } .cells.faces, .cells.poses { grid-template-columns: repeat(4, 1fr); } .cells.mouths { grid-template-columns: repeat(5, 1fr); } }
.bd-grid-navy { background: #0a1230; } .bd-studio { background: #17253f; } .bd-soft-studio { background: #c9ced6; } .bd-black { background: #000; } .bd-paper { background: #f1ecdf; }
.bd-zx { background: #d7dbe2; } .bd-office { background: #e6edf0; } .bd-dusk { background: #2a2448; } .bd-gradient { background: linear-gradient(#3a2a66, #1c1433); }

/* Playground. */
.play { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; align-items: start; }
/* On a narrow screen the picking comes straight after the picture, and the long state panel goes last. */
@media (max-width: 1100px) { .play { display: flex; flex-direction: column; } .play > div:first-child { display: contents; } .play .side { order: 2; } .play > div:first-child > .box { order: 3; } }
.side { display: grid; gap: 12px; }
.box { border: 1px solid var(--line); padding: 10px 12px; }
.box h2 { margin: 0 0 8px; font-size: 15px; color: var(--yellow); }
.moves { display: grid; gap: 10px; max-height: 300px; overflow: auto; }
.moves h3 { margin: 0 0 4px; font-size: 12px; font-weight: 400; color: var(--green); }
.moves .set { display: flex; flex-wrap: wrap; gap: 4px; }
.moves button { background: #000; border: 1px solid #445; color: var(--ink); padding: 3px 8px; cursor: pointer; font-size: 13px; }
.moves button:hover { border-color: var(--cyan); }
.moves button[aria-pressed="true"] { background: var(--cyan); color: #000; border-color: var(--cyan); }
.moves button.own { border-color: var(--yellow); }
.params { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font-size: 13px; }
.params .about { grid-column: 1 / -1; font: 13px/1.45 var(--sans); color: #cde; }
.params input, .params select { width: 100%; margin: 0; }
.stack { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 150px; overflow: auto; }
.stack li { display: flex; gap: 8px; justify-content: space-between; border-bottom: 1px solid #1a2030; padding: 2px 0; }
.stack li.live { color: var(--yellow); } .stack li.done { color: #667; }
.state { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 14px; font-size: 12px; font-variant-numeric: tabular-nums; }
.state div { display: grid; grid-template-columns: 7ch 1fr 6ch; gap: 6px; align-items: center; }
.state .bar { height: 7px; background: #141a2a; position: relative; }
.state .bar i { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; background: var(--cyan); }
.state .v { text-align: right; color: #cde; }
.state .zero { color: #556; } .state .zero .v { color: #556; }
.state h3 { grid-column: 1 / -1; margin: 6px 0 1px; font-size: 12px; font-weight: 400; color: var(--green); }
textarea { width: 100%; min-height: 90px; background: #000; color: #cde; border: 1px solid #445; font: 12px/1.4 var(--mono); }

/* Export mode: only the frame, at exactly the size of the viewport. */
body.export { overflow: hidden; }
body.export .wrap { max-width: none; padding: 0; }
body.export .tt-head, body.export .transport, body.export .beats, body.export .note, body.export .fastext, body.export .err { display: none; }
body.export .frame { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
