/* 比較分析頁專用（共用樣式在 theme.css） */
.tabs { gap: 2px; }
.tabs button { border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 7px; cursor: pointer; color: var(--ink2); font-size: 13.5px; }
.tabs button:hover { color: var(--ink); background: var(--line2); }
.tabs button.on { background: var(--ink); color: #fff; font-weight: 500; }
.tab { display: flex; flex-direction: column; gap: 14px; }
.tab[hidden] { display: none; }
.sec-h { margin-bottom: 0; }

.ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctl .sp { flex: 1; }
.ctl .search { width: min(280px, 100%); }
.chips-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pk { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line); background: var(--card); font-size: 13px; cursor: pointer; color: var(--ink2); }
.pk:hover { border-color: var(--ink3); color: var(--ink); }
.pk.on { color: var(--ink); font-weight: 500; border-color: currentColor; }
.pk i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.pk .x { font-style: normal; color: var(--ink3); margin-left: 2px; }
.pk-grp { font-size: 11.5px; color: var(--ink3); margin: 0 2px 0 8px; }
.pk-grp:first-child { margin-left: 0; }

/* 開關（與主儀表板相同） */
.tg { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); cursor: pointer; user-select: none; white-space: nowrap; }
.tg input { position: absolute; opacity: 0; width: 0; height: 0; }
.tg span { width: 28px; height: 16px; border-radius: 8px; background: oklch(0.82 0.004 250); position: relative; transition: .15s; }
.tg span:after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: .15s; }
.tg input:checked + span { background: var(--acc); }
.tg input:checked + span:after { left: 14px; }

/* 比較表 */
.tbl-scroll { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th, .cmp td { padding: 10px 16px; border-bottom: 1px solid var(--line2); text-align: right; white-space: nowrap; }
.cmp th:first-child, .cmp td:first-child { text-align: left; color: var(--ink3); font-weight: 400; font-size: 12.5px; position: sticky; left: 0; background: var(--card); }
.cmp thead th { font-size: 14px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); }
.cmp thead th .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.cmp td { font-family: var(--mono); font-size: 12.5px; }
.cmp td.txt { font-family: var(--sans); font-size: 13px; }
.cmp td.best { color: var(--acc); font-weight: 500; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp td small { color: var(--ink3); margin-left: 4px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chart { width: 100%; min-height: 200px; }
.lgd { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink2); margin-top: 8px; }
.lgd i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }

/* 100% 堆疊橫條 */
.sbar { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.sbar .bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; gap: 1px; }
.sbar .bar div { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10.5px; min-width: 0; overflow: hidden; }
.skey { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink3); margin-top: 4px; }
.skey i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* 去化排行 */
.explain { padding: 16px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; background: transparent; border-style: dashed; }
.explain div { display: flex; flex-direction: column; gap: 4px; }
.explain small { font-family: var(--mono); font-size: 11px; color: var(--ink3); letter-spacing: .04em; }
.explain p { margin: 0; font-size: 13px; color: var(--ink2); text-wrap: pretty; }
.explain strong { color: var(--ink); }
table.rank-t { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 980px; }
.rank-t th { text-align: right; font-weight: 400; font-size: 12px; color: var(--ink3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; }
.rank-t th:hover { color: var(--ink); }
.rank-t th.l, .rank-t td.l { text-align: left; }
.rank-t td { padding: 9px 14px; border-bottom: 1px solid var(--line2); text-align: right; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.rank-t td.nm { font-family: var(--sans); font-size: 13px; font-weight: 500; }
.rank-t td.nm button { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.rank-t td.nm button:hover { color: var(--acc); }
.rank-t td.rg { font-family: var(--sans); color: var(--ink2); }
.rank-t td.no { color: var(--ink3); width: 36px; }
.rank-t tr:hover td { background: var(--bg); }
.pbar { display: inline-flex; align-items: center; gap: 8px; }
.pbar span { width: 70px; height: 5px; background: var(--line2); border-radius: 3px; overflow: hidden; }
.pbar span i { display: block; height: 100%; background: var(--ink); }
.hot { color: var(--acc); font-weight: 500; }

@media (max-width: 1000px) {
  .grid2, .explain { grid-template-columns: 1fr; }
}

/* 車位價格分頁 */
.rank-t td.nm a { color: inherit; text-decoration: none; }
.rank-t td.nm a:hover { color: var(--acc); }
.rank-t td b { font-weight: 500; }
