/* lint-allow: block-budget(51) — two controls (tabs, a phone dropdown) and two views (logo tiles, a phone name list) in one section; Mitchell, 2026-11-12: "If we can't reduce, we can't reduce"; 72: +2 height slide, −2 name tiles, −1 restated, +1 Safari select corners, −1 label capitals, −1 label bold, −1 label size (2026-11-13); 50: −20 to utilities in the HTML (sweep, 2026-11-16); 51: +1 heading minimum 55%, stats under at 1024 whatever the scrollbar (2026-11-17) */
/* .network — the Authorized Manufacturer Network (spec §5.5). Above 45em: logo tiles under filter
   tabs; at 45em and below: an industry dropdown and one panel of names. */

/* primitive tried: cluster, with-sidebar; the cluster fails: an uncapped heading group (1030 wide
   at 1440) pushes the stats under it at every size (ruled: beside at 1440, under at 1024). The
   sidebar meets it: the stats keep their own width, the heading group takes the rest, and the
   stats drop under once it would be under 55%. At the default 50% they dropped only at 1008px
   and below, so at 1024 a 16px scrollbar decided it; 55% switches between 1100 and 1200
   (measured 2026-11-17). */
.network > .with-sidebar {
  --sidebar-gap: var(--space-lg);
  --max-sidebar-width: auto; /* the stats' own width */
  --min-main-width: 55%; /* read on the heading group */
  align-items: end;
}

/* primitive tried: cluster on the dl, stack on each pair; fails: the cluster drops the second stat
   under the first at 390 (ruled: one row); a stack cannot put the digits above the label (a dl puts
   dt first). The divider sits in the middle of the gap. */
/* [ flex ] on the dl; [ flex flex-column-reverse justify-end ] on each pair: digits at the top, so
   both numbers line up when one label wraps. */
.network dl {
  gap: var(--space-lg);
}
.network dl div {
  gap: var(--space-2xs);
}
.network dl div:not(:first-child) {
  border-inline-start: var(--border-1) solid var(--hairline-color);
}
/* Muted grey, set once: the stat labels, the filters, the dropdown's label, the logos (not on
   .network itself: the heading inherits its colour). */
.network :is(dt, .tabs, .picker, .frame) {
  color: var(--text-muted);
}
/* The labels: body size and weight, as written (Mitchell 2026-11-13: no capitals, "hard to read"; not bold, "too thick"; then one size up = the body size), a short rule under. */
.network dt .rule {
  inline-size: var(--space-lg); /* [ block ]: not a stack item here */
}

/* primitive tried: cluster (tabs, picker); meets it. The swap at 45em is ruled (spec §5.5,
   decision 14): two different controls, so no composition switches them; each side hides one pair,
   so nothing has to restore a display. */
.network .tabs {
  --cluster-space: var(--space-2xs) var(--space-lg);
}
/* The filters: muted text; the picked one white with a green line under it (green marks the
   active state). The line is always there, see-through, so picking never moves the text. */
.network .tabs button {
  border-block-end: var(--border-2) solid transparent;
}
.network .tabs [aria-pressed="true"] {
  border-block-end-color: var(--color-accent-base);
  color: var(--color-white);
}
.network .picker {
  --cluster-space: var(--space-2xs);
}
/* The dropdown: the page's own dark look, as wide as the picked name, a green line under it (as
   the picked filter) and a green ▾ drawn over its right padding. */
.network select {
  appearance: none;
  field-sizing: content;
  border: 0;
  border-block-end: var(--border-2) solid var(--color-accent-base);
  /* lint-allow: restated(border-radius) — Chrome's select is square already; Safari rounds it (about 5px), bending the green line up at its ends; tmp/check-scripts/safari_network_t12.rb shot at 390 */
  border-radius: 0;
  background: none;
  color-scheme: dark; /* the open list is dark too */
}
/* [ pointer-events-none ] on the ▾: a tap on it opens the dropdown. */
.network select + span {
  margin-inline-start: calc(-1 * var(--space-lg));
}
@media (width > 45em) {
  .network :is(.picker, .names) { display: none; }
}
@media (width <= 45em) {
  .network :is(.tabs, .tiles, h2 br) { display: none; } /* h2 br: the heading's line break (REF) */
}
/* A filter slides the box to its new height (spec §3 "Height change"); the controller sets the
   heights and the state. Hidden overflow: a shrinking box would spill its tiles over View all. */
.network [data-state~="animating"] {
  overflow: hidden;
  transition: block-size var(--duration-med) var(--ease-standard);
}

/* primitive tried: grid; meets it with fixed counts: 4 across, 6 from 73em, 8 from 88em (ruled,
   spec §5.5; not 75/90em: Safari leaves its scrollbar out of the media width). The tiles grow,
   not the count. */
.network .grid {
  --grid-placement: 4;
  --grid-min-item-size: 0px;
  --gutter: var(--space-s);
}
@media (width >= 73em) {
  .network .grid { --grid-placement: 6; }
}
@media (width >= 88em) {
  .network .grid { --grid-placement: 8; }
}

/* primitive tried: frame (the tile, already: 16:9, centred); meets it. The logo's box fills the
   tile inside its padding; as a grid it stretches the logo (a mask) to fill it. `li > span`: the
   logo is a span inside the span. */
.network .frame {
  padding: var(--space-s);
  transition: translate var(--transition-movement), box-shadow var(--transition-fade), color var(--transition-fade);
}
/* The glass look, on the tiles and on the phone panel of names: a blue edge and fill (the lit
   card's blue), a faint light along the top. */
.network :is(.frame, .names ul) {
  border: var(--border-1) solid hsl(var(--color-blue-base-hsl) / var(--alpha-60)); /* brighter than the lit-card edge, so the tiles stop the eye (Mitchell, 2026-11-13) */
  background: linear-gradient(hsl(var(--color-blue-base-hsl) / var(--alpha-20))), hsl(var(--color-bg-base-hsl) / var(--alpha-60)); /* navy under the tint: less drawing shows through (Mitchell, 2026-11-12) */
  box-shadow: var(--inner-glow-top);
}
/* The logo: its own shape (a mask) in the tile's colour, so every maker's logo reads alike. */
.network [role="img"] {
  background: currentcolor;
  mask: var(--logo, none) center / contain no-repeat;
}
/* Under a mouse: the lit card's glow, tighter (half the blur: the shared one spread too far round a
   small tile; Mitchell, 2026-11-17: "the diffusion is too big"), the logo white. */
@media (hover: hover) and (pointer: fine) {
  /* lint-allow: unchecked — the restated hover pass does not reach the tabs; manufacturer_network_test.rb "hovering a filter tab turns it white" hovers one and reads it */
  .network .tabs :hover {
    color: var(--color-white);
  }
  .network .frame:hover {
    color: var(--color-white);
    box-shadow: var(--inner-glow-top), 0 var(--space-3xs) var(--space-2xs) var(--glow-blue);
  }
}
/* Pressed: in, as the button (down and left, the glow gone; Mitchell, 2026-11-12: "like a button so when
   you click on it it kinda goes down"). Mouse and finger alike. */
/* lint-allow: unchecked — the restated run has no :active pass; manufacturer_network_test.rb "a tile held down moves in as the button does" holds the mouse down and reads it */
.network .frame:active {
  translate: calc(-1 * var(--space-3xs)) var(--space-3xs);
  box-shadow: var(--inner-glow-top);
}

/* Forced colours replace backgrounds, which would hide a masked logo: keep it (in the forced text colour). */
@media (forced-colors: active) {
  .network [role="img"] {
    forced-color-adjust: none;
  }
}
/* Uses .frame (the li); the frame sizes only an img or video child, so this span fills the tile itself and
   the logo inside stretches with it. */
.network li > span {
  flex: 1;
  align-self: stretch;
  display: grid;
}

/* primitive tried: grid (2 across); fails: it fills row by row (ruled, decision 14: column 1, then
   column 2) and its rows stretch each name to the tallest one. CSS columns meet it. */
.network .names ul {
  columns: 2;
  column-gap: var(--space-md);
}
.network .names li {
  font-size: var(--step--1); /* [ padding-bottom-2xs ]: padding, not margin, as a margin is dropped at a column top */
  break-inside: avoid;
}

