:root {
  color-scheme: light;
  --navy: #0b2c59;
  --ink: #092453;
  --muted: #647d9f;
  --blue: #075ee7;
  --red: #ed1c24;
  --line: #dce7f4;
  --page: #f2f6fb;
  --shadow: 0 5px 18px rgba(29, 69, 119, .045);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [role=button]:focus-visible { outline: 3px solid #67a9ff; outline-offset: 2px; }
[hidden] { display: none !important; }
.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; }
.app-shell { display:flex; min-height:100vh; }
.sidebar { flex:none; width:220px; height:100vh; position:sticky; top:0; overflow:hidden; display:flex; flex-direction:column; padding:22px 16px; color:#f5f9ff; background:linear-gradient(155deg,#123d70 0%,#0a2852 48%,#061c3b 100%); }
.sidebar::after { content:""; position:absolute; inset:45% -90% -22% -30%; transform:rotate(-25deg); background:linear-gradient(180deg,rgba(41,97,157,.08),rgba(42,99,161,.025)); border-radius:50%; pointer-events:none; }
.sidebar > * { position:relative; z-index:1; }
.brand { padding:0 2px; }
.brand-logo { display:block; width:160px; height:auto; }
.workspace-label,.nav-label { font-size:9px; font-weight:700; letter-spacing:.14em; color:#a1b8d5; margin:32px 2px 10px; }
.workspace { display:flex; align-items:center; gap:10px; padding:10px; border:1px solid #2c5889; border-radius:9px; background:rgba(18,58,104,.36); }
.workspace-icon { width:32px; height:32px; flex:none; display:grid; place-items:center; border-radius:7px; background:#1d5796; color:white; font-weight:700; }
.workspace strong,.workspace small,.sidebar-bottom strong,.sidebar-bottom small { display:block; }
.workspace strong,.sidebar-bottom strong { font-size:11px; }
.workspace small,.sidebar-bottom small { color:#aec2da; font-size:10px; margin-top:3px; }
.workspace-chevron { color:#afc6e0; margin-left:auto; }
.nav-label { margin-top:34px; }
.side-active,.side-link { display:flex; align-items:center; gap:11px; min-height:42px; padding:10px 11px; color:#d1def0; font-size:11px; font-weight:600; text-decoration:none; border-radius:5px; }
.side-active { color:#fff; background:#214a7d; border-left:3px solid var(--red); padding-left:8px; }
.side-link:hover { background:rgba(64,115,172,.28); color:#fff; }
.nav-icon { width:17px; height:17px; flex:none; color:#b6cae2; }
.active-dot,.status-dot { width:6px; height:6px; background:var(--red); border-radius:50%; }
.active-dot { margin-left:auto; }
.sidebar-bottom { margin-top:auto; display:flex; gap:10px; align-items:center; padding:12px; border:1px solid #275788; border-radius:8px; background:rgba(4,25,55,.45); }
.status-dot { width:8px; height:8px; flex:none; }
.main { flex:1; min-width:0; }
.topbar { height:54px; display:flex; align-items:center; justify-content:space-between; padding:0 36px; background:#fff; border-bottom:1px solid #e5edf6; }
.breadcrumb { font-size:11px; color:#8096b0; }
.breadcrumb span { color:#b8c8db; margin:0 12px; }
.breadcrumb strong { color:var(--ink); }
.top-right { display:flex; align-items:center; gap:22px; }
.prototype-pill,.date-chip { font-size:10px; font-weight:650; color:#526d94; }
.prototype-pill { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border:1px solid #dfebf7; border-radius:20px; background:#f7faff; color:#193c6e; }
.prototype-pill span { width:6px; height:6px; border-radius:50%; background:var(--red); }
.mobile-brand { display:none; }
.content { max-width:1600px; margin:auto; padding:20px 36px 28px; }
.intro { position:relative; isolation:isolate; overflow:hidden; display:flex; align-items:center; justify-content:space-between; min-height:108px; gap:20px; padding:0 2px; margin-bottom:14px; }
.intro::before,.intro::after { content:""; position:absolute; z-index:-1; pointer-events:none; }
.intro::before { right:-10%; top:18%; width:66%; height:160%; border-radius:52% 30% 0 0; transform:rotate(-9deg); background:linear-gradient(165deg,rgba(183,219,253,.55),rgba(232,244,255,.08) 70%); }
.intro::after { right:-1%; top:39%; width:47%; height:115%; border-radius:50% 35% 0 0; transform:rotate(-11deg); background:linear-gradient(150deg,rgba(160,207,253,.40),rgba(238,247,255,.05) 75%); }
.eyebrow,.mini-label { font-size:9px; font-weight:750; letter-spacing:.14em; color:#6681a9; }
.eyebrow span { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--red); margin-right:7px; }
h1 { font-size:38px; line-height:1.08; font-weight:760; letter-spacing:-.045em; margin:9px 0 6px; }
h1 span { color:var(--blue); }
h2 { font-size:16px; letter-spacing:-.025em; line-height:1.2; margin:0; }
p { margin:0; color:var(--muted); }
.intro p { font-size:13px; }
.export-button { display:flex; align-items:center; gap:9px; flex:none; padding:9px 14px; text-align:left; color:#123b71; background:#fff; border:1px solid #d8e7f8; border-radius:13px; box-shadow:0 8px 22px rgba(60,118,185,.09); }
.export-button:hover:not(:disabled) { border-color:#78acf0; background:#f7fbff; }
.export-button:disabled { opacity:.48; cursor:not-allowed; }
.export-button strong,.export-button small { display:block; }
.export-button strong { font-size:11px; }.export-button small { font-size:10px; color:#8298b4; margin-top:3px; }
.export-icon { width:32px; height:32px; display:grid; place-items:center; border-radius:9px; background:#e7f2ff; color:var(--blue); font-size:19px; font-weight:700; }
.notice { display:flex; align-items:flex-start; gap:10px; color:#536f96; font-size:11px; line-height:1.5; padding:10px 13px; background:#f0f7ff; border:1px solid #c9defb; border-left:3px solid #1163cc; border-radius:8px; margin-bottom:14px; }
.notice strong { color:#143b71; }.notice-icon { flex:none; width:16px; height:16px; display:grid; place-items:center; border:1px solid #81adf0; border-radius:50%; color:#2872db; font-size:10px; font-weight:700; }
.filter-card,.table-card,.metric { background:#fff; border:1px solid #e0e9f4; border-radius:11px; box-shadow:var(--shadow); }
.filter-card { padding:15px 17px 14px; margin-bottom:14px; }
.filter-heading,.filter-title,.table-title { display:flex; align-items:center; }
.filter-heading { justify-content:space-between; gap:16px; margin-bottom:14px; }
.filter-title,.table-title { gap:11px; min-width:0; }
.filter-title p,.table-title small { display:block; font-size:10px; color:#7991b0; margin-top:3px; }
.section-icon { flex:none; width:37px; height:37px; display:grid; place-items:center; color:var(--blue); background:#e7f2ff; border-radius:11px; }
.section-icon svg { width:19px; height:19px; }
.text-button { border:1px solid #ffd2d4; background:#fff4f4; color:#d8212d; font-size:10px; font-weight:700; padding:8px 10px; border-radius:8px; }
.text-button:hover { background:#ffe9e9; }.text-button span { margin-left:5px; }
.filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px 13px; }
.filters label { display:block; font-size:10px; font-weight:650; color:#516e96; }
select,input { color:#173b70; }
.filters select,.filters input[type=date] { display:block; width:100%; height:36px; padding:0 10px; margin-top:5px; border:1px solid #dae6f3; border-radius:6px; background:#fff; font-size:11px; font-weight:600; min-width:0; }
.filter-caption { font-size:10px; color:#8196af; margin-top:10px; }
.date-error { margin-top:10px; color:#b6202b; font-size:11px; font-weight:650; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.metric { min-height:94px; display:flex; align-items:flex-start; gap:12px; padding:15px; }
.metric-icon { flex:none; width:41px; height:41px; display:grid; place-items:center; border-radius:50%; }
.metric-icon svg { width:21px; height:21px; }.metric-blue { color:#0c62ef; background:#e6f2ff; }.metric-mint { color:#098b69; background:#ddf9ed; }.metric-violet { color:#7a2ae5; background:#f1e7ff; }.metric-orange { color:#db7514; background:#fff1df; }
.metric-copy { min-width:0; }.metric-head { color:#708bad; font-size:9px; font-weight:750; letter-spacing:.08em; line-height:1.3; margin:2px 0 7px; }
.metric strong { display:block; color:#092453; font-size:27px; font-weight:750; letter-spacing:-.04em; line-height:1; }.metric strong.time-number { font-size:22px; }
.metric small { display:block; color:#849ab5; font-size:10px; line-height:1.35; margin-top:6px; }
.table-card { overflow:hidden; scroll-margin-top:15px; }.table-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 16px; border-bottom:1px solid #e8eff7; }
.table-title h2 { font-size:15px; }.results-badge { flex:none; color:#557399; background:#fff; border:1px solid #dfe9f5; border-radius:20px; padding:5px 9px; font-size:10px; font-weight:650; white-space:nowrap; }
.table-title .results-badge { margin-left:5px; }
.table-controls { display:flex; gap:8px; align-items:center; }
.search-wrap { height:34px; display:flex; align-items:center; gap:6px; padding:0 9px; border:1px solid #dce7f3; border-radius:6px; color:#84a0c1; }
.search-wrap span { font-size:18px; }.search-wrap input { width:146px; min-width:0; padding:0; border:0; outline:0; background:transparent; font-size:10px; }
.table-controls select { width:150px; height:34px; padding:0 8px; border:1px solid #dce7f3; border-radius:6px; background:#fff; font-size:10px; font-weight:600; }
.table-scroll { overflow-x:auto; }table { width:100%; border-collapse:collapse; text-align:left; white-space:nowrap; }
th { background:#f6f9fd; color:#718db2; font-size:9px; letter-spacing:.065em; font-weight:750; padding:11px 12px; border-bottom:1px solid #e7eef6; }
td { padding:11px 12px; border-bottom:1px solid #edf2f8; color:#375984; font-size:11px; }tbody tr:last-child td { border-bottom:0; }.lead-row { cursor:pointer; }.lead-row:hover { background:#f4f9ff; }
.lead-name,.official-name { display:flex; align-items:center; gap:9px; }.lead-name strong,.lead-name small { display:block; }.lead-name strong,.official-name { color:#103467; font-size:11px; font-weight:700; }.lead-name small { color:#91a8c2; font-size:9px; margin-top:3px; }
.lead-avatar,.agent-avatar { flex:none; display:grid; place-items:center; width:29px; height:29px; border-radius:8px; background:#e7f2ff; color:#0760de; font-size:10px; font-weight:750; }.agent-avatar { width:24px; height:24px; }
.subtle { color:#8ca2bc; font-size:10px; margin-top:3px; }.pill { display:inline-block; border-radius:6px; padding:5px 8px; font-size:10px; font-weight:700; }.pill.documented { color:#075cca; background:#e6f3ff; }.pill.no_interaction { color:#a96913; background:#fff3da; }.pill.incomplete { color:#6e7787; background:#eff1f5; }.row-time { color:#0a3267; font-weight:700; }.row-arrow { color:#7ea0c8; font-size:16px; }
.table-foot { display:flex; justify-content:space-between; gap:15px; padding:10px 16px; border-top:1px solid #edf2f8; color:#8ca2bd; font-size:10px; }.empty { padding:24px; text-align:center; color:#728ba8; font-size:12px; }.empty .text-button { margin-left:5px; }
.officials-section { margin-top:14px; }.official-table td { padding:8px 12px; }.footer { display:flex; justify-content:space-between; gap:10px; padding:27px 0 0; color:#9aacc0; font-size:9px; letter-spacing:.08em; }.footer span span { margin:0 6px; }
.backdrop { position:fixed; inset:0; background:rgba(5,24,54,.44); z-index:5; }.drawer { position:fixed; top:0; right:0; bottom:0; z-index:6; width:min(510px,100vw); padding:25px 28px; overflow-y:auto; background:#fff; box-shadow:-8px 0 40px rgba(5,24,54,.18); }.drawer-top { display:flex; align-items:center; justify-content:space-between; padding-bottom:16px; border-bottom:1px solid var(--line); }.icon-button { width:33px; height:33px; border:1px solid #dfe8f3; border-radius:8px; background:#fff; color:#657f9f; font-size:22px; }.drawer h2 { margin:22px 0 5px; font-size:25px; }.drawer-desc { font-size:12px; }.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; margin:20px 0; padding:16px; border:1px solid #e5edf6; border-radius:9px; background:#f7faff; }.detail-grid small,.detail-grid strong { display:block; }.detail-grid small { color:#829ab5; font-size:10px; margin-bottom:4px; }.detail-grid strong { color:#173e70; font-size:11px; }.drawer-note { padding:12px; border:1px solid #f4e2b6; border-left:3px solid #dc9429; border-radius:8px; background:#fff9ed; color:#80642e; font-size:11px; line-height:1.5; }.timeline-title { margin:25px 0 14px; font-size:15px; }.timeline { margin-left:7px; padding-left:21px; border-left:1px solid #d9e7f5; }.event { position:relative; padding:0 0 20px; }.event::before { content:""; position:absolute; left:-26px; top:4px; width:9px; height:9px; border-radius:50%; background:#0b67e8; box-shadow:0 0 0 3px #fff; }.event strong { font-size:12px; }.event p { margin-top:4px; font-size:11px; }.event small { display:block; margin-top:4px; color:#8ca0b7; font-size:10px; }.drawer-legend { margin-top:10px; color:#7187a2; font-size:11px; line-height:1.6; }
@media(max-width:1150px) { .sidebar { width:190px; }.brand-logo { width:152px; }.content { padding-left:24px; padding-right:24px; }.topbar { padding:0 24px; }.filters { grid-template-columns:repeat(3,minmax(0,1fr)); }.metric { padding:12px; gap:9px; }.metric-icon { width:35px; height:35px; }.metric strong.time-number { font-size:19px; } }
@media(max-width:900px) { .sidebar { display:none; }.topbar { height:58px; padding:0 16px; background:#08254d; border-bottom:2px solid var(--red); }.mobile-brand { display:block; }.mobile-brand img { display:block; width:92px; height:44px; object-fit:contain; }.breadcrumb,.date-chip { display:none; }.prototype-pill { color:#edf5ff; background:#163d70; border-color:#285689; }.content { padding:18px 15px 25px; }.intro { min-height:0; align-items:flex-start; flex-direction:column; gap:13px; padding:5px 1px; margin-bottom:15px; }.intro::before { top:10%; width:95%; height:100%; }.intro::after { top:20%; width:70%; height:95%; }h1 { font-size:30px; }.intro p { font-size:12px; }.export-button { padding:7px 10px; }.notice { font-size:11px; }.filter-card { padding:14px; }.filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.metric { min-height:93px; }.metric strong { font-size:23px; }.metric strong.time-number { font-size:18px; }.table-tools { align-items:flex-start; flex-direction:column; gap:12px; }.table-controls { width:100%; }.search-wrap { flex:1; }.search-wrap input { width:100%; }.table-controls select { width:145px; }.table-title .results-badge { display:none; }.table-foot { flex-direction:column; gap:5px; }.footer { font-size:8px; } }
/* Let longer column headings wrap before hiding useful data on medium screens. */
th { white-space:normal; line-height:1.25; }
.inquiry-card th, .inquiry-card td { padding-left:10px; padding-right:10px; }

/* Mobile controls and stacked records: desktop tables remain unchanged. */
.mobile-nav,.filter-toggle,.mobile-label { display:none; }
@media(max-width:900px) {
  .sidebar { display:none; }
  .topbar { height:58px; padding:0 16px; background:#08254d; border-bottom:2px solid var(--red); }
  .mobile-brand { display:block; }
  .mobile-brand img { display:block; width:92px; height:44px; object-fit:contain; }
  .breadcrumb,.date-chip { display:none; }
  .prototype-pill { color:#edf5ff; background:#163d70; border-color:#285689; }
  .mobile-nav { display:flex; position:sticky; top:0; z-index:3; gap:4px; padding:5px 12px; background:rgba(255,255,255,.98); border-bottom:1px solid #dce7f4; }
  .mobile-nav a { flex:1; min-height:44px; display:flex; align-items:center; justify-content:center; color:#254d7d; font-size:13px; font-weight:650; text-decoration:none; border-radius:8px; }
  .mobile-nav a:active { background:#eaf3ff; }
  #overview,#inquiries,#officials { scroll-margin-top:62px; }
}
@media(max-width:900px) {
  .content { padding:16px 14px 30px; }
  .intro { gap:12px; }
  .intro p,.notice { font-size:13px; }
  .export-button { min-height:44px; }
  .export-button strong { font-size:13px; }
  .filter-heading { margin-bottom:10px; }
  .filter-title p { font-size:11px; }
  .filter-title .section-icon { width:34px; height:34px; }
  .text-button { min-height:44px; font-size:11px; white-space:nowrap; }
  .filter-toggle { width:100%; min-height:44px; display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid #d9e6f4; border-radius:8px; background:#f8fbff; color:#194577; font-size:13px; font-weight:700; text-align:left; }
  #filter-count { margin-left:auto; color:#7089a9; font-size:11px; font-weight:600; }
  .filter-toggle-chevron { color:#4c78a9; font-size:18px; }
  .filter-content:not(.filters-open) { display:none; }
  .filter-content.filters-open { padding-top:14px; }
  .filters { gap:12px 10px; }
  .filters label { font-size:12px; }
  .filters select,.filters input[type=date] { height:46px; font-size:16px; font-weight:500; }
  .filter-caption { font-size:11px; line-height:1.45; }
  .metric { min-height:102px; padding:12px 10px; }
  .metric-icon { width:32px; height:32px; }
  .metric-icon svg { width:18px; height:18px; }
  .metric-head { font-size:9px; }
  .metric small { font-size:10px; }
  .table-tools { padding:14px; }
  .table-title { width:100%; }
  .table-title h2 { font-size:16px; }
  .table-title small { font-size:11px; line-height:1.4; }
  .table-controls { flex-wrap:wrap; gap:8px; }
  .search-wrap { width:100%; flex:1 1 100%; height:44px; }
  .search-wrap input { font-size:16px; }
  .table-controls select { width:100%; height:44px; font-size:16px; font-weight:500; }
  .inquiry-card .table-scroll,.officials-section .table-scroll { overflow:visible; }
  .inquiry-card table,.inquiry-card tbody,.official-table,.official-table tbody { display:block; width:100%; }
  .inquiry-card thead,.official-table thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  .inquiry-card tbody,.official-table tbody { padding:10px; }
  .inquiry-card .lead-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0 12px; margin:0 0 9px; padding:12px; border:1px solid #e1eaf5; border-radius:10px; background:#fff; }
  .inquiry-card .lead-row:last-child { margin-bottom:0; }
  .inquiry-card .lead-row td,.official-table td { display:block; min-width:0; padding:8px 0; border:0; white-space:normal; overflow-wrap:anywhere; font-size:12px; }
  .inquiry-card .lead-row td:first-child { grid-column:1/-1; padding:0 0 11px; margin-bottom:3px; border-bottom:1px solid #eef3f8; }
  .inquiry-card .lead-row td:last-child { display:none; }
  .inquiry-card .lead-row::after { content:'Ver historial  ↗'; grid-column:1/-1; padding-top:8px; border-top:1px solid #eef3f8; color:#075ee7; font-size:12px; font-weight:700; }
  .lead-name strong,.official-name { font-size:13px; }
  .lead-name small { font-size:10px; }
  .mobile-label { display:block; margin-bottom:3px; color:#7189a8; font-size:10px; font-weight:650; line-height:1.3; }
  .subtle { font-size:11px; }
  .pill { white-space:normal; line-height:1.35; }
  .official-table tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 12px; margin:0 0 9px; padding:10px 12px; border:1px solid #e1eaf5; border-radius:10px; }
  .official-table tr:last-child { margin-bottom:0; }
  .official-table tr td:first-child { grid-column:1/-1; padding-bottom:9px; margin-bottom:3px; border-bottom:1px solid #eef3f8; }
  .official-table td { padding:7px 0; }
  .table-foot { font-size:11px; line-height:1.45; }
  .drawer { width:100%; padding:0 18px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior:contain; }
  .drawer-top { position:sticky; top:0; z-index:1; padding:15px 0; background:#fff; }
  .icon-button { width:44px; height:44px; }
  .drawer-desc,.drawer-note,.drawer-legend,.event p { font-size:13px; }
  .detail-grid strong { font-size:12px; overflow-wrap:anywhere; }
  .detail-grid small,.event small { font-size:11px; }
  .footer { padding-bottom:env(safe-area-inset-bottom); }
}
@media(max-width:350px) {
  .filters { grid-template-columns:1fr; }
  .metric { gap:7px; }
  .metric strong.time-number { font-size:17px; }
  .detail-grid { grid-template-columns:1fr; }
}
@media(max-width:900px) {
  .table-title > div { flex:1; min-width:0; }
  .table-title .results-badge { display:inline-flex; margin-left:auto; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
@media(max-width:900px) {
  .topbar { padding-left:max(16px, env(safe-area-inset-left)); padding-right:max(16px, env(safe-area-inset-right)); }
  .mobile-nav { padding-left:max(12px, env(safe-area-inset-left)); padding-right:max(12px, env(safe-area-inset-right)); }
  .content { padding-left:max(14px, env(safe-area-inset-left)); padding-right:max(14px, env(safe-area-inset-right)); }
  .drawer { padding-left:max(18px, env(safe-area-inset-left)); padding-right:max(18px, env(safe-area-inset-right)); }
}

/* Summary cards and profile control */
.top-right { position:relative; }
.profile-menu { position:relative; }
.profile-toggle { display:flex; align-items:center; justify-content:center; gap:5px; min-width:44px; min-height:44px; padding:0; border:0; background:transparent; color:#244e7e; }
.profile-avatar { flex:none; display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#e7f2ff; color:#154a84; font-size:11px; font-weight:750; }
.profile-chevron { font-size:15px; line-height:1; }
.profile-panel { position:absolute; z-index:8; right:0; top:calc(100% + 5px); width:260px; padding:15px; border:1px solid #dce7f4; border-radius:12px; background:white; color:#173b6b; box-shadow:0 12px 30px rgba(12,43,83,.18); }
.profile-panel-head { display:flex; align-items:center; gap:10px; }.profile-panel-head strong,.profile-panel-head small { display:block; }.profile-panel-head strong { font-size:12px; }.profile-panel-head small { margin-top:3px; color:#7a91ae; font-size:10px; }
.profile-close { margin-left:auto; width:36px; height:36px; border:0; border-radius:7px; background:#f3f7fc; color:#55769e; font-size:20px; }
.profile-panel p { margin:13px 0; color:#7189a6; font-size:11px; }.profile-notice { padding:9px; border-radius:7px; background:#f4f8fc; color:#607c9d; font-size:11px; font-weight:600; }.profile-notice span { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:7px; background:#a7b6c8; }
.metric { position:relative; min-height:110px; }
.metric-copy { flex:1; padding-right:24px; padding-bottom:25px; }
.metric-head { padding-right:5px; }
.metric-action { position:absolute; top:11px; right:11px; width:30px; height:30px; display:grid; place-items:center; border:0; border-radius:50%; color:#6484aa; background:#f1f6fc; font-size:16px; }
.metric-action:hover { background:#e4effc; color:#075ee7; }
.metric-trend { position:absolute; right:12px; bottom:8px; width:76px; height:26px; overflow:visible; pointer-events:none; }
.trend-line { fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }.trend-fill { fill:currentColor; opacity:.08; }.trend-blue { color:#3e9aff; }.trend-mint { color:#32ba9e; }.trend-violet { color:#b75bff; }.trend-orange { color:#f5a330; }
.metric-trend-caption { margin:-8px 1px 12px; color:#8499b4; font-size:10px; }
@media(max-width:900px) {
  .top-right { gap:8px; }.profile-toggle { color:#c7d9ee; }.profile-avatar { width:32px; height:32px; }.profile-panel { right:0; }
  .metric { min-height:126px; }.metric-copy { padding-right:18px; padding-bottom:23px; }.metric-action { top:0; right:0; width:44px; height:44px; background:transparent; }.metric-action span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#f1f6fc; }.metric-trend { width:62px; height:21px; right:8px; bottom:7px; }.metric-trend-caption { font-size:10px; line-height:1.4; }
}
@media(max-width:350px) { .metric-copy { padding-right:14px; }.metric-trend { width:50px; }.profile-chevron { display:none; } }
@media(max-width:900px) { .profile-close { width:44px; height:44px; } }
@media(max-width:350px) {
  .metric { display:block; }
  .metric-copy { padding:9px 0 27px; }
  .metric-head { padding-right:0; }
  .metric strong.time-number { font-size:19px; white-space:nowrap; }
}

/* Phone layout: compact sections, visible filters, and persistent navigation. */
.mobile-bottom-nav { display:none; }
@media(max-width:900px) {
  .topbar { height:60px; border-bottom:0; }
  .mobile-brand img { width:110px; height:50px; }
  .mobile-nav { border-radius:16px 16px 0 0; padding-top:2px; padding-bottom:2px; }
  .mobile-nav a { gap:7px; color:#102c57; }
  .mobile-nav a span { display:flex; color:#0861ed; }
  .mobile-nav svg { width:19px; height:19px; }
  .content { padding-top:14px; padding-bottom:calc(95px + env(safe-area-inset-bottom)); }
  #filters { scroll-margin-top:62px; }
  .intro { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; min-height:152px; padding:8px 2px 10px; }
  .intro h1 { font-size:clamp(26px, 7.5vw, 34px); line-height:1.02; }
  .intro h1 span { display:block; }
  .intro p { max-width:270px; font-size:12px; line-height:1.45; }
  .intro .export-button { align-self:end; padding:8px; gap:7px; }
  .export-button small { font-size:10px; }
  .notice { line-height:1.45; }
  .filter-card,.table-card,.metric { border-radius:12px; }
  .filter-toggle { min-height:44px; }
  .metric { min-height:133px; }
  .metric-icon { width:37px; height:37px; border-radius:10px; }
  .metric-icon svg { width:21px; height:21px; }
  .table-controls { flex-wrap:nowrap; }
  .search-wrap { min-width:0; flex:1 1 50%; }
  .table-controls select { min-width:0; flex:1 1 50%; }
  .inquiry-card tbody { padding:0 14px; }
  .inquiry-card .lead-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); column-gap:12px; row-gap:3px; margin:0; padding:12px 0; border:0; border-bottom:1px solid #e8eff7; border-radius:0; }
  .inquiry-card .lead-row td { padding:2px 0; font-size:12px; }
  .inquiry-card .lead-row td:first-child { grid-area:1 / 1; margin:0; padding:0 0 5px; border:0; }
  .inquiry-card .lead-row td:nth-child(2) { grid-area:2 / 1; }
  .inquiry-card .lead-row td:nth-child(3) { grid-area:3 / 1; }
  .inquiry-card .lead-row td:nth-child(4) { grid-area:3 / 2; }
  .inquiry-card .lead-row td:nth-child(5) { grid-area:4 / 1; }
  .inquiry-card .lead-row td:nth-child(6) { grid-area:2 / 2; }
  .inquiry-card .lead-row td:nth-child(7) { grid-area:1 / 2; align-self:center; justify-self:end; text-align:right; }
  .inquiry-card .lead-row td:nth-child(7) .mobile-label { display:none; }
  .inquiry-card .lead-row td:nth-child(7)::after { content:'›'; margin-left:5px; color:#6488b1; font-size:18px; vertical-align:middle; }
  .inquiry-card .lead-row td:nth-child(8) { grid-area:4 / 2; }
  .inquiry-card .lead-row::after { display:none; }
  .inquiry-card .mobile-label { margin-bottom:1px; font-size:10px; }
  .inquiry-card .lead-avatar { width:31px; height:31px; }
  .mobile-bottom-nav { position:fixed; z-index:4; right:0; bottom:0; left:0; display:flex; justify-content:space-around; padding:5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border:1px solid #dce7f4; border-radius:18px 18px 0 0; background:rgba(255,255,255,.98); box-shadow:0 -5px 20px rgba(17,49,91,.06); }
  .mobile-bottom-nav a,.mobile-bottom-nav button { flex:1; min-width:0; min-height:53px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:2px; border:0; background:transparent; color:#315682; font-family:inherit; font-size:11px; font-weight:600; text-decoration:none; }
  .mobile-bottom-nav a:active,.mobile-bottom-nav button:active { color:#0861ed; }
  .mobile-bottom-nav span { display:flex; }
  .mobile-bottom-nav svg { width:21px; height:21px; }
}
@media(max-width:350px) {
  .intro { grid-template-columns:minmax(0,1fr) auto; }
  .intro .export-icon { display:none; }
  .table-controls { flex-wrap:wrap; }
  .search-wrap,.table-controls select { flex-basis:100%; }
}

/* Mobile navigation and filter refinements. */
@media (max-width:900px) {
  .topbar { height:76px; }
  .mobile-brand img { width:132px; height:62px; }
  #overview,#inquiries,#officials,#filters { scroll-margin-top:14px; }
  .filter-toggle-chevron { display:flex; flex:none; width:24px; height:24px; align-items:center; justify-content:center; }
  .filter-toggle-chevron svg { width:18px; height:18px; transition:transform .15s ease; }
  .filter-toggle[aria-expanded="true"] .filter-toggle-chevron svg { transform:rotate(180deg); }
  .filters { gap:16px 12px; }
  .filters label { min-width:0; }
  .filters select { appearance:none; padding-right:36px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23133b70' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; background-size:16px; }
}
@media(prefers-reduced-motion:reduce) { .filter-toggle-chevron svg { transition:none; } }
