/* Zuckerman Law wiki — static shell.
   Deliberately restrained: this is a legal reference corpus, so the design
   goal is long-form readability, not personality. Colours are neutral and
   pending alignment with the firm's brand. */

:root {
  --ink: #16202b;
  --ink-soft: #4a5866;
  --line: #dde3ea;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --accent: #0b4f8a;
  --accent-soft: #e8f0f8;
  --warn: #8a6d0b;
  --measure: 68ch;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e6ecf2;
    --ink-soft: #9fb0c0;
    --line: #2a3644;
    --bg: #10171f;
    --bg-soft: #16202b;
    --accent: #7fb3e0;
    --accent-soft: #1b2b3a;
    --warn: #d9b64a;
  }
}
:root[data-theme="dark"] {
  --ink: #e6ecf2; --ink-soft: #9fb0c0; --line: #2a3644;
  --bg: #10171f; --bg-soft: #16202b; --accent: #7fb3e0;
  --accent-soft: #1b2b3a; --warn: #d9b64a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); color: #fff; padding: 10px 14px; z-index: 20; border-radius: var(--radius); }

/* masthead ---------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg-soft); position: sticky; top: 0; z-index: 10; }
.masthead .wrap { display: flex; align-items: center; gap: 16px; min-height: 62px; flex-wrap: wrap; }
.brand { font-weight: 650; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; margin-right: auto; }
.brand:hover { color: var(--accent); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--radius); padding: 7px 12px; font-size: 14px; cursor: pointer;
}

.search { position: relative; }
.search input {
  width: 260px; max-width: 45vw; padding: 8px 12px; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.results {
  position: absolute; right: 0; top: calc(100% + 6px); width: min(460px, 88vw);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.14); max-height: 66vh; overflow-y: auto; padding: 6px;
}
.results a { display: block; padding: 9px 11px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.results a:hover, .results a:focus { background: var(--accent-soft); }
.results .r-title { font-weight: 600; display: block; }
.results .r-snip { color: var(--ink-soft); font-size: 14px; display: block; margin-top: 2px; }
.results .empty { padding: 12px; color: var(--ink-soft); font-size: 14px; }
.results mark { background: transparent; color: var(--accent); font-weight: 700; }

/* layout ------------------------------------------------------------ */
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 44px; align-items: start; padding-top: 34px; padding-bottom: 60px; }

.sidebar { position: sticky; top: 90px; }
.sidebar h2 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li a {
  display: block; padding: 7px 10px; margin-left: -10px; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35;
}
.sidebar li a:hover { background: var(--bg-soft); color: var(--accent); }

/* article ----------------------------------------------------------- */
main { min-width: 0; }
article { max-width: var(--measure); }
article h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 22px; }
article h2 { font-size: 25px; line-height: 1.25; margin: 44px 0 14px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
article h3 { font-size: 20px; margin: 32px 0 10px; }
article h2 b, article h3 b, article h2 strong, article h3 strong { font-weight: inherit; }
article p { margin: 0 0 18px; }
article ul, article ol { margin: 0 0 18px; padding-left: 22px; }
article li { margin-bottom: 7px; }
article a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
article img { max-width: 100%; height: auto; }

/* Links to topics that were referenced but never written on the source wiki.
   Rendered as text so the site ships no dead links. */
.missing-page { border-bottom: 1px dotted var(--warn); color: inherit; cursor: help; }

/* Wide content must scroll inside its own box, never the page. */
article table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
article th, article td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
article th { background: var(--bg-soft); font-weight: 620; }
article pre { overflow-x: auto; background: var(--bg-soft); padding: 14px; border-radius: var(--radius); }

.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 30px; }
.toc h2 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); border: 0; margin: 0 0 9px; padding: 0; }
/* These articles carry 20+ headings, so a single-column list would push the
   article itself below the fold. Columns keep the whole outline visible. */
.toc ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.toc li { margin: 0 0 5px; break-inside: avoid; font-size: 15px; }
.toc li.lvl3 { padding-left: 16px; font-size: 14px; }
@media (max-width: 700px) { .toc ul { columns: 1; } }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

.page-footer { max-width: var(--measure); margin-top: 46px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; }
.sitefoot { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 22px 0; color: var(--ink-soft); font-size: 14px; }
.sitefoot p { margin: 0; }

/* responsive -------------------------------------------------------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 24px; }
  .menu-toggle { display: block; order: 2; }
  .search { order: 3; flex: 1 1 100%; }
  .search input { width: 100%; max-width: none; }
  .sidebar { position: static; display: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
  .sidebar.open { display: block; }
  body { font-size: 16px; }
}

/* breadcrumbs -------------------------------------------------------- */
.crumbs { margin: 0 0 18px; font-size: 14px; color: var(--ink-soft); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* preview-only banner ------------------------------------------------- */
.preview-banner {
  margin: 0; padding: 9px 20px; text-align: center; font-size: 14px;
  background: var(--accent-soft); color: var(--ink);
  border-bottom: 1px solid var(--line);
}
