:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  --ink: #172033;
  --muted: #68758a;
  --line: #e5eaf1;
  --line-strong: #d5dce7;
  --paper: #fff;
  --canvas: #f4f6fa;
  --blue: #315ee8;
  --blue-dark: #234bc2;
  --blue-soft: #edf2ff;
  --shadow: 0 14px 44px rgba(21, 35, 63, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 360px; background: var(--canvas); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(49, 94, 232, .55); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 14px; color: #fff; background: #172033; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { width: 100%; max-width: 1920px; margin: 0 auto; padding: 24px 30px 70px; display: grid; grid-template-columns: 278px minmax(0, 1fr); align-items: start; gap: 24px; }
.filters { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; overscroll-behavior: contain; padding: 20px 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 4px 16px rgba(21, 35, 63, .035); scrollbar-width: thin; }
.filter-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.filter-head h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.03em; }
.filter-kicker, .section-kicker { color: #8290a6; font-size: 10px; font-weight: 750; letter-spacing: .14em; }
.drawer-close { display: none !important; }
.field-label { display: block; margin-bottom: 8px; color: #354258; font-size: 12px; font-weight: 700; }
.text-field, .select-field, .range-fields input, .sort-select-wrap select { min-width: 0; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); }
.text-field { width: 100%; padding: 0 12px; }
.text-field::placeholder { color: #9aa5b5; }
.filter-group { min-width: 0; margin: 22px 0 0; padding: 0; border: 0; }
.filter-group legend { width: 100%; margin-bottom: 10px; color: #354258; font-size: 12px; font-weight: 750; }
.facet-hint, .unit-label { float: right; color: #98a2b2; font-size: 10px; font-weight: 550; }
.facet-list { display: grid; gap: 2px; max-height: 176px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.facet-option, .radio-option { display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 4px 5px; border-radius: 7px; color: #59667a; font-size: 12px; cursor: pointer; }
.facet-option:hover, .radio-option:hover { background: #f6f8fc; color: var(--ink); }
.facet-option input, .radio-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); flex: 0 0 auto; }
.facet-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet-count { color: #99a4b5; font-size: 10px; }
.range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.range-fields label { display: grid; gap: 5px; color: #8b97a9; font-size: 10px; }
.range-fields input { width: 100%; padding: 0 9px; font-size: 12px; }
.select-field { width: 100%; padding: 0 10px; font-size: 12px; }
.filter-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.filter-count { color: #8b97a9; font-size: 10px; white-space: nowrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; padding: 0 13px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 5px 12px rgba(49, 94, 232, .18); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-secondary { color: #344158; border-color: var(--line-strong); background: #fff; }
.button-secondary:hover { border-color: #aeb9ca; background: #f9fbff; }
.button-quiet { min-height: 33px; padding: 0 8px; color: #66748a; background: transparent; }
.button-quiet:hover { color: var(--blue-dark); background: var(--blue-soft); }
.workspace { min-width: 0; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 90px; }
.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #4773f5, #264cce); box-shadow: 0 7px 18px rgba(49, 94, 232, .24); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: #7f8ca1; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #2fbe83; box-shadow: 0 0 0 3px #e5f8ef; }
.page-header h1 { margin: 0; color: var(--ink); font-size: clamp(22px, 2vw, 29px); font-weight: 760; letter-spacing: -.045em; text-wrap: balance; }
.page-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.button-filter { display: none; border-color: var(--line-strong); background: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 22px 0 18px; }
.stat-card { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.stat-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; font-size: 16px; font-weight: 700; }
.stat-blue { color: #3864dd; background: #edf2ff; }
.stat-violet { color: #7854c8; background: #f2edff; }
.stat-teal { color: #168878; background: #e8f8f4; }
.stat-amber { color: #bb7a19; background: #fff5e4; }
.metric { font-size: 21px; font-weight: 780; line-height: 1.1; letter-spacing: -.035em; }
.label { margin-top: 4px; color: #8792a4; font-size: 10px; }
.catalog-panel { padding: 19px 20px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 4px 18px rgba(21, 35, 63, .03); }
.catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.catalog-heading h2 { margin: 4px 0 2px; font-size: 19px; letter-spacing: -.035em; }
.status { margin: 0; color: #8290a3; font-size: 11px; }
.sort-select-wrap { display: flex; align-items: center; gap: 8px; color: #8792a4; font-size: 10px; white-space: nowrap; }
.sort-select-wrap select { min-height: 35px; max-width: 220px; padding: 0 10px; font-size: 11px; }
.active-filters { display: none; flex-wrap: wrap; gap: 6px; margin: -3px 0 12px; }
.active-filters.has-filters { display: flex; }
.filter-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 25px; padding: 0 8px; border: 1px solid #dce5ff; border-radius: 999px; color: #3658ac; background: #f1f5ff; font-size: 10px; cursor: pointer; }
.filter-chip:hover { border-color: #b8c9ff; background: #e8efff; }
.filter-chip span { color: #6d83c0; font-size: 14px; line-height: 1; }
.tablewrap { position: relative; max-height: calc(100vh - 390px); min-height: 410px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; scrollbar-color: #cbd3df transparent; scrollbar-width: thin; }
table { width: 100%; min-width: 1210px; border-collapse: separate; border-spacing: 0; }
th, td { padding: 10px 11px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: middle; font-size: 11px; }
thead th { position: sticky; z-index: 2; top: 0; height: 40px; color: #78869a; background: #f7f9fc; font-size: 10px; font-weight: 760; white-space: nowrap; }
thead th:first-child { border-radius: 10px 0 0 0; }
thead th:last-child { border-radius: 0 10px 0 0; }
tbody tr { background: #fff; }
tbody tr:hover { background: #f8faff; }
tbody tr.is-selected { background: #f1f5ff; }
tbody tr:last-child td { border-bottom: 0; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; cursor: pointer; }
.sort-button:hover { color: var(--blue-dark); }
.sort-button span { color: #9aa5b5; font-size: 12px; }
.check-col { width: 38px; padding-right: 4px; padding-left: 12px; }
.open-col { width: 40px; text-align: center; }
.compare-check { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.maker-label { color: #5d6a7e; white-space: nowrap; }
.sensor-cell { min-width: 145px; }
.sensor-link { max-width: 230px; padding: 2px 0; overflow: hidden; border: 0; color: #23334d; background: transparent; font-size: 11px; font-weight: 760; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.sensor-link:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.code-cell { max-width: 130px; color: #8792a4; }
.number-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.emphasis { color: #253b68; font-weight: 750; }
.role-cell { min-width: 125px; max-width: 205px; }
.role-tag { display: inline-flex; margin: 1px 3px 1px 0; padding: 3px 6px; border-radius: 5px; color: #65748b; background: #f0f3f8; font-size: 9px; line-height: 1.25; white-space: nowrap; }
.role-muted { color: #98a2b2; background: #f7f8fa; }
.phone-count { display: inline-block; min-width: 22px; color: #374867; text-align: right; }
.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; color: #748198; background: transparent; font-size: 19px; line-height: 1; cursor: pointer; }
.icon-button:hover { border-color: var(--line); color: var(--blue); background: #f4f7ff; }
.row-open { width: 27px; height: 27px; font-size: 14px; }
.empty-state { display: grid; justify-items: center; padding: 70px 20px; text-align: center; }
.empty-mark { color: #9babca; font-size: 32px; }
.empty-state h3 { margin: 10px 0 4px; font-size: 15px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.detail-panel { margin-top: 14px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); scroll-margin-top: 16px; }
.detail-panel:empty { display: none; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.detail-head h2 { margin: 4px 0 3px; font-size: 19px; }
.detail-head p { margin: 0; color: var(--muted); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.detail-item { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid #edf0f4; border-radius: 9px; }
.detail-item span { color: #8490a2; font-size: 9px; }
.detail-item strong { overflow-wrap: anywhere; color: #344258; font-size: 11px; font-weight: 650; }
.detail-source { margin-top: 13px; font-size: 11px; }
.detail-source a { color: var(--blue-dark); text-decoration: none; }
.detail-source a:hover { text-decoration: underline; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 2px; color: #95a0af; font-size: 10px; }
.page-footer a { color: #748198; text-decoration: none; }
.page-footer a:hover { color: var(--blue); }
.compare-bar { position: fixed; z-index: 25; right: 50%; bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(760px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid #d9e1f0; border-radius: 14px; background: rgba(255, 255, 255, .97); box-shadow: 0 14px 44px rgba(17, 33, 65, .18); transform: translateX(50%); backdrop-filter: blur(12px); }
.compare-bar-copy { display: flex; align-items: center; gap: 11px; min-width: 0; }
.compare-bar-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 19px; }
.compare-bar-copy div { display: grid; gap: 2px; }
.compare-bar-copy strong { color: #283752; font-size: 11px; }
.compare-bar-copy span:not(.compare-bar-icon) { color: #8792a4; font-size: 10px; }
.compare-bar-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.compare-dialog { width: min(1180px, calc(100vw - 36px)); max-width: none; max-height: min(84vh, 860px); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; box-shadow: 0 24px 80px rgba(10, 20, 40, .27); }
.compare-dialog::backdrop { background: rgba(18, 29, 48, .48); backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 21px 23px 16px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 4px 0 2px; font-size: 20px; letter-spacing: -.03em; }
.dialog-head p { margin: 0; color: #8792a4; font-size: 11px; }
.compare-table-wrap { max-height: calc(min(84vh, 860px) - 105px); overflow: auto; overscroll-behavior: contain; }
.comparison-table { min-width: 680px; }
.comparison-table th, .comparison-table td { min-width: 150px; padding: 11px 13px; border-bottom: 1px solid #edf0f4; font-size: 11px; }
.comparison-table thead th { position: sticky; top: 0; z-index: 3; background: #f8faff; }
.comparison-table thead th:first-child, .comparison-table tbody th { position: sticky; left: 0; z-index: 4; min-width: 140px; color: #66748a; background: #f8faff; }
.comparison-table tbody th { z-index: 2; text-align: left; }
.comparison-table thead th strong, .compare-maker { display: block; }
.comparison-table thead th strong { margin-top: 4px; color: #263954; font-size: 13px; }
.compare-maker { color: #8591a4; font-size: 9px; font-weight: 650; }
.remove-compare { margin-top: 7px; padding: 0; border: 0; color: #7485a1; background: transparent; font-size: 9px; cursor: pointer; }
.remove-compare:hover { color: #bd4051; text-decoration: underline; }
.drawer-backdrop { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1600px) {
  .app-shell { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding: 28px 38px 72px; }
  .filters { top: 28px; max-height: calc(100vh - 56px); padding: 22px 20px 18px; }
  .tablewrap { max-height: calc(100vh - 370px); min-height: 470px; }
  th, td { padding-top: 11px; padding-bottom: 11px; }
}
@media (max-width: 1240px) and (min-width: 1021px) {
  .app-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .filters { padding: 17px 14px; }
  .page-header { align-items: flex-start; }
  .header-actions { flex-wrap: wrap; }
  .stats { gap: 8px; }
  .stat-card { padding: 10px; }
  .catalog-panel { padding: 16px; }
  .tablewrap { max-height: calc(100vh - 410px); }
}
@media (max-width: 1020px) {
  .app-shell { display: block; padding: 17px 18px 76px; }
  .filters { position: fixed; z-index: 32; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); max-height: 100dvh; padding: 22px 20px 26px; border-radius: 0 18px 18px 0; box-shadow: 12px 0 40px rgba(15, 28, 50, .16); transform: translateX(-105%); transition: transform .2s ease; }
  .filters-open .filters { transform: translateX(0); }
  .drawer-close { display: inline-grid !important; }
  .drawer-backdrop:not([hidden]) { position: fixed; z-index: 31; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(20, 31, 49, .36); }
  .button-filter { display: inline-flex; }
  .header-actions { flex-wrap: wrap; }
  .tablewrap { max-height: calc(100vh - 390px); min-height: 380px; }
}
@media (max-width: 720px) {
  body { min-width: 320px; }
  .app-shell { padding: 12px 12px 76px; }
  .page-header { align-items: flex-start; gap: 12px; }
  .brand-lockup { gap: 10px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 10px; }
  .eyebrow { font-size: 8px; }
  .page-header h1 { max-width: 360px; font-size: 20px; }
  .page-header p { max-width: 400px; font-size: 10px; line-height: 1.45; }
  .header-actions { gap: 5px; }
  .header-actions .button { min-height: 34px; padding: 0 9px; font-size: 10px; }
  .button-secondary[href="/data/all-in-one.csv"], .header-actions .button-primary { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 15px 0 12px; }
  .stat-card { min-height: 62px; gap: 8px; padding: 8px; border-radius: 10px; }
  .stat-icon { width: 29px; height: 29px; border-radius: 8px; font-size: 13px; }
  .metric { font-size: 17px; }
  .label { font-size: 9px; }
  .catalog-panel { padding: 13px 10px 11px; border-radius: 13px; }
  .catalog-heading { align-items: flex-start; gap: 8px; }
  .catalog-heading h2 { font-size: 16px; }
  .sort-select-wrap { display: grid; justify-items: end; gap: 3px; font-size: 9px; }
  .sort-select-wrap select { max-width: 160px; min-height: 32px; font-size: 9px; }
  .status { font-size: 10px; }
  .tablewrap { max-height: calc(100dvh - 330px); min-height: 360px; }
  table { min-width: 1030px; }
  th, td { padding: 9px 8px; font-size: 10px; }
  thead th { font-size: 9px; }
  .check-col { width: 32px; padding-left: 9px; }
  .sensor-link { font-size: 10px; }
  .page-footer { display: grid; gap: 6px; font-size: 9px; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-bar { bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100vw - 20px); padding: 9px; gap: 6px; }
  .compare-bar-icon { display: none; }
  .compare-bar-copy strong { font-size: 10px; }
  .compare-bar-copy span:not(.compare-bar-icon) { max-width: 125px; font-size: 9px; }
  .compare-bar-actions { gap: 1px; }
  .compare-bar-actions .button { min-height: 34px; padding: 0 8px; font-size: 10px; }
  .compare-dialog { width: calc(100vw - 18px); max-height: 88dvh; border-radius: 13px; }
  .dialog-head { padding: 15px; }
  .dialog-head h2 { font-size: 17px; }
  .compare-table-wrap { max-height: calc(88dvh - 90px); }
  .comparison-table th, .comparison-table td { min-width: 125px; padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.dashboard-panel { margin: 22px 0; padding: 22px; border: 1px solid #e4eaf2; border-radius: 18px; background: #fff; }
.dashboard-panel h2 { margin: 5px 0 4px; color: #14243a; font-size: 22px; letter-spacing: -.03em; }
.dashboard-intro { margin: 0 0 18px; color: #65748a; font-size: 13px; }
.chart-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.chart-card { min-width: 0; padding: 16px; border: 1px solid #e8edf4; border-radius: 14px; background: #fbfcfe; }
.chart-card h3 { margin: 0; color: #1e2d42; font-size: 14px; }
.chart-card > p { min-height: 30px; margin: 5px 0 10px; color: #738196; font-size: 11px; line-height: 1.4; }
.chart-wide { grid-column: 1 / -1; }
.chart-area { width: 100%; overflow-x: auto; }
.chart-area svg { display: block; width: 100%; min-width: 440px; height: auto; }
.chart-gridline { stroke: #e5eaf1; stroke-width: 1; }
.chart-tick,.chart-axis { fill: #6c7b90; font: 11px system-ui,sans-serif; }
.chart-empty { padding: 35px 10px; color: #7b8798; text-align: center; font-size: 12px; }
.bar-chart { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(110px,180px) 1fr 35px; align-items: center; gap: 10px; color: #46566c; font-size: 11px; }
.bar-track { height: 10px; overflow: hidden; border-radius: 8px; background: #edf1f6; }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#4c8de8,#7866d7); }
.bar-row b { color: #20334c; text-align: right; }
.detail-extra { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e7ecf2; }
.detail-extra h3 { margin: 12px 0 4px; color: #526176; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.detail-extra p,.detail-extra ul { margin: 0; color: #26374d; font-size: 12px; line-height: 1.6; }
.detail-extra ul { padding-left: 18px; max-height: 220px; overflow: auto; }
.detail-source { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
@media (max-width: 760px) { .dashboard-panel { padding: 14px; } .chart-grid { grid-template-columns: 1fr; } .chart-wide { grid-column: auto; } }
