/* The A-level book (public/courses/a-level/). Hand-maintained, like book.css. Loaded after it.

   COLOUR TOKENS (WCAG relative luminance, computed, not eyeballed). Text colour on white / paper (#f8f5ee) /
   paper-dim (#efe9db) / its own 13% tint (the chip background):
     proof           #44546a   7.71 / 7.09 / 6.37 / 6.34
     algebra         #6a3aa2   7.66 / 7.04 / 6.33 / 6.23
     coordinate      #1a5bb0   6.63 / 6.09 / 5.48 / 5.46
     sequences       #7a5800   6.51 / 5.98 / 5.38 / 5.38
     trigonometry    #1c7338   5.90 / 5.42 / 4.87 / 4.90
     exponentials    #a14400   6.28 / 5.77 / 5.19 / 5.17
     differentiation #ad1f5c   6.71 / 6.17 / 5.55 / 5.41
     integration     #3a3fa8   8.55 / 7.85 / 7.06 / 6.90
     numerical       #5d6b00   5.88 / 5.40 / 4.86 / 4.92
     vectors         #0b6b8f   5.98 / 5.49 / 4.94 / 4.95
   Every pairing is 4.86 or better. Colour is never the only signal: every chip, node and graph carries the
   area's name, and graph curves differ by line style as well as colour. */

:root{
  --c-al-proof:#44546a;          --t-al-proof:#e7e9ec;
  --c-al-algebra:#6a3aa2;        --t-al-algebra:#ece5f3;
  --c-al-coordinate:#1a5bb0;     --t-al-coordinate:#e1eaf5;
  --c-al-sequences:#7a5800;      --t-al-sequences:#eee9de;
  --c-al-trigonometry:#1c7338;   --t-al-trigonometry:#e1ede5;
  --c-al-exponentials:#a14400;   --t-al-exponentials:#f3e7de;
  --c-al-differentiation:#ad1f5c;--t-al-differentiation:#f4e2ea;
  --c-al-integration:#3a3fa8;    --t-al-integration:#e5e6f4;
  --c-al-numerical:#5d6b00;      --t-al-numerical:#eaecde;
  --c-al-vectors:#0b6b8f;        --t-al-vectors:#dfecf0;
}

.book.strand-al-proof,.pyr-node.strand-al-proof,.g-entry.strand-al-proof{--strand:var(--c-al-proof);--tint:var(--t-al-proof);}
.book.strand-al-algebra,.pyr-node.strand-al-algebra,.g-entry.strand-al-algebra{--strand:var(--c-al-algebra);--tint:var(--t-al-algebra);}
.book.strand-al-coordinate,.pyr-node.strand-al-coordinate,.g-entry.strand-al-coordinate{--strand:var(--c-al-coordinate);--tint:var(--t-al-coordinate);}
.book.strand-al-sequences,.pyr-node.strand-al-sequences,.g-entry.strand-al-sequences{--strand:var(--c-al-sequences);--tint:var(--t-al-sequences);}
.book.strand-al-trigonometry,.pyr-node.strand-al-trigonometry,.g-entry.strand-al-trigonometry{--strand:var(--c-al-trigonometry);--tint:var(--t-al-trigonometry);}
.book.strand-al-exponentials,.pyr-node.strand-al-exponentials,.g-entry.strand-al-exponentials{--strand:var(--c-al-exponentials);--tint:var(--t-al-exponentials);}
.book.strand-al-differentiation,.pyr-node.strand-al-differentiation,.g-entry.strand-al-differentiation{--strand:var(--c-al-differentiation);--tint:var(--t-al-differentiation);}
.book.strand-al-integration,.pyr-node.strand-al-integration,.g-entry.strand-al-integration{--strand:var(--c-al-integration);--tint:var(--t-al-integration);}
.book.strand-al-numerical,.pyr-node.strand-al-numerical,.g-entry.strand-al-numerical{--strand:var(--c-al-numerical);--tint:var(--t-al-numerical);}
.book.strand-al-vectors,.pyr-node.strand-al-vectors,.g-entry.strand-al-vectors{--strand:var(--c-al-vectors);--tint:var(--t-al-vectors);}

.chip-al-proof{background:var(--t-al-proof);color:var(--c-al-proof);}
.chip-al-algebra{background:var(--t-al-algebra);color:var(--c-al-algebra);}
.chip-al-coordinate{background:var(--t-al-coordinate);color:var(--c-al-coordinate);}
.chip-al-sequences{background:var(--t-al-sequences);color:var(--c-al-sequences);}
.chip-al-trigonometry{background:var(--t-al-trigonometry);color:var(--c-al-trigonometry);}
.chip-al-exponentials{background:var(--t-al-exponentials);color:var(--c-al-exponentials);}
.chip-al-differentiation{background:var(--t-al-differentiation);color:var(--c-al-differentiation);}
.chip-al-integration{background:var(--t-al-integration);color:var(--c-al-integration);}
.chip-al-numerical{background:var(--t-al-numerical);color:var(--c-al-numerical);}
.chip-al-vectors{background:var(--t-al-vectors);color:var(--c-al-vectors);}
.chip-year{background:var(--navy);color:var(--white);border-color:var(--navy);}
.chip-year2{background:var(--white);color:var(--navy);border:2px solid var(--navy);}

/* ---------- maths (native MathML) ---------- */
math{font-size:1.18em;font-family:"Cambria Math","STIX Two Math","Latin Modern Math",math,serif;}
.mw{white-space:nowrap;}
.eq{display:block;margin:14px 0;padding:10px 14px;overflow-x:auto;text-align:center;background:var(--tint,var(--paper));border-radius:8px;}
.eq math{font-size:1.4em;}
.qtext math,.key math{font-size:1.2em;}
@media print{.eq{background:none;border:1px solid #888;}}
/* A checklist label is a flex row in book.css, which turns every <math> in it into a separate unbreakable column.
   Here the text flows normally beside an absolutely placed box, so long lines wrap. */
.book .checklist label{display:block;position:relative;padding-left:34px;}
.book .checklist input{position:absolute;left:0;top:2px;margin:0;}
/* A wide equation cannot wrap, so on a phone the glossary examples use a smaller size for maths. */
@media (max-width:480px){.book .g-example math{font-size:.9em;}}

/* ---------- large, clear figures ---------- */
/* One system for every picture: a wide figure, big labels, thick lines, and a caption that says what to look at. */
.figure-lg{margin:26px auto;text-align:center;max-width:820px;}
.figure-lg svg{width:100%;height:auto;max-width:820px;display:block;margin:0 auto;}
.figure-lg figcaption{margin-top:8px;font-size:1.02rem;color:var(--ink);text-align:left;max-width:60ch;margin-left:auto;margin-right:auto;}
.qfig-lg{margin:10px auto 16px;text-align:center;max-width:620px;}
.qfig-lg svg{width:100%;height:auto;max-width:620px;display:block;margin:0 auto;}
.qfig-lg figcaption{font-size:.95rem;color:var(--ink-soft);}
.graph-svg .svg-t{font:700 24px "Source Sans 3",system-ui,sans-serif;fill:var(--ink);}
.graph-svg .svg-t.small{font-size:20px;font-weight:600;}
.graph-svg .svg-t.big{font-size:29px;}
.graph-svg .svg-t.alt{fill:var(--strand,var(--navy));}
.graph-svg .grid{stroke:#d6d2c6;stroke-width:1;}
.graph-svg .axis{stroke:var(--ink);stroke-width:2.5;fill:none;}
.graph-svg .tick{stroke:var(--ink);stroke-width:2;}
.graph-svg .curve{stroke:var(--strand,var(--navy));stroke-width:4.5;fill:none;stroke-linecap:round;stroke-linejoin:round;}
.graph-svg .curve-b{stroke:var(--ink);stroke-width:4;fill:none;stroke-dasharray:12 7;stroke-linecap:round;}
.graph-svg .curve-c{stroke:var(--c-oops);stroke-width:4;fill:none;stroke-dasharray:3 7;stroke-linecap:round;}
.graph-svg .line{stroke:var(--ink);stroke-width:3.5;fill:none;stroke-linecap:round;}
.graph-svg .guide{stroke:var(--ink-soft);stroke-width:2;fill:none;stroke-dasharray:7 6;}
.graph-svg .shade{fill:var(--tint,#e4eefb);stroke:none;}
.graph-svg .shade-hatch{stroke:none;} /* its fill is an attribute on the shape: see shade() in figure-lib.mjs */
.graph-svg .pt{fill:var(--c-oops);stroke:var(--white);stroke-width:2.5;}
.graph-svg .pt-open{fill:var(--white);stroke:var(--c-oops);stroke-width:3;}
.graph-svg .tangent{stroke:var(--c-oops);stroke-width:4;fill:none;}
.graph-svg .arrowhead{fill:var(--ink);}
.graph-svg .box{fill:var(--paper);stroke:var(--ink);stroke-width:2;}
.graph-svg .good{stroke:var(--c-right);}
.graph-svg .bad{stroke:var(--c-oops);}
@media (max-width:480px){
  .graph-svg .svg-t{font-size:27px;}
  .graph-svg .svg-t.small{font-size:23px;}
  .graph-svg .svg-t.big{font-size:31px;}
}
@media (forced-colors:active){
  .graph-svg .curve,.graph-svg .curve-b,.graph-svg .curve-c,.graph-svg .line,.graph-svg .axis,.graph-svg .tangent{stroke:CanvasText;}
  .graph-svg .shade{fill:Canvas;stroke:CanvasText;}
  .graph-svg .pt{fill:CanvasText;}
}
@media print{.graph-svg .shade{fill:#e9e9e9;}.graph-svg .curve{stroke:#000;}}

/* ---------- the three-part layout of the A-level hub ---------- */
.book-years{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin:22px 0;}
.book-year{border:2px solid var(--navy);border-radius:12px;padding:16px 18px;background:var(--white);}
.book-year.is-soon{border-style:dashed;background:var(--paper);}
.book-year h3{margin-top:0;}

/* small pictures in glossary pop-ups and entries */
.term-svg{max-width:340px;margin:0 auto;display:block;}
.book .g-fig{max-width:540px;}
.g-fig .term-svg{max-width:540px;}
