.auth{display:grid;grid-template-columns:minmax(260px,1fr) minmax(280px,420px);gap:28px;align-items:start;padding-top:10vh}
.auth>form{grid-column:2;padding:22px;border:1px solid var(--line);background:var(--panel)}
.auth>form+form{margin-top:-18px}.auth>.message{grid-column:2;margin:0}#email-form button:disabled{cursor:wait;opacity:.65}
.page-head button:not(.control-quiet),#start-match{font-weight:700}.split{display:grid;grid-template-columns:1fr 280px;gap:24px}.settings{align-self:start;padding:18px;background:var(--panel)}
.roster{display:grid;gap:8px}.roster label{display:flex;align-items:center;gap:12px;margin:0;padding:12px;border:1px solid transparent;background:var(--panel)}.roster label:has(input:checked){border-color:var(--red)}.roster input{width:auto}.roster strong{min-width:140px}
.roster-group{display:grid;gap:8px}.roster-group h3{margin:14px 0 2px;font-size:15px}.roster-name{display:grid;flex:1;min-width:160px;gap:2px}.roster .tag{text-align:right}.roster-name span,.selection-note{color:var(--muted);font-size:13px}.selection-note{margin:16px 0}.settings summary,.workspace summary{cursor:pointer;color:var(--ink);font-weight:600}.settings details label{margin:16px 0 0}.workspace{padding:16px 0}.workspace summary{font-size:16px}.workspace[open] summary{margin-bottom:12px}
.tag{font:12px/1.4 ui-monospace,monospace;color:var(--sand)}.workspace{margin-top:24px;padding-top:8px;border-top:1px solid var(--line)}.workspace ol{padding-left:22px;color:var(--muted)}
#one-time-value{white-space:pre-wrap;overflow-wrap:anywhere}#token-message:empty{display:none}
.house-copy-row{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.house-copy-row label{min-width:min(320px,100%);margin:0}.house-copy-row select{width:100%}#house-copy-status:empty,#house-copy-message:empty{display:none}
.start-actions{justify-content:flex-start;margin-top:18px}.start-guide{padding:14px 0;border-block:1px solid var(--line)}.start-guide summary{width:max-content;cursor:pointer;font-weight:700}.start-guide ol{padding-left:22px;color:var(--muted)}.start-guide li+li{margin-top:8px}.start-guide a,#practice-start a,.auth a{color:var(--ink)}
.public-roster-group{margin-top:28px}
#more-replays{margin-top:16px}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:10px;border-bottom:1px solid #393b35;text-align:left;white-space:nowrap}th{color:var(--muted);font-size:13px}
.quiet{background:transparent}dl{display:grid;grid-template-columns:max-content 1fr;gap:8px 20px}dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere;font-family:ui-monospace,monospace}#one-time-token{margin-top:12px;padding:12px;overflow-wrap:anywhere;background:#111310;font-family:ui-monospace,monospace}
.replay-list-head{display:flex;align-items:end;flex-wrap:wrap;gap:12px 16px;margin:26px 0 12px}.replay-list-head h2{margin:0}.replay-list-head label{margin-left:auto}.refresh-replays{min-height:44px}.new-replays{margin-left:8px;padding:1px 7px;background:var(--action);color:var(--ink);font-weight:700}.replay-list-head label{display:flex;align-items:center;gap:8px;margin:0;white-space:nowrap}.replay-list-head select{width:auto;min-height:44px}
.record-pending,.empty-records{display:flex;align-items:center;gap:12px;color:var(--muted)}.empty-records::before{content:"";flex:none;width:40px;height:40px;background:url(/brand/dent-reverse.f5653892.svg) center/contain no-repeat}
@media(max-width:720px){.auth,.split{grid-template-columns:1fr}.auth>form,.auth>.message{grid-column:1}.auth>form+form{margin-top:0}.roster strong{min-width:0}.roster label{flex-wrap:wrap}.roster-name{min-width:0;flex:1}.roster .tag{flex-basis:100%;padding-left:25px}.settings{order:-1}.replay-list-head{align-items:start;flex-wrap:wrap}}

.account-row{display:flex;align-items:end;gap:12px;flex-wrap:wrap;max-width:560px}.account-row label{flex:1 1 16rem;margin:0}
.danger-zone{margin-top:40px;padding:4px 18px 18px;border:1px solid var(--red);background:var(--panel)}.danger-zone p{margin-top:0}button.danger{border-color:var(--red);color:#ffb7aa;font-weight:700}button.danger:not(:disabled):hover{background:var(--action);border-color:var(--action);color:var(--ink)}
.check-row{display:flex;align-items:center;gap:.5rem;margin:.25rem 0}
.check-row input{width:auto;margin:0}

/* Rankings overview and rating history. Series colours are validated for the dark panel. */
#rankings-overview,.rating-chart{--series-1:#3987e5;--series-2:#d95926;--series-3:#199e70;--series-4:#c98500;--series-5:#d55181}
.pool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,18rem),1fr));gap:1rem;margin:1rem 0}
.pool-card{display:flex;flex-direction:column;gap:.6rem;text-align:left;padding:1rem;background:var(--panel);border:1px solid var(--line);color:var(--ink);font:inherit;cursor:pointer;width:100%}
.pool-card:hover,.pool-card:focus-visible{border-color:var(--sand)}
.pool-head{display:flex;justify-content:space-between;gap:.5rem;align-items:baseline;flex-wrap:wrap;margin:0;font-size:16px}.pool-head a{color:var(--ink)}.pool-head a:hover{color:var(--sand)}.pool-head span{font-weight:400}.pool-stats{margin:0}
.pool-head span,.pool-stats,.activity figcaption,.pool-leaders small{color:var(--muted);font-size:.85rem}
.pool-leaders{margin:0;padding-left:1.4rem;display:grid;gap:.25rem}
.pool-leaders li{display:flex;justify-content:space-between;gap:.5rem}
.pool-leaders .rating{font-variant-numeric:tabular-nums}
.activity{margin:0}
.activity svg{display:block;width:100%;height:2.25rem}
.activity .baseline{vector-effect:non-scaling-stroke}
.activity rect{fill:var(--series-1)}
.activity .baseline,.rating-chart .baseline{stroke:var(--line);stroke-width:1}
.rating-chart{position:relative;margin:.5rem 0 1.5rem}
.chart-legend{display:flex;flex-wrap:wrap;gap:.25rem 1rem;list-style:none;margin:0 0 .5rem;padding:0;font-size:.9rem}
.chart-legend small,.chart-tip small{color:var(--muted)}
.swatch{display:inline-block;width:.75rem;height:.75rem;border-radius:2px;margin-right:.35rem;vertical-align:-1px}
.swatch.s1{background:var(--series-1)}.swatch.s2{background:var(--series-2)}.swatch.s3{background:var(--series-3)}.swatch.s4{background:var(--series-4)}.swatch.s5{background:var(--series-5)}
.chart-frame{position:relative}
.rating-chart svg{display:block;width:100%;height:auto;overflow:visible}
.rating-chart .grid{stroke:var(--line);stroke-width:1;opacity:.5}
.rating-chart .tick,.rating-chart .end-label{fill:var(--muted);font-size:11px}
.rating-chart .end-label{fill:var(--ink)}
.rating-chart .series{fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.rating-chart .series.s1,.rating-chart .dot.s1{stroke:var(--series-1)}.rating-chart .series.s2,.rating-chart .dot.s2{stroke:var(--series-2)}.rating-chart .series.s3,.rating-chart .dot.s3{stroke:var(--series-3)}.rating-chart .series.s4,.rating-chart .dot.s4{stroke:var(--series-4)}.rating-chart .series.s5,.rating-chart .dot.s5{stroke:var(--series-5)}
.rating-chart .dot{fill:var(--panel);stroke-width:2}
.rating-chart .crosshair{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 3}
.rating-chart .hit{fill:transparent;cursor:crosshair}
.chart-tip{position:absolute;pointer-events:none;background:var(--panel-low);border:1px solid var(--line);border-radius:6px;padding:.5rem .75rem;font-size:.85rem;min-width:12rem;max-width:18rem;z-index:2}
.chart-tip p{margin:0 0 .25rem;color:var(--muted)}
.chart-tip ul{list-style:none;margin:0;padding:0;display:grid;gap:.15rem}


/* Tournaments */
.tournament-card{background:var(--panel);border:1px solid var(--line);border-left:3px solid var(--sand);padding:16px 18px;margin:0 0 24px}
.tournament-head{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;align-items:flex-start}
.tournament-head h2{margin:0 0 .25rem}.tournament-head p{margin:0;color:var(--muted)}
.tournament-when{margin:0;color:var(--muted);font-size:13px;text-align:right;max-width:24rem}
.tournament-enter{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin-top:16px}.tournament-enter label{flex:0 1 24rem;margin:0}
.tournament-card{--state:var(--sand)}.tournament-card .status-line{margin-top:4px}
.tournament-mine{list-style:none;margin:12px 0;padding:0;display:grid;gap:6px}.tournament-mine li{display:flex;align-items:center;gap:12px}
@media (max-width:640px){.tournament-when{text-align:left}}
.tournament-onair{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin:.5rem 0 1rem;padding:.6rem .8rem;border-left:3px solid var(--red);background:var(--panel)}.tournament-onair p{margin:0;flex:1 1 20rem;color:var(--ink)}
.tournament-pairings{margin:.25rem 0 1rem;padding-left:1.2rem;display:grid;gap:.2rem}.tournament-pairings small,.tournament-card td small{color:var(--muted)}

.live-dot{display:inline-block;width:7px;height:7px;margin-right:4px;background:var(--red);transform:rotate(45deg);vertical-align:middle}
.section-link { margin-left:10px; font-size:.8em; font-weight:600; }
#creation-starter{margin:6px 0 0;color:var(--muted);font-size:.85rem;overflow-wrap:anywhere}

/* Sign-in: the forms sit in the second column; once a link is sent, the confirmation replaces them. */
#signin-forms,.link-sent{grid-column:2;display:grid;gap:18px}#signin-forms>form,.link-sent{padding:22px;border:1px solid var(--line);background:var(--panel)}#signin-forms .control-primary{width:100%}
#signup-fields{margin:0 0 16px}#signup-fields summary{cursor:pointer;color:var(--ink);font-weight:600;padding-block:12px}#signup-fields[open] summary{margin-bottom:8px}#handle-status{margin:-8px 0 14px;font-size:.85rem}#handle-status:empty{display:none}
.link-sent h2{margin-top:0}.link-sent p:first-of-type{color:var(--ink)}
@media(max-width:720px){#signin-forms,.link-sent{grid-column:1}}
#signin-terms{margin:0}
.hint{color:var(--muted);font-size:.85rem}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Home: the live strip sits in the hero and keeps its height so nothing below jumps. */
[data-page="replays"]>.page-head{flex-wrap:wrap;align-items:center}[data-page="replays"]>.page-head>div:first-child{flex:1 1 420px}
[data-page="replays"]>.page-head h1{max-inline-size:16ch}[data-page="replays"]>.page-head p{max-inline-size:46ch}[data-page="replays"]>.page-head .start-note{margin-top:8px;font-size:.85rem}
.hero-live{flex:1 1 300px;max-width:440px;min-height:150px;padding:12px 14px;border:1px solid var(--line);border-left:3px solid var(--red);background:var(--panel)}
.hero-live-head{display:flex;align-items:center;gap:6px;margin:0 0 8px;color:var(--ink)}.hero-live-head a{margin-left:auto;font-size:.85rem}
.hero-live ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.hero-live li a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:8px 10px;min-height:44px;background:var(--panel-low);color:var(--ink);text-decoration:none;border:1px solid transparent}.hero-live li a:hover{border-color:var(--sand)}
.hero-live li span{grid-column:1;color:var(--muted);font-size:.85rem}.hero-live li .hero-live-watch{grid-column:2;grid-row:1/span 2;align-self:center;color:var(--sand);font-weight:700}
.hero-live-empty{margin:0;font-size:.9rem}
/* Fixed cells, so numbers change in place without moving the page. */
.arena-stats{display:flex;flex-wrap:wrap;gap:4px 18px;margin:16px 0 0;padding:8px 0;border-block:1px solid var(--line)}.arena-stats div{display:flex;align-items:baseline;gap:5px}.arena-stats dt{color:var(--muted);font-size:.8rem}.arena-stats dd{order:-1;margin:0;color:var(--ink);font-size:.85rem;font-weight:700;font-variant-numeric:tabular-nums}
.hero-live iframe{display:block;width:100%;aspect-ratio:16/9;border:0;background:#000}
.match-record.skeleton{min-height:64px;margin-bottom:1px;background:linear-gradient(90deg,var(--panel),var(--panel-low),var(--panel));opacity:.6}
@media(max-width:720px){.hero-live{max-width:none;min-height:132px}}

/* Robot page and the browser trial. */
.robot-head{flex-wrap:wrap}.robot-actions{flex:none}.robot-actions .control,.robot-actions button{display:inline-flex;align-items:center;gap:6px}
.robot-source{margin-top:28px}.source-file{border:1px solid var(--line);background:var(--panel-low);margin-bottom:8px}.source-file summary{cursor:pointer;padding:10px 12px;min-height:44px;display:flex;align-items:center;gap:10px}.source-file summary small{color:var(--muted)}
.source-file pre{margin:0;padding:12px;max-height:60vh;overflow:auto;border-top:1px solid var(--line);font:13px/1.5 ui-monospace,monospace;color:var(--ink);tab-size:2}
.robot-link{color:var(--ink)}.robot-link:hover{color:var(--sand)}
[data-page=try]{max-width:52rem}
.try-bar{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px;max-width:34rem}
.try-bar label{min-width:0}
[data-page=try] .actions{margin-bottom:16px}
.try-editor textarea{width:100%;min-height:16rem;padding:12px;border:1px solid var(--line);background:#111310;color:var(--ink);font:13px/1.5 ui-monospace,monospace;tab-size:2;resize:vertical}
.try-editor small{font-family:ui-monospace,monospace}
#try-lesson{max-width:65ch}
#try-comparison{margin-top:24px;max-width:42rem}
#try-comparison h2{margin-bottom:4px}
#try-comparison :is(th,td){padding:8px;white-space:normal}
#try-comparison tbody th{font-weight:600}
.link-list{list-style:none;padding:0;display:grid;gap:4px}.link-list a{display:inline-flex;align-items:center;min-height:44px}
.welcome{margin:0 0 24px;padding:18px 20px;border:1px solid var(--line);border-left:3px solid var(--red);background:var(--panel)}.welcome h2{margin-top:0}
.card-notice{margin:12px 0 0}.warn-text{color:#f0c674}.message.warn{border-color:#c98500;color:#f3d79b}
/* Rankings: Ratings and Statistics sections, and the always-open glossary. */
.section-tabs{display:flex;gap:4px;margin:-12px 0 24px;border-bottom:1px solid var(--line)}
.section-tabs a{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;margin-bottom:-1px;border-bottom:2px solid transparent;color:var(--muted);font-weight:600;text-decoration:none}
.section-tabs a:hover{color:var(--ink)}.section-tabs a[aria-current=page]{color:var(--ink);border-bottom-color:var(--red)}
.glossary{margin-top:36px;padding-top:6px;border-top:1px solid var(--line)}.glossary h2{font-size:19px}
.glossary dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 40px;margin:12px 0 0;max-width:980px}
.glossary dl>div{min-width:0}.glossary dt{font-weight:650;color:var(--ink)}.glossary dd{margin:2px 0 0;font-family:inherit;color:var(--muted);line-height:1.45}
@media(max-width:720px){.glossary dl{grid-template-columns:minmax(0,1fr);gap:12px}.section-tabs{margin-top:-16px}}
.pool-card{cursor:auto}
abbr[title]{text-decoration:underline dotted;cursor:help}

/* Phones: every control is at least 44 px tall. */
@media(max-width:720px){.actions .control,.actions button{min-height:44px;display:inline-flex;align-items:center}.check-row{min-height:44px}.check-row input{width:24px;height:24px;flex:none}}

/* Bot creation keeps source selection and repository browsing in one dialog. */
#bot-dialog{max-height:calc(100dvh - 32px);overflow:auto}#bot-dialog form{min-width:0}#bot-dialog select{max-width:100%}
.creation-source-panel{padding:12px;margin:0 0 16px;border:1px solid var(--line);background:var(--panel-low)}.creation-source-panel>p:first-child{margin-top:0}.creation-source-panel button{margin:0 0 10px;max-width:100%;overflow-wrap:anywhere}
/* The House ladder: tier and hint as label and value, with a square marker per tier. */
.ladder{--tier:var(--line);display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin:8px 0 12px}.ladder>div{display:grid;grid-template-columns:7.5rem minmax(0,1fr);gap:0 12px}.ladder dt{color:var(--muted)}.ladder dd{margin:0;overflow-wrap:anywhere;font-family:inherit}
.ladder[data-tier=entry]{--tier:var(--ok)}.ladder[data-tier=middle]{--tier:var(--sand)}.ladder[data-tier=top]{--tier:var(--red)}
.tier-mark{font-weight:800}.tier-mark::before{content:"";display:inline-block;width:.7em;height:.7em;margin-right:.5em;background:var(--tier)}
.start-here{margin:0 0 8px;padding:14px 18px;border:1px solid var(--line);border-left:3px solid var(--ok);background:var(--panel)}.start-here .start-label{margin:0;color:var(--ink);font-weight:800}.start-here .ladder{margin-bottom:0}
.welcome .start-here{margin-top:16px;background:var(--panel-low)}
@media(max-width:620px){.ladder>div{grid-template-columns:1fr}}
.creation-folders{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.creation-folders button{text-align:left}.creation-source-panel strong,.creation-source-panel .hint,#creation-repository-summary{overflow-wrap:anywhere}

/* My bots: one row per robot. At 1024 px and wider the rows share the
   table's column tracks through subgrid, so names, statuses, ladder, last
   match and actions line up down the list under one header row. The left rule
   and the status square carry the robot's state: competing --ok, testing
   --sand, failed --red, building --warn, ready and draft --line. */
.bot-table{display:grid;grid-template-columns:minmax(10rem,1.05fr) minmax(0,1.6fr) 6rem minmax(0,1.2fr) max-content;column-gap:24px;border:1px solid var(--line);background:var(--panel)}
.bot-head{grid-column:1/-1;display:grid;grid-template-columns:subgrid;padding:9px 18px 8px 15px;border-left:3px solid transparent;border-bottom:1px solid var(--line);color:var(--muted);font-size:13px}
.deleted-bots{margin:1rem 0}.deleted-list{list-style:none;margin:.5rem 0 0;padding:0}.deleted-list li{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.4rem 0;border-top:1px solid #393b35}.deleted-name{font-weight:600}.deleted-when{color:#b8b9b0;flex:1 1 12rem}
.bot-list{grid-column:1/-1;display:grid;grid-template-columns:subgrid;list-style:none;margin:0;padding:0}
.bot-list>li{grid-column:1/-1;display:grid;grid-template-columns:subgrid}
.bot-list>li+li .bot{border-top:1px solid #393b35}
.bot-list .bot{--state:var(--line);grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:start;padding:14px 18px 14px 15px;border-left:3px solid var(--state);background:var(--panel)}
.bot-list .bot:focus{outline:none}.bot-list .bot:focus-visible{outline:3px solid var(--sand);outline-offset:-3px}
.bot[data-state=competing]{--state:var(--ok)}.bot[data-state=testing]{--state:var(--sand)}.bot[data-state=failed]{--state:var(--red)}.bot[data-state=building]{--state:var(--warn)}
/* A row that needs attention sits on the lower surface, so it reads as a different kind of row. */
.bot-list .bot:is([data-state=failed],[data-state=testing]){background:var(--panel-low)}

.bot-name{min-width:0}
.bot-name h3{margin:0;font-size:16px;line-height:1.3;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bot-name p{margin:3px 0 0;display:flex;flex-wrap:wrap;gap:2px 10px;align-items:baseline;font-size:13px}
.bot-class{color:var(--muted)}.bot-published{color:var(--muted)}.bot-published:hover{color:var(--ink)}
.bot-state{min-width:0}
.status-line{margin:0;color:var(--ink);display:flex;align-items:baseline;gap:8px;line-height:1.3}.status-line::before{content:"";flex:none;width:8px;height:8px;background:var(--state);transform:translateY(-1px)}
/* One line under the status; the full text is in its title and, for an error, behind See error. */
.status-detail{margin:3px 0 0 16px;font-size:13px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-code{font:12px/1.5 ui-monospace,monospace;color:#ffb7aa}
.status-detail.warn-text{color:#f0c674}

.bot-standing{grid-column:3/span 2;display:grid;grid-template-columns:subgrid;margin:0;min-width:0;font-size:14px;line-height:1.3}
.bot-standing>div{min-width:0}
.bot-standing dt{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.bot-standing dd{margin:0;font-family:inherit;min-width:0}
.bot-standing .muted,.bot-standing small{color:var(--muted)}
.bot-standing small{display:block;margin-top:3px;font-size:13px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bot-result-link{display:block;color:var(--ink);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bot-result-link:hover .bot-opponent,.bot-result-link:focus-visible .bot-opponent{text-decoration:underline}
.bot-result[data-result=win] strong{color:#c7ead1}.bot-result[data-result=loss] strong{color:#ffb7aa}

.bot-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:-4px}
.bot-actions .control,.bot-actions button{display:inline-flex;align-items:center;min-height:36px;padding:6px 12px;white-space:nowrap}
.bot-menu{position:relative}
.bot-menu-button{gap:8px}
.bot-menu-button::after{content:"";border-inline:4px solid transparent;border-top:5px solid currentColor;transition:transform .15s}
.bot-menu-button[aria-expanded=true]{border-color:var(--sand)}.bot-menu-button[aria-expanded=true]::after{transform:rotate(180deg)}
.menu{position:absolute;z-index:20;top:calc(100% + 4px);right:0;min-width:15rem;max-width:min(20rem,calc(100vw - 24px));margin:0;padding:4px 0;list-style:none;border:1px solid var(--line);background:var(--coal);box-shadow:0 10px 28px #000c}
.menu ul{list-style:none;margin:0;padding:0}.menu-group:empty{display:none}
.menu [role=separator]{margin:4px 0;border-top:1px solid #393b35}
.menu [role=menuitem]{display:flex;align-items:center;width:100%;min-height:38px;padding:8px 14px;border:0;background:transparent;color:var(--ink);font-size:14px;text-align:left;text-decoration:none;cursor:pointer}
.menu [role=menuitem]:hover,.menu [role=menuitem]:focus{background:var(--panel);outline:none;box-shadow:inset 3px 0 var(--sand)}
.menu [role=menuitem]:disabled{color:var(--muted);background:transparent;box-shadow:none}

.bot-error{grid-column:2/-1;margin-top:12px}.bot:has([data-see-error][aria-expanded=true]) .status-code{display:none}
.bot-error pre{margin:0 0 10px;padding:10px 12px;max-height:14rem;overflow:auto;border-left:2px solid var(--red);background:#121310;color:#ffb7aa;font:12px/1.5 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.bot-list .card-notice{grid-column:2/-1;margin:10px 0 0}

/* Counts by state at the top, and the help that explains the terms once. */
.bots-overview{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;margin:-12px 0 16px}
.state-summary{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 20px;color:var(--muted)}
.state-summary li{display:flex;align-items:baseline;gap:6px}.state-summary li::before{content:"";width:8px;height:8px;background:var(--state,var(--line))}.state-summary strong{color:var(--ink)}
.state-summary [data-state=competing]{--state:var(--ok)}.state-summary [data-state=testing]{--state:var(--sand)}.state-summary [data-state=failed]{--state:var(--red)}.state-summary [data-state=building]{--state:var(--warn)}
/* Disclosures: a turning triangle before the label, as the browser's own marker would. */
.help-note summary{display:flex;align-items:center;gap:8px;min-height:40px;width:max-content;max-width:100%;color:var(--sand);cursor:pointer;list-style:none}.help-note summary::-webkit-details-marker{display:none}
.help-note summary::before{content:"";border-block:5px solid transparent;border-left:7px solid currentColor;transition:transform .15s}.help-note[open]>summary::before{transform:rotate(90deg)}
.help-note[open]{flex-basis:100%;padding:4px 16px 14px;border:1px solid var(--line);background:var(--panel-low)}
.term-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr));gap:12px 32px;margin:8px 0 0}
.term-list dt{font-weight:650;color:var(--ink)}.term-list dd{margin:2px 0 0;font-family:inherit;color:var(--muted);line-height:1.45}
.bots-more{margin-top:40px}.bots-more>h2{margin-bottom:0}.bots-more h3{font-size:16px;margin:0 0 8px}

/* Below 1024 px each row lays out on its own: name and actions, then status
   and standing; the standing's labels show. */
@media(max-width:1023px){.bot-table{display:block}.bot-head{display:none!important}.bot-list,.bot-list>li{display:block}
.bot-list .bot{display:grid;grid-template-columns:minmax(0,1fr) 17rem;grid-template-areas:"name actions" "state standing" "error error" "notice notice";gap:0 24px;padding:14px 16px 14px 13px}
.bot-name{grid-area:name}.bot-state{grid-area:state;margin-top:10px}.bot-actions{grid-area:actions;margin-top:0;align-self:start}.bot-error{grid-area:error;margin-top:12px}.bot-list .card-notice{grid-area:notice;margin:10px 0 0}
.bot-standing{grid-area:standing;display:grid;grid-template-columns:6.5rem minmax(0,1fr);gap:4px 16px;align-self:start;margin-top:10px}
.bot-standing dt{position:static;width:auto;height:auto;overflow:visible;clip-path:none;color:var(--muted);font-size:13px;margin-bottom:2px}}
/* At 620 px and below a row with two controls (Open and More) keeps them
   beside its name; a row with more (an attention row, or once a History link
   joins) puts them in a bar under its standing. */
@media(max-width:620px){.bot-list .bot{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"name actions" "state state" "standing standing" "error error" "notice notice";gap:0 12px}
.bot-list .bot:has(.bot-actions>:nth-child(3)){grid-template-areas:"name name" "state state" "standing standing" "error error" "actions actions" "notice notice"}
.bot-actions:has(>:nth-child(3)){justify-content:flex-start;margin-top:12px}.bot-actions:has(>:nth-child(3)) .bot-menu{margin-left:auto}
.bot-standing{grid-template-columns:5.5rem minmax(0,1fr)}
.bots-overview{margin-top:-8px}}
@media(max-width:720px){.help-note summary{min-height:44px}.bot-actions .control,.bot-actions button,.bot-error .actions .control,.bot-error .actions button,.menu [role=menuitem]{min-height:44px}}

@media(prefers-reduced-motion:reduce){.help-note summary::before,.bot-menu-button::after{transition:none}}
@media print{.bot-table{border:0}.bot-head{display:none!important}.bot-list .bot{break-inside:avoid}
.bot-actions,.bots-more,.card-notice,#new-bot,.help-note:not([open]),#bot-results-error,.bot-error[hidden]{display:none!important}
.status-detail{white-space:normal}.status-code{color:var(--red)}.status-detail.warn-text{color:var(--warn)}}
#new-bot{white-space:nowrap}

/* A robot's history (robot-history.js): match rows on the My bots table,
   with its own column tracks, keyed by the robot's result; its record as two
   small tables. */
.history-table{grid-template-columns:minmax(9rem,1fr) minmax(0,1.2fr) 4.5rem minmax(0,1fr) minmax(0,1fr) 7rem max-content}
@media(min-width:1024px){.history-table .bot-standing{grid-column:3/span 4}}
@media(max-width:1023px){.history-table .bot-standing{grid-template-columns:repeat(2,minmax(0,1fr))}}
.history-match[data-result=win]{--state:var(--ok)}.history-match[data-result=loss]{--state:var(--red)}.history-match[data-result=failed]{--state:var(--warn)}
.history-summary{margin-bottom:24px}.history-records{display:flex;flex-wrap:wrap;gap:12px 28px}.history-record{flex:1 1 18rem;min-width:0}.history-record h3{margin:0 0 6px;font-size:15px}
.history-record table{width:100%}.history-record th[scope=row]{font-weight:normal;text-align:left}
.history-filters{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 14px}.history-filters label{display:grid;gap:4px;font-size:13px;color:var(--muted)}.history-filters select{min-height:40px}
@media(max-width:720px){.history-filters select{min-height:44px}}
@media print{.history-filters,#history-refresh,#history-more{display:none!important}}

/* Shared rows beyond My bots: matches, robots and tournaments take the
   .bot-table columns with their own tracks. A match's left rule: on air or
   running --red, queued or void --warn, played --line. */
.match-table{grid-template-columns:minmax(12rem,1.4fr) minmax(0,1.6fr) 7rem max-content}
@media(min-width:1024px){.match-table .bot-standing{grid-column:3/span 1}}
.bot[data-state=live]{--state:var(--red)}.bot:is([data-state=queued],[data-state=void],[data-state=cancelled]){--state:var(--warn)}
.match-table .bot-standing dd[title]{cursor:default}
.record-details{grid-column:1/-1;margin-top:10px;padding:10px 12px;background:var(--panel-low);font-size:13px}.record-details:focus{outline:none}.record-details dl{margin:0}.record-details dd{color:var(--muted)}
.robots-table{grid-template-columns:minmax(11rem,1fr) minmax(0,2.4fr) max-content}
.robots-table.house{grid-template-columns:minmax(11rem,1fr) minmax(0,1.3fr) minmax(0,1.2fr) max-content}
.robot-row[data-tier=entry]{--state:var(--ok)}.robot-row[data-tier=middle]{--state:var(--sand)}.robot-row[data-tier=top]{--state:var(--red)}
.robot-about{margin:0;min-width:0;font-size:14px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bot-name h3 a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--line)}.bot-name h3 a:hover,.bot-name h3 a:focus-visible{color:var(--sand);text-decoration:underline}
.tournament-table{grid-template-columns:minmax(12rem,1.3fr) minmax(0,1.5fr) 8rem 6rem}
.muted{color:var(--muted)}
/* Facts as label and value pairs in a line that wraps. */
dl.facts{display:flex;flex-wrap:wrap;gap:8px 32px;margin:14px 0 0}dl.facts dt{font-size:13px}dl.facts dd{margin:2px 0 0;font-family:inherit;color:var(--ink)}
.season-picker{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:0 0 16px}.season-picker label{display:flex;align-items:center;gap:8px;margin:0}.season-picker select{width:auto;min-height:40px}.season-picker .hint{margin:0}
.page-help{margin:-16px 0 24px}.page-help p{margin:4px 0 0}
@media(max-width:1023px){
.match-table .bot-standing,.tournament-table .bot-standing{grid-template-columns:minmax(0,1fr)}
.tournament-table .bot-standing{grid-template-columns:repeat(2,minmax(0,1fr))}
.record-details{grid-area:error}
.robots-table .bot{grid-template-areas:"name actions" "state about" "notice notice"}.robots-table:not(.house) .bot{grid-template-areas:"name actions" "about about"}
.robot-about{grid-area:about;margin-top:10px}.robot-about.muted{display:none}
.match-table .bot-standing>div{display:flex;align-items:baseline;gap:8px}.match-table .bot-standing dt{margin:0}}
@media(max-width:620px){.robots-table .bot{grid-template-areas:"name actions" "state state" "about about"}
:is(.match-table,.history-table) .bot{grid-template-areas:"name name" "state state" "standing standing" "actions actions" "error error"}:is(.match-table,.history-table) .bot-actions{justify-content:flex-start;margin-top:12px}.match-table .bot-actions .bot-menu{margin-left:auto}}
@media(max-width:720px){.robot-actions{flex:1 1 100%}}
@media(max-width:720px){.season-picker select{min-height:44px}}
@media print{.match-table .bot-actions,#tournaments-refresh,#rankings-refresh,.record-details[hidden]{display:none!important}}
/* Account: keys as a short table; one link per robot in a line. */
#new-agent-token{margin-top:12px}.key-table{max-width:640px}.key-table th[scope=row]{font-weight:600;color:var(--ink)}.key-table th[scope=row] small{margin-left:6px;color:var(--muted);font-weight:400}.key-table td:last-child{text-align:right}.key-table td,.key-table th{padding:6px 10px}
.list-label{margin:16px 0 4px;font-size:14px;font-weight:600;color:var(--muted)}.inline-links{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 20px}.inline-links a{display:inline-flex;align-items:center;min-height:44px}
/* Clunkyard TV cards on the home page (docs/design/home-tv.md): a still from a real match or the match's backdrop, one link each, no playback. */
.tv-card{display:flex;flex-direction:column;border:1px solid var(--line);background:var(--panel);color:var(--ink);text-decoration:none}.tv-card:hover{border-color:var(--sand)}
.tv-card-picture{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;background:var(--panel-low)}
.tv-layer{position:absolute;inset:0;display:block;}.tv-layer picture{display:contents}
.tv-layer img{display:block;width:100%;height:100%;object-fit:cover}
.tv-backdrop{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:12px;text-align:center;background:radial-gradient(ellipse at 50% 120%,#5b4630 0,transparent 70%),linear-gradient(180deg,#3a2f22,#1c1a15)}
.tv-portraits{display:flex;justify-content:center;align-items:center;width:100%;height:82%;min-height:0;padding:0 4%;gap:2%}
.tv-portraits img{min-width:0;width:48%;max-width:192px;height:100%;object-fit:contain}
.tv-backdrop.has-portraits{padding:4px}.tv-backdrop.has-portraits .tv-backdrop-names,.tv-backdrop.has-portraits .tv-backdrop-rules{display:none}
.tv-backdrop-names{font-size:clamp(1rem,3.4vw,1.7rem);font-weight:800;color:var(--ink);text-shadow:0 2px 8px #000a;line-height:1.15}.tv-backdrop-rules{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--sand)}
.tv-backdrop[data-ruleset="classic"]{background:radial-gradient(ellipse at 30% 110%,#7a5a36 0,transparent 65%),linear-gradient(180deg,#4a3a28,#221b13)}
.tv-backdrop[data-ruleset="inertial-2d"]{background:radial-gradient(ellipse at 70% 110%,#4f5d63 0,transparent 65%),linear-gradient(180deg,#2c3539,#15191b)}
.tv-backdrop[data-ruleset="gravity-flat"]{background:radial-gradient(ellipse at 50% 120%,#8a5e33 0,transparent 70%),linear-gradient(180deg,#5c4630 30%,#2a2018)}
.tv-backdrop[data-ruleset="gravity-hills"]{background:radial-gradient(ellipse at 20% 100%,#7d5532 0,transparent 45%),radial-gradient(ellipse at 80% 105%,#6b4a2c 0,transparent 50%),linear-gradient(180deg,#54402b 20%,#231b13)}
.tv-backdrop[data-ruleset="zero-g"]{background:radial-gradient(circle at 20% 30%,#ffffff22 0 1px,transparent 2px),radial-gradient(circle at 70% 20%,#ffffff1a 0 1px,transparent 2px),radial-gradient(circle at 85% 70%,#ffffff22 0 1px,transparent 2px),radial-gradient(ellipse at 60% 40%,#3b3a7a 0,transparent 60%),linear-gradient(180deg,#1b1d40,#0b0c1a)}
.tv-card-caption{display:grid;gap:2px;padding:10px 12px 12px}.tv-card-caption .status-line{display:flex;align-items:center;gap:6px;font-size:.85rem}.tv-card-title{font-weight:700}.tv-card-detail{font-size:.85rem}.tv-card-clock{margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}
.tv-card-marker{width:8px;height:8px;background:var(--line);transform:rotate(45deg)}.tv-card[data-state="live"] .tv-card-marker{background:var(--red)}.tv-card[data-state="replay"] .tv-card-marker{background:var(--sand)}
.tv-card-hero{flex:1 1 360px;max-width:560px;border-left:3px solid var(--line)}.tv-card-hero[data-state="live"]{border-left-color:var(--red)}.tv-card-hero .tv-card-title{font-size:1.1rem}.tv-card-hero .tv-card-detail{color:var(--sand)}
.tv-recent h2{margin-top:24px}.tv-card.skeleton:hover{border-color:var(--line)}.tv-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.tv-cards .tv-card{height:100%}
@media(max-width:1023px){.tv-card-hero{max-width:none}}
@media(max-width:620px){.tv-cards{grid-template-columns:minmax(0,1fr)}.tv-cards .tv-card{display:grid;grid-template-columns:136px minmax(0,1fr);align-items:center}.tv-cards .tv-card-caption{padding:8px 10px}.tv-cards .tv-backdrop-names{font-size:.8rem}.tv-cards .tv-backdrop-rules{display:none}}
