/* Trading-Bot Labor - research tool, not a document.
   Same visual family as the project reports (plotter paper, indigo ink,
   Newsreader/Plex) but laid out to be operated rather than read: summary
   before detail, state encoded in shape as well as number. */

:root {
  --paper:     #EDEFF3;
  --surface:   #F8F9FB;
  --surface-2: #E3E7ED;
  --sunken:    #E7EAF0;
  --ink:       #141A24;
  --ink-mid:   #3E4855;
  --ink-soft:  #6A7583;
  --rule:      #CDD4DD;
  --rule-soft: #DEE2E9;
  --accent:    #2B3A78;
  --accent-2:  #5568AE;
  --accent-bg: #E4E8F4;
  --amber:     #A8631B;
  --amber-bg:  #F3E9DC;
  --pass:      #3D6A49;
  --pass-bg:   #DCE7DE;
  --fail:      #963D33;
  --fail-bg:   #F0DEDB;
  --grid-line: rgba(43,58,120,.05);
  --f-display: "Newsreader", Georgia, serif;
  --f-body:    "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #101419;  --surface:   #171D25;  --surface-2: #1E2630;
    --sunken:    #12171D;  --ink:       #E4E8EE;  --ink-mid:   #B2BBC7;
    --ink-soft:  #8492A2;  --rule:      #2B343F;  --rule-soft: #212933;
    --accent:    #8A9CDE;  --accent-2:  #6376BC;  --accent-bg: #1C2333;
    --amber:     #D89D57;  --amber-bg:  #2A2318;
    --pass:      #77AB85;  --pass-bg:   #1D2A21;
    --fail:      #D48579;  --fail-bg:   #2E1E1C;
    --grid-line: rgba(138,156,222,.055);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(to right,  var(--grid-line) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px 28px);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--f-display); font-weight: 500; margin: 0; line-height: 1.2; }
p { margin: 0; }
code { font-family: var(--f-mono); font-size: .9em; background: var(--surface-2);
       padding: .05em .3em; border-radius: 2px; }
small { font-size: .82em; color: var(--ink-soft); }
em { font-style: normal; color: var(--ink-soft); font-size: .85em; }

/* ---------- header ---------- */
.top {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  align-items: center; padding: .9rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--rule); background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; gap: .8rem; align-items: center; }
.brand .mark { width: 10px; height: 30px; background: var(--accent); flex: none; }
.top h1 { font-size: 1.3rem; }
.sub { font-size: .82rem; color: var(--ink-soft); }
.live { display: flex; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.live-item { background: var(--surface); padding: .35rem .8rem; display: flex;
             flex-direction: column; min-width: 7.5rem; }
.live-item .k { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em;
                text-transform: uppercase; color: var(--ink-soft); }
.live-item .v { font-family: var(--f-mono); font-size: 1.05rem;
                font-variant-numeric: tabular-nums; }
.live-item .v.warn { color: var(--amber); }
.live-item .v.bad  { color: var(--fail); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 21rem minmax(0, 1fr); gap: 0;
          align-items: start; }
.panel { border-right: 1px solid var(--rule); background: var(--surface);
         padding: 0 0 3rem; position: sticky; top: 61px;
         max-height: calc(100vh - 61px); overflow-y: auto; }
.main { padding: 1.2rem clamp(1rem, 2.5vw, 2rem) 4rem; display: flex;
        flex-direction: column; gap: 1.2rem; min-width: 0; }

/* ---------- config groups ---------- */
.grp { padding: 1rem 1.1rem; border-bottom: 1px solid var(--rule-soft);
       display: flex; flex-direction: column; gap: .75rem; }
.grp h2 { font-size: .95rem; font-family: var(--f-body); font-weight: 600;
          letter-spacing: .01em; }
.f { display: flex; flex-direction: column; gap: .25rem; }
.f > span { font-size: .78rem; color: var(--ink-mid); font-weight: 500;
            display: flex; justify-content: space-between; }
.f input[type=text], .f input[type=number], .f select, textarea {
  font-family: var(--f-body); font-size: .88rem; padding: .4rem .5rem;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  border-radius: 2px; width: 100%;
}
.f input:focus, .f select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.f.check { flex-direction: row; align-items: flex-start; gap: .5rem; }
.f.check span { font-size: .82rem; display: block; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  font-size: .78rem; padding: .2rem .5rem; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink-mid); border-radius: 2px;
  cursor: pointer; font-family: var(--f-mono); user-select: none;
}
.chip:hover { border-color: var(--accent-2); }
.chip.on { background: var(--accent-bg); border-color: var(--accent);
           color: var(--accent); font-weight: 500; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--rule);
        padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .9rem; }
.card-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline;
             justify-content: space-between; }
.card-head h2 { font-size: 1.15rem; }
.hint { font-size: .8rem; color: var(--ink-soft); }
.card.empty { color: var(--ink-soft); font-size: .9rem; gap: .5rem; }
.card.empty .small { font-size: .84rem; }
.lead { font-size: .86rem; color: var(--ink-mid); }
.lead.warn { background: var(--amber-bg); border-left: 2px solid var(--amber);
             padding: .5rem .7rem; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); }
.tab { font-family: var(--f-body); font-size: .85rem; padding: .45rem .9rem;
       background: none; border: 0; border-bottom: 2px solid transparent;
       color: var(--ink-soft); cursor: pointer; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.badge { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .08em;
         text-transform: uppercase; background: var(--amber-bg); color: var(--amber);
         padding: .1rem .3rem; margin-left: .3rem; border-radius: 2px; }
.tabpane { display: none; flex-direction: column; gap: .8rem; }
.tabpane.active { display: flex; }

/* ---------- family grid ---------- */
.famgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
           gap: .4rem; }
.fam { border: 1px solid var(--rule); background: var(--paper); padding: .5rem .6rem;
       cursor: pointer; display: flex; flex-direction: column; gap: .15rem;
       border-radius: 2px; user-select: none; }
.fam:hover { border-color: var(--accent-2); }
.fam.on { background: var(--accent-bg); border-color: var(--accent); }
.fam .n { font-size: .85rem; font-weight: 500; }
.fam .c { font-family: var(--f-mono); font-size: .7rem; color: var(--ink-soft); }

/* ---------- condition builder ---------- */
.cond { border: 1px solid var(--rule-soft); padding: .7rem .8rem; background: var(--paper);
        display: flex; flex-direction: column; gap: .5rem; }
.cond h3 { font-size: .85rem; font-family: var(--f-body); font-weight: 600; }
.cond h3 small { font-weight: 400; margin-left: .4rem; }
.condrow, .filterrow { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.condrow select, .filterrow select { font-size: .82rem; padding: .3rem .4rem;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  border-radius: 2px; font-family: var(--f-body); }
.condrow input, .filterrow input { font-size: .82rem; padding: .3rem .4rem; width: 5.5rem;
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  border-radius: 2px; font-family: var(--f-mono); }
.opgroup { display: flex; gap: .25rem; align-items: center; }
.opgroup .lbl { font-family: var(--f-mono); font-size: .68rem; color: var(--ink-soft); }
.filterrow { border-top: 1px dashed var(--rule-soft); padding-top: .45rem; }
.rm { background: none; border: 1px solid var(--rule); color: var(--ink-soft);
      cursor: pointer; border-radius: 2px; padding: .15rem .4rem; font-size: .8rem; }

/* ---------- buttons ---------- */
button { font-family: var(--f-body); cursor: pointer; }
.primary { background: var(--accent); color: #fff; border: 1px solid var(--accent);
           padding: .45rem .9rem; border-radius: 2px; font-size: .86rem; font-weight: 500; }
.primary:disabled { opacity: .4; cursor: not-allowed; }
.ghost { background: var(--paper); color: var(--ink-mid); border: 1px solid var(--rule);
         padding: .4rem .8rem; border-radius: 2px; font-size: .84rem; }
.ghost:hover { border-color: var(--accent-2); color: var(--accent); }
.ghost.small { padding: .2rem .5rem; font-size: .78rem; }
.builder-actions { display: flex; gap: .5rem; }

/* ---------- verdict ---------- */
.verdict { font-size: .85rem; padding: .55rem .7rem; border-left: 3px solid var(--rule);
           background: var(--paper); }
.verdict.ok  { border-left-color: var(--pass); background: var(--pass-bg); color: var(--pass); }
.verdict.bad { border-left-color: var(--fail); background: var(--fail-bg); color: var(--fail); }

/* ---------- selected strategies ---------- */
.selected { display: flex; flex-wrap: wrap; gap: .35rem; }
.sel {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem;
  background: var(--accent-bg); border: 1px solid var(--accent); color: var(--accent);
  padding: .2rem .5rem; border-radius: 2px; font-family: var(--f-mono);
}
.sel button { background: none; border: 0; color: inherit; cursor: pointer;
              font-size: .95rem; line-height: 1; padding: 0; }

/* ---------- run bar ---------- */
.runbar { gap: .8rem; }
.runbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
           gap: .5rem; }
.run { display: flex; flex-direction: column; gap: .1rem; align-items: flex-start;
       padding: .6rem .8rem; border: 1px solid var(--rule); background: var(--paper);
       border-radius: 2px; text-align: left; }
.run:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-bg); }
.run:disabled { opacity: .45; cursor: not-allowed; }
.run b { font-size: .92rem; font-weight: 600; }
.run small { font-size: .76rem; }
.progress { display: flex; flex-direction: column; gap: .35rem; }
.bar { height: 6px; background: var(--sunken); border: 1px solid var(--rule);
       overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent);
            transition: width .3s ease; }
.progmeta { display: flex; justify-content: space-between; align-items: center;
            font-size: .82rem; color: var(--ink-mid); }

/* ---------- results ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: .84rem; min-width: 42rem; }
th, td { padding: .42rem .7rem; text-align: right; border-bottom: 1px solid var(--rule-soft); }
th:first-child, td:first-child { text-align: left; }
thead th { font-family: var(--f-mono); font-size: .65rem; letter-spacing: .07em;
           text-transform: uppercase; color: var(--ink-soft); font-weight: 400;
           border-bottom: 1px solid var(--rule); white-space: nowrap; }
tbody td { font-family: var(--f-mono); font-variant-numeric: tabular-nums;
           color: var(--ink-mid); }
tbody td:first-child { font-family: var(--f-body); color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.bench td { background: var(--surface-2); }
tbody tr.reject td:first-child { color: var(--fail); }
td.pos { color: var(--pass); } td.neg { color: var(--fail); }
.tag { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .06em;
       text-transform: uppercase; padding: .08rem .35rem; border-radius: 2px; }
.tag.ok { background: var(--pass-bg); color: var(--pass); }
.tag.no { background: var(--fail-bg); color: var(--fail); }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
          gap: .8rem; }
.chart { border: 1px solid var(--rule); background: var(--paper); padding: .6rem .7rem;
         display: flex; flex-direction: column; gap: .35rem; }
.chart h4 { margin: 0; font-size: .8rem; font-family: var(--f-body); font-weight: 600; }
.chart canvas { width: 100%; height: 150px; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: .6rem; font-size: .74rem;
          color: var(--ink-soft); font-family: var(--f-mono); }
.legend i { display: inline-block; width: .7rem; height: .45rem; margin-right: .25rem; }

.meters { display: flex; flex-direction: column; gap: 1px; background: var(--rule);
          border: 1px solid var(--rule); }
.meter { background: var(--paper); padding: .4rem .7rem; display: grid;
         grid-template-columns: 9rem 1fr 3rem; gap: .7rem; align-items: center;
         font-size: .82rem; }
.meter .track { height: .6rem; background: var(--surface-2); position: relative; }
.meter .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.meter .fill.weak { background: var(--amber); }
.meter .val { font-family: var(--f-mono); text-align: right;
              font-variant-numeric: tabular-nums; color: var(--ink-mid); }

.section-h { font-family: var(--f-body); font-weight: 600; font-size: .92rem;
             margin-top: .4rem; }
.note { font-size: .82rem; color: var(--ink-soft); }
.errbox { background: var(--fail-bg); border-left: 3px solid var(--fail);
          color: var(--fail); padding: .6rem .8rem; font-size: .86rem; }

/* ---------- top nav ---------- */
.topnav { display: flex; gap: 0; border: 1px solid var(--rule); }
.navbtn { font-family: var(--f-body); font-size: .84rem; padding: .35rem .9rem;
          background: var(--paper); border: 0; color: var(--ink-soft); cursor: pointer; }
.navbtn + .navbtn { border-left: 1px solid var(--rule); }
.navbtn.active { background: var(--accent); color: #fff; font-weight: 500; }

/* ---------- info buttons + popover ---------- */
.info {
  display: inline-block; width: 13px; height: 13px; line-height: 13px;
  text-align: center; border-radius: 50%; border: 1px solid var(--ink-soft);
  color: var(--ink-soft); font-size: 9px; font-style: normal; cursor: help;
  vertical-align: middle; margin-left: .25rem; user-select: none; flex: none;
  font-family: var(--f-mono);
}
.info::before { content: "i"; }
.info:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.popover {
  position: absolute; z-index: 60; max-width: 22rem; background: var(--surface);
  border: 1px solid var(--accent); border-left-width: 3px; padding: .6rem .8rem;
  box-shadow: 0 8px 28px -12px rgba(0,0,0,.4); font-size: .84rem;
  display: flex; flex-direction: column; gap: .25rem;
}
.popover h4 { margin: 0; font-family: var(--f-body); font-size: .84rem;
              font-weight: 600; color: var(--accent); }
.popover p { color: var(--ink-mid); line-height: 1.5; }

/* ---------- grouped library ---------- */
.lgroup { border-top: 1px solid var(--rule-soft); padding-top: .7rem; margin-top: .5rem; }
.lgroup:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.lgroup-head { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline;
               margin-bottom: .45rem; }
.lgroup-head h3 { font-family: var(--f-body); font-size: .88rem; font-weight: 600; }
.lgroup-head .gnote { font-size: .76rem; color: var(--ink-soft); flex: 1 1 14rem; }
.lgroup-head .gall { font-size: .74rem; }
.fam { position: relative; }
.fam .why {
  position: absolute; top: .3rem; right: .3rem; width: 15px; height: 15px;
  line-height: 14px; text-align: center; border: 1px solid var(--rule);
  border-radius: 50%; font-size: 10px; color: var(--ink-soft);
  background: var(--surface); cursor: help; font-family: var(--f-mono);
}
.fam .why:hover { border-color: var(--accent); color: var(--accent); }
.fam.on .why { background: var(--accent-bg); }
.fam.panel .n::after { content: " ⁂"; color: var(--ink-soft); }

.explain { display: flex; flex-direction: column; gap: .3rem; }
.explain .lbl { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em;
                text-transform: uppercase; color: var(--ink-soft); }
.explain .good { color: var(--pass); }
.explain .bad  { color: var(--fail); }

/* ---------- logbook ---------- */
.logbook { display: grid; grid-template-columns: 20rem minmax(0, 1fr); align-items: start; }
.lb-list { border-right: 1px solid var(--rule); background: var(--surface);
           position: sticky; top: 61px; max-height: calc(100vh - 61px);
           overflow-y: auto; padding: .6rem; display: flex; flex-direction: column;
           gap: .4rem; }
.lb-item { border: 1px solid var(--rule); background: var(--paper); padding: .55rem .65rem;
           cursor: pointer; display: flex; flex-direction: column; gap: .2rem;
           border-left-width: 3px; }
.lb-item:hover { border-color: var(--accent-2); }
.lb-item.on { background: var(--accent-bg); border-color: var(--accent); }
.lb-item.fail { border-left-color: var(--fail); }
.lb-item.warn { border-left-color: var(--amber); }
.lb-item.info { border-left-color: var(--accent-2); }
.lb-item .t { font-size: .86rem; font-weight: 600; }
.lb-item .d { font-family: var(--f-mono); font-size: .68rem; color: var(--ink-soft); }
.lb-item .h { font-size: .76rem; color: var(--ink-mid); line-height: 1.35; }
.lb-detail { padding: 1.2rem clamp(1rem, 2.5vw, 2rem) 4rem; display: flex;
             flex-direction: column; gap: 1rem; min-width: 0; }
.lb-detail h2 { font-size: 1.5rem; }
.lb-verdict { display: inline-block; font-family: var(--f-mono); font-size: .7rem;
              letter-spacing: .07em; text-transform: uppercase; padding: .18rem .5rem;
              border-radius: 2px; }
.lb-verdict.fail { background: var(--fail-bg); color: var(--fail); }
.lb-verdict.warn { background: var(--amber-bg); color: var(--amber); }
.lb-verdict.info { background: var(--accent-bg); color: var(--accent); }
.lb-notes { white-space: pre-wrap; font-size: .9rem; color: var(--ink-mid);
            border-left: 2px solid var(--rule); padding-left: .9rem; line-height: 1.6; }
.mandate { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
           gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.mandate > div { background: var(--paper); padding: .5rem .65rem; display: flex;
                 flex-direction: column; }
.mandate .k { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em;
              text-transform: uppercase; color: var(--ink-soft); }
.mandate .v { font-family: var(--f-mono); font-size: .9rem; }

textarea { font-family: var(--f-body); font-size: .85rem; line-height: 1.45;
           resize: vertical; }
#notes { font-size: .84rem; }

/* ---------- forward test ---------- */
.fwd { padding: 1.2rem clamp(1rem, 2.5vw, 2rem) 4rem; display: flex;
       flex-direction: column; gap: 1.1rem; max-width: 70rem; margin-inline: auto; }
.fwd-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.f.inline, select.inline { flex: 0 0 auto; }
select.inline { font-size: .86rem; padding: .4rem .5rem; border: 1px solid var(--rule);
                background: var(--paper); color: var(--ink); border-radius: 2px; }
.f.check.inline { align-items: center; }
.ghost.danger { color: var(--fail); border-color: var(--fail); }
.ghost.danger:hover { background: var(--fail-bg); }
.out { font-family: var(--f-mono); font-size: .76rem; background: var(--sunken);
       border: 1px solid var(--rule); padding: .6rem .7rem; white-space: pre-wrap;
       max-height: 16rem; overflow: auto; margin: 0; color: var(--ink-mid); }
.banner { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem;
          border-left: 3px solid var(--accent); background: var(--accent-bg); }
.banner.ok   { border-left-color: var(--pass); background: var(--pass-bg); }
.banner.warn { border-left-color: var(--amber); background: var(--amber-bg); }
.banner.bad  { border-left-color: var(--fail); background: var(--fail-bg); }
.banner .bt { font-weight: 600; font-size: .95rem; }
.banner .bd { font-size: .86rem; color: var(--ink-mid); }
.fwd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
             gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.fwd-stats > div { background: var(--paper); padding: .55rem .7rem; display: flex;
                   flex-direction: column; }
.fwd-stats .k { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em;
                text-transform: uppercase; color: var(--ink-soft); }
.fwd-stats .v { font-family: var(--f-mono); font-size: 1.1rem;
                font-variant-numeric: tabular-nums; }
.fwd-stats .v.bad { color: var(--fail); }
.fwd-stats .v.good { color: var(--pass); }
#fwdCanvas { width: 100%; height: 220px; display: block; }

@media (max-width: 60rem) {
  .layout, .logbook { grid-template-columns: 1fr; }
  .panel, .lb-list { position: static; max-height: none; border-right: 0;
                     border-bottom: 1px solid var(--rule); }
}

/* ---------- phones ----------
   The header's three live figures are 7.5rem each plus padding, which alone
   exceeds a 375 px screen and pushed the whole page sideways. They shrink and
   wrap here instead; everything wide enough to need it scrolls inside its own
   container, never the body. */
@media (max-width: 34rem) {
  body { font-size: 15px; }
  .top { padding: .7rem .8rem; gap: .6rem; }
  .top h1 { font-size: 1.1rem; }
  .sub { display: none; }
  .brand .mark { height: 22px; }
  .live { flex: 1 1 100%; }
  .live-item { min-width: 0; flex: 1 1 0; padding: .3rem .5rem; }
  .live-item .v { font-size: .95rem; }
  .topnav { flex: 1 1 100%; }
  .navbtn { flex: 1 1 0; padding: .35rem .4rem; font-size: .8rem; }

  .main, .fwd, .lb-detail { padding-left: .8rem; padding-right: .8rem; }
  .card { padding: .85rem .9rem; }
  .row, .row3 { grid-template-columns: 1fr; }
  .famgrid { grid-template-columns: 1fr; }
  .runbtns { grid-template-columns: 1fr; }
  .meter { grid-template-columns: 6.5rem 1fr 2.6rem; gap: .5rem; font-size: .78rem; }
  .mandate { grid-template-columns: 1fr 1fr; }
  .fwd-stats { grid-template-columns: 1fr 1fr; }
  .condrow, .filterrow { flex-direction: column; align-items: stretch; }
  .condrow select, .filterrow select,
  .condrow input, .filterrow input { width: 100%; }
  .popover { max-width: calc(100vw - 24px); }
  .lgroup-head .gnote { flex-basis: 100%; }
}

/* Nothing may make the page itself scroll sideways. */
html, body { max-width: 100%; overflow-x: hidden; }
