:root {
  --bg: #f4f3ee;
  --fg: #202d30;
  --muted: #617075;
  --paper: #fffefa;
  --line: #d4dbd6;
  --orange: #b94c26;
  --blue: #226b70;
  --wash: #e8eeea;
  --grid: #dfe5df;
  --fs: 18px;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
  font-size: var(--fs);
}
* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    1rem/1.85 Inter,
    "Noto Sans KR",
    system-ui,
    -apple-system,
    sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.dark {
  --bg: #101d23;
  --fg: #e7eeea;
  --muted: #a8bdbc;
  --paper: #17292f;
  --line: #35494d;
  --orange: #f5a577;
  --blue: #80c7c0;
  --wash: #20393e;
  --grid: #294046;
  color-scheme: dark;
}
body.large {
  --fs: 24px;
  font-size: 24px;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button,
select,
input,
textarea {
  font: inherit;
  max-width: 100%;
}
button,
select {
  cursor: pointer;
}
button {
  color: var(--fg);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 14px;
  line-height: 1.45;
  min-height: 40px;
}
button:hover {
  border-color: var(--blue);
  background: var(--wash);
}
button[aria-pressed="true"] {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--wash);
}
a:hover {
  color: var(--orange);
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
input,
select,
textarea {
  color: var(--fg);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  min-width: 0;
}
input[type="range"] {
  accent-color: var(--blue);
  padding: 0;
  width: 100%;
}
input[type="checkbox"] {
  accent-color: var(--blue);
}
[hidden] {
  display: none !important;
}
p {
  margin: 0 0 22px;
}
h1,
h2,
h3,
h4 {
  line-height: 1.25;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(42px, 4.7vw, 72px);
  font-weight: 550;
  margin: 16px 0 22px;
}
h2 {
  font-size: 1.65rem;
  font-weight: 570;
}
h3 {
  font-size: 1.12rem;
  font-weight: 650;
}
h4 {
  font-size: 1rem;
}
svg {
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--wash);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  font-weight: 600;
}
td:first-child {
  font-variant-numeric: tabular-nums;
}
.table-scroll {
  width: 100%;
  overflow: auto;
}
.skip {
  position: fixed;
  left: 16px;
  top: -100px;
  padding: 12px 20px;
  background: var(--paper);
  z-index: 200;
}
.skip:focus {
  top: 12px;
}
.top {
  max-width: 1400px;
  margin: auto;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-trail {
  font: 11px/1.5 var(--mono);
  letter-spacing: 0.12em;
  text-decoration: none;
  display: flex;
  gap: 14px;
  align-items: center;
}
.brand-trail b {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.brand-trail span {
  color: var(--muted);
}
.tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tools button {
  font-size: 12px;
  padding: 7px 11px;
  min-height: 34px;
}
.top-links {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-left: auto;
}
.top-links a {
  font-size: 12px;
  text-decoration: none;
}
.top-links a.active {
  color: var(--orange);
}
main {
  max-width: 1400px;
  padding: 0 32px;
  margin: auto;
}
.eyebrow,
.kicker,
.meta,
.fig-label,
.mono,
.number {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.eyebrow,
.kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.hero {
  padding: 65px 0 42px;
}
.home-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 70px;
  align-items: end;
}
.home-head h1 {
  font-size: clamp(54px, 6.3vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.065em;
  margin-bottom: 0;
}
.title-dot {
  color: var(--orange);
}
.hero .sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 620px;
}
.home-head .sub {
  padding-bottom: 4px;
  margin: 0;
}
.home-meta {
  display: flex;
  gap: 28px;
  align-items: center;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  margin: 0 0 28px;
  font: 11px var(--mono);
  color: var(--muted);
  letter-spacing: 0.05em;
  flex-wrap: wrap;
}
.home-meta .meta-end {
  margin-left: auto;
  color: var(--blue);
}
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 40px;
}
.topic-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  overflow: hidden;
  border-radius: 6px;
  transition:
    border-color 0.18s,
    transform 0.18s;
}
.topic-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  color: var(--fg);
}
.card-top {
  padding: 20px 26px 0;
  display: flex;
  justify-content: space-between;
  font: 11px var(--mono);
  color: var(--muted);
}
.card-top b {
  color: var(--blue);
  font-weight: 500;
}
.card-art {
  margin: 14px 26px 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.card-art svg {
  display: block;
  width: 100%;
  height: 210px;
}
.card-body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h2 {
  font-size: 1.65rem;
  max-width: 420px;
  margin: 0 0 8px;
  font-weight: 560;
}
.card-body .card-sub {
  font-size: 0.75rem;
  color: var(--blue);
  margin-bottom: 14px;
}
.card-body p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.card-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 18px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 0.6rem;
  color: var(--muted);
}
.card-tabs span {
  display: flex;
  gap: 7px;
}
.card-tabs i {
  font: 10px/1.9 var(--mono);
  font-style: normal;
  color: var(--orange);
}
.lab-card {
  background: #1b3339;
  color: #f1f4ed;
  --paper: #1b3339;
  --fg: #f1f4ed;
  --line: #426067;
  --muted: #b1c7c8;
  --blue: #8ed0c8;
  --orange: #f5ac7f;
  --wash: #263f44;
  --grid: #324c50;
}
.lab-card:hover {
  color: #fff;
}
.card-question {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--fg) !important;
}
.card-action {
  font: 12px var(--mono);
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: flex;
  justify-content: space-between;
  color: var(--blue);
}
.topic-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 55px;
  padding: 44px 0 32px;
}
.topic-head h1 {
  font-size: clamp(38px, 4vw, 62px);
  max-width: 900px;
}
.topic-head .sub {
  margin-bottom: 14px;
}
.topic-head-art {
  align-self: center;
  border-left: 1px solid var(--line);
  padding-left: 25px;
}
.topic-head-art svg {
  width: 100%;
  height: 190px;
}
.topic-head .topic-meta {
  font: 11px var(--mono);
  color: var(--muted);
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.topic-crumb {
  font: 11px var(--mono);
  color: var(--muted);
  text-decoration: none;
}
.tabs {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: thin;
  border-block: 1px solid var(--line);
  background: var(--bg);
  margin: 0 0 34px;
  padding: 0 1px;
}
.tabs a {
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 17px 0 15px;
  text-decoration: none;
  font-size: 0.74rem;
  border-bottom: 3px solid transparent;
}
.tabs a span {
  font: 10px var(--mono);
  color: var(--muted);
}
.tabs a[aria-selected="true"] {
  color: var(--fg);
  font-weight: 680;
  border-color: var(--orange);
}
.topic-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 40px;
}
.reading-rail {
  position: sticky;
  top: 100px;
  align-self: start;
  min-width: 0;
  font-size: 0.69rem;
}
.rail-label {
  font: 10px var(--mono);
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.rail-number {
  font: 48px/1 var(--mono);
  color: var(--line);
  margin-bottom: 22px;
  display: block;
}
.rail-title {
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 24px;
}
.reading-rail nav {
  display: grid;
  gap: 13px;
}
.reading-rail nav a {
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.reading-rail nav a:hover {
  color: var(--orange);
}
.rail-lab {
  display: block;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--blue);
}
.topic-article {
  min-width: 0;
}
.panel {
  padding-bottom: 25px;
  min-width: 0;
}
.reading {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 45px 0 23px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 95px;
  font-size: 0.9rem;
  letter-spacing: 0;
  font-weight: 600;
}
.section-heading small {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: auto;
}
.section-heading .section-no {
  font: 10px var(--mono);
  color: var(--orange);
}
.section-heading .anchor {
  font: 12px var(--mono);
  text-decoration: none;
  padding: 3px 7px;
  opacity: 0.6;
}
.panel .section-heading:first-child {
  margin-top: 4px;
}
.tab-title {
  font-size: 1.9rem;
  margin: 12px 0 21px;
  line-height: 1.25;
  letter-spacing: -0.04em;
}
.overview-copy {
  font-size: 1.03rem;
  line-height: 1.9;
}
.question-line {
  border-left: 3px solid var(--orange);
  padding: 14px 20px;
  background: var(--paper);
  margin: 27px 0;
  font-size: 0.85rem;
  line-height: 1.8;
}
.question-line span {
  display: block;
  font: 10px var(--mono);
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 5px;
}
.concept-block {
  margin: 30px 0;
}
.concept-block h3 {
  margin: 0 0 15px;
  font-weight: 650;
}
.concept-block h3 .number {
  color: var(--orange);
  font-size: 11px;
  margin-right: 10px;
}
.concept-block p {
  font-size: 1rem;
  line-height: 1.95;
}
.theory-figure {
  margin: 27px 0 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 18px 24px;
  border-radius: 4px;
}
.theory-figure svg {
  display: block;
  width: 100%;
  height: 240px;
}
.theory-figure figcaption {
  font-size: 0.66rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.fig-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--blue);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.formula {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  background: var(--wash);
  padding: 20px;
  margin: 30px 0;
  overflow: auto;
  font-size: 0.96rem;
}
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3px 0;
}
.evidence {
  border-top: 2px solid var(--blue);
  background: var(--paper);
  padding: 22px 25px;
  margin: 26px 0;
}
.evidence .label,
.case-study .label,
.counterexample .label {
  font: 10px var(--mono);
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 10px;
}
.evidence h3,
.case-study h3 {
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0 0 12px;
}
.evidence p,
.case-study p,
.counterexample p {
  font-size: 0.85rem;
  line-height: 1.9;
  margin: 0;
}
.counterexample {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  margin: 25px 0;
}
.counterexample .label {
  color: var(--orange);
}
.case-study {
  padding: 24px;
  background: var(--wash);
  margin-top: 25px;
}
.hands-intro {
  max-width: 760px;
  margin: 0 auto 24px;
  font-size: 0.85rem;
  color: var(--muted);
}
.live-indicator {
  font: 10px var(--mono);
  color: var(--blue);
  letter-spacing: 0.05em;
}
.live-indicator:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  margin: 0 6px 2px 0;
}
.summary-list {
  list-style: none;
  padding: 0;
  counter-reset: item;
}
.summary-list li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.summary-list li:before {
  content: "0" counter(item);
  font: 11px/2 var(--mono);
  color: var(--blue);
}
.notation td:first-child {
  font-family: var(--mono);
  color: var(--blue);
}
.refs {
  padding-left: 22px;
  font-size: 0.75rem;
  line-height: 1.9;
}
.refs li {
  padding-left: 8px;
  margin: 15px 0;
}
.refs a {
  overflow-wrap: anywhere;
}
.next-topic {
  margin: 40px 0 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.76rem;
}
.next-topic a {
  text-decoration: none;
  color: var(--blue);
}
.research-note {
  border: 1px solid var(--line);
  background: var(--paper);
  margin-top: 28px;
  padding: 25px;
  border-radius: 5px;
}
.research-note summary {
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}
.research-note summary:after {
  content: "+";
  font-size: 22px;
  color: var(--orange);
}
.research-note[open] summary:after {
  content: "−";
}
.note-intro {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 15px 0;
}
.note-fields {
  display: grid;
  gap: 18px;
}
.note-fields label {
  font-size: 0.75rem;
  display: grid;
  gap: 8px;
}
.note-fields textarea {
  width: 100%;
  min-height: 85px;
  font-size: 0.8rem;
  resize: vertical;
  padding: 12px;
  line-height: 1.7;
}
.note-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.note-actions button {
  font-size: 12px;
}
.notice {
  font-size: 0.7rem;
  color: var(--muted);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-top: 45px;
  max-width: 950px;
}
.notice p {
  margin: 5px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  margin: 30px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.brand img {
  height: 20px;
  width: auto;
  display: block;
}
.brand .wm-dark {
  display: none;
}
body.dark .brand .wm-light {
  display: none;
}
body.dark .brand .wm-dark {
  display: block;
}
.version {
  margin-left: auto;
  font: 10px var(--mono);
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  background: var(--fg);
  color: var(--bg);
  padding: 12px 20px;
  font-size: 0.75rem;
  border-radius: 4px;
  z-index: 100;
  box-shadow: 0 8px 30px #0002;
}
.copy-dialog {
  width: min(700px, 92vw);
  background: var(--paper);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 24px;
}
.copy-dialog textarea {
  width: 100%;
  height: 130px;
  font-size: 13px;
  margin-bottom: 12px;
}
.copy-dialog::backdrop {
  background: #0008;
}
.how-page {
  max-width: 850px;
  margin: 40px auto;
}
.how-page h1 {
  font-size: 2.5rem;
}
.how-page h2 {
  font-size: 1.15rem;
  margin-top: 38px;
}
.how-page ul {
  font-size: 0.85rem;
  line-height: 1.9;
}
.how-page li {
  margin-bottom: 12px;
}
.lab-head {
  padding: 35px 0 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 30px;
}
.lab-head h1 {
  font-size: clamp(40px, 4vw, 60px);
  margin: 8px 0 0;
}
.lab-head .sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 4px;
  max-width: 600px;
}
.lab-head .kicker {
  font-size: 10px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
body.large .reading {
  max-width: 860px;
}
body.large .card-body p,
body.large .card-sub,
body.large .concept-block p,
body.large .evidence p,
body.large .case-study p,
body.large .counterexample p {
  font-size: 1em;
}
body.large .overview-copy {
  font-size: 1.08em;
}
body.large .card-body h2 {
  font-size: 1.6em;
}
body.large .theory-figure svg text,
body.large .card-art svg text {
  font-size: 15px;
}
@media (min-width: 1600px) {
  .top,
  main {
    max-width: 1460px;
  }
  .topic-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 55px;
  }
  .hero {
    padding-top: 78px;
  }
  .home-head h1 {
    font-size: 96px;
  }
  .card-art svg {
    height: 230px;
  }
}
@media (max-width: 1100px) {
  .top-links {
    display: none;
  }
  .topic-layout {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 25px;
  }
  .topic-head {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 25px;
  }
  .reading-rail {
    font-size: 0.62rem;
  }
  .home-head {
    gap: 35px;
  }
  .card-body h2 {
    font-size: 1.4rem;
  }
  .card-tabs {
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 19px;
  }
  .tabs a {
    font-size: 0.67rem;
  }
}
@media (max-width: 800px) {
  .top,
  main {
    padding-left: 22px;
    padding-right: 22px;
  }
  .topic-layout {
    display: block;
  }
  .reading-rail {
    display: none;
  }
  .home-head {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .hero {
    padding: 45px 0 30px;
  }
  .home-head .sub {
    max-width: 600px;
  }
  .home-head h1 {
    font-size: 68px;
  }
  .home-meta {
    gap: 18px;
    font-size: 10px;
  }
  .home-meta .meta-end {
    margin-left: 0;
  }
  .topic-head {
    grid-template-columns: 1fr 170px;
    gap: 20px;
  }
  .topic-head-art {
    padding-left: 15px;
  }
  .topic-head h1 {
    font-size: 40px;
  }
  .topic-head-art svg {
    height: 155px;
  }
  .lab-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .card-body {
    padding: 20px;
  }
  .card-top {
    padding: 18px 20px 0;
  }
  .card-art {
    margin: 12px 20px 0;
  }
  .card-art svg {
    height: 175px;
  }
  .card-body h2 {
    font-size: 1.35rem;
  }
  .cards {
    gap: 18px;
  }
  .brand-trail span:last-child {
    display: none;
  }
  .section-heading {
    margin-top: 32px;
  }
  .top {
    gap: 14px;
  }
  .brand {
    gap: 12px;
  }
}
@media (max-width: 540px) {
  body {
    font-size: 17px;
  }
  .top,
  main {
    padding-left: 18px;
    padding-right: 18px;
  }
  .top {
    padding-top: 15px;
    padding-bottom: 15px;
    align-items: start;
  }
  .brand-trail {
    font-size: 9px;
    gap: 7px;
    flex-wrap: wrap;
    max-width: 135px;
    padding-top: 4px;
  }
  .brand-trail b {
    font-size: 11px;
  }
  .tools {
    gap: 5px;
    max-width: 170px;
  }
  .tools button {
    font-size: 11px;
    padding: 6px 8px;
    min-height: 32px;
  }
  .home-head h1 {
    font-size: 57px;
  }
  .hero {
    padding-top: 38px;
  }
  .home-meta {
    gap: 11px 17px;
    line-height: 1.6;
  }
  .cards {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .card-art svg {
    height: 195px;
  }
  .card-body {
    padding: 22px;
  }
  .card-body h2 {
    font-size: 1.65rem;
  }
  .card-body p {
    font-size: 0.82rem;
  }
  .card-tabs {
    grid-template-columns: 1fr 1fr;
    font-size: 0.6rem;
  }
  .topic-head {
    grid-template-columns: 1fr;
    padding-top: 30px;
    padding-bottom: 24px;
  }
  .topic-head h1 {
    font-size: 37px;
  }
  .topic-head-art {
    display: none;
  }
  .topic-head .sub {
    font-size: 0.85rem;
  }
  .topic-meta {
    font-size: 10px !important;
    gap: 12px !important;
  }
  .tabs {
    margin-bottom: 25px;
    gap: 20px;
  }
  .tabs a {
    font-size: 0.7rem;
  }
  .tab-title {
    font-size: 1.65rem;
  }
  .section-heading {
    font-size: 0.82rem;
    gap: 10px;
  }
  .section-heading small {
    font-size: 0.55rem;
  }
  .overview-copy {
    font-size: 1rem;
  }
  .concept-block p {
    font-size: 1rem;
    line-height: 1.9;
  }
  .evidence,
  .case-study,
  .counterexample {
    padding: 20px;
  }
  .theory-figure {
    padding: 12px 14px;
  }
  .theory-figure svg {
    height: 180px;
  }
  .theory-figure figcaption {
    font-size: 0.65rem;
  }
  .research-note {
    padding: 20px;
  }
  .note-fields textarea {
    font-size: 16px;
  }
  .formula {
    padding: 12px;
    font-size: 0.82rem;
  }
  .notice {
    font-size: 0.68rem;
  }
  .brand {
    gap: 12px;
    font-size: 11px;
  }
  .version {
    width: 100%;
    margin-left: 0;
  }
  .notation {
    font-size: 0.74rem;
  }
  .notation th,
  .notation td {
    padding: 10px 8px;
  }
  .how-page h1 {
    font-size: 2rem;
  }
  .lab-head {
    padding: 29px 0 23px;
  }
  .lab-head h1 {
    font-size: 44px;
  }
  .lab-head .sub {
    font-size: 0.8rem;
  }
  .fig-label {
    font-size: 9px;
  }
  .next-topic {
    font-size: 0.7rem;
  }
  .summary-list {
    font-size: 0.85rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  body,
  body.dark {
    --bg: #fff;
    --fg: #111;
    --muted: #444;
    --paper: #fff;
    --line: #bbb;
    --wash: #f0f4f2;
    --blue: #276368;
    --orange: #9c4024;
    font-size: 11pt !important;
    line-height: 1.65;
  }
  .top,
  .tabs,
  .reading-rail,
  .skip,
  .anchor,
  .note-actions,
  .next-topic,
  .toast {
    display: none !important;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .topic-head {
    padding: 0 0 20px;
  }
  .topic-head h1 {
    font-size: 32pt;
  }
  .topic-head-art {
    display: none;
  }
  .topic-layout {
    display: block;
  }
  .panel,
  .panel[hidden] {
    display: block !important;
    break-before: page;
  }
  .panel:first-child {
    break-before: auto;
  }
  .reading {
    max-width: none;
  }
  .concept-block p {
    font-size: 11pt;
  }
  .section-heading {
    margin-top: 25px;
    break-after: avoid;
  }
  .theory-figure {
    break-inside: avoid;
  }
  .theory-figure svg {
    height: 190px;
  }
  .evidence,
  .case-study,
  .counterexample {
    break-inside: avoid;
    padding: 15px;
  }
  .formula {
    break-inside: avoid;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .topic-card {
    break-inside: avoid;
    box-shadow: none;
  }
  .card-art svg {
    height: 140px;
  }
  .card-body h2 {
    font-size: 18pt;
  }
  .research-note {
    break-inside: avoid;
  }
  .research-note > * {
    display: block !important;
  }
  .note-fields textarea {
    min-height: 50px;
    border: 0;
    background: none;
  }
  .notice {
    margin-top: 20px;
  }
  .brand {
    padding-bottom: 10px;
  }
  .wm-dark {
    display: none !important;
  }
  .wm-light {
    display: block !important;
  }
  .sx-actions,
  .sl-toolbar button {
    display: none !important;
  }
  .home-head h1 {
    font-size: 50pt;
  }
}

html:has(body.large) {
  font-size: 24px;
}
@media print {
  html:has(body.large) {
    font-size: 18px;
  }
}

.live-indicator {
  white-space: nowrap;
}
