:root {
  color-scheme: light;
  --ink: #13213e;
  --sub: #475776;
  --blue: #1744b7;
  --light: #eef3ff;
  --edge: #dbe3f1;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: #f7f9fd;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
input, button { font: inherit; }
:focus-visible { outline: 3px solid #5483ff; outline-offset: 3px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; top: 8px; left: 12px; background: white; padding: 8px 16px; z-index: 1; }
.skip:not(:focus) { clip-path: inset(50%); }
.top { background: white; border-bottom: 1px solid #e5ebf7; }
.top-inner { display: flex; align-items: center; min-height: 66px; }
.logo { font-size: 1.48rem; font-weight: 850; letter-spacing: -.065em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo span { color: #386cff; padding-left: 2px; }

.device-brands-main {
  padding-block: clamp(1.5rem, 4vw, 3.5rem);
}

.device-brands-main h1 {
  margin: .3em 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -.07em;
  overflow-wrap: anywhere;
}

.device-brands-main h2 { margin: 0 0 .5rem; }
.device-brands-main p { margin: .5rem 0 1rem; }
.device-brands-main section { margin-top: 2.25rem; }
.device-brand-back { display: inline-block; margin-bottom: .5rem; }
.device-brand-actions { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.device-brand-actions a { display: inline-flex; align-items: center; min-height: 44px; }

.device-brand-search {
  margin: 1.5rem 0;
  max-width: 36rem;
}

.device-brand-search label { display: block; margin-bottom: .4rem; font-weight: 650; }
.device-brand-search div { display: flex; gap: .5rem; }
.device-brand-search input {
  padding: .55rem .7rem;
  min-width: 0;
  flex: 1;
  border: 1px solid #8698bc;
  border-radius: .4rem;
  background: #fff;
  color: var(--ink);
}

.device-brand-search button {
  min-height: 46px;
  padding: 0 17px;
  border: 0;
  border-radius: 8px;
  background: #1d4ddb;
  color: white;
  font-weight: 750;
  cursor: pointer;
}

.device-brand-search button:hover { background: #173db1; }

.device-brand-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.device-brand-table th, .device-brand-table td {
  padding: .65rem clamp(.45rem, 2vw, 1rem);
  border-bottom: 1px solid var(--edge);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.device-brand-table thead { background: var(--light); }
.device-brand-table tbody th { font-weight: 600; }
.device-brand-table th:nth-child(2), .device-brand-table td:nth-child(2) {
  width: 6rem;
  text-align: end;
  font-variant-numeric: tabular-nums;
  word-break: normal;
}

.device-brand-table th small { display: block; font-size: .82em; color: var(--sub); }
.device-brand-ranking { table-layout: fixed; }
.device-brand-ranking thead th:first-child { width: clamp(10rem, 24%, 17rem); }
.device-brand-ranking code { white-space: normal; }
.device-brand-ranking .device-brand-code-token { white-space: nowrap; }
.device-brand-count span { display: none; }
.device-brand-ranked {
  max-height: min(36rem, 65vh);
  overflow: auto;
  border: 1px solid var(--edge);
  border-radius: .6rem;
}
.device-brand-ranked table th { scroll-margin-top: 3rem; }
.device-brand-ranked thead th { position: sticky; top: 0; background: var(--light); }

.device-brand-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.4rem;
}
.device-brand-pagination a { padding-block: .5rem; }

.device-brand-remote {
  margin: .55rem 0;
  padding: .8rem 1rem;
  border: 1px solid var(--edge);
  border-radius: .55rem;
  background: #fff;
  overflow-wrap: anywhere;
}
.device-brand-remote summary { cursor: pointer; font-weight: 650; }
.device-brand-variant { padding-top: .75rem; }
.device-brand-variant h3 { margin: .3rem 0 .5rem; font-size: 1rem; }
.device-brand-variant dl { margin: 0; }
.device-brand-variant dl div { margin-bottom: .55rem; }
.device-brand-variant dt { font-weight: 600; }
.device-brand-variant dt small { display: inline; color: var(--sub); }
.device-brand-variant dd { margin: .25rem 0 0; }
.device-brand-variant .code-list { display: flex; flex-wrap: wrap; gap: 7px; }
.device-brand-variant .code-list code {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid #aebde0;
  border-radius: 5px;
  color: #112750;
  background: white;
  font-size: 1rem;
  font-weight: 720;
}

@media (max-width: 680px) {
  .top-inner { padding-block: 9px 12px; }
  .device-brands-main { padding-top: 1rem; }
  .device-brands-main section { margin-top: 1.5rem; }

  .device-brand-ranked { max-height: none; overflow: visible; }
  .device-brand-ranking, .device-brand-ranking tbody { display: block; }
  .device-brand-ranking { border-radius: inherit; }
  .device-brand-ranking thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .device-brand-ranking tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: .15rem .75rem;
    padding: .65rem .8rem;
  }
  .device-brand-ranking tbody tr + tr { border-top: 1px solid var(--edge); }
  .device-brand-ranking tbody :is(th, td) { width: auto; padding: 0; border: 0; }
  .device-brand-ranking .device-brand-code { min-width: 0; }
  .device-brand-ranking .device-brand-code small { display: inline-block; margin-inline-start: .4rem; }
  .device-brand-ranking tbody .device-brand-count { width: auto; white-space: nowrap; }
  .device-brand-count span { display: inline; }
  .device-brand-types { grid-column: 1 / -1; color: var(--sub); font-size: .875rem; }
}

@media (max-width: 570px) {
  .wrap { width: calc(100% - 28px); }
}
