/* signals-edge.css — Research view: Edge and Parity.
   Layout only. Every colour is a token from styles.css so both themes follow
   the rest of the desk; series colours are the fixed --s1..--s3 slots. */

/* minmax(0, 1fr), not the implicit auto column: an auto column sizes to its
   widest table and pushes the page sideways at phone width. */
.edge { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.edge .card-head h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.edge .card-head { flex-wrap: wrap; }
.edge-gap { margin-bottom: 0; }

/* ── controls ─────────────────────────────────────────────────────── */
.edge-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; min-width: 0; }
.edge-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.edge-who b { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.edge-who .truncate { max-width: 320px; font-size: 12.5px; }
.edge-who .tag { align-self: center; }
.edge-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.edge-stamp { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

/* A refresh keeps the last answer on screen but visibly stood down, so a
   figure from the previous basis or window is never read as the new one. */
.edge-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; transition: opacity .15s var(--ease); }
.edge-body.busy { opacity: .5; pointer-events: none; }

/* The unit badge. Small, but on every money figure: percent-per-signal and
   account rupees differ by a position size and may never be confused. */
.edge-unit {
  display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 99px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--muted);
  font-size: 10.5px; font-weight: 550; letter-spacing: 0; white-space: nowrap; vertical-align: middle; line-height: 1;
}
.edge-unit.sm { height: 16px; padding: 0 5px; font-size: 10px; }
.kpi-value .edge-unit { align-self: center; }

/* ── headline ─────────────────────────────────────────────────────── */
.edge-head .card-pad { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.edge-verdict { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.edge-line { font-size: 15px; line-height: 1.55; color: var(--text-2); max-width: 90ch; }
.edge-line b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.edge-line b.pos { color: var(--pos); } .edge-line b.neg { color: var(--neg); }
.edge-warn { padding: 8px 12px; border: 1px solid var(--warn-bd); background: var(--warn-bg); border-radius: var(--r); font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.edge-list { list-style: disc; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.edge-list li + li { margin-top: 3px; }
.edge-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.edge-acts:empty { display: none; }

.edge-drivers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.edge-dgrp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.edge-dl { font-size: 11.5px; font-weight: 550; color: var(--muted); margin-right: 2px; }
.edge-drv {
  display: inline-flex; align-items: baseline; gap: 6px; height: 28px; padding: 0 10px; max-width: 100%;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); cursor: pointer;
  font-size: 12.5px; color: var(--text); white-space: nowrap;
  transition: background var(--dur) var(--spring), border-color var(--dur), color var(--dur);
}
.edge-drv:hover { background: var(--surface-hover); border-color: var(--border-2); }
.edge-drv:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.edge-drv.on { border-color: var(--accent-bd); background: var(--accent-bg); }
.edge-drv.on:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.edge-drv .k { font-size: 11px; color: var(--faint); }
.edge-drv b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.edge-drv .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.edge-drv.pos .v { color: var(--pos); } .edge-drv.neg .v { color: var(--neg); }

.edge-notes { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); padding: 10px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.edge-notes b { display: block; font-size: 12px; font-weight: 650; color: var(--text); margin-bottom: 3px; }
.edge-notes ul { list-style: disc; padding-left: 18px; }
.edge-notes li + li { margin-top: 2px; }

/* ── equity + histogram ───────────────────────────────────────────── */
.edge-pair { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.edge-eqbox { height: 240px; }
.edge-mk { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .55; }
.edge-mkd { fill: var(--text-2); }
.edge-changes { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.edge-changes li { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.edge-changes i { width: 14px; border-top: 1.5px dashed var(--text-2); opacity: .6; flex-shrink: 0; }
.edge-changes b { font-weight: 600; }

.eh-plot { display: flex; align-items: flex-end; gap: 2px; height: 180px; border-bottom: 1px solid var(--border-2); margin-bottom: 24px; }
.eh-col {
  flex: 1 1 0; min-width: 0; height: 100%; position: relative; display: flex; align-items: flex-end; justify-content: center;
  border: none; background: transparent; padding: 0; cursor: pointer; border-radius: 4px 4px 0 0; font: inherit;
  transition: background var(--dur) var(--spring), box-shadow var(--dur);
}
.eh-col:hover:not(:disabled) { background: var(--surface-hover); }
.eh-col:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.eh-col:disabled { cursor: default; }
.eh-col.on { background: var(--accent-bg); box-shadow: inset 0 -2px 0 var(--accent); }
.eh-col.on:focus-visible { box-shadow: inset 0 -2px 0 var(--accent), 0 0 0 3px var(--accent-ring); }
.eh-col.zero::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; border-left: 1px dashed var(--border-2); }
.eh-bar { display: block; width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; opacity: .88; transition: opacity .12s; }
.eh-bar.neg { background: var(--neg); } .eh-bar.pos { background: var(--pos); } .eh-bar.mid { background: var(--faint); }
.eh-col:hover .eh-bar, .eh-col.on .eh-bar { opacity: 1; }
.eh-x { position: absolute; top: calc(100% + 6px); left: 0; transform: translateX(-50%); font-size: 10.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.eh-axis { font-size: 11.5px; color: var(--muted); }

/* ── where it comes from ──────────────────────────────────────────── */
.edge .section-row.edge-sec { margin: 8px 0 0; }
.edge-fnote { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.edge-fnote b { font-weight: 600; color: var(--text); }
.edge-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.edge-dim { display: flex; flex-direction: column; min-width: 0; }
.edge-dim.wide { grid-column: 1 / -1; }
.edge-dim-body { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.edge-dim-chart { padding: 0 16px 6px 8px; min-width: 0; }
.edge-dim-tbl { border-top: 1px solid var(--border); max-height: 262px; overflow: auto; }
.edge-dim-tbl.tall { max-height: 380px; }
.edge .tbl tr.clickable td { transition: background var(--dur) var(--spring); }
.edge .tbl tr.clickable:hover td { background: var(--surface-hover); }
.edge .tbl tr.on td { background: var(--accent-bg); }
.edge .tbl tr.on td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.edge .tbl tr.thin td { opacity: .55; }
.edge-dim-tbl .tbl td { white-space: nowrap; }
.edge-conf { cursor: help; }
.edge-conf.thin { color: var(--faint); }
.edge-conf-rule { margin: -6px 0 0; max-width: 92ch; }
.edge .tbl tr.clickable:focus-visible { outline: none; }
.edge .tbl tr.clickable:focus-visible td { background: var(--accent-bg); }
@media (min-width: 1180px) {
  .edge-dim.wide .edge-dim-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .edge-dim.wide .edge-dim-tbl { border-top: none; border-left: 1px solid var(--border); }
  .edge-dim.wide .edge-dim-chart { padding-top: 6px; }
}

/* ── signal → fill ────────────────────────────────────────────────── */
.edge-none { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 6px; }
.edge-none b { color: var(--text); font-weight: 650; }
.edge-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-bottom: 16px; }
.ef-step { flex: 1 1 160px; border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
.ef-step .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.ef-step .v { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.ef-step .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ef-arrow { align-self: center; color: var(--faint); font-size: 16px; }
.edge-metrics { margin-bottom: 14px; }
.edge-metrics .metric .k { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.edge-worst { margin-top: 2px; }

/* ── round trips ──────────────────────────────────────────────────── */
.edge-filter {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 99px;
  border: 1px solid var(--accent-bd); background: var(--accent-bg); color: var(--accent-d); font-size: 12px; font-weight: 550; white-space: nowrap;
}
.edge-filter button {
  width: 20px; height: 20px; border: none; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
  font-size: 14px; line-height: 1; display: grid; place-items: center; transition: background var(--dur) var(--spring);
}
.edge-filter button:hover { background: var(--surface); }
.edge-filter button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.edge-lv { display: inline-flex; gap: 5px; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── parity ───────────────────────────────────────────────────────── */
.par-twin { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.par-twin label { display: inline; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.par-twin input { width: 92px; height: 26px; padding: 3px 8px; font: 12.5px var(--mono); text-transform: uppercase; letter-spacing: 0; }
.par-restrict { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }

.par-head .card-pad { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.par-figs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; align-items: start; }
.par-fig .k { font-size: 12px; font-weight: 500; color: var(--muted); }
.par-fig .v { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 10px; }
.par-fig .s { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 8px; }
.par-fig .s b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
/* The 70% tick sits on the meter itself, so "how far from the bar" is read
   off the same line as the figure. */
.par-meter { position: relative; }
.par-meter > b { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: var(--text-2); }
.par-verdict { display: grid; gap: 8px; align-content: start; border-left: 1px solid var(--border); padding-left: 22px; }
.par-verdict .tag { justify-self: start; }
.par-verdict p { font-size: 13px; line-height: 1.55; color: var(--text-2); }
.par-verdict p b { color: var(--text); font-weight: 650; }
.par-metrics { margin-bottom: 0; }
.par-metrics .metric .v { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.par-pair { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.pd-wrap { position: relative; padding-top: 16px; }
.pd-max { position: absolute; top: 0; left: 0; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pd-plot { display: flex; align-items: flex-end; gap: 3px; height: 190px; border-top: 1px dashed var(--border); border-bottom: 1px solid var(--border-2); margin-bottom: 26px; }
.pd-grp {
  flex: 1 1 0; min-width: 0; height: 100%; position: relative; display: flex; align-items: flex-end; justify-content: center;
  border: none; background: transparent; padding: 0 1px; cursor: pointer; border-radius: 4px 4px 0 0; font: inherit;
  transition: background var(--dur) var(--spring), box-shadow var(--dur);
}
.pd-grp:hover { background: var(--surface-hover); }
.pd-grp:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.pd-grp.on { background: var(--accent-bg); box-shadow: inset 0 -2px 0 var(--accent); }
.pd-grp.on:focus-visible { box-shadow: inset 0 -2px 0 var(--accent), 0 0 0 3px var(--accent-ring); }
.pd-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; max-width: 56px; height: 100%; }
.pd-bars i { display: block; flex: 1 1 0; max-width: 14px; border-radius: 3px 3px 0 0; opacity: .9; }
.pd-bars i.s1 { background: var(--s1); } .pd-bars i.s2 { background: var(--s2); } .pd-bars i.s3 { background: var(--s3); }
.pd-grp:hover .pd-bars i, .pd-grp.on .pd-bars i { opacity: 1; }
.pd-x { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; }
.par-days-card .chart-legend { margin-top: 0; }

.par-filter { padding: 0 20px 12px; }
.par-filter .seg { flex-wrap: wrap; }
.par-status .n { font-size: 11px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.par-status button.active .n { color: var(--accent-d); }
.par-none .edge-list { display: inline-block; text-align: left; margin-top: 12px; }

/* ── narrow ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .edge-pair, .par-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .par-figs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .par-verdict { grid-column: 1 / -1; border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 12px; }
}
@media (max-width: 640px) {
  .edge-bar { align-items: stretch; }
  .edge-who .truncate { max-width: 60vw; }
  .edge-line { font-size: 14px; }
  .edge-eqbox { height: 210px; }
  .eh-plot { height: 150px; }
  .ef-arrow { display: none; }
  .par-fig .v { font-size: 28px; }
  .par-figs { gap: 16px; }
  .pd-plot { height: 160px; }
  .par-filter { padding: 0 14px 12px; }
}
@media (max-width: 420px) {
  .par-figs { grid-template-columns: minmax(0, 1fr); }
}

/* ── change log (Act on this · Changes tab) ───────────────────────── */
.edge-act-cell { width: 1%; text-align: right; }
.edge .btn.edge-act { opacity: .55; }
.edge .tbl tr:hover .btn.edge-act, .edge .btn.edge-act:focus-visible { opacity: 1; }
.edge-act-what { margin-bottom: 12px; }
.edge-act-slice { font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.edge-log td { vertical-align: top; }
.edge-log-text { min-width: 260px; max-width: 460px; white-space: normal; line-height: 1.45; }
.edge-log-exp, .edge-log-note { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.edge-log-acts { white-space: nowrap; text-align: right; }
.edge-log-acts .btn + .btn { margin-left: 6px; }
.edge-log-rule { padding: 0 16px 14px; margin: 0; }

/* ── attribution (#130–#148): months, grid, setups, impact ────────── */
.edge .chart-box .cbar.faint { opacity: .32; }
.edge-stab { cursor: help; white-space: nowrap; }
.edge-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.edge .section-row.edge-sec { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.edge-hidden { padding: 6px 16px 10px; margin: 0; }
.edge-pad { padding: 0 16px 14px; margin: 0; }
.edge-regime, .edge-badw { margin: -6px 0 0; }
.edge-regime b { color: var(--text); font-weight: 600; }
.edge-setups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px 24px; }
.edge-setup { display: grid; gap: 6px; align-content: start; min-width: 0; }
.edge-setup > b { font-size: 13px; font-weight: 650; }
.edge-ec-dry { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); padding: 10px 12px; margin: 10px 0; font-size: 12.5px; color: var(--text-2); display: grid; gap: 4px; justify-items: start; }
.edge-setcell { white-space: nowrap; font-size: 12px; font-variant-numeric: tabular-nums; }
.edge-grid th, .edge-grid td { text-align: center; }
.edge-grid .edge-grid-rh { text-align: left; white-space: nowrap; font-weight: 550; }
.edge-gc { cursor: pointer; min-width: 64px; transition: background var(--dur) var(--spring); }
.edge-gc b { display: block; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12px; }
.edge-gc span { display: block; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.edge-gc.pos { background: var(--pos-bg); } .edge-gc.pos b { color: var(--pos); }
.edge-gc.neg { background: var(--neg-bg); } .edge-gc.neg b { color: var(--neg); }
.edge-gc.thin { opacity: .45; }
.edge-gc.empty { cursor: default; }
.edge-gc:hover:not(.empty) { background: var(--surface-hover); }
.edge-gc.on { box-shadow: inset 0 0 0 2px var(--accent); }
.edge-gc:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent-ring); }
.edge-impact-row td { padding-top: 0; border-top: none; }
.edge-impact-card { display: grid; gap: 8px; padding: 8px 12px; border: 1px dashed var(--border-2); border-radius: var(--r); background: var(--surface-2); }
.edge-impact { width: auto; }
.edge-impact td, .edge-impact th { white-space: nowrap; }
#mEdgeActWarn { margin: 2px 0; }

/* ── Edge → Compare (pages/edgecompare.js) ─────────────────────────────
   Three book tiles, then one table with a column group per book. Each book
   wears its --bk-* accent (styles.css), as on the score cards. */
.edge-cmp-dots { display: inline-flex; gap: 2px; margin-right: 2px; }
.edge-cmp-dots .bk-dot { width: 5px; height: 5px; }
.cmp-bar { display: flex; align-items: flex-end; gap: 10px 14px; flex-wrap: wrap; padding: 10px var(--pad) 11px; }
.cmp-bar select { min-width: 180px; }
.cmp-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.cmp-book {
  display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px var(--pad);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bk) 8%, var(--surface)), var(--surface) 70px);
  border: 1px solid var(--border); border-top: 2px solid var(--bk); border-radius: var(--r-lg); box-shadow: inset 0 1px 0 var(--hi);
}
.cmp-big { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.1; }
.cmp-big small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.cmp-big.pos { color: var(--pos); } .cmp-big.neg { color: var(--neg); }
.cmp-book dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; }
.cmp-book dt { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.cmp-book dd { margin: 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp-book dd.pos { color: var(--pos); } .cmp-book dd.neg { color: var(--neg); }
.cmp-span { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cmp-note { margin: -4px 0 0; }
.cmp-wait .banner-body b { margin-right: 4px; }
.cmp-table .tbl th.cmp-gh { text-align: center; border-bottom: 2px solid var(--bk); color: var(--text); font-weight: 650; }
.cmp-table .tbl th.cmp-gh .bk-dot { margin-right: 6px; vertical-align: 1px; }
.cmp-table .tbl .cmp-first { border-left: 1px solid var(--border); }
.cmp-table .tbl td.cmp-avg { font-weight: 600; }
.cmp-table .tbl td.cmp-avg.pos { color: var(--pos); background: color-mix(in srgb, var(--pos) 9%, transparent); }
.cmp-table .tbl td.cmp-avg.neg { color: var(--neg); background: color-mix(in srgb, var(--neg) 8%, transparent); }
.cmp-table .tbl td.cmp-agree { text-align: center; }
.cmp-table .tbl td.cmp-m { display: none; }
.cmp-table .tbl td.cmp-m .pos { color: var(--pos); } .cmp-table .tbl td.cmp-m .neg { color: var(--neg); }
@media (max-width: 1100px) {
  .cmp-books { grid-template-columns: minmax(0, 1fr); }
  .cmp-book dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cmp-bar select { min-width: 0; width: 100%; }
  .cmp-bar .f { flex: 1 1 100%; }
  .cmp-bar .chips { overflow-x: auto; max-width: 100%; }
  .cmp-bar .f-end { margin-left: 0; }
  .cmp-table .tbl td.cmp-m { display: block; font-size: 12px; color: var(--text-2); }
  .cmp-table .tbl td.cmp-m .bk-dot { margin-right: 5px; vertical-align: 1px; }
  .cmp-table .tbl td.cmp-m b { font-weight: 600; margin-right: 4px; color: var(--text); }
  .cmp-big { font-size: 20px; }
  .cmp-book dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Edge header. Desktop: the four-way switch, then Export / Refresh as text
   buttons. Phone: the switch takes its own full-width row (scrolling inside
   itself if it must) and Export / Refresh become 40px icon buttons in the
   title row's empty right corner. */
.edge-ib svg { display: none; width: 16px; height: 16px; }
@media (max-width: 640px) {
  #page-edge .page-head { position: relative; }
  #page-edge .page-head .page-actions { flex-wrap: wrap; overflow: visible; mask-image: none; -webkit-mask-image: none; }
  #page-edge #edgeLens { flex: 1 1 100%; display: flex; overflow-x: auto; scrollbar-width: none; }
  #page-edge #edgeLens::-webkit-scrollbar { display: none; }
  #page-edge #edgeLens > button { flex: 1 0 auto; height: 34px; padding: 0 9px; }
  #page-edge .edge-ib { position: absolute; top: 6px; width: 40px; height: 40px; padding: 0; justify-content: center; }
  #page-edge .edge-ib svg { display: block; }
  #page-edge .edge-ib .lbl { display: none; }
  #page-edge #edgeRefresh { right: 0; }
  #page-edge #edgeExport { right: 46px; }
}
