@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  color-scheme: light;
  --navy: #12374d;
  --ink: #203744;
  --sub: #476273;
  --teal: #236d80;
  --line: #cedce4;
  --tint: #eff5f8;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.58;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: white; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: #155269; }
a:focus-visible { outline: 3px solid #408aba; outline-offset: 4px; }
header { border-bottom: 1px solid var(--line); }
header > div, main, footer { width: min(1160px, 92%); margin: auto; }
header > div { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
header span { color: var(--sub); font-size: .84rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--navy); font-weight: 760; text-decoration: none; }
.brand img { width: 35px; height: 35px; }
.skip { position: absolute; background: white; left: -150%; padding: 10px; z-index: 2; }
.skip:focus { left: 10px; top: 10px; }
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 5%; margin: 32px 0 40px; padding: clamp(22px, 4vw, 56px); background: var(--navy); color: white; border-radius: 14px; }
.hero > img { width: 100%; display: block; }
.hero > div > p:not(.overline) { color: #d8e8ee; max-width: 52ch; }
.hero .overline { color: #a9cfd8; }
.overline { letter-spacing: .13em; font-size: .73rem; font-weight: 680; color: var(--teal); text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3 { color: var(--navy); letter-spacing: -.035em; line-height: 1.12; }
h1 { margin: 0; color: white; font-size: clamp(2.55rem, 5.5vw, 4.4rem); font-weight: 680; }
.pdf { display: inline-block; margin-top: 5px; padding: 9px 15px; border-radius: 6px; background: #d6eef2; color: #153a50; font-weight: 680; text-decoration: none; }
.layout { display: grid; grid-template-columns: minmax(195px, 235px) minmax(0, 1fr); gap: clamp(25px, 4.3vw, 66px); }
nav { align-self: start; position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow: auto; border-top: 2px solid var(--navy); padding: 12px 4px 10px 0; }
nav h2 { margin: 0 0 9px; font-size: 1.1rem; }
nav a { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; text-decoration: none; font-size: .84rem; line-height: 1.3; color: var(--ink); }
nav a:hover { text-decoration: underline; }
nav a small { color: var(--teal); font-size: .72rem; font-variant-numeric: tabular-nums; font-weight: 700; }
nav a:last-child { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 13px; font-weight: 650; }
.chapters { min-width: 0; }
article { margin: 0 0 36px; padding: 0 0 38px; border-bottom: 1px solid var(--line); }
article h2 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); margin: .16em 0 .24em; }
article h3 { font-size: 1.34rem; margin: 1.2em 0 .45em; }
.lead { color: var(--sub); font-size: 1.14rem; line-height: 1.47; }
p { margin: 0 0 .85em; }
.steps { counter-reset: manual-step; list-style: none; padding: 0; margin: 1.1em 0; }
.steps li { counter-increment: manual-step; position: relative; padding-left: 3rem; margin: .72rem 0; }
.steps li::before { content: counter(manual-step, decimal-leading-zero); position: absolute; left: 0; top: .06rem; width: 2.05rem; border-radius: 4px; text-align: center; font-weight: 650; font-size: .84em; line-height: 1.85; font-variant-numeric: tabular-nums; background: #e7f1f5; color: var(--teal); }
.scroll { overflow-x: auto; margin: 1em 0; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .94rem; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 12px; vertical-align: top; }
thead { background: #e6eff4; color: var(--navy); }
tbody tr:nth-child(even) { background: #f5f8fa; }
figure { margin: 1.2rem 0; }
figure img { display: block; object-fit: contain; width: 100%; height: auto; }
.fig-real img { max-height: 425px; }
.fig-display img { max-height: 335px; }
.fig-wave img { max-height: 215px; }
figcaption { margin-top: 7px; font-size: .88rem; color: var(--sub); }
.note { background: #eaf4f5; padding: 13px 17px 12px; border-left: 4px solid #388091; margin: 1.2em 0; }
.note b { color: var(--navy); }
.note p { margin: .22em 0 0; }
.launch { font-weight: 680; }
.resources { margin: 0 0 46px; }
.resources h2 { font-size: 1.6rem; }
.resources a { display: inline-block; margin: 0 15px 9px 0; }
footer { border-top: 1px solid var(--line); padding: 18px 0 30px; color: var(--sub); font-size: .83rem; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 14px; }
  .hero > img { display: none; }
  .layout { display: block; }
  nav { position: static; max-height: none; margin-bottom: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  nav h2, nav a:last-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  :root { font-size: 16px; }
  header span { font-size: .73rem; }
  th, td { padding: 6px; }
}
@media print {
  @page { size: A4; margin: 15mm; }
  header, nav, footer, .skip, .pdf, .resources { display: none; }
  :root { font-size: 10.5pt; }
  main { width: 100%; }
  .layout { display: block; }
  .hero { display: block; color: var(--ink); background: white; margin: 0; padding: 0; }
  .hero h1, .hero .overline, .hero > div > p:not(.overline) { color: var(--navy); }
  .hero > img { display: none; }
  article { break-before: page; margin: 0; padding: 0; border: 0; }
  article h2 { font-size: 23pt; }
  .steps li, figure, .note, tr { break-inside: avoid; }
  .fig-real img { max-height: 70mm; }
  .fig-display img { max-height: 58mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.lab-start { display: inline-block; padding: 8px 0; margin-left: 10px; color: #deedf3; font-weight: 620; }
.lab-start:hover { color: white; }
nav .navgroup { display: block; color: var(--teal); margin: 14px 0 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; }
.file-box, .experiment-code, .snippet { display: grid; gap: 4px; margin: 1rem 0; padding: 12px 16px; background: var(--tint); border-left: 3px solid #438ba9; border-radius: 0 5px 5px 0; overflow: auto; }
.file-box code, .experiment-code small { color: var(--teal); font-weight: 700; }
.file-box span { color: var(--sub); }
.experiment-code small { margin: 4px 0 0; }
.experiment-code code, .snippet pre { font-family: ui-monospace, monospace; font-size: .86rem; line-height: 1.44; }
.snippet pre { margin: .2rem 0; }
.launch { display: inline-block; margin: .2rem 1rem .2rem 0; }
.fig-talltrace img, .fig-scope img, .fig-trace img, .fig-cycle img { max-height: 560px; }
nav { scrollbar-width: thin; }
@media (max-width:760px) {
  nav .navgroup { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 9px; }
}
