/* Shared shell for the Line Manager site pages.
   Load this LAST in <head> so it wins over any page-local styles.

   Two body classes:
     .page        - the app-styled pages (light/dark aware)
     .force-light - the Termly privacy policy, whose generated CSS hardcodes
                    black text with !important, so it must stay on a light
                    background or it becomes unreadable. */

:root {
  --bg: #fff;
  --fg: #16202e;
  --muted: #5b6b82;
  --rule: #dfe5ee;
  --rule-soft: #eef1f6;
  --link: #2f6bd8;
  --note-bg: #f7f9fd;
  --code-bg: #f1f4f9;
  /* Room reserved at the bottom of every page for the fixed footer. */
  --footer-space: 7rem;
}

@media (prefers-color-scheme: dark) {
  body:not(.force-light) {
    --bg: #0a1628;
    --fg: #e8eef7;
    --muted: #9fb0c8;
    --rule: #1e2c44;
    --rule-soft: #1e2c44;
    --note-bg: #10203a;
    --code-bg: #16233a;
  }
}

@media (min-width: 40rem) {
  :root { --footer-space: 5rem; }
}

* { box-sizing: border-box; }

/* Every page reserves space so the fixed footer never covers content. */
body { padding-bottom: var(--footer-space); }

body.page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  margin: 0;
  color: var(--fg);
  background: var(--bg);
}

/* Use padding-block-end, never a padding shorthand: a shorthand here would
   reset the bottom padding that reserves room for the fixed footer. */
body.page.doc {
  max-width: 44rem; margin: 0 auto;
  padding: 2rem 1.25rem;
  padding-block-end: var(--footer-space);
}
body.page .wrap { max-width: 46rem; margin: 0 auto; padding: 3rem 1.25rem 1rem; }
body.page header { text-align: center; margin-bottom: 2.5rem; }
body.page h1 { font-size: 2rem; margin: 0 0 .4rem; letter-spacing: -.02em; }
body.page h2 { font-size: 1.15rem; margin: 2.2rem 0 .6rem; }
body.page h3 { font-size: 1rem; margin: 1.6rem 0 .3rem; }
body.page h3 + p { margin-top: 0; color: var(--muted); }
body.page .tag, body.page .sub { color: var(--muted); margin: 0; font-size: 1.05rem; }
body.page a { color: var(--link); }

body.page .note {
  border-left: 3px solid var(--link);
  padding: .7rem 0 .7rem 1rem;
  margin: 2rem 0;
  background: var(--note-bg);
}

body.page ul.features { list-style: none; padding: 0; margin: 0; }
body.page ul.features li { padding: .55rem 0; border-bottom: 1px solid var(--rule-soft); }
body.page ul.features b { display: block; font-weight: 600; }
body.page ul.features span { color: var(--muted); font-size: .94rem; }

body.page table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
body.page th, body.page td {
  text-align: left; padding: .5rem .6rem;
  border-bottom: 1px solid var(--rule); vertical-align: top;
}
body.page th { font-weight: 600; }
body.page code { background: var(--code-bg); padding: .1rem .3rem; border-radius: 3px; font-size: .92em; }

/* Fixed footer, pinned to the viewport on every page. */
footer.site {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
  text-align: center;
  padding: .55rem 1rem calc(.55rem + env(safe-area-inset-bottom, 0px));
}
footer.site p { margin: .1rem 0; }
footer.site a { color: var(--link); }
