/* 清單頁與公開頁（版型 1「報告式」）：選股三頁、收藏、帳號（Devise）、找不到個股與
   權限不足、首頁、使用條款。每一頁由上往下讀：頁首一句結論 → 切換與篩選 → 一行結果摘要 → 表。 */

/* ── 選股三頁與收藏的共用骨架 ──
   篩選列（a.pill：spec 鎖住的舊名，外觀等同 chip）→ 摘要列（左：幾檔、怎麼排；收藏頁右邊是
   排序）→ 表格卡 → 分頁與一行註腳。 */
/* 選股三頁的篩選列：一組一列（ApplicationHelper#filter_group）。左欄組名、寬度取最寬的那個，
   右欄 pill——每一組的 pill 都從同一條線開始，「納不納入」的開關是最後一組。 */
.filter-bar{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:.625rem 1rem;margin:0 0 1.25rem}
/* 組名對齊這一組的第一排 pill：pill 折成好幾排時，組名不會跑到中間那排 */
.filter-label{display:flex;align-items:center;min-height:2.1875rem;color:var(--muted);font-size:.875rem;font-weight:600;white-space:nowrap}
.filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.filter-row--full{grid-column:1/-1}
/* 篩選列的 pill 放大成 chip 的尺寸：這是這一頁主要的操作，不是表內的小徽章 */
.filter-bar .pill{display:inline-flex;align-items:center;padding:.375rem 1rem;line-height:1.4}
.list-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem 1rem;margin:0 0 1rem}
.list-summary{margin:0;color:var(--muted);font-size:.9766rem}
.list-sort{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}
.list-sort-label{color:var(--muted);font-size:.875rem;margin-right:.25rem}

/* 表格卡：表頭那條淡金帶貼齊卡片上緣（卡片圓角裁掉表頭兩端），列高放寬到一眼掃得完 */
.list-table{margin-top:0;padding:0;overflow:hidden}
.list-table .tbl-wrap{margin:0}
.list-table :is(.runs,.runs-table) thead th:is(:first-child,:last-child){border-radius:0}
.list-table :is(.runs,.runs-table) th{padding:.75rem .75rem;font-size:.9375rem}
.list-table :is(.runs,.runs-table) td{padding:.8125rem .75rem;vertical-align:middle}
.list-table :is(.runs,.runs-table) :is(th,td):first-child{padding-left:1.25rem}
.list-table :is(.runs,.runs-table) :is(th,td):last-child{padding-right:1.25rem}
.list-table .c-sym a{font-weight:500}
.list-table .c-name a{color:var(--text);font-weight:600}
.list-table .c-name a:hover{color:var(--gold)}
th.score-h{text-align:center}
.list-table :is(td.c-f,.fscore td.c-score,.turnaround td.c-score){text-align:center}
.list-table .tag{margin:.125rem .25rem .125rem 0}
.list-empty{margin-top:0}
.list-empty p{margin:0}
.locked--list{margin-top:0}
.list-foot .pager{justify-content:center;margin-top:1.25rem}
.list-note{margin:1rem 0 0;color:var(--muted);font-size:.875rem}

/* F 分數表：九題是非，置中的勾比左對齊的勾好掃；沒過的那一題紅叉 */
.fscore td.flag,.fscore th.flag-h{text-align:center}
.fscore th.flag-h{white-space:nowrap}
.fscore td.flag{font-weight:600}
.screener strong{color:var(--text)}
.screener td.c-yoy3.pos strong{color:var(--green)}
.screener td.c-yoy3.neg strong{color:var(--red)}

/* ── 三種選股法的切換卡（screener/_strategies）：三張並排的白卡。名稱與檔數一列、規則
   一行；目前這一頁金框、名稱實色、檔數金色。外觀只看 aria-current。
   找不到個股頁也用它當三個入口（沒有目前頁，名稱一律實色，見 .nf）。 ── */
.strategy-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:0 0 1.5rem}
.strategy-card{display:flex;flex-direction:column;gap:.375rem;min-width:0;padding:1.125rem 1.375rem;
  background:var(--panel);border:.0625rem solid var(--line);border-radius:var(--r-card);color:var(--text);text-decoration:none}
.strategy-card:hover{border-color:var(--gold-dim)}
.strategy-card[aria-current]{border:.125rem solid var(--primary);padding:calc(1.125rem - .0625rem) calc(1.375rem - .0625rem)}
.strategy-top{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}
.strategy-name{font-family:var(--title);font-weight:700;font-size:1.25rem}
.strategy-count{flex-shrink:0;color:var(--muted);font-size:.8125rem;white-space:nowrap}
.strategy-n{font-family:var(--mono);font-size:1.25rem;font-weight:500}
.strategy-card:not([aria-current]) .strategy-name{color:var(--muted)}
.strategy-card[aria-current] .strategy-n{color:var(--gold)}
.strategy-desc{color:var(--muted);font-size:.875rem;text-wrap:pretty}

/* ── 收藏 ── */
.watch td.c-act{text-align:right}
.watch .button_to{margin:0}
/* 移除是低調的文字鈕：一列一顆，金色大鈕排成一整欄會搶走數字的注意力 */
.watch-remove{background:none;border:0;padding:.25rem .25rem;color:var(--muted);font:inherit;font-size:.9375rem;cursor:pointer}
.watch-remove:hover{color:var(--red);text-decoration:underline}
.watch-remove:focus-visible{outline:.125rem solid var(--gold);outline-offset:.125rem;border-radius:.375rem}
.watch-ym{margin-left:.25rem;font-family:var(--sans)}
/* 漲跌旁的日期（停牌等原因，最新收盤不是最新交易日的那幾檔）：附註，不跟著漲跌上色 */
.watch td.c-chg .watch-ym{color:var(--muted)}
.watch-unit{display:none;font-family:var(--sans)}

/* ── 表格版（手機以外）的密度：不折行，太窄時外層 .tbl-wrap 橫捲——名稱、產業被擠成一字
   一行比橫捲難讀得多。手機的卡片版有自己的字級（見窄斷點）。
   用視窗寬度、跟卡片版同一把尺：量內容欄（@container main）的話，視窗 768–831 時內容欄
   還不到 48rem、卡片版又已經結束，兩邊都不管，名稱就一字一行。 ── */
@media (min-width: 48rem){
  .screener,.fscore,.turnaround{font-size:1rem}
  .screener th,.fscore th,.turnaround th,.watch th{white-space:nowrap}
  .screener td:not(.c-sig),.fscore td,.turnaround td:not(.c-miss),.watch td:not(.c-gone){white-space:nowrap}
}

/* ── 帳號頁（Devise：登入／註冊／忘記密碼／設定新密碼）：置中一張卡，欄位直排、
   標籤在上；送出鈕撐滿卡片寬（表單只有一個動作，全寬的金鈕就是「下一步」）。
   帳號設定（registrations/edit）在窄欄裡，頁首＋兩張卡，共用同一組欄位樣式。 ── */
.auth{display:flex;flex-direction:column;align-items:center;padding:2.5rem 0 1rem}
.auth-card{width:min(27.5rem,100%);margin-top:0;padding:2.25rem;box-shadow:var(--shadow-pop)}
/* 註冊頁（devise/registrations/new）副標下面的會員額度：一格一個量，淡金底，大字是額度 */
.auth-perks{margin:-.5rem 0 1.5rem;padding:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.625rem}
.auth-h + .auth-perks{margin-top:1rem}   /* 沒有副標時（2026-10-27 起預設不放）跟標題拉開 */
.auth-perk{display:flex;flex-direction:column;gap:.125rem;padding:.75rem .875rem;border-radius:.625rem;background:var(--panel-2);border:.0625rem solid var(--line)}
.auth-perk-k{color:var(--muted);font-size:.8125rem;font-weight:600}
.auth-perk-v{font-size:1.125rem;line-height:1.4}
.auth-perk-note{color:var(--gold);font-size:.8125rem;font-weight:600}
.auth-mark{display:block;width:2.5rem;height:2.5rem;margin-bottom:1rem}
.auth-h{margin:0 0 .375rem;font-size:2rem;line-height:1.3}
.auth-lead{margin:0 0 1.5rem;font-size:.9766rem;line-height:1.6;text-wrap:pretty}
.auth-form{display:flex;flex-direction:column;gap:1.125rem}
.auth-form label{display:flex;flex-direction:column;gap:.5rem;font-size:.9766rem;font-weight:600;color:var(--text)}
.auth-form input:not([type=checkbox],[type=submit]){width:100%;padding:.75rem 1rem;font-weight:400}
.auth-form input::placeholder{color:var(--muted)}
/* 註冊頁的使用條款捲動框與同意勾選（devise/registrations/new，terms-consent） */
.auth-terms{max-height:12rem;overflow-y:auto;padding:.75rem 1rem;border:.0625rem solid var(--line);border-radius:.5rem;background:var(--panel-2);font-size:.8125rem;line-height:1.6}
.auth-terms:focus-visible{outline:.125rem solid var(--primary);outline-offset:.125rem}
.auth-terms-h{margin:0 0 .5rem;font-size:.875rem}
.auth-terms .legal-h{font-size:.8125rem}
.auth-form label.auth-check{flex-direction:row;align-items:flex-start;gap:.5rem;font-weight:400}
.auth-check input{margin-top:.25rem;flex:none}
/* 還沒勾同意時 Google／Facebook 按鈕鎖著（terms-consent），看得出按不了 */
.auth-card .google-btn:disabled,.auth-card .facebook-btn:disabled{opacity:.45;cursor:not-allowed}
/* 密碼欄＋「顯示密碼」鈕（devise/shared/_password_field）：標籤與欄位分開寫（鈕不能在 <label> 裡），
   .auth-field 補回 label 的直排間距。鈕疊在欄位右側，最右邊留一截給 1Password 的欄內圖示；
   Safari 的鑰匙圖示在內容框裡，靠 padding-right 讓開。Edge 自己的眼睛關掉，免得出現兩顆。 */
.auth-field{display:flex;flex-direction:column;gap:.5rem}
.pw-field{position:relative;display:flex}
.auth-form .pw-field input{padding-right:4.75rem}
.pw-field input::-ms-reveal{display:none}
.pw-toggle{position:absolute;top:0;bottom:0;right:2rem;display:grid;place-items:center;width:2.5rem;padding:0;
  border:0;background:none;color:var(--muted);cursor:pointer}
.pw-toggle[hidden]{display:none}
.pw-toggle:hover{color:var(--text)}
.pw-toggle:focus-visible{outline:.125rem solid var(--gold);outline-offset:-.25rem;border-radius:var(--r-inner)}
.pw-toggle svg{width:1.25rem;height:1.25rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pw-toggle[aria-pressed=false] .pw-slash{display:none}
.auth-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}
.auth-form .auth-check{flex-direction:row;align-items:center;gap:.5rem;margin:0;font-weight:400}
.auth-forgot{font-weight:700;font-size:.9375rem;text-decoration:none}
.auth-forgot:hover{text-decoration:underline}
.auth-form .btn{align-self:stretch;align-items:center;padding:.8125rem 1.125rem;margin-top:.25rem}
.auth-note{margin:-.375rem 0 0;color:var(--muted);font-size:.875rem;line-height:1.6;text-align:center;text-wrap:pretty}
/* 「使用 Google 帳戶繼續」（devise/shared/_google）：白底、#747775 細框、#1f1f1f 字是 Google 的品牌規範，
   不套站上的金色。下面一條「或」分隔線，再來才是 Email 表單。 */
.google-form{margin:0}
.google-btn{width:100%;flex-direction:row;justify-content:center;align-items:center;gap:.625rem;padding:.8125rem 1.125rem;background:#fff;border-color:#747775;color:#1f1f1f;font-weight:500}
.google-g{width:1.125rem;height:1.125rem;flex:none}
.google-btn:hover{background:#f2f2f2;border-color:#747775}
/* App 的內建瀏覽器（Google 會擋）：Google 那一格換成提示。LINE 多一顆換到外部瀏覽器的鈕 */
.inapp-google{display:flex;flex-direction:column;gap:.75rem;padding:1rem 1.125rem;border:.0625rem solid var(--line);border-radius:.75rem;background:var(--panel-2)}
.inapp-google p{margin:0;font-size:.9375rem;line-height:1.6}
.inapp-open{width:100%;align-items:center;font-weight:600}
.inapp-note{margin:0 0 1.25rem;font-size:.875rem;line-height:1.6;text-wrap:pretty}
/* 「使用 Facebook 帳戶繼續」：#1877f2 藍底、白字白 f 是 Meta 的品牌規範。按鈕的形狀跟 Google 那顆一樣 */
.facebook-form{margin:0}
.facebook-btn{width:100%;flex-direction:row;justify-content:center;align-items:center;gap:.625rem;padding:.8125rem 1.125rem;background:#1877f2;border-color:#1877f2;color:#fff;font-weight:500}
.facebook-btn:hover{background:#166fe5;border-color:#166fe5;color:#fff}
.facebook-f{width:1.25rem;height:1.25rem;flex:none}
/* Google、Facebook 疊在一起（devise/shared/_oauth）。後面沒有「或」（只有 App 內的提示）時自己留底下的距離 */
.auth-oauth{display:flex;flex-direction:column;gap:.75rem}
.auth-oauth .inapp-note{margin:0}
.auth-oauth:not(:has(+ .auth-or)){margin-bottom:1.25rem}
.auth-or{display:flex;align-items:center;gap:.75rem;margin:1.25rem 0;color:var(--muted);font-size:.875rem}
.auth-or::before,.auth-or::after{content:"";flex:1;border-top:.0625rem solid var(--line)}
.auth-alt{margin:1.5rem 0 0;padding-top:1.25rem;border-top:.0625rem solid var(--line);text-align:center;
  color:var(--muted);font-size:.9766rem;line-height:1.8}
.auth-alt a{margin-left:.25rem;font-weight:700;text-decoration:none}
.auth-alt a:hover{text-decoration:underline}
.auth-dot{margin:0 .625rem}
.auth-errors{list-style:none;margin:0;padding:.5625rem .875rem}
.auth-sep{border:0;border-top:.0625rem solid var(--line);margin:.25rem 0}

/* ── 註冊頁（devise/registrations/new，2026-10-28 Joey 選的設計稿）：寬螢幕左右分欄（C），左欄淡金底放會員額度與
   台積電月營收小圖、右欄是表單；窄螢幕一張精簡卡（A），貓頭與標題一列，額度收成標題下的一條、中間一條直線隔開。
   兩種的表單順序相同，窄螢幕只是不畫左欄。 ── */
.signup-main{display:flex;flex-direction:column;gap:1.125rem}
.signup-main > *,.signup-main .auth-oauth{margin:0}
.signup-head{display:flex;align-items:center;gap:.875rem}
.signup-head > *{margin:0}
.signup-strip{display:flex;padding:.75rem 0;list-style:none;border-radius:var(--r-inner);background:var(--panel-2)}
.signup-strip li{flex:1;display:flex;flex-direction:column;gap:.125rem;min-width:0;padding:0 1rem}
.signup-strip li + li{border-left:.0625rem solid var(--gold-dim)}
.signup-main .auth-check a{font-weight:600}
.signup-foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem 1rem;font-size:.875rem}
.signup-foot .auth-alt{margin:0;padding:0;border:0;font-size:.875rem}
.signup-show{display:none}
.signup-brand{display:flex;align-items:center;gap:.75rem;margin:0;font-family:var(--title);font-size:1.375rem;font-weight:700}
.signup-brand img{width:2.5rem;height:2.5rem}
.signup-perks{display:flex;flex-direction:column;gap:1rem;margin:0;padding:0;list-style:none}
.signup-perk{display:flex;align-items:center;gap:.875rem}
.signup-perk-i{display:grid;place-items:center;flex:none;width:2.5rem;height:2.5rem;border-radius:.75rem;background:var(--panel)}
.signup-perk-i svg{width:1.25rem;height:1.25rem;fill:none;stroke:var(--gold);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.signup-perk-t{display:flex;flex-direction:column}
.signup-perk-v{font-family:var(--title);font-size:1.375rem;line-height:1.35}
.signup-sample{margin:0;padding:1.125rem 1.25rem 1rem;border-radius:1rem;background:var(--panel);box-shadow:var(--shadow-card)}
.signup-sample-h{display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.9375rem;font-weight:700}
.signup-sample-h .mono{color:var(--muted);font-weight:500}
.signup-sample-yoy{flex:none;padding:.125rem .625rem;border-radius:var(--r-pill);background:var(--panel-2);font-size:.75rem}
.signup-sample-yoy.pos{background:var(--good-bg)}
.signup-sample-yoy.neg{background:var(--bad-bg)}
.signup-sample .sample-bars{height:6.5rem}
.signup-sample-x{display:flex;justify-content:space-between;margin:.375rem 0 0;color:var(--muted);font-size:.6875rem}
@media (min-width: 60rem){
  .auth-card.signup{width:min(57.5rem,100%);padding:0;display:grid;grid-template-columns:minmax(0,11fr) minmax(0,12fr);overflow:hidden}
  .signup-show{display:flex;flex-direction:column;gap:1.75rem;padding:2.5rem;background:var(--panel-2)}
  .signup-main{padding:2.5rem 2.75rem 2rem}
  .signup-mark,.signup-strip{display:none}
}

.page-lead .tag{margin-left:.375rem;vertical-align:.0625rem}
.acct-card{margin-top:0;padding:1.75rem 2rem}
.acct-card + .acct-card{margin-top:1.25rem}
.acct-h{margin:0 0 1.25rem;font-size:1.25rem}
/* 綁了 Google／Facebook 的會員的「登入方式」：白底圓框裡的 G 或 f，右邊是「Google 帳戶」與 Email */
.acct-method{display:flex;align-items:center;gap:.875rem}
.acct-method-mark{display:grid;place-items:center;flex:none;width:2.75rem;height:2.75rem;border:.0625rem solid var(--line);border-radius:50%;background:#fff}
.acct-method-mark img{width:1.25rem;height:1.25rem}
.acct-method-mark .facebook-f{color:#1877f2}
.acct-method + .acct-method{margin-top:1rem}
.acct-method-text{display:flex;flex-direction:column;gap:.125rem;min-width:0;overflow-wrap:anywhere}
/* 一句說明＋一顆按鈕的卡（刪除帳號；後台會員頁的解除鎖定、寄重設密碼信）。危險的那張框線轉紅。 */
.acct-row,.acct-danger{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:1rem}
.acct-danger{border-color:var(--bad-line)}
:is(.acct-row,.acct-danger) .acct-h{margin-bottom:.25rem}
:is(.acct-row,.acct-danger) p{margin:0;font-size:.9375rem}
:is(.acct-row,.acct-danger) .button_to{margin:0}

/* ── 找不到個股、權限不足：置中的空狀態（大貓頭、一句原因、下一步） ── */
.nf{max-width:52.5rem;margin:0 auto;padding:3rem 0 1rem;text-align:center}
.nf-mark{width:7rem;height:7rem;margin:0 auto 1.5rem;border-radius:50%;background:var(--panel-2);
  display:flex;align-items:center;justify-content:center}
.nf-mark-img{display:block;width:3.25rem;height:3.25rem}
.nf-h{margin:0;font-size:2.25rem;line-height:1.3;overflow-wrap:anywhere}
.nf-lead{margin:.875rem 0 1.75rem;color:var(--muted);font-size:1.0625rem}
.nf-search{display:flex;gap:.75rem;max-width:33rem;margin:0 auto;text-align:left}
.nf-field{flex:1;min-width:0}
.nf-field input{padding:.875rem 1.25rem .875rem 2.75rem;font-size:1.0625rem;background-position:1.125rem 50%}
.nf-search .btn{flex-shrink:0;align-items:center;padding:.75rem 1.5rem}
.nf-back{display:inline-flex}
/* 分隔線中間夾一句話 */
.nf-or{display:flex;align-items:center;gap:1rem;margin:2.5rem 0 1.25rem;color:var(--muted);font-size:.9375rem}
.nf-or::before,.nf-or::after{content:"";flex:1;border-top:.0625rem solid var(--line)}
.nf .strategy-switch{margin:0;text-align:left}
.nf .strategy-card .strategy-name{color:var(--text)}
.nf .strategy-n{color:var(--gold)}

/* ── 首頁（訪客的 landing）──────────────────────────────────────────────
   hero（左：一句話＋搜尋；右：一張真資料的範例報告）→ 三種選股清單 → 五章十二張圖
   → 資料從哪來 → 註冊邀請。跟站內頁面同一套語彙，只是字級與留白放大。 */
.hero{padding:2rem 0 .5rem}
.hero--sample{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,23.5rem);gap:2.5rem 4rem;align-items:center}
.hero-main{max-width:40rem}
.hero-kicker{margin:0 0 .75rem;color:var(--gold);font-size:.9375rem;font-weight:700;letter-spacing:.04em}
.hero h1{font-size:3rem;line-height:1.25;margin:0 0 1.125rem;letter-spacing:-.01em;text-wrap:balance}
/* 日文的大標只在標點與 <wbr>（翻譯檔裡標好的詞界）換行，片假名長詞不會從中間斷開 */
.hero h1:lang(ja){word-break:keep-all}
/* text-wrap:pretty：不讓最後一行只剩「不用註冊。」四個字孤懸 */
.hero-lead{font-size:1.125rem;color:var(--muted);margin:0 0 1.75rem;line-height:1.75;text-wrap:pretty}
.hero-search{display:flex;gap:.75rem;flex-wrap:wrap;align-items:stretch}
/* 外觀是共用的 .search（全圓、放大鏡）；這裡只放大一號、讓它吃掉按鈕以外的寬度 */
.hero-field{flex:1 1 18rem;min-width:0}
.hero-field input{font-size:1.0625rem;padding:.875rem 1.25rem .875rem 2.75rem;background-position:1.125rem 50%}
.hero-cta{white-space:nowrap;align-items:center;padding:.75rem 1.5rem}

/* 範例報告卡：白卡浮起來，數字用 DM Mono。月營收的小柱從 0 起算（跟個股頁的營收圖
   同一種圖：一般柱 --chart-bar、最新一根深金、缺月灰槽）。 */
.sample{background:var(--panel);border:.0625rem solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow-pop);
  padding:1.5rem 1.625rem 1.25rem;min-width:0}
.sample p{margin:0}
.sample-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.sample-kicker{color:var(--gold);font-size:.8125rem;font-weight:700}
.sample-tags{display:flex;gap:.375rem}
.sample .sample-name{margin-top:.75rem;font-family:var(--title);font-weight:700;font-size:1.625rem;line-height:1.3}
.sample-name a{color:var(--text);text-decoration:none}
.sample-name a:hover{color:var(--gold)}
.sample-name .mono{color:var(--gold);font-weight:500}
.sample .sample-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:.25rem .625rem;margin-top:.375rem;
  font-family:var(--mono);font-size:.9375rem}
.sample-close{font-size:1.375rem;font-weight:500;color:var(--text)}
.sample-price small{font-family:var(--sans);font-size:.8125rem}
.sample-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin:1.125rem 0 0}
.sample-metric{background:var(--panel-2);border-radius:var(--r-inner);padding:.5rem .75rem;min-width:0}
.sample-metric dt{color:var(--muted);font-size:.8125rem}
.sample-metric dd{margin:.125rem 0 0;font-family:var(--mono);font-weight:500;font-size:1.0625rem;white-space:nowrap}
.sample .sample-rev{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:.25rem .75rem;margin-top:1.25rem}
.sample-rev-h{font-weight:700;font-size:.9375rem}
.sample-rev-n{color:var(--muted);font-size:.8125rem}
.sample-rev-n .pos{color:var(--green)}
.sample-bars{display:flex;align-items:flex-end;gap:.375rem;height:5rem;margin-top:.625rem;
  border-bottom:.0625rem solid var(--line)}
.sample-bar{flex:1;min-height:.125rem;background:var(--chart-bar);border-radius:.1875rem .1875rem 0 0}
.sample-bar.is-last{background:var(--gold-deep)}
.sample-bar.is-gap{height:100%;background:var(--chart-gap)}
.sample-foot{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;margin-top:.875rem;
  color:var(--muted);font-size:.8125rem}
.sample-more{font-weight:700;text-decoration:none}
.sample-more:hover{text-decoration:underline}

.landing-sec{margin-top:4rem}
.landing-sec-h{display:flex;align-items:baseline;gap:.875rem;flex-wrap:wrap;margin-bottom:1.25rem}
.landing-sec-h h2{font-size:1.875rem}
.landing-sec-h .muted{font-size:.9375rem}
/* 首頁的方案區塊（home/index）：兩張方案卡底下一行連到完整的方案頁 */
.landing-plans-more{margin:1rem 0 0;text-align:center}
.landing-plans-more a{color:var(--gold);font-weight:600;text-decoration:none}
/* 首頁的產業月營收（industries/_tile 的格子）：一句全市場摘要、兩列四格、看全部的連結 */
.landing-ind-summary{margin:-.5rem 0 1rem;font-size:1.0938rem;text-wrap:pretty}
.landing-ind-summary strong{font-family:var(--mono);font-weight:600}
.industry-grid.industry-grid--home{grid-template-columns:repeat(4,minmax(0,1fr))}   /* 兩個 class：.industry-grid 的欄數寫在檔案後面 */
.landing-more{margin:1rem 0 0;text-align:center}
.landing-more a{color:var(--gold);font-weight:600;text-decoration:none}
.landing-more a:hover{text-decoration:underline}
.landing-plans-more a:hover{text-decoration:underline}
.landing-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem}
.pick{margin-top:0;display:flex;flex-direction:column;padding:1.375rem 1.5rem 1rem}
.pick-h{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem}
.pick-h h3{margin:0;color:var(--text);font-family:var(--title);font-weight:700;font-size:1.25rem;
  text-transform:none;letter-spacing:0}
.pick-h a{text-decoration:none;font-size:.875rem;font-weight:700;white-space:nowrap}
.pick-h a:hover{text-decoration:underline}
.pick-d{margin:.375rem 0 .75rem;font-size:.875rem;line-height:1.55}
/* 名次用 counter 畫：ol 本身已經告訴讀屏器這是有序清單，數字只是給眼睛的 */
.pick-list{list-style:none;margin:auto 0 0;padding:0;counter-reset:pick}
.pick-list li + li{border-top:.0625rem solid var(--line-soft)}
.pick-list a{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;padding:.25rem 0;text-decoration:none;color:var(--text)}
.pick-list a::before{counter-increment:pick;content:counter(pick);width:.75rem;color:var(--muted);font-family:var(--mono);font-size:.8125rem}
.pick-list a:hover .name{color:var(--gold)}
.pick-list .sym{font-family:var(--mono);color:var(--gold);font-size:.9375rem}
.pick-list .name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.pick-list .val{font-family:var(--mono);font-size:.9375rem;font-variant-numeric:tabular-nums}
/* 選股清單鎖著時（home/_locked_picks）：一張卡、一個鎖。上面三欄名稱與規則（沿用 .pick-h／.pick-d），
   底下三欄模糊的示意列，中間的鎖卡是 stock.css 的 .locked-cta。示意列的高度跟真的 .pick-list 一樣。 */
.picks-locked{margin-top:0;padding:1.375rem 1.5rem 1.25rem}
/* 三欄放得下就並排、放不下才往下排（平板寬度仍是三欄）；示意列同一條規則，排到下面的被 .locked 裁掉 */
.picks-heads{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:1.25rem;list-style:none;margin:0;padding:0}
.picks-name{display:block;color:var(--text);font-family:var(--title);font-weight:700;font-size:1.25rem;line-height:1.5}
.picks-heads .pick-d{margin-bottom:0}
.picks-lock{min-height:17.25rem;margin-top:.75rem;padding:1rem 0}
.picks-lock .locked-title{word-break:keep-all;overflow-wrap:anywhere;text-wrap:balance}
.picks-lock .locked-art{inset:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:1.25rem;opacity:.85}
.picks-ph{list-style:none;margin:0;padding:0}
.picks-ph li{display:flex;align-items:center;gap:.75rem;height:2.75rem}
.picks-ph li + li{border-top:.0625rem solid var(--line-soft)}
.picks-ph span{display:block;height:.75rem;border-radius:var(--r-pill)}
.picks-ph .ph-n{width:.5rem;background:var(--line)}
.picks-ph .ph-sym{width:2.5rem;background:var(--gold-dim)}
.picks-ph .ph-name{background:var(--line)}
.picks-ph .ph-val{width:3.5rem;margin-left:auto;background:var(--good-line)}
.picks-ph--1 .ph-val{width:1.75rem;height:1.75rem;background:var(--primary)}
.picks-ph--2 .ph-val{background:var(--line)}

/* 五章十二張圖：一張白卡、一章一列。左邊章號＋章名＋張數，右邊這一章的分析兩欄排。 */
.tour{list-style:none;margin:0;padding:0;background:var(--panel);border:.0625rem solid var(--line);
  border-radius:var(--r-card);box-shadow:var(--shadow-card)}
.tour-ch{display:grid;grid-template-columns:14rem minmax(0,1fr);gap:1rem 2rem;padding:1.5rem 2rem}
.tour-ch + .tour-ch{border-top:.0625rem solid var(--line)}
.tour-ch-h{display:flex;align-items:center;gap:.625rem;align-self:start}
.tour-num{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:2.25rem;height:2.25rem;
  border-radius:50%;background:var(--panel-2);color:var(--gold);font:500 1rem/1 var(--mono)}
.tour-ch-title{margin:0;color:var(--text);font-family:var(--title);font-weight:700;font-size:1.375rem;
  text-transform:none;letter-spacing:0}
.tour-n{padding:0 .5rem;border:.0625rem solid var(--line);border-radius:var(--r-pill);color:var(--muted);font-size:.75rem;line-height:1.5}
.tour-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.25rem 2.5rem}
.tour-list a{display:block;padding:.375rem 0;text-decoration:none;color:var(--text)}
.tour-list strong{display:block;font-size:1rem}
.tour-list strong span{color:var(--gold)}
.tour-list small{display:block;margin-top:.125rem;color:var(--muted);font-size:.875rem;line-height:1.5}
.tour-list a:hover strong{color:var(--gold)}

/* 資料從哪來：四個大數字，上面一條深金線，不再裝進卡片 */

/* ── 產業月營收（/industries、/industries/:code）──
   格狀圖：一格一個產業，所有格子共用同一把刻度（Industries::Sparkline），才能橫著比。全市場那格排第一、
   框線深一階、不是連結（它沒有成分股頁）。折線用系列色 --s1：線本身不帶好壞，好壞在上面那個數字的綠紅。 */
.industry-hint{margin:-.5rem 0 1rem;color:var(--muted);font-size:.9375rem}
.industry-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));gap:.625rem;margin:0;padding:0;list-style:none}
.industry-tile{display:flex;flex-direction:column;height:100%;padding:.625rem .75rem .5rem;background:var(--panel);
  border:.0625rem solid var(--line);border-radius:var(--r-inner);color:var(--text);text-decoration:none}
.industry-tile--market{border-color:var(--gold-deep)}
a.industry-tile:hover{border-color:var(--gold-deep)}
a.industry-tile:hover .industry-tile-name{color:var(--gold)}
.industry-tile-h{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;font-size:.9375rem}
.industry-tile-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.industry-tile-n{color:var(--muted);font-size:.8594rem;white-space:nowrap}
.industry-tile-v{margin-top:.125rem;font-family:var(--mono);font-weight:500;font-size:1.375rem}
.industry-tile-v:where(:not(.pos,.neg)){color:var(--text)}
.industry-tile-sub{margin-top:auto;color:var(--muted);font-size:.8594rem}
.industry-tile-pending{color:var(--gold);font-size:.8594rem}
/* 英文版的格子名稱被截成省略號時，滑過浮出完整名稱（industries/_tile 的 data-tip）。純 CSS：寬度不超過格子、
   長名稱在格子內換行，靠右欄的格子也不會超出視窗。只有能 hover 的裝置與鍵盤聚焦才顯示（觸控點下去是進產業頁）。 */
.industry-tile[data-tip]{position:relative}
.industry-tile[data-tip]::after{content:attr(data-tip);position:absolute;left:0;bottom:calc(100% + .375rem);z-index:30;
  width:max-content;max-width:100%;box-sizing:border-box;padding:.375rem .625rem;border-radius:.5rem;
  background:var(--text);color:var(--panel);font-size:.875rem;font-weight:600;line-height:1.3;
  box-shadow:0 .25rem .75rem rgb(59 42 26 / .25);pointer-events:none;visibility:hidden;opacity:0;transition:opacity .12s}
.industry-tile[data-tip]:focus-visible::after{visibility:visible;opacity:1}
@media (hover:hover){.industry-tile[data-tip]:hover::after{visibility:visible;opacity:1}}
.spark{display:block;width:100%;height:auto;margin:.25rem 0}
.spark-base{stroke:var(--muted);stroke-width:1;stroke-dasharray:2 3;stroke-opacity:.45;vector-effect:non-scaling-stroke}
.spark-line{fill:none;stroke:var(--s1);stroke-width:1.75;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.spark-dot{fill:var(--s1);stroke:var(--panel);stroke-width:1.5}
/* 產業頁：五個數字卡 → 三張常駐圖卡（三個成長量）→ 成分股表。表的數字欄靠右 */
/* 五張卡：比站上預設的 10rem 寬一點，窄的時候寧可折成兩排，也不要把月營收擠成兩行 */
.industry-metrics{margin:0 0 1.25rem;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr))}
.industry-metrics .metric-value{white-space:nowrap}
/* 三張圖卡：一欄排下來；桌機（48rem 以上，見下面的 media）年增率滿寬、後兩張並排 */
.industry-charts{display:grid;grid-template-columns:minmax(0,1fr);gap:1.25rem;margin:0 0 1.75rem}
.industry-chart{margin:0;min-width:0}
/* 圖卡標題：個股頁的卡片標題樣式只套在 .stock-report 裡，這裡比照（字級、字型同 stock.css） */
.industry-chart .chart-head > h2{grid-area:title;min-width:0;margin:0;font-family:var(--title);font-weight:700;font-size:1.25rem;color:var(--text)}
.industry-section-h{margin:0 0 .75rem;font-size:1.375rem}
/* 成分股的 turbo-frame 換內容前會接住焦點（frame_keep_scroll_controller.js）：焦點在容器上，不畫外框 */
#industry-companies:focus{outline:none}
.industry-companies :is(th,td).num{text-align:right;white-space:nowrap}
@media (min-width: 48rem){
  .industry-charts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .industry-chart--wide{grid-column:1/-1}
  /* 並排的兩張讀值列一樣高：家數比例多一行「幾家成長、幾家衰退」，不撐齊的話兩張圖的 y 軸上下錯開 */
  .industry-chart:not(.industry-chart--wide) .chart-readout{min-height:4.25rem}
}

/* 首頁在中等寬度：範例報告移到 hero 下方、選股清單與十二張圖收成較少欄 */
@container main (max-width: 60rem){
  .hero--sample{grid-template-columns:minmax(0,1fr)}
  .hero--sample .sample{max-width:28rem}
  .landing-grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* 三張排兩欄，落單的第三張拉滿一列，不在右邊留一個洞 */
  .landing-grid-3 > :last-child:nth-child(odd){grid-column:1 / -1}
  .tour-ch{grid-template-columns:minmax(0,1fr)}
}

/* ── 使用條款與隱私權政策（pages/terms、pages/privacy）：窄欄（main--narrow）裡由上往下讀的長文。
   各節是有序清單，節號用 CSS counter 印在標題前面，跟標題同字級、同一條基線（清單自帶的編號欄是內文字級，
   對不齊標題）。內文的連結（聯絡信箱）加底線：它夾在句子裡，只靠顏色認不出來。 ── */
.legal-intro{margin:0 0 1.75rem;text-wrap:pretty}
.legal-list{margin:0;padding:0;list-style:none;counter-reset:legal}
.legal-item{counter-increment:legal}
.legal-item + .legal-item{margin-top:1.5rem}
.legal-h{font-size:1.125rem}
.legal-h::before{content:counter(legal) ". ";color:var(--muted)}
.legal-item p{margin:.375rem 0 0;line-height:1.8;text-wrap:pretty}
.legal a{text-decoration:underline;text-underline-offset:.1875rem}
.legal-updated{margin:2.5rem 0 0;color:var(--muted);font-size:.875rem}

/* ── 方案與價格（pages/pricing）：兩個方案 → 收費方式。沿用首頁的 .landing-sec 間距。 ── */
.plan-sec-h{font-size:1.5rem;margin:0 0 1rem}
.plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.25rem}
.plan-grid > .panel{margin-top:0}
/* h3 預設是灰字、英文全大寫的區塊標頭（base.css）；這裡是卡片標題，比照首頁的 .pick-h h3 改回一般字 */
.plan-name{color:var(--text);font-family:var(--title);font-weight:700;text-transform:none;letter-spacing:0}
.plan{display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 1.75rem}
.plan--plus{border-color:var(--gold-dim)}
.plan-name{margin:0;display:flex;align-items:center;flex-wrap:wrap;gap:.625rem;font-size:1.25rem}
.plan-price{margin:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:.375rem}
.plan-amount{font-family:var(--mono);font-weight:500;font-size:2.25rem;line-height:1.2}
/* 有折扣時劃掉的原價（SubscriptionsHelper#plan_price）：次要色、不搶折扣價；方案卡片上用等寬字、比折扣價小一截 */
.price-was{color:var(--muted);font-weight:400;text-decoration-thickness:.0625rem}
.plan-price .price-was{font-family:var(--mono);font-size:1.25rem}
.plan-list{margin:0;padding-left:1.25rem;line-height:1.8}
.plan-cta{margin-top:auto;padding-top:.5rem;display:flex}
.plan-cta .btn{align-items:center;padding:.75rem 1.75rem}
.plan-terms{margin:0;padding:.5rem 1.5rem}
.plan-terms > div{display:grid;grid-template-columns:8rem minmax(0,1fr);gap:1rem;padding:.75rem 0}
.plan-terms > div + div{border-top:.0625rem solid var(--line-soft)}
.plan-terms dt{color:var(--muted);font-weight:600}
.plan-terms dd{margin:0;line-height:1.7;text-wrap:pretty}
.plan-terms a{text-decoration:underline;text-underline-offset:.1875rem}
/* 進階方案卡（subscriptions/_plans）：價格下一行每天的換算、按鈕下一行「首次付款 7 天內全額退款」 */
.plan-per-day{margin:-.375rem 0 0;color:var(--gold);font-weight:600;font-size:.9375rem}
.plan-cta--stack{flex-direction:column;align-items:flex-start;gap:.5rem}
.plan-assure{margin:0;color:var(--muted);font-size:.8125rem}
/* 訪客與會員的額度比較（shared/_member_compare）：方案卡的版型，兩張卡同樣幾列對著看。
   每列：上面小字是哪一件事，下面是額度；會員卡的額度加粗、前面一個金色勾，訪客「不能收藏」那列淡掉。 */
.compare-tagline{color:var(--muted);font-size:.9375rem}
.plan--member .compare-tagline{color:var(--gold);font-weight:600}
.member-compare{row-gap:0}
.member-compare > .plan{display:grid;grid-row:span var(--rows);grid-template-rows:subgrid;row-gap:0;align-content:start}
.member-compare .plan-name{margin-bottom:.5rem}
.member-compare .compare-tagline{margin:0 0 .5rem}
.compare-list{display:contents}
.compare-row{display:grid;grid-template-columns:7rem minmax(0,1fr);gap:.75rem;padding:.75rem 0;align-items:baseline;border-top:.0625rem solid var(--line-soft)}
.compare-row dt{color:var(--muted);font-size:.875rem;font-weight:600}
.compare-row dd{margin:0;line-height:1.6}
.compare-row--yes dd::before{content:"✓";margin-right:.375rem;color:var(--gold);font-weight:700}
.compare-note{display:block;color:var(--muted);font-size:.8125rem;font-weight:400}
.plan--member .compare-note{color:var(--gold)}
.plan-assure a{color:var(--gold);font-weight:700}
.view-limit-compare{margin-top:2.5rem}

/* ── 訂閱（subscriptions/new、show、cancel）：三步驟 → 訂單內容＋「訂閱之後」→ 兩個方案比較。
   訂單內容是唯一有主要按鈕的卡，手機上排在最前面。確認頁兩欄並排，窄欄（44rem）太擠，放寬到 60rem。 ── */
main.main--checkout{max-width:60rem}
.checkout-steps{display:flex;gap:.5rem;margin:0 0 1.25rem;padding:0;list-style:none;counter-reset:step}
.checkout-steps li{flex:1;display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;border-radius:var(--r-pill);
  background:var(--panel);border:.0625rem solid var(--line);color:var(--muted);font-size:.875rem;counter-increment:step}
.checkout-steps li::before{content:counter(step);display:inline-grid;place-items:center;flex:none;width:1.375rem;height:1.375rem;
  border-radius:50%;background:var(--line-soft);font-family:var(--mono);font-size:.8125rem}
.checkout-steps li.is-current{color:var(--text);font-weight:600;border-color:var(--primary)}
.checkout-steps li.is-current::before{background:var(--primary)}
.checkout-steps li.is-done::before{content:"✓";background:var(--good-bg);color:var(--green)}
.checkout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:1.25rem;align-items:start}
.checkout > .panel{margin-top:0;padding:1.5rem 1.75rem}
.checkout-lines{margin:0}
.checkout-lines > div{display:flex;justify-content:space-between;gap:1rem;padding:.625rem 0}
.checkout-lines > div + div{border-top:.0625rem solid var(--line-soft)}
.checkout-lines dt{color:var(--muted);white-space:nowrap}
.checkout-lines dd{margin:0;text-align:right}
.checkout-total{font-size:1.125rem;font-weight:700}
.checkout-total dt{color:var(--text)}
.checkout-total dd{font-family:var(--mono)}
.checkout-form{margin:1.25rem 0 0}
.checkout-pay{width:100%;align-items:center;text-align:center;padding:.875rem 1.5rem;font-size:1.0625rem}
.checkout-note{display:flex;gap:.375rem;align-items:flex-start;margin:.75rem 0 0;color:var(--muted);font-size:.8125rem;line-height:1.6}
.checkout-agree{margin:.625rem 0 0;color:var(--muted);font-size:.8125rem;line-height:1.6}
.checkout-agree a{text-decoration:underline;text-underline-offset:.1875rem}
.checkout-lock{flex:none;width:.875rem;height:.875rem;margin-top:.1875rem;fill:none;stroke:var(--muted);stroke-width:2}
.checkout-guest{margin:1.25rem 0 .75rem;line-height:1.7}
.checkout-guest-actions{display:flex;flex-direction:column;align-items:center;gap:.625rem}
.checkout-why-list{margin:0;padding:0;list-style:none;display:grid;gap:1rem}
.checkout-why-list li{display:grid;gap:.125rem;padding-left:1.5rem;position:relative;line-height:1.6}
.checkout-why-list li::before{content:"✓";position:absolute;left:0;top:0;color:var(--green);font-weight:700}
.checkout-why-list span{color:var(--muted);font-size:.9375rem}
.checkout-why-list a{text-decoration:underline;text-underline-offset:.1875rem}
/* 管理員的 NT$10 測試訂閱（只畫給管理員）：跟主要按鈕隔開，免得誤按 */
.checkout-test{margin:1.5rem 0 0;padding:1rem 0 0;border-top:.0625rem dashed var(--line)}
.checkout-test p{margin:0 0 .5rem;font-size:.8125rem}
.checkout-stay{margin:1rem 0 0;text-align:center}
.checkout-stay a{text-decoration:underline;text-underline-offset:.1875rem}
/* 我的方案：付款結果（成功綠、失敗紅）＋目前方案 */
.sub-result{margin:0 0 1.25rem;padding:1.5rem 1.75rem}
.sub-result h2{margin:0 0 .5rem;font-size:1.375rem}
.sub-result p{margin:0;line-height:1.7}
.sub-result--ok{background:var(--good-bg);border-color:var(--good-line)}
.sub-result--bad{background:var(--bad-bg);border-color:var(--bad-line)}
.sub-result-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin:1rem 0 0}
.sub-note{margin:1rem 0 0;color:var(--muted);line-height:1.7}
.sub-cancel{margin:1.25rem 0 0;font-size:.875rem}
.sub-cancel a{color:var(--muted);text-decoration:underline;text-underline-offset:.1875rem}
.sub-cancel-actions{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;margin-top:1.5rem}
.sub-cancel-actions form{margin:0}
/* 訂閱紀錄（subscriptions/_history）：日期、事項（底下一行說明）、金額；預定的那一行淡一點，失敗的事項標紅 */
.sub-history{margin-top:1.25rem}
.sub-history-table{width:100%;border-collapse:collapse;font-size:.9375rem}
.sub-history-table th{padding:0 0 .5rem;color:var(--muted);font-size:.8125rem;font-weight:500;text-align:left}
.sub-history-table th.num,.sub-history-table td.num{text-align:right;white-space:nowrap}
.sub-history-table td{padding:.75rem 0;border-top:.0625rem solid var(--line-soft);vertical-align:top;line-height:1.5}
.sub-history-table td + td,.sub-history-table th + th{padding-left:1rem}
.sub-history-date{white-space:nowrap;color:var(--muted)}
.sub-history-item{margin-right:.375rem}
.sub-history-note{display:block;color:var(--muted);font-size:.8125rem}
.sub-history-table tr.is-upcoming td{color:var(--muted)}
.sub-history-table tr.is-failed .sub-history-item{color:var(--red)}
.sub-help{margin:1.5rem 0 0;font-size:.875rem;text-align:center}
.sub-help a{text-decoration:underline;text-underline-offset:.1875rem}

/* ── 窄斷點：手機 ── */
@media (max-width: 47.9375rem){
  /* 訂閱紀錄：手機上日期可以斷行（年／月日），事項那欄才有地方放 */
  .sub-history-table{font-size:.875rem}
  .sub-history-date{white-space:normal;min-width:5.5rem}
  /* 方案與價格：方案改一欄；收費方式的名詞疊在說明上面 */
  .plan-grid{grid-template-columns:minmax(0,1fr)}
  .plan{padding:1.25rem 1.25rem}
  .plan-terms{padding:.25rem 1.125rem}
  .plan-terms > div{grid-template-columns:minmax(0,1fr);gap:.125rem}
  /* 方案卡疊成一欄時進階方案排第一張（不用捲就看得到價格與升級鈕） */
  .plan-grid > .plan--plus{order:-1}
  .compare-row{grid-template-columns:5.5rem minmax(0,1fr)}
  /* 訂閱：訂單內容在上、「訂閱之後」在下；三步驟只留數字與目前那一步的字 */
  .checkout{grid-template-columns:minmax(0,1fr)}
  .checkout > .panel,.sub-result{padding:1.25rem 1.25rem}
  .checkout-steps li{justify-content:center;padding:.5rem}
  .checkout-steps li:not(.is-current){font-size:0;flex:none}
  /* 策略卡：三張仍並排（一眼看到三種），只留名稱與檔數 */
  .strategy-switch{gap:.5rem}
  .strategy-card{padding:.625rem .5rem;align-items:center;text-align:center}
  .strategy-card[aria-current]{padding:calc(.625rem - .0625rem) calc(.5rem - .0625rem)}
  .strategy-top{flex-direction:column;align-items:center;gap:0}
  .strategy-name{font-size:1rem}
  .strategy-n{font-size:1rem}
  .strategy-desc{display:none}
  .nf .strategy-switch{grid-template-columns:1fr}
  .nf .strategy-card{align-items:stretch;text-align:left;padding:.875rem 1rem}
  .nf .strategy-top{flex-direction:row;justify-content:space-between}
  .nf .strategy-desc{display:block}

  /* 組名疊在 pill 上方，pill 用整列的寬度：英文、日文的長 pill 跟組名並排會撐出橫向捲動 */
  .industry-grid.industry-grid--home{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filter-bar{grid-template-columns:minmax(0,1fr);gap:.25rem;margin-bottom:1rem}
  .filter-label{min-height:0}
  .filter-label:not(:first-child){margin-top:.5rem}
  .filter-row{gap:.375rem}
  .filter-bar .pill{padding:.3125rem .75rem}
  .list-toolbar{gap:.5rem}

  /* 卡片化的表（選股三表、收藏）：每列一張卡，外框內距收窄 */
  .list-table{padding:.25rem .875rem}

  /* ── 選股器卡片化：同一份表格 DOM，grid 重排。thead 藏掉、每列變一張卡 ── */
  .tbl-wrap--screener{overflow:visible}
  .screener thead{display:none}
  .screener, .screener tbody{display:block}
  /* 三欄：識別｜脈絡｜數字。同一個 grid area 塞多個 <td> 會疊在一起（grid item 的
     display:inline 會被 blockify，不會並排流動），所以每個 td 一格。
     四個 meta 值分散到兩列，避免擠在同一列被折行。 */
  .list-table .screener tr{display:grid;grid-template-columns:auto 1fr auto;gap:.125rem .5rem;
    grid-template-areas:"sym sym yoy3" "name ind yoy" "ym rev yoy12" "sig sig f";
    padding:.75rem 0;border-bottom:.0625rem solid var(--line)}
  .list-table .screener tr:last-child{border-bottom:0}
  .list-table .runs-table td,.list-table .runs-table td:is(:first-child,:last-child){display:block;border:0;padding:0}
  .screener td.c-sym{grid-area:sym;font-size:1.0938rem}
  .screener td.c-name{grid-area:name}
  .screener td.c-sym a{display:inline-block;padding:.25rem .25rem .25rem 0;font-weight:600}
  .screener td.c-ind{grid-area:ind;font-size:.8594rem;text-align:right}
  .screener td.c-ym{grid-area:ym;font-size:.8594rem}
  .screener td.c-rev{grid-area:rev;font-size:.8594rem;text-align:right}
  .screener td.c-yoy3{grid-area:yoy3}
  .screener td.c-yoy{grid-area:yoy}
  .screener td.c-yoy12{grid-area:yoy12}
  .screener td.c-f{grid-area:f;margin-top:.25rem}
  .screener td.c-sig{grid-area:sig;margin-top:.25rem}
  /* 卡片裡的訊號 tag 兩顆折成兩行時會上下貼在一起：inline-block 才吃得到上下邊距 */
  .screener td.c-sig .tag{display:inline-block;margin:.125rem .25rem .125rem 0}
  .screener td.num{text-align:right}
  .screener td.c-yoy3::before{content:"近3月 ";color:var(--muted);font-size:.8594rem;font-weight:400}
  .screener td.c-yoy::before{content:"單月 ";color:var(--muted);font-size:.8594rem}
  .screener td.c-yoy12::before{content:"近12月 ";color:var(--muted);font-size:.8594rem}
  .screener td.c-f::before,.fscore td.c-score::before,.turnaround td.c-score::before{
    content:"F ";color:var(--muted);font-size:.8594rem;font-weight:400}
  .list-table :is(td.c-f,.fscore td.c-score,.turnaround td.c-score){text-align:right}
  .list-table .score{width:1.625rem;height:1.625rem;font-size:.875rem}

  /* F 分數表的卡片：前兩列是識別與分數（具名區域），九題不指定區域，讓 grid 自動
     流到第三列以後——自動排版只會填「還沒被占的格子」，三欄一列剛好三列排完。
     題目名靠 data-label 帶進 ::before，表頭藏掉之後每格自己說明自己。 */
  .list-table .fscore tr{grid-template-columns:auto 1fr auto;grid-template-areas:"sym name score" "ind period score";
    gap:.25rem .625rem}
  .fscore td.c-sym{grid-area:sym;font-weight:600;font-size:1.0938rem}
  .fscore td.c-name{grid-area:name}
  .fscore td.c-ind{grid-area:ind;font-size:.8594rem}
  .fscore td.c-period{grid-area:period;font-size:.8594rem}
  .fscore td.c-score{grid-area:score;align-self:center}
  .list-table .fscore td.flag{text-align:left;font-size:.9375rem;white-space:nowrap}
  .fscore td.flag::before{content:attr(data-label) " ";color:var(--muted);font-size:.8594rem;font-weight:400}

  /* 轉機股的卡片：淨值比是排序鍵、佔右半；收盤／每股淨值／市值各一格排第三列，
     最後一列是 F 分數與沒過的題目 */
  .list-table .turnaround tr{grid-template-columns:auto 1fr auto;
    grid-template-areas:"sym name pbr" "ind period pbr" "close bvps cap" "score miss miss"}
  .turnaround td.c-sym{grid-area:sym;font-weight:600;font-size:1.0938rem}
  .turnaround td.c-name{grid-area:name}
  .turnaround td.c-ind{grid-area:ind;font-size:.8594rem}
  .turnaround td.c-period{grid-area:period;font-size:.8594rem}
  .turnaround td.c-pbr{grid-area:pbr;font-size:1.25rem;align-self:center;text-align:right}
  .turnaround td.c-close{grid-area:close;font-size:.9375rem}
  .turnaround td.c-bvps{grid-area:bvps;font-size:.9375rem}
  .turnaround td.c-cap{grid-area:cap;font-size:.9375rem;text-align:right}
  .list-table .turnaround td.c-score{grid-area:score;margin-top:.25rem;text-align:left}
  .turnaround td.c-miss{grid-area:miss;margin-top:.25rem;align-self:center}
  .turnaround td.c-pbr::before{content:"淨值比 ";color:var(--muted);font-size:.8594rem;font-weight:400}
  .turnaround td.c-close::before{content:"收盤 ";color:var(--muted);font-size:.8594rem}
  .turnaround td.c-bvps::before{content:"淨值 ";color:var(--muted);font-size:.8594rem}
  .turnaround td.c-cap::before{content:"市值 ";color:var(--muted);font-size:.8594rem}

  /* 產業成分股的卡片：第一列代號＋名稱，五個數字自動流成兩列，欄名靠 data-label 帶進 ::before */
  .industry-companies thead{display:none}
  .industry-companies, .industry-companies tbody{display:block}
  .list-table .industry-companies tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"sym name name";
    gap:.25rem .5rem;padding:.75rem 0;border-bottom:.0625rem solid var(--line)}
  .list-table .industry-companies tr:last-child{border-bottom:0}
  .industry-companies td.c-sym{grid-area:sym;font-weight:600;font-size:1.0938rem}
  /* 權重要高過上面「.list-table .runs-table td:is(:first-child,…)」那條（排名是第一欄） */
  .list-table .runs-table.industry-companies td.c-rank{display:none}
  .industry-chart .c-xlabel.is-minor{display:none}
  .industry-chart .c-xlabel.is-last{text-anchor:end}
  .industry-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .industry-companies td.c-name{grid-area:name}
  .list-table .industry-companies td.num{text-align:left;font-size:.9375rem}
  .industry-companies td.num::before{content:attr(data-label) " ";display:block;color:var(--muted);font-family:var(--sans);font-size:.8594rem}

  /* 收藏表卡片化：橫捲的話，手機一屏只看得到代號、名稱、產業、收盤——最想看的當日漲跌
     在畫面外。每列一張卡：代號 名稱 漲跌／產業 收盤／月營收 年增／移除。 */
  .watch thead{display:none}
  .watch,.watch tbody{display:block}
  .watch tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.25rem .625rem;
    grid-template-areas:"sym name chg" "ind ind close" "rev rev yoy" "act act act";
    padding:.75rem 0;border-bottom:.0625rem solid var(--line)}
  .watch tr:last-child{border-bottom:0}
  .list-table .watch td,.list-table .watch td:is(:first-child,:last-child){display:block;padding:0;border:0}
  .watch td.c-sym{grid-area:sym;font-size:1.0938rem}
  .watch td.c-name{grid-area:name}
  /* 置中：觸控裝置上代號與名稱的連結撐到 44px 高，漲跌要跟它們的字對齊 */
  .watch td.c-chg{grid-area:chg;font-size:1.0938rem;align-self:center}
  .watch td.c-ind{grid-area:ind;font-size:.8594rem}
  .watch td.c-close{grid-area:close}
  .watch td.c-rev{grid-area:rev;text-align:left}
  .watch td.c-yoy{grid-area:yoy}
  .watch td.c-act{grid-area:act}
  .watch td.c-gone{grid-column:2 / -1;white-space:normal}
  .watch td.c-close::before{content:"收盤 ";color:var(--muted);font-family:var(--sans);font-size:.8594rem}
  .watch td.c-rev::before{content:"月營收 ";color:var(--muted);font-family:var(--sans);font-size:.8594rem}
  .watch td.c-yoy::before{content:"年增 ";color:var(--muted);font-family:var(--sans);font-size:.8594rem}
  .watch-unit{display:inline}

  .auth{padding:1rem 0}
  .auth-card{padding:1.75rem 1.25rem}
  .auth-h{font-size:1.625rem}
  .acct-card{padding:1.25rem 1rem}

  .nf{padding-top:1.5rem}
  .nf-mark{width:5.5rem;height:5.5rem;margin-bottom:1rem}
  .nf-mark-img{width:2.5rem;height:2.5rem}
  .nf-h{font-size:1.625rem}
  .nf-search{flex-direction:column}

  .hero{padding:.5rem 0 0}
  .hero h1{font-size:1.875rem}
  .hero-lead{font-size:1rem}
  .landing-sec{margin-top:2.75rem}
  .landing-sec-h h2{font-size:1.5rem}
  .landing-grid-3{grid-template-columns:1fr}
  .tour-ch{padding:1.125rem 1rem}
  .tour-list{grid-template-columns:1fr}
}

/* ── 觸控：44px 目標 ── */
@media (pointer: coarse){
  .tour-list a{min-height:2.75rem}
  .watch-remove,.watch td:is(.c-sym,.c-name) a,.pick-h a,.sample-more{min-height:2.75rem;display:inline-flex;align-items:center}
}
/* 觸控＋組名跟 pill 並排時：pill 撐到 44px（components.css），組名跟著對齊第一排（手機上組名疊在上方，不需要） */
@media (pointer: coarse) and (min-width: 48rem){
  .filter-label{min-height:2.75rem}
}
