

/* Standalone per-lecture export shell. Lecture content rules above remain the
   same rules used by Margin; these declarations only replace application UI. */
html { height: auto; scroll-behavior: smooth; }
body.standalone-lecture, body.standalone-index-page { min-height: 100vh; height: auto; overflow: auto; background: var(--paper); }
.standalone-skip-link { position: fixed; z-index: 100; left: 12px; top: 8px; padding: 8px 12px; color: #fff; background: var(--ink); transform: translateY(-150%); }
.standalone-skip-link:focus { transform: translateY(0); }
.standalone-toolbar { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px; min-height: 52px; padding: 8px max(18px, calc((100vw - 1040px) / 2)); border-bottom: 1px solid var(--line); background: rgba(251,250,246,.96); backdrop-filter: blur(10px); }
.standalone-brand { color: var(--ink); font: 700 16px/1.2 var(--font-reading); text-decoration: none; white-space: nowrap; }
.standalone-toolbar nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; font-size: 12px; }
.standalone-toolbar nav a { color: var(--blue); font-weight: 700; text-decoration: none; }
.standalone-toolbar nav a:last-child { justify-self: end; }
.standalone-profile-notice { padding: 8px 18px; border-bottom: 1px solid #e2c9a9; color: #68481f; background: #fcf7ed; font-size: 12px; text-align: center; }
.standalone-page-shell { container-type: inline-size; padding: 24px 0 48px; }
.standalone-page-shell .lecture-html { box-shadow: 0 8px 35px rgba(31,38,35,.08); }
.standalone-footer { max-width: 900px; margin: 0 auto; padding: 24px clamp(24px,7vw,64px) 52px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }
.standalone-footer p { margin: 5px 0; }
.standalone-footer code { overflow-wrap: anywhere; }
.standalone-index { width: min(760px, calc(100% - 36px)); margin: 0 auto; padding: 70px 0 90px; }
.standalone-index-kicker { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.standalone-index h1 { margin: 8px 0 14px; font: 700 clamp(34px,6vw,54px)/1.05 var(--font-reading); }
.standalone-index-notice { margin-bottom: 32px; padding: 12px 15px; border-left: 2px solid var(--criterion); color: #68481f; background: var(--criterion-soft); }
.standalone-index ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.standalone-index li { margin: 0; border-bottom: 1px solid var(--line); }
.standalone-index li a { display: grid; grid-template-columns: 105px 1fr; gap: 18px; padding: 14px 8px; color: var(--ink); font: 600 17px/1.35 var(--font-reading); text-decoration: none; }
.standalone-index li a:hover, .standalone-index li a:focus-visible { color: var(--accent); background: var(--surface); }
.standalone-index li span { color: var(--blue); font: 700 12px/1.5 var(--font-interface); }
.standalone-index-build { margin-top: 28px; color: var(--muted); font-size: 12px; }
@media (max-width: 620px) {
  .standalone-toolbar { grid-template-columns: 1fr; gap: 5px; }
  .standalone-toolbar nav { font-size: 11px; }
  .standalone-page-shell { padding-top: 0; }
  .standalone-page-shell .lecture-html { box-shadow: none; }
  .standalone-index li a { grid-template-columns: 82px 1fr; gap: 10px; }
}
@media print {
  @page { margin: 16mm; }
  body.standalone-lecture { background: #fff; }
  .standalone-skip-link, .standalone-toolbar, .standalone-profile-notice, .standalone-footer { display: none !important; }
  .standalone-page-shell { padding: 0; }
  .standalone-page-shell .lecture-html { max-width: none; padding: 0; box-shadow: none; }
  .lecture-html a { color: inherit; text-decoration: none; }
}

.course-inline-figure{display:block}.course-inline-figure svg{display:block;max-width:100%;height:auto}