.study-page {
  font-family: Tahoma, Arial, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.95;
}
.study-page::before {
  display: none;
}
.study-page .site-header,
.study-page .site-footer {
  font-family: var(--mono);
}
.study-page .shell {
  max-width: 1240px;
}
.study-page h1,
.study-page h2,
.study-page h3 {
  font-family: inherit;
  letter-spacing: 0;
}
.study-page h1 {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 14px 0 22px;
}
.study-page h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  line-height: 1.55;
  margin: 0 0 24px;
}
.study-page h3 {
  font-size: 1.15rem;
  line-height: 1.7;
  margin: 26px 0 10px;
}
.study-page p {
  margin: 0 0 22px;
}
.study-page li {
  margin-bottom: 12px;
}
.study-page a:focus-visible,
.study-page button:focus-visible,
.study-page select:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}
.article-hero {
  padding: 26px 0 36px;
  border-bottom: 1px solid var(--line);
}
.article-hero .terminal-path {
  font: 0.875rem/1.7 var(--mono);
  color: var(--dim);
  margin-bottom: 30px;
  overflow-wrap: anywhere;
  text-align: left;
}
.study-page .kicker {
  color: var(--violet);
  font-size: 0.875rem;
  letter-spacing: 0;
  margin: 0 0 10px;
}
.headline-en {
  display: block;
  color: var(--violet);
  font: 400 clamp(1.75rem, 4.8vw, 3.25rem) / 1.5 var(--mono);
  margin-top: 8px;
  text-align: right;
}
.article-hero .deck {
  font-size: 1.15rem;
  max-width: 780px;
  color: #d0c7c0;
  line-height: 1.95;
}
.class-notes {
  border-right: 3px solid var(--amber);
  background: #1a1613;
  padding: 22px 24px;
  margin: 32px 0;
}
.study-page .class-notes h2 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}
.study-page .class-notes ul {
  margin: 14px 0 0;
  padding-right: 22px;
}
.study-page .source-hint,
.study-page .source-line {
  font-size: 0.875rem;
  color: var(--dim);
  line-height: 1.9;
  margin: 12px 0 0;
}
.source-line a,
#sources a {
  color: #ffd0ae;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.article-body {
  max-width: 820px;
  margin: 0 auto;
}
.article-body > section {
  padding: 58px 0 48px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.eq {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--mono);
  font-size: 0.98em;
  letter-spacing: 0;
}
.equation {
  display: block;
  text-align: left;
  padding: 18px 20px;
  margin: 22px 0;
  background: #191410;
  border-right: 2px solid #84634b;
  font: 1rem/2 var(--mono);
  overflow-x: auto;
  unicode-bidi: isolate;
}
.hero-equation {
  text-align: center;
  padding: 30px 0;
  color: #ffdfc8;
  font-size: 2rem;
}
.definition-pair {
  display: grid;
  gap: 16px;
  margin: 26px 0;
}
.definition-pair > div {
  padding: 22px;
  border: 1px solid var(--line);
  background: #14100e;
}
.definition-pair h3 {
  margin: 0 0 10px;
}
.definition-pair p:last-child {
  margin-bottom: 0;
}
.definition-pair > div:nth-child(2) .kicker {
  color: #90d9b0;
}
.english-line {
  font: 0.875rem/1.8 var(--mono);
  color: var(--dim);
  text-align: left;
}
.term {
  border: 0;
  border-bottom: 1px dashed #d3a483;
  padding: 0 2px;
  background: transparent;
  color: #ffd1b0;
  font: inherit;
  line-height: inherit;
  touch-action: manipulation;
}
.callout {
  padding: 20px;
  border: 1px solid #58463a;
  background: #1f1711;
  margin: 28px 0;
}
.callout strong {
  color: #ffd6b9;
}
.table-wrap {
  overflow-x: auto;
  margin: 28px 0;
}
.study-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.9;
}
.study-page caption {
  text-align: right;
  padding-bottom: 14px;
  color: var(--dim);
  font-size: 0.875rem;
}
.study-page th,
.study-page td {
  padding: 15px 12px;
  text-align: right;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.study-page th {
  background: #1d1712;
  color: #ebd3c2;
  font-weight: 600;
}
.study-page td.eq {
  display: table-cell;
  text-align: left;
  white-space: nowrap;
}
.study-page td[lang="en"] {
  direction: ltr;
  text-align: left;
}
.lab {
  padding: 22px;
  margin: 32px 0 16px;
  background: #15100d;
  border: 1px solid #4f3e32;
  min-width: 0;
}
.lab-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.lab-heading > span {
  color: var(--violet);
  font-size: 0.875rem;
}
.lab .lab-heading h3 {
  margin: 3px 0 0;
  font-size: 1.25rem;
}
.lab label {
  display: block;
  font-size: 0.9375rem;
}
.lab input[type="range"] {
  display: block;
  width: 100%;
  min-height: 44px;
  accent-color: var(--violet);
  cursor: pointer;
}
.lab input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--violet);
}
.lab select {
  width: 100%;
  min-height: 48px;
  background: #211914;
  color: var(--text);
  border: 1px solid #746051;
  border-radius: 0;
  padding: 10px;
  font-size: 1rem;
  font-family: var(--mono);
}
.lab select {
  appearance: none;
  padding-right: 35px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23c794ff' stroke-width='2'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
}
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.lab .check-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.lab svg {
  display: block;
  width: 100%;
  height: auto;
  direction: ltr;
  margin: 15px 0;
  overflow: visible;
}
.plot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 0.875rem;
  margin-top: 20px;
}
.domain-key {
  color: #ff9a52;
}
.range-key {
  color: #90d9b0;
}
.graph-controls {
  display: grid;
  gap: 15px;
  align-items: end;
}
.machine-output {
  display: block;
  margin: 20px 0;
  font-size: 1rem;
  line-height: 1.8;
  min-height: 58px;
}
.machine-output[data-valid="false"] {
  color: var(--amber);
}
.sets-output {
  text-align: left;
  font: 0.9375rem/2 var(--mono);
  overflow-wrap: anywhere;
}
.dialog-head button {
  min-height: 44px;
  padding: 9px 14px;
  color: #ead2c1;
  border: 1px solid #6e5746;
  background: #1d1712;
  font-family: inherit;
  font-size: 0.9375rem;
}
.quiz-question {
  border: 0;
  padding: 26px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.quiz-question legend {
  padding: 0;
  font-weight: 600;
  font-size: 1.05rem;
}
.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.quiz-options button {
  text-align: right;
  padding: 14px;
  min-height: 50px;
  background: #191410;
  border: 1px solid #57463a;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.8;
  touch-action: manipulation;
}
.quiz-options button[data-result="wrong"] {
  border-color: #dfad87;
  background: #291d18;
}
.quiz-options button[data-result="correct"] {
  border-color: #90d9b0;
  background: #13261d;
}
.quiz-explanation {
  margin: 16px 0 0 !important;
  font-size: 0.9375rem;
}
.quiz-explanation[data-result="wrong"] {
  color: #e6bd9d;
}
.quiz-explanation[data-result="correct"] {
  color: #90d9b0;
}
.article-end {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 32px 0 50px;
  color: var(--violet);
  font-size: 0.9375rem;
}
#term-dialog,
#media-dialog {
  width: min(540px, calc(100% - 28px));
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  background: #191410;
  color: var(--text);
  border: 1px solid #c1916f;
  padding: 24px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.95;
}
#term-dialog::backdrop,
#media-dialog::backdrop {
  background: #000b;
}
#term-dialog h2 {
  font-size: 1.5rem;
  margin: 14px 0;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.dialog-head p {
  margin: 0 !important;
}
.study-link {
  color: var(--violet);
  text-decoration: underline;
}
@media (min-width: 720px) {
  .definition-pair {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .study-page .shell {
    padding-inline: 18px;
  }
  .study-page .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
  }
  .article-hero {
    padding-top: 12px;
  }
  .article-body > section {
    padding-block: 40px;
  }
  .class-notes,
  .lab {
    padding: 18px 14px;
  }
  .study-page th,
  .study-page td {
    padding: 12px 8px;
  }
  #sources table {
    min-width: 0;
    table-layout: fixed;
  }
  #glossary table {
    min-width: 480px;
  }
  .study-page .equation {
    font-size: 0.9375rem;
    padding: 14px 12px;
  }
  .headline-en {
    font-size: clamp(1.55rem, 7vw, 2.5rem);
  }
  .study-page .site-header {
    margin-bottom: 24px;
  }
}
@media (hover: hover) and (pointer: fine) {
  .term:hover {
    color: #ffecdf;
  }
  .quiz-options button:hover {
    border-color: var(--violet);
  }
}

@media (max-width: 600px) {
  #interval-plot text {
    font-size: 32px;
  }
}
#function-plot text {
  font-size: 16px;
}

[hidden] {
  display: none !important;
}
.study-page .article-location {
  margin: 0 0 16px;
  color: var(--dim);
  font: 0.875rem/1.8 var(--mono);
  overflow-wrap: anywhere;
  text-align: left;
}
.study-page .article-byline {
  margin: 0;
  padding: 0 0 30px;
  text-align: center;
  font: 0.875rem/1.8 var(--mono);
  color: var(--dim);
}
.f-spark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ffddc5;
  text-shadow:
    0 0 8px #ffc194b0,
    0 0 20px #df90577a;
}
.f-spark > span[aria-hidden] {
  font-size: 0.8em;
}
.dialog-head .icon-close,
.reading-head .icon-close {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  font:
    24px/1 system-ui,
    sans-serif;
}
/* A chapter rail with a continuous track, nested links and an active chapter segment. */
.reading-toggle {
  position: fixed;
  inset-inline-start: 16px;
  top: 142px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #6f5645;
  border-radius: 50%;
  background: #18120e;
  color: #fbcfb0;
  opacity: 0.5;
  font:
    0.875rem/1.5 Tahoma,
    Arial,
    sans-serif;
}
.reading-toggle[aria-expanded="true"] {
  visibility: hidden;
}
.reading-toggle svg {
  flex: none;
}
.reading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 7;
  background: #0009;
  border: 0;
}
.reading-index {
  position: fixed;
  z-index: 8;
  inset-inline-start: 0;
  top: 0;
  width: min(320px, calc(100% - 30px));
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 24px;
  background: #0c0a09;
  border-inline-end: 1px solid #3e3128;
}
.reading-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px 10px 0;
}
.study-page .reading-head h2 {
  margin: 0;
  font-size: 1rem;
  color: #e8e1dc;
}
.reading-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
}
.reading-tree {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 2px 0 12px 16px;
}
.reading-tree::-webkit-scrollbar {
  display: none;
  width: 0;
}
.reading-scrollbar {
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  pointer-events: none;
}
.reading-scrollbar span {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: #8b6b54;
}
.reading-group {
  position: relative;
  border-inline-start: 2px solid #2e2824;
  padding-inline-start: 12px;
  margin-bottom: 7px;
}
.reading-group::before {
  content: "";
  position: absolute;
  inset-inline-start: -2px;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: transparent;
}
.reading-group.is-active::before {
  background: var(--violet);
  box-shadow: 0 0 10px #ffc19425;
}
.reading-row {
  display: flex;
  align-items: center;
  gap: 2px;
}
.reading-index a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: #9f958d;
  font-size: 0.875rem;
  line-height: 1.65;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.reading-section {
  flex: 1;
  padding: 7px 0;
  font-weight: 650;
}
.reading-group.is-active > .reading-row .reading-section {
  color: #fbcfb0;
}
.reading-branch {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9f9086;
}
.reading-branch[aria-expanded="true"] svg {
  transform: rotate(-90deg);
}
.study-page .reading-children {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-inline-start: 6px;
}
.study-page .reading-children li {
  margin: 0;
}
.reading-children a {
  gap: 8px;
  padding: 6px 0;
  font-weight: 400;
}
.reading-children a::before {
  content: "";
  display: block;
  width: 5px;
  height: 1px;
  background: #695c53;
  flex: none;
}
.reading-index a[aria-current] {
  color: #ffecdf;
}
.reading-children a[aria-current]::before {
  background: var(--violet);
  width: 8px;
}
.article-drop-link {
  overflow-wrap: anywhere;
  color: #e4c6b1;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body [id],
.article-hero,
#class-notes-title {
  scroll-margin-top: 32px;
}
@media (hover: hover) and (pointer: fine) {
  .reading-index a:hover,
  .reading-branch:hover {
    color: #ffdec6;
  }
}
@media (min-width: 1100px) {
  .lecture.with-reading-index {
    padding-inline-start: 292px;
  }
  .reading-index {
    inset-inline-start: max(28px, calc((100vw - 1144px) / 2));
    top: 112px;
    width: 256px;
    height: calc(100dvh - 144px);
    padding: 0;
    border: 0;
    background: transparent;
  }
  .reading-toggle {
    inset-inline-start: max(28px, calc((100vw - 1144px) / 2));
  }
}

.representation-ways {
  padding-inline-start: 28px;
  margin: 26px 0;
}
.representation-ways > li {
  padding-inline-start: 6px;
  margin: 0 0 30px;
}
.representation-ways > li::marker {
  color: var(--violet);
  font-weight: 700;
}
.representation-ways h3 {
  margin-top: 0;
}
.math-box math {
  font-size: 1.15em;
}
.number-line-example {
  padding: 14px;
  margin: 20px 0;
  background: #191410;
  border-right: 2px solid #84634b;
}
.number-line-example svg {
  width: 100%;
  height: auto;
  display: block;
  direction: ltr;
}
.number-line-example text {
  font: 26px var(--mono);
}
.number-line-example figcaption {
  display: block;
  text-align: left;
}
#interval-reference {
  table-layout: fixed;
  direction: rtl;
  min-width: 0;
}
#interval-reference .interval-column {
  width: 30%;
}
#interval-reference .condition-column {
  width: 34%;
}
#interval-reference .meaning-column {
  width: 36%;
}
#interval-reference th,
#interval-reference td {
  text-align: center;
  vertical-align: middle;
  padding: 15px 8px;
}
#interval-reference .eq {
  display: inline;
  white-space: nowrap;
}
.endpoint-note {
  padding: 18px 20px;
  margin-top: 24px;
  border: 1px solid #4f3f34;
}
.endpoint-note h3 {
  margin: 0 0 10px;
}
.study-page .endpoint-note p {
  margin: 10px 0 0;
}
.endpoint-symbol {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--violet);
  border-radius: 50%;
  vertical-align: middle;
  margin-inline-end: 8px;
}
.endpoint-symbol.closed {
  background: var(--violet);
}
.gate {
  margin: 30px 0;
  padding: 22px 20px;
  border-right: 2px solid #8a654a;
  background: #15110e;
}
.gate-label {
  color: var(--violet);
  font-size: 0.875rem;
}
.gate h3 {
  margin-top: 8px;
}
.gate.source-gate {
  border-color: #6b7c70;
}
.source-gate .gate-label {
  color: #a7c7a3;
}
.method-list {
  padding-inline-start: 26px;
  margin-top: 26px;
}
.method-list > li {
  padding-inline-start: 5px;
  margin: 0 0 32px;
}
.method-list > li::marker {
  color: var(--violet);
  font-weight: 700;
}
.method-list h3,
.method-list h4 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}
@media (max-width: 600px) {
  #interval-reference th,
  #interval-reference td {
    padding: 12px 5px;
    font-size: 0.875rem;
  }
  .gate {
    padding: 18px 14px;
  }
  .method-list,
  .representation-ways {
    padding-inline-start: 22px;
  }
  .number-line-example {
    padding: 10px;
  }
  .number-line-example text {
    font-size: 32px;
  }
}

#sources .pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
#sources .pdf-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
#sources .article-byline {
  margin-top: 28px;
  padding-bottom: 0;
}
#sources td {
  overflow-wrap: anywhere;
}

.study-page .reading-toggle:focus-visible {
  opacity: 1;
}
@media (hover: hover) and (pointer: fine) {
  .study-page .reading-toggle:hover {
    opacity: 1;
  }
}
.study-page #close-term,
.study-page #close-media {
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
}
.study-page.keyboard-navigation #close-term:focus-visible,
.study-page.keyboard-navigation #close-media:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 4px;
}
.equation .katex-display {
  margin: 0;
  text-align: left;
}
.equation .katex-display > .katex {
  text-align: left;
}
.equation .katex {
  font-size: 1.1em;
}
#examples-reference {
  table-layout: fixed;
  direction: rtl;
}
#examples-reference th,
#examples-reference td {
  text-align: center;
  vertical-align: middle;
}
#examples-reference .eq {
  display: inline-block;
  font-size: 0.95em;
  white-space: nowrap;
}
#function-plot {
  overflow: hidden;
}
@media (max-width: 600px) {
  #examples-reference th,
  #examples-reference td {
    padding: 12px 4px;
    font-size: 0.875rem;
  }
  #examples-reference .eq {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 600px) {
  #function-plot text {
    font-size: 24px;
  }
  #examples-reference .eq {
    font-size: 0.9em;
  }
}

.article-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 28px;
}
.article-heading h1 {
  min-width: 0;
}
.lecture-media {
  display: grid;
  gap: 12px;
}
.locked-media {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #4f3e32;
  background: #15110e;
  color: #dfcdc0;
  text-align: right;
  font: inherit;
  cursor: pointer;
}
.media-copy {
  display: grid;
  gap: 1px;
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.media-duration {
  color: #aa9b91;
  font: 0.875rem/1.7 var(--mono);
  text-align: right;
}
.media-symbol {
  width: 23px;
  height: 23px;
  flex: none;
  color: #e0b190;
}
.media-lock {
  width: 15px;
  height: 15px;
  flex: none;
  color: #9f8e82;
}
#media-dialog .dialog-head h2 {
  margin: 0;
  font-size: 1.3rem;
}
#media-dialog #media-message {
  margin: 22px 0;
}
@media (hover: hover) and (pointer: fine) {
  .locked-media:hover {
    border-color: var(--violet);
    background: #201813;
  }
}
@media (max-width: 719px) {
  .article-heading {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .lecture-media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 360px);
    justify-self: end;
    margin: 0 0 24px;
    gap: 10px;
  }
  .locked-media {
    min-height: 70px;
    gap: 8px;
    padding: 10px;
  }
  .media-symbol {
    width: 20px;
    height: 20px;
  }
}

/* Ember identity; scoped to the lecture so other legacy pages are unchanged. */
.study-page{--bg:#0c0a09;--panel:#15100d;--line:#3b2b22;--dim:#b8a69b;--text:#f1e8e1;--violet:#ff9a52;--accent:#ff9a52;background:var(--bg);color:var(--text)}
.study-page ::selection{background:#9c420e;color:#fff}
.study-page .header-avatar{width:42px;height:42px;background:transparent;border:0;border-radius:0;overflow:visible}
.study-page .header-avatar img{object-fit:contain}
.study-page .wordmark-divider{background:#864019}
