/* ==========================================================================
   Learn extras: citations, reference lists, figures, exercises, "coming soon".
   Loaded by learn/section.html and learn/index.html only, so it adds nothing
   to the other pages. Uses the tokens from omega.css and nothing else.
   ========================================================================== */

/* --- Citations: (Raissi et al., 2019) ---------------------------------------
   Quiet in the text, obvious on hover, and the target entry is highlighted
   when you arrive from one so you can see which line you were sent to. */
.prose a.cite {
  color: inherit; text-decoration: none; border-bottom: 1px dotted var(--accent);
  white-space: normal;
}
.prose a.cite:hover, .prose a.cite:focus-visible { color: var(--accent-text); border-bottom-style: solid; }
.refs__list li:target {
  background: var(--accent-wash); box-shadow: -.6rem 0 0 var(--accent-wash), .6rem 0 0 var(--accent-wash);
  border-radius: 2px;
}

/* --- References list --------------------------------------------------------- */
.refs { max-width: var(--measure); margin-top: var(--sp-8); padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.refs__title { font-size: var(--step-1); margin-bottom: var(--sp-3); }
.refs__list { margin: 0; padding: 0; list-style: none; font-size: .9rem; line-height: 1.55; color: var(--ink-2); }
.refs__list li {
  padding: .45rem 0 .45rem 1.6rem; text-indent: -1.6rem;   /* hanging indent, as in print */
  border-bottom: 1px solid var(--line-soft); scroll-margin-top: calc(var(--header-h) + 4rem);
}
.refs__list li:last-child { border-bottom: 0; }
.refs__list a { overflow-wrap: anywhere; }

/* --- Figures ------------------------------------------------------------------ */
.prose figure { margin: var(--sp-5) 0; }
.prose figure img {
  width: 100%; height: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: .5rem;
}
.prose figure.fig--narrow { max-width: 30rem; margin-inline: auto; }
.prose figcaption { margin-top: .5rem; line-height: 1.5; }
.prose figcaption b { color: var(--ink); }

/* --- Exercises: a question, and an answer that stays shut until asked ----------- */
.prose details.answer {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: .55rem .9rem; margin-top: var(--sp-3);
}
.prose details.answer > summary {
  cursor: pointer; font-family: var(--font-label); font-weight: 500; font-size: .78rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text);
}
.prose details.answer[open] > summary { margin-bottom: var(--sp-3); }
.prose details.answer > :last-child { margin-bottom: 0; }

/* Admonitions: note (default), tip, warning, key */
.prose .admonition.tip { border-left-color: var(--ok); }
.prose .admonition.warning { border-left-color: var(--amber); background: var(--amber-wash); }
.prose .admonition.key { border-left-color: var(--ink); background: var(--butter); }
.prose .admonition > :last-child { margin-bottom: 0; }

/* The "In a PINN" bridge boxes that tie each general idea back to the method */
.prose .admonition.pinn { border-left-color: var(--accent); background: var(--accent-wash); }

/* Wide tables scroll inside the column instead of stretching the page */
.prose .table-wrap { overflow-x: auto; }

/* --- Learn page: an announced book ------------------------------------------------ */
.tile--soon { border-style: dashed; background: transparent; cursor: default; }
.tile--soon:hover { border-color: var(--line); box-shadow: none; transform: none; }
.tile--soon .tile__title { color: var(--ink-2); }
.tile--soon .tile__foot { border-top-style: dashed; }

@media (prefers-reduced-motion: reduce) {
  .prose a.cite { transition: none; }
}
@media print {
  .prose a.cite { border-bottom: 0; }
  .refs__list li { break-inside: avoid; }
}
