/* Styling for the legal and error pages. The tokens mirror the ones in
   index.html, which keeps its CSS inline so the home page renders with
   no extra request. Change a colour in one and change it in the other.
   Dark only: there is no light variant anywhere in Notespice. */
:root {
  color-scheme: dark;
  --bg: #19212B;
  --bg-canvas: #10141C;
  --bg-sidebar: #1E2733;
  --surface-high: #273240;
  --code-bg: #222B36;
  --border: #3B4757;
  --text: #E7EBF2;
  --text-muted: #9AA4B5;
  --accent: #FFC107;
  --link: #FFC107;
  --max-w: 1040px;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope.woff2") format("woff2");
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--bg); color: var(--text);
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }

/* The same menu bar as the home page: it stays at the top of the
   window as you scroll, and its links go back to the sections there.
   Kept in step with the copy inside index.html by hand. */
.sitebar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg-sidebar); border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.sitebar .inner { max-width: var(--max-w); margin: 0 auto;
                  display: flex; align-items: center; gap: 18px; min-height: 60px; }
.sitebar .brand { display: inline-flex; align-items: center; gap: 10px;
                  font-weight: 700; color: var(--text); text-decoration: none;
                  min-height: 44px; }
.sitebar .brand img { border-radius: 8px; }
.sitebar .bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sitebar nav { display: flex; align-items: center; gap: 4px; }
.sitebar nav a { color: var(--text-muted); font-size: 15px; text-decoration: none;
                 padding: 12px 10px; min-height: 44px; display: inline-flex;
                 align-items: center; border-radius: 8px; }
.sitebar nav a:hover { color: var(--text); background: var(--surface-high); }
/* Anything jumped to - the skip link's target included - has to clear
   the bar rather than hide behind it. */
:target, #main { scroll-margin-top: 76px; }
@media (max-width: 700px) {
  .sitebar nav { display: none; }
  .sitebar .inner { min-height: 56px; }
}

/* The shell (top bar, sub-footer) runs to --max-w so it lines up with
   the home page; the prose panel stays narrower so lines stay readable. */
main { max-width: 820px; margin: 0 auto; padding: 40px 24px 8px; }
.panel {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 28px 32px;
}
h1 { font-size: 32px; line-height: 1.2; margin: 0 0 6px; text-wrap: balance; }
h2 { font-size: 20px; margin: 32px 0 8px; text-wrap: balance; }
p, li { color: var(--text); }
.muted { color: var(--text-muted); }
.updated { color: var(--text-muted); font-size: 16px; margin: 0 0 24px; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 6px; font-family: inherit; font-size: 0.92em; }
ul { padding-left: 22px; }
li { margin: 6px 0; }

footer { padding: 40px 24px 56px; text-align: center; }
footer .subfooter { text-align: left; }
footer nav a { color: var(--text-muted); text-decoration: none; margin: 0 6px; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; padding: 12px; min-width: 44px; min-height: 44px; }
footer nav a:hover { color: var(--text); }

/* Source-code row: the two marks on the left, the repository links on
   the right. Same rule and rhythm as the legal sub-footer below it. */
.oss-bar { max-width: var(--max-w); margin: 28px auto 0; padding-top: 22px;
  border-top: 1px solid var(--border); color: var(--text-muted); font-size: 15px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; text-align: left; }
.oss-bar .marks { display: flex; align-items: center; gap: 2px; margin-left: -10px; }
.oss-bar .marks a { display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px; color: var(--text-muted);
  text-decoration: none; }
.oss-bar .marks a:hover { color: var(--text); background: var(--surface-high); }
.oss-bar .marks svg { width: 21px; height: 21px; display: block; }
.oss-bar nav { flex: 0 1 auto; max-width: 100%; display: flex; flex-wrap: wrap;
  justify-content: flex-end; margin-right: -6px; }
.oss-bar nav a { display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 6px; min-width: 44px; min-height: 44px; color: var(--text-muted);
  font-size: 15px; text-decoration: none; }
.oss-bar nav a:hover { color: var(--text); }
@media (max-width: 700px) {
  .oss-bar nav { justify-content: flex-start; margin-left: -6px; margin-right: 0; }
}
/* Company details on the left, the five legal links pushed to the
   right on the same row; both stack and left-align on a narrow screen. */
.subfooter {
  max-width: var(--max-w); margin: 28px auto 0; padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 15px;
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 8px 16px;
}
.subfooter .legal-text { flex: 1 1 320px; min-width: 0; }
.subfooter p { margin: 0 0 4px; color: var(--text-muted); }
.subfooter a { text-decoration: none; }
.subfooter .legal-text p:last-child { margin-bottom: 0; }
.subfooter nav { flex: 0 1 auto; max-width: 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; margin-right: -6px; }
.subfooter nav a { display: inline-flex; align-items: center; justify-content: center; padding: 12px 6px; min-width: 44px; min-height: 44px; color: var(--text-muted); font-size: 15px; }
.subfooter nav a:hover { color: var(--text); }
@media (max-width: 700px) {
  .subfooter nav { justify-content: flex-start; margin-left: -6px; margin-right: 0; }
}

/* A list whose items are destinations rather than prose: each link needs a
   finger-sized target. Links inside a sentence are deliberately untouched. */
.linklist li a { display: inline-flex; align-items: center; min-height: 44px; }
