/* ==========================================================================
   Investor Second Brain -- "Briefing view" (2026-09-30, Investor_Brain.mp4).
   The operator's mock layout: a top bar with tabs instead of the sidebar,
   a serif morning-brief headline, stat tiles, market pulse cards with a
   bull-vs-bear split bar, and Compare as a colour-coded matrix.
   Loaded after tokens.css / base.css / components.css by
   templates/brain_briefing/base.html.jinja. Colours: tokens.css only, so
   the light and dark themes both follow the brain_theme cookie.
   ========================================================================== */

@font-face {
  font-family: "Source Serif 4";
  src: url("/brain_v2/static/fonts/SourceSerif4Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root { --bf-max: 1180px; --bf-top-h: 64px; --font-serif: "Source Serif 4", "Iowan Old Style", Georgia, serif; }
html { scroll-padding-top: calc(var(--bf-top-h) + 12px); }
body.bf { display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.bf-top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.bf-top-in {
  max-width: var(--bf-max); margin: 0 auto; min-height: var(--bf-top-h);
  padding: var(--s2) var(--gutter);
  display: flex; align-items: center; gap: var(--s4);
}
.bf-brand {
  display: inline-flex; align-items: center; gap: var(--s2); flex: none;
  font: 700 17px/1.2 var(--font-display); letter-spacing: -0.01em; border-radius: var(--r-md);
}
.bf-brand svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.bf-tabs { display: flex; gap: 2px; min-width: 0; }
.bf-tab {
  padding: 7px 13px; border-radius: 999px; border: 1px solid transparent;
  color: var(--muted); font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
}
.bf-tab:hover { color: var(--text); background: var(--panel-2); }
.bf-tab[aria-current="page"] {
  background: var(--panel); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm);
}
.bf-top-actions { margin-left: auto; display: flex; gap: var(--s2); align-items: center; flex: none; }
.bf-switch .icon { color: var(--accent-text); }

/* ---------- Page frame ---------- */
.bf-main { flex: 1; width: 100%; max-width: var(--bf-max); margin: 0 auto; padding: var(--s6) var(--gutter) var(--s12); }
.bf-main:focus { outline: none; }
.bf-foot {
  width: 100%; max-width: var(--bf-max); margin: 0 auto; padding: var(--s5) var(--gutter) var(--s8);
  border-top: 1px solid var(--border); color: var(--faint); font-size: var(--text-xs);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4);
}
.bf-foot-links { display: flex; gap: var(--s4); }
.bf-foot a { color: var(--muted); }
.bf-foot a:hover { color: var(--accent-text); text-decoration: underline; }

.bf-head { margin-bottom: var(--s5); }
.bf-kicker {
  font-size: var(--text-2xs); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-text); font-weight: 700;
}
.bf-head h1 {
  font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.02em;
  font-size: clamp(30px, 4vw, 42px); line-height: 1.12; margin: var(--s2) 0;
}
.bf-head h1.bf-note-h1 { font-size: clamp(26px, 3.2vw, 36px); overflow-wrap: anywhere; }
.bf-lede { color: var(--muted); max-width: 70ch; line-height: 1.55; font-size: var(--text-sm); }
.bf-regime { vertical-align: 1px; margin-right: 4px; }
.bf-back { margin-bottom: var(--s3); }

.bf-section { margin-top: var(--s8); }
.bf-section-head { margin-bottom: var(--s3); }
.bf-section-head h2 { font-size: var(--text-lg); }
.bf-hint { color: var(--muted); font-size: var(--text-sm); margin-top: var(--s1); max-width: 72ch; }
.bf-empty-line { padding: var(--s5); color: var(--muted); font-size: var(--text-sm); }
.bf-foot-note { margin-top: var(--s2); }
.bf-card-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s4); border-top: 1px solid var(--border);
}
.bf-count-n {
  display: inline-block; vertical-align: 3px; margin-left: 4px; padding: 1px 8px; border-radius: 999px;
  background: var(--panel-3); color: var(--muted); font: 700 var(--text-xs)/1.5 var(--font-body);
  font-variant-numeric: tabular-nums;
}

/* Shared tags: horizon, thin, contested, archived */
.bf-tag {
  display: inline-flex; align-items: center; width: max-content;
  padding: 1px 7px; border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: var(--text-2xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: var(--panel);
}
.bf-tag.thin { border-style: dashed; color: var(--faint); }
.bf-tag.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.bf-tag[title] { cursor: help; }

/* "a · b · c" meta lines: separators from CSS, so a wrapped line never starts with a dot */
.bf-dots { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s2); row-gap: 2px; }
.bf-dots > span:not(:last-child)::after { content: "·"; margin-left: var(--s2); color: var(--faint); }
.bf-dots > .bf-tag:not(:last-child)::after { content: none; }

/* ---------- Today: conflicts ---------- */
.bf-banner {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: var(--s4) var(--s5); margin-bottom: var(--s3);
  background: var(--amber-soft); border: 1px solid color-mix(in oklab, var(--amber) 35%, var(--border));
  border-radius: var(--r-lg); color: var(--text);
}
.bf-banner-icon { color: var(--amber); margin-top: 3px; }
.bf-banner-title { font: 700 var(--text-base)/1.3 var(--font-body); letter-spacing: 0; color: var(--amber); }
.bf-banner p { margin: var(--s1) 0 var(--s2); font-size: var(--text-sm); line-height: 1.55; overflow-wrap: anywhere; }
.bf-banner p a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.bf-up { color: var(--accent-text); }
.bf-down { color: var(--red); }
.bf-more-conflicts { margin: calc(-1 * var(--s1)) 0 var(--s3); }

/* ---------- Today: glossary, stats, since ---------- */
.bf-gloss { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 var(--s5); list-style: none; }
.bf-gloss li {
  padding: 4px 11px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); color: var(--muted); font-size: var(--text-xs);
}
.bf-gloss b { color: var(--text); }

.bf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.bf-stat {
  display: block; padding: var(--s4) var(--s5); background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.bf-stat:hover { border-color: var(--border-strong); }
.bf-stat b { display: block; font: 700 30px/1.1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bf-stat span { color: var(--muted); font-size: var(--text-xs); }

.bf-since {
  display: flex; gap: var(--s2); align-items: flex-start; margin-top: var(--s3);
  padding: var(--s2) var(--s3); border-radius: var(--r-md);
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted); font-size: var(--text-sm); line-height: 1.45;
}
.bf-since .icon { margin-top: 2px; color: var(--accent-text); }
.bf-since b { color: var(--text); }

/* ---------- Today: market pulse ---------- */
.bf-pulse { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.bf-mkt {
  display: grid; gap: var(--s2); align-content: start; min-width: 0;
  padding: var(--s4); background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.bf-mkt.thin { background: var(--panel-2); box-shadow: none; border-style: dashed; }
.bf-mkt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.bf-mkt-top h3 { font-size: var(--text-base); }
.bf-mkt-top .pill { flex: none; }
.bf-mkt-line { font-size: var(--text-sm); line-height: 1.45; overflow-wrap: anywhere; }
.bf-split { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--panel-3); }
.bf-split .b { background: var(--accent); }
.bf-split .r { background: var(--red); }
.bf-split.empty { background: repeating-linear-gradient(90deg, var(--panel-3) 0 6px, transparent 6px 10px); }
.bf-mkt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--text-xs); color: var(--faint); }
.bf-split-label { font-variant-numeric: tabular-nums; }
.bf-mkt-meta .due-text { color: var(--muted); }
.bf-mkt-meta .due-text.due-soon { color: var(--amber); }
.bf-quiet { margin-top: var(--s3); }

details.bf-fa { border-top: 1px solid var(--border); padding-top: var(--s2); }
details.bf-fa > summary {
  cursor: pointer; font-size: var(--text-sm); font-weight: 700; color: var(--accent-text);
  padding: 2px 0; border-radius: var(--r-sm);
}
details.bf-fa[open] > summary { margin-bottom: var(--s2); }
.bf-fa-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-bottom: var(--s2); }
.bf-fa-cols h4 { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--s1); }
.bf-fa-item {
  font-size: var(--text-sm); line-height: 1.4; padding: var(--s2) var(--s3); margin-bottom: var(--s2);
  border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--r-md); overflow-wrap: anywhere;
}
.bf-fa-item.bull { border-left-color: var(--accent); }
.bf-fa-item.bear { border-left-color: var(--red); }
.bf-fa-item.mixed { border-left-color: var(--amber); }
.bf-fa-item .meta { display: block; margin-top: 4px; }
.bf-fa-item a, .bf-mkt-line a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Today: actions / events / fresh ---------- */
.bf-split-cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.bf-side > .bf-section:first-child, .bf-split-cols > .bf-section { margin-top: var(--s8); }

.bf-actions { padding: 0 var(--s5); }
.bf-action { padding: var(--s4) 0; border-top: 1px solid var(--border); }
.bf-action:first-child { border-top: 0; }
.bf-action-top { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.bf-action h3 { font: 700 var(--text-base)/1.35 var(--font-body); letter-spacing: 0; }
.bf-why { color: var(--muted); font-size: var(--text-sm); margin-top: 3px; }
.bf-abort { font-size: var(--text-sm); margin-top: var(--s2); line-height: 1.45; overflow-wrap: anywhere; }
.bf-abort a, .bf-action-meta a { text-decoration: underline; text-underline-offset: 2px; }
.bf-action-meta { display: flex; flex-wrap: wrap; column-gap: var(--s2); margin-top: var(--s2); }
.bf-action-meta > span:not(:last-child)::after { content: "·"; margin-left: var(--s2); }
.bf-action-btns { display: flex; gap: var(--s2); margin-top: var(--s3); }
.bf-btn { min-height: 34px; font-size: var(--text-xs); }
.bf-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.bf-done-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text); font-size: var(--text-2xs); font-weight: 700;
}
.bf-action.is-done h3, .bf-action.is-done .bf-why { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }
.bf-restore { padding: var(--s3) 0; border-top: 1px solid var(--border); }

.bf-events { padding: 0; list-style: none; }
.bf-event { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-top: 1px solid var(--border); }
.bf-event:first-child { border-top: 0; }
.bf-date {
  flex: none; width: 48px; text-align: center; padding-right: var(--s2);
  border-right: 1px solid var(--border); color: var(--muted);
}
.bf-date strong { display: block; font: 700 20px/1.1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.bf-date span { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.06em; }
.bf-date.undated { display: grid; place-items: center; color: var(--faint); }
.bf-event-main { min-width: 0; }
.bf-event p { font-size: var(--text-sm); overflow-wrap: anywhere; }
.bf-event .meta { margin-top: 2px; }
.bf-event-notes a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.bf-event-hint { font-style: italic; }

.bf-fresh { padding: 0; }
.bf-mini {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s3); align-items: center;
  padding: var(--s3) var(--s4); border-top: 1px solid var(--border);
}
.bf-mini:first-child { border-top: 0; }
.bf-mini:hover { background: var(--panel-2); }
.bf-mini-title { font-size: var(--text-sm); font-weight: 700; overflow-wrap: anywhere; }
.bf-mini .meta { grid-column: 1 / -1; }

/* ---------- Notes library ---------- */
.bf-filters { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.bf-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.bf-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 var(--s3);
  border: 1px solid var(--border); border-radius: 999px; background: var(--panel);
  color: var(--muted); font-size: var(--text-xs); font-weight: 600;
}
.bf-chip:hover { color: var(--text); border-color: var(--border-strong); }
.bf-chip[aria-current="true"] { background: var(--text); border-color: var(--text); color: var(--panel); }
.bf-chip-n { font-variant-numeric: tabular-nums; opacity: 0.8; }

.bf-compare-bar {
  position: sticky; top: calc(var(--bf-top-h) + 1px); z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4);
  padding: var(--s2) 0 var(--s3); background: var(--bg);
}
.bf-compare-bar .primary { min-height: 40px; }
.bf-compare-bar .primary[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.bf-note-list { list-style: none; }
.bf-note-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s3); align-items: start;
  padding: var(--s4); border-top: 1px solid var(--border);
}
.bf-note-row:first-child { border-top: 0; }
.bf-note-row:has(.bf-pick:checked) { background: var(--accent-soft); }
.bf-pick { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); cursor: pointer; }
.bf-note-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); }
.bf-note-title { font-weight: 700; overflow-wrap: anywhere; }
.bf-note-title:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.bf-note-sum { color: var(--muted); font-size: var(--text-sm); margin-top: 4px; overflow-wrap: anywhere; }
.bf-note-row .meta { margin-top: var(--s2); }
.bf-note-row.archived .bf-note-title { color: var(--muted); }
.bf-valid-warn { color: var(--amber); font-weight: 700; }

/* ---------- Note page ---------- */
.bf-note-stance { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s2) 0; }
.bf-decision p { font-size: var(--text-sm); line-height: 1.6; overflow-wrap: anywhere; }
.bf-decision p + p { margin-top: var(--s3); color: var(--muted); }
.bf-claims { list-style: none; }
.bf-claim { padding: var(--s4) var(--s5); border-top: 1px solid var(--border); }
.bf-claim:first-child { border-top: 0; }
.bf-claim-text { font-size: var(--text-sm); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.bf-claim .meta { margin-top: var(--s1); }
.bf-claim.inactive { background: var(--panel-2); }
.bf-claim.inactive .bf-claim-text { color: var(--muted); font-weight: 500; }
.bf-str { font-weight: 700; font-variant-numeric: tabular-nums; }
.bf-str.bull { color: var(--accent-text); }
.bf-str.bear { color: var(--red); }
details.bf-source { margin-top: var(--s6); padding: var(--s4) var(--s5); }
details.bf-source > summary { cursor: pointer; font-weight: 700; font-size: var(--text-sm); color: var(--accent-text); }
details.bf-source[open] > summary { margin-bottom: var(--s3); }
.bf-404 { margin-top: var(--s6); }

/* ---------- Events ---------- */
.bf-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: start; }
.bf-two > .bf-section { margin-top: var(--s2); }

/* ---------- Compare ---------- */
.bf-key { font-weight: 700; padding: 0 5px; border-radius: 4px; }
.bf-key.agree { background: var(--accent-soft); color: var(--accent-text); }
.bf-key.oppose { background: var(--red-soft); color: var(--red); }
.bf-key.silent { background: var(--panel-3); color: var(--muted); }
.bf-origin { margin-bottom: var(--s4); }
.bf-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--s3); align-items: end; }
.bf-picker select { min-width: 0; text-overflow: ellipsis; }

.bf-matrix-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); box-shadow: var(--shadow-sm); }
.bf-matrix { width: 100%; table-layout: fixed; font-size: var(--text-sm); }
.bf-matrix th, .bf-matrix td { text-align: left; vertical-align: top; padding: var(--s3); border-top: 1px solid var(--border); }
.bf-matrix thead th { border-top: 0; background: var(--panel-2); font-size: var(--text-xs); overflow-wrap: anywhere; }
.bf-matrix thead th:first-child, .bf-matrix tbody th { width: 170px; }
.bf-matrix thead th a { font-size: var(--text-sm); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.bf-col-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); margin-top: var(--s1); font-weight: 500; }
.bf-matrix tbody th { font-weight: 700; }
.bf-matrix tbody th .pill { margin-top: var(--s1); display: flex; }
.bf-cell { border-left: 1px solid var(--border); }
.bf-cell-rel { display: block; font-size: var(--text-2xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.bf-cell-text { display: block; margin-top: 4px; line-height: 1.4; overflow-wrap: anywhere; }
.bf-cell.agree { background: var(--accent-soft); }
.bf-cell.agree .bf-cell-rel { color: var(--accent-text); }
.bf-cell.oppose { background: var(--red-soft); }
.bf-cell.oppose .bf-cell-rel { color: var(--red); }
.bf-cell.mixed { background: var(--amber-soft); }
.bf-cell.mixed .bf-cell-rel { color: var(--amber); }
.bf-cell.solo, .bf-cell.lone { background: var(--panel-2); }
.bf-cell.solo .bf-cell-rel, .bf-cell.lone .bf-cell-rel { color: var(--muted); }
.bf-cell.silent { background: var(--panel-3); color: var(--muted); }
.bf-cell.silent .bf-cell-rel { color: var(--muted); }   /* AA on panel-3 (UI review 01-Oct) */
.bf-matrix-notes { display: none; }
@media (min-width: 761px) {
  /* Keep a row focused by Shift+Tab clear of the sticky compare bar. */
  html:has(.bf-compare-bar) { scroll-padding-top: calc(var(--bf-top-h) + 76px); }
}

.bf-conflicts { list-style: none; }
.bf-conflicts li + li { border-top: 1px solid var(--border); }
.bf-conflict { display: grid; gap: 2px; padding: var(--s3) var(--s4); overflow-wrap: anywhere; }
.bf-conflict:hover { background: var(--panel-2); }
.bf-conflict[aria-current="true"] { box-shadow: inset 3px 0 0 var(--amber); }

/* ---------- Print ---------- */
@media print {
  .bf-top, .bf-foot, .bf-action-btns, .bf-restore, .bf-compare-bar, .bf-picker, .skip { display: none !important; }
  .bf-main { padding: 0 !important; max-width: none !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1050px) {
  .bf-split-cols { grid-template-columns: 1fr; gap: 0; }
  .bf-picker { grid-template-columns: 1fr 1fr; }
  .bf-picker .primary { justify-self: start; }
}

@media (max-width: 860px) {
  .bf-top-in { flex-wrap: wrap; row-gap: var(--s2); padding-top: var(--s2); padding-bottom: var(--s2); }
  /* Tabs get their own row, sized by their labels ("Allocation" is the
     widest), so no label is cut at phone width. */
  .bf-tabs { order: 3; width: 100%; justify-content: space-between; }
  .bf-tab { flex: 1 1 auto; text-align: center; padding: 7px 6px; font-size: 13px; }
  :root { --bf-top-h: 104px; }
}

@media (max-width: 760px) {
  .bf-main { padding: var(--s5) 16px var(--s10); }
  .bf-top-in, .bf-foot { padding-left: 16px; padding-right: 16px; }
  .bf-stats { grid-template-columns: 1fr 1fr; }
  .bf-stat { padding: var(--s3) var(--s4); }
  .bf-stat b { font-size: 26px; }
  .bf-pulse, .bf-two, .bf-fa-cols { grid-template-columns: 1fr; }
  .bf-banner { padding: var(--s3) var(--s4); }
  .bf-actions { padding: 0 var(--s4); }
  .bf-picker { grid-template-columns: 1fr; }
  .bf-compare-bar { position: static; }

  /* Compare matrix: one block per market, one line per note */
  .bf-matrix-wrap { border: 0; background: transparent; box-shadow: none; overflow: visible; }
  .bf-matrix, .bf-matrix tbody, .bf-matrix tr, .bf-matrix th, .bf-matrix td { display: block; width: auto; }
  .bf-matrix thead { display: none; }      /* its links were focusable but clipped to 1px */
  .bf-matrix-notes { display: block; margin: 0 0 var(--s3); padding: 0; list-style: none; }
  .bf-matrix-notes li { margin: 0 0 var(--s1); font-size: var(--text-sm); }
  .bf-matrix-notes a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
  .bf-matrix tr { margin-bottom: var(--s3); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
  .bf-matrix tbody th { width: auto; border-top: 0; display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
  .bf-matrix tbody th .pill { margin-top: 0; display: inline-flex; }
  .bf-cell { border-left: 0; }
  .bf-cell::before {
    content: attr(data-note); display: block; margin-bottom: 2px;
    font-size: var(--text-xs); font-weight: 700; color: var(--text); overflow-wrap: anywhere;
  }
}

@media (max-width: 360px) {
  .bf-tabs { overflow-x: auto; }
  .bf-tab { padding: 7px 3px; font-size: 12px; }
}

@media (max-width: 520px) {
  .bf-brand { font-size: 15px; }
  .bf-brand svg { width: 22px; height: 22px; }
  .bf-switch { padding: 0; min-width: 40px; }
  .bf-switch-label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .bf-head h1 { font-size: 30px; }
  .bf-gloss li { font-size: var(--text-2xs); }
  .bf-foot { flex-direction: column; }
}
