/* undercurrent: the live dashboard demo (assets/js/demo.js) and the hero's category chip.
   Light only, on cream. The app sits in a framed window on a soft, grainy cream panel.
   Rows wrap; the only truncation is a long watchlist name (ellipsis, the header stays on one row)
   and headlines when a watchlist is set to "Up to three lines". */

:root {
  --c-product: #00b3fe;
  --c-news: #8b939b;
  --c-jobs: #9a8c6e;
  --c-ir: #0070fe;
  --c-lead: #00318c;
  --c-site: #b0b6bc;
  --c-esg: #5b7da8;
  --c-pricing: #008dfd;
}
.c-product { --c: var(--c-product); } .c-news { --c: var(--c-news); } .c-jobs { --c: var(--c-jobs); } .c-ir { --c: var(--c-ir); }
.c-lead { --c: var(--c-lead); } .c-site { --c: var(--c-site); } .c-esg { --c: var(--c-esg); } .c-pricing { --c: var(--c-pricing); }

/* ---------------------------------------------------------------- hero: the demo follows directly */
.hero .hero-row:last-child { margin-bottom: 0; }
.hero { padding-bottom: 28px; }
@media (min-width: 960px) { .hero { padding-bottom: 40px; } }
.hc-cat { background: #fff; border-color: var(--line-2); color: var(--text); }
.hc-cat:hover, .hc-cat[aria-expanded="true"] { background: #fff; border-color: var(--blue); }
.hc-sw { width: .3em; height: 1.05em; border-radius: 2px; background: #0070fe; flex: none; transition: background-color .3s; }
.hc[data-cat="governance"] .hc-sw { background: #00318c; }
.hc[data-cat="commercial"] .hc-sw { background: #00b3fe; }
.hc[data-cat="esg"] .hc-sw { background: #5b7da8; }

/* ---------------------------------------------------------------- the frame: fuzzy brushed-aluminium panel with a copper accent and a soft vignette */
.demo-block { padding: 0 0 56px; }
@media (min-width: 960px) { .demo-block { padding-bottom: 80px; } }
/* desktop: the demo is about 80% of the content width, left-aligned with the other sections,
   leaving space on the right; auto-fit re-fits the app to it. Below 1280 px it keeps the full width. */
@media (min-width: 1280px) { .demo-block > .fr, .demo-block > .db-note { width: 80%; } }
/* a neutral brushed-aluminium frame (user 16 Oct: metallic, no blue cast): a light graphite-grey
   gradient lifted in the middle, a brushed grain (a stretched SVG feTurbulence), fine fuzzy noise on
   top and a soft vignette at the edges; every grey is neutral (equal R, G and B); no grid.
   Copper accent (user 16 Oct): a hairline copper edge, a faint warm sheen in the top right corner
   and a copper-toned app border; decorative only, no text sits on copper */
.fr { position: relative; isolation: isolate; border-radius: 18px; padding: clamp(10px, 3.2vw, 44px); background: #e2e2e2; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(184, 115, 51, .55), inset 0 0 0 3px rgba(255, 255, 255, .35); }
.fr::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 92% 6%, rgba(196, 128, 72, .2), rgba(196, 128, 72, 0) 70%),
    radial-gradient(65% 55% at 22% 14%, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%),
    radial-gradient(55% 60% at 84% 88%, rgba(248, 248, 248, .5), rgba(248, 248, 248, 0) 70%),
    radial-gradient(125% 105% at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(58, 58, 58, .22) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .9' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .42 0 0 0 0 .42 0 0 0 .4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #ededed, #dcdcdc 55%, #e6e6e6); }
/* fine fuzzy grain on top */
.fr::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .34 0 0 0 0 .34 0 0 0 0 .34 0 0 0 .8 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (min-width: 1800px) { .main { max-width: min(2600px, calc(100vw - var(--nav-w))); } .main > :not(.demo-block) { max-width: 1160px; } }
.db-note { margin-top: 10px; font-size: 11px; color: var(--dim); }

/* ---------------------------------------------------------------- the app window */
.app { position: relative; border: 1px solid #b98a62; border-radius: 7px; background: var(--card); font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 1px 2px rgba(30, 30, 30, .14), 0 12px 26px -16px rgba(30, 30, 30, .45); }
.db-nojs { padding: 20px; color: var(--muted); }
.app.db-ready .db-nojs { display: none; }
.app:not(.db-ready) > :not(.db-nojs) { display: none; }
/* no layout shift (perf, 16 Oct): with JavaScript on, the app has its final outer size from the first
   paint, before demo.js has built it: one screen inside the frame where the dashboard fits the
   window (the same query and sum as fit() in demo.js), else the flowing layout's fixed height */
:root:not(.no-js) .app:not(.db-ready) { height: min(86svh, 1100px); }
@media (min-width: 1024px) and (min-height: 560px) { :root:not(.no-js) .app:not(.db-ready) { height: calc(100vh - 2 * clamp(10px, 3.2vw, 44px)); } }
.app svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fbf8f1; border-radius: 7px 7px 0 0; font-size: 11px; }
.app-dots { display: inline-flex; gap: 5px; margin-right: 4px; }
.app-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); }
.app-title { font-size: 12px; color: var(--text); }
.app-spacer { flex: 1; }
.db-state { display: inline-flex; align-items: center; gap: 6px; color: var(--deep); font-size: 11.5px; }
.db-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: db-pulse 1.6s ease-in-out infinite; }
.app.paused .db-state { color: var(--dim); }
.app.paused .db-state::before { background: transparent; border: 1px solid var(--line-2); animation: none; }
@keyframes db-pulse { 50% { opacity: .25; } }
.db-clock { color: var(--text); font-size: 11px; }
.ab { min-height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; font-size: 11px; color: var(--text); cursor: pointer; }
.ab:hover { border-color: var(--text); }
.ab-pri { background: var(--blue); border-color: var(--blue); color: #fff; }
.ab-pri:hover { background: #005fd9; border-color: #005fd9; }
.ib { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.ib:hover:not(:disabled) { border-color: var(--line-2); color: var(--text); background: #fff; }
.ib:disabled { opacity: .35; cursor: default; }


/* ---------------------------------------------------------------- the panel grid: many narrow watchlists */
.db-grid { display: grid; gap: 5px; padding: 5px; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); grid-auto-rows: 190px; grid-auto-flow: row dense; background: var(--bg); border-radius: 0 0 7px 7px; }
.pn-C { grid-column: span 2; grid-row: span var(--span, 3); }
.pn-T { grid-row: span var(--span, 3); }
.pn-M { grid-row: span var(--span, 2); }
.pn-B { grid-column: span 2; grid-row: span var(--span, 4); }
@media (max-width: 559px) {
  .db-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 180px; }
  .pn-C { grid-column: span 1; grid-row: span var(--span, 4); }
  .pn-B { grid-column: span 1; grid-row: span var(--span, 4); }
  .pn-T { grid-row: span var(--span, 3); }
}
.pn { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--card); container-type: inline-size; transition: transform .24s cubic-bezier(.2, .7, .2, 1), box-shadow .2s; }
.pn-h { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; min-height: 28px; padding: 2px 2px 2px 1px; flex: none; border-bottom: 1px solid var(--line); background: #fff; border-radius: 4px 4px 0 0; }
.pn-grip { display: inline-grid; place-items: center; width: 16px; height: 26px; flex: none; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--dim); cursor: grab; touch-action: none; }
.pn-grip:hover { color: var(--text); background: var(--bg); }
.pn-grip svg { stroke-width: 2.4; }
.grid-dragging .pn-grip, .dragging .pn-grip { cursor: grabbing; }
.pn-ctl { display: flex; flex: none; align-items: center; gap: 1px; margin-left: auto; }
.pn-ctl .ib { width: 21px; height: 22px; }
@container (max-width: 262px) { .pn-ctl { gap: 0; } .pn-ctl .ib { width: 20px; } }
@container (max-width: 246px) { .pn-t { font-size: 9px; letter-spacing: .01em; padding: 3px 2px; } }
/* one header row at every width: the name gives way first and ends in an ellipsis */
.pn-t { flex: 1 1 auto; min-width: 0; padding: 3px 3px; border: 1px solid transparent; border-radius: 4px; background: transparent; text-align: left; font-size: 9px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.25; color: var(--text); cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-t:hover { border-color: var(--line); background: var(--bg); }
.pn-rn { flex: 1 1 auto; min-width: 0; height: 28px; padding: 0 6px; border: 1px solid var(--blue); border-radius: 4px; font: inherit; font-size: 12px; color: var(--text); background: #fff; }
.pn-rn:focus-visible { outline: 2px solid var(--pale-line); outline-offset: 1px; }
.pn-cnt { flex: none; font-size: 9px; color: var(--muted); white-space: nowrap; padding: 1px 3px; border-radius: 4px; }
/* flashes animate only opacity on an overlay (no background or colour animation, so no repaint per frame) */
.pn-cnt { position: relative; isolation: isolate; }
.pn-cnt.bump::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 4px; background: var(--pale); animation: db-flash 1s ease-out forwards; }
.pn-cnt.bump2::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 4px; background: var(--pale); animation: db-flash2 1s ease-out forwards; }
@keyframes db-flash { to { opacity: 0; } }
@keyframes db-flash2 { to { opacity: 0; } }
.pn-fb { position: relative; }
.pn-fb.on { color: var(--deep); border-color: var(--pale-line); background: var(--pale); }
.pn-fb.on { display: inline-flex; gap: 3px; width: auto; padding: 0 5px; }
.pn-fn { min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--deep); color: #fff; font-size: 8px; line-height: 14px; text-align: center; }
.pn-pop { position: absolute; z-index: 60; top: calc(100% + 4px); right: 4px; width: 214px; padding: 6px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; box-shadow: 0 18px 36px -18px rgba(15, 27, 42, .4); display: grid; gap: 1px; }
.pn-pop-h { padding: 2px 6px 4px; font-size: 10.5px; color: var(--dim); }
.pn-all { min-height: 28px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; text-align: left; font-size: 12px; color: var(--text); cursor: pointer; }
.pn-all[aria-pressed="true"] { background: var(--pale); color: var(--deep); }
.pn-all:hover { background: var(--bg); }
.pn-ck { display: flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 8px; border-radius: 5px; font-size: 12px; cursor: pointer; }
.pn-ck:hover { background: var(--bg); }
.pn-ck input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.pn-ck-sw { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.pn-q { flex: none; min-height: 22px; padding: 0 6px; white-space: nowrap; border: 1px solid var(--pale-line); border-radius: 999px; background: var(--pale); font-size: 10.5px; color: var(--deep); cursor: pointer; }
.pn-q[hidden] { display: none; }
.pn-menu { position: absolute; z-index: 60; top: calc(100% + 4px); right: 4px; min-width: 190px; padding: 4px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; box-shadow: 0 18px 36px -18px rgba(15, 27, 42, .4); }
.pn-mi { display: flex; width: 100%; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; text-align: left; font-size: 12px; color: var(--text); cursor: pointer; }
.pn-mi:hover:not(:disabled), .pn-mi:focus-visible { background: var(--bg); outline: none; }
.pn-mi:disabled { color: var(--dim); opacity: .5; cursor: default; }
.pn-mi[role="menuitemradio"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.pn-mi[aria-checked="true"]::before { background: var(--blue); border-color: var(--blue); }
.pn-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.pn-mh { padding: 4px 10px 2px; font-size: 10.5px; color: var(--dim); }
.pn-list { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
/* back to the top of a scrolled feed: inside the watchlist, hidden at the top */
.pn-top { position: absolute; z-index: 5; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 28px; min-width: 28px; padding: 0 6px; justify-content: center; border: 1px solid var(--line-2); border-radius: 14px; background: #fff; color: var(--text); font-size: 10.5px; cursor: pointer; box-shadow: 0 6px 14px -8px rgba(15, 27, 42, .45); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .15s, transform .15s; }
.pn-top.on { opacity: 1; transform: none; pointer-events: auto; }
.pn-top:hover { border-color: var(--text); }
.pn-top svg { width: 14px; height: 14px; stroke-width: 1.8; }
.pn-top-n { padding-right: 2px; color: var(--deep); white-space: nowrap; }
.pn-top-n:empty { display: none; }
.pn-empty { padding: 14px 12px; font-size: 12px; color: var(--muted); }

/* drag */
.drag-src { opacity: .4; outline: 2px dashed var(--pale-line); outline-offset: -2px; }
.drag-ghost { position: fixed; z-index: 300; margin: 0; pointer-events: none; overflow: hidden; opacity: .96; transform: rotate(1.2deg) scale(1.02); box-shadow: 0 30px 60px -20px rgba(15, 27, 42, .45); transition: none; }

/* ---------------------------------------------------------------- logos */
/* one shape for every company: a 22 px rounded square; a mark sits centred on white with padding,
   a monogram fills the square in the brand colour. Never a wordmark. */
.lg { position: relative; display: inline-grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 5px; overflow: hidden; font-size: 8px; letter-spacing: 0; line-height: 1; }
.lg.lg-img { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.lg img { display: block; width: 13px; height: 13px; object-fit: contain; }
.lg.lg-tile { background: #061d49; box-shadow: none; }
.lg.lg-tile img { width: 100%; height: 100%; object-fit: cover; }
.lg.lg-mono { box-shadow: inset 0 0 0 1px rgba(15, 27, 42, .08); }

/* ---------------------------------------------------------------- headlines view: one wrapped row per change */
/* importance shading: the left strip and the row tint deepen with importance (set by rule) */
.imp-l { --ib: #b7d6ff; --it: 2%; --iw: 2px; }
.imp-m { --ib: #4b95ff; --it: 6%; --iw: 3px; }
.imp-h { --ib: #00318c; --it: 11%; --iw: 4px; }
.hr { position: relative; display: flex; align-items: flex-start; border-bottom: 1px solid rgba(15, 27, 42, .07); background: color-mix(in srgb, #0070fe var(--it), var(--card)); box-shadow: inset var(--iw) 0 0 var(--ib); }
/* line 1: logo, ticker, time; line 2: the full headline across the panel (it wraps, never cut) */
.hr-b { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "lg tk tm" "h h h"; column-gap: 6px; row-gap: 2px; align-items: center; padding: 4px 2px 5px 7px; border: 0; background: transparent; text-align: left; font-size: 12px; line-height: 1.32; color: var(--text); cursor: pointer; }
.hr-b .lg { grid-area: lg; }
.hr-tk { grid-area: tk; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 10.5px; letter-spacing: .02em; color: var(--text); }
.hr-n { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 3px; background: var(--pale); color: var(--deep); font-size: 9px; line-height: 1.6; vertical-align: 1px; white-space: nowrap; }
.sc-li { position: relative; }
.hr.upd::after, .sc-li.upd::after { content: ""; position: absolute; inset: 0; background: rgba(0, 112, 254, .16); pointer-events: none; animation: db-flash 1.4s ease-out forwards; }
.sc-n { font-size: 10.5px; color: var(--deep); }
/* the ticker is the ticker: plain text in the normal ink, no chip and no importance shade */
.hr-tkt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em; line-height: 1.6; color: var(--text); }
.hr-tm, .sc-tm, .db-clock { font-family: var(--mono); }
.tag { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 9px; line-height: 1.6; letter-spacing: .01em; white-space: nowrap; color: color-mix(in srgb, var(--c) 72%, #0f1b2a); background: color-mix(in srgb, var(--c) 14%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 32%, transparent); }
.imp { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 9px; line-height: 1.6; white-space: nowrap; }
.imp.imp-l { background: #e6f1ff; color: #2a5ea8; }
.imp.imp-m { background: #4b95ff; color: #fff; }
.imp.imp-h { background: #00318c; color: #fff; }
.hr-h { grid-area: h; overflow-wrap: break-word; }
/* "Headline + three lines" (the default row style): three smaller, lighter lines under the
   headline: the page and what changed, then Was, then Now; hidden in "Headlines only" */
.hr-d { display: none; }
.pn-list.v-detail .hr-b { grid-template-areas: "lg tk tm" "h h h" "d d d"; }
.pn-list.v-detail .hr-d { grid-area: d; display: flex; flex-direction: column; min-width: 0; font-size: 10.5px; line-height: 1.38; color: var(--muted); overflow-wrap: break-word; }
.hr-dl { display: block; min-width: 0; }
.hr-dl b { font-weight: inherit; color: var(--deep); }
.hr-tm { grid-area: tm; font-size: 10.5px; color: var(--muted); }
.hr:hover, .hr.peeking { background: color-mix(in srgb, #0070fe calc(var(--it) + 4%), #fff); }
.hr-b:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 3px; }
.hr.in { animation: db-in .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes db-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.pl-i { margin: 3px 4px 0 0; }

/* page link (never navigates): icon-only in rows, full URL on scorecards */
.pl { display: inline-flex; align-items: flex-start; gap: 4px; flex: none; padding: 3px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--deep); font-size: 10.5px; line-height: 1.3; text-align: left; cursor: pointer; position: relative; }
.pl svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.pl:hover { border-color: var(--pale-line); background: var(--pale); }
.pl-u { overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--pale-line); text-underline-offset: 2px; }
.pl-said::after { content: "Example link: opens the live page in the product"; position: absolute; z-index: 70; right: 0; top: calc(100% + 4px); width: max-content; max-width: 220px; padding: 5px 8px; border-radius: 5px; background: var(--text); color: #fff; font-size: 10.5px; line-height: 1.35; white-space: normal; }

/* ---------------------------------------------------------------- scorecards (cards view and the peek) */
/* scorecards stack vertically in one column with tight spacing (user 16 Oct): the panel
   holds one whole card and the next row shows below it; only a vertical
   scrollbar, no snapping (see fitCards in demo.js) */
.pn-list.v-cards { display: grid; grid-template-columns: repeat(var(--cn, 1), minmax(0, 1fr)); grid-auto-rows: auto; gap: 3px; padding: 3px; align-content: start; overflow-x: hidden; overflow-y: auto; overflow-anchor: none; }
/* compact cards in a scorecard watchlist: small inner padding and gaps (the peek keeps its own) */
.pn-list.v-cards .sc { gap: 2px; padding: 4px 6px 5px; line-height: 1.3; }
.pn-list.v-cards .sc .pl { padding: 1px 3px; }
.pn-list.v-cards .sc-ba2 { gap: 0; padding: 2px 5px; }
.pn-list.v-cards .sc-why { padding: 2px 6px; }
.pn-list.v-cards .sc-sec { gap: 0; }
.pn-list.v-cards > .sc-li { min-width: 0; }
.sc-li > .sc { cursor: pointer; }
.sc { position: relative; display: grid; gap: 5px; align-content: start; padding: 8px 9px; border: 1px solid var(--line); border-left: var(--iw, 3px) solid var(--ib, var(--c)); border-radius: 4px; background: #fff; font-size: 12px; line-height: 1.4; color: var(--text); min-width: 0; }
.sc-li > .sc:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.sc-li.in { animation: db-in .5s cubic-bezier(.2, .7, .2, 1) both; }
.sc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.sc-tk { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--text); }
.sc-co { color: var(--muted); flex: 1 1 auto; }
.sc-tm { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.sc-pg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.sc-page { color: var(--text); }
.sc-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--dim); }
.sc-cat::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c); }
.sc .pl { justify-self: start; margin-left: -3px; }
.sc-desc { font-size: 13px; }
.sc-why { display: grid; gap: 1px; padding: 6px 8px; border-radius: 0 6px 6px 0; border-left: 2px solid var(--blue); background: var(--pale); color: var(--deep); }
.sc-why-k { font-size: 10.5px; color: var(--deep); }
.sc-ba { display: grid; gap: 5px; }
@container (min-width: 420px) { .sc-ba { grid-template-columns: 1fr 1fr; } }
.peek .sc-ba { grid-template-columns: 1fr 1fr; }
.sc-bc { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); min-width: 0; }
.dt-h { display: block; font-size: 9px; color: var(--deep); margin-bottom: 1px; }
.dt-text { display: block; font-size: 11.5px; line-height: 1.45; overflow-wrap: break-word; }
.dt-text del { color: var(--dim); text-decoration: line-through; background: var(--sand); border-radius: 2px; padding: 0 2px; }
.dt-text ins { color: var(--blue); text-decoration: none; background: var(--pale); border-radius: 2px; padding: 0 2px; }
.sc-rule { font-size: 10.5px; color: var(--muted); }
.sc-rule b { font-weight: var(--weight); color: var(--deep); }

/* the peek: a headline row opens into its scorecard, laid over the dashboard (no reflow) */
/* a hover preview never blocks the pointer; a clicked (pinned) scorecard takes clicks, e.g. on its page link */
/* open and close animate only transform and opacity (composited); a swap to the next row is instant */
.sc.peek { pointer-events: none; position: absolute; z-index: 50; contain: layout style; will-change: opacity, transform; box-shadow: 0 2px 6px rgba(15, 27, 42, .08), 0 26px 52px -22px rgba(15, 27, 42, .45); opacity: 0; transform: scale(.985) translateY(-3px); transform-origin: 50% 0; transition: opacity .12s cubic-bezier(.2, .8, .2, 1), transform .16s cubic-bezier(.2, .8, .2, 1); }
.sc.peek.up { transform-origin: 50% 100%; transform: scale(.985) translateY(3px); }
.sc.peek.on { opacity: 1; transform: none; }
.sc.peek.swap { transition: none; }
.sc.peek.off { pointer-events: none !important; opacity: 0; transform: scale(.99); transition: opacity .1s ease-in, transform .1s ease-in; }
.sc.peek.pinned { pointer-events: auto; border-color: var(--pale-line); border-left-color: var(--c); box-shadow: 0 0 0 2px var(--pale), 0 26px 52px -22px rgba(15, 27, 42, .45); }

/* ---------------------------------------------------------------- add / edit companies dialog */
.dlg { width: min(460px, calc(100vw - 24px)); max-height: min(680px, calc(100vh - 24px)); padding: 0; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--text); box-shadow: 0 30px 60px -30px rgba(15, 27, 42, .5); }
.dlg::backdrop { background: rgba(15, 27, 42, .3); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg form { display: flex; flex-direction: column; min-height: 0; max-height: inherit; }
.dlg-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dlg-h h3 { font-size: 16px; letter-spacing: -0.01em; line-height: 1.25; overflow-wrap: break-word; }
.dlg-b { display: grid; gap: 10px; padding: 12px 14px; overflow-x: hidden; overflow-y: auto; min-height: 0; }
.dlg-f { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 7px 7px; }
.dlg-n { margin-right: auto; font-size: 11px; color: var(--dim); }
.dlg-q { width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; color: var(--text); }
.dlg-q:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.dlg-hint { font-size: 12px; color: var(--muted); }
.dlg-list { display: grid; gap: 2px; max-height: 340px; overflow-y: auto; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.dlg-o, .dlg-e { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 6px; border-radius: 6px; font-size: 12px; }
.dlg-o { cursor: pointer; }
.dlg-o:hover, .dlg-e:hover { background: var(--bg); }
.dlg-o input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--blue); }
.dlg-tk { width: 50px; flex: none; color: var(--text); font-family: var(--mono); font-size: 11px; }
.dlg-nm { flex: 1; min-width: 0; color: var(--text); overflow-wrap: break-word; }
.dlg-none { padding: 12px; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- reduced motion: no animation, no scale */
/* auto-fit (desktop windows): the app is exactly one screen tall; the grid fills what the bar leaves */
.app.fit { display: flex; flex-direction: column; }
.app.fit > .app-bar { flex: none; }
.db-grid.measuring .pn-list { display: none; }
/* off-screen panels on the flowing (phone) layout skip rendering until scrolled to */
.app:not(.fit) .pn { content-visibility: auto; contain-intrinsic-size: auto 360px; }
/* the dashboards share one stage under the bar; the one on screen fills it */
.db-stage { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 0; }
.app.fit > .db-stage, .app.db-ready:not(.fit) > .db-stage { flex: 1 1 auto; min-height: 0; }
.app.fit .db-stage > .db-grid { flex: 1 1 auto; min-height: 0; overflow: hidden; align-content: start; }
/* the flowing layout (phones, tablets) also keeps one outer size on every tab: the app is a fixed
   height and the dashboard scrolls inside it (vertically only) */
.app.db-ready:not(.fit) { display: flex; flex-direction: column; height: min(86svh, 1100px); }
.app.db-ready:not(.fit) > .app-bar { flex: none; }
.app.db-ready:not(.fit) .db-stage > .db-grid { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; align-content: start; }

@media (prefers-reduced-motion: reduce) {
  .app *, .app *::before, .hc-sw, .pn, .sc.peek { animation: none !important; transition: none !important; }
  .sc.peek, .sc.peek.up { transform: none; opacity: 1; }
}

/* ---------------------------------------------------------------- scorecard detail (v6) */
.sc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; }
.sc-page { color: var(--muted); font-size: 10.5px; }
.sc-n { font-size: 10.5px; color: var(--deep); background: var(--pale); padding: 0 5px; border-radius: 3px; }
.sc-head { font-size: 12.5px; color: var(--text); }
.sc-sec { display: grid; gap: 1px; }
.sc-k { font-size: 9px; color: var(--deep); }
.sc-v, .sc-sec .dt-text { font-size: 11.5px; line-height: 1.45; color: var(--text); }
.sc-ba2 { display: grid; gap: 2px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
.sc-bar2 { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); gap: 6px; align-items: baseline; }
.sc-bk { font-size: 9px; color: var(--deep); }
.sc-bar2 .dt-text { font-size: 11.5px; line-height: 1.4; }
.sc-why { padding: 4px 7px; border-left: 2px solid var(--blue); border-radius: 0 4px 4px 0; background: var(--pale); }
.sc-why .sc-v { color: var(--deep); }
.sc-hl { display: grid; gap: 1px; font-size: 10.5px; color: var(--muted); }
.sc-hl time { color: var(--text); margin-right: 2px; }
.sc-x { position: absolute; top: 4px; right: 4px; z-index: 2; background: #fff; border-color: var(--line); }
.sc-xp svg { width: 14px; height: 14px; }
/* expanded in place: the same card grows wider and taller where it is (kept inside the app),
   with the snapshot and history in a right-hand column; the size change is a FLIP transform */
.sc.pinned .sc-top { padding-right: 26px; }

/* the illustrative snapshot: a believable mini page per kind of change, never a real screenshot.
   Sized in em from .snp, so the expanded card scales it up in one place. */
.snp { margin: 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; font-size: 12px; }
.snp-bar { display: flex; align-items: center; gap: .6em; padding: .25em .6em; border-bottom: 1px solid var(--line); background: var(--bg); font-size: .95em; color: var(--dim); }
.snp-dots { width: 1.8em; height: .5em; flex: none; background: radial-gradient(circle, var(--line-2) .2em, transparent .25em) 0 0 / .6em .5em repeat-x; }
.snp-url { overflow-wrap: anywhere; }
.snp-ps { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.snp-p { display: grid; align-content: start; gap: .35em; padding: .45em .6em .7em; background: #fff; min-width: 0; }
.snp-k { font-size: .85em; color: var(--deep); }
.snp-a .snp-k { color: var(--deep); }
.snp-pg { display: grid; gap: .45em; align-content: start; min-width: 0; padding: .45em .5em .55em; border: 1px solid var(--line); border-radius: 3px; background: var(--card); }
.snp-nav { display: flex; align-items: center; gap: .45em; padding-bottom: .4em; border-bottom: 1px solid var(--line); }
.snp-mk { width: .9em; height: .9em; border-radius: .2em; flex: none; }
.snp-nl { width: 1.6em; height: .35em; border-radius: .2em; background: var(--line); }
.snp-nav .snp-nl:first-of-type { margin-left: auto; }
.snp-t { font-size: 1.15em; line-height: 1.2; color: var(--text); overflow-wrap: break-word; }
.snp-b { display: grid; gap: .3em; align-content: start; min-width: 0; }
.snp-h { font-size: .95em; color: var(--muted); }
.snp-ln { display: block; height: .4em; border-radius: .2em; background: #ece7dc; }
.snp-ln.w3 { width: 30%; } .snp-ln.w4 { width: 40%; } .snp-ln.w5 { width: 50%; } .snp-ln.w6 { width: 60%; } .snp-ln.w7 { width: 70%; } .snp-ln.w8 { width: 80%; } .snp-ln.w9 { width: 92%; }
/* lists */
.snp-ul { display: grid; gap: .25em; }
.snp-li { display: flex; align-items: center; gap: .45em; min-width: 0; padding: .2em .4em; border-radius: .25em; background: #fff; border: 1px solid var(--line); font-size: 1em; line-height: 1.3; overflow-wrap: anywhere; }
.snp-li > span { min-width: 0; }
.snp-bu { width: .35em; height: .35em; border-radius: 50%; background: var(--line-2); flex: none; }
.snp-ix { font-style: normal; width: 1.3em; flex: none; color: var(--dim); }
.snp-ck { font-style: normal; color: var(--deep); flex: none; }
.snp-fq { font-style: normal; color: var(--dim); flex: none; order: 2; margin-left: auto; }
.snp-ft { font-style: normal; flex: none; font-size: .75em; padding: .1em .3em; border-radius: .2em; background: var(--deep); color: #fff; }
.snp-nd { width: 2.4em; height: .45em; border-radius: .2em; background: var(--line); flex: none; }
.snp-mv { font-style: normal; margin-left: auto; color: var(--blue); flex: none; }
.snp-dim { color: var(--dim); }
.snp-pin { width: .55em; height: .55em; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--line-2); flex: none; }
/* document card */
.snp-file { display: flex; align-items: center; gap: .6em; padding: .45em .55em; border: 1px solid var(--line); border-radius: .3em; background: #fff; min-width: 0; }
.snp-fi { position: relative; display: grid; place-items: end center; width: 2.2em; height: 2.8em; flex: none; border-radius: .2em; background: linear-gradient(135deg, #fff 70%, var(--line) 70%); border: 1px solid var(--line-2); padding-bottom: .3em; }
.snp-fi b { font-weight: var(--weight); font-size: .7em; padding: .05em .25em; border-radius: .15em; background: var(--deep); color: #fff; }
.snp-fx { display: grid; gap: .15em; min-width: 0; }
.snp-fn { font-size: 1.05em; overflow-wrap: anywhere; }
.snp-fm { display: flex; flex-wrap: wrap; gap: .2em .45em; font-size: .95em; color: var(--muted); }
.snp-fu { font-size: .85em; color: var(--dim); overflow-wrap: anywhere; }
/* table: added rows and changed cells marked */
.snp-tb { display: grid; border: 1px solid var(--line); border-radius: .25em; overflow: hidden; background: #fff; }
.snp-th, .snp-td { padding: .25em .45em; border-bottom: 1px solid var(--line); font-size: .95em; overflow-wrap: anywhere; min-width: 0; }
.snp-th { background: var(--bg); color: var(--dim); font-size: .85em; }
.snp .snp-cell { background: var(--pale); color: var(--deep); box-shadow: inset 0 0 0 1px var(--blue); }
.snp .snp-cell-old { color: var(--dim); text-decoration: line-through; background: var(--sand); }
.snp .snp-row { background: var(--pale); color: var(--deep); }
.snp .snp-row-old { color: var(--dim); text-decoration: line-through; background: var(--sand); }
.snp-fm .snp-cell, .snp-fm .snp-cell-old { padding: 0 .25em; border-radius: .2em; }
/* image swap */
.snp-img { position: relative; display: block; aspect-ratio: 16 / 7; border-radius: .3em; overflow: hidden; }
.snp-img-b { background: linear-gradient(160deg, #efe4cc, #d9cba9); }
.snp-img-a { background: linear-gradient(160deg, #d8e8ff, #8db9f5); }
.snp-sun { position: absolute; width: 22%; aspect-ratio: 1; border-radius: 50%; right: 12%; top: 14%; background: rgba(255, 255, 255, .75); }
.snp-img-a .snp-sun { left: 10%; right: auto; top: 22%; }
.snp-hill { position: absolute; left: -10%; right: -10%; bottom: -40%; height: 80%; border-radius: 50%; background: rgba(15, 27, 42, .14); }
.snp-img-a .snp-hill { left: 20%; right: -30%; background: rgba(0, 49, 140, .22); }
.snp-cap2 { font-size: .85em; color: var(--dim); }
/* layouts */
.snp-sec { display: flex; align-items: center; gap: .4em; padding: .35em .5em; border: 1px dashed var(--line-2); border-radius: .25em; background: #fff; font-size: .95em; flex-wrap: wrap; }
.snp-sec .snp-ln { flex: 1 0 100%; }
.snp-long { display: grid; gap: .3em; }
.snp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3em; }
.snp-tiles .snp-pf { display: grid; justify-items: center; gap: .25em; padding: .35em .2em; border: 1px solid var(--line); border-radius: .25em; background: #fff; }
.snp-rows { display: grid; gap: .25em; padding: .2em; border-radius: .25em; }
.snp-rows .snp-pf { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .45em; row-gap: .2em; align-items: center; padding: .2em .35em; border: 1px solid var(--line); border-radius: .25em; background: #fff; }
.snp-rows .snp-av { grid-row: span 2; }
.snp-av { width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--line); }
.snp-tiles .snp-ln { width: 80%; }
.snp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3em; }
.snp-card { display: grid; gap: .3em; padding: .4em; border: 1px solid var(--line); border-radius: .25em; background: #fff; }
.snp-card b { font-weight: var(--weight); }
.snp-split { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
.snp-one { display: grid; }
.snp-map { position: relative; display: block; min-height: 5em; border-radius: .3em; background: repeating-linear-gradient(45deg, #e7eef8 0 .5em, #eef3fa .5em 1em); }
.snp-map i { position: absolute; width: .6em; height: .6em; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--blue); }
.snp-map i:nth-child(1) { left: 20%; top: 25%; } .snp-map i:nth-child(2) { left: 55%; top: 40%; } .snp-map i:nth-child(3) { left: 35%; top: 65%; } .snp-map i:nth-child(4) { left: 75%; top: 20%; }
/* new page */
.snp-newpg { display: grid; gap: .3em; padding: .45em .5em; border-radius: .3em; background: #fff; }
.snp-np-h { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; font-size: 1.05em; }
.snp-badge { font-weight: var(--weight); font-size: .75em; padding: .1em .4em; border-radius: 1em; background: var(--blue); color: #fff; }
.snp-np-l { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .5em; font-size: .95em; color: var(--muted); }
.snp-none { padding: .5em; border: 1px dashed var(--line-2); border-radius: .3em; color: var(--dim); font-size: .95em; text-align: center; }
/* contact block */
.snp-ct { display: grid; gap: .25em; padding: .45em .5em; border: 1px solid var(--line); border-radius: .3em; background: #fff; }
.snp-cl { display: flex; align-items: center; gap: .45em; padding: .1em .3em; border-radius: .2em; font-size: .95em; overflow-wrap: anywhere; }
.snp-cd { width: .8em; height: .8em; border-radius: .2em; border: 1px solid var(--line-2); flex: none; }
/* text */
.snp-tx { display: block; font-size: 1em; line-height: 1.45; overflow-wrap: break-word; }
.snp-tx del { color: var(--dim); text-decoration: line-through; background: var(--sand); border-radius: 2px; padding: 0 2px; }
.snp-tx ins { color: var(--deep); text-decoration: none; background: var(--pale); border-radius: 2px; padding: 0 2px; box-shadow: 0 0 0 1px var(--blue); }
/* the change itself */
.snp .hl { background: var(--pale); color: var(--deep); box-shadow: 0 0 0 1px var(--blue); border-color: transparent; }
.snp .hl-old { color: var(--dim); text-decoration: line-through; outline: 1px dashed var(--line-2); outline-offset: -1px; background: var(--sand); }
.snp .snp-file.hl-old, .snp .snp-img.hl-old, .snp .mv { text-decoration: none; }
.snp .snp-img.hl { box-shadow: 0 0 0 2px var(--blue); }
.snp .snp-img.hl-old { opacity: .75; outline-style: dashed; }
.snp-cap { padding: .25em .6em .3em; border-top: 1px solid var(--line); font-size: .95em; color: var(--dim); }

/* ---------------------------------------------------------------- tabs: separate dashboards in the app bar */
.db-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 3px; flex: 0 0 auto; max-width: 100%; }
/* every tab has a faded hairline outline; the active one is filled in the nav highlight blue
   (#006cf5, white text 4.7:1) like the site nav on hover; inactive tabs tint on hover */
.db-tab { position: relative; display: inline-flex; align-items: center; gap: 5px; flex: none; height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; transition: background-color .12s, border-color .12s, color .12s; }
.db-tab:hover { color: var(--text); background: var(--pale); border-color: var(--pale-line); }
.db-tab[aria-selected="true"], .db-tab[aria-selected="true"]:hover { color: #fff; background: #006cf5; border-color: #006cf5; }
.db-tab:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; }
/* switching tabs is a soft cross-fade (opacity only, no lift, no snap): the incoming dashboard
   fades in while the outgoing one, laid over the same spot, fades out */
.tab-in { animation: db-tabin .42s ease both; }
.tab-in2 { animation: db-tabin2 .42s ease both; }
@keyframes db-tabin2 { from { opacity: 0; } }
@keyframes db-tabin { from { opacity: 0; } }
.db-grid.tab-out { animation: db-tabout .42s ease forwards; }
@keyframes db-tabout { to { opacity: 0; } }
/* below 640 px the tabs take their own row under the title (they scroll sideways inside the bar) */
@media (max-width: 639px) { .db-tabs { order: 9; flex: 1 0 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 2px -4px 0; padding: 0 2px; } .db-tabs .db-tab { justify-content: center; } }
.db-grid[hidden] { display: none; }
/* the other dashboards stay laid out, out of sight, in the same box (content-visibility keeps their
   layout cached and skips their rendering), so switching to one needs no fresh layout; they sit
   under the one on screen and change no inherited property, so showing one restyles little */
.db-stage > .db-grid[hidden] { display: grid; position: absolute; inset: 0; z-index: -1; content-visibility: hidden; }
