@@ -643,15 +643,36 @@ body {
643643 color : # 9ca3af ;
644644}
645645
646- /* ── Video / iframe embeds ───────────────────────── */
646+ /* ── Video embeds ───────── ───────────────────────── */
647647
648- .prose iframe ,
649648.prose video {
649+ width : 100% ;
650650 max-width : 100% ;
651- margin : 1.5em 0 ;
651+ height : auto;
652+ aspect-ratio : 16 / 9 ;
653+ margin : 1.5em auto;
652654 border-radius : 0.75em ;
653655}
654656
657+ /* ── Iframe embeds ──────────────────────────────── */
658+
659+ .prose iframe {
660+ width : 100% ;
661+ max-width : 100% ;
662+ aspect-ratio : 16 / 9 ;
663+ margin : 1.5em auto;
664+ border-radius : 0.75em ;
665+ }
666+
667+ /* Google Drive / PDF embeds — taller document view */
668+ .prose iframe [src *= "drive.google.com" ],
669+ .prose iframe [src *= ".pdf" ] {
670+ aspect-ratio : auto;
671+ height : 80vh ;
672+ max-height : 800px ;
673+ min-height : 500px ;
674+ }
675+
655676/* ── Details / summary (expandable sections) ─────── */
656677
657678.prose details {
@@ -1433,3 +1454,67 @@ body {
14331454.dark .post-refs-panel {
14341455 box-shadow : 0 1px 3px rgba (0 , 0 , 0 , 0.2 );
14351456}
1457+
1458+ /* ── Table of Contents sidebar ───────────────────── */
1459+
1460+ .toc-nav {
1461+ font-size : 0.8125rem ;
1462+ line-height : 1.4 ;
1463+ }
1464+
1465+ .toc-list {
1466+ list-style : none;
1467+ padding : 0 ;
1468+ margin : 0 ;
1469+ }
1470+
1471+ .toc-link {
1472+ display : block;
1473+ padding : 3px 0 3px 12px ;
1474+ color : # 71717a ;
1475+ text-decoration : none;
1476+ border-left : 2px solid transparent;
1477+ transition : color 0.15s ease, border-color 0.15s ease;
1478+ font-size : 0.8125rem ;
1479+ line-height : 1.45 ;
1480+ }
1481+
1482+ .dark .toc-link {
1483+ color : # 52525b ;
1484+ }
1485+
1486+ .toc-link : hover {
1487+ color : var (--color-python-blue );
1488+ }
1489+
1490+ .dark .toc-link : hover {
1491+ color : var (--color-python-yellow );
1492+ }
1493+
1494+ .toc-link .toc-active {
1495+ color : var (--color-python-blue );
1496+ border-left-color : var (--color-python-blue );
1497+ font-weight : 500 ;
1498+ }
1499+
1500+ .dark .toc-link .toc-active {
1501+ color : var (--color-python-yellow );
1502+ border-left-color : var (--color-python-yellow );
1503+ }
1504+
1505+ .toc-link-h3 {
1506+ padding-left : 24px ;
1507+ font-size : 0.75rem ;
1508+ }
1509+
1510+ .toc-link-h4 {
1511+ padding-left : 36px ;
1512+ font-size : 0.6875rem ;
1513+ }
1514+
1515+ /* ── Centered images in prose ────────────────────── */
1516+
1517+ .prose img {
1518+ margin-left : auto;
1519+ margin-right : auto;
1520+ }
0 commit comments