/* V33u: self-hosted Noto Sans and Noto Sans Mono (OFL 1.1, Latin subset, public/fonts/Noto-OFL.txt) */
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../../fonts/NotoSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../../../fonts/NotoSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../../../fonts/NotoSans-Italic.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../../fonts/NotoSansMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("../../../fonts/NotoSansMono-Bold.woff2") format("woff2"); }
/* V33t: readability tokens for the v3 course (rule 28: sizes and colours in v3 pages come from these tokens, no px text, no hard-coded greys).
   Loaded after v3.css. Reading options (v3-read.js) change html[data-rd-*]; everything below is rem, so browser zoom and the OS font size keep working.
   Contrast (WCAG 2.2): body #111827 on white 17.7:1; secondary #374151 10.3:1; link #1D4ED8 6.7:1; success #065F46 7.9:1; warning #92400E on #FFFBEB 6.9:1; error #991B1B on #FEF2F2 7.6:1. */
:root {
  --rd-base: 112.5%;                     /* 18 px at the browser default of 16 px */
  --rd-scale: 1; --rd-lh: 1.6; --rd-track: 0; --rd-word: 0;
  --rd-fs-body: 1rem; --rd-fs-small: .9rem; --rd-fs-code: .95rem; --rd-fs-h1: 2rem; --rd-fs-h2: 1.5rem; --rd-fs-h3: 1.25rem;
  --rd-font: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --rd-mono: "Noto Sans Mono", "DejaVu Sans Mono", "Ubuntu Mono", Consolas, monospace;
  --rd-term: var(--rim-term-px, 16px);   /* V33u: terminal and editor text has its own setting (12..28 px, default 16), not the page text size */
  --rd-bg: #FFFFFF; --rd-surface: #FFFFFF; --rd-ink: #111827; --rd-ink2: #374151; --rd-head: #0B2545; --rd-link: #1D4ED8;
  --rd-line: #6B7280; --rd-rule: #D7DEE8; --rd-focus: #1D4ED8;
  --rd-note: #FFFBEB; --rd-note-ink: #92400E; --rd-info: #E8EEFF; --rd-info-ink: #14306F;
  --rd-ok: #065F46; --rd-ok-bg: #ECFDF5; --rd-err: #991B1B; --rd-err-bg: #FEF2F2;
  --rd-code-bg: #F1F4F8; --rd-code-ink: #111827; --rd-inline-bg: #EEF2F7;   /* V39h: light code blocks by default */
  color-scheme: light;
}
@media (max-width: 700px) { :root { --rd-base: 106.25%; } }
html[data-rd-size="90"] { --rd-scale: .9; } html[data-rd-size="115"] { --rd-scale: 1.15; } html[data-rd-size="130"] { --rd-scale: 1.3; } html[data-rd-size="150"] { --rd-scale: 1.5; }
html[data-rd-line="wide"] { --rd-lh: 1.9; }
html[data-rd-font="easy"] { --rd-track: .03em; --rd-word: .12em; }   /* Atkinson Hyperlegible is not self-hosted; spacing on the standard font instead */
html[data-rd-theme="dark"] {
  --rd-bg: #0B1020; --rd-surface: #111A2E; --rd-ink: #E5E7EB; --rd-ink2: #CBD5E1; --rd-head: #F3F4F6; --rd-link: #93C5FD;
  --rd-line: #94A3B8; --rd-rule: #334155; --rd-focus: #FDE047; --rd-note: #2A2108; --rd-note-ink: #FCD34D; --rd-info: #1E2A4A; --rd-info-ink: #DBE7FF;
  --rd-ok: #6EE7B7; --rd-ok-bg: #052E22; --rd-err: #FCA5A5; --rd-err-bg: #3B0D0D; --rd-code-bg: #131B31; --rd-code-ink: #E5E7EB; --rd-inline-bg: #1E293B; color-scheme: dark;
}
html[data-rd-theme="contrast"] {
  --rd-bg: #000000; --rd-surface: #000000; --rd-ink: #FFFFFF; --rd-ink2: #FFFFFF; --rd-head: #FFFFFF; --rd-link: #8EC5FF;
  --rd-line: #FFFFFF; --rd-rule: #FFFFFF; --rd-focus: #FFFF00; --rd-note: #000000; --rd-note-ink: #FFFF00; --rd-info: #000000; --rd-info-ink: #FFFFFF;
  --rd-ok: #7CFFB2; --rd-ok-bg: #000000; --rd-err: #FF9E9E; --rd-err-bg: #000000; --rd-code-bg: #000000; --rd-code-ink: #FFFFFF; --rd-inline-bg: #1A1A1A; color-scheme: dark;
}
/* the shared v2/site variables follow the tokens on v3 pages */
:root { --paper: var(--rd-bg); --panel: var(--rd-surface); --ink: var(--rd-ink); --ink-2: var(--rd-ink2); --line: var(--rd-line);
  --cobalt-ink: var(--rd-link); --font: var(--rd-font); --mono: var(--rd-mono); }
:root { font-size: calc(var(--rd-base) * var(--rd-scale)); }
body { background: var(--rd-bg); color: var(--rd-ink); font-family: var(--rd-font); font-size: var(--rd-fs-body); line-height: var(--rd-lh); letter-spacing: var(--rd-track); word-spacing: var(--rd-word); }
main.v3 { color: var(--rd-ink); }
main.v3 h1, main.v3 h2, main.v3 h3 { color: var(--rd-head); line-height: 1.3; font-weight: 700; }
main.v3 h1 { font-size: var(--rd-fs-h1); } main.v3 h2, .v3-block > h2 { font-size: var(--rd-fs-h2); } main.v3 h3, .v3-block > h3 { font-size: var(--rd-fs-h3); }
main.v3 p, main.v3 li, main.v3 dd { max-width: var(--rd-measure, 70ch); }
main.v3 .v3-step { font-weight: 500; }
main.v3 a:not(.btn):not(.v3-mdot) { color: var(--rd-link); text-decoration: underline; text-underline-offset: 2px; }
main.v3 :focus-visible, .rd-panel :focus-visible, .rd-btn:focus-visible, .term :focus-visible { outline: 3px solid var(--rd-focus); outline-offset: 2px; }
/* small things never go under .875rem (15.75 px at 100 %) */
main.v3 .small, main.v3 .pill, main.v3 .btn, main.v3 .cm-meta, main.v3 .seelabel, main.v3 .v3-chip, main.v3 .v3-copy, main.v3 .v3-explain, main.v3 .v3-stop,
main.v3 .v3-mdot, main.v3 .v3-wordpop, main.v3 .v3-sechead, main.v3 .v3-card .btn, main.v3 .v3-snap .btn, main.v3 pre.see, main.v3 .muted { font-size: var(--rd-fs-small); }
main.v3 .small { font-size: .9375rem; }
main.v3 .pill { line-height: 1.5; padding: .1rem .65rem; background: var(--rd-surface); color: var(--rd-ink); border: 1px solid var(--rd-line); }
main.v3 .pill.ok { background: var(--rd-ok-bg); color: var(--rd-ok); border-color: var(--rd-ok); }
main.v3 .pill.warn { background: var(--rd-note); color: var(--rd-note-ink); border-color: var(--rd-note-ink); }
main.v3 .muted, main.v3 .cm-meta, main.v3 .cm-coming { color: var(--rd-ink2); }
main.v3 .btn { background: var(--rd-link); color: var(--rd-bg); border-color: var(--rd-link); }
main.v3 .btn.quiet { background: transparent; color: var(--rd-link); border-color: var(--rd-link); }
main.v3 .btn.quiet:hover { background: var(--rd-info); }
main.v3 .card { background: var(--rd-surface); border-color: var(--rd-line); color: var(--rd-ink); }
main.v3 .card.signal, main.v3 .v3-card { background: var(--rd-note); border-color: var(--rd-note-ink); }
main.v3 .card.ok { background: var(--rd-ok-bg); border-color: var(--rd-ok); }
main.v3 input[type=text], main.v3 textarea, main.v3 .v3-answer .v3-ans { background: var(--rd-surface); color: var(--rd-ink); border-color: var(--rd-line); }
/* code: monospace >= 16 px; inline code has a background, not only a colour */
main.v3 code, main.v3 kbd, main.v3 .cmd, main.v3 pre, main.v3 .code, main.v3 .v3-code pre.code { font-family: var(--rd-mono); font-size: var(--rd-fs-code); line-height: 1.5; letter-spacing: 0; word-spacing: 0; }
main.v3 :not(pre) > code { background: var(--rd-inline-bg); color: var(--rd-ink); padding: .05rem .3rem; border-radius: 4px; }
main.v3 .cmd, main.v3 .code, main.v3 .v3-code pre.code { background: var(--rd-code-bg); color: var(--rd-code-ink); }
main.v3 :not(pre) > code.cmd, main.v3 .cmd code { background: transparent; color: inherit; }
main.v3 pre.see, main.v3 .see { background: var(--rd-inline-bg); color: var(--rd-ink); border-color: var(--rd-line); border-left-color: var(--rd-ok); }
main.v3 p.ifnot { background: var(--rd-err-bg); border-left-color: var(--rd-err); color: var(--rd-ink); }
main.v3 details.words dt:target, main.v3 details.words dt:target + dd { background: var(--rd-note); }
.ued-big { background: var(--rd-surface); color: var(--rd-ink); }
main.v3 details.firstaid dt code, main.v3 details.firstaid dd, main.v3 details.firstaid .src { font-size: var(--rd-fs-code); color: inherit; }
/* terminal and editor follow the text size */
.term .out, .term .in input, .term .bar, .pyedit, .pyline, .pyline input { font-size: var(--rd-term); line-height: 1.5; }
.term .out, .term .in input, .term .in span { color: #E5E7EB; }
.term .out { background: #0B1020; }
.rim2-bar, .rim2-bar .where, .rim2-bar .map { font-size: min(.92rem, 16px); }   /* the site's own bar keeps its height at big sizes */
.skip:not(:focus) { top: -10rem; }   /* the hidden skip link must stay off-screen when the text is big */
/* Reading options control */
.rd-btn { margin-left: auto; min-width: 44px; height: 34px; padding-block: 0; box-sizing: border-box; padding: 0 .6rem; font: 700 min(1rem, 18px)/1 var(--rd-font); letter-spacing: 0; color: #fff; background: transparent; border: 2px solid #fff; border-radius: 6px; cursor: pointer; }
.rd-btn[aria-expanded="true"] { background: #fff; color: #0B2545; }
.rd-panel { position: fixed; z-index: 90; right: .8rem; top: calc(var(--top-h, 65px) + var(--rim2-bar-h, 38px) + 4px); width: min(24rem, calc(100vw - 1.6rem)); max-height: calc(100vh - var(--top-h, 65px) - var(--rim2-bar-h, 38px) - 14px); overflow: auto;
  padding: .8rem .9rem; background: var(--rd-surface); color: var(--rd-ink); border: 2px solid var(--rd-line); border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .35); font-size: .9375rem; letter-spacing: 0; word-spacing: 0; line-height: 1.4; }
.rd-panel[hidden] { display: none; }
.rd-row { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .6rem; }
.rd-name { flex: 1 0 100%; font-weight: 700; }
.rd-opt { padding: .3rem .6rem; font: inherit; font-weight: 600; color: var(--rd-ink); background: var(--rd-surface); border: 2px solid var(--rd-line); border-radius: 6px; cursor: pointer; }
.rd-opt[aria-pressed="true"] { background: var(--rd-link); color: var(--rd-bg); border-color: var(--rd-link); }
.rd-opt[aria-pressed="true"]::before { content: "\2713\00a0"; }   /* the state is a tick too, not colour alone */
.rd-reset { margin-top: .2rem; }
@media (max-width: 700px) { .rim2-bar { flex-wrap: wrap; } }

/* V33u: terminal and editor text row in Reading options */
.rd-tval { min-width: 4.2rem; text-align: center; font-weight: 700; }
.rd-termprev { display: block; margin: .4rem 0 .2rem; padding: .4rem .6rem; background: #1e1e1e; color: #f2f2f2; border-radius: 6px; font-family: var(--rd-mono); font-size: var(--rim-term-px, 16px); line-height: 1.5; overflow-x: auto; white-space: pre; }

/* V33u (Kavya, P1/P2): the lab choice cards and quiet buttons follow the theme; they were pale text on a pale card in Dark */
.sb-labbtn { background: var(--rd-surface); color: var(--rd-ink); border-color: var(--rd-line); }
.sb-labbtn b { font-size: 1rem; }
.sb-labbtn span { color: var(--rd-ink2); font-size: var(--rd-fs-small); }
.sb-labbtn[aria-pressed="true"] { background: var(--rd-info); border-color: var(--rd-info-ink); }
main.v3 .btn.quiet, main.v3 .v3-copy { background: var(--rd-surface); color: var(--rd-ink); border-color: var(--rd-line); }
/* V39 (Ananya, Prof. Rao; open item V33u): the site's header follows Dark / High contrast on course pages (it stayed white). Course pages only. */
html[data-rd-theme="dark"] .top, html[data-rd-theme="contrast"] .top { background: var(--rd-surface); border-bottom-color: var(--rd-rule); }
html[data-rd-theme="dark"] .top .brand, html[data-rd-theme="contrast"] .top .brand,
html[data-rd-theme="dark"] #nav > ul > li > a, html[data-rd-theme="contrast"] #nav > ul > li > a,
html[data-rd-theme="dark"] #who .login, html[data-rd-theme="contrast"] #who .login,
html[data-rd-theme="dark"] .acct-btn, html[data-rd-theme="contrast"] .acct-btn,
html[data-rd-theme="dark"] .search button, html[data-rd-theme="contrast"] .search button,
html[data-rd-theme="dark"] .burger, html[data-rd-theme="contrast"] .burger { color: var(--rd-ink); }
html[data-rd-theme="dark"] .top .brand small, html[data-rd-theme="contrast"] .top .brand small { color: var(--rd-ink2); }
html[data-rd-theme="dark"] #nav > ul > li > a[aria-current="page"]::after, html[data-rd-theme="contrast"] #nav > ul > li > a[aria-current="page"]::after { background: var(--rd-link); }
html[data-rd-theme="dark"] .search, html[data-rd-theme="contrast"] .search { background: var(--rd-bg); border-color: var(--rd-line); }
html[data-rd-theme="dark"] .search input, html[data-rd-theme="contrast"] .search input { color: var(--rd-ink); }
html[data-rd-theme="dark"] .acct-menu, html[data-rd-theme="contrast"] .acct-menu { background: var(--rd-surface); border-color: var(--rd-rule); }
html[data-rd-theme="dark"] .acct-menu a, html[data-rd-theme="dark"] .acct-menu button, html[data-rd-theme="dark"] .acct-menu p b,
html[data-rd-theme="contrast"] .acct-menu a, html[data-rd-theme="contrast"] .acct-menu button, html[data-rd-theme="contrast"] .acct-menu p b { color: var(--rd-ink); }
