/* Phasor — the rooms: live round, every round, prints. Loaded after style.css. */

.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.tbl-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ================================================================ live: which round */

.lv-head { padding: clamp(26px, 4vw, 52px) 0 0; }
.lv-now { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; text-decoration: none; border: 1px solid var(--line2); background: var(--card); border-radius: 12px; padding: 12px 16px; margin-bottom: clamp(22px, 3.4vw, 40px); font-size: 14.5px; transition: border-color .18s; }
.lv-now:hover { border-color: var(--ink); }
.lv-now i { width: 8px; height: 8px; border-radius: 50%; background: var(--sig); animation: pulse 2s infinite; flex: none; }
.lv-now b { font: 500 15px/1 var(--mono); color: var(--sig); }
.lv-now .arr { margin-left: auto; font: 500 13px var(--mono); }
.lv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px 24px; flex-wrap: wrap; }
.lv-title { min-width: 0; }
.lv-top h1 { font-size: clamp(46px, 6.2vw, 88px); margin-top: 14px; overflow-wrap: anywhere; }
.lv-sub { margin: 14px 0 0; color: var(--ink2); font-size: 15px; }
.lv-sub .lnk { white-space: nowrap; }
.lv-nav { display: flex; gap: 8px; }

/* the five stages */
.stg { list-style: none; margin: clamp(24px, 3.4vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line2); counter-reset: stg; }
.stg li { position: relative; padding: 14px 14px 18px 0; min-width: 0; }
.stg li::before { content: ''; position: absolute; top: -1px; left: 0; right: 6px; height: 2px; background: transparent; transition: background .35s; }
.stg li b { display: flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); white-space: nowrap; transition: color .35s; }
.stg li b::before { counter-increment: stg; content: '0' counter(stg); color: var(--ink3); opacity: .7; }
.stg li i { order: 2; width: 7px; height: 7px; border-radius: 50%; background: var(--line2); flex: none; transition: background .35s; }
.stg li span { display: block; margin-top: 9px; font: 12.5px/1.3 var(--mono); color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stg li[data-s="done"]::before { background: var(--ink); }
.stg li[data-s="done"] b { color: var(--ink); }
.stg li[data-s="done"] i { background: var(--ink); }
.stg li[data-s="done"] span { color: var(--ink2); }
.stg li[data-s="on"]::before { background: var(--sig); }
.stg li[data-s="on"] b { color: var(--sig); }
.stg li[data-s="on"] i { background: var(--sig); animation: pulse 2s infinite; }
.stg li[data-s="on"] span { color: var(--ink2); }
.stg li[data-s="bad"]::before { background: var(--bad); }
.stg li[data-s="bad"] b, .stg li[data-s="bad"] span { color: var(--bad); }
.stg li[data-s="bad"] i { background: var(--bad); }
@media (max-width: 760px) {
  .stg li { padding-right: 6px; }
  .stg li b { font-size: 9.5px; letter-spacing: .02em; gap: 5px; }
  .stg li b::before { display: none; }
  .stg li i { order: 0; width: 6px; height: 6px; }
  .stg li span { display: none; }
  .stg li::before { right: 3px; }
}

/* ================================================================ live: the room */

.lv-room { padding: clamp(22px, 3vw, 36px) 0 clamp(24px, 3.2vw, 40px); }
.room-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 18px; flex-wrap: wrap; margin-bottom: 14px; }
.room-read { display: flex; gap: 12px clamp(18px, 3vw, 44px); min-width: 0; flex-wrap: wrap; }
.room-read > div { display: grid; gap: 7px; min-width: 0; align-content: start; }
.room-read span { font: 500 10.5px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ntext2); }
.room-read b { font: 400 clamp(22px, 2.6vw, 32px)/1 var(--mono); letter-spacing: -.03em; color: var(--ntext); white-space: nowrap; }
.room-read > div:first-child b { color: var(--sig2); }
.room-read b em { font: inherit; }
.room-read em { font: normal 12px var(--mono); color: var(--ntext2); }
.room-read > div:first-child { grid-template-columns: auto auto; align-items: baseline; column-gap: 8px; }
.room-read > div:first-child span { grid-column: 1 / -1; }
.room-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.room-cv { position: relative; border: 1px solid var(--nline); border-radius: 14px; overflow: hidden; background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--night2), var(--night) 72%); }
.room-cv canvas { width: 100%; height: clamp(370px, 44vw, 540px); }
.room-cap { margin: 14px 0 0; font-size: 14px; color: var(--ntext2); min-height: 3em; max-width: 86ch; }
@media (max-width: 560px) {
  .room-read { gap: 12px 20px; }
  .room-read b { font-size: 21px; }
  .room-ctl { width: 100%; }
  .room-ctl .btn { flex: 1 1 auto; padding: 0 10px; }
}

/* ================================================================ live: numbers, allocation, proof */

.lv-body { padding: clamp(30px, 4vw, 56px) 0 clamp(80px, 10vw, 130px); }
.statrow.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.statrow.six b { font-size: clamp(19px, 1.9vw, 24px); }
.statrow.six b.sig { color: var(--sig); }
@media (max-width: 980px) {
  .statrow.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statrow.six div:nth-child(4) { border-left: 0; }
  .statrow.six div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .statrow.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statrow.six div { border-left: 1px solid var(--line); }
  .statrow.six div:nth-child(odd) { border-left: 0; }
  .statrow.six div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .statrow.six div { padding: 14px; }
}

.lv-sh { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 56px; align-items: end; margin: clamp(56px, 7vw, 96px) 0 clamp(22px, 2.8vw, 32px); }
.lv-sh .label { margin-bottom: 16px; }
.lv-sh h2.display { font-size: clamp(34px, 4vw, 56px); }
@media (max-width: 860px) { .lv-sh { grid-template-columns: 1fr; } }

.lv-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .lv-grid { grid-template-columns: 1fr; } }
.lv-msg { padding: 26px; }
.lv-msg p { margin: 12px 0 0; color: var(--ink2); max-width: 66ch; }
.lv-msg p b { color: var(--ink); font-weight: 600; }

.alloc { font-size: 13.5px; }
.alloc th { padding-top: 2px; }
.alloc td { padding-top: 10px; padding-bottom: 10px; }
.alloc tr.is-top td { background: var(--sigbg); }
.alloc tr.is-top td:first-child { box-shadow: inset 3px 0 0 var(--sig); }
.alloc tr.is-top .ket { color: var(--sig); }
.alloc td:first-child, .alloc th:first-child { padding-left: 10px; }
.alloc .shr { display: grid; gap: 5px; min-width: 64px; max-width: 220px; }
.alloc .shr .num { font-size: 12.5px; }
.alloc tfoot td { border-bottom: 0; padding-top: 14px; font-weight: 600; }
.lv-foot { font-size: 13px; color: var(--ink3); margin: 14px 0 0; max-width: 72ch; }

.pays { list-style: none; margin: 0; padding: 0; counter-reset: pay; }
.pays li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pays li::before { counter-increment: pay; content: counter(pay); font: 400 18px/1 var(--serif); color: var(--ink3); }
.pays li:first-child::before { color: var(--sig); }
.pays .w { font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pays .s { font: 12px var(--mono); color: var(--ink3); }
.pays li.is-top .s { color: var(--sig); }
.pays .v { font: 13.5px var(--mono); text-align: right; }
.pays li.none { display: block; color: var(--ink3); padding: 18px 0; border: 0; }
.pays li.none::before { content: none; }
.pays-more { margin-top: 14px; }

.lv-grid .panel-h > .num { font-size: 12.5px; }
.kv dd.nb { word-break: normal; overflow-wrap: anywhere; }
#proofCv { width: 100%; height: 170px; }
#pLog .ln { display: block; padding-left: 2ch; text-indent: -2ch; }
@media (max-width: 640px) { #pLog .ln + .ln { margin-top: 4px; } }
.proof-key { font: 11.5px var(--mono); }

/* ================================================================ rounds */

.rd-head .statrow b { font-size: clamp(22px, 2.4vw, 28px); }
.rd-sec { padding: clamp(30px, 4vw, 52px) 0 clamp(80px, 10vw, 130px); }
.rd-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rd-count { font: 12.5px var(--mono); color: var(--ink3); }
.rd-wrap { border: 1px solid var(--line2); border-radius: 16px; background: var(--card); padding: 18px 22px 6px; }
.rd-tbl { font-size: 14px; }
.rd-tbl td { padding-top: 12px; padding-bottom: 12px; }
.rd-tbl a.kk { text-decoration: none; font: 500 14px var(--mono); }
.rd-tbl a.kk:hover { color: var(--sig); }
.rd-tbl tr.click:focus-within td { background: var(--paper2); }
.rd-tbl .ket { font-size: 13.5px; }
.rd-tbl .when { color: var(--ink2); white-space: nowrap; }
.rd-tbl .only-s { display: none; }
.rd-tbl .dist { display: block; width: 72px; height: 20px; }
.rd-tbl tr.is-live td { background: var(--sigbg); }
.rd-more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0 18px; }
.rd-more p { margin: 0; font: 12.5px var(--mono); color: var(--ink3); }
@media (max-width: 860px) { .rd-tbl .hide-m { display: none; } }
@media (max-width: 640px) {
  .rd-wrap { padding: 12px 14px 4px; }
  .rd-tbl { font-size: 13px; }
  .rd-tbl th, .rd-tbl td { padding-right: 8px; }
  .rd-tbl .only-s { display: block; font: 11px var(--mono); color: var(--ink3); margin-top: 4px; white-space: nowrap; }
  .rd-tbl .pill { padding: 3px 5px; font-size: 9.5px; }
}

/* ================================================================ prints */

.pr-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line2); border-radius: 14px; background: var(--card); overflow: hidden; margin-top: clamp(28px, 4vw, 44px); }
.pr-how > div { padding: 18px 20px 20px; border-left: 1px solid var(--line); min-width: 0; }
.pr-how > div:first-child { border-left: 0; }
.pr-how b { display: block; font: 400 26px/1 var(--serif); margin: 10px 0 8px; }
.pr-how p { margin: 0; font-size: 14px; color: var(--ink2); }
@media (max-width: 760px) { .pr-how { grid-template-columns: 1fr; } .pr-how > div { border-left: 0; border-top: 1px solid var(--line); } .pr-how > div:first-child { border-top: 0; } }

.pr-sec { padding: clamp(36px, 5vw, 64px) 0 clamp(80px, 10vw, 130px); }
.pr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
@media (max-width: 1100px) { .pr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pr-card { display: flex; flex-direction: column; gap: 10px; border: 0; background: none; padding: 0; text-align: left; min-width: 0; color: inherit; }
.pr-feat { width: min(100%, 380px); justify-self: end; }
@media (max-width: 860px) { .pr-feat { justify-self: start; width: min(100%, 340px); } }
.pr-art { display: block; position: relative; aspect-ratio: 1; background: var(--paper); border: 1px solid var(--line2); border-radius: 3px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 22px 34px -28px rgba(22, 21, 15, .45); transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, border-color .25s; }
.pr-card:hover .pr-art, .pr-card:focus-visible .pr-art { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 1px 0 var(--line), 0 30px 40px -28px rgba(22, 21, 15, .55); }
.pr-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; }
.pr-art canvas.on { opacity: 1; }
.pr-art .ld { position: absolute; inset: 0; display: grid; place-items: center; font: 11px var(--mono); letter-spacing: .06em; color: var(--ink3); text-transform: uppercase; }
.pr-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 12.5px var(--mono); min-width: 0; }
.pr-cap b { font-weight: 500; white-space: nowrap; }
.pr-cap span { color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pr-cap .q { color: var(--sig); }
@media (max-width: 420px) { .pr-cap { flex-direction: column; gap: 3px; } }

/* the print sheet */
.sheet.wide { width: min(1060px, 100%); padding: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.pr-big { background: var(--paper2); padding: clamp(14px, 2.4vw, 26px); display: grid; place-items: center; min-width: 0; }
.pr-big .frame { position: relative; width: 100%; aspect-ratio: 1; background: var(--paper); box-shadow: 0 30px 50px -36px rgba(22, 21, 15, .6); }
.pr-big canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pr-big .ld { position: absolute; left: 12px; bottom: 10px; font: 11px var(--mono); color: var(--ink3); letter-spacing: .04em; }
.pr-meta { padding: 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.pr-meta .sheet-h b { font-size: 34px; }
.pr-meta p { margin: 0; font-size: 14px; color: var(--ink2); }
.pr-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
@media (max-width: 820px) {
  .sheet.wide { grid-template-columns: 1fr; }
  .pr-meta { padding: 18px; }
}
