/* ============================================================================
   URstudymate — print stylesheet (linked with media="print")
   A4, black on white, full lesson content including answers that are part of
   the notes. Navigation, controls, decoration and motion are removed.
   The script opens every <details> before printing and restores it after.
   ========================================================================== */

@page{size:A4;margin:16mm 15mm 18mm 15mm}
@page{
  @bottom-left{content:"URstudymate \00B7  For personal study only";font:8pt/1 "Segoe UI",Arial,sans-serif;color:#555}
  @bottom-right{content:"Page " counter(page) " of " counter(pages);font:8pt/1 "Segoe UI",Arial,sans-serif;color:#555}
}

/* ---- PRINT RESTRICTION ------------------------------------------------------
   Unless the page is marked data-usm-print="allow" (see CONFIG in
   urstudymate.js), a printout contains only this notice. Everything below
   the gate is the full A4 stylesheet, used when printing is allowed.       */
html:not([data-usm-print="allow"]) body>*{display:none!important}
html:not([data-usm-print="allow"]) body::before{
  content:"Printing is disabled for these notes.\A\AURstudymate notes are provided for on-screen personal study.\A\00A9  2026 URstudymate. Please do not copy, print or redistribute.";
  white-space:pre-wrap;display:block;text-align:center;padding:70mm 12mm 0;
  font:13pt/1.5 "Segoe UI",Arial,sans-serif;color:#000}

/* ---- black on white, whatever theme was on screen ------------------------- */
:root,:root:root,:root:root:root,:root[data-theme]{
  color-scheme:light;
  --u-bg:#fff; --u-surface:#fff; --u-surface-2:#fff; --u-sunk:#fff;
  --u-ink:#000; --u-ink-2:#1a1a1a; --u-ink-3:#333;
  --u-rule:#9a9a9a; --u-rule-2:#777;
  --u-accent:#000; --u-accent-strong:#000; --u-accent-tint:#fff; --u-link:#000;
  --u-obj:#222; --u-def:#222; --u-work:#222; --u-prac:#222; --u-tip:#222; --u-ms:#222;
  --u-trap:#222; --u-check:#222; --u-think:#222; --u-note:#222;
  --u-obj-bg:#fff; --u-def-bg:#fff; --u-work-bg:#fff; --u-prac-bg:#fff; --u-tip-bg:#fff;
  --u-ms-bg:#fff; --u-trap-bg:#fff; --u-check-bg:#fff; --u-think-bg:#fff; --u-note-bg:#fff;
  --u-sl:#000; --u-sl-bg:#fff; --u-hl:#000; --u-hl-bg:#fff;
  --u-eq-bg:#fff; --u-eq-bd:#777; --u-th-bg:#eee;
  --u-curr:#000; --u-curr-tint:#fff;
  --u-shadow:none; --u-shadow-lift:none;
}
html,body{background:#fff!important;color:#000!important}
body{font-size:10.5pt;line-height:1.45;margin:0!important}
*,*::before,*::after{animation:none!important;transition:none!important;box-shadow:none!important;text-shadow:none!important}
html{scroll-behavior:auto!important}

/* ---- remove navigation, controls and decoration -------------------------- */
.usm-skip,.usm-progress,.usm-top,.usm-toast,.usm-scrim,.usm-homelink,
.topbar,.searchrow,.results,.qmeta,.rail,.subnav,.pgtoc,.pager,.legend-bar,.themebtn,
#top,#rail,#aside,#menu,#q,#theme,#nohits,.top-link,
.flash .stage,.flash .ph,.doc .flash .stage,.doc .flash .ph,
.nojs,noscript,.usm-nav,.usm-cta,.usm-head,
.sim .chips,.sim .btnrow,.doc .sim .btnrow,.mod .btnrow,.seg,
.sim input[type=range],.mod input[type=range],.baleq input,
.quiz .qh button,.quiz button:not(.qopt),.x-sol>summary,
.usm-hero::after,.masthead::before,#top::before,.masthead h1 a::before{display:none!important}
button:not(.qopt){display:none!important}
.usm-reveal{opacity:1!important;transform:none!important}

/* ---- page frame --------------------------------------------------------- */
.wrap,#doc,.pgwrap,.usm-shell{display:block!important;max-width:none!important;width:auto!important;
  padding:0!important;margin:0!important;border:0!important;background:#fff!important}
.doc{border:0!important;padding:0!important;margin:0!important;background:#fff!important;font-size:10.5pt;line-height:1.45}
.doc p,.doc ul,.doc ol,#doc p,#doc li,#doc ul,#doc ol{max-width:none!important}
.masthead{padding:0 0 6pt!important;margin:0 0 10pt!important;border-bottom:1.2pt solid #000!important}
.masthead h1{font-size:13pt!important}
.mast-eyebrow{font-size:8.5pt!important;margin-bottom:3pt!important}
.mast-eyebrow span{display:inline!important}
.mast-eyebrow b,.usm-chip{background:#fff!important;border:0.75pt solid #000!important;color:#000!important}

/* A Level: the header is hidden, so print the course line from the eyebrow */
#doc>.eyebrow{font-size:8.5pt!important;color:#000!important;border-bottom:1.2pt solid #000;padding-bottom:4pt;margin-bottom:8pt!important}

/* ---- type ----------------------------------------------------------------- */
h1,#doc h1{font-size:20pt!important;line-height:1.15!important;margin:0 0 8pt!important;color:#000!important}
h2,.doc h2,#doc h2{font-size:14pt!important;margin:16pt 0 5pt!important;padding-top:6pt!important;
  border-top:0.75pt solid #000!important;border-bottom:0!important;color:#000!important}
h3,.doc h3,#doc h3{font-size:12pt!important;margin:12pt 0 4pt!important;color:#000!important}
h4,.doc h4,#doc h4{font-size:10.5pt!important;margin:10pt 0 3pt!important;color:#000!important}
.lead,.doc .lead,#doc .lead{font-size:11pt!important;color:#000!important}
a{color:#000!important;text-decoration:underline}
.doc .partlabel{color:#000!important}
.doc .partlabel::after{background:#000!important}
p,li{orphans:3;widows:3}

/* ---- keep things together -------------------------------------------------- */
h1,h2,h3,h4,h5,.bt,.t,.partlabel,.psh,.x-qh,.pqh,figcaption,caption,summary{break-after:avoid;page-break-after:avoid}
h2+*,h3+*,h4+*{break-before:avoid;page-break-before:avoid}
figure,.fg,.fig-body,img,svg,.eq,div.f,
.box,.eo,.x-q,.pq,.qitem,.box.work,.box.we,.doc .we,table.we,.x-calc,.kv{break-inside:avoid;page-break-inside:avoid}
tr,th,td{break-inside:avoid;page-break-inside:avoid}
thead{display:table-header-group}
tfoot{display:table-footer-group}
/* very long boxes may still need to split rather than leave half a page empty */
.pset,.quiz,.x-practice,details.more,.sim,.mod,.intro{break-inside:auto;page-break-inside:auto}

/* ---- callouts: outline + label, no tinted fills -------------------------- */
.box,.doc .box,.eo,.pset{background:#fff!important;border:0.75pt solid #555!important;border-left:3pt solid #000!important;
  border-radius:3pt!important;padding:6pt 9pt!important;margin:8pt 0!important;font-size:10.5pt!important}
.box .bt,.doc .box .t,.eo .bt{color:#000!important;font-size:9.5pt!important}
.box .bt::before,.doc .box .t::before,.eo .bt::before,h3.usm-lo-h::before,.usm-prac-h::before,.pset .psh::before{
  background:#fff!important;color:#000!important;border:0.75pt solid #000}
ul.usm-lo-list{background:#fff!important;border:0.75pt solid #555!important;border-left:3pt solid #000!important}
.box.trap,.box.er,.doc .trap{border-left-style:double!important;border-left-width:4pt!important}

/* ---- equations and formulae: never clipped, wrap if they must ------------ */
.doc .eq,div.f,p.f,.mech{overflow:visible!important;white-space:normal!important;background:#fff!important;
  border:0.75pt dashed #777!important;border-left:2pt solid #000!important;font-size:10.5pt!important;padding:5pt 8pt!important}
span.f{white-space:normal!important}
sub,sup{font-size:.72em!important}

/* ---- tables: full width, no scrollers, readable ------------------------- */
.tw,.tablewrap,.usm-tablewrap,.scroll-x,.fig-body,figure.fg .fig-body{overflow:visible!important;border:0!important;
  background:#fff!important;padding:0!important;margin:8pt 0!important}
table{width:100%!important;border-collapse:collapse!important;font-size:9pt!important;margin:6pt 0!important}
th,td{border:0.6pt solid #666!important;padding:3pt 5pt!important;background:#fff!important;color:#000!important;white-space:normal!important}
thead th,th{background:#eee!important;font-weight:700!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.doc tbody tr:nth-child(even) td,#doc tbody tr:nth-child(even) td{background:#fff!important}
caption{color:#000!important;font-size:8.5pt!important}
table.we td,.x-calc td,.box table.we td{border:0!important;border-bottom:0.4pt solid #bbb!important}

/* ---- figures and question images ---------------------------------------- */
figure svg,.doc figure svg,.fig svg,.fig-body svg{max-width:100%!important;height:auto!important;border:0.5pt solid #999!important;background:#fff!important}
img,.x-qimg,img.qimg,.doc figure img{max-width:100%!important;max-height:235mm;height:auto!important;border:0.5pt solid #999!important;background:#fff!important}
figcaption{color:#000!important;font-size:9pt!important}
canvas{max-width:100%!important;height:auto!important}
.fig canvas{border:0.5pt solid #999!important}
svg,img,canvas{-webkit-print-color-adjust:exact;print-color-adjust:exact}

/* ---- answers and disclosures are printed open ----------------------------- */
details{display:block!important;border:0!important;background:#fff!important;padding:0!important}
details>summary{list-style:none}
details>summary::-webkit-details-marker{display:none}
details::details-content{content-visibility:visible!important;display:contents}
details.more>summary{font-weight:700;padding:4pt 0!important}
details.more>summary::before{content:""!important}
details.more>div{padding:0!important}
.x-sol{border-top:0.6pt dashed #777!important;margin-top:6pt!important;padding-top:4pt!important}
.x-sol::before{content:"Answer / mark scheme";display:block;font-weight:700;font-size:9.5pt;margin:0 0 3pt}
.box.qc details.qa{display:inline!important}
.box.qc details.qa>summary{display:inline;font-weight:700;color:#000!important}
.box.qc details.qa>summary::after{content:": "}
.box.qc details.qa>div{display:inline;color:#000!important}
.qwhy{color:#000!important;background:#fff!important}

/* ---- interactive models: keep the rendered state, drop the controls ------ */
.sim,.doc .sim,.quiz,.flash,.doc .flash,.mod{border:0.75pt solid #777!important;background:#fff!important;border-radius:3pt!important}
.sim>.sh,.doc .sim>.sh,.flash .fh,.doc .flash .fh,.quiz .qh,.mod-head{background:#fff!important;border-bottom:0.6pt solid #999!important}
.sim>.sh .ttl,.doc .sim>.sh .ttl{color:#000!important}
.flash .fc,.doc .flash .fc{color:#000!important}
.flash::after,.doc .flash::after{content:"Animation available in the online notes.";display:block;padding:4pt 8pt;font-size:8.5pt;font-style:italic}
.qopt{border:0.6pt solid #999!important;background:#fff!important;color:#000!important;padding:2pt 6pt!important}
input,select{border:0.6pt solid #999!important;background:#fff!important;color:#000!important}
.read,.verdict,.out,.doc .sim .out{background:#fff!important;border:0.6pt solid #999!important;color:#000!important}

/* ---- badges: syllabus distinctions stay visible in monochrome ------------ */
.doc .badge,.doc .supp-inline,.oc,.pill,.tag,.hlpill{background:#fff!important;color:#000!important;
  border:0.6pt solid #000!important;box-shadow:none!important}
.doc .b-hl,.doc .supp-inline,.hlpill{border-style:double!important;border-width:2pt!important}

/* ---- readable URLs for external links in lesson text ---------------------- */
.doc a[href^="http"]::after,#doc a[href^="http"]::after,.usm-print-url a[href^="http"]::after{
  content:" <" attr(href) ">";font-size:8pt;font-weight:400;word-break:break-all;color:#333}
.doc a[href^="http"].usm-bare::after,#doc a[href^="http"].usm-bare::after{content:""}

/* ---- footer + copyright on the last page ---------------------------------- */
.foot,#doc footer,.usm-foot{border-top:0.75pt solid #000!important;margin-top:14pt!important;padding-top:6pt!important;color:#000!important;font-size:8.5pt!important}
.usm-copy{display:block!important;color:#000!important;border-top:0!important;font-size:8.5pt!important}

/* ---- home page ----------------------------------------------------------- */
.usm-hero{padding:0 0 10pt!important}
.usm-section{padding:10pt 0!important;border-top:0.75pt solid #000!important}
.usm-card,.usm-benefits li,.usm-steps li,.usm-stats li,.usm-topics details{border:0.75pt solid #777!important;background:#fff!important;transform:none!important;break-inside:avoid}
.usm-card .usm-go{display:none}
.usm-card ul.usm-facts li{background:#fff!important;border:0.5pt solid #999}
