/* scanevm.dev, laid out and coloured like a macOS app (system colours, SF fonts).
   Light/dark follow the system. */
:root {
  color-scheme: light dark;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --size: 12.5px;

  /* window chrome (NSColor.windowBackgroundColor etc.) */
  --window: #ececec; --toolbar: #ececec; --sidebar: #e6e6e8; --control: #ffffff;
  --sep: #d1d1d1; --text: #1d1d1f; --text2: #6e6e73; --text3: #a1a1a6;
  --accent: #007aff; --chain: #af52de; --star: #f5b800; --warn: #ff9500;
  --row-hover: rgba(0, 0, 0, 0.05); --row-sel: rgba(0, 0, 0, 0.09);
  --search-bg: rgba(118, 118, 128, 0.14); --search-bg-solid: #dcdcde; --field-edge: rgba(0, 0, 0, 0.12); --chip-hover: rgba(118, 118, 128, 0.22);
  --menu-bg: rgba(246, 246, 246, 0.96); --shadow: 0 10px 34px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.18);
  --mark: rgba(255, 196, 0, 0.45);

  /* code pane: GitHub's code view (Primer primitives, light: fgColor-default, fgColor-muted,
     bgColor-attention-muted for highlighted lines, borderColor-attention-emphasis for their edge) */
  --code-font: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --bg: #ffffff; --fg: #1f2328; --gutter: #59636e; --active: rgba(0, 0, 0, 0.035); --sel: #add6ff;
  --hl: #fff8c5; --hl-edge: #9a6700; --match: rgba(255, 200, 0, 0.35); --match-border: #d4a72c;
  --match-sel: rgba(255, 150, 0, 0.45); --selmatch: rgba(173, 214, 255, 0.45);
  --panel: #f6f8fa; --border: #d0d7de; --accent-soft: #007aff22; --err: #d70015;
  --btn-bg: #f6f8fa; --btn-border: #d1d9e0;
  /* syntax: GitHub's prettylights colours (Primer primitives, MIT), named after its pl-* classes */
  --pl-k: #cf222e; --pl-c: #59636e; --pl-s: #0a3069; --pl-en: #6639ba; --pl-c1: #0550ae;
  --pl-v: #953800; --pl-mi: #1f2328; --pl-ent: #0550ae; --pl-sr: #116329; --pl-mh: #0550ae;
  --pl-ins: #116329; --pl-ins-bg: #dafbe1; --pl-del: #82071e; --pl-del-bg: #ffebe9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --window: #2b2b2d; --toolbar: #2b2b2d; --sidebar: #29282c; --control: #1e1f22;
    --sep: #141414; --text: #e5e5e7; --text2: #98989d; --text3: #6c6c70;
    --accent: #0a84ff; --chain: #bf5af2; --star: #ffd60a; --warn: #ff9f0a;
    --row-hover: rgba(255, 255, 255, 0.05); --row-sel: rgba(255, 255, 255, 0.1);
    --search-bg: rgba(118, 118, 128, 0.24); --search-bg-solid: #3a3a3d; --field-edge: rgba(255, 255, 255, 0.14); --chip-hover: rgba(118, 118, 128, 0.34);
    --menu-bg: rgba(40, 40, 42, 0.97); --shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.14);
    --mark: rgba(255, 196, 0, 0.32);

    /* GitHub's dark code view */
    --bg: #0d1117; --fg: #f0f6fc; --gutter: #9198a1; --active: rgba(255, 255, 255, 0.045); --sel: #264f78;
    --hl: rgba(187, 128, 9, 0.15); --hl-edge: #9e6a03; --match: rgba(255, 200, 0, 0.25); --match-border: #a08a3c;
    --match-sel: rgba(255, 150, 0, 0.45); --selmatch: rgba(173, 214, 255, 0.15);
    --panel: #26282c; --border: #3a3d42; --accent-soft: #0a84ff33; --err: #ff6961;
    --btn-bg: #212830; --btn-border: #3d444d;
    --pl-k: #ff7b72; --pl-c: #9198a1; --pl-s: #a5d6ff; --pl-en: #d2a8ff; --pl-c1: #79c0ff;
    --pl-v: #ffa657; --pl-mi: #f0f6fc; --pl-ent: #7ee787; --pl-sr: #7ee787; --pl-mh: #1f6feb;
    --pl-ins: #aff5b4; --pl-ins-bg: #033a16; --pl-del: #ffdcd7; --pl-del-bg: #67060c;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
/* iOS Safari enlarges text in wide blocks on its own (the welcome page's key list): sizes are as set. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { display: flex; flex-direction: column; background: var(--window); color: var(--text); font: 13px/1.3 var(--ui); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: default; }
[hidden] { display: none !important; }
.dim { color: var(--text2); }

/* icons */
.ic { display: inline-flex; width: 16px; height: 16px; flex: none; align-items: center; justify-content: center; }
.ic svg { width: 15px; height: 15px; }
.ic.small svg { width: 11px; height: 11px; }
.c-chain { color: var(--chain); }
.c-star { color: var(--star); }
.c-warn { color: var(--warn); }
.c-dim { color: var(--text2); }

/* ---------------------------------------------------------------- toolbar */
.toolbar { height: 52px; flex: none; display: flex; align-items: center; background: var(--toolbar); border-bottom: 1px solid var(--sep); }
.tb-side { flex: 1 1 0; min-width: 0; display: flex; align-items: center; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 7px; font: 600 13px var(--ui); color: var(--text2); letter-spacing: -0.01em; border: 0; background: none; padding: 0; }
#side-btn { pointer-events: none; } /* a label here; on a small screen it opens the sidebar */
.scrim { display: none; }
.brand-ic { flex: none; width: 20px; height: 20px; }
.tb-end { justify-content: flex-end; }
.gh { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--text2); }
.gh:hover { color: var(--text); background: var(--row-hover); }
.gh:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tb-center { position: relative; flex: 0 1 680px; min-width: 300px; }
.search { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 7px; background: var(--search-bg); }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.chain-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0 2px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chain-btn svg { color: var(--text2); }
.search-div { width: 1px; height: 14px; background: var(--text3); opacity: 0.6; }
.search-ic { color: var(--text2); flex: none; }
#q { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; }
#q::placeholder { color: var(--text3); }
.busy { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text2); white-space: nowrap; }
.search-clear { border: 0; background: none; padding: 0; color: var(--text3); display: inline-flex; }
.tog { min-width: 20px; height: 18px; padding: 0 3px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--text2); font: 11px var(--mono); }
.tog[aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }

/* search results (VS Code-like dropdown) */
.results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: min(520px, 70vh); overflow: auto; z-index: 20; background: var(--menu-bg); border-radius: 9px; box-shadow: var(--shadow); padding: 4px 0 6px; backdrop-filter: blur(20px); }
.res-summary { padding: 4px 12px 6px; font-size: 11px; color: var(--text2); }
.res-file { display: flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: 12px; }
.res-file:hover { background: var(--row-hover); }
.res-name { font-weight: 600; white-space: nowrap; }
.res-path { flex: 1; min-width: 0; color: var(--text3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
.res-count { font-size: 10.5px; color: var(--text2); background: var(--search-bg); border-radius: 8px; padding: 0 6px; }
.res-line { display: flex; gap: 8px; padding: 2px 10px 2px 42px; font: 12px var(--mono); white-space: nowrap; overflow: hidden; }
.res-line:hover { background: var(--row-hover); }
.res-line.sel { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.res-ln { color: var(--text3); min-width: 28px; text-align: right; flex: none; }
.hit-text { overflow: hidden; text-overflow: ellipsis; }
.hit-text mark { background: var(--mark); color: inherit; border-radius: 2px; }

/* ---------------------------------------------------------------- split view */
.main { flex: 1; display: flex; min-height: 0; }
.sidebar { width: var(--side-w, 340px); min-width: 220px; max-width: 560px; flex: none; display: flex; flex-direction: column; background: var(--sidebar); min-height: 0; }
.split { width: 1px; flex: none; background: var(--sep); position: relative; cursor: col-resize; }
.split::after { content: ""; position: absolute; inset: 0 -4px; }
.detail { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--control); }

/* sidebar tree */
.tree { flex: 1; overflow: auto; padding: 6px 8px 10px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.row { display: flex; align-items: center; gap: 6px; height: 26px; padding-right: 8px; border-radius: 5px; white-space: nowrap; }
.row:hover { background: var(--row-hover); }
.row.sel { background: var(--row-sel); }
.disc { width: 12px; flex: none; display: inline-flex; justify-content: center; color: var(--text2); }
.disc .ic svg { width: 10px; height: 10px; }
.row .title { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 20px; }
.row .subtitle { font-size: 11px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.row .retry { margin-left: auto; border: 0; background: none; color: var(--warn); padding: 0; display: inline-flex; }
.row .retry .ic svg { width: 12px; height: 12px; stroke-width: 2; }
.row .spin { margin-left: auto; }
.rename { font-size: 13px; padding: 1px 4px; border: 1px solid var(--accent); border-radius: 3px; background: var(--control); outline: 0; min-width: 0; width: 60%; }
.rename { -webkit-user-select: text; user-select: text; } /* (Safari won't edit an input under user-select: none) */
/* Recent at the foot of the sidebar, like a VS Code side pane: a header at the bottom that
   opens upward, the tree giving up the space; inside, the last month's sidebars by day. */
.history { flex: none; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--sep); }
.history.open { flex: 0 1 45%; }
.history-head { flex: none; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 14px 0 10px; border: 0; background: none; font: 600 11px var(--ui); letter-spacing: 0.02em; color: var(--text2); text-align: left; }
.history-head:hover { color: var(--text); }
.history-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.history-head svg { flex: none; transition: transform 0.15s ease; }
.history.open .history-head svg { transform: rotate(90deg); }
.history-count { margin-left: auto; font-weight: 400; font-variant-numeric: tabular-nums; }
.history-list { flex: 1; min-height: 0; overflow: auto; padding: 0 8px 10px; }
.history:not(.open) .history-list { display: none; }
.h-day { position: sticky; top: 0; z-index: 1; padding: 8px 6px 3px; font-size: 11px; font-weight: 600; color: var(--text2); background: var(--sidebar); }
.h-item { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px; border-radius: 5px; color: var(--text); text-decoration: none; white-space: nowrap; }
.h-item:hover { background: var(--row-hover); }
.h-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.h-names { flex: 0 1 auto; min-width: 20px; overflow: hidden; text-overflow: ellipsis; }
.h-more { flex: none; color: var(--text2); }
.h-chains { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: var(--text2); }
.h-time { flex: none; margin-left: auto; padding-left: 8px; font-size: 11px; color: var(--text2); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .history-head svg { transition: none; } }
/* An empty sidebar is not shown: the welcome page has the window to itself. */
body.side-empty .sidebar, body.side-empty .split { display: none; }

/* ---------------------------------------------------------------- tabs */
.tabbar { height: 30px; flex: none; display: flex; overflow-x: auto; overflow-y: hidden; background: var(--window); border-bottom: 1px solid var(--sep); scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar:empty { display: none; } /* the welcome page has no tabs: no empty strip above it */
.tab { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 10px; flex: none; font-size: 13px; border-right: 1px solid var(--sep); }
.tab.active { background: var(--control); }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.tab-addr { font-size: 10.5px; color: var(--text2); }
.tab-close { border: 0; background: none; padding: 2px; color: var(--text2); display: inline-flex; border-radius: 3px; }
.tab-close:hover { background: var(--row-sel); color: var(--text); }

.banner { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 12.5px; background: color-mix(in srgb, var(--warn) 15%, transparent); white-space: nowrap; overflow: hidden; }

/* ---------------------------------------------------------------- code pane */
.editor-wrap { flex: 1; position: relative; min-height: 0; }
.code { position: absolute; inset: 0; }
/* The welcome page (no file open): the title, the search field, three examples to open, Recent. */
.empty { position: absolute; inset: 0; overflow: auto; padding: 0 24px; background: var(--control); }
.welcome { width: min(680px, 100%); min-height: 100%; margin: 0 auto; padding: 56px 0 64px; display: flex; flex-direction: column; justify-content: center; }
.w-mark { align-self: center; width: 60px; height: 60px; margin-bottom: 20px; }
.w-title { margin: 0; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.026em; text-align: center; text-wrap: balance; }
/* The examples: a row of chips under the search field, the longer note on hover. */
.w-examples { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.w-head { margin-right: 4px; font-size: 13px; color: var(--text2); }
.w-item { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px; border-radius: 17px; background: var(--search-bg); color: var(--text); text-decoration: none; font-size: 13px; white-space: nowrap; }
.w-item:hover { background: var(--chip-hover); }
.w-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.w-item svg { flex: none; width: 15px; height: 15px; color: var(--accent); }
.w-what { color: var(--text2); }
/* The lists' rows are inset by their padding: the lists reach out by as much, so text lines up. */
.recent { margin: 48px -10px 0; display: flex; flex-direction: column; }
.recent-head { padding: 0 10px 4px; font-size: 12px; font-weight: 600; color: var(--text2); }
.recent-item { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.recent-item:hover { background: var(--row-hover); }
.recent-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.recent-title { display: flex; gap: 5px; min-width: 0; font-size: 13.5px; }
.recent-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-more { flex: none; color: var(--text2); }
.recent-sub { font-size: 12px; color: var(--text2); white-space: nowrap; }
/* What scan does: as many columns as fit (three in the 680px column, one on a phone). */
.w-feats { margin-top: 48px; }
.w-feats-head { margin: 0 0 12px; font-size: 12px; font-weight: 600; color: var(--text2); }
.w-feat-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px 28px; }
.w-feat { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.w-feat svg { width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }
.w-feat-name { display: block; font-size: 13.5px; font-weight: 600; }
.w-feat-what { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--text2); }
/* The search field on the welcome page (main.js renderEmpty moves it here): large, lifted off
   the page; the workspace toggles wait for a workspace. */
.home-search { position: relative; margin-top: 24px; }
.home-search .search {
  height: 56px; gap: 10px; padding: 0 14px 0 16px; border-radius: 14px; background: var(--control);
  box-shadow: 0 0 0 1px var(--field-edge), 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.08);
}
.home-search .search:focus-within {
  box-shadow: 0 0 0 1px var(--field-edge), 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.08),
    0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent);
}
.home-search .chain-btn { font-size: 15px; }
.home-search .search-div { height: 20px; }
.home-search .search-ic { width: 17px; height: 17px; }
.home-search #q { font-size: 17px; }
.home-search .tog { display: none; }

/* ---------------------------------------------------------------- status bar */
.statusbar { height: 22px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 10px; font-size: 11px; color: var(--text2); border-top: 1px solid var(--sep); background: var(--control); }
/* Long paths lose their start, not their file name (the app truncates at the head). */
#status-left { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
#status-left > span, .res-path > span { direction: ltr; unicode-bidi: isolate; }
#status-left.notice { color: var(--text); direction: ltr; }
.status-right { display: flex; gap: 12px; white-space: nowrap; }
.status-right span:first-child { user-select: text; }

/* ---------------------------------------------------------------- menus and sheets */
.menu { position: fixed; z-index: 50; min-width: 180px; max-height: 70vh; overflow: auto; padding: 5px; background: var(--menu-bg); border-radius: 8px; box-shadow: var(--shadow); backdrop-filter: blur(20px); font-size: 13px; }
.menu-item { display: flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 4px; white-space: nowrap; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-check { width: 16px; display: inline-flex; justify-content: center; }
.menu-sep { height: 1px; margin: 5px 8px; background: var(--sep); }
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; background: rgba(0, 0, 0, 0.18); outline: 0; }
.pick { width: min(600px, 92vw); max-height: 64vh; display: flex; flex-direction: column; background: var(--menu-bg); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; backdrop-filter: blur(20px); }
.pick-title { padding: 10px 14px 6px; font-size: 12px; font-weight: 600; color: var(--text2); }
.pick-input { margin: 0 10px 8px; padding: 7px 10px; border-radius: 6px; border: 0; outline: 0; background: var(--search-bg); font-size: 14px; }
.pick-list { overflow: auto; padding: 0 6px 6px; }
.pick-item { padding: 5px 8px; border-radius: 5px; }
.pick-item.sel { background: var(--accent); color: #fff; }
.pick-item.sel .pick-sub, .pick-item.sel .pick-detail { color: rgba(255, 255, 255, 0.8); }
.pick-main { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.pick-name { font-weight: 500; }
.pick-sub { font-size: 11px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; }
.pick-detail { font: 11.5px var(--mono); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* spinner */
.spin { display: inline-block; width: 11px; height: 11px; flex: none; border-radius: 50%; border: 1.6px solid var(--text3); border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* CodeMirror find panel */
.ol-find { display: flex; align-items: center; gap: 6px; padding: 6px 10px; font: 12px var(--ui); color: var(--fg); background: var(--panel); }
.ol-field { display: flex; align-items: center; gap: 2px; width: 340px; max-width: 60vw; padding: 0 3px 0 0; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
.ol-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ol-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: 12px var(--mono); padding: 4px 8px; }
.ol-field input::placeholder { color: var(--gutter); font-family: var(--ui); }
.ol-find.ol-none .ol-field { border-color: var(--err); }
.ol-tog, .ol-btn { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 22px; padding: 0 4px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--gutter); font: 11px var(--mono); }
.ol-tog:hover, .ol-btn:hover { background: var(--active); color: var(--fg); }
.ol-tog[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.ol-btn { height: 24px; min-width: 24px; }
.ol-count { min-width: 64px; color: var(--gutter); font-variant-numeric: tabular-nums; }
.ol-find.ol-none .ol-count { color: var(--err); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 760px) {
  /* The toolbar is mostly the search field: the logo keeps its icon, GitHub stays, the search
     toggles go. */
  .tb-side { flex: none; padding: 0 6px 0 10px; }
  .tb-end { padding: 0 8px 0 6px; }
  .brand { font-size: 0; gap: 0; }
  .tog { display: none; }
  .tb-center { flex: 1; min-width: 0; }
  .search { gap: 4px; padding: 0 6px; }
  .chain-btn { font-size: 12px; }
  /* The sidebar is a drawer over the code: the logo opens it, opening a file closes it. */
  #side-btn { pointer-events: auto; }
  .brand-ic { width: 26px; height: 26px; }
  .split { display: none; }
  .sidebar {
    position: fixed; top: 53px; bottom: 0; left: 0; z-index: 30; width: min(86vw, 340px); min-width: 0; max-width: none;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.25); transform: translateX(-105%); visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }
  body.side-open .sidebar { transform: none; visibility: visible; transition: transform 0.2s ease; }
  body.side-open .scrim { display: block; position: fixed; inset: 53px 0 0 0; z-index: 29; background: rgba(0, 0, 0, 0.3); }
  .results { z-index: 35; } /* over the open drawer */
  /* The welcome page starts at the top; the examples line up at the left under their label. */
  .empty { padding: 0 16px; }
  .welcome { padding: 32px 0; justify-content: flex-start; }
  .w-mark { width: 44px; height: 44px; margin-bottom: 14px; }
  .w-title { font-size: 26px; }
  .home-search { margin-top: 20px; }
  .home-search .search { height: 50px; gap: 8px; padding: 0 10px 0 12px; }
  .w-examples { justify-content: flex-start; }
  .w-head { width: 100%; }
  .recent-item { grid-template-columns: 16px minmax(0, 1fr); row-gap: 2px; }
  .recent-sub { grid-column: 2; }
  /* iOS zooms the page into an input under 16px when it gets focus. */
  #q, .rename, .pick-input, .ol-field input { font-size: 16px; }
}
