/* Whiteboards: hand-drawn boards that explain how something works, one idea per board.
   A white board with marker colors in light mode, a dark glass board with bright markers in dark mode.
   The drawings are inline SVG from tools/whiteboards.js; the text is HTML in the Kalam handwriting font,
   which this file loads from assets/fonts (the @font-face rules below), so a page only links this file.
   Markup: <div class="wb-grid"><article class="wb"><h3>..</h3> (or <h4> under a page's own h3)<p class="wb-mem">..</p>
   <!-- wb:name --><!-- /wb:name --><ol class="wb-steps">..</ol><p class="wb-catch">..</p></article></div> */

/* Kalam, the handwriting font, served from this site so visitors' browsers never contact Google.
   Files from Fontsource 5.3.0 (the Google Fonts files), SIL Open Font License, see fonts/licenses/kalam.txt. */
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/kalam-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/kalam-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: 'Kalam'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/kalam-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: 'Kalam'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/kalam-devanagari-700-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/kalam-latin-ext-700-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: 'Kalam'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/kalam-latin-700-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; }

/* The section around the boards. The heading classes use the page's own tokens (--display, --mono, --muted,
   --accent) when it has them, as the Lab algorithm guides do. Pages with their own h2 style leave the classes off. */
.wb-sec { display: grid; gap: 14px; min-width: 0; scroll-margin-top: 12px; }
.wb-kicker { margin: 0; font: 600 12px/1.4 var(--mono, ui-monospace, Menlo, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--accent, currentColor); }
.wb-h { margin: 0; font: 700 clamp(20px, 3vw, 24px)/1.2 var(--display, inherit); letter-spacing: -0.01em; text-wrap: balance; }
.wb-lede { margin: 0; color: var(--muted, inherit); max-width: 72ch; }
.wb-lede a { color: var(--accent, var(--petrol)); text-underline-offset: 3px; }

.wb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.wb-grid.wb-one { grid-template-columns: minmax(0, 1fr); }
.wb-grid > .wb-wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .wb-grid { grid-template-columns: minmax(0, 1fr); } }

.wb {
  --wb-bg: #fdfdfb; --wb-frame: #c5ccd4; --wb-tray: #aab3bd;
  --wb-k: #1f2933; --wb-m: #5f6b78; --wb-b: #1f5fd6; --wb-g: #13804d; --wb-r: #c7372a; --wb-o: #b45f06;
  --wb-bl: rgba(31, 95, 214, 0.32); --wb-gl: rgba(19, 128, 77, 0.34); --wb-rl: rgba(199, 55, 42, 0.32); --wb-ol: rgba(196, 110, 10, 0.36);
  background: var(--wb-bg); color: var(--wb-k);
  border: 7px solid var(--wb-frame); border-bottom-width: 12px; border-bottom-color: var(--wb-tray); border-radius: 10px;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 16px 18px 14px; display: grid; gap: 10px; align-content: start; min-width: 0; margin: 0;
  font: 400 18px/1.4 "Kalam", "Comic Sans MS", "Segoe Print", "Bradley Hand", cursive;
  text-align: left; letter-spacing: normal; text-transform: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wb {
    --wb-bg: #1a2129; --wb-frame: #3a4553; --wb-tray: #4b5767;
    --wb-k: #eef2f6; --wb-m: #a9b4c1; --wb-b: #8cb1ff; --wb-g: #5fd49d; --wb-r: #ff8b79; --wb-o: #ffb35c;
    --wb-bl: rgba(140, 177, 255, 0.36); --wb-gl: rgba(95, 212, 157, 0.36); --wb-rl: rgba(255, 139, 121, 0.36); --wb-ol: rgba(255, 179, 92, 0.38);
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] .wb {
  --wb-bg: #1a2129; --wb-frame: #3a4553; --wb-tray: #4b5767;
  --wb-k: #eef2f6; --wb-m: #a9b4c1; --wb-b: #8cb1ff; --wb-g: #5fd49d; --wb-r: #ff8b79; --wb-o: #ffb35c;
  --wb-bl: rgba(140, 177, 255, 0.36); --wb-gl: rgba(95, 212, 157, 0.36); --wb-rl: rgba(255, 139, 121, 0.36); --wb-ol: rgba(255, 179, 92, 0.38);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.35);
}

.wb h3, .wb h4 { margin: 0; font: 700 25px/1.15 "Kalam", "Comic Sans MS", cursive; color: var(--wb-b); display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; letter-spacing: normal; text-transform: none; }
.wb :is(h3, h4) small { font: 400 15px/1.2 "Kalam", "Comic Sans MS", cursive; color: var(--wb-m); }
.wb p { margin: 0; color: inherit; font: inherit; max-width: none; }
.wb b { font-weight: 700; }
.wb-draw { display: block; width: 100%; height: auto; overflow: visible; max-width: none; }
.wb-draw path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wb-draw text { font-family: "Kalam", "Comic Sans MS", "Segoe Print", "Bradley Hand", cursive; }
.wb-draw .sk { stroke: var(--wb-k); } .wb-draw .sm { stroke: var(--wb-m); } .wb-draw .sb { stroke: var(--wb-b); }
.wb-draw .sg { stroke: var(--wb-g); } .wb-draw .sr { stroke: var(--wb-r); } .wb-draw .so { stroke: var(--wb-o); }
.wb-draw .sbl { stroke: var(--wb-bl); } .wb-draw .sgl { stroke: var(--wb-gl); } .wb-draw .srl { stroke: var(--wb-rl); } .wb-draw .sol { stroke: var(--wb-ol); }
.wb-draw .fk, .wb-draw .dk { fill: var(--wb-k); } .wb-draw .fb, .wb-draw .db { fill: var(--wb-b); }
.wb-draw .fg, .wb-draw .dg { fill: var(--wb-g); } .wb-draw .fr, .wb-draw .dr { fill: var(--wb-r); } .wb-draw .fo, .wb-draw .do { fill: var(--wb-o); }
.wb-draw .tk { fill: var(--wb-k); } .wb-draw .tm { fill: var(--wb-m); } .wb-draw .tb { fill: var(--wb-b); }
.wb-draw .tg { fill: var(--wb-g); } .wb-draw .tr { fill: var(--wb-r); } .wb-draw .to { fill: var(--wb-o); }
.wb-steps { margin: 0; padding-left: 26px; display: grid; gap: 4px; list-style: decimal; }
.wb-steps li { margin: 0; padding: 0; }
.wb-steps li::marker { color: var(--wb-b); font-weight: 700; }
.wb code, .wb-steps code { font: inherit; font-weight: 700; color: var(--wb-b); background: none; padding: 0; border: 0; }
.wb .wb-catch { margin-top: 2px; color: var(--wb-r); border-top: 2px dashed var(--wb-frame); padding-top: 8px; }
.wb .wb-win { color: var(--wb-g); }
/* A mini board: a small sketch inside a card, 320 by 180, with a one line caption above it. */
.wb.wb-mini { padding: 8px 10px 6px; gap: 2px; border-width: 5px 5px 9px; border-radius: 8px; }
@media (max-width: 480px) {
  .wb { padding: 12px 12px 10px; font-size: 17px; border-width: 5px 5px 9px; }
  .wb h3, .wb h4 { font-size: 23px; }
  .wb-draw { width: calc(100% + 16px); margin: 0 -8px; }
  .wb.wb-mini { padding: 6px 8px 4px; }
  .wb-mini .wb-draw { width: 100%; margin: 0; }
}
