:root {
  /* 深藍主題（螢幕）；列印時於 @media print 覆寫為淺色 */
  --bg: #0b1736; --card: #13224d; --card-2: #1a2d61; --text: #e8eefb; --text-2: #c9d4ec; --muted: #9db0d6; --line: #2a3f78;
  --brand: #5b9cff; --brand-dark: #3f7fe6; --brand-text: #bcd4ff;
  --good: #34d399; --ni: #fbbf24; --poor: #f87171; --na: #7f8fb3; --info: #60a5fa;
  --good-bg: rgba(52, 211, 153, .14); --ni-bg: rgba(251, 191, 36, .14); --poor-bg: rgba(248, 113, 113, .16); --info-bg: rgba(96, 165, 250, .16);
  --good-text: #6ee7b7; --ni-text: #fcd34d; --poor-text: #fca5a5; --info-text: #bfdbfe;
  --logo-filter: invert(1) brightness(1.6);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Roboto, sans-serif; font-size: 13px; line-height: 1.5; color: var(--text); background: var(--bg); }
body.popup { width: 780px; min-height: 420px; max-height: 600px; overflow-y: auto; }
body.page { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; font-size: 14px; }
a { color: var(--brand-text); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: rgba(255,255,255,.08); padding: 1px 4px; border-radius: 3px; }
h2, h3, h4 { margin: 0; font-weight: 600; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.wrap { word-break: break-all; }

/* toolbar */
.toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.toolbar-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.toolbar-logo { height: 18px; width: auto; filter: var(--logo-filter); }
.toolbar-logo + .toolbar-logo { padding-left: 8px; border-left: 1px solid var(--line); }

/* brand */
.brand-bar { display: flex; align-items: center; gap: 14px; padding: 10px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.brand-logos { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 26px; width: auto; filter: var(--logo-filter); }
.brand-left { display: flex; flex-direction: column; gap: 4px; }
.brand-slogan { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--brand-text); }
.page .brand-slogan { font-size: 13px; }
.foot-slogan { color: var(--brand-text); font-weight: 600; letter-spacing: .06em; margin-top: 2px; }
.page .brand-logo { height: 34px; }
.brand-logos .brand-logo + .brand-logo { padding-left: 12px; border-left: 1px solid var(--line); }
.brand-text { margin-left: auto; text-align: right; }
.brand-by { font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.page .brand-by { font-size: 12px; }
.brand-name { font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.page .brand-name { font-size: 18px; }
.brand-sub { font-size: 11px; color: var(--muted); }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; color: var(--text); }
.foot-brand .brand-logo { height: 18px; }
.toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }
button { font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); cursor: pointer; }
button:hover { background: #22397a; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover { background: var(--brand-dark); }
.status { padding: 6px 12px; font-size: 12px; color: var(--muted); }
.status.busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
.status.err { color: var(--poor-text); background: var(--poor-bg); }
.status.ok { color: var(--good-text); }
/* 公開頁：輸入網址產生報告 */
.analyze-hero { max-width: 720px; margin: 48px auto 24px; text-align: center; }
.hero-slogan { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--brand-text); margin-bottom: 8px; }
.analyze-hero h1 { font-size: 26px; margin: 0 0 8px; }
.analyze-hero p { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.analyze-form { display: flex; gap: 8px; }
.analyze-form input { flex: 1; font: inherit; font-size: 15px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
.analyze-form input::placeholder, .ext-form input::placeholder { color: var(--na); }
.analyze-form input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.analyze-form button { font-size: 15px; padding: 10px 18px; white-space: nowrap; }
.analyze-form button:disabled { opacity: .6; cursor: progress; }
.analyze-note { margin-top: 10px; font-size: 12px; color: var(--muted); }
.analyze-progress { margin-top: 18px; font-size: 14px; }
.analyze-error { margin-top: 14px; padding: 10px 14px; border-radius: 8px; background: var(--poor-bg); color: var(--poor-text); font-size: 14px; text-align: left; }
@media (max-width: 600px) { .analyze-form { flex-direction: column; } }
.ext-box { margin-top: 40px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); text-align: left; }
.ext-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.ext-box p { margin: 0 0 12px; font-size: 13px; }
.ext-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ext-form { display: flex; gap: 8px; }
.ext-form input { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; width: 180px; background: var(--card-2); color: var(--text); }
.ext-steps { margin: 14px 0 0; padding-left: 20px; font-size: 13px; color: var(--muted); }
.ext-steps li { margin: 3px 0; }
.ext-steps code { font-size: 12px; background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; }
.share-box { margin: 0 12px 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
body.page .share-box { margin: 8px 0 12px; }
.share-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.share-link { flex: 1 1 260px; min-width: 0; font: inherit; font-size: 12px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card-2); color: var(--text); }
.share-meta { margin-top: 6px; font-size: 11px; color: var(--muted); }
.share-expiry { font-size: 12px; color: var(--muted); align-self: center; }
button.danger { color: var(--poor-text); border-color: var(--poor); background: transparent; }
button.danger:hover { background: var(--poor-bg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* report head */
.report { padding: 0 12px 16px; }
.page .report { padding: 0; }
.rep-head { padding: 12px 0 8px; }
.rep-brand { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); font-weight: 700; }
.rep-title { margin: 2px 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.page .rep-title { font-size: 24px; }
.rep-title { display: flex; align-items: center; gap: 10px; }
.site-icon { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px; box-shadow: 0 0 0 1px var(--line); }
.page .site-icon { width: 30px; height: 30px; }
.rep-url { font-size: 12px; word-break: break-all; }
.rep-meta { margin-top: 4px; font-size: 11px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* nav */
.rep-nav { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0 12px; border-bottom: 1px solid var(--line); position: sticky; top: 41px; background: var(--bg); z-index: 5; padding: 4px 0; }
.nav-btn { border: none; background: transparent; padding: 6px 10px; border-radius: 6px 6px 0 0; color: var(--muted); font-weight: 600; position: relative; }
.nav-btn.active, .nav-btn:hover { color: var(--brand-text); background: var(--card); }
.nav-btn.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--brand); }
.badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: var(--poor); color: #fff; font-size: 10px; line-height: 16px; }

/* sections */
.mode-tabs .sec { display: none; }
.mode-tabs .sec.active { display: block; }
.mode-stacked .sec { display: block; margin-bottom: 28px; padding-top: 8px; border-top: 2px solid var(--line); scroll-margin-top: 96px; }
.mode-stacked .sec:first-child { border-top: none; }
.sec-title { font-size: 16px; margin-bottom: 4px; }
.page .sec-title { font-size: 20px; }
.sec-desc { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; min-width: 0; }
.card-title { font-size: 13px; margin-bottom: 8px; color: var(--text); }
.page .card-title { font-size: 15px; }
.card h4 { font-size: 12px; margin: 12px 0 6px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
.note { font-size: 11px; color: var(--muted); background: var(--card-2); border-left: 3px solid var(--brand); padding: 6px 10px; margin: 8px 0; border-radius: 0 6px 6px 0; }
.good-msg { color: var(--good-text); font-weight: 600; }
ul.plain { margin: 0; padding-left: 18px; font-size: 12px; word-break: break-all; }

/* gauges */
.gauges { display: flex; gap: 12px; justify-content: space-around; margin: 8px 0 14px; }
.score-row { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; }
.score-counts { display: flex; gap: 6px; flex-wrap: wrap; }
.gauge { display: flex; flex-direction: column; align-items: center; width: 120px; }
.gauge-svg { width: 92px; height: 92px; }
.gauge-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.gauge-fg { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.gauge.good .gauge-fg { stroke: var(--good); } .gauge.good .gauge-text { fill: var(--good); }
.gauge.ni .gauge-fg { stroke: var(--ni); } .gauge.ni .gauge-text { fill: var(--ni); }
.gauge.poor .gauge-fg { stroke: var(--poor); } .gauge.poor .gauge-text { fill: var(--poor); }
.gauge.na .gauge-fg { stroke: var(--na); } .gauge.na .gauge-text { fill: var(--na); }
.gauge-text { font-size: 26px; font-weight: 700; stroke: none; }
.gauge-label { font-weight: 700; margin-top: 4px; }
.gauge-sub { font-size: 11px; color: var(--muted); }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; padding: 8px 10px; }
.tile.good { border-left-color: var(--good); } .tile.ni { border-left-color: var(--ni); } .tile.poor { border-left-color: var(--poor); } .tile.na { border-left-color: var(--na); }
.tile-label { font-size: 11px; color: var(--muted); font-weight: 600; }
.tile-value { font-size: 17px; font-weight: 700; margin: 2px 0; }
.tile-sub { font-size: 10px; color: var(--muted); }

/* metrics */
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 12px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.metric-head { display: flex; justify-content: space-between; align-items: baseline; }
.metric-label { font-weight: 600; font-size: 12px; }
.metric-score { font-size: 11px; color: var(--muted); }
.metric-value { font-size: 22px; font-weight: 700; margin: 2px 0 6px; }
.metric.good .metric-value { color: var(--good); } .metric.ni .metric-value { color: var(--ni); } .metric.poor .metric-value { color: var(--poor-text); } .metric.na .metric-value { color: var(--na); }
.metric-th { font-size: 10px; color: var(--muted); margin-top: 4px; }
.metric-desc { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 3px; }
.bar-fill.good { background: var(--good); } .bar-fill.ni { background: var(--ni); } .bar-fill.poor { background: var(--poor); } .bar-fill.blue { background: var(--brand); }

/* timeline */
.timeline { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin: 6px 0; background: var(--line); }
.ph { height: 100%; min-width: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.legend-item i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.ph-redirect { background: #9ca3af; } .ph-dns { background: #60a5fa; } .ph-tcp { background: #3b82f6; } .ph-tls { background: #6366f1; } .ph-wait { background: #f59e0b; } .ph-dl { background: #10b981; } .ph-dom { background: #8b5cf6; } .ph-load { background: #ec4899; }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-weight: 600; color: var(--muted); font-size: 11px; white-space: nowrap; }
.tbl td { word-break: break-word; }
.tbl td:first-child { max-width: 260px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0; font-size: 12px; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; word-break: break-word; }

/* tags & chips */
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.08); color: var(--muted); vertical-align: middle; }
.tag.pass { background: var(--good-bg); color: var(--good-text); } .tag.warn { background: var(--ni-bg); color: var(--ni-text); } .tag.fail { background: var(--poor-bg); color: var(--poor-text); }
.tag.sev.high { background: var(--poor); color: #1a0505; } .tag.sev.medium { background: var(--ni); color: #1f1300; } .tag.sev.low { background: #94a3b8; color: #0b1736; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 14px; background: var(--info-bg); color: var(--info-text); font-size: 12px; font-weight: 500; border: 1px solid rgba(96,165,250,.35); cursor: default; }
.chip.muted { background: rgba(255,255,255,.06); color: var(--muted); border-color: var(--line); }
.chip-ver { font-size: 10px; background: rgba(255,255,255,.12); padding: 0 5px; border-radius: 8px; color: var(--text-2); }
.chip-ids { font-size: 10px; color: #a5b4fc; font-family: ui-monospace, monospace; }
.tech-group { margin-bottom: 10px; }
.tech-group h4 { font-size: 12px; color: var(--muted); margin: 0 0 5px; }

/* checks */
.check-group h4 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; }
.check { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.check:last-child { border-bottom: none; }
.check-icon { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; color: #fff; background: var(--na); }
.check.pass .check-icon { background: var(--good); color: #052e1c; } .check.warn .check-icon { background: var(--ni); color: #1f1300; } .check.fail .check-icon { background: var(--poor); color: #1a0505; } .check.info .check-icon { background: var(--info); color: #0b1736; }
.check-body { flex: 1; min-width: 0; }
.check-label { font-weight: 600; font-size: 12px; }
.check-status { font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 6px; }
.check-detail { font-size: 12px; color: var(--text-2); word-break: break-word; }
.check-advice { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* issues */
.issue-group h4 { margin: 10px 0 6px; font-size: 13px; }
.issue-group h4.sev-high { color: var(--poor-text); } .issue-group h4.sev-medium { color: var(--ni-text); } .issue-group h4.sev-low { color: var(--muted); }
.issue-list { list-style: none; margin: 0; padding: 0; }
.issue-list li { background: var(--card); border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.issue-list li.sev-high { border-left-color: var(--poor); } .issue-list li.sev-medium { border-left-color: var(--ni); } .issue-list li.sev-low { border-left-color: #94a3b8; }
.issue-list.compact li { padding: 5px 8px; border: none; border-left: 3px solid var(--line); background: transparent; border-radius: 0; margin-bottom: 4px; }
.issue-head { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.issue-title { font-weight: 600; font-size: 12px; margin-left: 4px; }
.issue-detail { font-size: 12px; color: var(--text-2); margin-top: 2px; word-break: break-word; }
.issue-advice { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* og preview */
.og-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; max-width: 420px; background: var(--card); }
.og-img { width: 100%; aspect-ratio: 1.91; object-fit: cover; display: block; background: var(--line); }
.og-img.none { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.og-body { padding: 8px 10px; background: var(--card-2); }
.og-domain { font-size: 10px; color: var(--muted); }
.og-title { font-weight: 700; font-size: 13px; margin: 2px 0; }
.og-desc { font-size: 11px; color: var(--muted); max-height: 34px; overflow: hidden; }
.outline { list-style: none; margin: 0; padding: 0; font-size: 12px; max-height: 320px; overflow: auto; }
.outline li { padding: 2px 0; border-bottom: 1px dotted var(--line); }
.outline b { color: var(--brand-text); font-size: 10px; margin-right: 2px; }

.rep-foot { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* ---------- 手機版 RWD（公開頁 / 完整報告頁；popup 固定 780px 不受影響） ---------- */
@media (max-width: 640px) {
  body.page { padding: 0 12px 32px; font-size: 13px; }
  .toolbar { position: static; margin: 0 -12px; padding: 8px 12px; flex-wrap: wrap; }
  .toolbar-title { font-size: 13px; }
  .toolbar-logo { height: 16px; }
  .toolbar-actions { width: 100%; gap: 6px; }
  .toolbar-actions button { flex: 1 1 auto; min-height: 36px; font-size: 13px; }
  .share-expiry { width: 100%; font-size: 11px; }
  button { min-height: 34px; }

  /* 頁首 */
  .brand-bar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 0 8px; }
  .page .brand-logo { height: 26px; }
  .brand-left { width: 100%; }
  .brand-text { margin-left: 0; width: 100%; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .page .brand-by { width: 100%; font-size: 11px; }
  .page .brand-name { font-size: 15px; }
  .brand-sub { font-size: 10px; }
  .page .rep-title { font-size: 19px; align-items: flex-start; }
  .page .site-icon { width: 24px; height: 24px; margin-top: 2px; }
  .rep-meta { font-size: 11px; }

  /* 導覽列：水平捲動、固定在最上方 */
  .rep-nav { top: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 6px -12px 12px; padding: 4px 12px; gap: 2px; }
  .rep-nav::-webkit-scrollbar { display: none; }
  .nav-btn { white-space: nowrap; padding: 8px 10px; font-size: 13px; }
  .mode-stacked .sec { scroll-margin-top: 48px; margin-bottom: 22px; }
  .page .sec-title { font-size: 18px; }
  .sec-desc { font-size: 12px; }

  /* 卡片與格線 */
  .card { padding: 10px 12px; border-radius: 8px; }
  .page .card-title { font-size: 14px; }
  .gauges { gap: 4px; justify-content: space-between; margin: 4px 0 12px; }
  .gauge { width: auto; flex: 1 1 0; min-width: 0; }
  .gauge-svg { width: 76px; height: 76px; }
  .gauge-text { font-size: 22px; }
  .gauge-label { font-size: 12px; }
  .gauge-sub { font-size: 10px; }
  .score-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
  .tile { padding: 7px 8px; }
  .tile-value { font-size: 16px; }
  .metrics { grid-template-columns: 1fr; gap: 8px; }
  .metric-value { font-size: 20px; }
  .two-col { grid-template-columns: 1fr; }

  /* 表格 / 鍵值 / 清單 */
  .tbl { font-size: 11px; min-width: 100%; }
  .tbl th, .tbl td { padding: 5px 5px; }
  .tbl td:first-child { max-width: 180px; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dt { white-space: normal; margin-top: 6px; font-size: 11px; }
  .kv dt:first-child { margin-top: 0; }
  .outline { max-height: 240px; }
  .og-card { max-width: none; }
  .check { gap: 8px; }
  .check-label { display: block; }
  .check-status { margin-left: 0; display: block; }
  .issue-list li { padding: 8px 10px; }
  .chips { gap: 5px; }
  .chip { font-size: 11px; padding: 3px 8px; }

  /* 分享方塊 */
  body.page .share-box { margin: 8px 0 12px; padding: 10px; }
  .share-link { flex-basis: 100%; }
  .share-row button { flex: 1 1 auto; }

  /* 首頁 */
  .analyze-hero { margin: 24px auto 16px; }
  .analyze-hero h1 { font-size: 22px; }
  .analyze-hero p { font-size: 13px; }
  .analyze-form input { font-size: 16px; } /* 避免 iOS 聚焦時自動放大 */
  .analyze-form button { min-height: 44px; }
  .ext-box { margin-top: 28px; padding: 14px; }
  .ext-form { width: 100%; }
  .ext-form input { flex: 1; width: auto; font-size: 16px; }
}
@media (max-width: 380px) {
  .gauge-svg { width: 66px; height: 66px; }
  .gauge-text { font-size: 19px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

/* print */
@page { size: A4; margin: 14mm 12mm 16mm; }
@page { @top-right { content: "Fracdigi 品數位 × Psync 品昕數位 · 網頁檢測報告"; font-size: 8pt; color: #888; } @bottom-center { content: "第 " counter(page) " 頁，共 " counter(pages) " 頁"; font-size: 8pt; color: #888; } }
@media print {
  :root {
    --bg: #fff; --card: #fff; --card-2: #f8fafc; --text: #1f2937; --text-2: #374151; --muted: #6b7280; --line: #e5e7eb;
    --brand: #2563eb; --brand-dark: #1d4ed8; --brand-text: #1d4ed8;
    --good: #16a34a; --ni: #f59e0b; --poor: #dc2626; --na: #9ca3af; --info: #3b82f6;
    --good-bg: #ecfdf5; --ni-bg: #fffbeb; --poor-bg: #fef2f2; --info-bg: #eff6ff;
    --good-text: #15803d; --ni-text: #b45309; --poor-text: #b91c1c; --info-text: #1e40af;
    --logo-filter: none;
  }
  html, body { background: #fff !important; }
  code, .tag, .chip.muted, .chip-ver, .ext-steps code { background: #f1f5f9; }
  .chip { border-color: #dbeafe; }
  .tag.sev.high, .tag.sev.medium, .tag.sev.low { color: #fff; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  body.page, body.popup { max-width: none; width: auto; max-height: none; overflow: visible; padding: 0; margin: 0; font-size: 10.5px; line-height: 1.4; }
  .no-print, .toolbar, .rep-nav, .status { display: none !important; }
  .report { padding: 0; }
  .mode-tabs .sec { display: block; }
  .mode-stacked .sec, .mode-tabs .sec { border-top: none; margin: 0; padding-top: 0; }
  .sec { break-before: page; }
  .sec[data-sec="overview"] { break-before: auto; }
  .sec-title { font-size: 16px; margin: 0 0 2px; padding-bottom: 4px; border-bottom: 2px solid #111; }
  .sec-desc { margin-bottom: 8px; }
  .rep-head { padding-top: 0; }
  .rep-title { font-size: 20px; }
  .brand-bar { border-bottom: 2px solid #111; }
  .card { box-shadow: none; border-color: #d1d5db; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
  .card, .tile, .metric, .issue-list li, .check, .tech-group, .check-group, .og-card, .gauge, .legend, .timeline, .kv, tr { break-inside: avoid; }
  .card-title, .card h4, h4 { break-after: avoid; }
  .gauges { justify-content: space-around; }
  .gauge-svg { width: 80px; height: 80px; }
  .tiles { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .tile-value { font-size: 15px; }
  .metrics { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .metric-value { font-size: 18px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 8px; }
  .outline { max-height: none; overflow: visible; }
  .tbl { font-size: 10px; }
  .tbl th, .tbl td { padding: 3px 5px; }
  .tbl td:first-child { max-width: 220px; word-break: break-all; }
  .chip { border: 1px solid #cbd5e1; background: #f1f5f9; color: #111; }
  .check-icon { color: #fff !important; }
  .issue-list li { margin-bottom: 4px; padding: 5px 8px; }
  .note { background: #f9fafb; }
  .rep-foot { margin-top: 12px; }
  a { color: inherit; text-decoration: none; }
  .rep-url { color: var(--brand); }
}
