/* Same tokens and base rules as explorer/style.css, so that both parts of the site read as one system. */
:root {
  --bg: #ffffff; --fg: #1a1a1a; --muted: #5a5a5a; --line: #d0d0d0; --shade: #efefef; --link: #0b57a4;
  --focus: #0b57a4;
  /* Okabe-Ito colours, as in the explorer; outcome squares also carry a letter */
  --c-A: #009e73; --c-N: #d55e00; --c-Q: #f0e442; --c-D: #bdbdbd;
  --t-A: #ffffff; --t-N: #ffffff; --t-Q: #1a1a1a; --t-D: #1a1a1a;
  /* marks: correct detections, wrong detections, condition of selection and condition of use */
  --correct: #0072b2; --wrong: #d55e00; --ink: #1a1a1a; --grid: #e2e2e2; --axis: #8a8a8a;
  --limit: #9a9a9a; --threshold: #6a3d9a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616; --fg: #e8e8e8; --muted: #a8a8a8; --line: #444444; --shade: #262626; --link: #8ab8f0;
    --focus: #8ab8f0; --c-D: #6e6e6e; --t-D: #ffffff;
    --correct: #3d9ad8; --wrong: #cf7300; --ink: #e8e8e8; --grid: #303030; --axis: #8a8a8a;
    --limit: #7a7a7a; --threshold: #a77fd1;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0 auto; max-width: 72rem; padding: 0 16px 2rem; background: var(--bg); color: var(--fg);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--link); }
h1 { font-size: 1.5rem; margin: 1rem 0 .5rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
code { font-size: .9em; overflow-wrap: anywhere; }
.note { color: var(--muted); font-size: .9rem; }
nav.top { font-size: .9rem; margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.badge { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 0 .4rem;
  font-size: .85rem; color: var(--muted); background: var(--shade); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: end; margin: 1rem 0;
  padding: .75rem; border: 1px solid var(--line); border-radius: 6px; }
.filters label { display: flex; flex-direction: column; font-size: .9rem; gap: .2rem; max-width: 100%; }
.filters label.check { flex-direction: row; align-items: center; gap: .4rem; }
.filters select, .filters input[type=number], .filters input[type=text] { font: inherit; max-width: 100%;
  padding: .25rem; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; }
.filters input[type=number] { width: 9rem; }
.filters input[type=range] { width: 14rem; max-width: 100%; }
.filters .note { flex-basis: 100%; margin: 0; }
.filters button, button.act { font: inherit; padding: .25rem .6rem; background: var(--shade); color: var(--fg);
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; margin: .5rem 0; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; }
.detail th, .detail td { border: 1px solid var(--line); padding: .25rem .45rem; text-align: right; white-space: nowrap; }
.detail th { background: var(--shade); }
.detail td.l, .detail th.l { text-align: left; }
.result { font-size: 1.05rem; }
.outcome { display: inline-block; padding: .1rem .5rem; border-radius: 4px; font-weight: 600; }
.outcome.A { background: var(--c-A); color: var(--t-A); }
.outcome.N { background: var(--c-N); color: var(--t-N); }
.outcome.Q { background: var(--c-Q); color: var(--t-Q); }
.outcome.D { background: var(--c-D); color: var(--t-D); }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--fg); font: 11px system-ui, sans-serif; }
.chart .muted { fill: var(--muted); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.panel { border: 1px solid var(--line); border-radius: 6px; padding: .5rem; }
.panel h3 { margin: .2rem 0 .4rem; }
.tip { position: fixed; pointer-events: none; background: var(--bg); color: var(--fg); border: 1px solid var(--line);
  border-radius: 4px; padding: .3rem .5rem; font-size: .85rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); z-index: 10; }
details { border: 1px solid var(--line); border-radius: 6px; padding: .5rem .75rem; margin: 1rem 0; }
details summary { cursor: pointer; font-weight: 600; }
.formula { font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; font-size: 1.05rem;
  overflow-x: auto; padding: .3rem 0; }
ul.pages li { margin: .6rem 0; }
footer { margin-top: 2rem; border-top: 1px solid var(--line); font-size: .92rem; }
footer li { margin: .3rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 480px) {
  body { font-size: 14px; }
  .filters { padding: .5rem; }
  .filters input[type=number] { width: 7rem; }
}
