/* Layout for the technical overview. Overrides the page's inline styles. */
body .container { display:grid; grid-template-columns:270px minmax(0,1fr); gap:2rem; align-items:start; max-width:1320px; padding:1.5rem 1.25rem 4rem; }
body main { min-width:0; }
body main section { scroll-margin-top:80px; }
body main [id] { scroll-margin-top:80px; }
.ov-bar { display:none; }
.ov-side { position:sticky; top:80px; display:flex; flex-direction:column; max-height:calc(100vh - 96px); background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:.85rem; font-size:.87rem; }
.ov-side-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:.6rem; }
.ov-close { display:none; }
.ov-filter { width:100%; flex:none; padding:.6rem .75rem; margin-bottom:.5rem; border:1px solid var(--line); border-radius:8px; background:var(--surface-alt); color:var(--ink); font:inherit; font-size:16px; }
.ov-side nav { overflow-y:auto; overscroll-behavior:contain; min-height:0; }
.ov-side summary { cursor:pointer; padding:.55rem .3rem; font-weight:700; border-top:1px solid var(--line); }
.ov-side ul { list-style:none; margin:0 0 .5rem; padding:0; }
.ov-side li { margin:0; }
.ov-side li a { display:block; padding:.38rem .6rem; border-left:2px solid var(--line); color:var(--muted); line-height:1.35; text-decoration:none; }
.ov-side li a:hover { color:var(--ink); background:var(--signal-soft); text-decoration:none; }
.ov-side li a.is-active { color:var(--ink); border-left-color:var(--signal); background:var(--signal-soft); font-weight:600; }
.ov-start { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.6rem; margin:1.25rem 0; }
.ov-start a { display:block; padding:.8rem .9rem; border:1px solid var(--line); border-radius:10px; background:var(--surface-alt); color:var(--ink); text-decoration:none; }
.ov-start a:hover { border-color:var(--signal); text-decoration:none; }
.ov-start span { display:block; color:var(--muted); font-size:.82rem; }
main p a, main li a, main td a { color:inherit; font-weight:600; text-decoration:underline; text-decoration-color:color-mix(in srgb,var(--signal) 55%,transparent); text-decoration-thickness:2px; text-underline-offset:.2em; }
main p a:hover, main li a:hover, main td a:hover { background:var(--signal-soft); text-decoration-color:currentColor; }
.grid-2, .grid-3, .spec-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); }
main .grid-2 > *, main .grid-3 > *, main .spec-grid > * { min-width:0; }
.ov-scroll { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; margin:1rem 0; }
.ov-scroll > table { margin:0; }
main :not(pre) > code { overflow-wrap:anywhere; }
main pre { max-width:100%; }
.code-head { gap:.5rem; }

@media (max-width:1000px) {
  body .container { display:block; padding:.75rem .75rem 3rem; }
  .ov-bar { position:sticky; top:var(--nx-h); z-index:60; display:flex; align-items:center; gap:.75rem; padding:.5rem .75rem; background:var(--surface); border-bottom:1px solid var(--line); font-size:.85rem; }
  .ov-open, .ov-close { display:inline-block; flex:none; min-height:40px; padding:.4rem .8rem; border:1px solid var(--line); border-radius:8px; background:var(--surface-alt); color:var(--ink); font:600 .88rem var(--nx-font); cursor:pointer; }
  .ov-where { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--muted); }
  body main section, body main [id] { scroll-margin-top:128px; }
  html { scroll-padding-top:0; }
  .ov-side { position:fixed; z-index:130; top:0; bottom:0; left:0; width:min(340px,88vw); max-height:none; border-radius:0; transform:translateX(-105%); visibility:hidden; transition:transform .2s,visibility .2s; }
  .ov-side.is-open { transform:none; visibility:visible; }
  .ov-side li a { padding:.6rem .7rem; }
  .ov-scrim { position:fixed; inset:0; z-index:120; background:rgba(0,0,0,.55); }
  .ov-scrim[hidden] { display:none; }
  .ov-start { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  body main section { padding:1.1rem .9rem; margin-bottom:.9rem; }
  main h1 { font-size:1.65rem; }
  main h2 { font-size:1.22rem; }
  .lead { font-size:1.02rem; }
  main pre { font-size:.74rem; padding:.75rem; }
  main th, main td { padding:.5rem; min-width:7rem; }
  .repo-tree details { padding-left:.45rem; }
}

/* Repository class explorer: let long names wrap */
.repo-tree, .repo-tree details, .class-list, .class-item, .class-head { min-width:0; max-width:100%; }
.class-list { grid-template-columns:minmax(0,1fr); }
.repo-tree summary > *, .class-head > *, .class-xml { min-width:0; overflow-wrap:anywhere; }
