:root {
  --ink: #17202a;
  --muted: #68727d;
  --line: #dfe4e8;
  --paper: #f6f7f8;
  --panel: #ffffff;
  --accent: #1f6feb;
  --accent-soft: #eaf2ff;
  --success: #16794d;
  --mono: "Cascadia Mono", Consolas, monospace;
  --sans: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.5; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.page-shell { max-width: 1500px; margin: 0 auto; padding: 24px 28px 0; }

.hero { min-height: auto; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.hero-topline { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.eyebrow { color: var(--accent); font-weight: 600; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; }
.status-dot span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.hero-grid { padding: 24px 0 20px; }
.hero-kicker, .section-kicker { margin: 0 0 8px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 36px; line-height: 1.2; font-weight: 650; letter-spacing: 0; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy { margin: 0; color: var(--muted); font-size: 14px; }
.rule-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.rule-strip div { display: flex; align-items: center; gap: 12px; min-height: 42px; padding-right: 18px; color: var(--muted); font-size: 12px; }
.rule-strip div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.rule-strip strong { color: var(--ink); font-family: var(--mono); font-size: 11px; font-weight: 600; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 0 28px; }
.stat-card { min-height: 74px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); }
.stat-card::before { display: none; }
.stat-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.stat-card strong { font-family: var(--mono); font-size: 25px; line-height: 1; font-weight: 600; }
.stat-tail { margin-left: 5px; color: var(--muted); font-size: 12px; }
.stat-highlight { background: var(--accent-soft); border-color: #c8dcff; }
.stat-highlight .stat-label, .stat-highlight .stat-tail { color: var(--accent); }

.catalog-section { padding-bottom: 46px; }
.candidate-section { padding: 34px 0 46px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 23px; font-weight: 650; letter-spacing: 0; }
.section-actions { display: flex; align-items: end; gap: 16px; }
.section-note { margin: 0 0 2px; color: var(--muted); font-size: 12px; text-align: right; }
.sheet-link { padding: 7px 11px; background: var(--accent); color: #fff; border-radius: 3px; font-size: 12px; text-decoration: none; white-space: nowrap; }
.sheet-link:hover { background: #1757b7; }
.notice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 10px; }
.notice-card { display: flex; flex-direction: column; gap: 4px; min-height: 88px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); }
.notice-card strong { color: var(--ink); font-size: 12px; }
.notice-card span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.notice-warning { background: #fffaf0; border-color: #ecd9a9; }
.notice-warning strong { color: #8c5b00; }
.policy-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 10px; font-size: 11px; }
.policy-links a { color: var(--accent); text-decoration: none; }
.policy-links a:hover { text-decoration: underline; }
.candidate-table-wrap { margin-top: 0; }
.candidate-table { min-width: 1080px; }
.candidate-table .product-name small, .gap-note { max-width: 260px; color: var(--muted); font-family: var(--sans); font-size: 10px; font-weight: 400; line-height: 1.45; }
.gap-positive, .gap-negative { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 650; white-space: nowrap; }
.gap-positive { color: var(--success); }
.gap-negative { color: #a35a00; }
.gap-note { display: block; margin-top: 3px; }
.mainland-price { color: var(--ink); }

.filters { display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--panel); border: 1px solid var(--line); }
.filters select, .search-field input { height: 38px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); padding: 0 10px; outline: none; }
.filters select:focus, .search-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,111,235,.14); }
.search-field { display: flex; flex: 1 1 290px; align-items: center; position: relative; }
.search-field input { width: 100%; padding-left: 12px; }
.search-icon { display: none; }
.toggle-control { display: inline-flex; align-items: center; gap: 7px; min-width: max-content; padding: 0 8px; color: var(--muted); font-size: 12px; }
.toggle-control input { accent-color: var(--accent); }
.toggle-ui { display: none; }
.clear-button { height: 38px; padding: 0 12px; background: #fff; color: var(--accent); border: 1px solid #b7cff4; border-radius: 3px; white-space: nowrap; }
.clear-button:hover { background: var(--accent-soft); }
.results-bar { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0 8px; color: var(--muted); font-size: 12px; }
.results-bar p { margin: 0; }
.results-bar p:first-child { color: var(--ink); font-weight: 600; }

.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); }
table { width: 100%; min-width: 1150px; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #f3f5f7; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
td { color: var(--ink); font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbff; }
.product-name { color: var(--ink); font-size: 13px; font-weight: 600; }
.product-name small { display: block; margin-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 400; }
.tag { display: inline-flex; margin-left: 6px; color: var(--success); font-size: 10px; font-weight: 400; white-space: nowrap; }
.tag::before { content: ""; width: 5px; height: 5px; margin: 5px 4px 0 0; border-radius: 50%; background: currentColor; }
.type-label, .date { color: var(--muted); font-size: 11px; }
.numeric { text-align: right; }
.price-hkd, .price-rmb, .fee { font-family: var(--mono); white-space: nowrap; }
.price-hkd { color: var(--ink); }
.price-rmb { color: var(--accent); font-weight: 650; }
.customer-heading { color: var(--accent); }
.fee { color: #8c5b00; }
.fee.high { color: #8c5b00; font-family: var(--mono); font-size: 12px; }
.note { display: block; max-width: 320px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.source-link { color: var(--accent); font-size: 11px; text-decoration: none; white-space: nowrap; }
.source-link:hover { text-decoration: underline; }
.merchant-quote { min-width: 155px; }
.merchant-link { display: block; color: var(--accent); font-size: 11px; line-height: 1.4; text-decoration: none; }
.merchant-link:hover { text-decoration: underline; }
.merchant-meta, .merchant-pending, .merchant-empty { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.merchant-pending, .merchant-empty { font-style: normal; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-mark { display: block; margin-bottom: 8px; font-size: 28px; }
.empty-state h3 { margin-bottom: 5px; color: var(--ink); font-size: 18px; }
.empty-state p { margin: 0; font-size: 12px; }

.footer { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-brand { color: var(--ink); font-size: 12px; font-weight: 650; }
.footer-details { max-width: 720px; font-size: 11px; line-height: 1.7; }
.footer-details p { margin: 0 0 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .page-shell { padding: 18px 16px 0; }
  .hero-grid { padding: 20px 0 16px; }
  .filters { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .filters select { flex: 1 1 150px; }
  .section-actions { align-items: flex-end; flex-direction: column-reverse; gap: 8px; }
  .notice-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-topline, .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .rule-strip { grid-template-columns: 1fr; }
  .rule-strip div, .rule-strip div + div { min-height: 36px; padding: 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .rule-strip div:last-child { border-bottom: 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .section-actions { width: 100%; align-items: flex-start; }
  .section-note { text-align: left; }
  .results-bar, .footer { align-items: flex-start; flex-direction: column; }
  .footer { display: flex; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
