/* Keep the notes site visually aligned with the Introduction to Computational
   Linguistics notes while making long statistical chapters easier to read. */

:root {
  --notes-blue: #2166ac;
  --notes-blue-light: #eaf2f8;
  --notes-navy: #17324d;
  --notes-gold: #a56712;
  --notes-gold-light: #fff6e5;
  --notes-rule: #d7e0e8;
  --notes-text: #24292f;
  --mermaid-edge-color: var(--notes-navy);
}

body {
  color: var(--notes-text);
}

#quarto-content main {
  line-height: 1.65;
}

#quarto-content main p,
#quarto-content main li {
  max-width: 78ch;
}

/* Inline code needs a light treatment against the Lux theme. */
:not(pre) > code {
  background-color: #f0f0f0 !important;
  color: #333 !important;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

/* Reveal-specific classes should degrade to ordinary notes content. */
main .fragment,
main .incremental > * {
  opacity: 1 !important;
  visibility: visible !important;
}

main .scrollable {
  max-height: none !important;
  overflow: visible !important;
}

/* Long derivations should scroll inside the content column on narrow screens
   instead of widening the entire page and its mobile navigation. */
mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
}

main h1.center,
main h2.center {
  background: var(--notes-blue-light) !important;
  border-left: 0.3rem solid var(--notes-blue);
  color: var(--notes-text) !important;
  padding: 0.55rem 0.8rem;
  text-align: left !important;
}

main hr {
  border: 0;
  border-top: 1px solid var(--notes-rule);
  margin: 2.5rem 0;
  opacity: 1;
}

.chapter-roadmap {
  background: var(--notes-blue-light);
  border-left: 0.3rem solid var(--notes-blue);
  margin: 1.5rem 0 2rem;
  padding: 0.85rem 1.1rem;
}

.source-deck {
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.assessment-checkpoint {
  background: var(--notes-gold-light);
  border-left: 0.3rem solid var(--notes-gold);
  color: var(--notes-navy);
  margin: 1.5rem 0 2.25rem;
  max-width: 78ch;
  padding: 0.8rem 1rem;
}

.assessment-checkpoint p {
  margin: 0;
}

.assessment-checkpoint a {
  color: var(--notes-navy);
  font-weight: 700;
  text-decoration-color: rgba(165, 103, 18, 0.55);
  text-underline-offset: 0.16em;
}

@media (max-width: 720px) {
  /* Long topical and assignment titles should remain legible beside Quarto's
     code menu instead of collapsing to one or two words per line. */
  #quarto-content main h1.title,
  #quarto-content main > header h1 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    line-height: 1.12;
    letter-spacing: 0.035em;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
}

@media (min-width: 992px) {
  #quarto-content main {
    max-width: 980px;
  }
}
