/* ============================================================
   標案雷達 — 現代化（左側分類欄 + 乾淨卡片 + 柔和陰影）
   ============================================================ */
:root{
  /* 石墨中性極簡：冷淺灰底、石墨近黑字、石墨主色、金只留在 logo */
  --accent:#2f3a4d; --accent-d:#1c2230; --accent-l:#eef0f4; --accent-rgb:47,58,77;
  --gold:#e0b64c; --gold-bright:#ecc76a; --ink-band:#1c2230;
  --green:#0f9d58; --amt:#a35a12;
  --bg:#f7f8fa; --box:#fff;
  --line:#e6e9ef; --line2:#f0f2f6; --dot:#c4ccd6;
  --ink:#1c2230; --ink2:#2f3a4d; --muted:#616a7a; --muted2:#8a94a5;
  --link:#2f3a4d; --link-h:#1c2230;
  --shadow:0 1px 2px rgba(20,25,40,.05), 0 1px 3px rgba(20,25,40,.06);
  --shadow-h:0 4px 14px rgba(20,25,40,.10);
  --r:12px; --r-sm:8px;
  /* 舊變數別名 */
  --slate:#616a7a; --slate2:#8a94a5; --soft:#f0f2f6; --sub:#616a7a;
}
*{ box-sizing:border-box }
/* 永遠保留捲軸槽，避免有捲軸/無捲軸的頁面切換時版面左右位移 */
html{ -webkit-text-size-adjust:100%; overflow-y:scroll; scrollbar-gutter:stable }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"PingFang TC","Microsoft JhengHei",system-ui,sans-serif;
  font-size:14px; line-height:1.6; -webkit-font-smoothing:antialiased;
}
a{ color:var(--link); text-decoration:none }
a:hover{ color:var(--link-h) }
h1,h2,h3,h4{ margin:0; font-weight:700; letter-spacing:-.01em }
.tnum,.amt{ font-variant-numeric:tabular-nums }
.page{ max-width:1140px; margin:0 auto; padding:0 20px }

/* 頂部：乾淨白底 sticky */
.site-head{ background:rgba(255,255,255,.85); backdrop-filter:saturate(180%) blur(10px); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20 }
.head-in{ display:flex; align-items:center; justify-content:space-between; gap:10px 16px; padding:12px 20px; flex-wrap:wrap }
.brand{ color:var(--ink); font-size:20px; font-weight:800; letter-spacing:-.02em; display:flex; align-items:center; gap:9px; flex-shrink:0; white-space:nowrap }
.brand:hover{ color:var(--ink) }
.brand .mk{ width:26px; height:26px; border-radius:7px; background:linear-gradient(150deg,#2f3a4d,#1c2230); color:#e0b64c; display:inline-flex; align-items:center; justify-content:center; font-size:15px; font-weight:800; line-height:1; flex-shrink:0; box-shadow:0 2px 6px rgba(28,34,48,.35) }
.brand small{ font-size:12px; font-weight:500; color:var(--muted2); letter-spacing:0 }
.hsearch{ display:flex; gap:8px; flex:1 1 240px; min-width:0; max-width:420px }
.hsearch input{ flex:1; width:100%; min-width:0; border:1px solid var(--line); background:var(--box); padding:9px 14px; font-size:13.5px; border-radius:999px; outline:none; transition:border-color .15s, box-shadow .15s }
.hsearch input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-l) }
.hsearch button{ border:0; background:var(--accent); color:#fff; padding:9px 20px; font-size:13.5px; font-weight:600; cursor:pointer; border-radius:999px; transition:background .15s }
.hsearch button:hover{ background:var(--accent-d) }

/* 橫向主選單：藥丸式 */
.topbar{ background:transparent; border-bottom:1px solid var(--line) }
.topbar .page{ display:flex; flex-wrap:wrap; gap:4px; padding-top:8px; padding-bottom:8px }
.topbar a{ display:block; padding:7px 14px; color:var(--muted); font-weight:600; font-size:13.5px; border-radius:999px; white-space:nowrap; transition:background .15s,color .15s }
.topbar a:hover{ background:var(--accent-l); color:var(--accent-d) }
.topbar a.on{ background:var(--accent); color:#fff }
/* 「更多」下拉 */
.more-menu{ position:relative }
.more-menu>summary{ list-style:none; cursor:pointer; padding:7px 14px; color:var(--muted); font-weight:600; font-size:13.5px; border-radius:999px; white-space:nowrap }
.more-menu>summary::-webkit-details-marker{ display:none }
.more-menu>summary::after{ content:"▾"; margin-left:4px; font-size:11px }
.more-menu[open]>summary{ background:var(--accent-l); color:var(--accent-d) }
.more-pop{ position:absolute; top:calc(100% + 4px); right:0; z-index:40; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-h); padding:6px; min-width:190px; display:flex; flex-direction:column }
.more-pop a{ padding:9px 12px; border-radius:8px; color:var(--ink); font-weight:500; font-size:13.5px; white-space:nowrap }
.more-pop a:hover{ background:var(--accent-l); color:var(--accent-d); text-decoration:none }

/* 主版面 */
.layout{ display:flex; gap:24px; align-items:flex-start; padding:24px 20px 8px }
.side{ width:236px; flex:0 0 236px; position:sticky; top:78px }
.main{ flex:1; min-width:0; background:var(--box); border:1px solid var(--line); border-radius:var(--r); padding:26px 28px; box-shadow:var(--shadow) }

/* 側欄盒子：白卡 + 輕標題 */
.sbox{ background:var(--box); border:1px solid var(--line); border-radius:var(--r); margin-bottom:12px; box-shadow:var(--shadow); overflow:hidden }
.sbox>summary{
  font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted2); padding:12px 16px; cursor:pointer; list-style:none;
  display:flex; justify-content:space-between; align-items:center;
}
.sbox>summary::-webkit-details-marker{ display:none }
.sbox>summary::after{ content:"＋"; color:var(--muted2); font-size:13px }
.sbox[open]>summary::after{ content:"－" }
.sbox ul{ list-style:none; margin:0; padding:0 8px 10px }
.sbox li a{
  display:flex; justify-content:space-between; align-items:center; gap:6px;
  padding:7px 10px; font-size:13px; color:var(--ink); border-radius:var(--r-sm); line-height:1.35;
}
.sbox li a:hover{ background:var(--accent-l); color:var(--accent-d) }
.sbox li a em{ font-style:normal; color:var(--muted2); font-size:11px; font-variant-numeric:tabular-nums }
.sbox li a:hover em{ color:var(--accent) }
.sbox .more-li a{ color:var(--accent); font-weight:600 }
.sbox .cty{ display:grid; grid-template-columns:1fr 1fr }

/* 麵包屑 */
.crumb{ font-size:12.5px; color:var(--muted); margin:0 0 18px }
.crumb a{ color:var(--muted) }
.crumb a:hover{ color:var(--link) }

/* 內容標題 */
.main h1{ font-size:24px; color:var(--ink); margin:0 0 14px; line-height:1.3; letter-spacing:-.02em }
.idx-hero{ margin:0 0 20px }
.idx-hero h1{ margin:0 0 8px }
.idx-hero .eyebrow,.eyebrow{ color:var(--accent); font-weight:700; font-size:12px; letter-spacing:.04em; margin:0 0 4px }
.idx-hero .lede{ color:#3a4152; font-size:15px; font-weight:500; line-height:1.7; margin:0; max-width:800px }
.idx-hero .lede strong{ color:var(--ink) }

/* 區塊標題 */
.feed-h, .sec-head{
  display:flex; align-items:center; justify-content:space-between;
  font-size:16px; color:var(--ink); font-weight:700; letter-spacing:-.01em;
  margin:26px 0 14px; padding-bottom:10px; border-bottom:1px solid var(--line);
}
.feed-h:first-child,.sec-head:first-child{ margin-top:0 }
.sec-head a, .feed-h a{ font-size:13px; font-weight:500; color:var(--accent) }

/* 標案列表 */
.feed{ }
.feed-item{ display:flex; gap:14px; align-items:flex-start; justify-content:space-between; padding:15px 14px; margin:0 -14px; border-radius:10px; color:var(--ink); border-bottom:1px solid var(--line2); transition:background .12s }
.feed-item:hover{ background:var(--soft) }
.fi-main{ min-width:0; flex:1 }
.feed-top{ display:flex; gap:8px; align-items:center; margin-bottom:5px }
.feed-top .tag{ font-size:11px; padding:2px 9px; border-radius:999px; font-weight:600; letter-spacing:.02em }
.tag-open{ color:var(--accent-d); background:var(--accent-l) }
.tag-won{ color:#0a7d43; background:#e7f6ee }
.tag-fail{ color:#9a3412; background:#fdeee3 }
.tag-other{ color:var(--muted); background:var(--soft) }
.feed-date{ font-size:12px; color:var(--muted2); font-variant-numeric:tabular-nums }
.feed-title{ display:block; color:var(--ink); font-weight:600; font-size:14.5px; line-height:1.45 }
.feed-title:hover{ color:var(--accent-d) }
.feed-meta{ font-size:12.5px; color:var(--muted); margin-top:5px; display:flex; gap:8px 14px; flex-wrap:wrap; align-items:center }
.feed-meta a{ color:var(--muted) }
.feed-meta a:hover{ color:var(--link) }
.feed-meta a + a::before{ content:"·"; margin-right:14px; color:var(--dot) }
.fi-amt{ flex:0 0 auto; text-align:right; white-space:nowrap; padding-top:20px }
.fi-amt span{ display:block; font-size:14.5px; font-weight:700; color:var(--amt); font-variant-numeric:tabular-nums }
.fi-amt small{ font-size:11px; color:var(--muted2) }

/* 表格：輕線、hover */
.table{ width:100%; border-collapse:collapse; font-size:13.5px }
.table thead th{ color:var(--muted); text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); font-weight:600; font-size:12px; letter-spacing:.03em; text-transform:uppercase }
.table td{ padding:12px; border-bottom:1px solid var(--line2); vertical-align:top }
.table tbody tr:hover{ background:var(--soft) }
.table .amt{ text-align:right; color:var(--amt); font-weight:700; white-space:nowrap }
.t-title{ font-weight:600; color:var(--ink) }
.t-sub{ font-size:12px; color:var(--muted); margin-top:3px }
.t-sub .win{ color:var(--green); font-weight:600 }

/* 屬性表 */
.kv{ width:100%; border-collapse:separate; border-spacing:0; font-size:13.5px; margin:0 0 18px; border:1px solid var(--line); border-radius:var(--r); overflow:hidden }
.kv th{ width:130px; text-align:left; background:var(--soft); color:var(--muted); font-weight:600; padding:11px 14px; border-bottom:1px solid var(--line2); white-space:nowrap }
.kv td{ padding:11px 14px; border-bottom:1px solid var(--line2) }
.kv tr:last-child th,.kv tr:last-child td{ border-bottom:0 }
.kv .badge{ background:var(--green); color:#fff; font-size:11px; padding:2px 8px; border-radius:999px }

/* chips */
.chips{ list-style:none; margin:0 0 6px; padding:0; display:flex; flex-wrap:wrap; gap:8px }
.chips li a, .chip{
  display:inline-block; padding:6px 13px; font-size:13px;
  border:1px solid var(--line); border-radius:999px; background:var(--box); color:var(--ink); transition:all .15s;
}
.chips li a:hover, .chip:hover{ background:var(--accent-l); border-color:transparent; color:var(--accent-d) }

/* 排行清單 */
.rank{ list-style:none; margin:0; padding:0; columns:2; column-gap:36px }
.rank li{ display:flex; align-items:baseline; gap:12px; padding:10px 4px; border-bottom:1px solid var(--line2); break-inside:avoid }
.rank .r{ width:24px; text-align:right; color:var(--muted2); font-size:12px; font-variant-numeric:tabular-nums; flex:0 0 auto }
.rank .nm{ flex:1; color:var(--ink); font-weight:600 }
.rank .nm:hover{ color:var(--accent) }
.rank .ct{ color:var(--amt); font-variant-numeric:tabular-nums; font-size:13px; flex:0 0 auto }

/* 縣市格 */
.region-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(158px,1fr)); gap:14px }
.region-card{ border:1px solid var(--line); border-radius:var(--r); padding:16px; background:var(--box); display:flex; flex-direction:column; gap:3px; transition:transform .15s,box-shadow .15s,border-color .15s }
.region-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-h); border-color:transparent }
.region-card .co{ font-size:17px; font-weight:700; color:var(--ink) }
.region-card .ct{ font-size:13px; color:var(--amt); font-variant-numeric:tabular-nums; font-weight:600 }
.region-card .ag{ font-size:11.5px; color:var(--muted) }

/* 分類總覽 */
.cat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(290px,1fr)); gap:18px }
.cat-card{ border:1px solid var(--line); border-radius:var(--r); padding:6px 6px 10px; box-shadow:var(--shadow) }
.cat-card-h{ display:flex; justify-content:space-between; align-items:baseline; padding:14px 14px 10px }
.cat-card-h h2{ font-size:16px; color:var(--ink) }
.cat-card-h .n{ font-size:12px; color:var(--muted2) }
.cat-card ul{ list-style:none; margin:0; padding:0 }
.cat-card li a{ display:flex; justify-content:space-between; gap:10px; padding:8px 14px; font-size:13px; color:var(--ink); border-radius:var(--r-sm) }
.cat-card li a:hover{ background:var(--accent-l); color:var(--accent-d) }
.cat-card .c-count{ color:var(--amt); font-variant-numeric:tabular-nums; font-size:12px }
.cat-card .more summary{ cursor:pointer; color:var(--accent); font-size:12.5px; padding:8px 14px; font-weight:600 }

/* profile 卡 */
.profile{ border:1px solid var(--line); border-radius:var(--r); margin:0 0 22px; overflow:hidden; box-shadow:var(--shadow) }
.profile .ph{ padding:20px 22px; border-bottom:1px solid var(--line) }
.profile .who{ display:flex; gap:14px; align-items:center }
.profile .logo{ width:48px; height:48px; border-radius:12px; background:linear-gradient(135deg,#2f3a4d,#46536b); color:#fff; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:700; flex:0 0 auto }
.profile h3{ font-size:19px; color:var(--ink) }
.profile .meta{ font-size:12.5px; color:var(--muted); margin-top:3px }
.profile .stats{ display:flex; flex-wrap:wrap }
.profile .stats>div{ flex:1; min-width:130px; padding:16px 22px; border-right:1px solid var(--line2); border-bottom:1px solid var(--line) }
.profile .stats .n{ font-size:20px; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; letter-spacing:-.02em }
.profile .stats .l{ font-size:12px; color:var(--muted); margin-top:2px }
.profile .body{ padding:18px 22px }
.profile .sum{ font-size:14px; color:#344; margin:0 }

/* 收藏鈕 */
.fav-btn{ flex-shrink:0; border:1px solid var(--line); background:#fff; color:var(--muted); font-size:13px; font-weight:600; padding:7px 14px; border-radius:999px; cursor:pointer; white-space:nowrap }
.fav-btn:hover{ border-color:var(--accent); color:var(--accent) }
.fav-btn.on{ background:var(--accent-l); border-color:transparent; color:var(--accent-d) }

/* 長條趨勢圖（stats / 機關頁共用） */
.chart{ display:flex; align-items:flex-end; gap:5px; height:180px; padding:10px 0 0; border-bottom:1px solid var(--line); overflow-x:auto }
.bar-col{ display:flex; flex-direction:column; align-items:center; gap:4px; flex:1; min-width:20px }
.bar{ width:100%; max-width:28px; background:linear-gradient(180deg,#46536b,#2f3a4d); border-radius:4px 4px 0 0 }
.bar-col:hover .bar{ background:linear-gradient(180deg,#46536b,#1c2230) }
.bar-col .bl{ font-size:10px; color:var(--muted2); white-space:nowrap }

/* 廠商競爭力分析 */
.winrate{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px }
.winrate>div{ background:var(--box); border:1px solid var(--line2); border-radius:var(--r-sm); padding:12px; text-align:center }
.winrate .n{ font-size:22px; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; letter-spacing:-.02em }
.winrate .l{ font-size:12px; color:var(--muted); margin-top:2px }

/* 橫條分布（金額級距/類型） */
.cols2{ display:grid; grid-template-columns:1fr 1fr; gap:16px }
@media (max-width:680px){ .cols2{ grid-template-columns:1fr } }
.hbar{ display:flex; align-items:center; gap:8px; margin:5px 0; font-size:12.5px }
.hbar .hl{ width:96px; color:var(--muted); flex-shrink:0; text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.hbar .ht{ flex:1; background:var(--line2); border-radius:999px; height:10px; overflow:hidden }
.hbar .ht i{ display:block; height:100%; background:linear-gradient(90deg,#46536b,#2f3a4d); border-radius:999px }
.hbar .hn{ width:56px; text-align:right; color:var(--ink); font-variant-numeric:tabular-nums; flex-shrink:0 }

/* 分頁 */
.pager{ display:flex; align-items:center; justify-content:center; gap:16px; margin:18px 0; font-size:14px }
.pager a{ padding:8px 16px; border:1px solid var(--line); border-radius:999px; color:var(--accent); font-weight:600 }
.pager a:hover{ background:var(--accent-l); text-decoration:none }
.pager span{ color:var(--muted) }

/* 企業關係圖譜 */
.rel-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px }
.rel-box{ border:1px solid var(--line2); border-radius:var(--r-sm); padding:10px 12px; background:#fff }
.rel-h{ font-size:12px; color:var(--muted); font-weight:600; margin-bottom:6px }
.rel-item{ display:block; font-size:13px; color:var(--accent); padding:3px 0 }
.rel-item:hover{ color:var(--accent-d) }

/* 市場分析 雙欄清單 */
.mkt-cols{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:14px }
.mkt-h{ font-size:13px; color:var(--muted); font-weight:600; margin-bottom:6px }
.mkt-list{ list-style:none; margin:0; padding:0; counter-reset:m }
.mkt-list li{ display:flex; justify-content:space-between; gap:10px; padding:5px 0; border-bottom:1px solid var(--line2); font-size:13px }
.mkt-list li span{ color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.mkt-list li em{ font-style:normal; color:var(--amt); font-variant-numeric:tabular-nums; flex-shrink:0 }
@media (max-width:600px){ .mkt-cols{ grid-template-columns:1fr } }

/* 訂閱 CTA 小鈕 */
.sub-cta{ font-size:12.5px; font-weight:600; color:var(--accent); background:var(--accent-l); padding:4px 12px; border-radius:999px; white-space:nowrap }
.sub-cta:hover{ background:var(--accent); color:#fff; text-decoration:none }

/* 首頁訂閱橫幅 */
.sub-banner{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px;
  background:linear-gradient(135deg,#eef0f4,#e6e9ef); border:1px solid #cfe0fb; border-radius:var(--r); padding:18px 22px; margin:24px 0 0 }
.sub-banner .bt{ font-weight:700; color:var(--ink); font-size:15px }
.sub-banner .bd{ font-size:13px; color:var(--muted) }
.sub-banner a.go{ background:var(--accent); color:#fff; font-weight:700; font-size:14px; padding:10px 20px; border-radius:999px; white-space:nowrap }
.sub-banner a.go:hover{ background:var(--accent-d); text-decoration:none }

/* 公司登記資料（串 inc.com.tw） */
.reg{ margin:0 0 22px }
.reg .reg-src{ font-size:12px; color:var(--muted2); margin:8px 0 0 }
.reg .reg-src a{ color:var(--accent) }
.flag{ display:inline-block; font-size:12px; padding:2px 9px; border-radius:999px; margin-right:6px }
.flag.bad{ background:#fde8e8; color:#c0341d }
.flag.warn{ background:#fff4e0; color:#b8500a }

/* 綜述 + Top3 */
.summary-block{ background:var(--soft); border:1px solid var(--line2); border-radius:var(--r); padding:18px 20px; margin:0 0 22px }
.summary-text{ font-size:14px; color:#344; margin:0 0 10px }
.top3 h3{ font-size:14px; color:var(--ink); margin:10px 0 6px }
.top3 ul{ margin:0; padding-left:18px; font-size:13px }
.top3 li{ margin:4px 0 }

/* 首頁 KPI 帶 */
.kpis{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:0 }
.kpi{ background:var(--soft); border:1px solid var(--line2); border-radius:var(--r); padding:16px 18px }
.kpi .n{ font-size:24px; font-weight:800; color:var(--accent); letter-spacing:-.02em }
.kpi .l{ font-size:12px; color:var(--muted); margin-top:2px }

/* 首頁雙欄 */
.cols{ display:grid; grid-template-columns:1fr 300px; gap:28px }
.board h3{ font-size:15px; color:var(--ink); margin:0 0 4px }
.board .cap{ font-size:12px; color:var(--muted); margin:0 0 12px }
.lb-row{ padding:7px 2px }
.lb-row .top{ display:flex; justify-content:space-between; font-size:13px; margin-bottom:5px }
.lb-row .nm{ color:var(--ink); font-weight:600 }
.lb-row .v{ color:var(--amt); font-variant-numeric:tabular-nums; font-size:12px }
.lb-row .bar{ height:6px; background:var(--line2); border-radius:999px; overflow:hidden }
.lb-row .bar i{ display:block; height:100%; background:linear-gradient(90deg,#46536b,#2f3a4d); border-radius:999px }

/* 搜尋頁 */
.search-outer{ margin:0 0 18px }
.search{ display:flex; gap:8px; max-width:580px }
.search input{ flex:1; border:1px solid var(--line); padding:11px 16px; font-size:14px; border-radius:999px; outline:none }
.search input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-l) }
.search button{ border:0; background:var(--accent); color:#fff; padding:11px 24px; cursor:pointer; border-radius:999px; font-weight:600 }
.search button:hover{ background:var(--accent-d) }
.lead{ color:var(--muted); font-size:14px }

/* about 卡 */
.card{ border:1px solid var(--line); border-radius:var(--r); padding:22px 24px; margin:0 0 16px; box-shadow:var(--shadow) }

/* footer */
footer{ border-top:1px solid #3a445a; margin-top:32px; background:var(--ink-band) }
footer .page{ padding:26px 20px 48px; font-size:12.5px; color:#9aa2b2 }
footer .foot-nav{ display:flex; flex-wrap:wrap; gap:8px 18px; margin-bottom:16px; padding-bottom:16px; border-bottom:1px solid #333c4d }
footer .foot-nav a{ color:#cfd5e0; font-weight:600 }
footer .foot-nav a:hover{ color:var(--gold) }
footer .src{ margin-top:8px; font-size:12px; color:#79808f; line-height:1.6 }

/* 桌機：側欄盒永遠展開、不可收合 */
@media (min-width:861px){
  .sbox > ul{ display:block }
  .sbox > summary{ pointer-events:none }
  .sbox > summary::after{ display:none }
}

/* 響應式 */
@media (max-width:860px){
  .layout{ flex-direction:column; align-items:stretch; padding:14px 14px 8px; gap:14px }
  .main{ order:-1; width:100%; padding:18px 16px }   /* 主內容排最前面+滿版，與側欄一致寬 */
  .side{ width:100%; flex:none; position:static; display:flex; flex-direction:column; gap:0 }
  .sbox{ margin-bottom:0; border-radius:0; border-bottom:0 }
  .side .sbox:first-child{ border-radius:var(--r) var(--r) 0 0 }
  .side .sbox:last-child{ border-radius:0 0 var(--r) var(--r); border-bottom:1px solid var(--line) }
  .sbox .cty{ grid-template-columns:repeat(4,1fr) }
  .cols{ grid-template-columns:1fr }
  .rank{ columns:1 }
  .kpis{ grid-template-columns:repeat(2,1fr) }
  /* 主選單改橫向捲動，不擠成多行；下拉改用側欄 */
  .topbar .page{ flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none }
  .topbar .page::-webkit-scrollbar{ display:none }
  .more-menu{ display:none }
}
@media (max-width:600px){
  .head-in{ gap:8px 12px }
  .brand{ font-size:18px }
  .brand small{ display:none }            /* 副標在窄螢幕隱藏，省空間不被截 */
  .hsearch{ flex-basis:100%; max-width:none; order:3 }  /* 搜尋整列換行 */
  .main h1{ font-size:20px }
  .idx-hero h1{ font-size:20px }
  /* 表格防爆版：縮字縮邊距、長標題斷行 */
  .table{ font-size:13px }
  .table th, .table td{ padding:9px 7px }
  .table .t-title, .t-title{ word-break:break-word }
  .table .t-sub{ word-break:break-word }
  .winrate{ grid-template-columns:repeat(3,1fr); gap:8px }
  .winrate .n{ font-size:18px }
  .region-grid{ grid-template-columns:repeat(2,1fr) }
  .cat-grid{ grid-template-columns:1fr }
}
@media (max-width:380px){
  .sbox .cty{ grid-template-columns:repeat(2,1fr) }
}

/* 政治獻金黨派標籤 */
.rtag{ display:inline-block; font-size:11px; padding:1px 8px; border-radius:999px; white-space:nowrap }
.don-t th{ background:var(--soft); font-size:12px }
.don-t td,.don-t th{ padding:7px 10px }

/* 董監事標籤 */
.dlist{ display:flex; flex-wrap:wrap; gap:6px }
.dchip{ font-size:12px; background:var(--soft); border:1px solid var(--line2); border-radius:999px; padding:3px 10px; color:var(--ink) }
.dchip b{ color:var(--muted); font-weight:600; font-size:11px }
/* 政治獻金表連結 */
.don-t a{ color:var(--accent) }
.don-t a:hover{ color:var(--accent-d) }

/* 多維篩選查詢列 */
.filterbar{ display:flex; flex-direction:column; gap:10px; margin:0 0 12px;
  background:var(--soft); border:1px solid var(--line2); border-radius:14px; padding:12px }
.filterbar input[type=search]{ flex:0 0 auto; width:100%; height:42px; box-sizing:border-box;
  border:1px solid var(--line); border-radius:10px; padding:0 14px; font-size:14px; color:var(--ink);
  background:#fff; outline:none; transition:border-color .15s, box-shadow .15s; -webkit-appearance:none; appearance:none }
.filterbar input[type=search]::placeholder{ color:var(--muted2) }
.filterbar .facets{ display:flex; flex-wrap:wrap; gap:8px; align-items:center }
.filterbar .facets select{ flex:1 1 150px; min-width:130px; height:40px; box-sizing:border-box;
  border:1px solid var(--line); border-radius:10px; padding:0 32px 0 12px; font-size:13.5px; color:var(--ink);
  background-color:#fff; cursor:pointer; outline:none; transition:border-color .15s, box-shadow .15s; -webkit-appearance:none; appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 11px center }
.filterbar input[type=search]:focus,.filterbar .facets select:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-l) }
.filterbar .facets select:hover{ border-color:var(--dot) }
.filterbar .facets button{ flex:0 0 auto; height:40px; border:0; background:var(--accent); color:#fff; padding:0 24px; border-radius:10px; font-size:13.5px; font-weight:600; cursor:pointer; transition:background .15s }
.filterbar .facets button:hover{ background:var(--accent-d) }
.filterbar .facets .clear{ flex:0 0 auto; font-size:13px; color:var(--muted); padding:0 8px; height:40px; display:inline-flex; align-items:center }
.filterbar .facets .clear:hover{ color:var(--accent) }
.yearchips{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 16px }
/* 細項分類收合 */
.subcat{ background:var(--soft); border:1px solid var(--line2); border-radius:10px; padding:4px 14px; margin:0 0 16px }
.subcat>summary{ cursor:pointer; font-size:13.5px; font-weight:600; color:var(--ink); padding:8px 0; list-style:none }
.subcat>summary::-webkit-details-marker{ display:none }
.subcat>summary::before{ content:"▸ "; color:var(--muted2) }
.subcat[open]>summary::before{ content:"▾ " }
.subcat .chips{ padding:0 0 8px }

/* footer 內容對齊主內容欄（與左側欄對齊，桌機）— 解決頁尾比主內容寬 */
@media (min-width:861px){
  footer > .page{ padding-left:260px }  /* 側欄 236 + gap 24 */
}

/* 清單標頭 + 空狀態 */
.list-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 10px; flex-wrap:wrap }
.list-head .lh-count{ font-size:13px; color:var(--muted) }
.list-head .lh-count strong{ color:var(--ink) }
.empty{ text-align:center; color:var(--muted2); font-size:14px; padding:36px 0 }
.mkt-list a{ color:var(--accent) }
.mkt-list a:hover{ color:var(--accent-d) }

/* 市場概況收合面板 */
.mkt-panel{ background:var(--soft); border:1px solid var(--line2); border-radius:14px; padding:0 16px; margin:0 0 16px }
.mkt-panel>summary{ display:flex; align-items:center; gap:12px; cursor:pointer; list-style:none; padding:14px 0 }
.mkt-panel>summary::-webkit-details-marker{ display:none }
.mkt-panel .mp-title{ font-size:15px; font-weight:700; color:var(--ink) }
.mkt-panel .mp-teaser{ font-size:13px; color:var(--muted); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.mkt-panel .mp-more{ font-size:13px; color:var(--accent); font-weight:600; white-space:nowrap }
.mkt-panel[open] .mp-more{ color:var(--muted2) }
.mkt-panel[open] .mp-more::after{ content:""; }
.mkt-panel[open]>summary{ border-bottom:1px solid var(--line2); margin-bottom:14px }
.mkt-panel[open] .mp-teaser{ display:none }
.mkt-panel>*:last-child{ padding-bottom:16px }

/* 細項分類可點清單 */
.subcats{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 0 16px }
.subcats .sc-label{ font-size:12.5px; color:var(--muted2); font-weight:600; margin-right:2px }
.subcats .chip em{ font-style:normal; color:var(--muted2); font-size:11px; margin-left:5px; font-variant-numeric:tabular-nums }
.subcats .chip[style*="fff"] em{ color:rgba(255,255,255,.8) }

/* 年度統計報表 */
.yearreport{ background:linear-gradient(180deg,#f7f9ff,#f3f5f8); border:1px solid var(--line2); border-radius:14px; padding:16px 18px; margin:0 0 16px }
.yearreport .yr-h{ font-size:14px; font-weight:700; color:var(--ink); margin:0 0 12px }
.yearreport .yr-stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px }
.yearreport .yr-stats > div{ display:flex; flex-direction:column; gap:3px }
.yearreport .yr-stats .n{ font-size:19px; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; letter-spacing:-.01em }
.yearreport .yr-stats .l{ font-size:12px; color:var(--muted) }

/* 已套用篩選標籤 */
.active-filters{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 0 14px }
.active-filters .af-label{ font-size:12.5px; color:var(--muted2); font-weight:600; margin-right:2px }
.af-pill{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; background:var(--accent-l); color:var(--accent-d); border:1px solid #d6e4ff; padding:4px 10px; border-radius:999px; font-weight:600 }
.af-pill .x{ font-size:10px; opacity:.7 }
.af-pill:hover{ background:#dce8ff; color:var(--accent-d) }
.af-clear{ font-size:12.5px; color:var(--muted); margin-left:4px }
.af-clear:hover{ color:var(--accent) }

/* 投標機會資訊（待標案） */
.bid-box{ background:linear-gradient(180deg,#f0f2f6,#eef0f4); border:1px solid #d6e4ff; border-radius:14px; padding:16px 18px; margin:0 0 18px }
.bid-h{ font-size:14px; font-weight:700; color:var(--accent-d); margin:0 0 12px }
.bid-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:0 0 12px }
.bid-grid > div{ display:flex; flex-direction:column; gap:3px }
.bid-grid .l{ font-size:12px; color:var(--muted) }
.bid-grid .v{ font-size:14.5px; font-weight:600; color:var(--ink) }
.bid-cta{ display:inline-block; background:var(--accent); color:#fff; font-size:13.5px; font-weight:600; padding:9px 18px; border-radius:10px }
.bid-cta:hover{ background:var(--accent-d); color:#fff }
@media (max-width:600px){ .bid-grid{ grid-template-columns:repeat(2,1fr) } }

/* 決標結果區（與投標機會區對稱，綠調） */
.award-box{ background:linear-gradient(180deg,#f0faf4,#eef7f1); border:1px solid #cfe9d8; border-radius:14px; padding:16px 18px; margin:0 0 18px }
.award-box .bid-h{ color:#0a7d43 }
.award-box .ab-note{ font-size:12.5px; color:var(--muted); margin:10px 0 0 }
/* 政黨徽章 */
.party-tag{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--pc); background:color-mix(in srgb, var(--pc) 10%, #fff); border:1px solid color-mix(in srgb, var(--pc) 25%, #fff); padding:2px 10px; border-radius:999px }
.party-tag i{ width:8px; height:8px; border-radius:50%; background:var(--pc); display:inline-block }

/* 分類路徑列（麵包屑式，顯示目前分類） */
.cat-path{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 14px; font-size:13.5px; background:var(--accent-l); border:1px solid #d6e4ff; border-radius:10px; padding:8px 14px }
.cat-path a{ color:var(--accent-d); font-weight:600 }
.cat-path a.on,.cat-path .on{ color:var(--ink); font-weight:700 }
.cat-path .sep{ color:var(--muted2) }
.cat-path .cat-clear{ margin-left:auto; font-size:12.5px; color:var(--muted); font-weight:500 }
.cat-path .cat-clear:hover{ color:var(--accent) }

/* 關注按鈕 */
.follow-btn{ border:1px solid var(--accent); background:#fff; color:var(--accent-d); font-size:13px; font-weight:600; padding:6px 14px; border-radius:999px; cursor:pointer; transition:all .15s; white-space:nowrap }
.follow-btn:hover{ background:var(--accent-l) }
.follow-btn.on{ background:var(--accent); color:#fff }
.idx-hero .follow-btn{ margin-top:10px }
.profile .ph{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px }
/* 我的：關注/最近瀏覽卡片網格 */
.mine-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:10px }
.mine-card{ display:flex; align-items:center; gap:10px; background:var(--box); border:1px solid var(--line); border-radius:10px; padding:11px 14px; box-shadow:var(--shadow) }
.mine-card:hover{ border-color:var(--accent); box-shadow:var(--shadow-h) }
.mine-card .mc-tag{ font-size:11px; font-weight:700; color:var(--accent-d); background:var(--accent-l); padding:2px 8px; border-radius:6px; flex:0 0 auto }
.mine-card .mc-name{ font-size:13.5px; color:var(--ink); font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.mine-n{ font-size:13px; color:var(--muted2); font-weight:500 }

/* 拒絕往來廠商名單卡片 */
.bl-list{ display:flex; flex-direction:column; gap:10px }
.bl-card{ background:var(--box); border:1px solid var(--line); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow) }
.bl-top{ display:flex; align-items:center; gap:10px; margin-bottom:6px }
.bl-vendor{ font-size:15.5px; font-weight:700; color:var(--ink) }
.bl-vendor .bl-id{ font-size:12px; color:var(--muted2); font-weight:500; font-variant-numeric:tabular-nums }
.bl-badge{ font-size:11px; font-weight:600; padding:2px 9px; border-radius:999px }
.bl-badge.act{ color:#9a1f1f; background:#fdecec; border:1px solid #f7caca }
.bl-badge.end{ color:var(--muted); background:var(--soft) }
.bl-reason{ font-size:13px; color:var(--ink2); line-height:1.5; margin:0 0 8px }
.bl-meta{ display:flex; flex-wrap:wrap; gap:6px 16px; font-size:12.5px; color:var(--muted) }
.bl-meta a{ color:var(--accent) }

/* 廠商停權警示 */
.debar-alert{ border-radius:12px; padding:12px 16px; margin:0 0 16px }
.debar-alert.act{ background:#fdecec; border:1px solid #f3b9b9 }
.debar-alert.past{ background:var(--soft); border:1px solid var(--line) }
.debar-alert .da-h{ font-size:14.5px; font-weight:700; margin:0 0 4px }
.debar-alert.act .da-h{ color:#b91c1c }
.debar-alert.past .da-h{ color:var(--muted) }
.debar-alert .da-body{ display:flex; flex-wrap:wrap; gap:6px 16px; font-size:12.5px; color:var(--ink2) }
.debar-alert .da-body a{ color:var(--accent); font-weight:600 }

/* CSC 契約廠商名錄 */
.csc-list{ display:flex; flex-direction:column; gap:10px }
.csc-card{ background:var(--box); border:1px solid var(--line); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow) }
.csc-card.feat{ border-color:var(--accent); background:linear-gradient(180deg,#f7faff,#fff) }
.cv-top{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:6px }
.cv-name{ font-size:15.5px; font-weight:700; color:var(--accent-d) }
.cv-contracts{ font-size:12.5px; color:var(--amt); font-weight:600; margin-left:auto; font-variant-numeric:tabular-nums }
.cv-badge.feat{ font-size:11px; font-weight:700; color:#fff; background:var(--accent); padding:2px 9px; border-radius:6px }
.cv-meta{ display:flex; flex-wrap:wrap; gap:6px 14px; font-size:12.5px; color:var(--muted); align-items:center }
.cv-cats{ color:var(--ink2); font-weight:500 }
.cv-inc{ color:var(--muted2) }
.cv-ags{ font-size:12px; color:var(--muted); margin-top:6px }
/* CSC 契約廠商徽章(廠商頁) */
.csc-vbadge{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:var(--accent-d); background:var(--accent-l); border:1px solid #d6e4ff; padding:4px 12px; border-radius:999px; margin:0 0 12px }

/* CSC 主要供應品項 */
.cv-items{ font-size:13px; color:var(--ink2); font-weight:500; margin:0 0 6px }
.csc-vbadge{ flex-wrap:wrap }

/* CSC 得標項目清單 */
.csc-contracts{ background:var(--box); border:1px solid var(--line); border-radius:12px; padding:4px 16px 12px; margin:0 0 16px; box-shadow:var(--shadow) }
.csc-contracts>summary{ cursor:pointer; font-size:14px; font-weight:700; color:var(--accent-d); padding:12px 0; list-style:none }
.csc-contracts>summary::-webkit-details-marker{ display:none }
.csc-contracts>summary::before{ content:"▾ "; color:var(--muted2) }
.csc-contracts .table{ margin-top:4px }

/* 標案歷程時間軸 */
.hist{ list-style:none; margin:0; padding:0; border-left:2px solid var(--line); margin-left:8px }
.hist li{ position:relative; padding:8px 0 8px 20px; display:flex; align-items:center; gap:12px; flex-wrap:wrap }
.hist li::before{ content:""; position:absolute; left:-7px; top:14px; width:12px; height:12px; border-radius:50%; background:var(--dot); border:2px solid #fff }
.hist-won::before{ background:#0a7d43 }
.hist-fail::before{ background:#b91c1c }
.hist-open::before{ background:var(--accent) }
.hist-date{ font-size:12.5px; color:var(--muted2); font-variant-numeric:tabular-nums; white-space:nowrap }
.hist-type{ font-size:13.5px; font-weight:600; color:var(--ink) }
.hist-amt{ font-size:13px; color:var(--amt); font-weight:600; margin-left:auto }

/* CSC 可訂購契約：契約編號做成可點徽章(給政府官員點選下單) */
.csc-order .csc-ctable td{ vertical-align:middle }
.csc-no{ display:inline-block; font-variant-numeric:tabular-nums; font-weight:700; font-size:13.5px; color:#fff; background:var(--accent); padding:3px 12px; border-radius:8px; white-space:nowrap }
.csc-no:hover{ background:var(--accent-d); color:#fff }

/* ===== 個案頁 週期性採購提示（互連重招雷達） ===== */
.recomp-hint{ display:block; margin:0 0 16px; padding:12px 15px; background:linear-gradient(180deg,#fffbeb,#fff); border:1px solid #fde68a; border-radius:11px; font-size:13.5px; color:var(--ink); line-height:1.5 }
.recomp-hint:hover{ border-color:#f59e0b }
.recomp-hint .rh-pred{ font-size:12.5px; color:#b45309; font-weight:600; margin-top:3px }
/* ===== 廠商頁 推薦商機（智能匹配招標中案件） ===== */
.match-box{ border:1px solid #d6e4ff; background:linear-gradient(180deg,#f7faff,#fff) }
.match-list{ display:flex; flex-direction:column; gap:8px }
.match-item{ display:block; padding:11px 14px; background:var(--box); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow); transition:border-color .12s,transform .12s }
.match-item:hover{ border-color:var(--accent); transform:translateY(-1px) }
.match-item .mi-title{ font-size:14px; font-weight:600; color:var(--ink); line-height:1.35 }
.match-item .mi-sub{ font-size:12px; color:var(--muted); margin-top:3px }
/* ===== 首頁 工具快捷 ===== */
.home-tools{ display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:12px }
.home-tools a{ display:block; padding:12px 14px; background:var(--box); border:1px solid var(--line); border-radius:11px; box-shadow:var(--shadow); transition:border-color .12s,transform .12s }
.home-tools a:hover{ border-color:var(--accent); transform:translateY(-1px) }
.home-tools b{ display:block; font-size:14px; color:var(--ink) }
.home-tools span{ font-size:11.5px; color:var(--muted) }
@media(max-width:640px){ .home-tools{ grid-template-columns:repeat(2,1fr) } }
/* ===== 首頁 共契快速入口 ===== */
.csc-home{ margin-top:14px; background:linear-gradient(180deg,var(--accent-l),#fff); border:1px solid #d6e4ff; border-radius:14px; padding:16px 18px; box-shadow:var(--shadow) }
.csc-home-hd{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap }
.csc-home-hd .bt{ font-size:15px; font-weight:700; color:var(--accent-d) }
.csc-home-hd .bd{ font-size:13px; color:var(--muted); margin-top:2px; max-width:60ch }
.csc-home-hd .go{ flex:none; background:var(--accent); color:#fff; font-size:13.5px; font-weight:600; padding:8px 16px; border-radius:9px }
.csc-home-hd .go:hover{ background:var(--accent-d) }
.csc-home-items{ display:flex; flex-wrap:wrap; gap:7px; margin-top:12px }
.csc-home-items a{ font-size:13px; font-weight:600; padding:6px 13px; border-radius:999px; background:#fff; border:1px solid #d6e4ff; color:var(--accent-d) }
.csc-home-items a:hover{ background:var(--accent); color:#fff; border-color:var(--accent) }
.csc-home-items a.more{ background:transparent; border-color:transparent; color:var(--muted) }
/* ===== 共契名錄 篩選（縣市＋類別＋搜尋） ===== */
.cscf{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px }
.cscf-q{ flex:1; min-width:180px; padding:9px 13px; border:1px solid var(--line); border-radius:9px; font-size:14px; background:var(--box); color:var(--ink) }
.cscf-q:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-l) }
.cscf-sel{ padding:9px 12px; border:1px solid var(--line); border-radius:9px; font-size:13.5px; background:var(--box); color:var(--ink); cursor:pointer }
.cscf-btn{ padding:9px 18px; border:none; border-radius:9px; background:var(--accent); color:#fff; font-size:14px; font-weight:600; cursor:pointer }
.cscf-btn:hover{ background:var(--accent-d) }
.cscf-clear{ align-self:center; font-size:13px; color:var(--muted) }
.cscf-chips{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:0 0 4px }
.cscf-lbl{ font-size:12.5px; color:var(--muted2); font-weight:600 }
.cscf-chip{ font-size:12.5px; padding:4px 11px; border-radius:999px; border:1px solid var(--line); background:var(--box); color:var(--muted); font-variant-numeric:tabular-nums }
.cscf-chip:hover{ border-color:var(--accent); color:var(--accent-d) }
.cscf-chip.on{ background:var(--accent); border-color:var(--accent); color:#fff }
.cscf-items{ padding:10px 12px; background:#f6f8fb; border:1px solid var(--line); border-radius:12px; margin-bottom:10px }
.cscf-chip.item{ background:#fff; font-weight:600; color:var(--ink) }
.cscf-chip.item:hover{ border-color:var(--accent); color:var(--accent-d); background:var(--accent-l) }
.cscf-chip.item.on{ background:var(--accent); border-color:var(--accent); color:#fff }
.cv-reg{ font-size:11px; font-weight:600; color:var(--accent-d); background:var(--accent-l); border:1px solid #e6e9ef; padding:1px 8px; border-radius:999px; margin-right:2px }
.cv-reg:hover{ background:#e6e9ef }
.cv-cat{ font-size:11.5px; color:var(--accent-d); background:var(--accent-l); padding:1px 8px; border-radius:6px; font-weight:500 }
/* ===== 共同供應契約 · 可供應項目（精簡表格＋篩選） ===== */
.cscx-hd{ margin:0 0 12px }
.cscx-hd h2{ font-size:17px; margin:0 0 4px; color:var(--ink) }
.cscx-sub{ font-size:13px; color:var(--muted); margin:0; line-height:1.55; max-width:64ch }
.cscx-filter{ display:flex; align-items:center; gap:8px; margin:0 0 10px; flex-wrap:wrap }
.cscx-search{ flex:1; min-width:180px; padding:8px 12px; border:1px solid var(--line); border-radius:9px; font-size:13.5px; background:var(--box); color:var(--ink) }
.cscx-search:focus{ outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-l) }
.cscx-sel{ padding:8px 12px; border:1px solid var(--line); border-radius:9px; font-size:13.5px; background:var(--box); color:var(--ink); cursor:pointer }
.cscx-count{ font-size:12.5px; color:var(--muted); font-weight:600; white-space:nowrap }
/* 表格 */
.cscx-tbl{ border:1px solid var(--line); border-radius:12px; overflow:hidden; box-shadow:var(--shadow) }
.cscx-th,.cscr>summary{ display:grid; grid-template-columns:minmax(0,2.3fr) 1.3fr 1.6fr .8fr .8fr .9fr; gap:10px; align-items:center }
.cscx-th{ padding:9px 14px; background:#f6f8fb; border-bottom:1px solid var(--line); font-size:11.5px; font-weight:600; color:var(--muted); letter-spacing:.02em }
.cscx-th .c-date,.cscx-th .c-vend,.cscx-th .c-exp{ text-align:right }
.cscr{ border-bottom:1px solid var(--line); background:var(--box) }
.cscr:last-of-type{ border-bottom:none }
.cscr>summary{ cursor:pointer; list-style:none; padding:11px 14px; font-size:13px; color:var(--ink) }
.cscr>summary::-webkit-details-marker{ display:none }
.cscr>summary:hover{ background:#fafbfc }
.cscr .c-item{ min-width:0; display:flex; flex-direction:column; gap:1px }
.cscr .c-item b{ font-weight:600; font-size:13.5px; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.cscr .c-item small{ font-size:11px; color:var(--muted2); font-variant-numeric:tabular-nums }
.cscr .c-no code{ font-family:ui-monospace,Menlo,monospace; font-size:12.5px; font-weight:700; color:var(--accent-d); background:var(--accent-l); border:1px solid #e6e9ef; padding:2px 8px; border-radius:6px; white-space:nowrap }
.cscr .c-org{ font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.cscr .c-date{ text-align:right; font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap }
.cscr .c-vend{ text-align:right }
.cscr .vend-link{ font-size:12.5px; color:var(--accent); font-weight:600; white-space:nowrap }
.cscr .vend-link:hover{ color:var(--accent-d); text-decoration:underline }
.cscr .c-exp{ text-align:right }
.cscr .exp-btn{ display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600; color:var(--accent-d); white-space:nowrap }
.cscr .exp-btn .exp-caret{ display:inline-block; font-size:9px; transition:transform .18s }
.cscr[open]>summary{ background:#f4f6f9 }
.cscr[open] .exp-btn .exp-caret{ transform:rotate(180deg) }
.cscr .exp-none{ color:var(--muted2); font-size:12px }
.cscr-body{ background:#fafbfc; border-top:1px solid var(--line) }
.cscr-il{ list-style:none; margin:0; padding:2px 0; max-height:320px; overflow-y:auto }
.cscr-il li{ display:flex; justify-content:space-between; gap:14px; padding:7px 16px; border-bottom:1px solid #eef1f4; font-size:12.5px }
.cscr-il li:last-child{ border-bottom:none }
.cscr-il .il-n{ color:var(--ink); line-height:1.4 }
.cscr-il .il-a{ flex:none; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap }
.cscr-note{ padding:8px 16px; font-size:11.5px; color:var(--muted) }
.cscx-empty{ padding:20px; text-align:center; color:var(--muted); font-size:13px }
.cscx-foot{ font-size:11.5px; color:var(--muted2); margin:12px 0 0; line-height:1.5 }
/* 手機：欄位堆疊 */
@media(max-width:720px){
  .cscx-th{ display:none }
  .cscr>summary{ grid-template-columns:1fr auto; gap:4px 10px; row-gap:5px; padding:11px 13px }
  .cscr .c-item{ grid-column:1; grid-row:1 }
  .cscr .c-no{ grid-column:2; grid-row:1; text-align:right }
  .cscr .c-org{ grid-column:1; grid-row:2; font-size:12px }
  .cscr .c-date{ grid-column:2; grid-row:2 }
  .cscr .c-vend{ grid-column:1; grid-row:3; text-align:left }
  .cscr .c-exp{ grid-column:2; grid-row:3 }
}
