:root {
  color-scheme: dark;
  --bg: #0a1015;
  --surface: #101820;
  --surface-2: #141f29;
  --surface-3: #1a2631;
  --line: #25343f;
  --line-bright: #344652;
  --text: #f3f7f8;
  --muted: #92a1ab;
  --muted-2: #667681;
  --teal: #19d6cb;
  --teal-soft: rgba(25, 214, 203, .12);
  --teal-line: rgba(25, 214, 203, .32);
  --amber: #e9b65c;
  --blue: #6da8ff;
  --radius: 18px;
  --shadow: 0 22px 80px rgba(0,0,0,.28);
}

body.light {
  color-scheme: light;
  --bg: #f3f6f7;
  --surface: #ffffff;
  --surface-2: #edf3f4;
  --surface-3: #e5edef;
  --line: #d4e0e3;
  --line-bright: #bdcdd1;
  --text: #10191e;
  --muted: #5f717a;
  --muted-2: #7b8b92;
  --teal: #008f89;
  --teal-soft: rgba(0, 143, 137, .1);
  --teal-line: rgba(0, 143, 137, .28);
  --shadow: 0 24px 70px rgba(36,64,71,.11);
}

* { box-sizing: border-box; }
.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; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  transition: background .25s ease, color .25s ease;
}
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(25,214,203,.38); outline-offset: 3px; }

.ambient { position: fixed; width: 440px; height: 440px; border-radius: 50%; filter: blur(120px); opacity: .09; pointer-events: none; z-index: -1; }
.ambient-one { background: var(--teal); top: -180px; right: 2%; }
.ambient-two { background: #2978ff; bottom: -260px; left: -180px; opacity: .045; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 78px;
  padding: 0 clamp(20px, 5vw, 78px);
  border-bottom: 1px solid rgba(115,137,149,.16);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; width: max-content; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--teal); border: 1px solid var(--teal-line); border-radius: 12px; background: var(--teal-soft); }
.brand-mark svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 4px; font-size: 17px; letter-spacing: -.3px; }
.brand strong { font-weight: 800; }
.brand em { max-width: 290px; overflow: hidden; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 500; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }

nav { display: flex; gap: 34px; align-items: center; }
nav a, .nav-button { position: relative; border: 0; background: none; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; padding: 28px 0; }
nav a:hover, .nav-button:hover, .nav-active { color: var(--text); }
.nav-active::after { content: ""; position: absolute; height: 2px; left: 0; right: 0; bottom: 0; background: var(--teal); border-radius: 4px; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.version-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 99px; font-size: 12px; font-weight: 600; }
.version-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface); cursor: pointer; }
.icon-button:hover { color: var(--text); border-color: var(--line-bright); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sun { display: none; }
body.light .moon { display: none; }
body.light .sun { display: block; }

main { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 78px 0 94px; }
.intro { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(50px, 9vw, 130px); align-items: end; margin-bottom: 54px; }
.eyebrow { margin: 0 0 13px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; max-width: 780px; font-size: clamp(38px, 5vw, 68px); line-height: 1.04; letter-spacing: -.055em; font-weight: 700; }
h1 span { color: var(--teal); }
.hero-logo { position: relative; width: min(100%, 630px); min-height: 150px; display: flex; align-items: center; }
.hero-logo img { display: block; width: 100%; height: auto; filter: invert(1) hue-rotate(149deg) saturate(1.35) brightness(1.08); mix-blend-mode: screen; }
body.light .hero-logo img { filter: hue-rotate(-27deg) saturate(1.2); mix-blend-mode: multiply; }
.intro-copy > p { margin: 0 0 28px; max-width: 470px; color: var(--muted); font-size: 16px; }
.stats { display: flex; gap: 34px; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: 27px; line-height: 1.2; letter-spacing: -.04em; }
.stats span { color: var(--muted-2); font-size: 12px; font-weight: 600; }

.catalog-panel { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); }
.search-row { display: grid; grid-template-columns: 1fr 235px; gap: 14px; }
.search-box { position: relative; display: flex; align-items: center; min-height: 58px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); transition: border .2s, box-shadow .2s; }
.search-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.search-box svg { width: 21px; margin-left: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search-box input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; padding: 0 16px; color: var(--text); background: transparent; font-size: 15px; }
.search-box input::placeholder { color: var(--muted-2); }
kbd { margin-right: 14px; padding: 4px 8px; border: 1px solid var(--line); border-bottom-color: var(--line-bright); border-radius: 6px; color: var(--muted-2); background: var(--surface-2); font-family: inherit; font-size: 11px; }
.select-wrap { position: relative; min-height: 58px; display: flex; flex-direction: column; justify-content: center; padding: 7px 42px 7px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.select-wrap span { color: var(--muted-2); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.select-wrap select { appearance: none; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; }
.select-wrap svg { position: absolute; right: 15px; width: 18px; fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.filter-groups { display: flex; justify-content: space-between; gap: 28px; padding-top: 22px; }
.filter-block { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.filter-label { color: var(--muted-2); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .18s ease; }
.chip:hover { color: var(--text); border-color: var(--line-bright); transform: translateY(-1px); }
.chip.active { color: var(--teal); border-color: var(--teal-line); background: var(--teal-soft); }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 34px 2px 17px; }
.results-head p { margin: 0; font-size: 14px; color: var(--muted); }
.results-head strong { color: var(--text); font-size: 18px; }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 17px; color: var(--muted-2); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot.verified { background: var(--teal); }
.status-dot.tested { background: var(--blue); }
.status-dot.unknown { background: var(--muted-2); }

.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.device-card { position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 23px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.device-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 3px; height: 72px; background: var(--teal); opacity: .8; }
.device-card:hover { transform: translateY(-3px); border-color: var(--line-bright); box-shadow: var(--shadow); }
.card-top { display: flex; gap: 17px; align-items: flex-start; }
.device-icon { flex: 0 0 auto; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; color: var(--teal); background: var(--teal-soft); border: 1px solid rgba(25,214,203,.14); }
.device-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.device-title { flex: 1; min-width: 0; }
.manufacturer { margin: 0 0 3px; color: var(--muted-2); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.device-title h2 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -.02em; }
.model { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.verification { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 700; }
.verification[data-level="verified"] { color: var(--teal); }
.verification[data-level="tested"] { color: var(--blue); }
.verification i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.feature-table { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 26px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.feature { min-width: 0; padding: 12px 7px 11px; text-align: center; background: var(--surface-2); border-right: 1px solid var(--line); }
.feature:last-child { border: 0; }
.feature span { display: block; min-height: 30px; color: var(--muted-2); font-size: 10px; font-weight: 700; line-height: 1.3; text-transform: uppercase; }
.feature strong { font-size: 17px; }
.feature .yes { color: var(--teal); }
.feature .no { color: #e07176; }
.feature .unknown { color: var(--muted-2); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 18px; color: var(--muted); font-size: 12px; }
.card-meta span { display: flex; align-items: center; gap: 7px; }
.card-meta svg { width: 14px; fill: none; stroke: var(--muted-2); stroke-width: 1.9; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: auto; padding-top: 21px; }
.tested-on { color: var(--muted-2); font-size: 11px; }
.tested-on strong { color: var(--muted); }
.details-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--teal-line); border-radius: 9px; color: var(--teal); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }
.details-button:hover { background: var(--teal-soft); }
.details-button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

.empty-state { grid-column: 1 / -1; padding: 80px 24px; text-align: center; border: 1px dashed var(--line-bright); border-radius: var(--radius); background: var(--surface); }
.empty-state strong { display: block; margin-bottom: 5px; font-size: 19px; }
.empty-state p { margin: 0; color: var(--muted); }
.data-note { display: flex; gap: 15px; margin-top: 24px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.note-icon { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--teal-line); border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-weight: 800; }
.data-note strong { font-size: 13px; }
.data-note p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

footer { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 38px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; color: var(--muted-2); font-size: 12px; }
footer p { margin: 0; text-align: center; }
footer > span { text-align: right; }
.footer-brand { transform: scale(.86); transform-origin: left center; }

dialog { width: min(720px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-bright); border-radius: 22px; color: var(--text); background: transparent; box-shadow: 0 28px 100px rgba(0,0,0,.55); }
dialog::backdrop { background: rgba(2,7,10,.75); backdrop-filter: blur(8px); }
.dialog-shell { position: relative; padding: 31px; background: var(--surface); }
.dialog-close { position: absolute; top: 17px; right: 17px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: 24px; line-height: 1; cursor: pointer; }
.dialog-close:hover { color: var(--text); }
.dialog-head { display: flex; gap: 17px; align-items: center; padding-right: 42px; }
.dialog-head .device-icon { width: 58px; height: 58px; }
.dialog-head h2, .about-shell h2 { margin: 0; font-size: 26px; letter-spacing: -.035em; line-height: 1.2; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); }
.dialog-section { margin-top: 28px; }
.dialog-section h3 { margin: 0 0 10px; color: var(--muted-2); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.spec-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 12px 15px; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec-row:last-child { border: 0; }
.spec-row span { color: var(--muted); }
.spec-row strong.yes { color: var(--teal); }
.spec-row strong.no { color: #e07176; }
.spec-row strong.unknown { color: var(--muted-2); }
.source-note { margin: 0; padding: 14px 15px; border-radius: 12px; color: var(--muted); background: var(--surface-2); font-size: 13px; }
.about-shell > p:not(.eyebrow) { color: var(--muted); }
.about-grid { display: grid; gap: 10px; margin-top: 24px; }
.about-grid div { display: grid; gap: 3px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; }
.about-grid strong { color: var(--teal); font-size: 13px; }
.about-grid span { color: var(--muted); font-size: 13px; }

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .intro { grid-template-columns: 1fr; gap: 26px; }
  .intro-copy { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
  .filter-groups { flex-direction: column; }
  .device-grid { grid-template-columns: 1fr; }
  .brand em { max-width: 230px; }
}

@media (max-width: 640px) {
  .site-header { height: 68px; padding: 0 16px; }
  .version-pill { display: none; }
  .brand em { display: none; }
  main { width: min(100% - 24px, 1240px); padding-top: 48px; }
  h1 { font-size: clamp(35px, 11vw, 49px); }
  .hero-logo { min-height: 100px; width: min(100%, 520px); }
  .intro { margin-bottom: 36px; }
  .intro-copy { grid-template-columns: 1fr; gap: 10px; }
  .catalog-panel { padding: 14px; border-radius: 17px; }
  .search-row { grid-template-columns: 1fr; }
  kbd { display: none; }
  .filter-groups { padding-top: 17px; gap: 19px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -14px; padding-right: 14px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }
  .legend { display: none; }
  .device-card { padding: 19px; min-height: 350px; }
  .verification { position: absolute; top: 19px; right: 19px; padding: 6px; }
  .verification span { display: none; }
  .device-title { padding-right: 18px; }
  .feature-table { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: 0; }
  .feature:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .card-bottom { align-items: flex-end; }
  footer { grid-template-columns: 1fr; text-align: center; }
  footer p, footer > span { text-align: center; }
  .footer-brand { margin: auto; transform-origin: center; }
  .dialog-shell { padding: 25px 20px; }
  .dialog-head h2, .about-shell h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
