/* uudash (forked from navdash) — conventional admin layout: dark top bar, page header, cards and tables */
/* colours: light by default; dark when picked with the toggle in the top bar (cookie nd_theme),
   or when the device is set to dark and nothing was picked */
:root {
  color-scheme: light;
  --bg: #f0f2f5;
  --surface: #ffffff;
  --border: #e8e8e8;
  --split: #f0f0f0;
  --head: #fafafa;
  --text: #1f1f1f;
  --text-2: #595959;
  --muted: #8c8c8c;
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-dark: #0958d9;
  --primary-bg: #e6f4ff;
  --primary-border: #91caff;
  --success: #52c41a;
  --success-text: #389e0d;
  --success-bg: #f6ffed;
  --success-border: #b7eb8f;
  --warning-text: #d48806;
  --warning-bg: #fffbe6;
  --warning-border: #ffe58f;
  --error: #ff4d4f;
  --error-text: #cf1322;
  --error-bg: #fff2f0;
  --error-border: #ffccc7;
  --top: #001529;
  --bar: #1677ff;
  --bar-end: #0958d9;
  --c0: #1677ff;      /* 主线路 (main line) */
  --c1: #eb6834;      /* not redirected */
  --c2: #1baf7a;      /* 跳板 (proxy) */
  --c-line: #595959;  /* went to platform */
  --link: #1677ff;
  --link-hover: #4096ff;
  --top-line: transparent;
  --control-bg: #ffffff;
  --control-border: #d9d9d9;
  --row-hover: #fafafa;
  --head-hover: #f0f0f0;
  --tag-bg: #fafafa;
  --tag-border: #d9d9d9;
  --idle: #d9d9d9;
  --k-other: #bfbfbf;
  --k-cs: #722ed1;
  --k-download: #fa8c16;
  --box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
  --radius: 8px;
  --radius-sm: 6px;
}
/* dark: chart colours are the same three hues stepped for the dark surface (checked for colour-blind separation and contrast) */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141414;
  --surface: #1f1f1f;
  --border: #424242;
  --split: #303030;
  --head: #262626;
  --text: #dcdcdc;
  --text-2: #b0b0b0;
  --muted: #8c8c8c;
  --primary: #1668dc;
  --primary-hover: #3c89e8;
  --primary-dark: #1554ad;
  --primary-bg: #111a2c;
  --primary-border: #15325b;
  --link: #4096ff;
  --link-hover: #69b1ff;
  --success: #49aa19;
  --success-text: #49aa19;
  --success-bg: #162312;
  --success-border: #274916;
  --warning-text: #d89614;
  --warning-bg: #2b2111;
  --warning-border: #594214;
  --error: #dc4446;
  --error-text: #ff7875;
  --error-bg: #2c1618;
  --error-border: #5b2526;
  --top: #1f1f1f;
  --top-line: #303030;
  --bar: #3c89e8;
  --bar-end: #65a9f3;
  --c0: #3987e5;
  --c1: #d95926;
  --c2: #199e70;
  --c-line: #a6a6a6;
  --control-bg: #141414;
  --control-border: #424242;
  --row-hover: #262626;
  --head-hover: #303030;
  --tag-bg: #262626;
  --tag-border: #424242;
  --idle: #595959;
  --k-other: #737373;
  --k-cs: #9254de;
  --k-download: #d87a16;
  --box-shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141414;
    --surface: #1f1f1f;
    --border: #424242;
    --split: #303030;
    --head: #262626;
    --text: #dcdcdc;
    --text-2: #b0b0b0;
    --muted: #8c8c8c;
    --primary: #1668dc;
    --primary-hover: #3c89e8;
    --primary-dark: #1554ad;
    --primary-bg: #111a2c;
    --primary-border: #15325b;
    --link: #4096ff;
    --link-hover: #69b1ff;
    --success: #49aa19;
    --success-text: #49aa19;
    --success-bg: #162312;
    --success-border: #274916;
    --warning-text: #d89614;
    --warning-bg: #2b2111;
    --warning-border: #594214;
    --error: #dc4446;
    --error-text: #ff7875;
    --error-bg: #2c1618;
    --error-border: #5b2526;
    --top: #1f1f1f;
    --top-line: #303030;
    --bar: #3c89e8;
    --bar-end: #65a9f3;
    --c0: #3987e5;
    --c1: #d95926;
    --c2: #199e70;
    --c-line: #a6a6a6;
    --control-bg: #141414;
    --control-border: #424242;
    --row-hover: #262626;
    --head-hover: #303030;
    --tag-bg: #262626;
    --tag-border: #424242;
    --idle: #595959;
    --k-other: #737373;
    --k-cs: #9254de;
    --k-download: #d87a16;
    --box-shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5715 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); }
h1 { font-size: 20px; line-height: 28px; }
h2 { font-size: 16px; line-height: 24px; }
h3 { font-size: 14px; line-height: 22px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.mono { font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.inline { display: inline; margin: 0; }

/* ---- top bar */
.topbar { background: var(--top); position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 4px rgba(0, 21, 41, .12); border-bottom: 1px solid var(--top-line); }
.topbar-in { max-width: 1400px; margin: 0 auto; height: 48px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { color: #fff; font-size: 16px; font-weight: 600; white-space: nowrap; letter-spacing: .2px; }
.brand:hover { color: #fff; }
.brand-short { display: none; }
.mainnav { display: flex; align-items: stretch; height: 48px; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { display: flex; align-items: center; padding: 0 14px; color: rgba(255, 255, 255, .65); white-space: nowrap; }
.mainnav a:hover { color: #fff; }
.mainnav a.on { color: #fff; background: var(--primary); }
.mainnav.more { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.topright { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.topright > * { color: rgba(255, 255, 255, .65); }
.topright a:hover, .topright .linkbtn:hover { color: #fff; }
.topright a.on { color: #fff; }
.clock { color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; padding: 0 12px 0 0; margin-right: 6px; border-right: 1px solid rgba(255, 255, 255, .16); cursor: default; }
.topright a, .linkbtn { padding: 4px 8px; border-radius: 4px; }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; color: rgba(255, 255, 255, .65); }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; }
.theme-btn svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* ---- page */
.wrap { max-width: 1400px; margin: 0 auto; padding: 20px 24px 40px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.pagehead h1 { margin-right: auto; }

/* ---- filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.seg { display: inline-flex; }
.seg a { height: 32px; line-height: 30px; padding: 0 14px; color: var(--text); background: var(--control-bg); border: 1px solid var(--control-border); margin-left: -1px; white-space: nowrap; }
.seg a:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.seg a:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.seg a:hover { color: var(--link); position: relative; z-index: 1; }
.seg a.on { color: var(--link); border-color: var(--link); position: relative; z-index: 2; }
.range { display: inline-flex; align-items: center; height: 32px; background: var(--control-bg); border: 1px solid var(--control-border); border-radius: var(--radius-sm); padding: 0 4px 0 8px; }
.range:focus-within { border-color: var(--link-hover); }
.range input { border: 0; font: inherit; color: var(--text); background: transparent; padding: 0 2px; height: 30px; width: 128px; outline: none; }
.range .sep { color: var(--muted); padding: 0 4px; }
.btn-ghost { height: 32px; padding: 0 14px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--control-bg); color: var(--text); font: inherit; cursor: pointer; }
.btn-ghost:hover { color: var(--link); border-color: var(--link); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; white-space: nowrap; }
.check:hover { color: var(--text); }
.check .box { width: 16px; height: 16px; border: 1px solid var(--control-border); border-radius: 4px; background: var(--control-bg); display: inline-block; position: relative; }
.check.on .box { background: var(--primary); border-color: var(--primary); }
.check.on .box::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---- cards */
.card { background: var(--surface); border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--split); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 20px; border-bottom: 1px solid var(--split); }
.card-head h2 { font-size: 16px; }
.card-meta { color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 16px; }
.card-meta b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.card-body { padding: 16px 20px; }
.card-body.flush { padding: 0; }
.card-desc { padding: 12px 20px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--split); }
.card-foot { padding: 10px 20px; border-top: 1px solid var(--split); text-align: right; }
.card.narrow { max-width: 480px; }
.narrow-col { max-width: 520px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid2 > .card { margin-bottom: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid3 > .card { margin-bottom: 0; }
.empty { color: var(--muted); padding: 28px 20px; text-align: center; }

/* ---- statistic tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--split); border-radius: var(--radius); padding: 16px 20px; }
.stat-label { color: var(--muted); }
.stat-label[title] { cursor: help; }
.stat-value { font-size: 28px; line-height: 38px; font-weight: 600; margin-top: 4px; color: var(--text); }
.stat-sub { color: var(--muted); margin-top: 2px; font-size: 13px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); vertical-align: middle; margin-right: 8px; position: relative; top: -2px; }
.dot.idle { background: var(--idle); }

/* ---- route card: funnel + top domains */
.route-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.route-body > div { padding: 16px 20px 18px; min-width: 0; }
.route-body > div + div { border-left: 1px solid var(--split); }
.sub-title { display: flex; justify-content: space-between; align-items: baseline; color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.sub-title a { font-weight: 400; }
.funnel { display: grid; grid-template-columns: max-content minmax(60px, 1fr) max-content; column-gap: 16px; row-gap: 6px; align-items: center; }
.funnel .f-name { color: var(--text-2); white-space: nowrap; padding: 6px 0; }
.funnel .f-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.funnel .f-bar { height: 14px; background: var(--bar); border-radius: 0 4px 4px 0; flex: 0 0 auto; width: 0; min-width: 2px; }
.funnel .f-plat .f-bar { background: var(--bar-end); }
.funnel .f-val { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.funnel .f-rate { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.funnel .f-rate b { color: var(--text); font-weight: 500; }
.funnel .f-line { grid-column: 1 / -1; border-top: 1px dashed var(--split); height: 0; margin: 2px 0; }
.funnel > [title] { cursor: default; }

/* ---- tabs */
.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--split); margin: -4px 0 16px; overflow-x: auto; }
.tabs a { padding: 10px 0; color: var(--text); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--link); }
.tabs a.on { color: var(--link); border-bottom-color: var(--link); font-weight: 500; }

/* ---- tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 16px; border-bottom: 1px solid var(--split); text-align: left; vertical-align: middle; }
.tbl th { background: var(--head); color: var(--text); font-weight: 600; white-space: nowrap; }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .w { white-space: nowrap; }
.tbl.compact th, .tbl.compact td { padding: 8px 12px; }
.tbl tr.dim td { color: var(--muted); }
.tbl tr.group td { background: var(--head); color: var(--text-2); font-weight: 600; padding-top: 8px; padding-bottom: 8px; }
.tbl.sortable th { cursor: pointer; user-select: none; }
.tbl.sortable th:hover { background: var(--head-hover); }
.tbl.sortable th.sorted-asc::after, .tbl.sortable th.sorted-desc::after { color: var(--link); font-size: 10px; margin-left: 4px; }
.tbl.sortable th.sorted-asc::after { content: "▲"; }
.tbl.sortable th.sorted-desc::after { content: "▼"; }
.card > .tbl-wrap:first-child .tbl th:first-child, .card > .tbl:first-child th:first-child { border-top-left-radius: var(--radius); }
.card > .tbl-wrap:first-child .tbl th:last-child, .card > .tbl:first-child th:last-child { border-top-right-radius: var(--radius); }
.tbl td.share { width: 40%; min-width: 80px; }
.meter { display: block; height: 8px; }
.meter span { display: block; height: 100%; width: 0; min-width: 2px; background: var(--bar); border-radius: 0 4px 4px 0; }
.pid { color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 400; }
.rate { color: var(--muted); font-size: 12px; margin-left: 6px; }
.actions { white-space: nowrap; text-align: right; }
.actions form + form { margin-left: 6px; }

/* ---- tags */
.tag { display: inline-block; padding: 0 7px; font-size: 12px; line-height: 20px; border-radius: 4px; border: 1px solid var(--tag-border); background: var(--tag-bg); color: var(--text-2); white-space: nowrap; }
.tag.ok { color: var(--success-text); background: var(--success-bg); border-color: var(--success-border); }
.tag.warn { color: var(--warning-text); background: var(--warning-bg); border-color: var(--warning-border); }
.tag.err { color: var(--error-text); background: var(--error-bg); border-color: var(--error-border); }
.tag.blue { color: var(--link); background: var(--primary-bg); border-color: var(--primary-border); }
.kind { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text-2); }
.kind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--k-other); }
.k-line::before, .k-register::before, .k-promo::before, .k-agent::before { background: var(--success); }
.k-nav::before { background: var(--link); }
.k-cs::before { background: var(--k-cs); }
.k-download::before { background: var(--k-download); }

/* ---- messages */
.alert, .notice { padding: 10px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; }
.alert { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }
.notice { background: var(--primary-bg); border-color: var(--primary-border); color: var(--text); }
.notice p { margin: 0 0 8px; }
input.copy { width: 100%; font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; padding: 6px 10px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--control-bg); color: var(--text); }

/* ---- buttons and forms */
.btn { height: 32px; padding: 0 16px; background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: var(--radius-sm); cursor: pointer; font: inherit; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.block { width: 100%; height: 40px; font-size: 15px; }
.btn-sm { height: 24px; padding: 0 8px; font-size: 13px; border: 1px solid var(--control-border); border-radius: 4px; background: var(--control-bg); color: var(--text); cursor: pointer; font-family: inherit; }
.btn-sm:hover { color: var(--link); border-color: var(--link); }
.btn-sm.danger { color: var(--error-text); }
.btn-sm.danger:hover { border-color: var(--error); }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label, .form-row label { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.form label small { color: var(--muted); }
.form input, .form-row input, .form-row select { height: 32px; padding: 4px 11px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: var(--control-bg); }
.form input:focus, .form-row input:focus, .form-row select:focus, .range input:focus { outline: none; border-color: var(--link-hover); box-shadow: 0 0 0 2px rgba(5, 145, 255, .1); }
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.form-row input { width: 200px; }
.form label small { font-size: 12px; }
.form-help { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* ---- login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--split); padding: 32px 32px 24px; box-shadow: var(--box-shadow); }
.login-box h1 { font-size: 20px; margin-bottom: 4px; }
.login-box .login-sub { color: var(--muted); margin-bottom: 24px; }
.login-box .form input { height: 40px; }
.login-lang { margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--control-border); }
.login-lang a, .login-lang .theme-btn { color: var(--text-2); }
.login-lang .theme-btn { padding: 2px 4px; }
.login-lang a:hover, .login-lang a.on, .login-lang .theme-btn:hover { color: var(--link); }

/* ---- chart */
.chartbox { position: relative; height: 340px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-2); margin-bottom: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; }
.legend i.c0 { background: var(--c0); }
.legend i.c1 { background: var(--c1); }
.legend i.c2 { background: var(--c2); }
.legend i.c-line { background: var(--c-line); }

/* ---- uudash: verify-page funnel colours, destination dots, warning card, small stats, the 跳板 page */
.funnel .f-safe .f-bar { background: var(--c2); }
.funnel .f-main .f-bar { background: var(--c0); }
.funnel .f-left .f-bar { background: var(--c1); }
.k-go-safe::before { background: var(--c2); }
.k-go-main::before { background: var(--c0); }
.card-warn { border-color: var(--warning-border); }
.card-warn > .card-head { background: var(--warning-bg); border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--split); }
.mini { padding: 12px 20px; }
.mini + .mini { border-left: 1px solid var(--split); }
.mini-label { color: var(--muted); font-size: 13px; }
.mini-value { font-size: 20px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-foot.left { text-align: left; }
.card-foot summary { cursor: pointer; color: var(--text-2); }
.zero-list { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; margin-top: 8px; }
.ip-search { display: inline-flex; gap: 6px; margin: 0; }
.ip-search input { height: 28px; width: 190px; padding: 2px 10px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: var(--control-bg); }
.ip-search input:focus { outline: none; border-color: var(--link-hover); }
.ip-search .btn-ghost { height: 28px; padding: 0 12px; }
.backline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: -4px 0 16px; }
.chartbox.short { height: 240px; }
.legend i.c0 { background: var(--c0); }

/* ---- small screens */
@media (max-width: 1100px) {
  .route-body { grid-template-columns: minmax(0, 1fr); }
  .route-body > div + div { border-left: 0; border-top: 1px solid var(--split); }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .topbar-in { height: auto; flex-wrap: wrap; gap: 0 16px; padding: 8px 12px 0; }
  .brand { line-height: 32px; }
  .topright { margin-left: auto; }
  .mainnav { order: 3; flex-basis: 100%; height: 40px; }
  .mainnav a { padding: 0 12px; }
  .wrap { padding: 16px 12px 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 24px; line-height: 32px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini:nth-child(3) { border-left: 0; }
  .mini:nth-child(n+3) { border-top: 1px solid var(--split); }
  .mini { padding: 10px 14px; }
  .ip-search input { width: 150px; }
  .tbl td.share { width: 30%; min-width: 48px; }
  .card-head { padding: 10px 14px; flex-wrap: wrap; }
  .card-meta { white-space: normal; flex-wrap: wrap; gap: 4px 12px; }
  .card-body, .route-body > div { padding: 12px 14px; }
  .tbl th, .tbl td { padding: 8px 10px; white-space: nowrap; }
  .pagehead h1 { flex-basis: 100%; }
  .range input { width: 118px; }
  .tabs { gap: 20px; }
}
@media (max-width: 520px) {
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .topright a, .linkbtn { padding: 4px 6px; }
  .topright .me { display: none; }
  .clock { padding-right: 8px; margin-right: 2px; }
  .mainnav { margin: 0 -12px; flex-basis: calc(100% + 24px); padding: 0 3px; }
  .mainnav a { padding: 0 9px; }
  .funnel { grid-template-columns: max-content minmax(0, 1fr); column-gap: 12px; row-gap: 0; }
  .funnel .f-rate { grid-column: 2; text-align: left; font-size: 12px; margin: -4px 0 6px; white-space: normal; }
  .funnel .f-rate:empty { display: none; }
}
