/* Lab: the desk's briefing as notifications (lab-file.js). Compact printed alert cards: stacked on arrival, fanned out
   on a tap, one opening at a time to a small chart. */
.labfile .room-grid, .labfile .room-mini { display: none !important; }
.bn { margin-top: 20px; max-width: 680px; }
.bn-pane { display: none; }
/* wide screens, fanned out: a mail app, the list on the left and the open bulletin in a pane that stays in view */
@media (min-width: 1000px) {
  .bn.fanned { max-width: none; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .bn.fanned .bn-head { grid-column: 1 / -1; }
  .bn.fanned .bfile-full { grid-column: 1 / -1; }
  /* the pane is the opened message: as tall as the list, chart in the middle, actions at the foot */
  .bn.fanned { align-items: stretch; }
  .bn.fanned .bn-pane { display: flex; flex-direction: column; background: var(--panel); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--ink); padding: 0; overflow: hidden; }
  .bn-pane > .bn-mini { flex: 1; display: grid; align-items: center; padding: 6px 22px; }
  .bn-pane > .bn-what { margin: 0; padding: 0 22px; }
  .bn-pane > .bn-acts { margin: 0; padding: 14px 22px 18px; border-top: 1.5px solid var(--rule); margin-top: 12px; }
  .bn-from { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-bottom: 1.5px solid var(--rule); font-size: 13px; color: var(--ink-2); }
  .bn-from b { font-weight: 700; color: var(--ink); }
  .bn-from time { margin-left: auto; font: 500 11.5px var(--mono); color: var(--ink-3); }
  .bn-fic, .bn-fic svg { width: 30px; height: 24px; display: grid; place-items: center; }
  .bn-pane .bn-ph { margin: 16px 22px 14px; }
  .bn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 22px 8px; border: 1.5px solid var(--ink); border-radius: 2px; }
  .bn-stats > div { padding: 8px 12px 9px; border-left: 1px solid var(--rule); min-width: 0; }
  .bn-stats > div:first-child { border-left: 0; }
  .bn-stats dt { font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
  .bn-stats dd { margin: 3px 0 0; font: 700 18px/1.15 var(--cond); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bn.fanned .bn-item.open { background: color-mix(in srgb, var(--chip) 22%, var(--panel)); }
  .bn-pane .bn-mini { max-width: none; }
  .bn-pk { margin: 0; font: 700 12px var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
  .bn-ph { font: 800 26px/1.08 var(--cond); color: var(--ink); text-wrap: balance; }
}

/* the head: bell, title, the count of new bulletins, and the stack / fan switch */
.bn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bn-bell { width: 22px; height: 22px; display: grid; place-items: center; transform-origin: 50% 10%; }
.bn-bell svg { width: 22px; height: 22px; fill: var(--chip); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.bn-head b { font: 800 18px var(--cond); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.bn-count { font: 700 11.5px var(--mono); letter-spacing: .04em; padding: 2px 7px; border-radius: 2px; background: #E8412E; color: #fff; }
.bn-count.none { background: none; color: var(--ink-3); padding: 0; }
.bn-toggle { all: unset; cursor: pointer; margin-left: auto; font: 600 13px var(--sans); color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--chip); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bn-toggle:hover { color: var(--ink); }
.bn-toggle:focus-visible { outline: 3px solid var(--accent, #1E6FD9); outline-offset: 2px; }

/* the list: fanned out, a column of alerts; stacked, the top one with two edges peeking under it */
.bn-list { display: grid; gap: 8px; position: relative; isolation: isolate; }
.bn-list.stacked { gap: 0; padding-bottom: 16px; }
.bn-list.stacked .bn-item:not(:first-child) { display: none; }
.bn-list.stacked::before, .bn-list.stacked::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 22px; z-index: -1;
  background: var(--panel); border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 4px 4px; }
.bn-list.stacked::after { left: 26px; right: 26px; bottom: 0; z-index: -2; }

/* one alert */
.bn-item { background: var(--panel); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 3px 3px 0 var(--ink); }
.bn-row { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr) 10px; gap: 12px; align-items: center; padding: 10px 14px; }
.bn-row:focus-visible { outline: 3px solid var(--accent, #1E6FD9); outline-offset: -3px; }
.bn-ic { width: 40px; height: 34px; display: grid; place-items: center; }
.bn-ic svg { width: 40px; height: 34px; }
.bn-main { display: grid; gap: 2px; min-width: 0; }
.bn-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.bn-top b { font: 700 12px var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bn-top time { font: 500 11px var(--mono); color: var(--ink-3); white-space: nowrap; }
.bn-msg { font: 600 15.5px/1.3 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* phones: two lines rather than a cut-off line ending in "…" */
@media (max-width: 640px) { .bn-msg { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
.bn-item.open .bn-msg { white-space: normal; }
.bn-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.bn-item.unread .bn-dot { background: #E8412E; }
.bn-item.unread .bn-top b { color: var(--ink); }
.bn-row:hover .bn-msg { text-decoration: underline; text-decoration-color: var(--chip); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* opened: a small chart and two actions, inside the same card */
.bn-more { padding: 2px 14px 14px 66px; }
.bn-mini { max-width: 420px; }
.bn-mini .mini { display: block; width: 100%; height: auto; overflow: visible; }
.bn-what { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.bn-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.bn-open, .bn-next { all: unset; cursor: pointer; font: 700 14px var(--cond); letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 3px; }
.bn-open { background: var(--chip); color: #111418; box-shadow: 2px 2px 0 var(--ink); }
.bn-next { color: var(--ink); background: var(--panel); }
.bn-open:hover, .bn-next:hover { transform: translate(1px, 1px); }
.bn-open:focus-visible, .bn-next:focus-visible { outline: 3px solid var(--accent, #1E6FD9); outline-offset: 2px; }

/* the small charts' type */
.m-n { font: 500 12.5px var(--sans); fill: var(--ink-2); }
.m-v { font: 600 12px var(--mono); fill: var(--ink); font-variant-numeric: tabular-nums; }
.m-s { font: 500 11px var(--sans); fill: var(--ink-3); }
.m-axis { stroke: var(--ink); stroke-width: 1.5; }
.m-wait { margin: 0; padding: 30px 0; font: 500 13px var(--mono); color: var(--ink-3); }
.m-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: 2px; }
.m-days > div { display: grid; justify-items: center; align-content: start; gap: 3px; padding: 8px 4px 10px; text-align: center; border-left: 1px solid var(--rule); }
.m-days > div:first-child { border-left: 0; }
.m-days b { font: 700 13px var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.m-days span svg { width: 40px; height: 32px; }
.m-days small { font-size: 11px; line-height: 1.25; color: var(--ink-2); }
.m-news { list-style: none; margin: 0; padding: 0; }
.m-news li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 13.5px; line-height: 1.35; }
.m-news li:first-child { border-top: 0; padding-top: 0; }
.m-news b { font-weight: 600; color: var(--ink); }
.m-news small { flex: none; font: 500 11px var(--mono); color: var(--ink-3); padding-top: 2px; }

/* arrival: the bell rings once, the top bulletin drops in; fanning out deals the rest in order */
@media (prefers-reduced-motion: no-preference) {
  .bn.arrived .bn-bell { animation: bnring .9s ease-out .15s both; }
  .bn.arrived .bn-list.stacked .bn-item:first-child { animation: bndrop .45s cubic-bezier(.2, 1.3, .4, 1) both; }
  .bn.arrived .bn-count { animation: bnpop .35s cubic-bezier(.2, 1.6, .4, 1) .35s both; }
  .bn.ping .bn-bell { animation: bnring .9s ease-out both; }
  .bn.ping .bn-count { animation: bnpop .35s cubic-bezier(.2, 1.6, .4, 1) .1s both; }
  .bn.ping .bn-list.stacked .bn-item:first-child { animation: bndrop .45s cubic-bezier(.2, 1.3, .4, 1) both; }
  .bn-list:not(.stacked) .bn-item { animation: bndeal .28s ease-out both; animation-delay: calc(var(--n) * 35ms); }
  .bn-item.open .bn-more, .bn-pane > * { animation: bnopen .22s ease-out both; }
}
@keyframes bnring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@keyframes bndrop { from { opacity: 0; transform: translateY(-16px); } }
@keyframes bnpop { from { transform: scale(.4); opacity: 0; } }
@keyframes bndeal { from { opacity: 0; transform: translateY(-8px); } }
@keyframes bnopen { from { opacity: 0; transform: translateY(-4px); } }

.bfile-full { margin-top: 26px; }
.bfile-full:not(.on) { display: none; }
.labfile .bfile-full > .dk-inst { width: auto; margin: 0 !important; padding: 0 !important; }

@media (max-width: 600px) {
  .bn-row { grid-template-columns: 34px minmax(0, 1fr) 9px; gap: 10px; padding: 9px 12px; }
  .bn-ic, .bn-ic svg { width: 34px; height: 28px; }
  .bn-msg { font-size: 14.5px; }
  .bn-more { padding: 2px 12px 12px; }
}

/* the unfolded chart: a ruled bar names it and closes it; the section's own heading is dropped (the bar says it) */
.bn-fullbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 0 0 10px; margin-bottom: 18px; border-bottom: 2px solid var(--ink); }
.bn-fullbar > span:not(.bn-trc) { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.bn-fullbar b { font: 800 24px var(--cond); color: var(--ink); }
.bn-fullbar > button { all: unset; cursor: pointer; margin-left: auto; font: 700 14px var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); padding: 4px 10px; border: 2px solid var(--ink); border-radius: 3px; }
.bn-fullbar > button:hover { background: color-mix(in srgb, var(--chip) 40%, var(--panel)); }
.labfile .bfile-full .sec-head h2 { display: none; }

/* the agenda (Coming up): day, time, report, its weather; the big one on a yellow rule */
.m-agenda { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.m-agenda td { padding: 5px 8px; border-top: 1px solid var(--rule); vertical-align: middle; }
.m-agenda tr:first-child td { border-top: 0; }
.m-agenda .d { width: 58px; padding-left: 0; line-height: 1.1; white-space: nowrap; }
.m-agenda .d b { display: block; font: 700 13px var(--cond); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.m-agenda .d small { font: 500 11px var(--mono); color: var(--ink-3); }
.m-agenda .t { width: 74px; font: 500 12px var(--mono); color: var(--ink-2); white-space: nowrap; }
.m-agenda .e { color: var(--ink); font-weight: 500; }
.m-agenda .e em { display: inline-block; margin-left: 8px; font: 700 10px var(--mono); font-style: normal; letter-spacing: .06em; text-transform: uppercase; padding: 1px 5px; border: 1.5px solid #111418; border-radius: 2px; background: #FFD400; color: #111418; vertical-align: 1px; }
.m-agenda .w { width: 34px; padding-right: 0; }
.m-agenda .w svg { width: 30px; height: 24px; display: block; }
.m-agenda tr.big td { background: color-mix(in srgb, var(--chip) 16%, transparent); }
.m-agenda tr.big .e { font-weight: 700; }
.m-agenda tr.big td:first-child { box-shadow: inset 4px 0 0 var(--chip); padding-left: 10px; }
.m-agenda .m-gap td { padding: 4px 0; border-top: 1px dashed var(--rule); font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
/* on a wide screen the pane carries the whole line, so the list row stays one line (it never grows when opened) */
@media (min-width: 1000px) { .bn.fanned .bn-item.open .bn-msg { white-space: nowrap; } }

/* the list sets the block's height; the pane fills exactly that and never adds to it (height 0 + min-height 100% keeps
   it out of the row's sizing). A longer sheet scrolls inside the chart area, so nothing on the page moves. */
@media (min-width: 1000px) {
  .bn.fanned .bn-pane { height: 0; min-height: 100%; box-sizing: border-box; }
  .bn-pane > .bn-mini { min-height: 0; overflow-y: auto; align-items: start; overscroll-behavior: contain; }
}
.m-sq { fill: #D6161B; }

/* a bulletin whose story changed since it was read: "Updated" in the alert red where its time was */
.bn-item.updated time { color: #E8412E; font-weight: 700; }

/* ---------- the teaser card (1200x630, photographed for emails and Telegram) ---------- */
body.cardmode { overflow: hidden; }
body.cardmode > *:not(.mwcard):not(.mwmap) { display: none !important; }
.mwcard { position: fixed; inset: 0 auto auto 0; width: 1200px; height: 630px; display: grid; grid-template-columns: 430px 1fr; grid-template-rows: 100%; background: #F6F8FA; color: #111418;
  border: 4px solid #111418; box-sizing: border-box; font-family: var(--sans); overflow: hidden; }
.mc-left { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 30px 30px 28px; background: #FFF3B0; border-right: 3px solid #111418; }
.mc-brand { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 26px var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.mc-date { margin: 0 0 6px; font: 600 14px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #3B4C63; }
.mc-now { display: flex; align-items: center; gap: 14px; }
.mc-ic { width: 110px; height: 96px; display: grid; place-items: center; } .mc-ic svg { width: 110px; height: auto; }
.mc-deg { font: 800 120px/.85 var(--cond); }
.mc-sky { margin: 4px 0 0; font: 800 30px/1.05 var(--cond); }
.mc-risk { margin: 0; font: 600 16px var(--sans); color: #3B4C63; }
.mc-today { margin: 10px 0 0; font: 500 19px/1.4 var(--sans); color: #111418; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mc-cta { margin: auto 0 0; align-self: flex-start; padding: 10px 16px; background: #FFD400; border: 2.5px solid #111418; border-radius: 3px; box-shadow: 4px 4px 0 #111418; font: 800 19px var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.mc-right { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; padding: 22px; min-width: 0; min-height: 0; }   /* rows can't grow past the card */
.mc-p { display: flex; flex-direction: column; gap: 4px; min-width: 0; background: #fff; border: 2.5px solid #111418; border-radius: 3px; padding: 12px 14px 0; overflow: hidden; }
.mc-p.big { grid-column: 1 / -1; }   /* the lead chart runs across the top; the other two sit side by side under it */
.mc-k { margin: 0; font: 600 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #56657A; }
.mc-h { margin: 0; font: 700 17px/1.25 var(--sans); }
.mc-p.big .mc-h { font-size: 20px; }
/* the teaser: the chart fades out at the bottom, so the card shows enough to want the rest */
.mc-chart { flex: 1; min-height: 0; margin-top: 6px; -webkit-mask-image: linear-gradient(#000 55%, transparent 98%); mask-image: linear-gradient(#000 55%, transparent 98%); }
.mc-chart .mini { width: 100%; height: auto; display: block; }
.mc-p.big .mc-chart .mini { transform-origin: top left; }
.mwcard .m-n { fill: #3B4C63; } .mwcard .m-v { fill: #111418; }

/* the traders chip sits between the name and Close; Close keeps the right edge */
.bn-fullbar .bn-trc { margin-left: auto; } .bn-fullbar .bn-trc:not(:empty) + button { margin-left: 0; }

/* the New to markets card: four plain tiles instead of charts */
.mc-right.plain { display: block; }
.mc-plain { height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; }
.mc-pt { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: #fff; border: 2.5px solid #111418; border-radius: 3px; overflow: hidden; }
.mc-pic { position: absolute; top: 12px; right: 14px; width: 64px; } .mc-pic svg { width: 64px; height: auto; display: block; }
.mc-ph { margin: 2px 74px 0 0; font: 800 26px/1.08 var(--cond); color: #111418; }
.mc-pv { margin: 2px 0 0; font: 700 22px var(--mono); color: #111418; }
.mc-pm { margin: auto 0 0; font: 500 15px/1.35 var(--sans); color: #3B4C63; }

/* a paid plan's card: an edition stamp in the plan's own sky (Pro: northern lights at night; Advanced: the green-grey
   sky before a twister), square under ink like the rest of the chart */
.mwcard .mc-left { position: relative; }
.mc-date { display: flex; align-items: center; gap: 12px; }
.mc-stamp { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 4px; border: 2px solid #111418; border-radius: 3px; box-shadow: 2px 2px 0 #111418; font: 800 14px var(--cond); letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.mc-stamp.sky-aurora { background: #17213A; color: #F3F5F8; }
.mc-stamp.sky-twister { background: #D5DDC8; color: #111418; }
.mc-sic { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 18px; overflow: hidden; flex: none; } .mc-sic svg { width: 24px; height: 18px; }
.mc-today.short { -webkit-line-clamp: 2; }
.mc-change { margin: 10px 0 0; padding: 8px 10px; border: 2px solid #111418; border-radius: 3px; background: #F6F8FA; font: 500 15.5px/1.35 var(--sans); color: #111418; }
.mc-change b { display: block; margin-bottom: 2px; font: 700 11px var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: #3B4C63; }

/* the map of the day: a square card read at phone width (about a third of its size), so everything is big */

.mwmap { position: fixed; inset: 0 auto auto 0; width: 1080px; height: 1080px; display: grid; grid-template-rows: auto 1fr auto; background: #F6F8FA; color: #111418; border: 6px solid #111418; box-sizing: border-box; font-family: var(--sans); }
.mm-top { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 24px; padding: 30px 40px 26px; background: #FFF3B0; border-bottom: 5px solid #111418; }
.mm-brand { display: flex; align-items: center; gap: 14px; margin: 0; font: 800 40px var(--cond); letter-spacing: .05em; text-transform: uppercase; }
.mm-day { display: flex; align-items: center; gap: 14px; margin: 8px 0 0; font: 600 24px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #3B4C63; }
.mm-day .mc-stamp { font-size: 20px; padding: 3px 12px 3px 6px; } .mm-day .mc-sic { width: 30px; height: 22px; } .mm-day .mc-sic svg { width: 30px; height: 22px; }
.mm-sky { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 12px; margin: 0; font: 800 64px var(--cond); }
.mm-sky .mm-ic { display: inline-flex; width: 84px; } .mm-sky .mm-ic svg { width: 84px; height: auto; }
.mm-sky span:last-child { max-width: 220px; font: 700 26px/1.1 var(--cond); color: #3B4C63; }
.mm-body { display: grid; grid-template-rows: auto auto 1fr; min-height: 0; padding: 34px 40px 20px; }
.mm-k { margin: 0; font: 700 24px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #3B4C63; }
.mm-h { margin: 10px 0 0; font: 800 58px/1.06 var(--cond); letter-spacing: .005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mm-map { min-height: 0; margin-top: 26px; padding-left: 64px; overflow: visible; display: flex; align-items: center; }
.mm-map svg { width: 100%; height: auto; max-height: 100%; overflow: visible; }
.mm-go { margin: 0 40px 36px; padding: 20px 26px; background: #FFD400; border: 5px solid #111418; border-radius: 4px; box-shadow: 8px 8px 0 #111418; font: 800 40px var(--cond); letter-spacing: .06em; text-transform: uppercase; }
/* phones and Telegram: the "In full" bar is one line (what's open, and Close at the right), with the traders chip under it */
@media (max-width: 760px) {
  .bn-fullbar { row-gap: 10px; }
  .bn-fullbar > button { order: 2; margin-left: auto; }
  .bn-fullbar .bn-trc { order: 3; flex-basis: 100%; margin-left: 0; }
  .bn-fullbar .bn-trc:not(:empty) + button { margin-left: auto; }
  .bn-fullbar .bn-trc .tchip { font-size: 14px; }
}
