:root {
  color-scheme: light;
  --ink: #183b45;
  --teal: #246f73;
  --rule: #d7e3e3;
  --label: #edf4f1;
  --company-width: 350px;
  --label-width: 174px;
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: #f4f7f5;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; border-top: 5px solid var(--teal); }
main { width: min(100%, 1920px); margin: auto; padding: 27px 32px 22px; }
.identity { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.wordmark { text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .15em; color: var(--teal); }
.status { color: #836139; font-size: 12px; }
h1 { margin: 15px 0 12px; font-size: clamp(24px, 3vw, 38px); font-weight: 650; letter-spacing: .025em; line-height: 1.35; }
.comparison { margin-top: 23px; border: 1px solid var(--rule); border-radius: 12px; background: white; box-shadow: 0 8px 32px #163c4410; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 49px; padding: 7px 16px; border-bottom: 1px solid var(--rule); gap: 12px; }
.table-toolbar p { margin: 0; font-size: 12px; color: #627574; }
.table-hints { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 20px; }
.leverage-legend { display: flex; align-items: center; gap: 6px; }
.leverage-legend span { width: 12px; height: 12px; border-radius: 3px; background: #fff0c2; border: 1px solid #d8b767; flex-shrink: 0; }
.scroll-controls { display: flex; gap: 6px; }
.table-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.download-pdf { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 6px 12px; border-radius: 6px; background: var(--teal); color: white; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.download-pdf:hover { background: #18585d; }
.download-pdf:focus-visible { outline: 3px solid #c0873e; outline-offset: 2px; }
[hidden] { display: none !important; }
button { width: 34px; height: 32px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; color: var(--ink); font-size: 20px; cursor: pointer; transition: background .15s, border-color .15s; }
button:hover:not(:disabled) { background: var(--label); border-color: var(--teal); }
button:disabled { opacity: .32; cursor: default; }
button:focus-visible, .table-viewport:focus-visible { outline: 3px solid #c0873e; outline-offset: -3px; }
.table-viewport { position: relative; overflow: auto; max-height: calc(100dvh - 254px); min-height: 280px; overscroll-behavior: contain; scrollbar-color: #8daaa8 #eef4f1; scrollbar-width: auto; }
table { width: calc(var(--label-width) + var(--company-width) * var(--product-count)); min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; line-height: 1.75; font-variant-numeric: tabular-nums; }
.label-col { width: var(--label-width); }
.value-col { width: calc(var(--company-width) / var(--metric-count)); }
th, td { padding: 12px 17px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); vertical-align: middle; text-align: left; overflow-wrap: anywhere; }
thead th { position: sticky; top: 0; z-index: 4; background: #183d49; color: #fff; height: 76px; border-right-color: #ffffff21; border-bottom: 0; }
thead .company span { display: block; font-size: 17px; font-weight: 600; }
thead small { display: block; margin-top: 1px; font-size: 11px; font-weight: 400; color: #c6d6db; letter-spacing: .025em; }
thead small.company-code { display: inline-block; margin: 0 0 0 7px; font-size: 13px; vertical-align: baseline; color: #e1eeee; }
thead .filled-company { background: #246f73; }
thead .corner { left: 0; z-index: 6; font-size: 13px; }
tbody tr > th:first-child:not([colspan]) { position: sticky; left: 0; z-index: 2; background: var(--label); font-size: 13px; font-weight: 600; box-shadow: 1px 0 0 var(--rule); }
tbody td { background: white; }
tbody tr:nth-child(even) td { background: #f8faf9; }
tbody tr:hover td { background: #edf5f3; }
.filled { color: #193d47; }
.keep { white-space: nowrap; }
.pending { color: #718180; font-size: 12px; }
.section-row th { background: #dfece8; padding: 10px 17px; color: #245c5c; font-size: 13px; letter-spacing: .06em; border-top: 1px solid #c7dbd5; }
.section-row th span { position: sticky; left: 17px; display: inline-block; }
.year-label { white-space: nowrap; }
.age { display: inline; font-size: 11px; font-weight: 400; color: #718180; }
.metric-row th.metric { padding: 9px 6px; background: #eff5f4; font-size: 11px; font-weight: 500; text-align: center; }
td.annual { padding: 12px 4px; text-align: center; font-size: 11px; }
tbody tr td.highest-leverage { background: #fff0c2; color: #654600; font-weight: 700; }
.page-footer { margin-top: 16px; color: #697d7a; font-size: 11px; line-height: 1.8; }
.page-footer p { margin: 0; }
.page-footer time { display: block; margin-top: 8px; color: #7e918e; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1800px) { .table-viewport { max-height: calc(100dvh - 260px); } }
@media (max-width: 800px) {
  main { padding: 22px 18px 18px; }
  h1 { font-size: 27px; }
  .table-viewport { max-height: 68dvh; }
}
@media (max-width: 520px) {
  :root { --label-width: 110px; --company-width: 330px; }
  main { padding: 20px 10px 16px; }
  .page-header { padding: 0 6px; }
  h1 { font-size: 25px; max-width: 350px; line-height: 1.45; text-wrap: balance; }
  .identity { gap: 8px; }
  .wordmark { text-decoration: none; font-size: 12px; }
  .status { font-size: 10px; }
  .comparison { margin-top: 17px; border-radius: 8px; }
  th, td { padding: 11px 12px; }
  td.annual { padding-inline: 2px; white-space: nowrap; }
  tbody tr > th:first-child:not([colspan]) { font-size: 12px; }
  .table-toolbar { padding-inline: 12px; flex-wrap: wrap; }
  .table-actions { margin-left: auto; }
  .page-footer { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  @page { size: A2 landscape; margin: 12mm; }
  body { border: 0; background: white; }
  main { padding: 0; width: 100%; max-width: none; }
  h1 { font-size: 24px; }
  .comparison { margin-top: 12px; box-shadow: none; border-radius: 0; overflow: visible; }
  .table-toolbar { display: none; }
  .table-viewport { max-height: none; min-height: 0; overflow: visible; }
  table { width: 100%; min-width: 0; font-size: 10px; line-height: 1.4; }
  .label-col { width: 11%; }
  .value-col { width: calc(89% / var(--value-columns)); }
  th, td { padding: 5px 8px; }
  thead th { position: static; height: auto; }
  tbody tr > th:first-child:not([colspan]) { position: static; font-size: 10px; }
  thead .company span { font-size: 12px; }
  thead small, .pending, .age, td.annual, .metric-row th.metric { font-size: 9px; }
  .section-row th { padding: 5px 8px; font-size: 10px; }
  .section-row th span { position: static; }
  tr { break-inside: avoid; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* 2026-10-14: source-version status beside the comparison. */
.source-review { margin: 14px 0 20px; padding: 13px 16px; border: 1px solid #dfc999; border-radius: 10px; background: #fff8e8; color: #654600; font-size: 14px; line-height: 1.7; }
