/* Logs screen (web/js/screens/logs*). Sizes and copy follow docs/design/logs/design-digest.md;
   every colour is a tokens.css custom property, so dark mode needs no rules here. */

/* ─── Layout ─── */
/* div.lg, not .lg: tokens.css already uses `lg` as a size modifier (.btn.lg on the login
   button, .ico.lg), and a bare .lg would give those this screen's flex layout and background. */
div.lg { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg-canvas); font-size: 13px; }
.lg-whole { flex: 1; display: flex; }
.lg-body { flex: 1; min-height: 0; display: flex; }
.lg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lg-scroll { flex: 1; min-height: 0; overflow: auto; position: relative; background: var(--bg-card); display: flex; flex-direction: column; }
.lg-scroll > .lg-table { flex: 0 0 auto; }
.lg-dim { opacity: .6; }
/* The regions are shown and hidden with the hidden attribute; their display rules above
   would otherwise win over the browser's [hidden] { display: none }. */
.lg [hidden] { display: none !important; }
.lg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lg-mono { font-family: var(--font-mono); }
.lg-offscreen { position: fixed; left: -9999px; top: 0; }

/* ─── Search section (grid: title · history · query · time · fields · search) ─── */
.lg-search { flex: 0 0 auto; position: relative; z-index: 5; display: grid; grid-template-columns: auto 36px minmax(0, 1fr) auto auto auto; column-gap: 8px; row-gap: 6px; align-items: center; padding: 12px 20px 10px; background: var(--bg-card); border-bottom: 1px solid var(--line); }
.lg-title { margin: 0 8px 0 0; font-family: var(--font-serif); font-weight: 400; font-size: 30px; line-height: 1; }
.lg-anchor { position: relative; }
.lg-btn { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.lg-btn.icon { width: 36px; padding: 0; justify-content: center; }
.lg-btn[aria-expanded="true"] { background: var(--bg-sunken); }
.lg-btn.primary { padding: 0 16px; background: var(--ink); border-color: var(--ink); color: var(--bg-paper); font-weight: 600; }
.lg-btn:disabled { opacity: .35; cursor: not-allowed; }

.lg-q { position: relative; min-width: 0; }
.lg-q-box { height: 36px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.lg-q-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--info-faint); }
.lg-q-box.bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-faint); }
.lg-q-box:focus-within .lg-kbd { display: none; }
.lg-q-field { position: relative; flex: 1; min-width: 0; height: 100%; }
/* The input's own text is transparent; the coloured copy underneath shows through, and both
   share one font, so every glyph sits in the same place. Ligatures off (Ruling R3). */
.lg-q-hl, .lg-q-input { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; font-family: var(--font-mono); font-size: 13px; line-height: 34px; white-space: pre; font-variant-ligatures: none; letter-spacing: 0; }
.lg-q-hl { overflow: hidden; pointer-events: none; color: var(--ink); }
.lg-q-hl-in { display: inline-block; }
.lg-q-input { width: 100%; background: transparent; color: transparent; caret-color: var(--ink); outline: none; }
.lg-q-input::placeholder { color: var(--ink-muted); }
.lg-q-input:focus-visible { outline: none; }
.lg-q-input:disabled { cursor: not-allowed; }
.lg-t-f { color: var(--ink); }
.lg-t-o { color: var(--ink-muted); }
.lg-t-v { color: var(--amber-ink); }
.lg-t-k { color: var(--info); font-weight: 600; }
.lg-t-e { color: var(--danger-ink); text-decoration: underline wavy var(--danger); text-underline-offset: 4px; }

.lg-help { grid-column: 3; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.lg-help.ok { color: var(--green-ink); }
.lg-help.err { display: block; overflow: hidden; white-space: pre; padding-left: 13px; font-family: var(--font-mono); font-size: 13px; color: var(--danger-ink); font-variant-ligatures: none; }
.lg-help-in { display: inline-block; }
.lg-caret { color: var(--danger); font-weight: 700; }
.lg-help .lg-quiet { color: var(--ink-muted); }
.lg-range { grid-column: 4 / span 3; text-align: right; white-space: nowrap; font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--ink-muted); }

.lg-kbd { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-xs); background: var(--bg-card); color: var(--ink-muted); }
.lg-kbd.on-paper { background: var(--bg-paper); color: var(--ink); }
.lg-kbd.sm { min-width: 16px; height: 16px; padding: 0 3px; font-size: 10px; border-bottom-width: 1px; background: var(--bg-paper); color: var(--ink); }
.lg-kbd.esc { min-width: 0; height: 18px; font-size: 10px; border-bottom-width: 1px; }

/* ─── Empty start ─── */
.lg-empty { flex: 1; overflow: auto; padding: 44px 20px; }
.lg-empty-in { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.lg-examples-wrap { display: flex; flex-direction: column; gap: 10px; }
.lg-eyebrow { margin: 0; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: .16em; color: var(--ink-muted); }
.lg-examples { display: flex; flex-direction: column; overflow: hidden; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); }
.lg-example { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line-faint); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.lg-example:last-child { border-bottom: 0; }
.lg-example:hover { background: var(--bg-paper); }
.lg-example code { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: 13px; font-variant-ligatures: none; }
.lg-example-desc { font-size: 12px; color: var(--ink-muted); }
.lg-example svg { color: var(--ink-faint); }
.lg-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; font-size: 12px; color: var(--ink-muted); }
.lg-keys > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-keys .lg-ist { margin-left: auto; font-family: var(--font-mono); font-size: 11px; }

/* ─── Result bar ─── */
.lg-bar { flex: 0 0 auto; min-height: 40px; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 4px 20px; border-bottom: 1px solid var(--line); font-size: 12px; }
.lg-matched { display: flex; align-items: baseline; gap: 6px; }
.lg-matched > span:first-child { color: var(--ink-muted); }
.lg-matched strong { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.lg-note { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); }
.lg-skel-count { display: inline-block; width: 44px; height: 10px; border-radius: var(--r-xs); background: var(--bg-sunken); }
.lg-bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lg-pager { display: flex; align-items: center; gap: 4px; }
.lg-pg { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); cursor: pointer; }
.lg-pg:disabled { opacity: 1; background: transparent; border-color: var(--line); color: var(--ink-faint); cursor: default; }
.lg-page { padding: 0 4px; font-family: var(--font-mono); font-size: 12px; }
.lg-rows { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); }
.lg-rows select { height: 28px; padding: 0 6px; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); font-family: var(--font-mono); font-size: 12px; }
.lg-check { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px; cursor: pointer; }
.lg-check input { margin: 0; accent-color: var(--ink); }
.lg-div { width: 1px; height: 18px; background: var(--line); }
.lg-tbtn { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 8px; background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.lg-tbtn:hover { background: var(--bg-card); border-color: var(--line); }

/* ─── Dropped-lines banner ─── */
.lg-banner { display: flex; align-items: center; gap: 8px; padding: 9px 20px; background: var(--warn-faint); border-bottom: 1px solid var(--line); font-size: 12px; }
.lg-banner > svg { color: var(--amber-ink); }
.lg-banner > span { flex: 1; }
.lg-x { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; border-radius: var(--r-sm); color: var(--ink-muted); cursor: pointer; }

/* ─── Table (column widths: Ruling R2) ─── */
.lg-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-variant-ligatures: none; }
.lg-c-req { width: 22%; }
.lg-c-time { width: 20%; }
.lg-c-stat { width: 14%; }
.lg-c-act { width: 76px; }
.lg-table th { position: sticky; top: 0; z-index: 1; padding: 8px 0 8px 16px; background: var(--bg-card); border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; font-size: 10px; letter-spacing: .12em; color: var(--ink-muted); }
.lg-table td { padding: 6px 0 6px 16px; vertical-align: top; }
.lg-table th:first-child, .lg-table td:first-child { padding-left: 20px; }
.lg-table td.act { padding: 4px 20px 4px 0; }
.lg-table tbody tr { border-bottom: 1px solid var(--line-faint); }
.lg-l1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.lg-l2 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--ink-muted); }
.lg-ts { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink); }
.lg-ibtn { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; color: var(--ink-faint); cursor: pointer; }
.lg-took { display: inline-flex; align-items: center; gap: 5px; height: 16px; padding: 0 5px 0 0; border-radius: var(--r-xs); font-size: 11px; color: var(--ink-muted); }
.lg-took::before { content: ''; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: transparent; }
.lg-took.warn { background: var(--warn-faint); color: var(--ink); }
.lg-took.warn::before { background: var(--warn); }
.lg-took.slow { background: var(--danger-faint); color: var(--danger-ink); }
.lg-took.slow::before { background: var(--danger); }
.lg-ms { display: flex; align-items: center; gap: 8px; }
.lg-method { width: 34px; font-size: 11px; font-weight: 600; color: var(--ink); }
.lg-chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: var(--r-xs); font-size: 11px; font-weight: 600; }
.lg-chip.lvl { font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.lg-tone-good { background: var(--green-faint); color: var(--green-ink); }
.lg-tone-info { background: var(--info-faint); color: var(--info); }
.lg-tone-amber { background: var(--amber-faint); color: var(--amber-ink); }
.lg-tone-bad { background: var(--danger-faint); color: var(--danger-ink); }
.lg-tone-muted { background: var(--bg-sunken); color: var(--ink-muted); }
.lg-thread { margin-top: 2px; font-size: 11px; color: var(--ink-muted); }
.lg-cls { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--ink-muted); }
.lg-msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); }
.lg-exc { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; font-weight: 600; color: var(--danger-ink); }
.lg-acts { display: flex; justify-content: flex-end; gap: 2px; }
.lg-abtn { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; border-radius: var(--r-sm); color: var(--ink-muted); cursor: pointer; }
.lg-end { padding: 14px 20px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }

/* ─── States ─── */
.lg-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: var(--bg-card); }
.lg-state-disc { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-sunken); color: var(--ink-muted); }
.lg-state-disc.bad { background: var(--danger-faint); color: var(--danger-ink); }
.lg-state-disc.amber { background: var(--amber-faint); color: var(--amber-ink); }
.lg-state-plain { color: var(--ink-muted); }
.lg-state-text { display: flex; flex-direction: column; gap: 4px; }
.lg-state-title { font-size: 14px; color: var(--ink); }
.lg-state-body { font-size: 12px; color: var(--ink-muted); }
.lg-state-acts { display: flex; gap: 8px; }
.lg-sbtn { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.lg-sbtn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg-paper); font-weight: 600; }
.lg-skel-row { display: grid; grid-template-columns: 96px 84px 44px minmax(0, 1fr); gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line-faint); }
.lg-skel { height: 9px; border-radius: var(--r-xs); background: var(--line-faint); }
.lg-skel.dark { background: var(--bg-sunken); }
.lg-skel.chip { height: 14px; background: var(--bg-sunken); }
.lg-skel-row:nth-child(1) .lg-skel.msg { width: 80%; }
.lg-skel-row:nth-child(2) .lg-skel.msg { width: 60%; }
.lg-skel-row:nth-child(3) .lg-skel.msg { width: 90%; }
.lg-skel-row:nth-child(4) .lg-skel.msg { width: 50%; }
.lg-skel-row:nth-child(5) .lg-skel.msg { width: 70%; }

/* ─── Popovers (design digest C, D; history and time follow C, Ruling R7) ─── */
.lg-pop { position: absolute; z-index: 20; top: 42px; overflow: hidden; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-size: 13px; text-align: left; }
.lg-pop-foot { display: flex; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line-faint); background: var(--bg-card); font-size: 11px; color: var(--ink-muted); }
.lg-pop-foot > span { display: inline-flex; align-items: center; gap: 4px; }
.lg-crumbs { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line-faint); font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--ink-faint); }
.lg-crumbs .on { color: var(--ink); font-weight: 600; }
.lg-pop-title { padding: 8px 12px 4px; font-size: 11px; color: var(--ink-muted); }
.lg-pop-em { font-family: var(--font-mono); color: var(--ink); }
.lg-opts { display: flex; flex-direction: column; max-height: 300px; overflow: auto; padding: 2px 6px 6px; }
.lg-opt { display: flex; flex: 0 0 30px; align-items: center; gap: 10px; height: 30px; padding: 0 8px; background: transparent; border: 0; border-radius: var(--r-sm); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.lg-opt[aria-selected="true"], .lg-opt:hover { background: var(--info-faint); }
.lg-opt-name { white-space: nowrap; font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.lg-opt-name.join { color: var(--info); font-weight: 600; }
.lg-opt-desc { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--ink-muted); }
.lg-opt-hint { margin-left: auto; white-space: nowrap; font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.lg-opt .lg-chip { font-size: 12px; }
.lg-pop-empty { padding: 8px 8px 4px; font-size: 12px; color: var(--ink-muted); }
/* The inline `left` counts query characters in ch, and ch is measured in the element's own
   font: mono here, so it matches the input's mono characters; the children go back to sans. */
.lg-suggest { width: 268px; font-family: var(--font-mono); }
:where(.lg-suggest) > * { font-family: var(--font-sans); }   /* no specificity: .lg-crumbs keeps mono */
.lg-history { left: 0; width: 460px; }
.lg-hist code { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--font-mono); font-size: 12px; font-variant-ligatures: none; }
.lg-time { right: 0; width: 300px; }
.lg-custom { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid var(--line-faint); font-size: 12px; color: var(--ink-muted); }
.lg-custom label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lg-custom .lg-sbtn { align-self: flex-end; }
.lg-dt { height: 28px; padding: 0 6px; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); font-family: var(--font-mono); font-size: 12px; }
.lg-time-err { color: var(--danger-ink); }
.lg-fields-pop { right: 0; width: 440px; }
.lg-fields-head { display: flex; align-items: center; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line-faint); }
.lg-fields-title { flex: 1; font-size: 13px; font-weight: 600; }
.lg-fields-note { margin-right: 8px; font-size: 11px; color: var(--ink-muted); }
.lg-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; padding: 8px 10px; }
.lg-fitem { display: flex; align-items: baseline; gap: 8px; min-width: 0; padding: 5px 6px; background: transparent; border: 0; border-radius: var(--r-sm); font: inherit; text-align: left; cursor: pointer; }
.lg-fitem:hover { background: var(--bg-card); }
.lg-fname { flex: 0 0 auto; font-family: var(--font-mono); font-size: 12px; color: var(--ink); }
.lg-fhint { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; color: var(--ink-muted); }
.lg-fields-foot { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 12px; border-top: 1px solid var(--line-faint); background: var(--bg-card); font-size: 12px; color: var(--ink-muted); }
.lg-fields-foot > div { display: flex; align-items: baseline; gap: 8px; }
.lg-fl { flex: none; width: 76px; }
.lg-fcode { white-space: pre; font-family: var(--font-mono); color: var(--ink); font-variant-ligatures: none; }
.lg-fcode.join { color: var(--info); font-weight: 600; }

/* ─── Log details panel (design digest F): pushes the table and scrolls on its own ─── */
.lg-panel { flex: 0 0 360px; box-sizing: border-box; height: 100%; overflow: auto; background: var(--bg-paper); border-left: 1px solid var(--line); box-shadow: var(--shadow-panel); }
.lg-ph { position: sticky; top: 0; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; background: var(--bg-paper); border-bottom: 1px solid var(--line-faint); }
.lg-ph-r1 { display: flex; align-items: center; gap: 8px; }
.lg-ph-r1 h2 { flex: 1; margin: 0; font-size: 14px; font-weight: 600; }
.lg-close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; border-radius: var(--r-sm); color: var(--ink); cursor: pointer; }
.lg-ph-r2 { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.lg-ph-r3 { display: flex; gap: 6px; }
.lg-pbtn { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; background: var(--bg-card); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.lg-psec { padding: 12px 16px 4px; }
.lg-psec.last { padding-bottom: 16px; }
.lg-psec > .lg-eyebrow { margin-bottom: 6px; }
.lg-psec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lg-psec-head .lg-eyebrow { flex: 1; }
.lg-utc { flex: 1; font-size: 11px; color: var(--ink-muted); }
.lg-fields { margin: 0; }
.lg-frow { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 5px 0; border-bottom: 1px solid var(--line-faint); }
.lg-frow dt { font-family: var(--font-mono); font-size: 11px; line-height: 18px; color: var(--ink-muted); }
.lg-frow dd { margin: 0; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--ink); }
.lg-frow dd.lg-fact { display: flex; align-items: center; gap: 2px; }
.lg-cbtn { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; border-radius: var(--r-xs); color: var(--ink-muted); cursor: pointer; }
.lg-copied { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--green-faint); color: var(--green-ink); font-family: var(--font-sans); font-size: 11px; }
.lg-fbtn { height: 22px; display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-xs); color: var(--ink); font: inherit; font-family: var(--font-sans); font-size: 11px; cursor: pointer; }
.lg-pre { margin: 0; overflow: auto; padding: 10px 12px; background: var(--bg-sunken); border-radius: var(--r-sm); white-space: pre; tab-size: 4; font-family: var(--font-mono); font-size: 11px; line-height: 17px; color: var(--ink-muted); font-variant-ligatures: none; }
.lg-stack { max-height: 212px; }
.lg-st-exc { color: var(--danger-ink); font-weight: 600; }
.lg-st-tail { color: var(--ink); }
.lg-st-own { color: var(--ink); font-weight: 600; }
.lg-j-k { color: var(--info); }
.lg-j-s { color: var(--amber-ink); }

/* Panel open: the left side compacts (design digest F). div.lg, not .lg (see the root rule). */
div.lg.panel-open .lg-bar { gap: 6px 12px; }
div.lg.panel-open .lg-note-text, div.lg.panel-open .lg-pg, div.lg.panel-open .lg-div, div.lg.panel-open .lg-tlabel,
div.lg.panel-open .lg-copy-ts, div.lg.panel-open .lg-end-mix { display: none; }
div.lg.panel-open .lg-tbtn { width: 28px; padding: 0; justify-content: center; }
div.lg.panel-open .lg-table td.act { padding-right: 16px; }
div.lg.panel-open .lg-method { width: auto; }
div.lg.panel-open .lg-ms { gap: 6px; }
.lg-table tbody tr.sel { background: var(--info-faint); }
.lg-table tbody tr.sel .lg-abtn[aria-pressed="true"] { background: var(--bg-paper); }

/* ─── Follow strip (design digest E) ─── */
.lg-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 20px; border-bottom: 1px solid var(--line); }
.lg-follow-chip { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; background: var(--bg-paper); border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: 12px; }
.lg-quiet { color: var(--ink-muted); }
.lg-back { height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.lg-follow-to { font-size: 12px; color: var(--ink-muted); }
.lg-follow-to .lg-mono { font-size: 11px; }
div.lg.panel-open .lg-follow-to { display: none; }

/* ─── Row-actions menu (design digest G) ─── */
.lg-menu-host { position: absolute; right: 20px; z-index: 20; }
.lg-menu { position: relative; top: 0; width: 288px; }
.lg-menu-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-faint); font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.lg-ink { color: var(--ink); }
.lg-menu-items { display: flex; flex-direction: column; padding: 4px; }
.lg-mi { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; background: transparent; border: 0; border-radius: var(--r-sm); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.lg-mi:hover, .lg-mi:focus-visible { background: var(--info-faint); outline: none; }
.lg-mi:disabled { color: var(--ink-muted); cursor: not-allowed; opacity: 1; }
.lg-mi:disabled:hover { background: transparent; }
.lg-mi-label { flex: 1; }
.lg-mi-hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.lg-menu-sep { height: 1px; margin: 4px; background: var(--line-faint); }
.lg-table tbody tr.open { background: var(--bg-paper); }
.lg-abtn[aria-expanded="true"] { background: var(--bg-sunken); color: var(--ink); }
