/* 版面：左側導覽＋右側內容；資料表為主，圖表兩欄網格。
   顏色：介面用 --accent（墨藍），圖表用 --s1…--s8（經色盲驗證的分類色，順序固定），
   狀態用 --good/--warn/--crit 且一律搭配文字，不單靠顏色。 */
:root {
  --bg: #f3f5f7; --surface: #ffffff; --surface-2: #f8f9fb; --ink: #17202a; --ink-2: #4f5b69;
  --muted: #7a8593; --line: #dde2e8; --line-2: #c9d0d8;
  --accent: #1d4f7a; --accent-bg: #e6eef6; --accent-ink: #ffffff;
  --machine: #2c5b88; --machine-bg: #e7eef6; --human: #9a5b0c; --human-bg: #fbf0df;
  --good: #0f7a3a; --good-bg: #e3f3e8; --warn: #9a6a00; --warn-bg: #fdf3d6;
  --crit: #b3261e; --crit-bg: #fbe6e4;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948; --s-other: #a3abb5;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  --edge-shadow: rgba(23, 32, 42, .14);
  --frozen-bg: #eef1f5; --frozen-ink: #1d3a5c;   /* 表格固定的表頭與左側欄位 */
  --link: #1565c0;                                  /* 日期當連結時的顏色（跟固定欄的深藍字區隔） */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f141a; --surface: #161d25; --surface-2: #1b232d; --ink: #e3e8ee; --ink-2: #b2bcc8;
  --muted: #8692a0; --line: #26303c; --line-2: #34404e;
  --accent: #7fb2e5; --accent-bg: #1a2a3b; --accent-ink: #0f141a;
  --machine: #86b4e2; --machine-bg: #1b2a3a; --human: #e5a95e; --human-bg: #31251a;
  --good: #5cc98a; --good-bg: #16301f; --warn: #e2b44a; --warn-bg: #33290f;
  --crit: #f08079; --crit-bg: #3a1b19;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --s-other: #5f6976;
  --edge-shadow: rgba(0, 0, 0, .55);
  --frozen-bg: #1e2732; --frozen-ink: #9cc4ec;
  --link: #ffc56b;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0f141a; --surface: #161d25; --surface-2: #1b232d; --ink: #e3e8ee; --ink-2: #b2bcc8;
  --muted: #8692a0; --line: #26303c; --line-2: #34404e;
  --accent: #7fb2e5; --accent-bg: #1a2a3b; --accent-ink: #0f141a;
  --machine: #86b4e2; --machine-bg: #1b2a3a; --human: #e5a95e; --human-bg: #31251a;
  --good: #5cc98a; --good-bg: #16301f; --warn: #e2b44a; --warn-bg: #33290f;
  --crit: #f08079; --crit-bg: #3a1b19;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --s-other: #5f6976;
  --edge-shadow: rgba(0, 0, 0, .55);
  --frozen-bg: #1e2732; --frozen-ink: #9cc4ec;
  --link: #ffc56b;
  color-scheme: dark }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; color: var(--ink-2); }
p { margin: 0; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- 外框 */
.shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding-block: 18px; padding-inline: 14px;
        display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 700; font-size: 15px; display: grid; gap: 2px; }
.brand small { color: var(--muted); font-weight: 400; font-size: 12px; }
.navgroup { display: grid; gap: 2px; }
.navgroup .label { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; padding: 0 8px 4px; }
.navgroup a { color: var(--ink-2); padding: 6px 8px; border-radius: 5px; display: flex; justify-content: space-between; gap: 6px; }
.navgroup a:hover { background: var(--surface-2); text-decoration: none; }
.navgroup a.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.navgroup a .tag { font-size: 11px; color: var(--muted); font-weight: 400; }
.side .foot { margin-top: auto; font-size: 12px; color: var(--muted); display: grid; gap: 8px; }
.theme { display: grid; gap: 3px; }
.theme .seg { width: 100%; }
.theme .seg button { flex: 1; padding: 3px 0; font-size: 12px; color: var(--ink-2); }
.theme .seg button + button { border-left: 1px solid var(--line-2); }
.theme .seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.main { padding-block: 22px 60px; padding-inline: 28px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
/* 頁首說明跟著視窗寬度延伸（表格都很寬，限 75 字寬反而顯得擠）；右邊有按鈕時延伸到按鈕左邊 */
.pagehead > div:first-child { flex: 1 1 520px; min-width: 0; }
.pagehead p { color: var(--ink-2); margin-top: 4px; }
.banner { border: 1px solid var(--warn); background: var(--warn-bg); color: var(--ink); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; }

/* 側邊欄：寬螢幕時 side-top、side-menu 不佔版面（display: contents），排版照舊；
   手機版變成頂端一列（站名＋「選單」），按了才展開整個選單 */
.side-top { display: contents; }
.side-menu { display: contents; }
.side .nav-toggle { display: none; }   /* 要比後面的 .btn 具體，否則桌機也會出現 */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; max-height: 100vh; padding-block: 10px; gap: 0;
          border-right: 0; border-bottom: 1px solid var(--line); }
  .side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .side .nav-toggle { display: inline-flex; }
  .side-menu { display: none; }
  .side.open .side-menu { display: grid; gap: 16px; padding-top: 14px; }
  .side .navgroup a, .navsub > summary { padding-block: 9px; }          /* 手指點得到的高度 */
  .side .foot { margin-top: 0; padding-top: 4px; border-top: 1px solid var(--line); }
  .main { padding-inline: 16px; }
}

/* 篩選列：寬螢幕時 .fwrap 不佔版面、收合列不顯示；手機版預設收起，只露出一列「篩選＋目前條件」，點了才展開 */
.fwrap { display: contents; }
.filter-toggle { display: none; }
@media (max-width: 860px) {
  .fwrap { display: grid; }
  .filter-toggle { display: flex; align-items: center; gap: 10px; width: 100%; font: inherit; text-align: left; cursor: pointer;
                   color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
                   padding: 11px 14px; }
  .filter-toggle .ft-label { flex: none; font-size: 13px; font-weight: 600; }
  .filter-toggle .ft-sum { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted);
                           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .filter-toggle .caret { color: var(--accent); }
  .fwrap > .filters { display: none; position: static; }
  .fwrap.open > .filter-toggle { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-style: dashed; }
  .fwrap.open > .filters { display: flex; border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
}

/* 案件清單的卡片版（_cards.html）：寬螢幕看表格；手機版改看卡片，外層有 has-cards 的表格藏起來 */
.mcards { display: none; }
.mc-tools { display: none; }
@media (max-width: 860px) {
  .tw.has-cards { display: none; }
  .mcards { display: grid; gap: 10px; }
  /* 「卡片｜表格」切換（initCards 放到表格上方）：選表格時把表格放回來、卡片與卡片的排序藏起來 */
  .mc-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
  .mc-view button { font-size: 12.5px; padding: 5px 14px; }
  .mc-view button + button { border-left: 1px solid var(--line-2); }
  .mc-view button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
  html.view-table .tw.has-cards { display: block; }
  html.view-table .mcards, html.view-table .mc-tools .mc-sort { display: none; }
  .mc-sort { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12.5px; color: var(--muted); }
  .mcard { display: grid; gap: 5px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line);
           border-radius: 8px; font-size: 13px; color: var(--ink-2); min-width: 0; }
  .mcard[data-href] { cursor: pointer; }
  .mcard[data-href]:active { background: var(--accent-bg); }
  .mcard.hl { box-shadow: inset 3px 0 0 var(--accent); background-image: linear-gradient(var(--hl-tint), var(--hl-tint)); }
  .mc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
  .mc-title { font-size: 15px; font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
  .mc-title a { color: inherit; }
  .mc-title .mono { font-size: 12.5px; font-weight: 400; margin-left: 4px; }
  .mc-tag { flex: none; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 1px 8px;
            border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); }
  .mc-meta { font-size: 12.5px; color: var(--muted); }
  .mc-main { font-size: 14px; color: var(--ink); }
  .mc-main b { font-size: 16px; }
  .mc-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
  .mcard details { border-top: 1px dashed var(--line-2); padding-top: 6px; margin-top: 2px; }
  .mcard summary { cursor: pointer; color: var(--accent); font-size: 12.5px; }
  .mc-uw { display: grid; gap: 6px; margin-top: 8px; }
  .mc-uw > div { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .mc-uw > div:last-child { border-bottom: 0; padding-bottom: 0; }
  .mc-uw .r { text-align: right; font-variant-numeric: tabular-nums; }
  .mc-uw .sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
  .mc-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
  .mc-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
  .mc-top { display: grid; gap: 3px; border-top: 1px dashed var(--line-2); padding-top: 6px; margin-top: 2px; }
}

/* ---------------------------------------------------------------- 元件 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; min-width: 0; align-content: start; }
.card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card > header .sub { color: var(--muted); font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.grid2 > .full { grid-column: 1 / -1; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.tile .k { color: var(--muted); font-size: 12.5px; }
.tile .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 13px; font-weight: 400; color: var(--ink-2); margin-left: 3px; }
.tile .s { font-size: 12px; color: var(--ink-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
       border-radius: 5px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--crit); border-color: var(--crit); }
.btn.small { padding: 2px 8px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 5px; overflow: hidden; }
.seg a, .seg button { padding: 4px 12px; color: var(--ink-2); font-size: 13px; border: 0; background: var(--surface); font: inherit; cursor: pointer; }
.seg a + a { border-left: 1px solid var(--line-2); }
.seg a.on { background: var(--accent); color: var(--accent-ink); }
.seg a:hover { text-decoration: none; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 7px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--ink); }

.pill { display: inline-block; font-size: 11.5px; line-height: 1.5; padding: 0 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill.good { color: var(--good); background: var(--good-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.crit { color: var(--crit); background: var(--crit-bg); }
.pill.mute { color: var(--muted); background: var(--surface-2); }
.pill.human { color: var(--human); background: var(--human-bg); }
.pill.machine { color: var(--machine); background: var(--machine-bg); }

/* ---------------------------------------------------------------- 篩選列 */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line);
           border-radius: var(--radius); padding: 10px 14px; position: sticky; top: 0; z-index: 5; }
.filters label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.filters .chk { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); padding-bottom: 5px; }
.filters .fdate { display: flex; align-items: flex-end; gap: 6px; }
.filters .fdate > .muted { padding-bottom: 6px; }
.filters .fgrow { flex: 1 1 220px; }
.filters .fgrow input, .filters .fgrow select { width: 100%; }
.filters .fgrow:has(select) { flex-basis: 160px; max-width: 420px; }
.filters .fsubmit { margin-left: auto; }
.filters [hidden] { display: none !important; }
.filters .fmore { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: 6px; }
.filters .fmore > summary { cursor: pointer; font-size: 13px; color: var(--muted); width: max-content; }
.filters .fmore-n { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-weight: 600; font-size: 12px; }
.filters .fmore-body { display: grid; gap: 8px; padding-top: 8px; }
.filters .num-filter { display: flex; gap: 10px; align-items: flex-start; }
.filters .fmore-label { font-size: 12px; color: var(--muted); padding-top: 6px; }
.filters .num-rows { display: grid; gap: 6px; justify-items: start; }
.filters .num-row { display: flex; align-items: center; gap: 4px; }
.filters .num-row input[name=val] { width: 90px; }
.filters .num-row [data-num-unit] { min-width: 2.5em; }
input, select, textarea { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 5px; padding: 4px 7px; }
input[type="date"] { min-width: 132px; }
textarea { width: 100%; min-height: 54px; }
.presets { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 表格 */
/* 表格在框裡上下左右捲動，表頭與左側欄位才固定得住（固定靠 app.js 的 freezeTable）。
   框的高度扣掉頂端固定列（篩選列等，app.js 的 initStickyTop 量好放進 --sticky-top）。
   頁面往下捲、框的上緣鑽到固定列底下時，表頭往下移 --head-shift（也是 initStickyTop 算的），停在固定列正下方 */
.tw { overflow: auto; min-width: 0; max-height: calc(100vh - var(--sticky-top, 0px) - 32px); }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th, table.t td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
/* 數字欄靠右：必須比上一行（table.t td 靠左）更具體，否則 .n 的靠右會被蓋掉 */
table.t td.n, table.t th.n { text-align: right; }
table.t th { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; position: sticky; top: var(--head-shift, 0px); background: var(--surface); }
table.t tbody tr:hover { background: var(--surface-2); }
table.t tr.sum td { font-weight: 600; border-top: 2px solid var(--line-2); }
table.t th.sorted { color: var(--accent); }
table.t th a { color: inherit; }
table.t .grp th { text-align: center; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
table.t td.wrap { white-space: normal; min-width: 220px; max-width: 360px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); }

/* ---------------------------------------------------------------- 圖表 */
.chart { width: 100%; height: 340px; }
.widget.full .chart { height: 380px; }
.widget .fixed { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.widget .note { color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- 覆核 */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
td.ovr, input.ovr { background: var(--human-bg); }
input.changed { outline: 2px solid var(--human); }
.edit { width: 100%; min-width: 90px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: 6px; font-size: 13px; max-width: 420px; }
.toast.err { background: var(--crit); color: #fff; }
.who { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.who input { width: 100%; }
.bar { height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; min-width: 120px; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.problems { margin: 0; padding-left: 1.2em; color: var(--crit); font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.bottom { align-items: flex-end; }      /* 欄位上方有標題時，按鈕對齊輸入框底部（同前台篩選列） */
.stack { display: grid; gap: 8px; }
.prose { display: grid; gap: 12px; max-width: 78ch; }
.grid2 > .prose, .grid2 > .stack > .prose { max-width: none; }    /* 兩欄並排時（使用手冊）填滿自己那一欄 */
.prose h2 { margin-top: 10px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
/* 覆核清單：主辦列與展開的協辦列 */
table.review tr.deal td { border-top: 1px solid var(--line-2); }
table.review tr.co td { background: var(--surface-2); border-bottom-color: var(--line); }
table.review tr.co:hover td { background: var(--accent-bg); }
table.review td.ovr { background: var(--human-bg); }
table.review .caret { color: var(--accent); }
table.review tr.co.sum td { background: var(--surface); font-weight: 600; border-top: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); }
table.review td.bad { color: var(--crit); background: var(--crit-bg); }

/* ---------------------------------------------------------------- 寬表格的左右捲動
   電腦：表格上方加一條與下方同步的捲軸。手機（觸控）：捲軸不太顯示，改放滑桿＋提示。
   兩者都在左右邊緣加淡陰影，提示那一側還有欄位。表格沒超出時全部不出現。 */
.tw-frame { position: relative; min-width: 0; }
.tw-frame::before, .tw-frame::after { content: ""; position: absolute; top: 0; bottom: 0; width: 22px;
  pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 3; }
.tw-frame::before { left: 0; background: linear-gradient(to right, var(--edge-shadow), transparent); }
.tw-frame::after { right: 0; background: linear-gradient(to left, var(--edge-shadow), transparent); }
.tw-frame.can-left::before, .tw-frame.can-right::after { opacity: 1; }
.tw-bar { overflow-x: auto; overflow-y: hidden; height: 14px; margin-bottom: 2px; }
.tw-bar > div { height: 1px; }
.tw, .tw-bar { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; -webkit-overflow-scrolling: touch; }
.tw::-webkit-scrollbar, .tw-bar::-webkit-scrollbar { height: 10px; }
.tw::-webkit-scrollbar-thumb, .tw-bar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.tw::-webkit-scrollbar-thumb:hover, .tw-bar::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.tw::-webkit-scrollbar-track, .tw-bar::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 999px; }
.tw-touch { display: none; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tw-touch input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); padding: 0; border: 0; background: transparent; }
@media (pointer: coarse) {
  .tw-bar { display: none !important; }
  .tw-touch { display: flex; }
  .tw-touch[hidden] { display: none; }
}
pre.original { white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: 13.5px; line-height: 1.75;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0; max-width: 90ch; }

/* 工作警告與資料完整性 */
.warns > summary { cursor: pointer; list-style: none; margin-top: 4px; }
.warns > summary::-webkit-details-marker { display: none; }
.warns ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 12.5px; white-space: normal; }
.warns details > summary { cursor: pointer; }
.warns .list, .gaps { max-height: 220px; overflow: auto; padding: 4px 0; }
.gaps { font-size: 12.5px; line-height: 1.7; }
.batchbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 5;
  background: var(--surface); padding: 6px 0; border-bottom: 1px solid var(--line); }
.pickwrap { display: inline-block; padding: 4px 8px 4px 2px; margin: -4px 0; cursor: pointer; }
/* 後台直接編輯 */
td.editable { cursor: text; position: relative; }
td.editable:hover { outline: 1px dashed var(--line-2); outline-offset: -2px; }
td.editable.saving { opacity: .55; }
.cell-input { width: 100%; min-width: 70px; font: inherit; padding: 1px 4px; text-align: inherit; }
.revert { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0 0 0 4px; font-size: 12px; line-height: 1; }
.revert:hover { color: var(--crit); }
/* 表格排序 */
table.t th.sortable { cursor: pointer; user-select: none; }
table.t th.sortable:hover { color: var(--accent); }
.sortmark { font-size: 10px; color: var(--accent); }
.warn-text { color: var(--warn); }
/* 固定表頭與左側欄位 */
table.t thead th { z-index: 3; }
table.t td.sticky-col, table.t th.sticky-col { position: sticky; z-index: 2; background: var(--surface); }
table.t thead th.sticky-col { z-index: 4; }
table.t td.sticky-col.ovr { background: var(--human-bg); }
table.t td.sticky-col.bad { background: var(--crit-bg); }
table.t .sticky-edge { box-shadow: 6px 0 6px -6px var(--edge-shadow, rgba(0,0,0,.18)); }
/* 固定的表頭與左側欄位：淺灰底、深藍字，看得出它們被固定 */
table.t thead th { background: var(--frozen-bg); color: var(--frozen-ink); }
table.t td.sticky-col { background: var(--frozen-bg); color: var(--frozen-ink); }
table.t td.sticky-col a { color: var(--frozen-ink); }
table.t td.sticky-col.ovr { background: var(--human-bg); }
table.t td.sticky-col.bad { background: var(--crit-bg); }
/* 左上角（既是表頭、又是固定欄）：必須比 table.t th.sticky-col 的白底更具體 */
table.t thead th.sticky-col { background: var(--frozen-bg); color: var(--frozen-ink); }
/* 推算出來的證券簡稱（公司簡稱＋期別，非官方簡稱） */
.derived, table.t td.sticky-col a.derived { color: var(--muted); font-style: italic; }
/* 序號（S-000）、日期（YYYY-MM-DD）、代號等等寬欄位不換行，欄寬自動撐開；長文字另以 .mono-wrap 允許換行 */
table.t td.mono { white-space: nowrap; }
table.t td.mono.mono-wrap { white-space: normal; }
/* 日期快捷鍵：目前選到的範圍標亮 */
.presets .btn.on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 600; }
/* 證期局申報：以前年度的資料檔收合 */
.older-files { margin-top: 10px; }
.older-files > summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.older-files[open] > summary { margin-bottom: 6px; }
/* 信用評等：時間欄位表頭的刪除／左移、興櫃並排表格、產業分布格 */
.colhead { white-space: nowrap; }
.colops { margin-left: 6px; font-weight: 400; }
.colops a { color: var(--muted); text-decoration: none; padding: 0 2px; }
.colops a:hover { color: var(--crit); }
.period-add > summary { cursor: pointer; color: var(--accent); padding: 4px 0; }
.period-add[open] > summary { margin-bottom: 6px; }
.rating-emg { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rating-block + .rating-block { margin-top: 22px; }
table.t td.ind { min-width: 180px; }
table.t td.ind > div { display: flex; justify-content: space-between; gap: 10px; }
table.t td.ind > div + div { border-top: 1px dotted var(--line); margin-top: 2px; padding-top: 2px; }
table.t td.ind b { font-variant-numeric: tabular-nums; }
.colpanel { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.colpanel > summary { cursor: pointer; color: var(--accent); padding: 4px 0; }
.colpanel .colrow { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.colpanel .colrow.add { border-bottom: 0; }
.colpanel .colno { min-width: 22px; text-align: center; color: var(--muted); font-weight: 600; padding-bottom: 6px; }

/* 日期當超連結（決議日 → 公告原文）：亮一點的顏色＋虛線底線；固定欄裡也不被深藍字蓋掉 */
a.datelink, table.t td.sticky-col a.datelink { color: var(--link); text-decoration: underline dotted; text-underline-offset: 3px; }
a.datelink:hover, table.t td.sticky-col a.datelink:hover { text-decoration-style: solid; }

/* 唯讀版本頁首提示 */
.readonly-bar { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 12px; margin-bottom: 12px; font-size: 13px; }

/* 使用手冊右欄的資料處理流程圖。類別都限在 .flow 底下，避免跟其他頁的 .tag／.note／.step 撞名。
   顏色：fetch 獨立擷取、dep 依賴前一步、match 比對、calc 計算、db 寫入、cost 花錢。
   比對框 .fl-match：左 ⇄ 右 → 結果；加 .v 改成上下（⇵），並排的窄卡片也自動上下。 */
.flow {
  --fl-fetch: #1d5fa8; --fl-fetch-bg: #e6eff9; --fl-dep: #0e7c74; --fl-dep-bg: #e2f3f1;
  --fl-match: #a15c00; --fl-match-bg: #fdf0dc; --fl-calc: #2f7d32; --fl-calc-bg: #e6f3e6;
  --fl-db: #6a3fa0; --fl-db-bg: #efe7f8; --fl-cost: #b42318; --fl-cost-bg: #fde8e6;
  --fl-rail: #c9d1da;
  font-size: 13.5px; line-height: 1.55;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .flow {
  --fl-fetch: #7fb2e5; --fl-fetch-bg: #1a2a3b; --fl-dep: #6fd3c9; --fl-dep-bg: #15302d;
  --fl-match: #f0b45e; --fl-match-bg: #33261a; --fl-calc: #8fd28f; --fl-calc-bg: #1b2e1b;
  --fl-db: #c3a3ef; --fl-db-bg: #2a2138; --fl-cost: #f29a91; --fl-cost-bg: #3a1f1c;
  --fl-rail: #34414f } }
:root[data-theme="dark"] .flow {
  --fl-fetch: #7fb2e5; --fl-fetch-bg: #1a2a3b; --fl-dep: #6fd3c9; --fl-dep-bg: #15302d;
  --fl-match: #f0b45e; --fl-match-bg: #33261a; --fl-calc: #8fd28f; --fl-calc-bg: #1b2e1b;
  --fl-db: #c3a3ef; --fl-db-bg: #2a2138; --fl-cost: #f29a91; --fl-cost-bg: #3a1f1c;
  --fl-rail: #34414f }
.flow .lead { color: var(--muted); font-size: 13px; margin-top: 2px; }
.flow .legend { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; }
.flow .tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.flow .tag-fetch { color: var(--fl-fetch); background: var(--fl-fetch-bg); }
.flow .tag-dep   { color: var(--fl-dep);   background: var(--fl-dep-bg); }
.flow .tag-match { color: var(--fl-match); background: var(--fl-match-bg); }
.flow .tag-calc  { color: var(--fl-calc);  background: var(--fl-calc-bg); }
.flow .tag-db    { color: var(--fl-db);    background: var(--fl-db-bg); }
.flow .tag-cost  { color: var(--fl-cost);  background: var(--fl-cost-bg); }
.flow .phase { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 4px; }
.flow .phase b { font-size: 14px; }
.flow .phase span { color: var(--muted); font-size: 12px; }
.flow .rail { position: relative; padding-left: 22px; display: grid; gap: 10px; }
.flow .rail::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px;
  background: var(--fl-rail); border-radius: 2px; }
.flow .step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; display: grid; gap: 6px; min-width: 0; }
.flow .step::before { content: ""; position: absolute; left: -19px; top: 14px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--fl-rail); }
.flow .step.s-fetch::before { border-color: var(--fl-fetch); }
.flow .step.s-dep::before   { border-color: var(--fl-dep); }
.flow .step.s-match::before { border-color: var(--fl-match); }
.flow .step.s-calc::before  { border-color: var(--fl-calc); }
.flow .step.s-db::before    { border-color: var(--fl-db); background: var(--fl-db); }
.flow .step header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flow .step h3 { margin: 0; font-size: 14px; color: var(--ink); }
.flow .src { color: var(--muted); font-size: 12px; width: 100%; }
.flow .got { margin: 0; padding-left: 18px; }
.flow .got li { margin: 1px 0; }
.flow .note { color: var(--muted); font-size: 12px; }
.flow .fl-match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px 8px; align-items: center;
  background: var(--fl-match-bg); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; }
.flow .fl-match .k { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; text-align: center; }
.flow .fl-match .op { color: var(--fl-match); font-weight: 700; }
.flow .fl-match .res { grid-column: 1 / -1; color: var(--fl-match); font-weight: 600; }
.flow .fl-match .res::before { content: "→ "; }
.flow .fl-match.v { grid-template-columns: 1fr; gap: 3px; justify-items: center; padding: 7px 10px; }
.flow .fl-match.v .k { width: 100%; padding: 2px 8px; }
.flow .fl-match.v .op { line-height: 1; }
.flow .fl-match.v .res { text-align: center; margin-top: 2px; }
.flow .par { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.flow .par .step::before { display: none; }
.flow .par .fl-match { grid-template-columns: 1fr; text-align: center; }
.flow .par .fl-match .op { justify-self: center; }

/* SPO Pitch 頁 */
.pitch { gap: 14px; }
.pitch .note { color: var(--muted); font-size: 12px; }
.pitch details.note summary { cursor: pointer; }
.pitch .chart { height: 320px; }
.pitch h3 { margin-bottom: 4px; }
.pitch table.t td.gname { font-weight: 600; vertical-align: middle; }
.pitch table.terms th.grp, .pitch table.terms td.grp { border-left: 1px solid var(--line-2); }
.pitch table.terms tr.subtotal td, .pitch table.terms tr.auction td, .pitch table.terms tr.total td { font-weight: 600; background: var(--surface-2); }
.pitch table.terms tr.total td { border-top: 2px solid var(--line-2); }
.pitch input.tcri { width: 56px; padding: 2px 6px; font: inherit; font-size: 12.5px; }
.pitch input.tcri.manual { color: var(--human); background: var(--human-bg); border-color: var(--human); font-weight: 600; }
.pitch input.tcri.later { font-style: italic; }

/* 前台角落：資料覆核至哪一天 */
.asof-bar { display: flex; justify-content: flex-end; margin: -6px 0 6px; }
.asof-bar span { font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 10px; background: var(--surface); cursor: help; }

/* 覆核確認 */
.approve .diff { margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.approve .diff li { white-space: nowrap; }
.approve .diff .old { color: var(--muted); text-decoration: line-through; }
.approve .diff .new { font-weight: 600; }
.approve details > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.approve tr.blocked td { background: var(--surface-2); }
.approve .confirm-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.approve .confirm-bar input[name=note] { min-width: 260px; }
.approve button.sample[aria-pressed="true"] { background: var(--good-bg, var(--surface-2)); color: var(--good); border-color: var(--good); }

/* 資料庫結構 */
.schema .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: baseline; }
.schema .grp-chip { color: var(--ink-2); text-decoration: none; }
.schema .schema-chart { min-width: 1100px; }
.schema .legend-line { display: inline-block; width: 22px; margin: 0 4px 3px 12px; border-top: 2px solid var(--muted); vertical-align: middle; }
.schema .legend-line.dashed { border-top-style: dashed; }
.schema details.tbl { border-top: 1px solid var(--line); padding: 2px 0; }
.schema details.tbl > summary { cursor: pointer; padding: 8px 0; }
.schema details.tbl > summary .name { font-weight: 600; margin-right: 6px; }
.schema details.tbl:target, .schema details.tbl.flash { background: var(--surface-2); }
.schema p.desc { white-space: pre-line; margin: 0 0 8px; }
.schema .fk, .schema .lk { white-space: nowrap; }
.schema .lk { border-bottom: 1px dashed var(--muted); }

/* 券商統計：IPO、SPO 區塊用底色區分，細項（初上市／初上櫃、現增／可轉債）預設收起來 */
table.t.bk { --ipo-bg: color-mix(in srgb, var(--s1) 6%, var(--surface)); --ipo-head: color-mix(in srgb, var(--s1) 15%, var(--surface));
             --spo-bg: color-mix(in srgb, var(--s2) 6%, var(--surface)); --spo-head: color-mix(in srgb, var(--s2) 15%, var(--surface)); }
table.t.bk td.b-ipo, table.t.bk tr.b-ipo-row td { background: var(--ipo-bg); }
table.t.bk td.b-spo, table.t.bk tr.b-spo-row td { background: var(--spo-bg); }
table.t.bk td.b-all { background: var(--surface-2); }
table.t.bk th.b-ipo { background: var(--ipo-head); }
table.t.bk th.b-spo { background: var(--spo-head); }
table.t.bk th.b-all { background: var(--surface-2); }
table.t.bk th.bhead { text-align: center; color: var(--ink); font-size: 13px; font-weight: 700; padding: 6px 8px; }
table.t.bk th.bhead.b-ipo { border-top: 3px solid var(--s1); }
table.t.bk th.bhead.b-spo { border-top: 3px solid var(--s2); }
table.t.bk th.bhead.b-all { border-top: 3px solid var(--line-2); }
table.t.bk th.bhead.sub { font-weight: 600; font-size: 12.5px; }
table.t.bk .bstart { border-left: 2px solid var(--line-2); padding-left: 8px; }
table.t.bk tr.bk-first td { border-top: 2px solid var(--line-2); }
table.t.bk .sub { display: none; }
table.t.bk.open-IPO .sub-IPO, table.t.bk.open-SPO .sub-SPO { display: table-cell; }
table.t.bk td.sub.b-ipo { background: color-mix(in srgb, var(--s1) 3%, var(--surface)); }
table.t.bk td.sub.b-spo { background: color-mix(in srgb, var(--s2) 3%, var(--surface)); }
.blk-toggle { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.blk-toggle .hint { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.dt-badge { display: inline-block; padding: 0 8px; border-radius: 4px; font-weight: 700; font-size: 12.5px; color: var(--ink);
            border-left: 3px solid var(--s1); background: color-mix(in srgb, var(--s1) 15%, var(--surface)); }
.dt-badge.b-spo { border-left-color: var(--s2); background: color-mix(in srgb, var(--s2) 15%, var(--surface)); }

/* 側邊欄的收合分類（文件/簡報） */
.navsub > summary { list-style: none; cursor: pointer; color: var(--ink-2); padding: 6px 8px; border-radius: 5px;
                    display: flex; justify-content: space-between; align-items: center; }
.navsub > summary::-webkit-details-marker { display: none; }
.navsub > summary::after { color: var(--muted); }
.navsub > summary:hover { background: var(--surface-2); }
.navsub > summary.has-on { color: var(--accent); }
.navsub-items { display: grid; gap: 2px; margin: 2px 0 2px 10px; padding-left: 6px; border-left: 1px solid var(--line-2); }

/* 收合／展開的箭頭：用線條畫的 V 形，比字型裡的小三角形大、清楚；展開時轉向下（.open 或 details[open]） */
.caret, .navsub > summary::after {
  content: ""; display: inline-block; width: 8px; height: 8px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; margin: 0 7px 1px 3px; }
.caret.open, .navsub[open] > summary::after { transform: rotate(45deg); margin-bottom: 4px; }
details > summary::marker { font-size: 1.35em; }
details > summary::-webkit-details-marker { font-size: 1.35em; }

/* 醒目標示的券商（後台「頁面設定」選，預設元大）：該券商那一列疊一層淡淡的強調色、左側一條色線，名稱加粗。
   用疊加（background-image）而不是換底色，原本有底色的格子（例如券商統計的 IPO／SPO 區塊）也看得出來。 */
:root { --hl-tint: color-mix(in srgb, var(--accent) 12%, transparent); }
table.t tr.hl > td, table.t.bk tr.hl > td { background-image: linear-gradient(var(--hl-tint), var(--hl-tint)); }   /* 券商統計 IPO／SPO 區塊的底色也要疊得上去 */
table.t tr.hl:not([data-group-child]) > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.hl-name, a.hl-name { color: var(--accent); font-weight: 700; }
.hl-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px; font-size: 11px; font-weight: 600;
          color: var(--accent); background: var(--hl-tint); }
.hl-sample { display: inline-block; padding: 1px 8px; background-image: linear-gradient(var(--hl-tint), var(--hl-tint));
             box-shadow: inset 3px 0 0 var(--accent); }

/* 登入頁、權限不足頁 */
.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 16px; }
.login-box { width: min(380px, 100%); display: grid; gap: 14px; }
.login-box .brand { font-size: 18px; font-weight: 700; }
.login-box .brand small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.login-box input { width: 100%; }
.login-error { margin: 0; color: var(--crit); font-size: 13px; }

/* 主網域的選站首頁（portal.html） */
.portal { width: min(720px, 100%); display: grid; gap: 20px; }
.portal .brand { font-size: 20px; }
.portal-sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.portal-site { display: grid; gap: 6px; align-content: start; color: var(--ink-2); text-decoration: none; }
.portal-site:hover { text-decoration: none; border-color: var(--accent); }
.portal-site b { font-size: 16px; color: var(--accent); }

/* 分站時，側欄下方切到另一站的連結（不放在頁面列表裡） */
.side .site-switch { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 6px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.side .site-switch:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
/* 側邊欄左下：登入的帳號、我的帳號、登出 */
.side .me { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side .me a { display: grid; color: var(--ink); text-decoration: none; padding: 4px 6px; border-radius: 5px; }
.side .me a:hover, .side .me a.on { background: var(--surface-2); }
.side .me form { margin: 0; }

/* 總覽、圖表頁的「編輯我的圖表」 */
.widget-tools { justify-content: flex-end; margin-bottom: -4px; }
.widget-editor { border: 2px solid var(--accent); }
.widget-editor .wform { box-shadow: none; }

/* 信用評等：個體淨值表 */
.nw-box { margin: 4px 0 12px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); }
.nw-box > summary { cursor: pointer; padding: 2px 0; }
.nw-box[open] > summary { margin-bottom: 6px; }
.nw-need { color: var(--warn); font-weight: 600; }

/* ---------------------------------------------------------------- 使用手冊的聯絡窗口 */
.contacts .ct-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; }
.contacts h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.contacts .ct-person { display: grid; gap: 2px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.contacts .ct-person:first-of-type { border-top: 0; padding-top: 0; }
.contacts .ct-m { color: var(--ink-2); overflow-wrap: anywhere; }
.contacts .ct-m .muted { font-size: 12px; margin-right: 2px; }
.contacts .ct-v { user-select: all; }
/* 後台編輯：一個欄位一個框，裡面一個人一列 */
#ct-editor { display: grid; gap: 12px; }
.ct-edit-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 8px; background: var(--surface-2); }
.ct-edit-person { display: grid; gap: 6px; padding: 8px 10px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.ct-edit-m { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ct-edit-m input[data-k="label"] { width: 90px; }
.ct-edit-m input[data-k="value"] { flex: 1; min-width: 160px; max-width: 420px; }

/* ---------------------------------------------------------------- SPO Pitch 五～九：每段期間一張表，各自調整 */
.pblock { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.pblock-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pblock-head h3 { margin: 0; font-size: 15px; }
.pblock-edit { margin-left: auto; }
.pblock-edit > summary { cursor: pointer; color: var(--accent); font-size: 12.5px; }
.pblock-edit[open] { flex-basis: 100%; margin-left: 0; }
.pblock-edit form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-top: 8px;
                    padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.pblock-edit label { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.pblock-edit .chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); }
.tcri-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.tcri-pick legend { font-size: 12px; color: var(--muted); padding: 0; margin-bottom: 2px; }

/* 更新資料：步驟分「不用付錢」「需要付錢」兩區 */
#job-form [hidden], [data-upload-only][hidden] { display: none !important; }      /* 只屬於另一種執行方式的欄位：.row、.btn 的 display 會蓋過 hidden */
.steps-split { align-items: start; }
.steps-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.steps-box legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.steps-box.paid { border-color: var(--warn); }
.steps-box.paid legend { color: var(--warn); }
