  :root {
    color-scheme: dark;
    --bg: #101214; --panel: #161a1d; --raise: #1c2125; --line: #262c31; --ink: #d9dee3; --muted: #7b858f; --dim: #50585f;
    --accent: #5ef2b0; --amber: #f5b83d; --blue: #6cb6ff; --pink: #ff8ab3;
    --add: #5ef2b0; --del: #ff7b72;
    --add-bg: color-mix(in srgb, var(--add) 10%, transparent); --del-bg: color-mix(in srgb, var(--del) 11%, transparent);
    --sel: color-mix(in srgb, var(--accent) 30%, transparent); --bar-bg: color-mix(in srgb, var(--bg) 92%, transparent);
    --tk-s: #a5d6a7; --tk-c: #5d6770; --check-a: #1c2125; --check-b: #14181b;
    --shadow-md: rgba(0,0,0,.5); --shadow-lg: rgba(0,0,0,.6); --scrim: rgba(0,0,0,.55);
    --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  /* Light theme: an explicit choice (html[data-theme], set by theme.js) wins; otherwise follow the OS.
     The two blocks below must stay identical. */
  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #f3eee3; --panel: #faf7f0; --raise: #ebe5d6; --line: #dcd4c1; --ink: #3b362d; --muted: #6e665a; --dim: #8a8272;
    --accent: #3f7d5e; --amber: #8f6420; --blue: #3f6f9f; --pink: #a94b73; --add: #3f7d5e; --del: #ae4a44;
    --tk-s: #5b7f3f; --tk-c: #9a917f; --check-a: #e4dcc9; --check-b: #f1ecdf;
    --shadow-md: rgba(70,55,30,.14); --shadow-lg: rgba(70,55,30,.2); --scrim: rgba(60,48,28,.4);
  }
  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      color-scheme: light;
      --bg: #f3eee3; --panel: #faf7f0; --raise: #ebe5d6; --line: #dcd4c1; --ink: #3b362d; --muted: #6e665a; --dim: #8a8272;
      --accent: #3f7d5e; --amber: #8f6420; --blue: #3f6f9f; --pink: #a94b73; --add: #3f7d5e; --del: #ae4a44;
      --tk-s: #5b7f3f; --tk-c: #9a917f; --check-a: #e4dcc9; --check-b: #f1ecdf;
      --shadow-md: rgba(70,55,30,.14); --shadow-lg: rgba(70,55,30,.2); --scrim: rgba(60,48,28,.4);
    }
  }
  * { box-sizing: border-box; }
  /* Anchors (#L12, heading ids, footnotes) must clear the 46px sticky .bar. */
  html { min-height: 100%; scroll-padding-top: 64px; }
  body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.5 var(--mono); display: grid; grid-template-columns: 252px 1fr; }
  a { color: inherit; text-decoration: none; }
  ::selection { background: var(--sel); }
  [data-view] { display: none; }
  [data-view].active { display: block; }

  /* ---------- sidebar ---------- */
  .side { background: var(--panel); border-right: 1px solid var(--line); height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; }
  .brand { padding: 16px 18px 12px; font: 700 18px var(--mono); letter-spacing: -.03em; }
  .brand em { color: var(--accent); font-style: normal; }
  .brand small { color: var(--dim); font-weight: 400; font-size: 11px; margin-left: 6px; }
  .search { margin: 0 12px 10px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; color: var(--muted); }
  .search input { background: none; border: 0; outline: 0; color: var(--ink); font: inherit; width: 100%; }
  .search kbd { font: 11px var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--dim); }
  .search:focus-within { border-color: var(--accent); }
  .list { flex: 1; overflow-y: auto; padding: 4px 8px; }
  .list h6 { margin: 14px 10px 4px; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
  details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; user-select: none; }
  details.fold > summary::-webkit-details-marker { display: none; }
  details.fold > summary::before { content: "›"; display: inline-block; width: 10px; text-align: center; font-weight: 700; transition: transform .12s ease; }
  details.fold[open] > summary::before { transform: rotate(90deg); }
  details.fold > summary small { margin-left: auto; font-weight: 400; opacity: .75; }
  .list details.fold > summary { margin: 10px 0 2px; padding: 4px 10px; border-radius: 5px; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--dim); }
  .list details.fold > summary:hover { background: var(--raise); color: var(--ink); }
  .list details.fold > a { margin-left: 12px; }
  .list-fold { margin: 0 0 16px; }
  .list-fold > summary { padding: 4px 2px 8px; font: 600 12px var(--mono); letter-spacing: .06em; color: var(--muted); }
  .list-fold > summary:hover, .list-fold > summary:focus-visible { color: var(--ink); }
  .repo-box { margin-bottom: 16px; }
  .list-fold > .repo-box { margin-bottom: 0; }
  table.g.rl { table-layout: fixed; }
  table.g.rl td { overflow: hidden; text-overflow: ellipsis; }
  table.g.rl .c-nm { width: 26%; } table.g.rl .c-by { width: 30%; } table.g.rl .c-age { width: 84px; }
  @media (max-width: 800px) { /* phones: drop the description column and give the name room */
    table.g.rl .c-w, table.g.rl td.w { display: none; }
    table.g.rl .c-nm { width: 46%; } table.g.rl .c-by { width: auto; }
  }
  .list a { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 5px; color: var(--muted); white-space: nowrap; }
  .list a:hover { background: var(--raise); color: var(--ink); }
  .list a.cur { background: var(--raise); color: var(--accent); }
  .list a .lk { margin-left: auto; display: inline-flex; }
  .ico { width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
  .vis { display: inline-flex; vertical-align: middle; }
  .vis svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .list .vis svg { width: 12px; height: 12px; }
  .vis-public { color: var(--accent); } .vis-internal { color: var(--muted); } .vis-private { color: var(--amber); }
  table.g.rl .c-vis { width: 38px; } table.g.rl td.vis-c { padding-right: 0; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .visf { background: none; border: 0; border-bottom: 1px dotted var(--dim); padding: 0 1px; margin: 0; font: inherit; color: var(--muted); cursor: pointer; }
  .visf .vis svg { width: 12px; height: 12px; margin-top: -2px; }
  .visf:hover, .visf:focus-visible { color: var(--ink); border-bottom-color: var(--ink); }
  .visf[aria-pressed="true"] { color: var(--accent); border-bottom: 1px solid var(--accent); }
  .list a::before { content: "▸"; color: var(--dim); font-size: 10px; }
  .list a.cur::before { content: "▾"; color: var(--accent); }
  .me { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; color: var(--muted); }
  .me b { color: var(--ink); font-weight: 500; display: block; line-height: 1.2; }
  .me small { font-size: 11px; color: var(--dim); }
  .side-link { display: block; margin: 0 8px 6px; padding: 5px 10px; border-radius: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; }
  .side-link:hover, .side-link:focus-visible { background: var(--raise); color: var(--accent); }
  .tabs a.pill { margin: 0; padding: 2px 8px; border: 1px solid var(--line); color: var(--ink); }
  .tabs a.pill:hover, .tabs a.pill:focus-visible { color: var(--accent); border-color: var(--accent); }
  .av { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: linear-gradient(135deg, #5ef2b0, #3b82f6); color: #06130d; font-weight: 700; font-size: 12px; flex: none; }

  /* ---------- main ---------- */
  .main { min-width: 0; }
  .bar { height: 46px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; background: var(--bar-bg); backdrop-filter: blur(6px); z-index: 4; }
  .crumbs { color: var(--muted); display: flex; gap: 8px; }
  .crumbs a:hover { color: var(--accent); }
  .crumbs b { color: var(--ink); font-weight: 500; }
  .crumbs i { color: var(--dim); font-style: normal; }
  .grow { flex: 1; }
  .keys { color: var(--dim); font-size: 11px; display: flex; gap: 14px; }
  .keys kbd { color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font: inherit; margin-right: 4px; }
  .page { padding: 24px 28px 80px; max-width: 1200px; margin: 0 auto; }
  h1.t { font: 600 22px/1.2 var(--mono); margin: 0 0 4px; letter-spacing: -.02em; }
  .sub { color: var(--muted); margin: 0 0 20px; }
  .pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; background: var(--panel); color: var(--ink); font-size: 12px; }
  .pill.g { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
  .pill.a { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
  .tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 20px 0 18px; }
  .tabs a { padding: 7px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
  .tabs a:hover { color: var(--ink); }
  .tabs a[aria-current] { color: var(--accent); border-color: var(--accent); }
  .themebtn { display: inline-grid; place-items: center; width: 32px; height: 28px; background: none; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: inherit; font-size: 19px; line-height: 1; padding: 0; cursor: pointer; }
  .themebtn:hover, .themebtn:focus-visible { color: var(--accent); border-color: var(--accent); }
  .themebtn[hidden] { display: none; }
  .tabs .n { color: var(--dim); margin-left: 4px; }
  .tabnav { display: flex; gap: 2px; }
  .box { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
  .box > header { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--raise); }
  .box > header b { color: var(--ink); font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
  .box > header .dim { white-space: nowrap; }
  @media (max-width: 800px) {
    .box > header { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
    .box > header .grow { flex-basis: 100%; height: 0; }
    .box > header .btn { padding: 4px 11px; }
  }

  /* ---------- tables ---------- */
  table.g { width: 100%; border-collapse: collapse; }
  table.g th { text-align: left; font: 600 10px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); padding: 8px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
  table.g th.s { color: var(--accent); }
  table.g td { padding: 7px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  table.g tr:last-child td { border-bottom: 0; }
  table.g tbody tr:hover td { background: var(--raise); }
  table.g td.w { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
  table.g td.nm a { color: var(--blue); } table.g td.nm a:hover { text-decoration: underline; }
  table.g td.age, table.g td.sz { color: var(--dim); text-align: right; }
  @media (max-width: 800px) { /* phones: a commit row is hash, author, age, then the message (cut at a roomy width); the box scrolls sideways for the rest, and a tap opens the commit */
    .log-box { overflow-x: auto; }
    table.g.log { display: block; width: max-content; min-width: 100%; }
    table.g.log tbody { display: block; }
    table.g.log tr { display: grid; grid-template-columns: auto auto minmax(0, 7em) auto 44em; column-gap: 10px; align-items: baseline; padding: 0 14px 0 0; border-bottom: 1px solid var(--line); }
    table.g.log td { padding: 7px 0; border: 0; background: none; grid-row: 1; }
    table.g.log td.gr { grid-column: 1; align-self: stretch; }
    table.g.log td.hash { grid-column: 2; }
    table.g.log td.by { grid-column: 3; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
    table.g.log td.age { grid-column: 4; }
    table.g.log td.w { grid-column: 5; width: auto; max-width: none; }
    table.g.log tr.more { display: block; padding: 0; }
    table.g.log tr.more td { display: block; padding: 7px 14px; }
    table.g.log tr.more td.gr { display: none; }
    table.g.log tbody tr:hover { background: var(--raise); }
  }
  .dir { color: var(--blue); } .hash { color: var(--amber); }
  .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

  /* ---------- repo layout ---------- */
  .repo-cols { display: grid; grid-template-columns: minmax(0,1fr) 200px; gap: 28px; align-items: start; margin-top: 22px; }
  @media (max-width: 1100px) { .repo-cols { grid-template-columns: minmax(0,1fr); } .toc { display: none; } }
  .toc { position: sticky; top: 70px; font-size: 12px; }
  .toc h6 { margin: 0 0 8px; font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
  .toc a { display: block; color: var(--muted); padding: 2px 0 2px 10px; border-left: 1px solid var(--line); }
  .toc a:hover, .toc a.on { color: var(--accent); border-color: var(--accent); }
  .toc a.l2 { padding-left: 22px; }
  .stats { display: flex; gap: 22px; color: var(--muted); }
  .stats b { color: var(--ink); font-weight: 600; }

  /* ---------- log ---------- */
  .gr { width: 36px; min-width: 36px; position: relative; padding: 0 !important; }
  .gr::before { content: ""; position: absolute; left: 17px; top: 0; bottom: 0; width: 2px; background: var(--line); }
  .gr::after { content: ""; position: absolute; left: 13px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--bg); border: 2px solid var(--accent); border-radius: 50%; }
  tr:first-child .gr::before { top: 50%; } tr:last-child .gr::before { bottom: 50%; }
  .by { color: var(--muted); }

  /* ---------- commit ---------- */
  .cm-msg { font: 600 20px/1.3 var(--sans); margin: 0 0 10px; }
  .cm-body { color: var(--muted); font-family: var(--sans); font-size: 14px; margin: 0 0 16px; }
  /* A commit message is Markdown rendered small: body-sized text, level-by-level headings no bigger than the text around them. */
  .cm-body.cm-md { padding: 0; font: 14px/1.6 var(--sans); }
  .cm-body.cm-md > :last-child { margin-bottom: 0; }
  .cm-body.cm-md h1, .cm-body.cm-md h2, .cm-body.cm-md h3, .cm-body.cm-md h4, .cm-body.cm-md h5, .cm-body.cm-md h6 { font: 600 14px/1.4 var(--sans); letter-spacing: 0; color: var(--ink); margin: 14px 0 6px; }
  .cm-body.cm-md h2::before, .cm-body.cm-md h3::before { content: none; }
  .cm-body.cm-md p, .cm-body.cm-md ul, .cm-body.cm-md ol, .cm-body.cm-md pre, .cm-body.cm-md blockquote { margin: 0 0 10px; }
  .cm-squash { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
  .cm-sq-h { padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--raise); border-radius: 8px 8px 0 0; font: 600 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
  .cm-sq-h .dim { text-transform: none; letter-spacing: 0; font-weight: 400; }
  .cm-sq { list-style: none; margin: 0; padding: 0; counter-reset: sq; }
  .cm-sq > li { counter-increment: sq; padding: 8px 14px 8px 38px; border-bottom: 1px solid var(--line); position: relative; font-size: 14px; }
  .cm-sq > li:last-child { border-bottom: 0; }
  .cm-sq > li::before { content: counter(sq); position: absolute; left: 12px; top: 9px; font: 11px var(--mono); color: var(--dim); }
  .cm-sq-l { overflow-wrap: anywhere; }
  .cm-sq-s { color: var(--ink); }
  .cm-sq-l .hash { font: 11px var(--mono); }
  .cm-sq-l .dim { font-size: 12px; }
  .cm-sq-b { margin: 4px 0 0; }
  .kv { display: flex; gap: 6px 24px; flex-wrap: wrap; color: var(--muted); margin-bottom: 18px; }
  .kv b { color: var(--ink); font-weight: 500; }
  .fsum td { padding: 5px 14px; }
  .a { color: var(--add); } .d { color: var(--del); }
  .meter { display: inline-flex; width: 80px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line); vertical-align: middle; }
  .meter i { display: block; } .meter .a { background: var(--add); } .meter .d { background: var(--del); }

  /* ---------- code ---------- */
  .code { font: 12.5px/1.65 var(--mono); overflow-x: auto; background: var(--bg); }
  .cl, .dl { display: flex; white-space: pre; }
  .cl:hover { background: var(--panel); }
  .cl .n, .dl .o, .dl .n { flex: none; width: 52px; text-align: right; padding-right: 14px; color: var(--dim); user-select: none; }
  .cl:hover .n { color: var(--accent); }
  .dl .m { flex: none; width: 20px; color: var(--dim); }
  .dl.add { background: var(--add-bg); } .dl.del { background: var(--del-bg); }
  .dl.add .m { color: var(--add); } .dl.del .m { color: var(--del); }
  .dl.hunk { background: color-mix(in srgb, var(--blue) 9%, transparent); color: var(--blue); }
  .tk-k { color: var(--pink); } .tk-s { color: var(--tk-s); } .tk-c { color: var(--tk-c); font-style: italic; } .tk-f { color: var(--blue); }

  /* ---------- markdown ---------- */
  .md { font: 15px/1.7 var(--sans); padding: 8px 36px 36px; }
  .md h1, .md h2, .md h3 { font-family: var(--mono); letter-spacing: -.02em; line-height: 1.25; }
  .md h1 { font-size: 28px; margin: 24px 0 12px; }
  .md h2 { font-size: 20px; margin: 36px 0 10px; color: var(--accent); }
  .md h2::before { content: "## "; color: var(--dim); }
  .md h3 { font-size: 16px; margin: 26px 0 6px; }
  .md h3::before { content: "### "; color: var(--dim); }
  .md p, .md ul, .md ol, .md table, .md pre, .md blockquote { margin: 0 0 16px; }
  .md a { color: var(--blue); border-bottom: 1px dashed color-mix(in srgb, var(--blue) 50%, transparent); }
  .md a:hover { border-bottom-style: solid; }
  .md code { font: .87em var(--mono); background: var(--raise); border: 1px solid var(--line); padding: .1em .38em; border-radius: 4px; color: var(--amber); }
  .md pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; }
  .md pre::before { content: attr(data-lang); display: block; padding: 4px 14px; background: var(--raise); border-bottom: 1px solid var(--line); font: 11px var(--mono); color: var(--dim); }
  .md pre code { display: block; background: none; border: 0; color: var(--ink); padding: 12px 16px; overflow-x: auto; white-space: pre; font-size: 12.5px; line-height: 1.65; }
  .md blockquote { border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); border-left: 3px solid var(--blue); background: color-mix(in srgb, var(--blue) 6%, transparent); padding: 8px 16px; border-radius: 6px; }
  .md blockquote p { margin: 0; } .md blockquote strong { color: var(--blue); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
  .md { overflow-wrap: break-word; min-width: 0; }
  .md table { display: block; width: max-content; min-width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13.5px; border: 1px solid var(--line); }
  .md th { text-align: left; background: var(--raise); font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .md th, .md td { padding: 7px 12px; border: 1px solid var(--line); }
  .md ul.task { list-style: none; padding-left: 4px; } .md ul.task input { accent-color: var(--accent); margin-right: 8px; }
  .md hr { border: 0; border-top: 1px dashed var(--line); margin: 24px 0; }
  .md kbd { font: 11.5px var(--mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; background: var(--raise); }
  .md .badge { font: 600 11px var(--mono); vertical-align: middle; padding: 2px 8px; border-radius: 4px; background: var(--raise); border: 1px solid var(--line); color: var(--muted); }
  .md .badge.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
  .md small { color: var(--dim); }
  .fm { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); margin: 16px 0 20px; font: 13px/1.6 var(--sans); }
  .fm-h { padding: 5px 14px; background: var(--raise); border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
  .fm dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 18px; margin: 0; padding: 10px 14px; }
  .fm dt { color: var(--muted); font-family: var(--mono); }
  .fm dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
  .fm dd dl { padding: 0; }
  .fm ul { margin: 0; padding-left: 18px; }
  .fm .pill { margin: 0 4px 2px 0; }
  .fm-null { color: var(--dim); font-family: var(--mono); }
  .fm-ml { display: block; white-space: pre-wrap; }

  /* ---------- login ---------- */
  .login { max-width: 420px; margin: 8vh auto; }
  .login pre { margin: 0 0 22px; color: var(--muted); }
  .login .opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
  .login .opt:hover { border-color: var(--accent); }
  .login .opt kbd { margin-left: auto; color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
  .btn { border: 1px solid var(--line); background: var(--raise); color: var(--ink); border-radius: 6px; padding: 5px 12px; font: inherit; cursor: pointer; }
  .btn:hover { border-color: var(--accent); color: var(--accent); }

  /* ================= additions for the real app ================= */
  [hidden] { display: none !important; }
  .tk-n { color: var(--amber); }
  .side .list { overflow-y: auto; }
  .empty-side { color: var(--dim); padding: 4px 10px; margin: 0; }
  .list a .lk { margin-left: auto; }
  .me .who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
  .me .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .me form { margin: 0; }
  .linkbtn, .signin { background: none; border: 0; padding: 0; font: inherit; font-size: 11px; color: var(--accent); cursor: pointer; text-align: left; }
  .linkbtn:hover, .signin:hover { text-decoration: underline; }
  .av.anon { background: var(--raise); color: var(--muted); }
  .brand { display: block; color: var(--ink); }
  a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
  .htmx-request #main { opacity: .6; transition: opacity .15s .1s; }

  /* page furniture */
  .rh { margin-bottom: 4px; }
  .grp { color: var(--muted); font-weight: 400; }
  .r { text-align: right; }
  .dim { color: var(--dim); }
  .mb { margin-bottom: 20px; }
  .sect { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin: 24px 0 8px; }
  .notice { border: 1px dashed var(--line); border-radius: 8px; padding: 18px 20px; color: var(--muted); background: var(--panel); }
  .notice a { color: var(--accent); }
  .notice.lazy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .notice.lazy .btn { color: var(--ink); }
  .notice.lazy .htmx-request { opacity: .6; }
  .path { color: var(--muted); margin: 0 0 12px; }
  .path i { color: var(--dim); font-style: normal; margin: 0 6px; }
  .path a { color: var(--blue); } .path a:hover { text-decoration: underline; } .path b { color: var(--ink); font-weight: 500; }
  .stats { margin-bottom: 14px; flex-wrap: wrap; }
  .stats a.hash:hover { text-decoration: underline; }
  .tabs { align-items: center; }
  .tabs a[aria-current] { color: var(--accent); border-color: var(--accent); }
  .btn { display: inline-block; text-decoration: none; }

  /* ref picker */
  .refpicker { position: relative; }
  .refpicker summary { cursor: pointer; list-style: none; user-select: none; }
  .refpicker summary::-webkit-details-marker { display: none; }
  .refpicker .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; min-width: 220px; max-height: 320px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px; box-shadow: 0 12px 32px var(--shadow-md); }
  .refpicker .menu a { display: block; padding: 4px 10px; border-radius: 5px; color: var(--muted); white-space: nowrap; }
  .refpicker .menu a:hover { background: var(--raise); color: var(--accent); }
  .refpicker.clone .menu { min-width: 380px; padding: 10px; }
  .refpicker.clone label { display: block; color: var(--dim); font-size: 11px; margin: 0 0 6px; }
  .refpicker.dlmenu .menu { min-width: 200px; }
  .refpicker.dlmenu label { display: block; color: var(--dim); font-size: 11px; padding: 6px 10px 2px; }
  .feedmenu .rss { width: 12px; height: 12px; vertical-align: -1px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .feedmenu .rss path { fill: none; }
  .clone .cp { display: flex; gap: 6px; }
  .clone .cp input { flex: 1; min-width: 0; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; font: inherit; }
  .clone .cp button { cursor: pointer; font: inherit; }

  /* tables */
  table.g td.sz { color: var(--dim); text-align: right; width: 1%; }
  table.g td.nm { white-space: nowrap; }
  table.g.tree td.w { color: var(--muted); }
  table.g .lc a { color: var(--muted); } table.g .lc a:hover { color: var(--accent); }
  table.g .lc .age { color: var(--dim); margin-left: 10px; }
  table.g .subj { color: var(--ink); } table.g .subj:hover { color: var(--accent); }
  table.g td.hash a:hover { text-decoration: underline; }
  table.g tr.more td { text-align: left; }
  @media (max-width: 800px) { /* phones: a file row is its name and how long ago it last changed; the message and size are for wider screens */
    table.g.tree, table.g.tree tbody { display: block; }
    table.g.tree tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; padding: 8px 12px; border-bottom: 1px solid var(--line); }
    table.g.tree tr:last-child { border-bottom: 0; }
    table.g.tree td { padding: 0; border: 0; background: none; }
    table.g.tree td.nm { overflow: hidden; text-overflow: ellipsis; }
    table.g.tree td.w { width: auto; max-width: none; white-space: nowrap; }
    table.g.tree td.w .lc a { display: none; }
    table.g.tree td.w .lc .age { margin-left: 0; font-size: 12px; }
    table.g.tree td.sz { display: none; }
    table.g.tree tbody tr:hover { background: var(--raise); }
  }
  table.g td.a { color: var(--add); } table.g td.d { color: var(--del); }
  .sq { display: inline-flex; gap: 2px; vertical-align: middle; }
  .sq i { width: 8px; height: 8px; background: var(--line); border-radius: 1px; } .sq i.a { background: var(--add); } .sq i.d { background: var(--del); }
  .box.file { margin-bottom: 16px; }
  .box.file > summary { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--raise); cursor: pointer; list-style: none; }
  .box.file > summary::-webkit-details-marker { display: none; }
  .box.file > summary::before { content: "▸"; color: var(--dim); }
  .box.file[open] > summary::before { content: "▾"; }
  .box.file[open] > summary { border-bottom: 1px solid var(--line); }

  /* code view */
  .code.pad { padding: 10px 0; }
  .cl { min-height: 1.65em; }
  .cl .t:empty::before, .dl .t:empty::before { content: " "; }
  .cl .n { text-decoration: none; }
  .cl:target { background: color-mix(in srgb, var(--amber) 12%, transparent); }
  .cl .t { padding-right: 16px; }
  .dl .t { padding-right: 16px; }
  .dl .m { text-align: center; }
  /* blame: a gutter of origin per line, set on the first line of each run */
  .blame .bi { flex: none; display: flex; gap: 10px; width: 430px; padding: 0 10px; overflow: hidden; white-space: nowrap; border-right: 1px solid var(--line); color: var(--muted); }
  .blame .cl.first:not(:first-child) { border-top: 1px solid var(--line); }
  .blame .bi .hash { flex: none; }
  .blame .bi .au { flex: none; width: 118px; overflow: hidden; text-overflow: ellipsis; color: var(--text, inherit); }
  .blame .bi .dim2, .blame .bi .msg { color: var(--dim); }
  .blame .bi .au.dim2 { flex: 1; width: auto; min-width: 0; }
  .blame .bi .sj.dim2 { flex: none; }
  .blame .bi .msg { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .blame .bi .sj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .blame .bi .age, .blame .bi .prev { flex: none; color: var(--dim); }
  .blame .bi .prev { text-decoration: none; }
  .blame .bi .prev:hover { color: var(--accent); }
  .blame .bi .old { font-style: italic; color: var(--dim); }
  .blame .cl .n { width: 46px; }
  @media (max-width: 700px) { .blame .bi { width: 150px; } .blame .bi .sj, .blame .bi .hash, .blame .bi .age { display: none; } }

  /* ---------- stats ---------- */
  .stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
  .stat { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .stat b { font: 600 20px/1.2 var(--mono); color: var(--ink); letter-spacing: -.02em; }
  .stat span { color: var(--muted); font-size: 12px; }
  .st-box { margin: 0 0 18px; }
  .st-box > header .dim { font-size: 12px; white-space: normal; }
  .st-body { padding: 14px; }
  .st-chart { display: block; width: 100%; height: auto; }
  .st-axis { stroke: var(--line); stroke-width: 1; }
  .st-hit { fill: transparent; }
  .st-period:hover .st-hit { fill: var(--raise); }
  .st-authors tr { transition: opacity .1s; }
  .st-authors.st-marking tr[data-slot]:not(.st-on) { opacity: .35; }
  .st-authors .per { width: 5.5em; color: var(--ink); white-space: nowrap; }
  .st-authors tr.st-on td { background: var(--raise); }
  .st-ranges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
  .st-ranges a { border: 1px solid var(--line); border-radius: 5px; padding: 3px 10px; background: var(--panel); color: var(--muted); font-size: 12px; }
  .st-ranges a:hover { color: var(--ink); border-color: var(--dim); }
  .st-ranges a[aria-current] { color: var(--accent); border-color: var(--accent); }
  .st-authors tr[data-slot] { cursor: pointer; }
  .st-authors tr[data-slot]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .st-authors tr.st-pick td { background: var(--raise); }
  .st-authors tr.st-pick .who { font-weight: 600; }
  .st-chart.picking rect[class^="lc"]:not(.picked) { opacity: .22; }
  .glance-slot { margin: 18px 0; font-size: 12px; }
  .glance-wrap { margin: 18px 0; }
  .glance { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; padding: 12px 16px; }
  .gl-lang { flex: 1 1 220px; min-width: 180px; }
  .gl-rel { flex: 0 1 auto; display: flex; flex-direction: column; gap: 2px; font-size: 12px; min-width: 0; }
  .gl-tag { font: 600 15px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
  .gl-tag:hover { color: var(--accent); }
  .gl-lang .st-langbar { height: 8px; }
  .gl-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; }
  .gl-legend .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
  .gl-act { flex: 1 1 400px; min-width: 0; display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
  .gl-act > div:not(.gl-spark) { flex: none; }
  .gl-act b { color: var(--ink); font: 600 15px var(--mono); }
  .gl-spark { flex: 1; min-width: 110px; }
  .gl-spark svg { display: block; width: 100%; height: 40px; overflow: visible; }
  .gl-base { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
  .gl-area { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: none; }
  .gl-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
  .gl-dot { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0; }
  .gl-dot.last { opacity: 1; }
  .gl-dot:hover { opacity: 1; stroke: var(--blue); }
  .gl-spark-lbl { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; color: var(--dim); font-size: 10px; }
  .gl-spark-lbl span:nth-child(2) { display: none; }
  .gl-more { display: block; width: max-content; margin: 5px 2px 0 auto; font-size: 11px; color: var(--dim); white-space: nowrap; }
  .gl-more:hover { color: var(--accent); }
  .activity { margin: 0 0 18px; }
  .hm-years { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 10px 14px 0; }
  .hm-years a { border: 1px solid var(--line); border-radius: 5px; padding: 1px 8px; background: var(--panel); color: var(--muted); font-size: 11px; }
  .hm-years a:hover { color: var(--ink); border-color: var(--dim); }
  .hm-years a[aria-current] { color: var(--accent); border-color: var(--accent); }
  .hm-empty { margin: 0; padding: 28px 0; text-align: center; direction: ltr; }
  .hm-scroll { overflow-x: auto; padding: 12px 14px 4px; }
  .hm { display: block; width: 100%; min-width: 640px; height: auto; }
  .hm-lbl { fill: var(--dim); font: 9px var(--mono); }
  .hm0 { fill: var(--raise); background: var(--raise); }
  .hm1 { fill: color-mix(in srgb, var(--accent) 30%, var(--raise)); background: color-mix(in srgb, var(--accent) 30%, var(--raise)); }
  .hm2 { fill: color-mix(in srgb, var(--accent) 55%, var(--raise)); background: color-mix(in srgb, var(--accent) 55%, var(--raise)); }
  .hm3 { fill: color-mix(in srgb, var(--accent) 80%, var(--raise)); background: color-mix(in srgb, var(--accent) 80%, var(--raise)); }
  .hm4 { fill: var(--accent); background: var(--accent); }
  rect.hm0, rect.hm1, rect.hm2, rect.hm3, rect.hm4 { background: none; }
  .hm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px 10px; font-size: 11px; }
  .hm-panel { margin: 0 14px 10px; height: 13em; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 12px; }
  .hm-panel.pinned { border-color: var(--accent); }
  .hm-ph { padding: 6px 10px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 2px; flex: none; }
  .hm-h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
  .hm-pin { grid-column: 1 / -1; }
  .hm-pin:empty { display: none; }
  .coarse-only { display: none; }
  @media (pointer: coarse) { .fine-only { display: none; } .coarse-only { display: inline; } }
  .hm-date { color: var(--ink); }
  .hm-x { background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); width: 22px; height: 22px; line-height: 1; font: 14px var(--mono); padding: 0; cursor: pointer; }
  .hm-x:hover, .hm-x:focus-visible { color: var(--ink); border-color: var(--dim); }
  .hm-tip { position: fixed; z-index: 30; pointer-events: none; max-width: 280px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 6px 20px var(--shadow-md); font-size: 12px; }
  .hm-th { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .hm-tb { margin-top: 4px; }
  .hm-tb .hm-authors { padding-left: 0; }
  .hm-tb .rc { color: var(--dim); }
  .hm-pb { overflow: auto; padding: 8px 10px; columns: 220px 3; column-gap: 28px; flex: 1; }
  .hm-repos, .hm-authors { list-style: none; margin: 0; padding: 0; }
  .hm-repos > li { break-inside: avoid; margin-bottom: 8px; }
  .hm-repos .rn { color: var(--blue); font-weight: 600; }
  .hm-repos a.rn:hover { text-decoration: underline; }
  .hm-repos .rc { color: var(--dim); }
  .hm-authors { padding-left: 12px; color: var(--muted); }
  .hm-repos .hm-more { color: var(--dim); }
  .hm-legend { display: flex; align-items: center; gap: 4px; flex: none; }
  .hm-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
  .hm rect[data-day]:hover { stroke: var(--ink); stroke-width: 1.5; }
  .hm rect.pinned { stroke: var(--accent); stroke-width: 2; }
  .help { margin-left: auto; display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--dim); font: 10px var(--mono); padding: 0; cursor: help; flex: none; }
  .act-help { margin: 0; padding: 8px 14px 0; font-size: 12px; }
  .help:hover, .help:focus-visible { color: var(--ink); border-color: var(--dim); }
  @media (max-width: 800px) {
    /* Title and help share the first line; the summary wraps below. */
    .activity > header { display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 4px; }
    .activity > header .help { grid-column: 2; grid-row: 1; margin: 0; }
    .activity > header .act-sub { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
    /* The calendar keeps whole weeks at a size a finger can hit, scrolls sideways, and starts at the
       newest week (a right-to-left scroller starts at its right end; the drawing itself stays left-to-right). */
    .hm-scroll { direction: rtl; padding: 12px 10px 4px; }
    .hm-years, .hm-foot { padding-left: 10px; padding-right: 10px; }
    .hm-panel { margin: 0 6px 8px; }
    .hm { direction: ltr; min-width: 960px; }
  }
  .st-axis-lbl { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; color: var(--dim); font-size: 11px; }
  .st-scroll { overflow-x: auto; }
  .st-table td.num, .st-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
  .st-table td.bar-c { width: 38%; }
  .st-table .st-share { width: 60%; max-width: 220px; height: 6px; vertical-align: middle; background: var(--raise); border-radius: 3px; }
  .st-table td.sz { color: var(--dim); text-align: right; }
  .st-table td.nm { overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 100%; }
  .st-more { padding: 8px 14px; font-size: 12px; border-top: 1px solid var(--line); }
  .st-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .st-langbar { display: block; width: 100%; height: 12px; border-radius: 4px; overflow: hidden; }
  .st-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
  .st-table .sw, .st-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
  .st-note { margin: 10px 0 0; font-size: 12px; }
  .lc0 { fill: var(--accent); background: var(--accent); } .lc1 { fill: var(--blue); background: var(--blue); }
  .lc2 { fill: var(--amber); background: var(--amber); } .lc3 { fill: var(--pink); background: var(--pink); }
  .lc4 { fill: color-mix(in srgb, var(--accent) 55%, var(--bg)); background: color-mix(in srgb, var(--accent) 55%, var(--bg)); }
  .lc5 { fill: color-mix(in srgb, var(--blue) 55%, var(--bg)); background: color-mix(in srgb, var(--blue) 55%, var(--bg)); }
  .lc6 { fill: color-mix(in srgb, var(--amber) 55%, var(--bg)); background: color-mix(in srgb, var(--amber) 55%, var(--bg)); }
  .lc7 { fill: color-mix(in srgb, var(--pink) 55%, var(--bg)); background: color-mix(in srgb, var(--pink) 55%, var(--bg)); }
  .lc8 { fill: var(--dim); background: var(--dim); }
  @media (max-width: 900px) { .st-cols { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 700px) {
    .st-table td.bar-c, .st-table th.bar-c, .st-table .c-first { display: none; }
    .st-table td, .st-table th { padding: 7px 10px; }
    .st-axis-lbl .st-mid:not(.on) { display: none; }
    .st-authors .per { width: auto; }
  }
  .imgview { padding: 20px; text-align: center; background: var(--bg); }
  .imgview img { max-width: 100%; height: auto; border: 1px solid var(--line); background: repeating-conic-gradient(var(--check-a) 0 25%, var(--check-b) 0 50%) 0 0 / 16px 16px; }

  /* markdown specifics */
  .repo-cols .box { min-width: 0; }
  .repo-cols.inbox { margin-top: 0; padding: 0 16px 0 0; }
  .repo-cols.notoc { grid-template-columns: minmax(0,1fr); }
  .repo-cols.inbox.notoc { padding: 0; }
  .md img { max-width: 100%; height: auto; }
  .md ul.contains-task-list { list-style: none; padding-left: 4px; }
  .md li.task-list-item input { accent-color: var(--accent); margin-right: 8px; }
  .md blockquote.alert { border-left-width: 3px; }
  .md blockquote.alert .alert-title { font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 4px; }
  .md blockquote.alert-note { border-color: var(--blue); } .md blockquote.alert-note .alert-title { color: var(--blue); }
  .md blockquote.alert-tip { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); } .md blockquote.alert-tip .alert-title { color: var(--accent); }
  .md blockquote.alert-important { border-color: var(--pink); background: color-mix(in srgb, var(--pink) 6%, transparent); } .md blockquote.alert-important .alert-title { color: var(--pink); }
  .md blockquote.alert-warning { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 6%, transparent); } .md blockquote.alert-warning .alert-title { color: var(--amber); }
  .md blockquote.alert-caution { border-color: var(--del); background: var(--del-bg); } .md blockquote.alert-caution .alert-title { color: var(--del); }
  .md h4 { font-size: 14px; margin: 20px 0 6px; }
  .md pre { max-width: 100%; }
  .toc a.l1 { padding-left: 10px; } .toc a.l3 { padding-left: 34px; }
  .repo-cols { margin-top: 22px; }

  /* palette */
  dialog#palette { width: min(640px, 92vw); margin: 12vh auto auto; padding: 0; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 24px 64px var(--shadow-lg); }
  dialog#palette::backdrop { background: var(--scrim); }
  #palette-q { width: 100%; box-sizing: border-box; background: var(--bg); border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: 14px var(--mono); padding: 14px 16px; outline: 0; }
  #palette-results { max-height: 50vh; overflow-y: auto; padding: 6px; }
  #palette-results a { display: block; padding: 5px 10px; border-radius: 5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #palette-results a:hover, #palette-results a:focus { background: var(--raise); color: var(--accent); }
  #palette-results p { padding: 8px 10px; margin: 0; }

  /* error page */
  .errpage { text-align: center; padding: 10vh 0; }
  .errpage .code404 { font: 700 72px/1 var(--mono); color: var(--line); letter-spacing: -.05em; }

  .nav-toggle, .scrim, .burger { display: none; }
  @media (max-width: 800px) {
    body { grid-template-columns: 1fr; }
    .nav-toggle { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; }
    .side { position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 85vw); height: auto; z-index: 10; transform: translateX(-100%); visibility: hidden; transition: transform .18s ease, visibility 0s .18s; box-shadow: 0 0 32px var(--shadow-lg); }
    .nav-toggle:checked ~ .side { transform: none; visibility: visible; transition: transform .18s ease; }
    .nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; z-index: 9; background: var(--scrim); }
    .burger { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: -8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; flex: none; }
    .nav-toggle:focus-visible ~ .main .burger { outline: 2px solid var(--accent); outline-offset: 1px; }
    .bar { padding: 0 16px; }
    .crumbs { min-width: 0; overflow: hidden; white-space: nowrap; }
    .keys { display: none; }
    .page { padding: 16px 12px 64px; }
    .repo-cols.inbox { padding: 0; }
    .md { padding: 4px 14px 24px; }
    .tabs { flex-wrap: wrap; position: relative; row-gap: 8px; }
    .tabs .grow { display: none; }
    .tabs .refpicker { position: static; order: -1; }
    .tabs .refpicker summary { white-space: nowrap; }
    .tabs .refpicker .menu, .refpicker.clone .menu { min-width: 0; width: min(380px, 100%); }
    .refpicker .menu { right: 0; }
    .tabnav { order: 1; flex: 1 1 100%; overflow-x: auto; white-space: nowrap; scrollbar-width: none; margin-bottom: -1px; padding-bottom: 1px; }
    .tabnav::-webkit-scrollbar { display: none; }
    .tabnav a { flex: none; margin-bottom: 0; }
  }

  /* ---- sign-in interstitial (standalone page, see templates/signin.html) ----
     A feature branch forks off main, gets two commits, and merges back (~1.6 s). */
  .signin-page { grid-template-columns: 1fr; min-height: 100vh; place-items: center; }
  .signin-card { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 24px; animation: signin-in .4s ease-out both; }
  .signin-brand { font-size: 20px; font-weight: 600; letter-spacing: .02em; }
  .signin-brand em { color: var(--accent); font-style: normal; animation: signin-blink 1s steps(1) infinite; }
  .gitgraph { width: min(360px, 86vw); height: auto; overflow: visible; }
  .gg-line { fill: none; stroke-width: 2.5; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: gg-draw .4s ease-in-out forwards; }
  .gg-main { stroke: var(--accent); }
  .gg-branch { stroke: var(--blue); }
  .gg-m1 { animation-delay: .05s; animation-duration: .3s; }
  .gg-m2 { animation-delay: .35s; animation-duration: .8s; }
  .gg-m3 { animation-delay: 1.15s; animation-duration: .35s; }
  .gg-b1 { animation-delay: .35s; animation-duration: .75s; }
  .gg-dot { fill: var(--bg); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; transform: scale(0); animation: gg-pop .3s cubic-bezier(.3, 1.6, .5, 1) forwards; }
  .gg-dot.main { stroke: var(--accent); }
  .gg-dot.feat { stroke: var(--blue); }
  .gg-dot.merge { stroke: var(--amber); fill: var(--amber); }
  .gg-dot.head { stroke: var(--accent); fill: var(--accent); }
  .gg-d1 { animation-delay: 0s; }
  .gg-d2 { animation-delay: .3s; }
  .gg-d3 { animation-delay: .65s; }
  .gg-d4 { animation-delay: .9s; }
  .gg-d5 { animation-delay: 1.1s; }
  .gg-d6 { animation-delay: 1.5s; }
  .gg-ring { fill: none; stroke: var(--amber); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: gg-ring .5s ease-out 1.1s forwards; }
  .signin-msg { margin: 0; color: var(--muted); font-size: 14px; white-space: nowrap; }
  .signin-dots b { font-weight: 400; animation: signin-dot 1.2s infinite both; }
  .signin-dots b:nth-child(2) { animation-delay: .2s; }
  .signin-dots b:nth-child(3) { animation-delay: .4s; }
  .signin-link { color: var(--dim); font-size: 12px; text-decoration: none; border-bottom: 1px dotted var(--dim); }
  .signin-link:hover, .signin-link:focus-visible { color: var(--accent); border-color: var(--accent); }
  @keyframes signin-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes signin-blink { 50% { opacity: 0; } }
  @keyframes signin-dot { 0%, 80%, 100% { opacity: .15; } 40% { opacity: 1; } }
  @keyframes gg-draw { to { stroke-dashoffset: 0; } }
  @keyframes gg-pop { to { transform: scale(1); } }
  @keyframes gg-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
  @media (prefers-reduced-motion: reduce) {
    .signin-card, .signin-brand em, .signin-dots b, .gg-line, .gg-dot, .gg-ring { animation: none; }
    .gg-line { stroke-dashoffset: 0; }
    .gg-dot { transform: none; }
  }
