/* HALDEN NEWS (dist/newswire.js): the newswire beside The Wire, in the same .newsdesk block. A plain wire-terminal look:
   time, a desk tag, the headline; FLASHes in capitals with a red rule. Fixed heights (title bar, body) so a new item never
   shifts the trading floor. Tahoma stack with tabular figures (terminal.css tokens). */
.newsdesk{margin-bottom:14px}
.newsdesk>.wire{margin-bottom:14px}
.newswire{border:1px solid var(--line);border-radius:var(--r2);background:linear-gradient(180deg,var(--s2),var(--s1));box-shadow:inset 3px 0 0 #ff8a3d,var(--bezel);overflow:hidden}
.nw-top{display:flex;align-items:center;gap:12px;height:32px;box-sizing:border-box;padding:0 8px 0 14px;border-bottom:1px solid var(--line);overflow:hidden}
.nw-top h2{margin:0;color:#ffb27a;font:400 13px/1 var(--pix);letter-spacing:.08em;white-space:nowrap}
.nw-desks{display:flex;gap:4px;margin-left:auto;min-width:0}
.nw-desks button{min-width:44px;height:24px;padding:0 8px;border:1px solid var(--line-2);border-radius:3px;background:transparent;color:var(--tx-2);font:700 9px/1 var(--num);letter-spacing:.08em;cursor:pointer;touch-action:manipulation;white-space:nowrap}
.nw-desks button[aria-pressed="true"]{border-color:#ff8a3d;color:#ffd2b0;background:#ff8a3d14}
.nw-body{height:196px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line-3) transparent}
.nw-off{display:grid;place-items:center start;height:100%;box-sizing:border-box;margin:0;padding:0 14px;color:var(--tx-2);font:500 11px/1.3 var(--num);letter-spacing:.06em}
.nw-list{margin:0;padding:0;list-style:none}
.nw-day{position:sticky;top:0;z-index:1;padding:3px 14px;border-bottom:1px solid var(--line);background:var(--s2);color:var(--tx-3);font:700 9px/1.3 var(--num);letter-spacing:.12em}
.nw-item{border-bottom:1px solid var(--line)}
.nw-row{display:grid;grid-template-columns:40px 92px minmax(0,1fr);align-items:baseline;gap:10px;width:100%;min-height:36px;box-sizing:border-box;margin:0;padding:7px 14px;border:0;background:transparent;color:var(--tx);font:500 13px/1.35 var(--ui);text-align:left;cursor:pointer;touch-action:manipulation}
.nw-row:hover{background:#ffffff06}
.nw-row:focus-visible,.nw-desks button:focus-visible,.nw-wire:focus-visible{outline:2px solid var(--amber-2);outline-offset:-2px}
.nw-row time{color:var(--tx-2);font:500 11px/1.3 var(--num);font-variant-numeric:tabular-nums}
.nw-tag{min-width:0;color:var(--tx-2);font:700 9px/1.3 var(--num);letter-spacing:.08em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nw-head{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nw-row[aria-expanded="true"] .nw-head{white-space:normal}
/* FLASH: capitals, a red rule and a red tag (the word says it too). UPDATE and STOCKS in their own tints. */
.k-flash .nw-row{box-shadow:inset 3px 0 0 var(--dn)}
.k-flash .nw-tag{color:var(--dn-2)}
.k-flash .nw-head{font-weight:700;letter-spacing:.01em}
.k-update .nw-tag{color:#ffb27a}
.k-markets .nw-tag{color:var(--up-2)}
.nw-item.fresh .nw-row{background:#ff8a3d12}
.nw-story{display:grid;gap:6px;padding:0 14px 10px 64px}
.nw-story p{margin:0;color:#d5dce4;font:400 13px/1.5 var(--ui)}
.nw-story p b{color:var(--tx);font-weight:700}
.nw-story small{color:var(--tx-2);font:500 10px/1.35 var(--num);letter-spacing:.03em}
.nw-wire{justify-self:start;min-height:32px;padding:4px 10px;border:1px solid var(--line-3);border-radius:4px;background:var(--s1);color:var(--up-2);font:700 10px/1 var(--num);letter-spacing:.08em;cursor:pointer;touch-action:manipulation}
/* Wide desks: The Wire and Halden side by side once there is room for both; stacked below that. */
@media(min-width:1400px){
  .newsdesk{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);gap:14px}
  .newsdesk>.wire{margin-bottom:0}
  .nw-top{gap:8px}
  .nw-desks button{flex:none;min-width:40px;padding:0 6px}
}
/* The narrow panel (beside The Wire, or a phone): time and tag on one line, the headline under it on up to two. */
@media(min-width:1400px),(max-width:720px){
  .nw-row{grid-template-columns:auto minmax(0,1fr);gap:3px 10px}
  .nw-row time{grid-row:1;grid-column:1}
  .nw-tag{grid-row:1;grid-column:2}
  .nw-head{grid-row:2;grid-column:1 / -1;white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
  .nw-row[aria-expanded="true"] .nw-head{display:block}
  .nw-story{padding:0 14px 10px}
}
@media(max-width:720px){
  .newsdesk{display:contents}
  .newsdesk>.wire{margin:0}
  .newswire{order:4;margin:0}
  .nw-top{flex-direction:column;align-items:stretch;justify-content:center;gap:6px;height:72px;padding:8px 12px}
  .nw-desks{margin-left:0}
  .nw-desks button{flex:1;height:30px;padding:0 4px}
  .nw-body{height:236px}
  .nw-row{padding:8px 12px}
  .nw-story{padding:0 12px 10px}
  .nw-wire{min-height:40px}
}
