:root { --bg:#f3f2f1; --panel:#fff; --text:#201f1e; --muted:#605e5c; --line:#e1dfdd; --accent:#0f6cbd; --hover:#f3f2f1; --sel:#dbebf8;
  --add-bg:#e7f5e6; --add-wd:#b5e2b0; --del-bg:#fde7e9; --del-wd:#f4b4ba; --gap:#eef3f8; --hatch:#f6f6f6; --ok:#107c10; --bad:#a4262c; --warn:#fff4ce; --code:#201f1e;
  --t-kw:#0000ff; --t-st:#a31515; --t-cm:#008000; --t-nu:#098658; --t-ty:#267f99; --t-ky:#0451a5; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#14161b; --panel:#1d2027; --text:#e6e8ec; --muted:#9aa2ae; --line:#2e333d; --accent:#7aa2f7; --hover:#262a33; --sel:#26354f;
  --add-bg:#18301d; --add-wd:#2a5a33; --del-bg:#3a1c20; --del-wd:#6b2a32; --gap:#1f2733; --hatch:#20232a; --ok:#6cc070; --bad:#f08a90; --warn:#4a3d12; --code:#e6e8ec;
  --t-kw:#7aa2f7; --t-st:#ce9178; --t-cm:#6a9955; --t-nu:#b5cea8; --t-ty:#4ec9b0; --t-ky:#9cdcfe; } }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, "Segoe UI", system-ui, sans-serif; overflow: hidden; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
button { background: var(--hover); border: 1px solid transparent; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
button:hover { border-color: var(--line); background: var(--sel); }
button:disabled { opacity: .5; cursor: default; }
button.icon { padding: 2px 8px; font-size: 16px; background: transparent; }
button.on { background: var(--sel); border-color: var(--accent); }
.muted { color: var(--muted); }
.only-phone { display: none; }
#app { height: 100%; display: flex; flex-direction: column; }
#top { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
#brand { color: var(--text); text-decoration: none; white-space: nowrap; }
#goto { flex: 1; max-width: 520px; margin-left: auto; } #goto input { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
#rate { font-size: 12px; white-space: nowrap; }
#banner { padding: 8px 14px; background: var(--warn); border-bottom: 1px solid var(--line); flex: none; }
#banner button { margin-left: 8px; }
#main { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* landing */
.landing { max-width: 640px; margin: 8vh auto 0; padding: 0 16px; overflow: auto; }
.landing h1 { font-size: 24px; margin: 0 0 6px; } .landing p { color: var(--muted); }
.landing form { display: flex; gap: 8px; margin: 16px 0; } .landing input { flex: 1; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.landing .recent a { display: block; padding: 6px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }

/* PR header + tabs */
#prhead { background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 16px 0; flex: none; }
#prhead h1 { font-size: 18px; margin: 0 0 4px; font-weight: 600; overflow-wrap: anywhere; }
#prhead .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 1px 10px; border-radius: 10px; color: #fff; font-size: 12px; }
.badge.open { background: #107c10; } .badge.merged { background: #6b46c1; } .badge.closed { background: #a4262c; } .badge.draft { background: #7a7574; }
.branch { font-family: var(--mono); font-size: 12px; background: var(--hover); padding: 1px 6px; border-radius: 4px; }
.tabs { display: flex; gap: 4px; margin-top: 8px; }
.tabs a { padding: 6px 10px; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a.on { border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { background: var(--hover); }
#toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); flex: none; }
#toolbar .sp { flex: 1; }
#toolbar .seg { display: inline-flex; } #toolbar .seg button { border-radius: 0; border: 1px solid var(--line); background: var(--panel); } #toolbar .seg button:first-child { border-radius: 4px 0 0 4px; } #toolbar .seg button:last-child { border-radius: 0 4px 4px 0; border-left: 0; } #toolbar .seg button.on { background: var(--sel); border-color: var(--accent); }
#picker-btn { font-weight: 600; background: var(--panel); border-color: var(--line); }
#filter { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); width: 190px; }
.progress { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* body: tree + diff */
#body { flex: 1; min-height: 0; display: flex; position: relative; }
#tree { width: 300px; min-width: 200px; max-width: 45vw; resize: horizontal; overflow: auto; background: var(--panel); border-right: 1px solid var(--line); position: relative; flex: none; }
#tree .win { position: absolute; left: 0; right: 0; }
.tr { height: 26px; display: flex; align-items: center; gap: 4px; padding-right: 8px; white-space: nowrap; cursor: pointer; font-size: 13px; }
.tr:hover { background: var(--hover); } .tr.sel { background: var(--sel); } .tr.cur { box-shadow: inset 3px 0 var(--accent); }
.tr .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; } .tr.done .nm { color: var(--muted); text-decoration: line-through; text-decoration-color: transparent; }
.tr .chev { width: 14px; text-align: center; color: var(--muted); font-size: 10px; flex: none; }
.tr .cnt { font-size: 11px; color: var(--muted); } .cnt .a { color: var(--ok); } .cnt .d { color: var(--bad); }
.tb { display: inline-block; min-width: 18px; text-align: center; font-size: 11px; font-weight: 600; border-radius: 3px; padding: 0 3px; border: 1px solid currentColor; line-height: 15px; flex: none; }
.tb.A { color: var(--ok); } .tb.D { color: var(--bad); } .tb.M { color: var(--accent); } .tb.R { color: #8a6a00; } .tb.C { color: #8a6a00; }
.tr .rv { color: var(--ok); font-size: 12px; width: 14px; flex: none; }
#diff { flex: 1; min-width: 0; overflow: auto; position: relative; background: var(--bg); }
#spacer { position: relative; }
.it { position: absolute; left: 0; right: 0; }
#stick { position: sticky; top: 0; height: 0; z-index: 5; overflow: visible; }
.fh { position: sticky; left: 0; width: var(--vw, 100%); height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.fh .col { width: 22px; cursor: pointer; text-align: center; color: var(--muted); }
.fh .fn { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; } .fh .fn b { font-weight: 600; } .fh .fn small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fh .st { margin-left: 4px; } .fh .sp { flex: 1; } .fh label { white-space: nowrap; font-size: 13px; cursor: pointer; }
.fh .a { color: var(--ok); font-weight: 600; } .fh .d { color: var(--bad); font-weight: 600; }
.fh.collapsed { border-radius: 6px; }
.row { display: flex; font: 12.5px/20px var(--mono); height: 20px; background: var(--panel); border-left: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--code); white-space: pre; }
.row .ln { width: 46px; flex: none; text-align: right; padding-right: 6px; color: var(--muted); user-select: none; font-size: 11.5px; }
.row .sg { width: 16px; flex: none; text-align: center; user-select: none; color: var(--muted); }
.row .tx { flex: 1; overflow: hidden; padding-right: 8px; }
.row.add { background: var(--add-bg); } .row.del { background: var(--del-bg); }
.row mark.wd { background: var(--add-wd); color: inherit; border-radius: 2px; } .row.del mark.wd { background: var(--del-wd); }
.row.split { display: grid; grid-template-columns: 1fr 1fr; } .row.split .half { display: flex; min-width: 0; overflow: hidden; } .row.split .half + .half { border-left: 1px solid var(--line); }
.half.add { background: var(--add-bg); } .half.del { background: var(--del-bg); } .half.none { background: var(--hatch); background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(128,128,128,.18) 4px 5px); }
.half.del mark.wd { background: var(--del-wd); } .half.add mark.wd { background: var(--add-wd); }
.row.last { border-bottom: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.t-kw { color: var(--t-kw); } .t-st { color: var(--t-st); } .t-cm { color: var(--t-cm); font-style: italic; } .t-nu { color: var(--t-nu); } .t-ty { color: var(--t-ty); } .t-ky { color: var(--t-ky); }
.gap { height: 28px; display: flex; align-items: center; background: var(--gap); border: 1px solid var(--line); border-width: 0 1px; color: var(--muted); font-size: 12px; }
.gap .in { position: sticky; left: 0; display: flex; gap: 6px; align-items: center; padding-left: 12px; }
.gap button { padding: 0 8px; font-size: 12px; background: var(--panel); border-color: var(--line); }
.note { height: 56px; display: flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; color: var(--muted); }
.note .in { position: sticky; left: 0; padding: 0 16px; }
.note a, .gap a { cursor: pointer; }
.cm { background: var(--panel); border: 1px solid var(--line); border-width: 0 1px; padding: 6px 0; }
.outdated { font-size: 11px; color: #8a6a00; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* pages */
.page { flex: 1; overflow: auto; padding: 16px; }
.page .inner { max-width: 960px; margin: 0 auto; }
.page .desc p { margin: 6px 0; } .page .desc pre { padding: 8px; background: var(--hover); border-radius: 4px; overflow: auto; }
.stats { display: flex; flex-wrap: wrap; gap: 20px; } .stats div b { display: block; font-size: 20px; }
.commit { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.commit .msg { flex: 1; min-width: 200px; } .commit code { font: 12px var(--mono); }
.pop { position: absolute; z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.25); min-width: 320px; max-width: 94vw; max-height: 60vh; overflow: auto; padding: 4px 0; }
.pop .opt { display: flex; gap: 8px; padding: 6px 12px; cursor: pointer; align-items: baseline; } .pop .opt:hover { background: var(--hover); } .pop .opt.sel { background: var(--sel); }
.pop .opt .n { color: var(--muted); width: 22px; flex: none; } .pop .hint { padding: 4px 12px; color: var(--muted); font-size: 12px; }
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); max-width: min(560px, 94vw); padding: 18px 20px; }
dialog::backdrop { background: rgba(0,0,0,.4); }
dialog h2 { margin: 0 0 10px; font-size: 18px; } dialog input[type=password], dialog input[type=text] { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
dialog .row2 { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
dialog table { border-collapse: collapse; } dialog td { padding: 3px 12px 3px 0; } kbd { font: 12px var(--mono); background: var(--hover); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
#scrim { display: none; }

@media (max-width: 800px) {
  .only-phone { display: inline-block; }
  #goto { display: none; }
  #brand { flex: 1; }
  body.drawer #scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  #prhead { padding: 8px 12px 0; } #toolbar { padding: 6px 10px; gap: 6px; } #filter { width: 100%; order: 9; }
  .hide-phone { display: none !important; }
  .landing { margin-top: 3vh; }
}

/* ---- v2: sign-in, home lists, inline comments */
#who { display: inline-flex; align-items: center; }
button.who { display: inline-flex; align-items: center; gap: 6px; background: transparent; padding: 2px 6px; }
.av { border-radius: 50%; flex: none; display: inline-block; background: var(--hover); vertical-align: middle; width: 24px; height: 24px; object-fit: cover; }
#who .av { width: 22px; height: 22px; }
.err { color: var(--bad); } .pad { padding: 8px 12px; }
.usercode { font: 700 34px/1.2 var(--mono); letter-spacing: .12em; text-align: center; padding: 14px; margin: 10px 0; background: var(--hover); border: 1px dashed var(--accent); border-radius: 8px; user-select: all; }
dialog .steps { padding-left: 20px; margin: 8px 0; } dialog .steps li { margin: 4px 0; }
dialog label.radio { display: block; margin: 3px 0; } dialog details { margin: 10px 0; } dialog summary { cursor: pointer; }
dialog textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); font: inherit; }
dialog { max-height: 90vh; overflow: auto; }
.landing { max-width: 860px; }
.home .tabs { margin: 14px 0 8px; } .home .chips, .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.chips button.on { background: var(--sel); border-color: var(--accent); } .chips input { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); margin-left: auto; min-width: 160px; }
.repoctl { display: flex; gap: 8px; margin: 8px 0; } .repoctl input { flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.prrow { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); background: var(--panel); }
.prrow:hover { background: var(--hover); } .prrow .main { flex: 1; min-width: 0; } .prrow .t { overflow-wrap: anywhere; } .prrow .av { width: 28px; height: 28px; }
.prrow .badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pill { font-size: 11px; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.bad { color: var(--bad); } .pill.warn { color: #8a6a00; } .pill.muted { color: var(--muted); }
#home-pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px; }
#home-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; } #home-list > p, #home-list > .card { margin: 10px 12px; }
.status { font-size: 11px; font-weight: 600; padding: 0 8px; border-radius: 10px; color: #fff; background: #0f6cbd; }
.status.s-resolved { background: var(--ok); } .status.s-pending { background: #8a6a00; } .status.s-outdated { background: #7a7574; } .status.s-active { background: #0f6cbd; }
.row { position: relative; }
.addc { position: absolute; left: 3px; top: 1px; z-index: 2; width: 18px; height: 18px; padding: 0; border-radius: 4px; line-height: 16px; font: 700 14px/16px var(--mono); background: var(--accent); color: #fff; border: 0; opacity: 0; cursor: pointer; }
.row:hover .addc, .half:hover .addc, .addc:focus-visible { opacity: 1; } .addc:hover { background: var(--accent); filter: brightness(1.15); }
@media (hover: none) { .addc { opacity: .55; } }
.row.sel, .half.sel { box-shadow: inset 3px 0 var(--accent); background-image: linear-gradient(rgba(15,108,189,.16), rgba(15,108,189,.16)); }
.row.split .half { position: relative; }
.row.split { height: 100%; } .row.split .half .tx { white-space: pre-wrap; word-break: break-all; min-width: 0; } .row.split .half .ln, .row.split .half .sg { flex: none; }
.cm { padding: 4px 0; }
.thread { position: sticky; left: 0; width: min(var(--vw, 100%), 780px); margin: 6px 0 6px 60px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; white-space: normal; }
.thread.resolved { opacity: .92; } .thread.pending { border-style: dashed; } .thread.flash { box-shadow: 0 0 0 3px var(--accent); }
.thread .th { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--hover); border-radius: 8px 8px 0 0; font-size: 12px; }
.thread.collapsed .th { border-bottom: 0; border-radius: 8px; } .thread .sp { flex: 1; }
.thread .th button { padding: 1px 8px; font-size: 12px; } .tcol { cursor: pointer; width: 16px; text-align: center; color: var(--muted); }
.tsum { display: none; } .thread.collapsed .tsum { display: block; padding: 4px 10px 6px 34px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .c { display: flex; gap: 8px; padding: 8px 10px; } .thread .c + .c { border-top: 1px solid var(--line); } .thread .cb { flex: 1; min-width: 0; }
.thread .md { overflow-wrap: anywhere; } .thread .md p { margin: 3px 0; } .thread blockquote { margin: 4px 0; padding: 0 10px; border-left: 3px solid var(--line); color: var(--muted); }
.thread pre { margin: 4px 0; padding: 6px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; overflow: auto; font: 12px/1.4 var(--mono); } .thread pre.suggestion { border-left: 3px solid var(--ok); }
.thread .li { margin: 2px 0; }
.thread textarea { display: block; width: calc(100% - 20px); margin: 8px 10px 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font: 13px/1.4 system-ui, sans-serif; resize: vertical; }
.thread .c textarea { width: 100%; margin: 4px 0 0; }
.thread .rbtns { display: flex; align-items: center; gap: 6px; padding: 6px 10px 8px; justify-content: flex-end; flex-wrap: wrap; } .thread .rbtns .sp { flex: 1; }
.thread .reply { border-top: 1px solid var(--line); } .thread .preview { padding: 8px 12px; min-height: 90px; }
.thread .seg { display: inline-flex; } .thread .seg button { border: 1px solid var(--line); border-radius: 0; background: var(--panel); } .thread .seg button:first-child { border-radius: 4px 0 0 4px; } .thread .seg button:last-child { border-radius: 0 4px 4px 0; border-left: 0; } .thread .seg button.on { background: var(--sel); border-color: var(--accent); }
.olist { position: sticky; left: 0; margin: 4px 0 4px 60px; font-size: 12px; } .olist button { background: transparent; border: 0; padding: 2px 4px; color: var(--accent); }
#cpanel { width: 340px; flex: none; border-left: 1px solid var(--line); background: var(--panel); overflow: auto; }
#cpanel[hidden] { display: none; } #cpanel .ph { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; } #cpanel .ph .icon { margin-left: auto; } #cpanel .chips { padding: 0 12px; }
#cpanel .pf { padding: 8px 12px 2px; font: 600 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
#cpanel .pt { display: flex; gap: 8px; padding: 6px 12px; cursor: pointer; border-top: 1px solid var(--line); } #cpanel .pt:hover { background: var(--hover); } #cpanel .pm { min-width: 0; flex: 1; } #cpanel .who { font-size: 12px; } #cpanel .ex { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) { #cpanel { position: fixed; z-index: 28; right: 0; top: 0; bottom: 0; width: min(92vw, 360px); box-shadow: -4px 0 24px rgba(0,0,0,.3); } .thread { margin-left: 8px; } .olist { margin-left: 8px; } }
@media (max-width: 800px) { #who-login { display: none; } #top { gap: 6px; padding: 6px 8px; } #rate { font-size: 11px; } }

/* ---- v3: tree icon, signed-out hint, file navigation */
.tree-icon { display: block; } #menu { align-items: center; justify-content: center; padding: 4px 6px; } #menu { display: none !important; }   /* the phone's file button is #pbar-menu in the compact bar */
.addc.hint { background: transparent; color: var(--muted); border: 1px dashed var(--muted); line-height: 14px; opacity: .3; }
.row:hover .addc.hint, .half:hover .addc.hint, .addc.hint:focus-visible { opacity: .9; } .addc.hint:hover { background: transparent; filter: none; color: var(--accent); border-color: var(--accent); }
@media (hover: none) { .addc.hint { opacity: .4; } }
.hint-reply { background: transparent; color: var(--muted); border: 1px dashed var(--line); font-size: 12px; }
.fpos { padding: 0 6px; font-size: 12px; color: var(--muted); align-self: center; font-variant-numeric: tabular-nums; }
#file-nav[hidden] { display: none; }

/* ---- v4: phone layout: one compact bar over the file, everything else in the drawer */
#drawer { display: contents; } #dtop, #dbottom, #pbar { display: none; } .dgrow { display: none; }
@media (max-width: 800px) {
  body.has-pr #top, body.has-pr #prhead, body.has-pr #toolbar { display: none; }
  body.has-pr #pbar { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 4px; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
  #pbar button { min-width: 40px; height: 36px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; padding: 0 6px; }
  #pbar button:disabled { opacity: .35; }
  #pbar-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; font: 600 13px var(--mono); }
  #drawer { display: flex; flex-direction: column; position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); background: var(--panel); transform: translateX(-102%); transition: transform .18s; box-shadow: 4px 0 24px rgba(0,0,0,.3); overflow: hidden; }
  body.drawer #drawer { transform: none; }
  #dtop { display: block; flex: none; max-height: 55%; overflow: auto; border-bottom: 1px solid var(--line); }
  .dpr { padding: 10px 12px 4px; } .dtitle { overflow-wrap: anywhere; margin-bottom: 4px; } .dpr .meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; color: var(--muted); font-size: 12px; }
  #d-details summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-top: 6px; } #d-details .desc { padding: 6px 0; font-size: 13px; max-height: 40vh; overflow: auto; }
  .dtabs { display: flex; gap: 2px; padding: 0 8px; } .dtabs a { padding: 8px 10px; color: var(--text); text-decoration: none; border-bottom: 2px solid transparent; font-size: 13px; } .dtabs a.on { border-bottom-color: var(--accent); font-weight: 600; }
  .dsec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 12px; } label.dsec { display: flex; }
  #dfilter { flex: 1; min-width: 0; width: 100%; padding: 6px 8px; }
  #tree { position: relative; flex: 1 1 auto; width: auto; min-width: 0; max-width: none; min-height: 120px; resize: none; border-right: 0; background: transparent; }
  .dgrow { display: block; flex: 1; }
  #dbottom { display: block; flex: none; max-height: 50%; overflow: auto; border-top: 1px solid var(--line); background: var(--panel); }
  #dbottom summary { cursor: pointer; padding: 10px 12px; font-weight: 600; font-size: 13px; }
  #drawer .seg { display: inline-flex; } #drawer .seg button { border: 1px solid var(--line); border-radius: 0; background: var(--panel); } #drawer .seg button.on { background: var(--sel); border-color: var(--accent); }
  .pop { z-index: 40; }
}
