/* Calldesk — night edition. Dark newsprint, one ink-blue accent, a blackletter nameplate over a front-page lede,
   the desk below it as a head-to-head exchange, the wire beside it on desktop, the CA docked above the thumb. */
:root {
  --ground: #121316; --sheet: #1A1B1F; --rule: #2C2E35; --ink: #ECE6D8; --dim: #A39E92; --faint: #6C6960;
  --blue: #8AB4FF; --blue-wash: rgba(138, 180, 255, .13); --blue-edge: rgba(138, 180, 255, .45);
  --serif: 'Source Serif 4', Georgia, serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --plate: 'UnifrakturMaguntia', 'Source Serif 4', serif;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--serif); padding-bottom: 96px; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
code { font-family: var(--mono); }
button { font: inherit; cursor: pointer; }

/* ---------- the front page lede ---------- */
.frontpage { max-width: 1180px; margin: 0 auto; padding: 14px 18px 12px; font-size: 16px; border-bottom: 3px double var(--rule); }
.dateline { display: flex; justify-content: space-between; gap: 10px; font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); border-bottom: 1px solid var(--rule); padding-bottom: 7px; }
.nameplate { font: 400 40px/1.05 var(--plate); text-align: center; margin: 8px 0 4px; letter-spacing: .01em; }
.standfirst { margin: 0 0 8px; text-align: center; font-style: italic; color: var(--dim); font-size: 14.5px; line-height: 1.4;
  border-bottom: 1px solid var(--rule); padding-bottom: 9px; }
.leadgraf { margin: 0; font-size: 17px; line-height: 1.48; }
.leadgraf b { font-weight: 700; }
.leadgraf em { font-style: normal; color: var(--blue); }
.leadgraf code { font-size: .86em; }

/* ---------- the broadsheet grid ---------- */
.broadsheet { max-width: 1180px; margin: 0 auto; padding: 12px 18px 0; display: grid; gap: 18px; }

/* ---------- the desk ---------- */
.deskroom { background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px; padding: 12px; }
.deskroom-mast { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 10px; }
.deskroom-t { font: 700 13px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.deskroom-s { font: 12px/1 var(--mono); color: var(--dim); }

.online { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.versus { align-self: center; font: 400 26px/1 var(--plate); color: var(--dim); }
.callslip { border: 1px solid var(--rule); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 4px; min-width: 0; background: var(--ground); }
.callslip-west { border-bottom-left-radius: 3px; }
.callslip-east { border-bottom-right-radius: 3px; border-color: var(--blue-edge); background: var(--blue-wash); }
.callslip-who { font: 12px/1.2 var(--mono); color: var(--dim); overflow-wrap: anywhere; }
.callslip-amt { font: 700 30px/1.05 var(--serif); font-variant-numeric: tabular-nums; }
.callslip-note { font-size: 12.5px; color: var(--dim); line-height: 1.3; }
.callslip-west.is-lit { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.callslip-west.is-lit .callslip-who { color: var(--blue); }
.callslip-west.is-waiting .callslip-amt { color: var(--ink); }
.dial { display: flex; align-items: baseline; gap: 6px; border-bottom: 2px solid var(--blue); padding: 2px 0; }
.dial input { width: 100%; min-width: 0; background: transparent; border: 0; color: var(--ink); font: 700 26px/1.1 var(--serif); outline: none; padding: 0; }
.dial span { font: 10px/1 var(--mono); color: var(--dim); }
.quicks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.quicks button { background: transparent; border: 1px solid var(--rule); color: var(--ink); border-radius: 999px; padding: 3px 8px; font: 11px/1.3 var(--mono); }
.quicks button:hover { border-color: var(--blue); }
.ringbtn { margin-top: 6px; background: var(--blue); color: var(--ground); border: 0; border-radius: 10px; padding: 10px 8px; font: 700 15px/1 var(--serif); }
.ringbtn:disabled { opacity: .5; cursor: default; }
.ringbtn.is-first { animation: ring 1.6s ease-in-out infinite; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(138, 180, 255, .55); } 50% { box-shadow: 0 0 0 7px rgba(138, 180, 255, 0); } }
.odds { margin: 10px 2px 0; font-size: 14.5px; line-height: 1.45; color: var(--dim); }
.odds b { color: var(--ink); }
.odds em { font-style: normal; color: var(--blue); }
.hangrow { margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; border: 1px dashed var(--rule); border-radius: 8px; padding: 8px 10px; }
.hangrow[hidden] { display: none; }
.hangrow button { background: transparent; border: 1px solid var(--blue); color: var(--blue); border-radius: 8px; padding: 6px 10px; font-size: 13px; }

.earlier { margin-top: 14px; }
.earlier-h { display: flex; justify-content: space-between; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim);
  border-top: 1px solid var(--rule); padding-top: 10px; margin-bottom: 8px; }
.earlier-h a { text-transform: none; letter-spacing: 0; }
.pairlog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.xch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.xch-b { border-radius: 12px; padding: 7px 9px; border: 1px solid var(--rule); min-width: 0; }
.xch-b:first-child { border-bottom-left-radius: 3px; }
.xch-b:nth-child(2) { border-bottom-right-radius: 3px; text-align: right; }
.xch-b i { display: block; font: normal 11px/1.2 var(--mono); color: var(--dim); overflow-wrap: anywhere; }
.xch-b strong { font: 700 19px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.xch-b.is-taker { border-color: var(--blue); background: var(--blue-wash); }
.xch-b.is-taken strong { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 2px; }
.xch-v { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 13px; color: var(--dim); }
.xch-v b { color: var(--ink); }
.xch.is-eg { opacity: .55; }
.xch.is-new .xch-b { animation: land .7s ease-out; }
@keyframes land { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- the side column ---------- */
.sidecol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tickertape { border-top: 3px solid var(--ink); padding-top: 8px; }
.tickertape-h { display: flex; justify-content: space-between; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px; }
.tickertape-h span:last-child { color: var(--dim); }
.tickertape-l { list-style: none; margin: 0; padding: 0; font: 12.5px/1.45 var(--mono); max-height: 320px; overflow: auto; }
.tickertape-l li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px dotted var(--rule); }
.tickertape-l time { color: var(--faint); }
.tickertape-l .is-bout span { color: var(--blue); }
.tickertape-l .is-hush { display: block; color: var(--dim); font-family: var(--serif); font-size: 14px; }
.tickertape-l .is-eg { opacity: .5; }
.tickertape-l .is-print span { animation: type .9s steps(18); overflow: hidden; white-space: nowrap; display: inline-block; max-width: 100%; }
@keyframes type { from { max-width: 0; } to { max-width: 100%; } }

.figures { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.figures div { padding: 10px 4px; text-align: center; border-left: 1px solid var(--rule); }
.figures div:first-child { border-left: 0; }
.figures b { display: block; font: 700 21px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.figures span { font: 10.5px/1.2 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }

.housenote { font-size: 14.5px; }
.housenote-h { font: 400 24px/1.1 var(--plate); margin-bottom: 6px; }
.housenote ol { margin: 0; padding-left: 18px; }
.housenote li { margin-bottom: 6px; }
.worked { margin-top: 10px; border: 1px solid var(--rule); border-radius: 4px; padding: 10px; }
.worked-h { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 8px; }
.worked-g { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; font: 13px/1.35 var(--mono); }
.worked-g span:nth-child(3n) { text-align: right; font-weight: 600; }
.worked p { margin: 8px 0 0; color: var(--dim); font-size: 13.5px; }

/* ---------- footer ---------- */
.pressline { max-width: 1180px; margin: 22px auto 0; padding: 14px 18px 18px; border-top: 3px double var(--rule); font-size: 12.5px; color: var(--dim);
  display: flex; flex-direction: column; gap: 4px; }
.pressline code { font-size: 11.5px; color: var(--ink); overflow-wrap: anywhere; }
.pressline nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pressline img { width: 28px; height: 28px; border-radius: 6px; vertical-align: middle; margin-right: 6px; }

/* ---------- the CA dock (fixed, above the thumb) ---------- */
.wireca { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--ground); border-radius: 12px; padding: 8px 8px 8px 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.wireca-k { font: 700 10px/1.1 var(--mono); letter-spacing: .08em; flex: none; max-width: 52px; }
.wireca-a { flex: 1; min-width: 0; font: 600 10.5px/1.25 var(--mono); overflow-wrap: anywhere; user-select: all; }
.wireca-a.is-pending { color: #5B5A57; user-select: none; }
.wireca-c { flex: none; background: var(--ground); color: var(--ink); border: 0; border-radius: 8px; padding: 9px 12px; font: 700 13px/1 var(--mono); }
.wireca-c.is-done { background: var(--blue); color: var(--ground); }
.wireca-g { flex: none; font: 11px/1 var(--mono); color: #34507F; }

/* ---------- drawer + toast ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(8, 9, 11, .72); display: flex; align-items: flex-end; justify-content: center; }
.drawer[hidden] { display: none; }
.drawer-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px 14px 0 0; width: 100%; max-width: 560px; max-height: 80vh; overflow: auto; padding: 14px; }
.drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.drawer-top button { background: transparent; border: 1px solid var(--rule); color: var(--ink); border-radius: 8px; padding: 4px 10px; }
.drawer-list { list-style: none; margin: 0; padding: 0; font: 12.5px/1.5 var(--mono); }
.drawer-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.drawer-wallets { display: flex; flex-direction: column; gap: 6px; }
.drawer-wallets button { display: flex; align-items: center; gap: 10px; background: var(--ground); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; padding: 10px; }
.drawer-wallets img { width: 24px; height: 24px; }
.cd-toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--blue); color: var(--ground); padding: 8px 14px;
  border-radius: 8px; font: 600 13px/1.2 var(--mono); z-index: 70; }

/* ---------- tablet ---------- */
@media (min-width: 700px) {
  .frontpage { padding: 18px 28px 16px; }
  .nameplate { font-size: 64px; }
  .standfirst { font-size: 16px; }
  .leadgraf { font-size: 19px; columns: 2; column-gap: 28px; column-rule: 1px solid var(--rule); }
  .broadsheet { padding: 16px 28px 0; }
  .deskroom { padding: 18px; }
  .callslip { padding: 14px; }
  .callslip-amt { font-size: 40px; }
  .dial input { font-size: 34px; }
  .versus { font-size: 36px; }
  .xch-b strong { font-size: 22px; }
  .wireca { left: 50%; right: auto; transform: translateX(-50%); width: min(720px, calc(100% - 40px)); }
  .wireca-k { max-width: none; }
  .wireca-a { font-size: 12.5px; }
}
/* ---------- desktop: the desk left, the wire + rules right ---------- */
@media (min-width: 1000px) {
  .nameplate { font-size: 84px; margin: 10px 0 6px; }
  .leadgraf { font-size: 20px; columns: 3; }
  .broadsheet { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .deskroom { padding: 24px; }
  .callslip-amt { font-size: 54px; }
  .dial input { font-size: 44px; }
  .versus { font-size: 48px; }
  .callslip { padding: 18px; gap: 6px; }
  .odds { font-size: 16px; }
  .sidecol { position: sticky; top: 16px; }
  .tickertape-l { max-height: 360px; }
  .pressline { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
}
