/* Shared styles for the interactive figures on /teaching/lens-physics/.
   Each figure is its own page, shown in an iframe, so that the scripts of one
   figure cannot clash with another. The figures are drawn with fixed light
   colours, so they keep a light card even when the site is in dark mode. */

@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'IBM Plex Sans';font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/ibm-plex-sans-greek-400-normal.woff2) format('woff2');unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}

:root{
  --text-primary:#16222E; --text-secondary:#55697A;
  --t:#16222E; --b:#9DACB9;
  --surface-1:#EEF2F5; --border:#DDE4EA; --border-strong:#B9C5CF; --border-stronger:#8696A4;
  --border-accent:#1456A8; --text-accent:#1456A8;
  --bg-warning:#FCEEDD; --text-warning:#8A4A0B;
  --radius:8px;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0; background:#FBFCFD; color:var(--text-primary)}
body{padding:14px 14px 16px; font-family:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:15px; line-height:1.5; -webkit-font-smoothing:antialiased}
svg{display:block; max-width:100%; height:auto}
/* On a phone the figures would shrink to unreadable text: keep them at a
   legible width and let them scroll sideways inside their frame instead. */
@media (max-width:600px){
  svg[viewBox]{min-width:600px; max-width:none}
  html{overflow-x:auto}
}
/* …unless the figure can be cut into panels stacked one under the other (stack.js) */
@media (max-width:600px){
  body{padding:10px 8px 12px}
  svg[viewBox].stk{min-width:0!important; max-width:100%!important; width:100%!important; height:auto; margin:0 0 6px}
}
svg text{font-family:"IBM Plex Sans",system-ui,-apple-system,"Segoe UI",sans-serif}
.th{font-size:14px; font-weight:500}
.ts{font-size:12px}
text.th:not([fill]){fill:var(--text-primary)}
text.ts:not([fill]){fill:var(--text-secondary)}
.leader{stroke:var(--b); stroke-width:.5; fill:none}
.box{fill:#FFFFFF; stroke:#888780}
.c-amber{fill:#FAC775; stroke:#BA7517}
button{font-family:inherit}
button:focus-visible,input:focus-visible{outline:2px solid #1456A8; outline-offset:2px}
input[type=range]{accent-color:#1456A8}
a{color:#1456A8}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}

/* Goal banner shared by the section-0 figures */
.goalbox{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;border:1.5px solid var(--border-accent);background:#EEF4FC;border-radius:10px;padding:8px 12px;margin:0 0 12px;font-size:14px;line-height:1.45;color:var(--text-primary)}
.goalbox .gi{font-size:18px;line-height:1}
.goalbox .gt{flex:1 1 260px;min-width:0}
.goalbox .gt b{color:var(--text-accent)}
.goalbox .gs{font-size:12.5px;font-weight:600;padding:3px 10px;border-radius:999px;white-space:nowrap}
.goalbox .gs.ok{background:#E3F1D6;color:#27500A}.goalbox .gs.no{background:#FCE8E3;color:#A32D2D}.goalbox .gs.na{display:none}
