/* Web font: a subset of CEF Fonts CJK (SIL OFL 1.1, see /fonts/OFL.txt), made by site/make_font.py. */
@font-face { font-family: "CEF Fonts CJK Web Subset"; src: url("../fonts/CEFFontsCJK-WebSubset.woff?h=2ed680462c") format("woff"); font-display: swap; }
:root { --hand: "CEF Fonts CJK Web Subset", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif; }
/* Pencil marks and paper grain: generated by site/theme/pencil.py (seeded, deterministic). */
:root {
  --pk-card-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 664.0 24' preserveAspectRatio='none'%3E%3Cpath d='M-6.6 0.1C192.2 0.0 448.3 4.3 646.1 0.4' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M-7.8 1.4C192.1 -1.1 448.8 -2.9 650.1 1.1' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-card-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='628.0 -12 24 424.0' preserveAspectRatio='none'%3E%3Cpath d='M640.4 -5.2C639.2 120.3 643.9 280.2 641.4 407.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M641.3 -6.4C640.2 120.9 639.2 280.7 639.2 405.6' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-card-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 388.0 664.0 24' preserveAspectRatio='none'%3E%3Cpath d='M645.5 400.2C448.5 401.3 191.2 401.6 -6.3 400.1' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M647.3 400.5C447.2 395.8 191.1 395.2 -4.9 398.2' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-card-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 424.0' preserveAspectRatio='none'%3E%3Cpath d='M-1.7 406.6C-0.4 280.1 0.2 120.1 0.1 -3.6' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M-1.0 403.5C-4.3 279.2 2.3 120.4 -0.3 -1.8' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 724.0 24' preserveAspectRatio='none'%3E%3Cpath d='M-7.7 1.1C210.2 4.4 489.4 3.6 703.3 0.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M-6.4 -1.5C209.3 -3.3 489.7 -0.5 708.8 2.0' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='688.0 -12 24 224.0' preserveAspectRatio='none'%3E%3Cpath d='M698.9 -6.5C698.9 60.5 699.6 140.4 698.3 203.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M699.9 -2.3C698.4 60.9 697.1 139.4 698.9 206.5' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 188.0 724.0 24' preserveAspectRatio='none'%3E%3Cpath d='M706.7 200.4C489.1 197.1 210.1 197.2 -3.8 199.8' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M705.1 198.3C489.7 196.8 210.7 203.4 -6.4 199.3' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 224.0' preserveAspectRatio='none'%3E%3Cpath d='M0.9 204.4C2.5 140.2 -0.9 60.7 0.8 -2.0' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M1.5 206.1C-0.3 139.0 1.4 58.7 -1.0 -8.0' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 364.0 24' preserveAspectRatio='none'%3E%3Cpath d='M-8.8 -1.8L3.4 -2.1M10.2 -1.8L20.7 -1.7M25.5 -1.1L37.3 -1.2M46.7 -0.7L58.1 -0.8M65.7 -1.1L74.8 -0.6M82.6 -0.7L93.6 -1.3M102.7 -0.7L111.0 -1.8M118.6 -1.4L128.7 -1.8M134.4 -1.8L142.9 -0.8M150.5 -1.1L159.4 -1.7M165.1 -1.1L177.6 -2.1M183.4 -1.9L194.6 -1.9M201.4 -2.2L211.8 -1.7M217.2 -1.5L230.8 -1.4M238.3 -1.4L247.2 -1.6M255.1 -1.6L265.9 -1.4M272.3 -2.2L284.2 -1.1M289.6 -1.8L298.9 -1.1M306.5 -0.9L314.1 -1.6M321.2 -1.2L328.3 -1.1M333.0 -1.1L339.8 -0.9' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='328.0 -12 24 424.0' preserveAspectRatio='none'%3E%3Cpath d='M340.3 -6.2L340.6 2.5M340.3 8.4L340.6 15.7M340.4 23.4L341.3 34.8M341.2 43.0L341.3 51.4M341.1 57.5L341.4 67.3M341.3 72.8L341.4 80.0M340.5 85.6L340.4 98.7M340.5 104.3L340.5 116.1M340.7 122.3L340.4 135.4M340.8 141.9L340.3 151.8M340.0 161.1L339.8 171.0M339.8 177.3L339.5 189.1M339.7 194.8L339.9 208.6M339.5 213.7L339.4 226.9M339.1 232.7L339.7 240.6M339.9 246.0L339.2 259.0M338.8 266.6L339.4 279.0M339.0 286.4L339.0 294.0M339.0 300.9L339.3 311.5M339.0 319.7L338.6 327.2M339.2 332.3L338.4 342.9M338.6 349.3L338.3 356.4M339.4 362.6L338.5 370.0M339.0 378.1L338.7 386.1M338.5 391.3L339.6 400.0' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 388.0 364.0 24' preserveAspectRatio='none'%3E%3Cpath d='M341.2 398.8L333.0 398.7M325.7 398.9L318.1 399.0M312.6 398.4L302.2 398.5M295.5 398.5L283.8 399.4M276.8 398.3L268.8 398.7M262.0 399.4L254.1 399.1M244.5 398.6L232.1 399.2M225.7 398.7L215.2 398.7M207.8 399.0L195.8 399.0M189.8 399.2L179.0 399.5M172.5 399.7L161.0 399.4M154.2 399.5L143.6 399.7M133.7 399.4L123.5 399.3M116.7 400.3L106.8 399.8M100.5 399.8L90.9 399.5M81.8 400.0L73.6 400.3M65.2 400.4L53.9 400.9M46.1 400.9L36.0 401.5M27.9 400.7L15.9 401.5M10.4 401.9L1.5 401.4' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 424.0' preserveAspectRatio='none'%3E%3Cpath d='M0.5 407.2L-0.3 396.9M0.0 388.5L-0.8 380.9M-1.0 375.6L-0.2 363.9M-1.4 358.1L-1.3 347.0M-0.5 338.4L-0.9 331.1M-0.6 325.2L-1.6 317.0M-0.9 312.8L-1.7 301.9M-1.6 293.8L-1.3 283.6M-0.6 275.0L-1.7 263.0M-0.8 254.8L-1.1 245.1M-1.4 237.7L-0.3 225.5M-1.0 218.2L-1.3 205.0M-1.1 198.8L-0.6 186.9M-1.0 179.8L-0.4 171.6M-0.2 164.7L-0.7 157.4M-0.4 151.0L-0.4 142.3M-0.7 133.7L0.2 125.0M0.3 120.7L-0.2 109.0M0.3 102.0L-0.1 92.6M0.1 84.1L-0.5 74.0M-0.2 67.2L-0.9 56.2M-0.9 49.4L-1.1 42.9M-0.1 36.2L-0.3 28.1M-1.2 20.4L-0.6 12.4M-1.7 4.6L-2.1 -5.3' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-underline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -8 664.0 18' preserveAspectRatio='none'%3E%3Cpath d='M-6.0 2.0C210.5 1.6 433.5 1.1 650.0 -2.0' fill='none' stroke='%23000' stroke-width='3.2' stroke-opacity='0.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.0 4.5C217.2 4.4 432.8 0.2 642.0 1.0' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-underline-short: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -8 264.0 18' preserveAspectRatio='none'%3E%3Cpath d='M-6.0 2.0C78.5 1.6 165.5 1.1 250.0 -2.0' fill='none' stroke='%23000' stroke-width='3.2' stroke-opacity='0.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.0 4.5C85.2 4.4 164.8 0.2 242.0 1.0' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-icon-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M26.56 19.64C26.37 20.32 26.22 22.56 25.41 23.69C24.60 24.81 22.90 25.87 21.71 26.38C20.52 26.89 19.44 27.18 18.27 26.74C17.11 26.30 15.58 24.90 14.74 23.75C13.90 22.59 13.32 21.15 13.23 19.80C13.14 18.45 13.47 16.63 14.20 15.65C14.94 14.67 16.28 14.22 17.64 13.92C19.01 13.61 21.04 13.51 22.40 13.81C23.75 14.11 25.07 14.68 25.77 15.73C26.48 16.78 26.49 19.38 26.63 20.11 M31.21 20.32Q33.54 20.10 35.84 19.63 M27.93 27.78Q29.67 29.04 30.67 30.94 M20.39 31.33Q19.73 33.28 20.04 35.32 M12.29 28.12Q10.89 29.62 9.35 30.97 M9.09 19.94Q6.65 19.51 4.20 19.82 M11.81 11.81Q10.51 10.30 9.15 8.84 M19.97 8.86Q20.11 6.53 20.45 4.23 M27.51 12.34Q29.35 10.83 30.76 8.91' fill='none' stroke='%23000' stroke-width='2.72' stroke-opacity='0.88' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M26.55 20.08C26.47 20.64 26.91 22.44 26.07 23.44C25.22 24.44 22.79 25.56 21.49 26.09C20.19 26.62 19.50 27.02 18.27 26.63C17.04 26.24 15.05 24.87 14.13 23.76C13.21 22.65 12.79 21.19 12.75 19.94C12.70 18.70 12.91 17.24 13.86 16.28C14.81 15.32 17.02 14.52 18.45 14.17C19.88 13.82 21.37 13.92 22.43 14.18C23.49 14.43 23.99 14.67 24.83 15.71C25.66 16.74 27.01 19.61 27.45 20.39 M30.87 20.62Q33.26 20.29 35.67 20.45 M27.35 27.70Q28.51 29.64 30.45 30.79 M19.76 30.31Q19.22 32.65 19.36 35.04 M12.03 27.48Q10.32 29.62 8.48 31.63 M8.59 19.38Q6.23 19.25 3.88 19.54 M11.73 11.58Q10.82 9.73 9.03 8.69 M19.47 9.04Q20.50 6.82 20.38 4.37 M27.75 11.86Q29.22 10.06 30.84 8.39' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-icon-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M17.22 8.96C16.63 9.04 14.82 9.01 13.68 9.47C12.54 9.92 11.24 10.87 10.38 11.69C9.52 12.50 9.11 13.38 8.55 14.34C7.98 15.29 7.36 16.34 6.98 17.42C6.61 18.50 6.29 19.74 6.30 20.82C6.32 21.89 6.75 22.79 7.06 23.86C7.36 24.94 7.66 26.28 8.13 27.28C8.61 28.29 9.05 29.15 9.88 29.89C10.72 30.62 12.08 31.12 13.16 31.69C14.23 32.26 15.23 33.04 16.33 33.32C17.43 33.59 18.75 33.37 19.77 33.34C20.79 33.32 21.39 33.50 22.45 33.17C23.52 32.84 25.23 32.09 26.17 31.38C27.11 30.66 27.38 29.77 28.09 28.90C28.81 28.02 29.83 27.08 30.44 26.12C31.05 25.16 31.52 23.62 31.74 23.13 M16.69 8.81C16.53 9.27 15.89 10.74 15.75 11.60C15.62 12.46 15.83 13.08 15.87 13.96C15.91 14.83 15.76 15.91 15.98 16.86C16.20 17.81 16.81 18.92 17.17 19.66C17.53 20.40 17.54 20.76 18.15 21.30C18.77 21.84 19.98 22.51 20.86 22.93C21.73 23.34 22.48 23.52 23.40 23.78C24.32 24.05 25.56 24.44 26.40 24.52C27.24 24.60 27.65 24.56 28.45 24.27C29.24 23.98 30.71 23.02 31.16 22.77' fill='none' stroke='%23000' stroke-width='2.72' stroke-opacity='0.88' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.93 8.16C16.32 8.50 14.26 9.74 13.29 10.19C12.32 10.64 11.83 10.32 11.11 10.86C10.39 11.40 9.67 12.28 8.96 13.43C8.26 14.58 7.25 16.61 6.86 17.75C6.48 18.89 6.71 19.27 6.68 20.27C6.65 21.28 6.53 22.53 6.68 23.79C6.83 25.04 7.10 26.83 7.58 27.82C8.05 28.81 8.59 29.07 9.54 29.73C10.48 30.39 12.03 31.25 13.23 31.76C14.43 32.27 15.58 32.41 16.73 32.79C17.88 33.17 19.07 33.93 20.13 34.04C21.18 34.15 22.11 33.81 23.06 33.45C24.01 33.09 24.85 32.60 25.82 31.89C26.79 31.18 28.13 30.08 28.87 29.19C29.62 28.31 29.89 27.72 30.28 26.59C30.67 25.47 31.05 23.15 31.20 22.47 M17.30 8.34C17.06 8.89 16.24 10.79 15.86 11.61C15.48 12.43 15.13 12.41 15.04 13.27C14.95 14.14 15.04 15.87 15.32 16.81C15.60 17.74 16.17 18.02 16.70 18.89C17.23 19.76 17.89 21.34 18.51 22.02C19.13 22.70 19.53 22.60 20.42 22.98C21.31 23.36 22.97 24.06 23.85 24.31C24.73 24.56 24.91 24.58 25.73 24.46C26.55 24.35 27.86 23.90 28.76 23.62C29.67 23.34 30.76 22.91 31.16 22.77' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='m20 20-4-4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.36 0 0 0 0 0.29 0 0 0 0 0.2 0 0 0 1 -0.38'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url%28%23g%29' opacity='0.5'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.95 0 0 0 0 0.88 0 0 0 0 0.74 0 0 0 1 -0.4'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url%28%23g%29' opacity='0.22'/%3E%3C/svg%3E");
}
@media (max-width: 759.98px) {
:root {
  --pk-card-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 424.0 24' preserveAspectRatio='none'%3E%3Cpath d='M-6.6 0.1C120.2 0.0 280.3 3.2 406.1 0.4' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M-7.8 1.4C120.1 -0.4 280.8 -1.8 410.1 1.1' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-card-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='388.0 -12 24 584.0' preserveAspectRatio='none'%3E%3Cpath d='M400.4 -5.2C398.8 168.3 404.7 392.2 401.4 567.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M401.2 -6.4C400.1 168.9 399.1 392.7 399.3 565.6' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-card-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 548.0 424.0 24' preserveAspectRatio='none'%3E%3Cpath d='M405.5 560.2C280.5 561.0 119.2 561.2 -6.3 560.1' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M407.3 560.5C279.2 556.9 119.1 556.2 -4.9 558.2' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-card-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 584.0' preserveAspectRatio='none'%3E%3Cpath d='M-1.7 566.6C-0.1 392.1 0.3 168.1 0.1 -3.6' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M-1.0 563.5C-5.2 391.2 3.0 168.4 -0.3 -1.8' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 444.0 24' preserveAspectRatio='none'%3E%3Cpath d='M-7.7 1.1C126.2 3.3 293.4 2.7 423.3 0.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M-6.4 -1.6C125.3 -2.4 293.7 -0.1 428.8 2.0' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='408.0 -12 24 364.0' preserveAspectRatio='none'%3E%3Cpath d='M418.9 -6.5C419.0 102.5 420.0 238.4 418.3 343.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M419.9 -2.3C417.9 102.9 416.4 237.4 419.0 346.5' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 328.0 444.0 24' preserveAspectRatio='none'%3E%3Cpath d='M426.7 340.4C293.1 338.0 126.1 338.1 -3.8 339.8' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M425.1 338.3C293.7 337.3 126.7 342.1 -6.4 339.3' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-callout-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 364.0' preserveAspectRatio='none'%3E%3Cpath d='M0.9 344.4C3.1 238.2 -1.4 102.7 0.8 -2.0' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M1.4 346.1C-0.7 237.0 1.9 100.7 -1.0 -8.0' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.42' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-t: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 424.0 24' preserveAspectRatio='none'%3E%3Cpath d='M-8.8 -1.8L3.3 -2.1M10.1 -1.8L20.4 -1.7M25.2 -1.1L36.9 -1.2M46.2 -0.7L57.5 -0.8M64.9 -1.1L74.0 -0.6M81.7 -0.6L92.6 -1.2M101.6 -0.6L109.9 -1.7M117.5 -1.3L127.4 -1.7M133.1 -1.7L141.5 -0.7M149.2 -1.0L158.1 -1.5M163.8 -0.9L176.3 -2.0M182.1 -1.8L193.3 -1.8M200.2 -2.1L210.7 -1.6M216.2 -1.4L230.0 -1.3M237.6 -1.3L246.7 -1.6M254.7 -1.6L265.8 -1.5M272.4 -2.3L284.8 -1.3M290.4 -2.1L300.1 -1.4M308.0 -1.3L316.0 -2.1M323.5 -1.7L331.0 -1.8M336.0 -1.8L343.4 -1.6M349.2 -1.9L360.5 -1.4M366.2 -1.4L374.4 -1.7M379.8 -1.5L387.1 -0.8M394.4 -0.6L401.4 -0.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-r: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='388.0 -12 24 144.0' preserveAspectRatio='none'%3E%3Cpath d='M400.7 -6.4L400.6 3.5M400.4 9.1L400.3 16.3M399.3 22.1L398.9 35.2M398.9 40.9L398.8 52.8M399.0 59.0L398.7 72.0M399.1 78.3L398.8 87.8M398.6 96.7L398.6 105.9M398.8 111.7L398.9 122.2' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 108.0 424.0 24' preserveAspectRatio='none'%3E%3Cpath d='M404.0 118.7L395.2 118.6M389.1 118.4L382.7 119.1M374.5 119.3L366.1 118.7M358.0 118.4L345.7 119.1M338.1 118.8L328.1 118.9M322.0 118.9L312.8 119.3M303.9 119.1L291.5 118.7M284.6 119.3L277.1 118.6M268.7 118.8L259.3 118.6M251.8 119.7L243.6 118.8M235.5 119.3L223.6 119.0M214.3 118.9L204.9 119.9M197.4 120.0L187.1 119.9M178.8 119.7L169.5 119.7M161.4 120.0L153.1 120.2M147.0 119.6L135.8 119.9M128.8 119.8L116.5 120.9M109.3 119.9L101.2 120.3M94.4 121.1L86.5 120.8M77.0 120.5L65.0 121.2M58.8 120.8L48.9 120.8M42.0 121.2L30.7 121.2M25.3 121.5L15.6 121.8M9.7 122.1L-0.5 121.9' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --pk-later-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 144.0' preserveAspectRatio='none'%3E%3Cpath d='M0.1 124.8L-0.1 112.4M0.2 106.7L0.6 98.0M0.0 91.0L0.0 82.1M-0.3 76.1L-0.2 64.1M0.0 57.6L-0.3 43.2M-0.3 36.3L-0.4 23.6M-0.3 13.8L-1.6 4.3M-1.6 -2.8L-1.2 -6.0' fill='none' stroke='%23000' stroke-width='1.6' stroke-opacity='0.82' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
}

/* Site theme 「手繪筆記」: warm paper, CEF handwriting for headings, pencil marks.
   site/build.py puts the generated part in front of this file in /assets/site.css: the @font-face rule,
   --hand, the pencil marks (--pk-*) and the paper grain (--grain-light, --grain-dark).
   Handwriting is used for h1, h2 and class "hand" only; site/build.py checks that the web font covers
   every character set there. No external resources. Light and dark follow the system;
   <html data-theme="light|dark"> overrides it (site.js sets it from ?theme=). */

:root {
  --page: #F4EFE4; --surface: #FAF6EC; --bar: #F4EFE4;
  --ink: #2B2926; --soft: #5E584F; --muted: #8C8475;
  --rule: #D9CFBD; --rule-strong: #BDB09A;
  --accent: #2F5F8A; --on-accent: #FAF6EC;
  --callout: #8C3B3B; --callout-bg: #F1E7D8;
  --code-bg: #EFE8DA; --active-bg: #F1EADC; --mark: #F1D88E; --shade: rgba(43, 41, 38, .32);
  --pencil: #3A3B40; --emph: #D99A1E; --toggle-icon: var(--pk-icon-moon);
  --code-kw: #2A4D7A; --code-str: #4B6B3C; --code-com: #716859; --code-num: #8A4038; --code-line: rgba(217, 154, 30, .16);
  --grain: var(--grain-light);
  --sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #26231F; --surface: #2F2B26; --bar: #26231F;
    --ink: #E9E0CF; --soft: #B8AE9C; --muted: #8C8374;
    --rule: #4A443B; --rule-strong: #615A4E;
    --accent: #9CC3E6; --on-accent: #26231F;
    --callout: #D08A7E; --callout-bg: #342D28;
    --code-bg: #37322B; --active-bg: #37322C; --mark: #5E4B1E; --shade: rgba(0, 0, 0, .5);
    --pencil: #E6D3A3; --emph: #E9C04F; --toggle-icon: var(--pk-icon-sun);
    --code-kw: #9EBDE0; --code-str: #A9C190; --code-com: #A49A8B; --code-num: #D7A08F; --code-line: rgba(233, 192, 79, .14);
    --grain: var(--grain-dark);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #26231F; --surface: #2F2B26; --bar: #26231F;
  --ink: #E9E0CF; --soft: #B8AE9C; --muted: #8C8374;
  --rule: #4A443B; --rule-strong: #615A4E;
  --accent: #9CC3E6; --on-accent: #26231F;
  --callout: #D08A7E; --callout-bg: #342D28;
  --code-bg: #37322B; --active-bg: #37322C; --mark: #5E4B1E; --shade: rgba(0, 0, 0, .5);
  --pencil: #E6D3A3; --emph: #E9C04F; --toggle-icon: var(--pk-icon-sun);
  --code-kw: #9EBDE0; --code-str: #A9C190; --code-com: #A49A8B; --code-num: #D7A08F; --code-line: rgba(233, 192, 79, .14);
  --grain: var(--grain-dark);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 20px); }
body {
  margin: 0; min-height: 100vh;
  background: var(--page) var(--grain);
  color: var(--ink);
  font: 17px/1.85 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, .hand { font-family: var(--hand); font-weight: 400; -webkit-text-stroke: .45px currentColor; }
h1, h2 { text-wrap: balance; }
h1 code, h2 code { font-family: var(--mono); -webkit-text-stroke: 0; }

.skip { position: absolute; left: -999px; top: 0; z-index: 40; padding: .5rem 1rem; background: var(--accent); color: var(--on-accent); }
.skip:focus { left: 1rem; }

/* the amber pencil underline under page titles */
.doc-head h1, .portal-h1 { position: relative; width: fit-content; max-width: 100%; }
.doc-head h1::after, .portal-h1::after {
  content: ""; position: absolute; left: -10px; right: -14px; top: calc(100% - 4px); height: 18px;
  pointer-events: none; background: var(--emph);
  -webkit-mask: var(--pk-underline) 0 0 / 100% 100% no-repeat; mask: var(--pk-underline) 0 0 / 100% 100% no-repeat;
}
.portal-h1::after { -webkit-mask-image: var(--pk-underline-short); mask-image: var(--pk-underline-short); }

/* sketched pencil boxes: four strips, each stretched only along its own side */
.course-card::before, .callout::before, .later::before {
  content: ""; position: absolute; inset: -12px; pointer-events: none; background: var(--pencil);
  -webkit-mask: var(--pk-card-t) 0 0 / 100% 24px no-repeat, var(--pk-card-r) 100% 0 / 24px 100% no-repeat,
    var(--pk-card-b) 0 100% / 100% 24px no-repeat, var(--pk-card-l) 0 0 / 24px 100% no-repeat;
  mask: var(--pk-card-t) 0 0 / 100% 24px no-repeat, var(--pk-card-r) 100% 0 / 24px 100% no-repeat,
    var(--pk-card-b) 0 100% / 100% 24px no-repeat, var(--pk-card-l) 0 0 / 24px 100% no-repeat;
}
.callout::before {
  -webkit-mask-image: var(--pk-callout-t), var(--pk-callout-r), var(--pk-callout-b), var(--pk-callout-l);
  mask-image: var(--pk-callout-t), var(--pk-callout-r), var(--pk-callout-b), var(--pk-callout-l);
}
.later::before {
  -webkit-mask-image: var(--pk-later-t), var(--pk-later-r), var(--pk-later-b), var(--pk-later-l);
  mask-image: var(--pk-later-t), var(--pk-later-r), var(--pk-later-b), var(--pk-later-l);
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px 24px;
  min-height: var(--bar-h); padding: 0 32px;
  background: var(--bar) var(--grain); border-bottom: 1px solid var(--rule);
}
.menu { display: none; }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; font-size: 14px; line-height: 1.6; color: var(--soft); }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--rule-strong); }
.crumbs [aria-current] { color: var(--ink); }
.toplinks { display: flex; gap: 24px; margin-left: auto; font-size: 15px; line-height: 1.6; white-space: nowrap; }
.toplinks a { color: var(--soft); text-decoration: none; }
.toplinks a:hover { color: var(--ink); }
.toplinks a[aria-current] {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 7px;
}
.search { position: relative; flex: none; width: 210px; margin: 0 44px 0 0; }
.search::before {
  content: ""; position: absolute; left: 1px; top: 50%; width: 15px; height: 15px; margin-top: -7px;
  background: var(--muted); pointer-events: none;
  -webkit-mask: var(--pk-icon-search) center / contain no-repeat; mask: var(--pk-icon-search) center / contain no-repeat;
}
.search input {
  display: block; width: 100%; height: 32px; margin: 0; padding: 0 2px 0 24px;
  border: 0; border-bottom: 1px solid var(--rule-strong); border-radius: 0;
  background: transparent; color: var(--ink); font: 14px/1 var(--sans);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search input:focus { outline: none; border-bottom: 1.5px solid var(--accent); }

/* light/dark toggle (added by site.js): icon only, the moon in light mode and the sun in dark mode. Its place at
   the right end of the top bar is kept free (margins above), so nothing moves when it appears. */
.theme-toggle {
  position: absolute; top: 14px; right: 24px; width: 32px; height: 32px; margin: 0; padding: 0;
  border: 0; border-radius: 4px; background: transparent; color: var(--soft); cursor: pointer;
}
.theme-toggle::before {
  content: ""; position: absolute; inset: 4px; background: currentColor;
  -webkit-mask: var(--toggle-icon) center / contain no-repeat; mask: var(--toggle-icon) center / contain no-repeat;
}
.theme-toggle:hover { color: var(--ink); background: var(--active-bg); }
.theme-toggle.corner { top: 18px; right: 18px; }

/* ---------------------------------------------------------------- course pages: sidebar, column, page TOC */

.layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); align-items: start; }
.sidebar {
  grid-column: 1; grid-row: 1;
  position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow-y: auto; overscroll-behavior: contain;
  padding: 28px 16px 48px 22px;
  background: var(--surface) var(--grain); border-right: 1px solid var(--rule);
  font-size: 14.5px; line-height: 1.5;
}
.side-h { margin: 26px 0 8px 12px; font: 600 12.5px/1.4 var(--sans); letter-spacing: .16em; color: var(--muted); }
.side-h:first-child { margin-top: 0; }
.sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar li { margin: 0; }
.sidebar a { display: flex; gap: 10px; padding: 6px 10px 6px 12px; color: var(--ink); text-decoration: none; }
.sidebar a:hover { background: var(--active-bg); }
.sidebar .num { flex: none; min-width: 22px; font-size: 18px; line-height: 21.75px; color: var(--muted); -webkit-text-stroke-width: .3px; }
.sidebar a[aria-current="page"] { color: var(--accent); background: var(--active-bg); box-shadow: inset 2px 0 0 var(--accent); }
.sidebar a[aria-current="page"] .num { color: var(--accent); }

.doc {
  grid-column: 2; grid-row: 1; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 40em) 13rem; column-gap: 56px; justify-content: center; align-content: start;
  grid-template-areas: "head toc" "body toc" "pager toc";
  padding: 34px 40px 80px;
}
.doc-head { grid-area: head; min-width: 0; }
.doc-body { grid-area: body; min-width: 0; }
.pager { grid-area: pager; }
.page-toc {
  grid-area: toc; align-self: start;
  position: sticky; top: calc(var(--bar-h) + 34px); max-height: calc(100vh - var(--bar-h) - 68px); overflow-y: auto;
  padding-top: 10px;
}
.toc-h { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font: 600 12.5px/1.5 var(--sans); letter-spacing: .16em; color: var(--muted); }
.page-toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--rule); }
.page-toc li { margin: 0; }
.page-toc a { display: block; padding: 4px 0 4px 14px; font-size: 13.5px; line-height: 1.5; color: var(--soft); text-decoration: none; }
.page-toc a:hover { color: var(--ink); }
.page-toc a[aria-current] { margin-left: -1px; color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }

/* ---------------------------------------------------------------- reading column */

.doc-head h1 { margin: 6px 0 30px; font-size: 34px; line-height: 1.3; text-wrap: pretty; }
.doc-head .notice { margin: -6px 0 26px; }
.doc-body > :first-child { margin-top: 0; }
.doc-body h2 { margin: 2.1em 0 .45em; font-size: 25px; line-height: 1.4; }
.doc-body h3 { margin: 1.9em 0 .5em; font-size: 18.5px; line-height: 1.55; font-weight: 600; }
.doc-body h4 { margin: 1.6em 0 .4em; font-size: 17px; line-height: 1.6; font-weight: 600; }
p, ul, ol { margin: 0 0 1em; }
.doc-body ul, .doc-body ol { padding-left: 1.4em; }
li { margin: .2em 0; }
li::marker { color: var(--muted); }
main p, main li, figcaption { overflow-wrap: anywhere; }
main td, main th { overflow-wrap: break-word; }
.muted { color: var(--soft); }
.small { font-size: 15px; }
.notice { padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--surface); font-size: 15.5px; line-height: 1.75; }

.callout { position: relative; margin: 1.6em 0 1.8em; padding: 12px 20px 14px 20px; background: var(--callout-bg); }
.callout .cl-label { margin: 0 0 2px; font-size: 18px; line-height: 1.35; color: var(--callout); }
.callout p:last-child { margin: 0; line-height: 1.75; }

code { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { padding: .1em .35em; border-radius: 2px; background: var(--code-bg); overflow-wrap: anywhere; }
pre {
  position: relative; overflow-x: auto; margin: 0 0 1.3em; padding: 14px 16px;
  border-radius: 2px; background: var(--code-bg); font-size: 14px; line-height: 1.6;
}
pre code { font-size: inherit; }
.copy {
  position: absolute; top: 6px; right: 6px; padding: 1px 8px;
  border: 1px solid var(--rule-strong); border-radius: 3px; background: var(--surface); color: var(--soft);
  font: 12px/1.6 var(--sans); cursor: pointer;
}

/* syntax highlighting: tools/highlight.py (course repo) emits Pygments' short classes inside .hl, no styles.
   Low-key on purpose: keywords ink blue, strings muted green, comments soft and italic (Latin only: CJK stays
   upright), numbers and constants muted maroon, names and everything else plain ink. */
.hl .k, .hl .kd, .hl .kn, .hl .kp, .hl .kr, .hl .kt, .hl .ow { color: var(--code-kw); }
.hl .s, .hl .sa, .hl .sb, .hl .sc, .hl .dl, .hl .sd, .hl .s2, .hl .se, .hl .sh, .hl .si, .hl .sx, .hl .sr,
.hl .s1, .hl .ss { color: var(--code-str); }
.hl .c, .hl .ch, .hl .cm, .hl .cpf, .hl .c1, .hl .cs, .hl .cp { color: var(--code-com); font-style: italic; font-synthesis: none; }
.hl .m, .hl .mb, .hl .mf, .hl .mh, .hl .mi, .hl .il, .hl .mo, .hl .kc { color: var(--code-num); }
.hl .gp, .hl .go { color: var(--soft); }

/* a lab program as a page: path, length and download above numbered lines; each line is an anchor (#L17) */
.doc.code-page { grid-template-columns: minmax(0, 960px); grid-template-areas: "head" "body" "pager"; }
.code-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: -8px 0 10px; font-size: 15px; line-height: 1.6; color: var(--soft); }
.code-meta code { padding: 0; background: none; color: var(--ink); }
.code-meta .btn { margin-left: auto; }
.code-uses { margin: 0 0 22px; font-size: 15px; color: var(--soft); }
.btn.small { height: 32px; padding: 0 14px; font-size: 14px; }
pre.code-file { padding: 12px 0; font-size: 13.5px; line-height: 1.65; tab-size: 4; }
.code-file .line { display: inline-block; min-width: 100%; padding-right: 16px; }
.code-file .line:target { background: var(--code-line); }
.code-file .ln {
  display: inline-block; width: 3.4em; margin-right: 14px; padding-right: 10px; border-right: 1px solid var(--rule);
  color: var(--muted); text-align: right; text-decoration: none; -webkit-user-select: none; user-select: none;
}
.code-file .ln::before { content: attr(data-n); }
.code-file .ln:hover { color: var(--accent); }
.code-file .line:target .ln { color: var(--ink); }

/* booktabs tables: two strong rules and one light rule, no vertical lines */
.table-wrap { overflow-x: auto; margin: 1.3em 0 1.5em; }
table { width: 100%; border-collapse: collapse; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); font-size: 15px; line-height: 1.6; }
th, td { padding: 7px 10px; text-align: left; vertical-align: top; }
thead th { padding-top: 8px; padding-bottom: 8px; font-weight: 600; border-bottom: 1px solid var(--soft); }
tbody tr:first-child td { padding-top: 10px; }
tbody tr:last-child td { padding-bottom: 10px; }
td.nw, th.nw { white-space: nowrap; }

figure { margin: 1.6em 0; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); background: #fff; }
figcaption { margin-top: .4em; color: var(--soft); font-size: 15px; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3.2rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.6; }
.pager a { max-width: 48%; text-decoration: none; }
.pager .next { margin-left: auto; text-align: right; }

/* search page */
.search-page { display: flex; gap: 10px; margin: 0 0 1em; }
.search-page input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 3px;
  background: var(--surface); color: var(--ink); font: 16px/1 var(--sans); -webkit-appearance: none; appearance: none;
}
.search-page button { padding: 0 18px; border: 0; border-radius: 3px; background: var(--accent); color: var(--on-accent); font: 600 15.5px/1 var(--sans); cursor: pointer; }
.results { padding-left: 1.4em; }
.results li { margin-bottom: 1.1em; }
.results p { margin: .2em 0 0; color: var(--soft); font-size: 15px; }
mark { padding: 0 1px; border-radius: 2px; background: var(--mark); color: inherit; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: 4px;
  font-size: 15.5px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.ghost { border: 1px solid var(--accent); color: var(--accent); }
.btn .arr { font-weight: 400; }

/* ---------------------------------------------------------------- course home */

.home .layout { display: block; }
.home-main { max-width: 1064px; margin: 0 auto; padding: 44px 32px 80px; }
.home-main h1 { margin: 0; font-size: 44px; line-height: 1.25; }
.lead { margin: 12px 0 0; max-width: 32em; font-size: 18px; line-height: 1.75; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 34px 0 0; padding: 0; list-style: none; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.strip li { margin: 0; border-left: 1px solid var(--rule); }
.strip li:first-child { border-left: 0; }
.strip a { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 6px 24px; color: var(--ink); text-decoration: none; }
.strip li:first-child a { padding-left: 0; }
.strip a:hover .lbl { color: var(--accent); }
.strip .ico { display: none; }  /* the course markup still has an icon slot; the theme draws no icon there */
.strip .lbl { display: block; font-size: 24px; line-height: 1.3; }
.strip .cnt { display: block; font-size: 14px; line-height: 1.5; color: var(--soft); }
.home-main h2 { margin: 46px 0 12px; font-size: 26px; line-height: 1.3; }
.units { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.units li { margin: 0; border-bottom: 1px solid var(--rule); }
.units a { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 7px 0 7px 4px; color: var(--ink); line-height: 1.5; text-decoration: none; }
.units a:hover .t { color: var(--accent); }
.units .num { flex: none; width: 30px; font-size: 22px; line-height: 1; color: var(--accent); -webkit-text-stroke-width: .3px; }
.units.labs .num { width: 42px; }
.units .t { font-size: 15.5px; }
.files { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 12px; margin: 0 0 1em; padding: 0; list-style: none; }
.files li { margin: 0; }
.files a { display: block; height: 100%; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); line-height: 1.5; text-decoration: none; }
.files a:hover { border-color: var(--accent); }
.files strong { display: block; color: var(--accent); }
.files span { color: var(--soft); font-size: 14px; }
.home-main .note { margin-top: 14px; }

/* ---------------------------------------------------------------- portal and 404 (site root) */

.portal-main { width: min(960px, calc(100% - 64px)); margin: 0 auto; padding: clamp(56px, 13vh, 132px) 0 96px; }
.portal-h1 { margin: 0; font-size: 44px; line-height: 1.25; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 32px 24px; margin-top: 46px; }
.course-card { position: relative; grid-column: span 2; padding: 36px 40px 38px; background: var(--surface) var(--grain); }
.cc-title { margin: 0; font-size: 34px; line-height: 1.35; }
.cc-desc { margin: 12px 0 0; max-width: 32em; font-size: 16.5px; line-height: 1.8; color: var(--soft); }
.cc-meta { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.6; color: var(--soft); }
.cc-meta .dot { margin: 0 .55em; color: var(--muted); }
.cc-actions { margin: 26px 0 0; }
.later { position: relative; display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 20px; color: var(--muted); font-size: 23px; line-height: 1.3; }
.notfound .lead { max-width: none; margin-top: 30px; }
.notfound ul { margin: 14px 0 0; padding-left: 1.4em; font-size: 18px; }

/* ---------------------------------------------------------------- narrower screens */

/* below about 1100 px the page TOC folds into the top of the reading column */
@media (max-width: 1099.98px) {
  .doc { display: block; max-width: calc(40em + 80px); padding: 30px 40px 72px; }
  .doc.code-page { max-width: none; }
  .page-toc {
    position: static; max-height: none; overflow: visible;
    margin: -8px 0 32px; padding: 12px 18px 14px; background: var(--surface); border: 1px solid var(--rule);
  }
  .page-toc ol { border-left: 0; }
  .page-toc a { padding: 3px 0; font-size: 14.5px; }
  .page-toc a[aria-current] { margin-left: 0; box-shadow: none; color: var(--soft); }
  .toc-h { margin-bottom: 6px; padding-bottom: 6px; }
}

/* below about 1000 px the top bar takes two rows and scrolls away with the page */
@media (max-width: 999.98px) {
  :root { --bar-h: 0px; }
  .topbar { position: relative; flex-wrap: wrap; padding: 10px 24px; }
  .crumbs { flex: 1 1 100%; margin-right: 44px; }
  .toplinks { margin-left: 0; }
  .search { margin-left: auto; margin-right: 0; }
  .theme-toggle { top: 6px; right: 20px; }
}

/* below about 760 px the sidebar collapses behind the 目錄 button */
@media (max-width: 759.98px) {
  html { scroll-padding-top: 16px; }
  body { font-size: 16.5px; }
  .topbar { gap: 8px 16px; padding: 10px 16px 12px; }
  .menu {
    display: inline-flex; align-items: center; gap: 6px; flex: none; height: 30px; padding: 0 10px;
    border: 1px solid var(--rule-strong); border-radius: 3px; color: var(--ink); font-size: 14px; text-decoration: none;
  }
  .menu::before { content: ""; width: 14px; height: 10px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; }
  .crumbs { flex: 1 1 calc(100% - 160px); margin-right: 36px; }
  .toplinks { order: 3; gap: 16px; }
  .theme-toggle { top: 9px; right: 10px; }
  .theme-toggle.corner { top: 12px; right: 12px; }
  .search { order: 4; flex: 1 1 8rem; width: auto; }
  .layout { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; border-right: 0; border-top: 1px solid var(--rule); padding: 24px 16px 40px; }
  .js .sidebar { display: none; }
  .js .nav-open .sidebar {
    display: block; position: fixed; top: 0; bottom: 0; left: 0; z-index: 30;
    width: min(20rem, 86vw); overflow-y: auto; border-top: 0; border-right: 1px solid var(--rule); box-shadow: 0 0 24px var(--shade);
  }
  .backdrop { position: fixed; inset: 0; z-index: 25; background: var(--shade); }
  .nav-open { overflow: hidden; }
  .doc { padding: 24px 16px 56px; }
  .doc-head h1 { font-size: 28px; }
  .doc-body h2 { font-size: 22.5px; }
  .callout { margin-left: 2px; margin-right: 2px; padding: 12px 16px 14px; }
  .home-main { padding: 28px 16px 64px; }
  .home-main h1 { font-size: 34px; }
  .lead { font-size: 17px; }
  .strip { grid-template-columns: minmax(0, 1fr); }
  .strip li { border-left: 0; border-top: 1px solid var(--rule); }
  .strip li:first-child { border-top: 0; }
  .strip a, .strip li:first-child a { min-height: 64px; padding: 4px 0; }
  .units { grid-template-columns: minmax(0, 1fr); }
  .portal-main { width: calc(100% - 32px); padding-top: 48px; }
  .portal-h1 { font-size: 36px; }
  .cards { grid-template-columns: minmax(0, 1fr); margin-top: 38px; }
  .course-card { grid-column: auto; padding: 26px 22px 28px; }
  .cc-title { font-size: 27px; }
  .later { min-height: 96px; font-size: 21px; }
}

@media print {
  .topbar, .sidebar, .page-toc, .pager, .copy, .skip, .theme-toggle { display: none !important; }
  .layout, .doc { display: block; padding: 0; }
  body { background: #fff; }
}
