:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --text: #1c2430;
  --muted: #667085;
  --primary: #2f5bea;
  --primary-hover: #2449c4;
  --primary-soft: #eaf0ff;
  --good: #12805c;
  --good-soft: #e3f5ed;
  --fair: #b25e09;
  --fair-soft: #fdf1e1;
  --poor: #c8322b;
  --poor-soft: #fdeceb;
  --low: #5b6b82;
  --low-soft: #eef1f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e27;
    --surface-2: #1e2732;
    --border: #2a3542;
    --text: #e6eaf0;
    --muted: #98a2b3;
    --primary: #6b8cff;
    --primary-hover: #8aa4ff;
    --primary-soft: #1f2a4a;
    --good: #4cc79a;
    --good-soft: #15302a;
    --fair: #f0a54a;
    --fair-soft: #3a2a14;
    --poor: #ff7a72;
    --poor-soft: #3b1a1a;
    --low: #a3b0c2;
    --low-soft: #222c38;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; line-height: 1.3; }
h2 { font-size: 1.1rem; margin: 0; }
p { margin: .25rem 0; }
pre { white-space: pre-wrap; word-break: break-all; margin: .5rem 0 0; }

.container { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.strong { font-weight: 600; }
.right { text-align: right; }
.text-poor { color: var(--poor); }
.url { word-break: break-all; }
.nowrap { white-space: nowrap; }

/* 頂部導覽 */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.nav { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav a { white-space: nowrap; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a[aria-current] { color: var(--text); background: var(--surface-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.user-link { color: var(--text); font-weight: 500; }
.link-button { white-space: nowrap; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.link-button:hover { color: var(--text); }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-switch button { white-space: nowrap; background: none; border: 0; padding: 3px 9px; font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* 版面 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 20px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; }
.stack > * + * { margin-top: 14px; }
.flash { background: var(--good-soft); color: var(--good); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-weight: 500; }
.alert { background: var(--poor-soft); color: var(--poor); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.notes { white-space: pre-wrap; color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-code { font-size: 3rem; font-weight: 700; color: var(--border); margin: 0; }
.empty h1 { color: var(--text); margin-bottom: 16px; }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; list-style: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--poor); border-color: var(--poor); color: #fff; }
.btn-danger:hover { filter: brightness(.95); background: var(--poor); }
.btn-sm { padding: 4px 10px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; padding: 10px; }

/* 數據 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat, .summary > .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; margin: 0; }
.stat-label { color: var(--muted); font-size: .82rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.score { display: inline-block; min-width: 2.4em; text-align: center; font-weight: 700; padding: 1px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.score-good { color: var(--good); background: var(--good-soft); }
.score-fair { color: var(--fair); background: var(--fair-soft); }
.score-poor { color: var(--poor); background: var(--poor-soft); }
.score-none { color: var(--muted); background: var(--surface-2); }
.score-lg { font-size: 1.2rem; padding: 2px 12px; }
.score-xl { font-size: 2.2rem; padding: 4px 16px; align-self: flex-start; }
.stat-value .score { font-size: 1.3rem; }
.delta { font-size: .78rem; font-weight: 600; margin-left: 4px; }
.delta.up { color: var(--good); }
.delta.down { color: var(--poor); }

.sev, .status, .tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sev-high { color: var(--poor); background: var(--poor-soft); }
.sev-medium { color: var(--fair); background: var(--fair-soft); }
.sev-low { color: var(--low); background: var(--low-soft); }
.status-pending, .status-running { color: var(--primary); background: var(--primary-soft); }
.status-completed { color: var(--good); background: var(--good-soft); }
.status-failed { color: var(--poor); background: var(--poor-soft); }
.tag { color: var(--muted); background: var(--surface-2); margin-left: 6px; font-weight: 500; }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact td { padding: 7px 10px; font-size: .9rem; }
.url-cell { max-width: 420px; }
.table-sites { table-layout: fixed; min-width: 880px; }
.table-sites .col-score { width: 120px; }
.table-sites .col-num { width: 100px; }
.table-sites .col-date { width: 190px; }
.table-sites .col-action { width: 120px; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-2); }
.is-inactive td { opacity: .55; }

/* 儀表板 */
.client-block { padding-bottom: 8px; }
.client-block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.client-block-head a { color: var(--text); }
.search input { width: 240px; }

/* 表單 */
.form-card { max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 500; font-size: .9rem; padding: 0; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
input:disabled { background: var(--surface-2); color: var(--muted); }
.hint { color: var(--muted); font-size: .82rem; }
.field-error { color: var(--poor); font-size: .85rem; margin: 0; }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input { width: auto; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 6px; padding: 12px; background: var(--surface-2); border-radius: 8px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 8px; padding-top: 6px; }
.grid-form { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr; gap: 12px; align-items: start; margin-top: 14px; }
.grid-form .form-actions { grid-column: 1 / -1; }
.add-site { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.add-site > summary::-webkit-details-marker { display: none; }
.add-site[open] > summary { display: none; }
.danger-zone { max-width: 640px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-color: var(--poor-soft); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--surface-2); padding: 4px 12px; border-radius: 999px; font-size: .9rem; }

/* 登入 */
.auth-wrap { min-height: 80vh; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 380px; padding: 32px; }
.auth-card h1 { font-size: 1.3rem; margin: 20px 0 16px; }
.lang-links { text-align: center; margin-top: 20px; display: flex; justify-content: center; gap: 14px; font-size: .9rem; }
.lang-links a { color: var(--muted); }
.lang-links a[aria-current] { color: var(--text); font-weight: 600; }

/* 趨勢圖 */
.trend-chart { width: 100%; height: auto; display: block; max-height: 220px; }
.trend-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.trend-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; cursor: pointer; }
.trend-dot:hover { fill: var(--primary); }
.trend-guide { stroke: var(--border); stroke-dasharray: 4 4; }
.trend-axis { fill: var(--muted); font-size: 11px; }
.trend-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* 診斷報告 */
.segmented { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.segmented-label { padding: 6px 10px; color: var(--muted); font-size: .82rem; border-right: 1px solid var(--border); }
.segmented a { padding: 6px 12px; color: var(--muted); font-size: .9rem; }
.segmented a:hover { text-decoration: none; background: var(--surface-2); }
.segmented a[aria-current] { color: var(--text); font-weight: 600; background: var(--surface-2); }
.summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.summary-sev { color: var(--text); border-left-width: 4px !important; }
.summary-sev:hover { text-decoration: none; background: var(--surface-2); }
.summary-sev.is-active { outline: 2px solid var(--primary); }
.sev-card-high { border-left-color: var(--poor) !important; }
.sev-card-medium { border-left-color: var(--fair) !important; }
.sev-card-low { border-left-color: var(--low) !important; }
.languages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; font-size: .9rem; }
.lang-pill { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 500; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--primary); }
.filter-note { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.issue { padding: 0; margin-bottom: 8px; }
.issue > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.issue > summary::-webkit-details-marker { display: none; }
.issue > summary::after { content: "›"; color: var(--muted); font-size: 1.3rem; transition: transform .15s; margin-left: 4px; }
.issue[open] > summary::after { transform: rotate(90deg); }
.issue-title { font-weight: 600; flex: 1; }
.issue-count { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.issue-body { padding: 0 18px 16px; border-top: 1px solid var(--border); }
.recommendation { background: var(--primary-soft); border-radius: 8px; padding: 10px 14px; margin: 14px 0 10px; }
.occurrences { list-style: none; margin: 0; padding: 0; }
.occurrences > li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.occurrences > li:last-child { border-bottom: 0; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0 0; font-size: .82rem; color: var(--muted); }
.details dt { white-space: nowrap; }
.details dd { margin: 0; color: var(--text); word-break: break-all; }
.progress-card { display: flex; gap: 16px; align-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; }


/* ===== 兩步驟驗證與操作紀錄 ===== */
.otp-input { font-size: 1.3rem; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { background: #fff; border-radius: 8px; padding: 12px; width: 220px; }
.qr svg { width: 100%; height: auto; display: block; }
.secret { word-break: break-all; }
.recovery-codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.recovery-codes code { display: block; background: var(--surface-2); padding: 8px 12px; border-radius: 6px; font-size: 1rem; text-align: center; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: 160px; }
.audit-action { font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.audit-action.is-bad { background: var(--poor-soft); color: var(--poor); }

/* ===== 分享報告 ===== */
.share-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.share-overview { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; }
.share-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.share-counts .share-count:last-child:nth-child(4) { grid-column: 1 / -1; }
.share-count { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; border-left: 4px solid transparent; }
.share-issue { padding: 14px 18px; margin-bottom: 10px; }
.share-issue-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share-footer { text-align: center; padding: 24px 0 0; }
.alert-warn { background: var(--fair-soft); color: var(--fair); border-radius: 8px; padding: 10px 14px; }

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f4f5f7; --border: #dfe2e6; --text: #111; --muted: #555; color-scheme: light; }
  body { background: #fff; font-size: 12px; }
  .topbar, .no-print, .flash, .section-nav, .tabs, .actions .btn, .state-form, .group-state { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .avoid-break { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  details > *:not(summary) { display: block; }
}

/* ===== 問題追蹤 ===== */
.text-good { color: var(--good); }
.occurrence-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.state-form { display: flex; gap: 6px; flex-shrink: 0; }
.state-form select { width: auto; padding: 3px 8px; font-size: .8rem; border-radius: 6px; }
.state-in_progress select[name="status"] { border-color: var(--primary); color: var(--primary); }
.state-ignored select[name="status"], .state-false_positive select[name="status"] { color: var(--muted); }
.group-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; padding: 8px 12px; background: var(--surface-2); border-radius: 8px; }
.is-suppressed > .occurrence-head a, .is-suppressed .details { opacity: .5; }
.diff-summary { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.diff-new { border-top: 3px solid var(--poor); }
.diff-resolved { border-top: 3px solid var(--good); }
.diff-group { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.diff-group summary { cursor: pointer; }
.diff-group ul { margin-top: 8px; }

/* ===== Search Console ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.kpi { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi .delta { margin-left: 0; }
.gsc-charts { margin-top: 16px; }
.gsc-chart { margin: 0; }
.gsc-chart figcaption { display: flex; justify-content: space-between; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.gsc-chart svg { width: 100%; height: 120px; display: block; background: var(--surface-2); border-radius: 8px; }
.gsc-area { fill: var(--primary-soft); }
.gsc-line { fill: none; stroke: var(--primary); stroke-width: 2; }
.gsc-chart-impressions .gsc-area { fill: var(--good-soft); }
.gsc-chart-impressions .gsc-line { stroke: var(--good); }
.gsc-chart-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.gsc-tables { margin-top: 20px; }
.gsc-tables h3 { margin-bottom: 8px; }
.opportunity { background: var(--surface-2); border-radius: var(--radius); padding: 14px; }
.opportunity .table td, .opportunity .table th { background: transparent; }
.email-box { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; align-items: center; margin: 8px 0; }
.email-box code { word-break: break-all; }
.setup-steps { padding-left: 20px; display: grid; gap: 8px; line-height: 1.6; }
.mt { margin-top: 18px; margin-bottom: 8px; }

/* ===== 網址檢測 ===== */
.min-w-0 { min-width: 0; }
.eyebrow { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; }
.big-value { font-size: 1.7rem; font-weight: 700; margin: 2px 0 8px; line-height: 1.2; }
.hint { margin-top: 12px; }
.mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.mark-ok { color: var(--good); background: var(--good-soft); }
.mark-bad { color: var(--poor); background: var(--poor-soft); }
.plain-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.plain-list li { display: flex; gap: 8px; align-items: baseline; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: .9rem; }
.kv dt { color: var(--muted); display: flex; gap: 6px; align-items: center; }
.kv dd { margin: 0; word-break: break-word; }
.kv-wide { grid-template-columns: minmax(120px, max-content) 1fr; }
.code-snippet { background: var(--surface-2); border-radius: 8px; padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; max-height: 320px; overflow: auto; white-space: pre-wrap; }

.check-hero { text-align: center; padding: 40px 24px; }
.check-hero h1 { font-size: 1.9rem; }
.check-form { display: flex; gap: 10px; max-width: 680px; margin: 22px auto 6px; }
.check-form input { font-size: 1.05rem; padding: 12px 16px; }
.check-form .btn { padding: 0 22px; }
.check-option { justify-content: center; margin-top: 4px; }
.check-features { list-style: none; padding: 0; margin: 22px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 860px; }
.check-features li { background: var(--surface-2); border-radius: 999px; padding: 5px 14px; font-size: .85rem; color: var(--muted); }

.score-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 24px 16px; }
.ring { display: flex; flex-direction: column; align-items: center; position: relative; }
.ring svg { width: 112px; height: 112px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-2); stroke-width: 9; }
.ring-value { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-good .ring-value { stroke: var(--good); }
.ring-fair .ring-value { stroke: var(--fair); }
.ring-poor .ring-value { stroke: var(--poor); }
.ring-text { position: absolute; top: 0; height: 112px; display: grid; place-items: center; font-size: 1.9rem; }
.ring-good .ring-text { color: var(--good); }
.ring-fair .ring-text { color: var(--fair); }
.ring-poor .ring-text { color: var(--poor); }
.ring-none .ring-text { color: var(--muted); }
.ring-label { margin-top: 8px; font-weight: 600; text-align: center; display: flex; flex-direction: column; }
.ring-label span { font-weight: 400; font-size: .8rem; color: var(--muted); }

.section-nav { position: sticky; top: 56px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; background: var(--bg); padding: 10px 0; margin-bottom: 8px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.section-nav a { padding: 5px 12px; border-radius: 999px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.section-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.report-section { scroll-margin-top: 120px; padding-top: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head h2 { font-size: 1.25rem; }
.sev-summary { display: flex; gap: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-3 + .grid-2, .grid-2 + .grid-2, .card + .grid-2 { margin-top: 16px; }
h3 { font-size: 1rem; margin: 0; }

.field-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.field-card-head .eyebrow { margin-top: 2px; }
.field-value { font-size: 1.1rem; font-weight: 600; margin: 8px 0 0; word-break: break-word; }
.field-value-sm { font-size: .95rem; font-weight: 400; }
.length-bar { position: relative; width: 140px; height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 8px; }
.length-range { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--good-soft); outline: 1px solid var(--good); opacity: .9; }
.length-mark { position: absolute; top: -4px; width: 4px; height: 14px; border-radius: 2px; margin-left: -2px; background: var(--good); }
.length-bar.is-off .length-mark { background: var(--poor); }
.length-meta { font-size: .8rem; text-align: right; margin-top: 4px; white-space: nowrap; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.metric { background: var(--surface-2); border-radius: 8px; padding: 9px 11px; display: flex; flex-direction: column; }
.metric-label { font-size: .75rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.metric-value { font-size: 1.05rem; font-weight: 700; }
.metric-grid-sm .metric-value { font-size: .95rem; }
.mini-scores { display: flex; gap: 16px; flex-wrap: wrap; margin: 14px 0 0; }
.field-data { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot-fast { background: var(--good); }
.dot-average { background: var(--fair); }
.dot-slow { background: var(--poor); }
.opportunities { margin-top: 14px; }
.opportunities summary { cursor: pointer; color: var(--primary); font-weight: 500; }
.opportunities ul { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }

.geo-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.geo-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 8px; font-size: .9rem; }
.geo-good { background: var(--good-soft); }
.geo-warn { background: var(--fair-soft); }
.geo-bad { background: var(--poor-soft); }
.geo-points { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.bot { border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; }
.bot p { margin: 2px 0 0; }
.bot-head strong { overflow-wrap: anywhere; }
.bot-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.bot-status { font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.bot-blocked { border-color: var(--poor); background: var(--poor-soft); }
.bot-blocked .bot-status { background: var(--poor); color: #fff; }
.bot-allowed .bot-status { background: var(--good-soft); color: var(--good); }

.redirect-list { margin: 0 0 8px; padding-left: 18px; font-size: .85rem; display: grid; gap: 4px; }

.density { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.density-bar { height: 6px; border-radius: 3px; background: var(--primary); display: inline-block; max-width: 70px; }
.progress-row + .progress-row { margin-top: 12px; }
.progress-label { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 5px; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.schema-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.schema-list li { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.schema-list p { margin: 4px 0 0; }

.ai-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.ai-action { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.ai-action:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-1px); }
.ai-action:disabled { opacity: .55; cursor: progress; }
.ai-icon { font-size: 1.4rem; }
.ai-setup { border-style: dashed; }
.variant-list { display: grid; gap: 12px; }
.variant { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; display: grid; gap: 8px; }
.variant .tag { margin-left: 0; justify-self: start; }
.variant p { margin: 0; }
.copy-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.copy-row p { margin: 0; }
.alt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.alt-list li { display: flex; gap: 14px; align-items: flex-start; }
.alt-list img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex-shrink: 0; }
.alt-list .actions { margin-top: 6px; }
.faq-list dt { font-weight: 600; margin-top: 12px; }
.faq-list dd { margin: 4px 0 0; color: var(--muted); }
.faq-list + .copy-row { margin-top: 16px; }
.prose { line-height: 1.75; }
.prose h1, .prose h2 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
.prose h3 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; }

@media (max-width: 760px) {
  .topbar-inner { gap: 10px; }
  .nav a { padding: 6px 8px; }
  .nav-right { gap: 8px; }
  .lang-switch button { padding: 3px 6px; }
  .brand { font-size: 0; gap: 0; }
  .user-link { display: none; }
  .stats, .summary { grid-template-columns: 1fr 1fr; }
  .grid-form, .row-2 { grid-template-columns: 1fr; }
  .search input { width: 100%; }
  .page-head .actions, .search { width: 100%; }
  .danger-zone { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 1.35rem; }
  .score-overview { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .occurrence-head { flex-direction: column; }
  .share-overview { grid-template-columns: 1fr; }
  .share-counts { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .ai-actions { grid-template-columns: 1fr; }
  .check-form { flex-direction: column; }
  .check-form .btn { padding: 10px; justify-content: center; }
  .field-card-head { flex-direction: column; gap: 4px; }
  .length-meta { text-align: left; }
}
