/* 圖解與數學式的樣式（酒吧風圖解規格）。不含介面，網站與簡報可以共用這一份。
   本體：墨黑、線寬 2.5；輔助線：灰、線寬 1.5、虛線；重點：電光藍；強調的面用淡藍填底。
   逐步圖解：只有「這一步新出現的」是藍色（.now），之前步驟的結果退回黑灰。 */
.fig { max-width: 100%; height: auto; --f-ink: #1D1D1F; --f-text: #6E6E73; --f-sub: #86868B; --f-line: #D2D2D7; --f-blue: #0071E3; }
.fig line, .fig polygon, .fig path, .fig circle { fill: none; stroke: var(--f-ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.fig [stroke-dasharray], .fig .span, .fig .thin { stroke: var(--f-sub); stroke-width: 1.5; }
.fig .span { stroke-dasharray: 4 4; }
.fig .dot, .fig .solid { fill: var(--f-ink); stroke: none; }
.fig .sofa { fill: #E8E8ED; stroke-width: 2; }
.fig .area { stroke: none; fill: rgba(29, 29, 31, .06); }

/* 圖上的字：頂點名稱 16 墨黑；角度與長度標註 14 灰 */
.fig text { stroke: none; }
.fig .lbl { font: italic 17px "KaTeX_Math", "Times New Roman", serif; fill: var(--f-ink); }
.fig .ang { font: 400 14px -apple-system, BlinkMacSystemFont, 'SF Pro TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; fill: var(--f-text); text-anchor: middle; }
.fig .zh { font: 400 14px -apple-system, BlinkMacSystemFont, 'SF Pro TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; fill: var(--f-text); }
.fig .mid { text-anchor: middle; }

/* 逐步出現：帶 data-step 的元素播放到該步才顯示；data-end 之後收起 */
[data-step] { visibility: hidden; }
[data-step].on { visibility: visible; }
.fig .hl.now { stroke: var(--f-blue); }
.fig text.hl.now { fill: var(--f-blue); font-weight: 600; stroke: none; }
.fig .dot.hl.now { fill: var(--f-blue); stroke: none; }
.fig .area.hl.now { fill: rgba(0, 113, 227, .12); stroke: none; }
[data-step].now { animation: fig-in .4s ease; }
@keyframes fig-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { [data-step].now { animation: none; } }

/* 算式列 */
.eqs { text-align: left; display: inline-block; }
.eq { padding: 4px 0; color: #1D1D1F; }
.eq.hl.now { color: #0071E3; font-weight: 600; }
.duo { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: center; }

/* 數學式 */
.katex { font-size: 1.08em; }
.subj-MAT .stem i, .subj-MAT .choice i, .subj-MAT .eq i, .subj-MAT .mine i, .subj-MAT .hint i, .subj-MAT .diag i, .subj-MAT .material i, .subj-MAT .grid i {
  font-family: "KaTeX_Math", "Times New Roman", serif; font-style: italic; font-size: 1.08em; }
.seg { text-decoration: overline; }
sup { font-size: .68em; line-height: 0; }
.sys { display: inline-flex; align-items: center; vertical-align: middle; margin: 0 4px; }
.sys .brace { font-size: 2.6em; line-height: 1; font-family: "KaTeX_Main", "Times New Roman", serif; font-weight: 100; transform: scaleX(.7); margin-top: -.12em; }
.sys .rows { display: inline-flex; flex-direction: column; line-height: 1.35; }
/* 離線備用的簡易根號與分數（KaTeX 沒載入時才會用到） */
.fb-sqrt { white-space: nowrap; }
.fb-sqrt::before { content: "√"; }
.fb-sqrt .rad { border-top: 1.5px solid currentColor; padding: 0 2px; }
.fb-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.15; font-size: .9em; margin: 0 2px; }
.fb-frac span:first-child { border-bottom: 1.3px solid currentColor; padding: 0 3px; }

/* 表格：平面、細淡線；劃掉的格子變淡，標記的格子這一步是藍底，之後退成灰底 */
.grid { border-collapse: collapse; margin: 0 auto; }
.grid caption { caption-side: top; font-size: 14px; color: #86868B; padding-bottom: 8px; }
.grid th, .grid td { border: 1px solid #D2D2D7; width: 60px; height: 46px; text-align: center; background: #FFFFFF; }
.grid.wide th, .grid.wide td { width: 72px; }
.grid th { font-weight: 400; font-size: 14px; color: #6E6E73; }
.grid [data-step] { visibility: visible; color: transparent; }
.grid [data-step].on { color: #1D1D1F; }
.grid [data-step].now { color: #0071E3; font-weight: 600; }
.grid .dimmed { color: #C7C7CC !important; text-decoration: line-through; }
.grid td.marked { background: #E8E8ED; color: #1D1D1F !important; font-weight: 600; }
.grid td.marked.marknow { background: #0071E3; color: #FFFFFF !important; }
