.course-term {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline dotted;
  text-underline-offset: .16em;
  cursor: pointer;
}
.course-term:focus-visible, .platform-term-note button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.platform-term-note {
  box-sizing: border-box;
  width: min(29rem, calc(100vw - 2rem));
  max-height: 65vh;
  padding: 1rem 1.2rem;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: .55rem;
  box-shadow: 0 .5rem 2rem #0003;
}
.platform-term-note > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.platform-term-note button {
  font: inherit;
  font-size: 1.35em;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.platform-term-note p {
  margin: .65rem 0 0;
  line-height: 1.65;
  text-indent: 0;
}

.device-original {
  min-width: 0;
  margin: .75rem 0 1.35rem;
}
.device-original h4 {
  margin: .5rem 0 .3rem;
  overflow-wrap: anywhere;
}
.source-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .5rem;
  margin-bottom: .4rem;
  font-size: .93em;
  overflow-wrap: anywhere;
}
.height-switch {
  margin-inline-start: auto;
  white-space: nowrap;
  cursor: pointer;
}
.device-original pre.original-code {
  box-sizing: border-box;
  max-height: 56vh;
  overflow: auto;
  padding: .75rem .8rem .75rem 0;
  white-space: pre;
  tab-size: 4;
}
.device-original:not(:has(.height-switch)) pre.original-code,
.device-original:has(.height-switch input:checked) pre.original-code {
  max-height: none;
}
pre.original-code > code {
  display: block;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}
.source-line::before {
  content: attr(data-line);
  display: inline-block;
  box-sizing: content-box;
  width: 4ch;
  padding: 0 .85em 0 .4em;
  margin-right: .75em;
  border-right: 1px solid currentColor;
  opacity: .65;
  text-align: right;
  user-select: none;
}
.source-line:target {
  outline: 1px solid currentColor;
  outline-offset: 2px;
  scroll-margin-block: 5rem;
}
.source-jump {
  color: #a33030;
  font-weight: 700;
}
.llm-note pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-indent: 0;
}
.llm-note pre code { white-space: inherit; }
.llm-table, .llm-figure, .llm-equation { overflow-x: auto; }
.llm-table table { width: auto; margin: .8rem auto; }
.llm-table th, .llm-table td { text-align: center; }
.llm-figure { margin: 1rem 0; }
.llm-figure svg { display: block; width: 100%; min-width: 34rem; height: auto; }
.llm-figure figcaption { text-align: center; }
.llm-equation { padding: .6em .2em; font-size: 1.17em; }
:root[data-theme="dark"] .source-jump,
:root[data-mode="dark"] .source-jump {
  color: #ffada9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-mode="light"]) .source-jump {
    color: #ffada9;
  }
}
@media print {
  .height-switch { display: none; }
  .device-original pre.original-code { max-height: none; overflow: visible; }
}
