/* 系統說明頁（wiki.html）樣式；改自 stock-charts-com-screener web/docs/guide.css。淺色底，與文件內的 SVG 圖一致。 */
:root { color-scheme: light; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif; color: #20334b; background: #f3f6fa; line-height: 1.75; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #165bb8; text-underline-offset: .18em; overflow-wrap: anywhere; }
a:hover { color: #0a3977; }
:focus-visible { outline: 3px solid #d87900; outline-offset: 4px; }
.skip-link { position: fixed; left: 1rem; top: -10rem; z-index: 5; padding: .6rem 1rem; background: white; }
.skip-link:focus { top: .5rem; }
.guide-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: 1rem max(1.25rem, calc((100% - 1480px) / 2)); background: white; border-bottom: 1px solid #d5dee9; font-size: .9rem; }
.guide-search { max-width: 1386px; margin: 1.5rem auto 0; padding: 1.2rem 1.5rem; background: #fff; border: 1px solid #d5dee9; border-radius: .7rem; }
.guide-search label { display: block; font-weight: 700; margin-bottom: .4rem; }
.guide-search-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.guide-search input { min-width: 0; flex: 1 1 240px; font: inherit; color: #20334b; border: 1px solid #8d9fb7; border-radius: .4rem; padding: .4rem .7rem; background: white; }
.guide-search button { flex: 0 0 auto; }
.guide-search-clear { color: #165bb8; background: white; }
.guide-search button:disabled { opacity: .5; cursor: default; }
.guide-search [role="status"] { margin: .5rem 0 0; font-size: .88rem; color: #526379; overflow-wrap: anywhere; }
.guide-search-results { list-style: none; padding: 0; margin: 1rem 0 0; max-height: 30rem; overflow: auto; }
.guide-search-results li { border-top: 1px solid #dce4ef; padding: .85rem .25rem; margin: 0; overflow-wrap: anywhere; }
.guide-search-results a { display: inline-block; text-decoration: none; }
.guide-search-results a strong { display: block; text-decoration: underline; }
.guide-result-document { display: block; font-size: .78rem; color: #526379; }
.guide-search-results p { font-size: .9rem; margin: .3rem 0 0; }
/* Matches of the search on this page, and the floating bar that steps through them. */
mark.guide-hit { background: #ffe58a; color: inherit; border-radius: .15em; }
mark.guide-hit.is-current { background: #ff9d2e; color: #122b48; outline: 2px solid #b35f00; outline-offset: 1px; } /* dark text also inside links: link blue on orange is below 4.5:1 */
.guide-find { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 6; display: flex; align-items: center; gap: .35rem; padding: .4rem .5rem .4rem .8rem; background: white; border: 1px solid #9fb2c8; border-radius: .6rem; box-shadow: 0 6px 20px rgba(18, 43, 72, .18); font-size: .9rem; }
.guide-find[hidden] { display: none; }
:root:has(.guide-find:not([hidden])) { scroll-padding-bottom: 4.5rem; } /* keyboard focus never ends up under the bar */
.guide-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.guide-find-position { min-width: 4.5em; font-variant-numeric: tabular-nums; color: #20334b; font-weight: 600; }
.guide-find button { padding: .25rem .6rem; line-height: 1.3; }
.guide-find .guide-find-close { color: #165bb8; background: white; }
@media (forced-colors: active) { mark.guide-hit.is-current { outline: 3px solid Highlight; } }
[hidden] { display: none !important; }
.guide-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 2.5rem; max-width: 1450px; margin: 0 auto; padding: 2.5rem 2rem 5rem; }
/* 整個側欄一起黏住（本頁內容＋所有說明頁）；只黏第一個 details 時，第二個清單會從它底下捲過去、文字疊在一起 */
aside { min-width: 0; position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow: auto; }
.guide-contents { font-size: .88rem; }
.guide-all { margin-top: 1.5rem; }
.guide-all ol ol { margin: .2rem 0 .8rem; }
.guide-doc-group { display: block; font-weight: 700; color: #526379; font-size: .8rem; margin-top: .6rem; }
.guide-all a[aria-current] { font-weight: 700; color: #0a3977; }
.guide-brand { color: #122b48; }
.guide-contents summary { cursor: pointer; font-weight: 700; color: #20334b; padding: .2rem 0; }
.guide-contents ol { list-style: none; padding-left: 0; margin: .75rem 0; }
.guide-contents li { margin: .5rem 0; }
.guide-contents a { text-decoration: none; }
main { min-width: 0; padding: 2.5rem 3rem; background: white; border: 1px solid #dce4ef; border-radius: 1rem; }
article { max-width: 960px; margin: auto; overflow-wrap: break-word; }
h1, h2, h3, h4, h5, h6 { line-height: 1.35; color: #122b48; scroll-margin-top: 1.5rem; }
h1 { font-size: clamp(1.75rem, 3vw, 2.6rem); margin: 0 0 1.25rem; letter-spacing: -.025em; }
h2 { font-size: 1.6rem; margin: 2.8rem 0 1rem; padding-top: .8rem; border-top: 1px solid #dce4ef; }
h3 { font-size: 1.2rem; margin-top: 2rem; }
p, ul, ol { margin: 1rem 0; }
li { margin: .4rem 0; }
blockquote { margin: 1.5rem 0; padding: .1rem 1.25rem; border-left: 4px solid #2571c4; background: #eef5ff; border-radius: 0 .4rem .4rem 0; }
pre { overflow: auto; padding: 1.1rem 1.25rem; border: 1px solid #dce4ef; border-radius: .5rem; background: #f3f6fa; font-size: .875rem; line-height: 1.6; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .9em; padding: .1rem .25rem; background: #f0f4f8; border-radius: .2rem; }
pre code { padding: 0; background: none; font-size: inherit; }
.guide-table { overflow-x: auto; margin: 1.5rem 0; border: 1px solid #d8e1ec; border-radius: .5rem; }
table { border-collapse: collapse; width: 100%; font-size: .91rem; line-height: 1.6; }
th, td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid #e0e7ef; vertical-align: top; min-width: 100px; }
th { background: #eaf1f9; color: #16375e; }
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #f8fafc; }
img { display: block; width: 100%; max-width: 100%; height: auto; margin: 1.5rem auto; border: 1px solid #dce4ef; border-radius: .6rem; }
.guide-figure { display: block; text-decoration: none; }
.guide-figure img { margin-bottom: .35rem; }
.guide-image-hint { display: block; text-align: right; font-size: .8rem; text-decoration: underline; }
hr { border: 0; border-top: 1px solid #dce4ef; margin: 2.5rem 0; }
[data-guide="status"]:empty { display: none; }
button { font: inherit; cursor: pointer; border: 1px solid #165bb8; color: white; background: #165bb8; border-radius: .4rem; padding: .45rem 1rem; }
/* 寬度斷點是刻意保留的例外：這是新分頁開啟的獨立閱讀頁（移植自 stock-charts-com-screener 的 guide.css），
   沒有「桌機原樣」要維持，也沒有表格 nth-child 對位問題；主程式／Screener 頁面的手機樣式仍一律寫在 :root[data-ui="mobile"] 之下。 */
@media (max-width: 1450px) { .guide-search { margin-left: 2rem; margin-right: 2rem; } }
@media (max-width: 1000px) { .guide-layout { grid-template-columns: 200px minmax(0, 1fr); padding: 1.5rem 1rem; gap: 1.2rem; } .guide-search { margin-left: 1rem; margin-right: 1rem; } main { padding: 1.5rem; } }
@media (max-width: 760px) { .guide-header { padding: .75rem 1rem; gap: .5rem 1rem; } .guide-header > a:last-child { flex-basis: 100%; } .guide-layout { display: block; padding: 1rem .6rem; } .guide-search { margin: 1rem .6rem 0; padding: 1rem; } .guide-find { right: .6rem; bottom: .6rem; } aside { position: static; max-height: none; overflow: visible; } aside > .guide-contents:first-child { max-height: 16rem; overflow: auto; } .guide-contents { margin: 0 .6rem 1rem; } .guide-all:not([open]) { margin-top: 0; } main { padding: 1.5rem 1rem; border-radius: .6rem; } h2 { font-size: 1.35rem; } th, td { padding: .6rem; } }
@media print { :root { background: white; font-size: 10pt; } .guide-header, .guide-search, .guide-find, aside, .skip-link, [data-guide="retry"] { display: none; } mark.guide-hit, mark.guide-hit.is-current { background: none; outline: none; } .guide-layout { display: block; padding: 0; max-width: none; } main { border: 0; padding: 0; } pre { white-space: pre-wrap; } .guide-table { overflow: visible; } h2, h3 { break-after: avoid; } img, tr { break-inside: avoid; } }
