.notes-index, .reading-page {
  --note-ink: #182f48;
  --note-muted: #535e69;
  --note-line: #d8d6cc;
  --note-accent: #8d5d1e;
  --note-serif: "STIX Two Text", "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif;
  color: var(--note-ink);
}

.notes-skip, .notes-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.notes-skip:focus {
  z-index: 10;
  width: auto;
  height: auto;
  margin: .5rem;
  padding: .5rem 1rem;
  clip-path: none;
  background: #fff;
  color: #182f48;
}
.notes-footer-link { color: inherit; text-decoration: none; }
.notes-footer-link:hover { text-decoration: underline; }
.note-tools[hidden], .note-list li[hidden], .note-empty[hidden] { display: none; }
.notes-heading { padding-block: 18px 28px; }
.notes-heading h1, .reading-head h1 {
  margin: .2em 0 .4em;
  font-family: var(--note-serif);
  font-size: clamp(2.45rem, 5.3vw, 4.1rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.045em;
}
.notes-heading > p:last-child, .reading-lead {
  max-width: 42em;
  color: var(--note-muted);
  font-size: 1.05rem;
  line-height: 1.85;
}
.note-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  padding-block: 15px;
  border-top: 1px solid var(--note-line);
  border-bottom: 1px solid var(--note-line);
}
.note-filter { display: flex; flex-wrap: wrap; gap: .45rem; }
.note-filter button, .note-empty button, .note-pdf {
  border: 1px solid var(--note-line);
  border-radius: 4px;
  background: transparent;
  color: var(--note-ink);
  font: inherit;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
}
.note-filter button { padding: .45rem .9rem; }
.note-filter button:hover, .note-empty button:hover { border-color: var(--note-ink); }
.note-filter button[aria-pressed="true"] { background: var(--note-ink); border-color: var(--note-ink); color: #fff; }
.note-search {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .48em .8em;
  max-width: 100%;
  min-height: 2.4rem;
  color: var(--note-muted);
  border: 1px solid var(--note-line);
  border-radius: 4px;
}
.note-search:focus-within { outline: 2px solid var(--note-ink); outline-offset: 2px; }
.note-search-icon {
  position: relative;
  flex: none;
  width: .82rem;
  height: .82rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.note-search-icon::after {
  content: "";
  position: absolute;
  right: -.26rem;
  bottom: -.11rem;
  width: .36rem;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.note-search input {
  width: 15rem;
  max-width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--note-ink);
  font: inherit;
  font-size: .92rem;
}
.note-count, .note-meta, .article-topic {
  color: var(--note-muted);
  font-size: .83rem;
  line-height: 1.6;
  letter-spacing: .055em;
}
.note-count { margin: 20px 0 0; }
.note-list { margin: 0; padding: 0; list-style: none; }
.note-list li { border-bottom: 1px solid var(--note-line); }
.note-list a { display: grid; position: relative; gap: .4rem; padding: 24px 3rem 24px 0; text-decoration: none; color: inherit; }
.note-card-title { font-family: var(--note-serif); font-size: clamp(1.3rem, 2.1vw, 1.65rem); font-weight: 600; line-height: 1.55; }
.note-meta, .article-topic { color: var(--note-accent); }
.note-card-summary { color: var(--note-muted); line-height: 1.75; }
.note-arrow { position: absolute; right: 7px; top: 50%; color: var(--note-accent); font-size: 1.4rem; transform: translateY(-50%); }
.note-list a:hover .note-card-title { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.note-empty { padding: 32px 0; color: var(--note-muted); }
.note-empty button, .note-pdf { padding: .55em .85em; }
.notes-index, .reading-page { padding-bottom: clamp(55px, 7vw, 90px); }

.reading-head { max-width: 860px; padding-block: .5rem 1.6rem; }
.note-back { color: var(--note-muted); text-decoration: none; font-size: .9rem; }
.note-back:hover, .reading-next a:hover, .reading-aside li a:hover { color: var(--note-accent); text-decoration: underline; }
.article-topic { margin: clamp(1.7rem, 4vw, 3rem) 0 .55rem; }
.reading-head h1 { font-size: clamp(2.15rem, 4.8vw, 3.5rem); }
.reading-lead { margin: .8rem 0 0; }
.reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 42rem);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
  border-top: 1px solid var(--note-line);
  padding-top: 2rem;
}
.reading-aside { position: sticky; top: 2rem; }
.reading-aside h2 { margin: 0 0 .7rem; font-size: .95rem; font-weight: 600; }
.reading-aside ul { list-style: none; padding: 0 0 0 .85rem; margin: 0; border-left: 1px solid var(--note-line); }
.reading-aside li + li { margin-top: .45rem; }
.reading-aside li a { color: var(--note-muted); text-decoration: none; font-size: .9rem; line-height: 1.6; }
.note-pdf { display: inline-flex; align-items: center; gap: .55em; margin-top: 1.3rem; }
.note-pdf:hover { color: var(--note-accent); border-color: var(--note-accent); }
.reading-copy section { scroll-margin-top: 1.5rem; }
.reading-copy section + section { margin-top: 2.5rem; }
.reading-copy h2 { margin: 0 0 .55em; font-family: var(--note-serif); font-size: clamp(1.35rem, 2.5vw, 1.65rem); line-height: 1.5; }
.reading-copy p { margin: .65em 0; line-height: 1.95; font-size: 1.02rem; }
.reading-copy var, .reading-copy .math, .note-equation { font-family: Georgia, "Times New Roman", "Cambria Math", serif; }
.reading-copy .math { font-size: 1.08em; overflow-wrap: anywhere; }
.note-equation { padding: .75rem 1rem; border-left: 2px solid #b6935f; margin: .9rem 0; background: rgb(174 146 93 / .08); font-size: 1.15rem; line-height: 1.7; overflow-wrap: anywhere; }
.matrix-lines span { display: block; }
.note-answer { border-top: 1px solid var(--note-line); border-bottom: 1px solid var(--note-line); margin: 1rem 0; }
.note-answer summary { cursor: pointer; padding: .7rem 0; color: var(--note-accent); font-weight: 600; }
.note-answer[open] { padding-bottom: .6rem; }
.reading-next { margin-top: 2.4rem; }
.reading-next a { color: var(--note-ink); text-underline-offset: .25em; line-height: 1.8; }
@media (max-width: 720px) {
  .reading-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 1.25rem; }
  .reading-aside { position: static; }
  .reading-aside ul { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }
  .reading-aside li + li { margin-top: 0; }
}
@media (max-width: 480px) {
  .note-tools { align-items: stretch; flex-direction: column; }
  .note-search input { flex: 1; }
  .note-card-summary { font-size: .92rem; }
}
@media print {
  .reading-aside, .site-header, .site-footer, .reading-next, .note-back { display: none; }
  .reading-grid { display: block; }
  .reading-page { color: #000; }
}
