/* 3D Spool It: the look shared with 3D Print It. Figtree for text, Geist Mono for codes, Space Grotesk for the
   wordmark, titles and counts; the top menu bar; white cards; light/dark via [data-theme]. The fonts are SIL Open
   Font License 1.1, credited on About. */
@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url(../fonts/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 500; font-display: swap; src: url(../fonts/figtree-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url(../fonts/figtree-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 700; font-display: swap; src: url(../fonts/figtree-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-weight: 400; font-display: swap; src: url(../fonts/geist-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-weight: 500; font-display: swap; src: url(../fonts/geist-mono-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-weight: 600; font-display: swap; src: url(../fonts/geist-mono-latin-600-normal.woff2) format('woff2'); }
/* The wordmark, titles and counts: Space Grotesk 700, SIL Open Font License 1.1 (credited on About). */
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url(../fonts/space-grotesk-latin-700-normal.woff2) format('woff2'); }

:root {
  /* The text face is chosen here only (its files are the @font-face rules above): every rule, the titles'
     fallback included, takes it from --font. */
  --font: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  --head: 'Space Grotesk', var(--font);
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* The ground and the surfaces: the white bar carried down the page, white cards on a cool ground, slate lines. */
  --bg: #f4f6f8;
  --text: #1c2127;
  --muted: #5c6570;
  --faint: #8a939e;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #edf0f3;
  --border: #e4e7eb;
  --border-strong: #cfd5dc;
  --link: #1d4ed8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-contrast: #ffffff;
  /* the main action's fill: --accent itself is the rings', borders' and icons' blue (white on it is 3.7:1), the
     fill a step deeper so white words on it read at 5.2:1 (6.7:1 hovered) in both themes */
  --accent-fill: #2563eb; --accent-fill-hover: #1d4ed8;
  /* States in the filament strip's colours, deepened where they carry text (each word at least 4.5:1 on its own
     tint, on every ground a tint sits on); --warning-ink for amber words, --warning for amber edges and marks beside
     words, --warning-mark for an amber mark that is a control's only content or state. */
  --success: #187143; --success-bg: rgba(59,178,115,.14);
  --warning: #e89b16; --warning-bg: rgba(246,174,45,.16); --warning-ink: #935705;
  /* an amber mark that is a control's only content or state (a pressed star, the theme button's sun): 3:1 or more
     on a card, a hovered row and a field */
  --warning-mark: #ad7206;
  --error: #b6341e;   --error-bg: rgba(233,79,55,.11);
  --info: #21688c;    --info-bg: rgba(46,134,171,.12);
  --neutral: #58636f; --neutral-bg: rgba(95,107,120,.11);
/* Small badge text on those tints: the states already read at 4.5:1 or more as text. */
  --success-ink: var(--success); --info-ink: var(--info); --neutral-ink: var(--neutral);
  --row-hover: #f6f8fb;
  --group-row: #f1f4f7;
  --shadow: 0 1px 2px rgba(22,30,42,.05);
  --radius: 12px;
  --radius-sm: 8px;
  /* The header bar: its ground, the filled fields, the round buttons' ring, the soft tag colours, and the
     filament strip under the bar (the same five colours in both themes). */
  --bar-bg: #ffffff;
  --search-bg: #f1f3f6;
  --btn-line: #d9dde3;
  --tag-bg: #e6effe; --tag-ink: #1d4ed8;
  /* the chosen part of a segmented switch, raised off its track */
  --seg-on: #ffffff;
  --strip-1: #e94f37; --strip-2: #f6ae2d; --strip-3: #3bb273; --strip-4: #2e86ab; --strip-5: #a23b72;
  /* Tones by meaning (count cards, panel marks, icons): the strip's five and a slate. */
  --tone-red: #e94f37; --tone-amber: #e89b16; --tone-green: #2fa866; --tone-blue: #2e86ab; --tone-plum: #a23b72; --tone-slate: #6b7785;
  --checker-a: #d3d8de; --checker-b: #f3f5f7;
  /* The ground under an imported picture (app.pictures): light in both themes, so a render's dark parts show. */
  --picture-bg: #ffffff;
/* Extra badge hues for the brand tracker's statuses. */
  --purple: #7631ec; --purple-bg: rgba(124,58,237,.1);
  --teal: #0e6f68;   --teal-bg: rgba(15,118,110,.1);
  --pink: #bc185c;   --pink-bg: rgba(190,24,93,.09);
  --indigo: #4338ca; --indigo-bg: rgba(67,56,202,.1);
  /* The menu's sections (app.nav): one accent colour each. */
  --sec-filaments: #2c7a52; --sec-hardware: #2563c9; --sec-brands: #9a5512; --sec-dashboard: #5f4aa6; --sec-other: #56606e; --sec-admin: #a3393b;
  /* Charts (the admins' Site numbers): four series colours in a fixed order (blue, orange, aqua, yellow), checked
     for colour-blind separation as adjacent series on this theme's card; a quiet grey for context (bots over the
     people's numbers, sparklines); the hairline rules and baseline; the empty square of the week's grid. */
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100;
  --viz-muted: #9aa3ad; --viz-spark: #9aa3ad; --viz-rule: #eef1f4; --viz-base: #cfd5dc; --viz-heat-0: #f1f4f7;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111316;
  --text: #e8ebee;
  --muted: #9aa3ad;
  --faint: #6f7883;
  --surface: #1a1d21;
  --surface-2: #1f2328;
  --surface-3: #272c32;
  --border: #2b3036;
  --border-strong: #3b424a;
  --link: #93c5fd;
  --success: #5fcf95; --success-bg: rgba(59,178,115,.18);
  --warning: #f6ae2d; --warning-bg: rgba(246,174,45,.15); --warning-ink: #f6c063;
  --warning-mark: #f6ae2d;
  --error: #ff7b66;   --error-bg: rgba(233,79,55,.17);
  --info: #6bbbe0;    --info-bg: rgba(46,134,171,.22);
  --neutral: #a0aab5; --neutral-bg: rgba(160,170,181,.13);
  --success-ink: var(--success); --info-ink: var(--info); --neutral-ink: var(--neutral);
  --row-hover: #20252b;
  --group-row: #1f2429;
  --shadow: 0 1px 2px rgba(0,0,0,.35);
  --bar-bg: #1a1d21;
  --search-bg: #23272c;
  --btn-line: #363c43;
  --tag-bg: rgba(59,130,246,.18); --tag-ink: #93c5fd;
  --seg-on: #343a42;
  --tone-red: #f2735f; --tone-amber: #f6b443; --tone-green: #4cc485; --tone-blue: #4fa9cf; --tone-plum: #d06aa3; --tone-slate: #94a0ad;
  --checker-a: #2b3036; --checker-b: #464d55;
  --picture-bg: #e4e6e9;
  --purple: #c4b5fd; --purple-bg: rgba(167,139,250,.16);
  --teal: #5eead4;   --teal-bg: rgba(45,212,191,.14);
  --pink: #f9a8d4;   --pink-bg: rgba(244,114,182,.15);
  --indigo: #a5b4fc; --indigo-bg: rgba(129,140,248,.16);
  --sec-filaments: #63c095; --sec-hardware: #7ea8f2; --sec-brands: #e3a660; --sec-dashboard: #b4a3ec; --sec-other: #a7b0bd; --sec-admin: #ee8d8d;
  /* the same four hues stepped for the dark card (each 3:1 or more on it) */
  --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500;
  --viz-muted: #6f7883; --viz-spark: #6f7883; --viz-rule: #262b31; --viz-base: #3b424a; --viz-heat-0: #23282e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; background: var(--bg); color: var(--text); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
[hidden] { display: none !important; }

/* The body look shared with 3D Print It: white cards, Space Grotesk titles, pills and rings, the filament strip's
   colours as small marks by meaning. Both apps carry this block unchanged. */
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; }

/* notices in the page */
.flash { display: flex; gap: .6rem; align-items: center; margin-bottom: 12px; padding: 10px 14px; border-radius: var(--radius-sm); }
.flash.success { background: var(--success-bg); color: var(--success); }
.flash.error { background: var(--error-bg); color: var(--error); }
.flash.info { background: var(--info-bg); color: var(--info); }

/* tones: an icon's meaning colour; on a count card or a panel title it also colours the mark */
.c-blue { color: var(--tone-blue); } .c-green { color: var(--tone-green); } .c-amber { color: var(--tone-amber); }
.c-violet { color: var(--tone-plum); } .c-rose { color: var(--tone-red); } .c-teal { color: var(--tone-blue); }
.c-slate { color: var(--tone-slate); }

/* count cards: the label first, the number under it in Space Grotesk, the icon in a tinted ring at the right, and a
   3 px edge of the card's tone along its foot, like the strip under the header */
.tiles { display: flex; flex-wrap: wrap; gap: 12px; padding: 2px 0 16px; }
.tile { --tone: var(--tone-slate); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-width: 168px; padding: 12px 14px 14px 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow); font: inherit; text-align: left; }
.tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tone); opacity: .85; }
.tile:has(> .c-blue), .tile:has(> .c-teal) { --tone: var(--tone-blue); }
.tile:has(> .c-green) { --tone: var(--tone-green); }
.tile:has(> .c-amber) { --tone: var(--tone-amber); }
.tile:has(> .c-violet) { --tone: var(--tone-plum); }
.tile:has(> .c-rose) { --tone: var(--tone-red); }
.tile > i, .tile > .hw-icon { grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--tone) 13%, transparent); color: var(--tone); font-size: .88rem; }
.tile > :not(i):not(.hw-icon) { grid-column: 1; grid-row: 1; display: flex; flex-direction: column-reverse; gap: 1px; min-width: 0; }
.tile .num { font-family: var(--head); font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile .lbl { font-size: .84rem; font-weight: 500; color: var(--muted); }
a.tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--tone) 50%, var(--border)); }

/* panels: the title in Space Grotesk on the panel's own surface above a hairline, its icon in a tinted ring */
.panel { margin-bottom: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { --tone: var(--tone-blue); display: flex; align-items: center; gap: .65rem; min-height: 54px; padding: 11px 16px; border-bottom: 1px solid var(--border); font-family: var(--head); font-size: 1.02rem; font-weight: 700; letter-spacing: -.005em; text-align: left; }
.panel-head > i:first-child, .panel-head > .hw-icon:first-child { flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: color-mix(in srgb, var(--tone) 13%, transparent); color: var(--tone); font-size: .8rem; }
.panel-head :is(.btn, .count, .seg, .badge, .small, .muted, input, select, label, .field) { font-family: var(--font); letter-spacing: 0; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: inherit; }
.panel-head .spacer { flex: 1; }
.panel-head .count { padding: 1px 9px; border-radius: 999px; background: var(--search-bg); color: var(--muted); font-size: .76rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.panel-body { padding: 16px; }
.panel-body.flush { padding: 0; }
.page-title { margin: 4px 0 4px; font-family: var(--head); font-size: 1.6rem; font-weight: 700; letter-spacing: -.015em; }
.page-sub { margin: 0 0 14px; color: var(--muted); max-width: 900px; }

/* filter bars: fields from the left, small sentence-case labels, filled fields like the header's search */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.field { position: relative; display: flex; flex-direction: column; gap: 5px; }
.field > label, .field-label { font-size: .8rem; font-weight: 500; color: var(--muted); }
/* a filled field also has a line along its foot in --faint (3:1 or more on a card), so a field without a hint is
   still found by more than its fill */
input:not([type]), input[type=text], input[type=search], input[type=url], input[type=number], input[type=password], input[type=email], select, textarea {
  min-height: 38px; padding: 7px 12px; border: 1px solid transparent; border-bottom-color: var(--faint); border-radius: 10px; background: var(--search-bg); color: var(--text); font: inherit; font-size: .9rem; }
textarea { min-height: 80px; resize: vertical; width: 100%; }
::placeholder { color: var(--muted); opacity: 1; }
/* focus: a typed field turns white with a blue border and halo, and keeps a transparent outline that forced colours
   paint as a ring; a tick box or a dot (which draws no border or fill of ours) gets a ring of its own */
input:where(:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file])):focus, select:focus, textarea:focus { outline: 2px solid transparent; outline-offset: -1px; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--tag-bg); }
input:is([type=checkbox], [type=radio]):focus-visible { outline: 2px solid var(--tag-ink); outline-offset: 1px; }

/* buttons: pills in the header's ring, the main action filled; icon buttons are rings */
.btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: 0 16px; border: 1px solid var(--btn-line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--search-bg); text-decoration: none; }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-contrast); }
.btn.primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.btn.success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 45%, var(--btn-line)); color: var(--success); }
.btn.success:hover { border-color: var(--success); }
.btn.danger { color: var(--error); border-color: color-mix(in srgb, var(--error) 45%, var(--btn-line)); }
.btn.danger:hover { background: var(--error-bg); }
.btn.sm { min-height: 30px; padding: 0 12px; font-size: .8rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--btn-line); border-radius: 50%; background: transparent; color: var(--text); font-size: .9rem; cursor: pointer; }
.icon-btn:hover { background: var(--search-bg); text-decoration: none; }
.icon-btn .fa-sun { color: var(--warning-mark); }

/* the segmented switch: a pill track in the field fill; the chosen part a raised pill (white in light, lighter than
   the track in dark) in ink with a muted ring (3:1 or more on the track), never a colour */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--search-bg); }
.seg a, .seg button { display: inline-flex; align-items: center; gap: .4rem; padding: 5px 13px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 500; cursor: pointer; }
.seg a:hover, .seg button:hover { color: var(--text); text-decoration: none; }
.seg a.on, .seg button[aria-pressed=true] { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(22,30,42,.12), 0 0 0 1px var(--muted); }
@media (forced-colors: active) { .seg a.on, .seg button[aria-pressed=true] { outline: 2px solid; outline-offset: -2px; } }

/* tables: sentence-case headers on the table's own surface, a firmer line under them; numbers in even-width figures */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border-strong); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; white-space: nowrap; }
table.data th a { color: inherit; }
table.data th a i { margin-left: .3rem; opacity: .45; }
table.data th a.sorted { color: var(--text); }
table.data th a.sorted i { opacity: 1; color: var(--tag-ink); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.data tr:last-child > td { border-bottom: 0; }
table.data tr.row-link { cursor: pointer; }
table.data tr.row-link:hover td { background: var(--row-hover); }
table.data tr.group td { padding: 8px 12px; background: var(--group-row); font-weight: 600; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--font); font-variant-numeric: tabular-nums; }
table.data .cell-link { color: inherit; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty > i { display: block; margin: 0 auto 10px; color: var(--faint); font-size: 2.4rem; }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: .88rem; font-variant-numeric: tabular-nums; }
.pager .pages { display: flex; align-items: center; gap: 6px; }
.pager .pages .icon-btn[aria-disabled=true] { opacity: .35; pointer-events: none; }

/* badges and chips */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.badge.verified { background: var(--success-bg); color: var(--success); }
.badge.community { background: var(--neutral-bg); color: var(--neutral); }
.badge.type { background: var(--info-bg); color: var(--info); }
.badge.off { background: var(--error-bg); color: var(--error); font-family: var(--font); }
.gone-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .85rem; }
.gone-line .gone-reason { color: var(--muted); }
.gone-form { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.link-rows .lr-note { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: .35rem; align-items: baseline; padding: 3px 10px; border-radius: 999px; background: var(--search-bg); font-size: .78rem; font-variant-numeric: tabular-nums; }
.chip b { font-weight: 600; }

/* swatches */
.swatch { position: relative; display: inline-block; width: 22px; height: 22px; overflow: hidden; vertical-align: middle; border: 1px solid var(--border-strong); border-radius: 50%; background-image: conic-gradient(var(--checker-a) 25%, var(--checker-b) 0 50%, var(--checker-a) 0 75%, var(--checker-b) 0); background-size: 8px 8px; }
.swatch > span { position: absolute; inset: 0; }
.swatch.lg { width: 96px; height: 96px; border-radius: 16px; }
.swatch.md { width: 36px; height: 36px; border-radius: 10px; }

/* crumbs and key/value lists: the values in the text face (codes keep .mono) */
.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: .85rem; }
.crumbs a { color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.kv > div { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div:nth-child(even) { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.form-grid .field.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select { width: 100%; }
/* End of the shared block. */

/* Three columns with the brand exactly in the middle; the search
   gives way first when the bar runs short of room, so the header never pushes the page sideways. */
#app-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "left brand right"; align-items: center; gap: 20px; min-height: 61px; padding: 0 20px; background: var(--bar-bg); }
.header-left, .header-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-left { grid-area: left; justify-self: stretch; min-width: 0; }
.header-right { grid-area: right; justify-self: end; }
.header-search { flex: 0 1 320px; min-width: 0; }
.app-brand { grid-area: brand; display: inline-flex; align-items: center; gap: 9px; line-height: 1; color: var(--text); }
.app-brand:hover { text-decoration: none; }
/* The logo: spool.js's spool, drawn to the box's size (static/js/logo.js). */
.app-brand-logo { display: inline-flex; width: 36px; height: 36px; flex-shrink: 0; }
.app-brand-logo svg { display: block; width: 100%; height: 100%; }
.app-brand-word { font-family: 'Space Grotesk', var(--font); font-size: 23px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.app-brand-tm { align-self: flex-start; margin: -2px 0 0 -6px; font-size: 11px; font-weight: 600; line-height: 1; color: var(--muted); }
.app-brand-tag { padding: 3px 7px; border-radius: 5px; background: var(--tag-bg); color: var(--tag-ink); font-size: 11px; font-weight: 600; line-height: 1.2; text-transform: lowercase; }
/* Under the bar: a thin strip of five filament colours (decoration only). */
.filament-strip { display: flex; height: 3px; }
.filament-strip span { flex: 1; }
.filament-strip span:nth-child(1) { background: var(--strip-1); }
.filament-strip span:nth-child(2) { background: var(--strip-2); }
.filament-strip span:nth-child(3) { background: var(--strip-3); }
.filament-strip span:nth-child(4) { background: var(--strip-4); }
.filament-strip span:nth-child(5) { background: var(--strip-5); }
/* The bar's buttons are round: icon buttons a 38px ring, text buttons a pill. */
#app-header .icon-btn { width: 38px; height: 38px; border-radius: 50%; border-color: var(--btn-line); background: transparent; font-size: .95rem; }
#app-header .icon-btn:hover { background: var(--search-bg); }
#app-header .btn { min-height: 38px; padding: 0 15px; border-radius: 19px; font-size: .88rem; }
#app-header .btn:not(.primary) { border-color: var(--btn-line); background: transparent; }
.header-search { position: relative; }
.header-search input[type=search] { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 0; border-radius: 10px; background: var(--search-bg); color: var(--text); font-size: 14px; }
.header-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; }
/* the header's search keeps its own focus ring (the page's fields light up instead) */
#app-header input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; background: var(--search-bg); box-shadow: none; }

/* The top menu bar (app.nav) and the footer. */
body { display: flex; flex-direction: column; min-height: 100vh; }
.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; }
/* The section colours: --tab is the colour of a tab's icon and of its panel's current page. */
.tab-filaments { --tab: var(--sec-filaments); } .tab-hardware { --tab: var(--sec-hardware); }
.tab-brands { --tab: var(--sec-brands); } .tab-home { --tab: var(--sec-dashboard); } .tab-other { --tab: var(--sec-other); }
.tab-admin-settings { --tab: var(--sec-admin); }
/* The menu bar under the header, as 3D Print It's tab bar: one pill per entry (Dashboard, then each section) with
   its icon and label, centred in the header's ground; the entry holding the page in the soft tag colours (a section's
   tab is a button that opens a panel of its pages, one at a time: static/js/app.js). The nav carries the panels'
   containing block; the row inside it is what scrolls sideways on a phone. */
.topnav { position: relative; padding: 0 20px 8px; background: var(--bar-bg); }
.topnav-tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px; margin: 0; padding: 0; list-style: none; }
.topnav-item { position: relative; display: flex; flex: none; }
.topnav-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.topnav-tab:hover { background: var(--search-bg); color: var(--text); text-decoration: none; }
.topnav-tab[aria-expanded="true"] { background: var(--search-bg); color: var(--text); }
.topnav-tab[aria-current] { background: var(--tag-bg); color: var(--tag-ink); font-weight: 600; }
.topnav-tab[aria-current][aria-expanded="true"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tag-ink) 40%, transparent); }
/* the ring is drawn inside the pill: the row's sideways scrolling on a phone clips anything outside it */
.topnav-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu-icon { flex: none; color: var(--tab); }
.topnav-tab .menu-icon { font-size: .85rem; }
.menu-name { min-width: 0; }
.menu-chevron { flex: none; font-size: .6rem; color: var(--muted); transition: transform .15s ease; }
.topnav-tab[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }
.topnav-tab .nav-count { margin-left: 0; }
/* A section's panel: a small drop-down under its tab, the pages one under another (the same pop-over as the header's
   menus). The last tabs' panels open towards the page's middle on windows too narrow to hold them. */
.topnav-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; display: flex; flex-direction: column; gap: 1px; min-width: 230px; max-width: min(340px, calc(100vw - 32px)); max-height: min(72vh, 560px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
@media (min-width: 761px) and (max-width: 1040px) { .topnav-item:nth-last-child(-n+2) > .topnav-pop { left: auto; right: 0; } }
.menu-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: .88rem; }
.menu-link:hover { background: var(--surface-3); text-decoration: none; }
.menu-link[aria-current="page"] { background: color-mix(in srgb, var(--tab) 16%, transparent); font-weight: 600; }
.menu-link:focus-visible { outline: 2px solid var(--tab); outline-offset: -2px; }
.menu-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-count { flex: none; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-link[aria-current="page"] .menu-count { color: var(--text); }  /* the muted grey is under 4.5:1 on the tint */
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--warning); color: #1a1a1a; font-size: .7rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 18px; text-align: center; }
/* Without script a tab opens nothing: every section shows with its pages under it, wrapped across the bar. */
:root:not(.js) .topnav-tabs { flex-wrap: wrap; overflow-x: visible; align-items: flex-start; justify-content: flex-start; }
:root:not(.js) .topnav-item { flex-direction: column; }
:root:not(.js) .topnav-tab { cursor: default; }
:root:not(.js) .topnav-tab:hover { background: transparent; color: var(--muted); }
:root:not(.js) .menu-chevron { display: none; }
:root:not(.js) .topnav-pop[hidden] { display: flex !important; position: static; min-width: 0; max-height: none; overflow: visible; border: 0; box-shadow: none; background: none; }
/* Navigation in progress: a thin bar along the top of the window (static/js/app.js). */
/* The bar across the top of a test copy (SITE_STAGE: DEV, SIT or UAT): amber, the same in both themes. */
.site-stage { padding: 3px 12px; background: var(--warning); color: #1a1d21; font-size: .78rem; font-weight: 600; text-align: center; }
.nav-progress { position: fixed; z-index: 100; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; pointer-events: none; }
.nav-progress span { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--accent); animation: nav-progress 1.1s ease-in-out infinite; }
@keyframes nav-progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .nav-progress span { width: 100%; animation: none; opacity: .8; } .menu-chevron { transition: none !important; } }
/* A list reloading after a filter, sort or page change: dimmed, with a "Loading" note. */
[data-loading-region] { position: relative; }
.list-loading { display: none; }
/* Dimmed only: the controls stay usable, so a navigation the visitor cancelled (Stop, Esc)
   never leaves the list locked while the state waits to clear. */
[data-loading-region][aria-busy=true] > :not(.list-loading) { opacity: .45; transition: opacity .15s; }
[data-loading-region][aria-busy=true] > .list-loading { display: flex; pointer-events: none; position: absolute; z-index: 6; top: 96px; left: 50%; transform: translateX(-50%); align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgba(0,0,0,.18); color: var(--text); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.list-loading i { color: var(--accent); }
/* A list changing in place (static/js/nav.js) without a "Loading" note of its own: dimmed
   the same way while its new page is on the way. */
[data-nav-scope][aria-busy=true]:not([data-loading-region]) > * { opacity: .45; transition: opacity .15s; }

main { flex: 1 0 auto; width: 100%; padding: 16px; max-width: 1600px; margin: 0 auto; }


.price-tag { white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-tag .was { color: var(--muted); font-weight: 400; }
.price-tag .sale { color: var(--error); font-weight: 600; }
.chip.mat { font-weight: 600; }
.chip.mat.ideal { background: var(--success-bg); color: var(--success); }

.detail-side .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-img { width: 200px; height: 150px; object-fit: contain; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid > .panel { margin-bottom: 0; }
.spec-group + .spec-group { margin-top: 14px; }
.spec-group h4 { margin: 0 0 6px; font-family: var(--head); font-size: .92rem; font-weight: 700; color: var(--text); display: flex; gap: .45rem; align-items: center; }
.big-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.big-tile { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.big-tile .lbl { font-size: .8rem; font-weight: 500; color: var(--muted); }
.big-tile .val { font-family: var(--head); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.big-tile .val small { font-size: .8rem; font-weight: 400; color: var(--muted); margin-left: 2px; }
.volume { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.volume svg { width: 190px; height: 170px; }
.volume svg .edge { stroke: var(--muted); fill: none; stroke-width: 1.2; }
.volume svg .face { fill: var(--info-bg); stroke: var(--muted); stroke-width: 1.2; }
.volume svg text { font-family: var(--font); font-size: 11px; fill: var(--text); }
/* a filament unit's drawing (app.unit_art, from 3D Print It's unit drawing): its colours are tokens of their own, light and dark */
:root {
  --ud-body: #dfe4ea; --ud-body-edge: #b9c1ca; --ud-glass: rgba(70,110,150,.07); --ud-glass-edge: rgba(60,90,120,.42);
  --ud-flange: #4a525c; --ud-flange-edge: #353b42; --ud-hub: #2c3238; --ud-reel-edge: rgba(0,0,0,.28); --ud-wind: rgba(0,0,0,.10);
  --ud-port: #f7f8fa; --ud-led-off: #b9c1ca;
}
:root[data-theme="dark"] {
  --ud-body: #2b3138; --ud-body-edge: #434b54; --ud-glass: rgba(140,180,220,.07); --ud-glass-edge: rgba(150,185,220,.38);
  --ud-flange: #59626c; --ud-flange-edge: #6b747e; --ud-hub: #1b1f23; --ud-reel-edge: rgba(0,0,0,.45); --ud-wind: rgba(0,0,0,.16);
  --ud-port: #20252a; --ud-led-off: #4a525b;
}
.unit-art { width: 100%; margin: 0 auto; }
.unit-art .ud-svg { display: block; width: 100%; height: auto; }
.ud-text { font-family: var(--font); font-weight: 600; }
.ud-title { font-family: var(--head); font-weight: 700; }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.link-row:hover { text-decoration: none; border-color: var(--accent); }
.link-row .sub { font-size: .76rem; color: var(--muted); }
.compat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.compat-card { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.compat-card:hover { text-decoration: none; border-color: var(--accent); }
.compat-card .b { font-size: .74rem; color: var(--muted); }
.compat-card .m { font-weight: 600; }
.foot-note { text-align: center; color: var(--muted); font-size: .82rem; margin: 18px 0 8px; }
.sources { font-size: .8rem; word-break: break-all; }
.sources li { margin-bottom: 4px; }
.desc { margin: 0 0 6px; max-width: 760px; }

.errors { background: var(--error-bg); color: var(--error); border-radius: 6px; padding: 10px 14px 10px 32px; margin: 0 0 14px; }
.check-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }
.check-list label { display: flex; gap: .5rem; align-items: center; padding: 3px 0; font-size: .88rem; }
.check-list .grp { font-size: .8rem; font-weight: 600; color: var(--muted); margin: 8px 0 2px; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.mat-grid .mrow { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .85rem; }
.mat-grid select { min-height: 28px; padding: 2px 6px; font-size: .8rem; }
.link-rows { display: grid; gap: 8px; }
.link-rows .lr { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .5fr) minmax(0, 2.3fr) minmax(0, .8fr) minmax(0, .5fr) minmax(0, .7fr) minmax(0, .7fr) 3.4rem; gap: 8px; }
.link-rows.with-editions .lr { grid-template-columns: minmax(0, 1.2fr) minmax(0, .5fr) minmax(0, 2.3fr) minmax(0, .8fr) minmax(0, .5fr) minmax(0, .7fr) minmax(0, .7fr) minmax(0, 1.1fr) 3.4rem; }
.link-rows .lr input, .link-rows .lr select { width: 100%; min-width: 0; }
.link-rows .lr input[type=checkbox] { width: auto; margin: 0; }
.link-rows .lr-check { justify-content: center; align-items: center; }
.edition-warning { margin: 0 0 12px; padding: 10px 14px 10px 32px; border: 1px solid var(--warning); border-radius: 6px; background: var(--warning-bg); color: var(--text); font-size: .86rem; }
.link-rows .lr-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.link-rows .lr-cap { display: none; font-size: .76rem; font-weight: 500; color: var(--muted); }
.link-rows .lr-head span { font-size: .8rem; font-weight: 500; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.type-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.type-pick a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-weight: 600; }
.type-pick a i { font-size: 2rem; color: var(--accent); }
.type-pick a:hover { border-color: var(--accent); text-decoration: none; }

.hero { padding: 26px 16px 14px; text-align: center; }
.hero h1 { margin: 0 0 6px; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.hero p { margin: 0 auto 16px; max-width: 720px; color: var(--muted); }
.hero form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero input { width: min(520px, 100%); }
/* a field on the page's ground (not on a card) is white with the ring, so it never fades into the ground */
.hero input:not(:focus) { background: var(--surface); border-color: var(--btn-line); border-bottom-color: var(--faint); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.cat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.cat:hover { text-decoration: none; border-color: var(--accent); }
.cat i, .cat .hw-icon { flex: none; box-sizing: border-box; width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: var(--tag-bg); color: var(--tag-ink); font-size: 1.05rem; line-height: 22px; text-align: center; }
.cat .t { font-family: var(--head); font-weight: 700; }
.cat .n { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }

footer.site { margin-top: 8px; padding: 22px 16px 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
footer.site a { color: var(--muted); text-decoration: underline; }
footer.site a:hover { color: var(--text); }
/* The footer is one line, the copyright and About. */
.foot-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; max-width: 1568px; margin: 0 auto; }
.foot-version { font-size: .85em; opacity: .75; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
/* Empty states. */
.empty-title { margin: 0 0 4px; font-family: var(--head); font-size: 1.05rem; font-weight: 700; color: var(--text); }
.empty p { margin: 0 auto; max-width: 560px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.unknown { cursor: help; }

@media (max-width: 760px) {
  /* Phones: two rows, the brand on the left with the round buttons on the right, then the
     full-width search; the menu bar follows (below). */
  #app-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand right" "left left"; gap: 10px 8px; padding: 10px 14px 12px; }
  .app-brand { justify-self: start; gap: 8px; min-width: 0; }
  .header-right { gap: 8px; }
  .header-search { flex: 1 1 auto; }
  .header-search, .header-search input[type=search] { width: 100%; }
  .app-brand-word { font-size: 20px; }
  .app-brand-logo { width: 30px; height: 30px; }
  #app-header .btn { width: 38px; min-height: 38px; padding: 0; justify-content: center; border-radius: 50%; }
  .hide-sm { display: none !important; }
  .detail-img { width: 100%; height: 180px; }
  .link-rows .lr, .link-rows.with-editions .lr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
  .link-rows .lr-cell.wide { grid-column: 1 / -1; }
  .link-rows .lr-check { flex-direction: row-reverse; justify-content: flex-end; gap: 8px; }
  .link-rows .lr-cap { display: block; }
  .link-rows .lr-head { display: none; }
  .tile { flex: 1 1 140px; min-width: 0; }
/* Phones: every tab is in view. The tabs wrap onto a second row rather than scroll sideways (a hidden sideways
     scroll tells nobody the other tabs are there), each keeping its icon and label; a section's panel opens the
     full width of the page under the bar. The tabs stay put (static) so the panel is placed by the bar. */
  .topnav { padding: 0 0 8px; }
  .topnav-tabs { flex-wrap: wrap; justify-content: center; overflow-x: visible; row-gap: 4px; padding: 0 10px; }
  .topnav-item { position: static; }
  .topnav-tab { height: 36px; padding: 0 11px; border-radius: 18px; }
  .topnav-pop { top: 100%; left: 0; right: 0; min-width: 0; max-width: none; border-width: 1px 0; border-radius: 0; }
  .menu-link { padding: 11px 14px; }
  .header-right .hide-xs { display: none; }  /* the admin menu needs the room; adding is in the menu's sections */
}

/* filament detail: spec cards with per-value source tags */
/* The tiles stack in up to three columns, each tile under the one above it, so a short tile leaves no gap beside a
   tall one. */
.spec-cards { columns: 3 340px; column-gap: 16px; }
.spec-cards .panel { margin: 0 0 16px; break-inside: avoid; }
.src { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: .68rem; font-weight: 600;
       color: var(--muted); background: var(--search-bg); border: 1px solid transparent; vertical-align: 1px; }
.is-default { color: var(--muted); font-style: italic; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 24px; }
.field > label.check { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 400; color: var(--text); }

/* page tabs (filament detail) */
.ptabs { display: flex; gap: 0 14px; margin: 0 0 16px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.ptabs [role=tab] { display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px; padding: 10px 6px 9px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
/* the 14px between tabs is the row's gap (not a margin), so a wrapped second line starts flush at the left */
@media (min-width: 761px) { .ptabs { flex-wrap: wrap; overflow-x: visible; } }  /* a long row wraps, never hides a tab */
.ptabs [role=tab]:hover { color: var(--text); }
.ptabs [role=tab][aria-selected=true] { color: var(--text); font-weight: 600; border-bottom-color: var(--tag-ink); }
.ptabs [role=tab] .count { font-size: .72rem; padding: 0 7px; border-radius: 999px; background: var(--search-bg); color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.tab-panel { margin-bottom: 16px; }

/* filament list: chip rows, brand picker, multi-column sort, discontinued */
.form-grid label.check input { width: auto; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip-row-label { font-size: .8rem; font-weight: 500; color: var(--muted); margin-right: 2px; display: inline-flex; gap: .35rem; align-items: center; }
.chip-row-label .fa-star { color: var(--warning); }
/* Landing pages: links to the next level down (a brand's materials, a line's types). */
.landing-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; max-width: 900px; }
.landing-links .chip .muted { font-weight: 400; }
a.chip.filter { color: var(--text); border: 1px solid var(--btn-line); background: transparent; }
a.chip.filter:hover { text-decoration: none; background: var(--search-bg); }
a.chip.filter.on { background: var(--tag-bg); border-color: transparent; color: var(--tag-ink); font-weight: 600; }
.toggle { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; font-size: .86rem; color: var(--text); }
.toggle:hover { text-decoration: none; }
.toggle i { font-size: 1.25rem; color: var(--faint); }
.toggle.on i { color: var(--accent); }
.sort-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px 0; font-size: .85rem; }
.sort-summary .chip b { color: var(--tag-ink); font-variant-numeric: tabular-nums; }
table.data th .sort-pos { display: inline-flex; align-items: center; justify-content: center; min-width: 15px; height: 15px; margin-left: .3rem; padding: 0 3px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-ink); font-size: .66rem; font-variant-numeric: tabular-nums; }
.disc-icon { color: var(--error); margin-left: 2px; }
/* A colour discontinued on its own, among its line's swatches: a red strike across it. */
.disc-swatch .swatch::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 2px; margin-top: -1px; background: var(--error); box-shadow: 0 0 0 1px var(--surface); transform: rotate(-45deg); }
.badge.discontinued { background: var(--error-bg); color: var(--error); }
[data-star-brand][aria-pressed=true] i, .brand-opt .star[aria-pressed=true] i { color: var(--warning-mark); }

.brand-pick-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 200px; max-width: 100%; min-height: 38px; padding: 7px 12px; font: inherit; font-size: .9rem; text-align: left;
  color: var(--text); background: var(--search-bg); border: 1px solid transparent; border-bottom-color: var(--faint); border-radius: 10px; cursor: pointer; }
.brand-pick-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-pick-btn i { font-size: .7rem; color: var(--muted); }
.brand-pick-btn:focus { outline: 2px solid transparent; outline-offset: -1px; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--tag-bg); }
.brand-pop { position: fixed; z-index: 50; width: min(320px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.brand-pop input[type=search] { margin: 8px; }
.brand-pop ul { list-style: none; margin: 0; padding: 0 0 6px; max-height: min(340px, 50vh); overflow-y: auto; }
.brand-pop .grp { padding: 8px 12px 2px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.brand-opt { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; cursor: pointer; font-size: .9rem; }
.brand-opt .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-opt .n { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.brand-opt.active, .brand-opt:hover { background: var(--row-hover); }
.brand-opt[aria-selected=true] .name { font-weight: 600; color: var(--tag-ink); }
.brand-opt .star { width: 28px; height: 28px; border: none; background: none; color: var(--faint); cursor: pointer; border-radius: 6px; font-size: .85rem; }
.brand-opt .star:hover { background: var(--surface-3); }
.combo-pop .brand-opt { padding-left: 12px; }  /* no star column: names line up with the headings */
.brand-pop .none { padding: 10px 12px; color: var(--muted); font-size: .85rem; }

.view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.view-bar form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.view-bar form label { font-size: .8rem; font-weight: 500; color: var(--muted); }
.view-bar select { min-height: 32px; padding: 4px 8px; font-size: .85rem; max-width: 260px; }
.view-bar .tt-chooser-btn { margin-left: auto; }

/* HEX, RGB or CMYK: <html data-colorfmt="rgb"> or "cmyk" (set before first paint from this browser's choice). */
.fmt-rgb, .fmt-cmyk { display: none; }
:root[data-colorfmt="rgb"] .fmt-rgb, :root[data-colorfmt="cmyk"] .fmt-cmyk { display: inline; }
:root[data-colorfmt] .fmt-hex { display: none; }
.color-value { font-size: .8rem; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.swatch-set { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; margin-right: 8px; }
.swatch-more { font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); padding: 1px 6px; border-radius: 999px; background: var(--search-bg); }
.swatch.sm { width: 16px; height: 16px; }
.measured { display: inline-flex; align-items: center; gap: 6px; }
.measured-text { display: inline-block; max-width: 18em; font-size: .8rem; white-space: normal; overflow-wrap: anywhere; }
table.data .filter-link { color: inherit; }
table.data .filter-link:hover { color: var(--link); }
a.chip.filter-chip { color: var(--text); border: 1px solid transparent; }
a.chip.filter-chip:hover { text-decoration: none; border-color: var(--accent); }
table.data td a[target=_blank] i { font-size: .7em; opacity: .6; }

/* Group header rows, indented by level. */
table.data tr.group td { font-size: .88rem; }
table.data tr.group.lvl-1 td { padding-left: 30px; background: var(--surface-2); }
table.data tr.group.lvl-2 td { padding-left: 48px; background: var(--surface-2); font-weight: 500; }
tr.group i { color: var(--muted); margin-right: 4px; font-size: .85em; }
tr.group a { color: inherit; }
.group-count { margin-left: 8px; font-size: .78rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.group-cont { margin-left: 8px; font-size: .74rem; font-weight: 400; font-style: italic; color: var(--muted); }

/* Column chooser popover (static/js/table-tools.js). */
.tt-pop { position: fixed; z-index: 50; width: min(280px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.tt-pop-head { padding: 10px 12px 6px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.tt-pop ul { list-style: none; margin: 0; padding: 0 4px 6px; max-height: min(360px, 55vh); overflow-y: auto; }
.tt-pop li label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; font-size: .88rem; cursor: pointer; }
.tt-pop li label:hover { background: var(--row-hover); }
.tt-pop-foot { display: flex; gap: 8px; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--border); }

table.data[data-table-tools] td[data-col=name], table.data[data-table-tools] td[data-col=combined] { min-width: 170px; }
table.data[data-table-tools] td[data-col=type] { min-width: 90px; }

/* The list standard (templates/_list.html). Wide windows: the toolbar's fields in one centred row (the search
   first), its chip rows under them, the view bar, the table. Under 900px (where the menu starts hidden): the
   search beside a "Filters" button over the folded filters, the view bar's menus side by
   side, and every row its compact two-line form (its phone cell, .lst-ph). */
.lst-search, .lst-more { display: contents; }
.lst-search input[type=search] { min-width: 240px; }
.lst-fold { display: none; }
.lst-on { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-ink); font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lst-actions { display: flex; gap: 10px; }
.lst-chips { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.lst-toolbar select { max-width: 230px; }
table.lst-table td.lst-ph { display: none; }
.lst-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lst-lead { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; color: var(--muted); font-size: 1.05rem; }
.lst-lead .hw-icon { width: 1.3em; height: 1.3em; }
.lst-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lst-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
a.lst-title:hover { color: var(--link); }
.lst-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lst-sub { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.lst-val { flex: none; margin-left: auto; font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lst-end { flex: none; display: flex; align-items: center; gap: 8px; }
.lst-end .btn.sm { min-height: 26px; padding: 3px 8px; font-size: .74rem; }
.lst-dot { display: inline-flex; width: 24px; height: 24px; overflow: hidden; border-radius: 50%; border: 1px solid var(--border-strong); background-image: conic-gradient(var(--checker-a) 25%, var(--checker-b) 0 50%, var(--checker-a) 0 75%, var(--checker-b) 0); background-size: 8px 8px; }
.lst-dot > span { flex: 1; }
.lst-dot.translucent > span { opacity: .65; }
@media (max-width: 899px) {
  .lst-toolbar { display: block; padding: 10px 12px; }
  .lst-search { display: flex; align-items: center; gap: 8px; }
  .lst-search .field { flex: 1 1 auto; min-width: 0; }
  .lst-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lst-search input[type=search] { width: 100%; min-width: 0; }
  :root.js .lst-fold { display: inline-flex; }
  .lst-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
  :root.js .lst-toolbar:not(.lst-open) .lst-more { display: none; }
  .lst-more > .field { min-width: 0; }
  .lst-more .field select, .lst-more .field input, .lst-more .brand-pick-btn { width: 100%; min-width: 0; max-width: none; }
  .lst-actions, .lst-chips { grid-column: 1 / -1; }
  .lst-actions .btn { flex: 1 1 0; justify-content: center; }
  .lst-view { gap: 8px 10px; padding: 8px 12px; }
  .lst-view form { flex: 1 1 150px; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; }
  .lst-view select { width: 100%; max-width: none; }
  .lst-view > :not(form) { flex: 1 1 100%; }
  .lst-wide-only { display: none !important; }
  .lst-extra span { display: none; }
  table.lst-table thead { display: none; }
  table.lst-table, table.lst-table > tbody, table.lst-table > caption { display: block; }
  table.lst-table > tbody > tr { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border); }
  table.lst-table > tbody > tr > td { border-bottom: 0; }
  table.lst-table > tbody > tr > td[data-col] { display: none; }
  table.lst-table > tbody > tr > td:not([data-col]) { flex: 1 1 100%; }
  table.lst-table > tbody > tr > td.lst-ph { display: block; flex: 1 1 0; min-width: 0; padding: 9px 14px; }
  table.lst-table > tbody > tr > td.lst-keep { display: block; order: 1; flex: 0 0 auto; width: auto; padding: 6px 14px 6px 0; }
  table.lst-table > tbody > tr > td.lst-keep.lst-wide { flex: 1 1 100%; min-width: 0; padding: 0 14px 10px 50px; }
  table.lst-table tr.group > td { padding: 7px 14px; }
  table.lst-table tr.group.lvl-1 > td { padding-left: 26px; }
  table.lst-table tr.group.lvl-2 > td { padding-left: 38px; }
}

.sibling-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.sibling-bar .field { min-width: 0; }
.sibling-bar .combo-btn { min-width: 190px; }
.sibling-bar select { min-width: 190px; }
.sibling-hint { flex: 1 1 260px; margin: 0; align-self: center; font-size: .8rem; color: var(--muted); }
/* a colour's spool (app.filters.color_spool, app.spool_art): drawn once for each theme, the page's theme shows its own */
.spool-art { display: block; flex-shrink: 0; }
.spool-art.lg { width: 96px; height: 96px; }
.spool-art.md { width: 36px; height: 36px; }
.spool-art > span { display: block; width: 100%; height: 100%; }
.spool-art svg { display: block; width: 100%; height: 100%; }
.spool-art > .sa-dark, :root[data-theme="dark"] .spool-art > .sa-light { display: none; }
:root[data-theme="dark"] .spool-art > .sa-dark { display: block; }
/* a colour with under 3:1 against a white card (app.filters.faint_on_white): a ring round the whole spool that is seen, light theme only (the dark theme's drawing is the one shown there) */
.spool-art.faint > .sa-light svg { filter: drop-shadow(0 0 .7px var(--faint)) drop-shadow(0 0 .7px var(--faint)) drop-shadow(0 0 .7px var(--faint)); }
.icon-btn.copy-sm { width: 22px; height: 22px; font-size: .7rem; vertical-align: middle; }
.seg.seg-sm button { padding: 3px 9px; font-size: .72rem; }
.panel-head .seg { font-weight: 400; }
.shop-group { margin-top: 14px; }
.shop-group h4 .count { margin-left: auto; font-size: .76rem; font-variant-numeric: tabular-nums; }
.shop-name { min-width: 0; overflow-wrap: anywhere; }
.dup-box { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--warning); border-radius: var(--radius); background: var(--warning-bg); }
.dup-head { display: flex; gap: .55rem; align-items: center; font-weight: 600; }
.dup-head i { color: var(--warning); }
.dup-list { margin: 8px 0; padding-left: 22px; }
.dup-list li { margin: 3px 0; overflow-wrap: anywhere; }
.dup-box p { margin: 0 0 8px; }
.dup-confirm { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.color-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px 14px; }
.color-slot { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.color-slot > label { font-size: .78rem; color: var(--muted); }
.color-slot-inputs { display: flex; gap: 6px; }
.color-slot-inputs input:not(.color-pick) { flex: 1; min-width: 0; width: auto; }
.form-grid .color-slot-inputs input.color-pick, input.color-pick { flex: 0 0 42px; width: 42px; min-height: 36px; height: 36px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); cursor: pointer; }
input.color-pick.empty { opacity: .45; }
.form-note { margin: 0 0 12px; font-size: .84rem; color: var(--muted); max-width: 820px; }
.plink-rows { display: grid; gap: 8px; }
.plink-head, .plink-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 1.4fr); gap: 8px; align-items: center; }
.plink-head span { font-size: .8rem; font-weight: 500; color: var(--muted); }
.plink-row select, .plink-row input { width: 100%; min-width: 0; }
.plink-retailer { display: flex; align-items: center; gap: 6px; min-width: 0; }
.plink-retailer input { flex: 1; }
.form-group-title { display: flex; gap: .5rem; align-items: center; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-family: var(--head); font-size: .95rem; font-weight: 700; color: var(--text); }
.form-group-title:first-child { margin-top: 0; }
details.fold > summary { cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .fold-icon { font-size: .75rem; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary .fold-icon { transform: rotate(180deg); }
details.fold:not([open]) > summary { border-bottom: none; }
@media (max-width: 760px) {
  .sibling-bar .field { flex: 1 1 140px; }
  .sibling-bar .combo-btn, .sibling-bar select { width: 100%; min-width: 0; }
  .plink-head { display: none; }
  .plink-row { grid-template-columns: 1fr; padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
}

/* Detail pages: the summary card (the list standard's long form of a row). The colour or images, the name,
   brand · material · type, the key specs, the price and Buy; on phones the page opens with it, before the
   switchers and the rest. */
.sum-card { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 28px; margin: 0 0 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.sum-top { flex: 1 1 380px; min-width: 0; display: flex; align-items: center; gap: 18px; }
.sum-name { min-width: 0; }
.sum-name .brand-name { font-size: 1.05rem; color: var(--muted); }
.sum-name .brand-name a { color: inherit; }
.sum-name h1 { margin: 0 0 6px; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.sum-name .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sum-name .desc { margin: 12px 0 0; }
.sum-side { flex: 0 1 430px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sum-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px 14px; margin: 0; }
.sum-name .sum-specs { margin-top: 14px; }
.sum-specs > div { min-width: 0; }
.sum-specs dt { font-size: .78rem; font-weight: 500; color: var(--muted); }
.sum-specs dd { margin: 0; font-size: .92rem; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sum-specs .temp-own, .sum-specs .temp-typical { white-space: normal; }
.sum-specs .sum-price, .sum-specs .sum-wide { grid-column: 1 / -1; }
/* The colour's QR code under the facts: its label's code, black on white in either theme; opens the label page. */
.sum-qr { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; color: var(--muted); text-decoration: none; }
.sum-qr .qr-mini { width: 96px; height: 96px; flex: none; border: 1px solid var(--border); border-radius: 6px; }
.sum-qr-link { overflow-wrap: anywhere; }
.sum-qr:hover .sum-qr-link { color: var(--text); text-decoration: underline; }
.sum-buy { display: flex; flex-wrap: wrap; gap: 8px; }
/* The label maker at the foot of a colour's page (templates/_label_panel.html, as on the label page). */
.label-block { margin: 24px 0 8px; scroll-margin-top: 80px; }
.label-block-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1.1rem; }
/* on the colour page the label maker is one compact card; the label page keeps the large one */
.label-block { max-width: 760px; }
.label-block .lbl-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr); gap: 12px; }
.label-block .lbl-stage, .label-block .lbl-choices { padding: 12px; }
.label-block .lbl-paper { max-width: 300px; margin-bottom: 8px; }
.label-block .lbl-actions { gap: 6px; margin-top: 8px; }
.label-block .lbl-actions .btn { min-height: 30px; padding: 0 10px; font-size: .8rem; }
.label-block .lbl-set { margin-bottom: 10px; }
.label-block .lbl-chip span, .label-block .lbl-seg span { padding: 3px 9px; font-size: .78rem; }
.label-block .lbl-pick { gap: 8px; padding: 3px 6px; font-size: .82rem; }
.label-block .lbl-text { margin-bottom: 10px; font-size: .82rem; }
.label-block .lbl-help { font-size: .8rem; }
@media (max-width: 899px) { .label-block .lbl-grid { grid-template-columns: 1fr; } }
.sum-name .sum-buy { margin-top: 12px; }
.sum-buy .count { margin-left: 2px; font-size: .78rem; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--muted); }
.sum-card .amazon-disclosure { margin: 0; }
.sum-name .amazon-disclosure { margin-top: 8px; }
@media (max-width: 899px) {
  .sum-card { padding: 14px; gap: 14px; }
  .sum-top { flex-basis: 100%; align-items: flex-start; gap: 14px; }
  .sum-top .spool-art.lg { width: 72px; height: 72px; }
  .sum-name h1 { font-size: 1.45rem; }
  .sum-side { flex-basis: 100%; }
  .sum-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sum-buy .btn { flex: 1 1 auto; justify-content: center; }
  .sum-card .detail-side { width: 100%; align-items: stretch; }
  .sum-card .carousel { width: 100%; }
}

.type-fixed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 36px; }
.detail-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; min-width: 0; }
.carousel { width: 320px; max-width: 100%; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.carousel-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.carousel.ready .carousel-track { scrollbar-width: none; }
.carousel.ready .carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; margin: 0; height: 220px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
.carousel-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.carousel-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.carousel-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.carousel-thumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; padding: 2px; }
.carousel-thumb { flex: 0 0 52px; height: 42px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; }
.carousel-thumb:hover { border-color: var(--border-strong); }
.carousel-thumb[aria-current=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.carousel-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (prefers-reduced-motion: no-preference) { .carousel-track { scroll-behavior: smooth; } }
.offer-note { margin: -4px 0 8px; }
.editions { display: flex; flex-direction: column; gap: 12px; }
.edition { padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.edition:last-child { border-bottom: none; padding-bottom: 0; }
.edition-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 6px; font-size: .9rem; }
.edition-name { font-weight: 600; }
.edition .link-list { margin-top: 4px; }
@media (max-width: 760px) {
  .detail-side { width: 100%; align-items: stretch; }
  .carousel { width: 100%; }
  .carousel-slide { height: 240px; }
}
/* An imported picture (app.pictures, the OrcaSlicer printer pictures) with its credit line
   under it; shown only on items with no image of people's. */
.hw-picture { width: 220px; max-width: 100%; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.hw-picture img { display: block; width: 100%; height: 200px; padding: 10px; object-fit: contain; background: var(--picture-bg); border: 1px solid var(--border); border-radius: var(--radius); }
@media (max-width: 899px) { .sum-card .hw-picture { width: 100%; } }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.section-title { margin: 0 0 10px; font-family: var(--head); font-size: 1.05rem; font-weight: 700; letter-spacing: -.005em; color: var(--text); }
.stat-section { margin-bottom: 4px; }
.stat-tiles .tile { flex: 1 1 220px; min-width: 0; }
.tile-text { min-width: 0; }
.tile .num.txt { font-family: var(--font); font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-tabs { display: flex; gap: 18px; margin: 0 0 14px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.page-tabs a { display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px; padding: 9px 2px 8px; border-bottom: 3px solid transparent; color: var(--muted); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.page-tabs a:hover { color: var(--text); text-decoration: none; }
.page-tabs a[aria-current=page] { color: var(--text); font-weight: 600; border-bottom-color: var(--tag-ink); }
.star-btn { width: 26px; height: 26px; margin: -4px 4px -4px -6px; border: none; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; font-size: .85rem; vertical-align: middle; }
.star-btn:hover { background: var(--surface-3); }
.star-btn[aria-pressed=true] i { color: var(--warning-mark); }
.lst-chips button.toggle { border: none; background: none; padding: 0; font: inherit; font-size: .86rem; color: var(--text); cursor: pointer; }
table.brand-table td[data-col=name] { min-width: 150px; }
table.defaults-table td .src { margin-left: 5px; }
.dv .varies-icon, .dv.temp + .varies-icon { margin-left: 4px; font-size: .7em; color: var(--warning); }
table.defaults-table .dv.temp { align-items: flex-start; vertical-align: middle; }
.line-defaults { margin: 0 0 22px; }
.line-defaults-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; }
.line-defaults-head .section-title { margin: 0 4px 0 0; }
.line-defaults-head .spacer { flex: 1; }
details.howto { margin: 0 0 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
details.howto > summary { display: flex; align-items: center; gap: .55rem; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 600; font-size: .92rem; }
details.howto > summary::-webkit-details-marker { display: none; }
details.howto > summary > i:first-child { color: var(--accent); }
details.howto > summary .fold-icon { margin-left: auto; font-size: .75rem; color: var(--muted); transition: transform .15s; }
details.howto[open] > summary .fold-icon { transform: rotate(180deg); }
details.howto[open] > summary { border-bottom: 1px solid var(--border); }
.howto-body { padding: 4px 16px 6px; font-size: .88rem; }
.howto-body ul { margin: 8px 0; padding-left: 1.2rem; }
.howto-body li { margin-bottom: 6px; max-width: 900px; }
@media (max-width: 760px) {
  .stat-tiles .tile { flex: 1 1 140px; padding: 12px 14px; gap: 10px; }
  .line-defaults-head .spacer { display: none; }
}
.star-gap { display: inline-block; width: 26px; margin: 0 4px 0 -6px; vertical-align: middle; }

/* Moderation: review queue, held changes, merge tool */
.page-tabs .count { font-size: .75rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Import review */
.import-kind-note { margin: 0; }
.import-conflicts td { vertical-align: top; }
.import-conflicts td:first-child { min-width: 12em; overflow-wrap: anywhere; }
.import-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 9em; }
.import-actions form { margin: 0; }
.import-runs { margin-top: 16px; }
.import-runs .panel-head h2 { margin: 0; }
.import-report { padding: 10px 14px 12px; border-top: 1px solid var(--border); }
.import-report summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.maker-page { overflow-wrap: anywhere; }
/* Label column at least 8em (labels never break mid-word), values take the rest and wrap. */
.moderation .kv { grid-template-columns: minmax(8em, max-content) minmax(0, 1fr); column-gap: 12px; }
.moderation .kv > div:nth-child(even) { min-width: 0; overflow-wrap: anywhere; }
.moderation .break { overflow-wrap: anywhere; }
.merge-swap { display: flex; justify-content: flex-end; margin: 12px 0 16px; }
.merge-sides { margin-bottom: 0; }
.merge-side .panel-body a { font-weight: 600; overflow-wrap: anywhere; }
.merge-side.keep .panel-head i { color: var(--success); }
.merge-side.drop .panel-head i { color: var(--warning); }
table.merge-table td { vertical-align: top; }
table.merge-table td.merge-field { width: 26%; font-weight: 500; }
.merge-opt label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.merge-opt input { flex: none; margin-top: 3px; }
.merge-opt.chosen { font-weight: 500; }
.merge-val { min-width: 0; overflow-wrap: anywhere; }
.merge-side-label { display: none; }
details.merge-same { padding: 10px 16px; border-top: 1px solid var(--border); }
details.merge-same summary { cursor: pointer; font-size: .88rem; }
details.merge-same p { margin: 8px 0 0; }
.merge-info { margin: 0; }
.merge-info dt { font-size: .85rem; font-weight: 600; }
.merge-info dd { margin: 2px 0 10px; font-size: .88rem; color: var(--muted); }
.merge-blockers { margin: 0; padding-left: 1.2rem; }
.merge-blockers li { margin-bottom: 6px; }
.badge.curated { background: var(--warning-bg); color: var(--warning-ink); }
.field-warning { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 12px; border: 1px solid var(--warning); border-radius: 6px; background: var(--warning-bg); color: var(--text); font-size: .84rem; }
.field-warning i { color: var(--warning); margin-top: 3px; }
/* Admin menu in the header (admins only). */
.admin-menu { position: relative; }
.admin-menu > summary { position: relative; list-style: none; }
.admin-menu > summary::-webkit-details-marker { display: none; }
.admin-menu[open] > summary:not(.primary) { background: var(--border); }
.admin-menu[open] > summary.primary { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
.admin-menu-dot { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warning); color: #1a1a1a; font-size: .68rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 18px; text-align: center; }
.admin-menu-pop { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; width: min(260px, calc(100vw - 32px)); padding: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.admin-menu-head { padding: 8px 10px 4px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.admin-menu-pop a, .admin-menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: none; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.admin-menu-pop a:hover, .admin-menu-pop button:hover { background: var(--row-hover); text-decoration: none; }
.admin-menu-pop i { width: 16px; text-align: center; color: var(--muted); }
.admin-menu-pop .count { margin-left: auto; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-menu-pop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--border); }
@media (max-width: 760px) {
  table.merge-table thead { display: none; }
  table.merge-table tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
  table.merge-table td { border-bottom: none; }
  table.merge-table td.merge-field { grid-column: 1 / -1; width: auto; padding-bottom: 0; }
  .merge-side-label { display: block; font-size: .76rem; font-weight: 500; color: var(--muted); }
}

.inline-form { display: inline; margin: 0; }

.change-version .panel-head { flex-wrap: wrap; }
.change-version-title { margin: 0; font-size: 1.02rem; font-weight: 700; }
.change-areas { padding: 10px 16px 14px; }
.change-area { margin: 10px 0 2px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.change-area:first-child { margin-top: 2px; }
.change-list { margin: 0; padding-left: 1.25rem; }
.change-item { padding: 2px 0; }
.change-item::marker { color: var(--muted); }
.change-title { overflow-wrap: anywhere; }
.change-item.highlight .change-title { font-weight: 600; }
.change-title .fa-star { color: var(--warning); }
.change-body { margin: 1px 0 4px; white-space: pre-line; overflow-wrap: anywhere; font-size: .9rem; color: var(--muted); }

/* The "New since you were last here" dialog: themed from the tokens (a <dialog> keeps the
   browser's own colours otherwise), never wider than the window less the page gutters. */
dialog.whats-new { padding: 0; width: min(540px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.28); }
dialog.whats-new::backdrop { background: rgba(0,0,0,.45); }
.wn-box { padding: 20px 20px 16px; }
.wn-head { display: flex; align-items: center; gap: .6rem; }
.wn-head > i { color: var(--accent); font-size: 1.1rem; }
.wn-head h2 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.wn-sub { margin: 6px 0 14px; color: var(--muted); }
.wn-callout { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--accent); border-left-width: 4px; border-radius: 6px; background: var(--info-bg); }
.wn-callout-title { font-weight: 600; overflow-wrap: anywhere; }
.wn-callout-body { margin-top: 4px; white-space: pre-line; overflow-wrap: anywhere; font-size: .92rem; }
.wn-also-label { margin: 0 0 4px; font-weight: 600; }
.wn-list { margin: 0 0 14px; padding-left: 1.2rem; }
.wn-list li { margin: 4px 0; overflow-wrap: anywhere; }
.wn-item-body { display: block; white-space: pre-line; color: var(--muted); font-size: .88rem; }
.wn-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.tracker-notice { display: flex; gap: 10px; align-items: flex-start; max-width: 900px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--warning); border-radius: var(--radius); background: var(--warning-bg); font-size: .9rem; }
.tracker-notice > i { margin-top: 3px; color: var(--warning); }
.tracker-notice p { margin: 0; }
/* On a phone the notice keeps its first sentence and links to the key, and each row labels its source line. */
.tracker-notice-link, .tracker-phone-label { display: none; }
@media (max-width: 760px) {
  .tracker-notice-more { display: none; }
  .tracker-notice-link { display: inline; }
}
@media (max-width: 899px) {
  .tracker-phone-label { display: block; margin-bottom: 1px; font-size: .72rem; font-weight: 600; color: var(--muted); }
  table.lst-table > tbody > tr > td.tracker-source.lst-keep.lst-wide { padding-left: 14px; font-size: .86rem; }
}
.tracker-admin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.tracker-admin .fa-user-shield { margin-right: .3rem; }
/* The key under the table: a status badge or column name, then what it means. */
.tracker-key .panel-head h2 { margin: 0; font-size: 1rem; }
.tracker-key-list { display: grid; gap: 10px; max-width: 900px; margin: 0; padding: 12px 16px 4px; }
.tracker-key-list > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 4px 16px; align-items: baseline; }
.tracker-key-list dt { font-weight: 600; font-size: .88rem; }
.tracker-key-list dd { margin: 0; font-size: .9rem; }
.tracker-key-note { margin: 0; padding: 4px 16px 14px; }
@media (max-width: 760px) { .tracker-key-list > div { grid-template-columns: minmax(0, 1fr); } }
.tracker-chips { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
/* The brand tracker's credit: a small box under the key. Not .tracker-source:
   that is the table's suspected-source column. */
.tracker-credit { display: flex; align-items: flex-start; gap: 12px; max-width: 900px; margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: .88rem; }
.tracker-credit > i { flex: none; margin-top: 3px; color: var(--muted); }
.tracker-credit p { margin: 0; }
.tracker-credit p + p { margin-top: 4px; }
.tracker-manufacturer { --tc: var(--success); --tc-bg: var(--success-bg); }
.tracker-white-label { --tc: var(--info); --tc-bg: var(--info-bg); }
.tracker-rebrand { --tc: var(--warning-ink); --tc-bg: var(--warning-bg); }
.tracker-boutique { --tc: var(--pink); --tc-bg: var(--pink-bg); }
.tracker-hybrid { --tc: var(--teal); --tc-bg: var(--teal-bg); }
.tracker-sub-brand { --tc: var(--purple); --tc-bg: var(--purple-bg); }
.tracker-private-label { --tc: var(--indigo); --tc-bg: var(--indigo-bg); }
.tracker-reseller, .tracker-other { --tc: var(--neutral); --tc-bg: var(--neutral-bg); }
.badge.tracker { background: var(--tc-bg); color: var(--tc); }
.tracker-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tc); align-self: center; }
a.chip.filter.on .tracker-dot { box-shadow: 0 0 0 1.5px var(--surface); }
table.tracker-table td { vertical-align: top; }
table.tracker-table td.tracker-brand { font-weight: 600; }
table.tracker-table td.tracker-source { min-width: 280px; white-space: pre-line; }
/* Phones: the list standard's compact rows, the suspected source on a line of its own under each. */
@media (max-width: 899px) {
  table.tracker-table td.tracker-source { min-width: 0; font-size: .82rem; color: var(--muted); }
}

/* Hardware type icons (app/icons.py, _icon_sprite.html): sized like the Font Awesome
   icons they stand beside, drawn in currentColor. */
.hw-icon { display: inline-block; flex: none; width: 1.2em; height: 1.2em; vertical-align: -.24em; fill: currentColor; overflow: visible; }
.type-pick a .hw-icon { width: 2.4rem; height: 2.4rem; color: var(--accent); }
.empty > .hw-icon { display: block; width: 3rem; height: 3rem; margin: 0 auto 10px; color: var(--faint); }
tr.group .hw-icon { margin-right: 4px; color: var(--muted); }
.badge .hw-icon { width: 1.25em; height: 1.25em; }
.chip .hw-icon { width: 1.15em; height: 1.15em; }
.page-title .title-icon { width: 1.05em; height: 1.05em; margin-right: .35em; vertical-align: -.16em; color: var(--accent); }
.ptabs .hw-icon { width: 1.15em; height: 1.15em; }

/* Value levels: how sure a value is (Typical for <material>, Community, Imported, Verified). */
.src.lvl-verified { color: var(--success); background: var(--success-bg); border-color: transparent; }
.src.lvl-imported { color: var(--info); background: var(--info-bg); border-color: transparent; }
.src.lvl-typical { font-style: italic; }

/* Temperature cells: the line's own range (recommended value in brackets) and, greyed
   apart from it, what is only typical for the material. */
.temp { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.3; }
.sum-specs .temp, .kv .temp { align-items: flex-start; }
.temp-own { white-space: nowrap; }
.temp-typical { font-size: .8em; white-space: nowrap; }
.temp-typical-label { font-size: .9em; }

/* About page */
/* With script the sections are tabs: the tab names the section, so its own heading bar goes. */
:root.js .about-section > .panel-head { display: none; }
.about-section { scroll-margin-top: 70px; }
.about-h { margin: 0; font-size: 1rem; font-weight: 600; }
.about-h3 { margin: 14px 0 6px; font-size: .9rem; font-weight: 600; }
.about-h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 10px; max-width: 900px; line-height: 1.55; }
.prose p:last-child { margin-bottom: 0; }
.about-levels { display: grid; gap: 8px; margin: 0 0 12px; }
.about-levels > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 12px; align-items: baseline; }
.about-levels dt { margin: 0; }
.about-levels dt .src { margin-left: 0; }
.about-levels dd { margin: 0; }
pre.licence { margin: 0 0 12px; padding: 12px 14px; max-width: 900px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
              font-family: var(--mono); font-size: .74rem; line-height: 1.5; color: var(--text); background: var(--surface-2);
              border: 1px solid var(--border); border-radius: 6px; }
@media (max-width: 760px) {
  .about-levels > div { grid-template-columns: minmax(0, 1fr); }
}

/* Privacy and Terms pages, and the privacy request form (the privacy package) */
.privacy-updated { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 10px; color: var(--muted); font-size: .85rem; }
.privacy-toc { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 16px; }
.privacy-toc a { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .82rem; color: var(--text); text-decoration: none; }
.privacy-toc a:hover { border-color: var(--accent); color: var(--link); }
.privacy-section { scroll-margin-top: 70px; }
.privacy-short .panel-body { padding-top: 12px; padding-bottom: 12px; }
.privacy-list { margin: 0 0 12px; padding-left: 1.2rem; max-width: 900px; line-height: 1.55; display: grid; gap: 4px; }
.privacy-list:last-child { margin-bottom: 0; }
.privacy-table { margin: 0 0 12px; font-size: .86rem; }
/* Row headers read as the row's name, not as the column headers' small capitals. */
table.data.privacy-table th[scope=row] { position: static; width: 14%; min-width: 9rem; padding: 9px 12px; background: none;
                                         text-align: left; vertical-align: top; font-size: .86rem; font-weight: 600;
                                         white-space: normal; color: var(--text); }
table.data.privacy-table td { vertical-align: top; line-height: 1.45; }
table.data.privacy-cookies th[scope=row] { width: 15.5rem; }
.privacy-cookies .privacy-names code { white-space: nowrap; overflow-wrap: normal; }
.privacy-names { display: flex; flex-wrap: wrap; gap: 3px 6px; font-weight: 400; }
.privacy-names code, .privacy-table td code, .privacy-list code { font-family: var(--mono); font-size: .8em; overflow-wrap: anywhere; }
.privacy-kinds { margin: 0; padding: 0; border: none; display: grid; gap: 8px; min-width: 0; }
.privacy-kinds legend { margin-bottom: 6px; padding: 0; font-size: .8rem; font-weight: 500; color: var(--muted); }
.privacy-kind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); cursor: pointer; }
.privacy-kind:has(input:checked) { border-color: var(--accent); background: var(--info-bg); }
.auth-form .privacy-kind input[type=radio] { width: auto; margin: 3px 0 0; flex: none; }
.privacy-kind > span { display: grid; gap: 2px; font-size: .9rem; }
@media (max-width: 760px) {
  /* The tables stack on a phone: each row a block, each cell under its own label. */
  .privacy-table thead { display: none; }
  .privacy-table, .privacy-table tbody, .privacy-table tr, .privacy-table th[scope=row], .privacy-table td { display: block; width: auto; }
  .privacy-table tr { padding: 8px 0; border-bottom: 1px solid var(--border); }
  table.data.privacy-table th[scope=row] { display: block; width: auto; padding: 2px 0; border: none; min-width: 0; }
  table.data.privacy-table td { padding: 2px 0; border: none; }
  .privacy-table td::before { content: attr(data-label) ": "; color: var(--muted); font-size: .78rem; }
}

.auth-wrap { max-width: 440px; margin: 28px auto 40px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 26px 22px; }
.auth-mark { width: 46px; height: 46px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--info-bg); color: var(--accent); font-size: 1.2rem; }
.auth-title { margin: 0 0 6px; font-size: 1.4rem; font-weight: 700; text-align: center; }
.auth-sub { margin: 0 0 16px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.auth-sub strong { color: var(--text); font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input:not([type=checkbox]), .stack input:not([type=checkbox]):not([type=hidden]), .stack select { width: 100%; }
.auth-row { display: flex; justify-content: flex-end; font-size: .84rem; margin-top: -4px; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: .82rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.auth-note { margin: 14px 0 0; font-size: .82rem; color: var(--muted); display: flex; gap: .5rem; align-items: baseline; }
.auth-note i { color: var(--info); }
.auth-note + .btn { margin-top: 14px; }
.auth-status { margin: 8px 0 0; min-height: 1.2em; font-size: .84rem; color: var(--muted); text-align: center; }
.auth-status.bad { color: var(--error); }
.auth-foot { margin: 14px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-inline { margin: -4px 0 14px; display: flex; justify-content: center; }
.auth-more { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.auth-more > summary { cursor: pointer; font-size: .86rem; color: var(--link); }
.auth-more .auth-form { margin-top: 12px; }
.auth-check { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); line-height: 1.4; }
.auth-check input { margin-top: 3px; flex: none; }
.btn.block { width: 100%; justify-content: center; }
.btn.danger:hover { background: var(--error-bg); }
.btn:disabled { opacity: .55; cursor: default; }
.help { font-size: .78rem; color: var(--muted); }
.field > label .opt { margin-left: .4rem; font-weight: 400; color: var(--muted); }
.code-input { font-size: 1.2rem !important; letter-spacing: .3em; text-align: center; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 0 16px; align-items: start; }
.account-narrow { max-width: 640px; }
.account-kv { grid-template-columns: minmax(7em, max-content) minmax(0, 1fr); column-gap: 12px; }
.account-kv > div:nth-child(even) { min-width: 0; overflow-wrap: anywhere; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.form-actions.left { justify-content: flex-start; flex-wrap: wrap; margin-bottom: 0; }
.form-actions.left form { margin: 0; }
.steps { margin: 0 0 12px; padding-left: 1.3rem; display: grid; gap: 16px; }
.steps > li { padding-left: 4px; }
.qr-box { margin: 10px 0; width: 208px; max-width: 100%; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.qr-code { display: block; width: 100%; height: auto; }
.qr-code path { fill: #000; }
.secret-box > summary { cursor: pointer; font-size: .86rem; color: var(--link); }
.secret-key { margin: 8px 0 4px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; font-size: .95rem; letter-spacing: .06em; overflow-wrap: anywhere; }
.inline-code { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.inline-code input { flex: 1 1 160px; min-width: 0; max-width: 320px; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 18px; margin: 0 0 16px; padding: 12px 12px 12px 2.2rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; font-size: .95rem; }
.token-new { border-color: var(--success); }
.token-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.token-box code { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; font-size: .88rem; }
.rename-form { display: flex; gap: 6px; align-items: center; }
.rename-form input { flex: 1 1 auto; min-width: 0; max-width: 260px; min-height: 30px; padding: 4px 8px; }
table.data td.actions { text-align: right; white-space: nowrap; width: 1%; }
table.data td.actions form { margin: 0; display: inline; }
table.data tr.dim td { opacity: .6; }
.event-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--success); vertical-align: middle; }
.event-dot.warn { background: var(--warning); }
.event-dot.bad { background: var(--error); }
/* An admin event's request and what it showed (app.admin_log), under its label: a long path
   or id wraps rather than widening the table. */
.event-request { overflow-wrap: anywhere; }
.security-now-note { margin: 0; padding: 12px 16px 0; }
.security-now caption { caption-side: top; text-align: left; padding: 14px 12px 8px; font-weight: 600; }
.danger-zone { border-color: var(--error); }
.danger-zone .panel-head { color: var(--error); }
fieldset.scopes { margin: 0; padding: 0; border: none; display: grid; gap: 8px; }
fieldset.scopes legend { margin-bottom: 6px; padding: 0; }
fieldset.scopes label.check { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: .88rem; }
fieldset.scopes label.check span { min-width: 0; overflow-wrap: anywhere; }
.account-menu-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; color: var(--text); }
/* An account's picture (app.avatars): its Gravatar, else initials on a colour taken from its id */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; border-radius: 50%; background: hsl(var(--avatar-hue, 210) 42% 34%); color: #fff; font-weight: 600; line-height: 1; vertical-align: middle; user-select: none; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 20px; height: 20px; margin-right: 6px; font-size: .58rem; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.35rem; }
.icon-btn.avatar-btn { padding: 0; overflow: hidden; }
.picture-row { display: flex; align-items: center; gap: 16px; }
.avatar-switch { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.avatar-switch button.toggle { border: none; background: none; padding: 0; font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; }
.avatar-switch button.toggle i { font-size: 1.5rem; }
.api-token-note { margin: 0 0 14px; }
@media (max-width: 760px) {
  .auth-wrap { margin-top: 12px; }
  .auth-card { padding: 20px 16px 18px; }
  .signin-btn { padding: 4px 8px; }
}

/* Where to buy, prices, store matches, Amazon */
.where-to-buy { margin: 0 0 18px; }
.where-to-buy .panel-h { margin: 0; font-size: 1rem; font-weight: 600; }
.where-to-buy .offer-note { margin: 10px 0 0; }
/* The store-links block (Where to buy): one row per store link, laid out by the panel's
   own width (a container query), so it fits at any width of the page. Narrow (a panel
   under 880 px): short lines (the store with the price, the size with the stock, the store's
   SKU on a line of its own under the size, the host and the time with the button). Wide: the
   store over the host and time, then the size over the SKU, the stock, the price and the
   button in columns of their own. */
.where-to-buy .panel-body { container: wtb / inline-size; }
.store-links { list-style: none; margin: 0; padding: 0; }
.store-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who price" "what stock" "meta go"; align-items: center; gap: 3px 10px; padding: 8px 2px; border-bottom: 1px solid var(--border); }
.store-row:last-child { border-bottom: 0; }
.store-who { grid-area: who; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.store-name { font-weight: 600; overflow-wrap: anywhere; }
.store-chip { padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: .72rem; white-space: nowrap; }
.store-chip.mine { background: var(--info-bg); color: var(--info-ink); font-weight: 600; }
.store-what { grid-area: what; min-width: 0; font-size: .86rem; }
.store-size { overflow-wrap: anywhere; }
.store-sku { display: block; color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.store-stock { grid-area: stock; justify-self: end; }
.store-price { grid-area: price; justify-self: end; max-width: 8rem; min-width: 0; text-align: right; }
.store-price .price-tag { white-space: normal; }
.store-meta { grid-area: meta; min-width: 0; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.store-go { grid-area: go; justify-self: end; white-space: nowrap; }
.store-go .btn i { margin-left: 4px; }
.store-go .btn .fa-amazon { margin: 0 4px 0 0; }
.badge.stock-badge.verified { color: var(--success-ink); }
.badge.stock-badge.community { color: var(--neutral-ink); }
.badge.stock-unknown { padding: 1px 8px; background: none; border: 1px dashed var(--border-strong); color: var(--muted); }
/* From 480 px the price has room for the struck price, the sale price and its -N% on one line. */
@container wtb (min-width: 480px) {
  .store-price { max-width: none; }
}
/* The columns from 880 px: the fixed tracks below take about 500 px, so a narrower panel would
   leave the store and the size too little room and make rows taller than the narrow layout's. */
@container wtb (min-width: 880px) {
  /* Fixed tracks for the stock, the price and the button, so the columns line up from row to row. */
  .store-row { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) 7rem 11.5rem 8.5rem; grid-template-areas: "who what stock price go" "meta what stock price go"; gap: 2px 12px; padding: 8px 10px; }
  .store-stock { justify-self: start; }
}
.amazon-disclosure { margin: 8px 0 0; }
.amazon-disclosure i { margin-right: 4px; }
.plink-extra { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.plink-extra input[name^="plink_variant_"] { flex: 0 1 260px; min-width: 0; width: auto; }
.plink-extra .check { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.plink-extra .check input { width: auto; }
.plink-extra .sub { font-size: .76rem; color: var(--muted); }
.form-hint { display: block; font-size: .76rem; color: var(--muted); margin-top: 3px; min-height: 0; }
.form-hint:empty { display: none; }
.store-actions { flex-direction: column; align-items: stretch; min-width: 14em; }
.store-actions .proposal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.store-actions .proposal .btn { white-space: normal; text-align: left; }
.store-actions .pick-color { display: flex; gap: 6px; }
.store-actions .pick-color input { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .store-actions { min-width: 0; }
}
/* Store matches: a store product with its variants listed under it. */
.sv-cell { min-width: 22em; }
.sv-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.sv-actions form, .sv-list form, .sv-bulk { margin: 0; }
.sv-bulk { padding: 0 16px 12px; }
.sv-list { list-style: none; margin: 0; padding: 0; }
.sv { padding: 8px 0; border-top: 1px solid var(--border); }
.sv:first-child { padding-top: 0; border-top: 0; }
.sv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.sv-name { font-weight: 600; }
.sv .proposal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; }
.sv .proposal .btn { white-space: normal; text-align: left; }
.sv p { margin: 4px 0 0; }
.sv-more > summary { margin-top: 4px; font-size: .8rem; color: var(--muted); cursor: pointer; }
.sv-more[open] { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sv-more .pick-color { display: flex; gap: 6px; align-self: stretch; }
.sv-more .pick-color input { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .sv-cell { min-width: 0; }
}

/* Referral links: their badge (the warning colours with an outline, never the blue of
   Maker or Your region), the note beside them in body colour, a shown code, and a list Buy
   button with its badge. */
.badge.referral-badge { background: var(--warning-bg); color: var(--warning-ink); box-shadow: inset 0 0 0 1px var(--warning); }
.buy-paid { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.referral-note { margin: 10px 0 0; padding: 7px 10px; border-left: 3px solid var(--info); border-radius: 0 6px 6px 0; background: var(--info-bg); color: var(--text); font-size: .86rem; }
.referral-note > i { margin-right: 4px; color: var(--info); }
.referral-note code { font-family: var(--mono); font-weight: 600; }
.list-referral { padding: 0 16px 10px; }
.list-referral .referral-note { margin-top: 0; }
.where-to-buy .panel-body > .referral-note { margin: 0 0 10px; }
.sizes-note { padding-bottom: 0; }
.sizes-note .referral-note { margin: 0; }
.sizes-note .referral-note + .referral-note { margin-top: 8px; }

.jobs-warning { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--error); border-radius: var(--radius); background: var(--error-bg); font-size: .9rem; }
.jobs-warning > i { margin-top: 3px; color: var(--error); }
.jobs-warning p { margin: 0; }
.jobs-table td { vertical-align: top; }
.job-title { font-weight: 600; }
.job-desc { max-width: 360px; margin-top: 4px; white-space: normal; }
.job-state > div + div, .job-last > div + div { margin-top: 4px; }
.job-msg { max-width: 360px; white-space: normal; overflow-wrap: anywhere; }
.jobs-table .job-last { min-width: 260px; }
.job-last .job-msg { margin-top: 4px; }
.job-retry { color: var(--warning-ink); }
.job-actions .inline-form, .job-actions > .btn { margin: 0 4px 4px 0; }
.jobs-filter { display: grid; gap: 8px; }
.jobs-filter p { margin: 0; }
@media (max-width: 899px) {
  /* phones: the list standard's compact rows; the actions and a run's message on lines of their own */
  table.data.jobs-table td.job-actions, table.data.jobs-history td.job-msg { white-space: normal; }
  .job-desc, .job-msg { max-width: none; }
}
.about-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 8px 24px; align-items: center; }
.about-art .maint-scene { margin: 0 auto; }
@media (max-width: 720px) { .about-top { grid-template-columns: 1fr; } .about-art .maint-scene { max-width: 260px; } }
.about-version { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 10px; color: var(--muted); font-size: .85rem; }
.amazon-search-row { margin-top: 12px; }

/* Correction reports: the form, the editors' list and the form check (ALTCHA's widget on
   the site's colours, light and dark alike, through its CSS custom properties). */
.report-wrap { max-width: 720px; }
.report-form { display: flex; flex-direction: column; gap: 14px; }
.report-form select, .report-form input[type=url] { width: 100%; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.field-hint { margin: 2px 0 0; }
.report-details { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-details + p { margin: 6px 0 0; }
.report-table td { vertical-align: top; }
.report-actions-cell { display: flex; flex-wrap: wrap; gap: 6px; min-width: 9em; }
.report-actions-cell form { margin: 0; }
.report-link { display: inline-flex; align-items: center; gap: 6px; }
/* The form check runs unseen: its widget stays hidden (its hidden answer field still goes
   with the form), and the note line says a check runs when the form is sent. */
.captcha-field altcha-widget { display: none; }
.captcha-note { margin: 0; }
.captcha-note i { margin-right: 4px; }
.form-check-row { display: flex; justify-content: flex-end; margin: 0 0 12px; }
/* Materials: a base material's sub-types as chips in one cell. */
.subtype-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; }
/* Change history: an update's old and new values, an insert's or delete's row. */
.history-changes { display: grid; gap: 2px; margin: 6px 0 0; }
.history-changes > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 2px 10px; }
.history-changes dt { margin: 0; font-family: var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.history-changes dd { margin: 0; overflow-wrap: anywhere; }
.history-row > summary { cursor: pointer; color: var(--muted); }
.history-actor { margin: 0; padding: 8px 16px; border-bottom: 1px solid var(--border); }
@media (max-width: 760px) { .history-changes > div { grid-template-columns: minmax(0, 1fr); } }
/* Maintenance page (app.maintenance): the brand alone, centred at every width. */
#app-header.maintenance-header { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand"; }
.maintenance-header .app-brand { justify-self: center; }
.maintenance-main { padding: 32px 16px; }
.maintenance-state p + p { margin-top: 10px; }
.maintenance-message { color: var(--text); font-weight: 600; }
/* Sizes: the filament page's Sizes table, the size of each offer, and the forms' Sizes section. */
.sizes-panel { margin: 0 0 18px; }
.sizes-panel .panel-h { margin: 0; font-size: 1rem; font-weight: 600; }
.size-table td { vertical-align: top; }
.size-table .size-name { font-weight: 600; white-space: nowrap; }
.size-offers { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.size-offers li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.size-rows { display: grid; gap: 10px; }
.size-row { margin: 0; min-width: 0; padding: 6px 12px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
.size-row-head { display: flex; align-items: center; gap: 4px; padding: 0 6px; font-size: .88rem; font-weight: 600; }
.size-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px 12px; }
.size-fields input, .size-fields select { width: 100%; min-width: 0; }
.size-fields .field.wide { grid-column: span 2; }
.size-fields .size-flags { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.size-fields .size-flags .field-label { flex: 1 1 100%; }
.size-fields .size-flags label.check input { width: auto; }
.plink-extra select.plink-size { flex: 0 1 240px; width: auto; min-width: 0; }
@media (max-width: 760px) {
  .size-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .size-fields .field.wide { grid-column: 1 / -1; }
  table.data.size-table thead { display: none; }
  table.data.size-table, table.data.size-table tbody, table.data.size-table td { display: block; width: 100%; }
  table.data.size-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
  table.data.size-table td { display: block; width: auto; border: 0; padding: 0; text-align: left; }
  table.data.size-table td.cell-empty { display: none; }
  table.data.size-table td[data-label="Size"], table.data.size-table td[data-label="Store prices"] { flex: 1 1 100%; }
  table.data.size-table td[data-label="SKU"]::before, table.data.size-table td[data-label="GTIN"]::before,
  table.data.size-table td[data-label="Ø"]::before, table.data.size-table td[data-label="Length"]::before { content: attr(data-label) " "; color: var(--muted); font-size: .76rem; }
}
.report-sizes > summary { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-weight: 600; border-top: 1px solid var(--border); }
.report-sizes > summary .count { font-size: .76rem; font-weight: 400; color: var(--muted); }
.report-sizes .spacer { flex: 1; }
.report-sizes .size-rows { margin-top: 4px; }
.size-table .size-page { display: block; margin-top: 2px; overflow-wrap: anywhere; }
/* Live updates (static/js/live.js): the small "Changed · reload" / "3 new · show" button
   above a part that changed but was not swapped in, and the banner when maintenance starts
   while a form is being filled in. */
.live-mark { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 8px; padding: 3px 12px; border: 1px solid var(--info); border-radius: 999px; background: var(--info-bg); color: var(--info); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.live-mark:hover { background: var(--info); color: var(--surface); }
.live-mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.live-version { position: fixed; z-index: 90; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: var(--radius-sm); background: linear-gradient(var(--info-bg), var(--info-bg)), var(--surface); border: 1px solid var(--info); color: var(--info); font-size: .88rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.15); white-space: nowrap; }
.live-down { position: fixed; z-index: 90; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: var(--radius-sm); background: linear-gradient(var(--warning-bg), var(--warning-bg)), var(--surface); border: 1px solid var(--warning); color: var(--warning-ink); font-size: .88rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.15); }

/* Labels and NFC stickers (app.label_views): the preview beside its choices; the sticker dialog. */
.lbl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin: 0 0 14px; }
.lbl-head h1 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.lbl-head h1 i { font-size: 1.1rem; color: var(--muted); }
.lbl-for a { color: var(--muted); }
.lbl-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.lbl-stage, .lbl-choices { margin-bottom: 0; padding: 16px; }
/* the paper stays white in both themes: it is what comes out of the printer */
.lbl-paper { width: 100%; max-width: 520px; margin: 0 auto 12px; background: #fff; border: 1px solid var(--border-strong); border-radius: 6px; box-shadow: 0 2px 10px rgba(22,30,42,.14); overflow: hidden; }
.lbl-paper img { display: block; width: 100%; height: auto; }
.lbl-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.lbl-omitted { margin: 8px 0 0; text-align: center; color: var(--warning-ink); }
.lbl-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.lbl-set { min-width: 0; margin: 0 0 14px; padding: 0; border: 0; }
.lbl-set > legend { padding: 0; margin: 0 0 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.lbl-count { margin-left: 6px; font-weight: 400; font-variant-numeric: tabular-nums; }
.lbl-row { display: flex; flex-wrap: wrap; gap: 0 24px; }
.lbl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lbl-chip input, .lbl-seg input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lbl-chip span { display: inline-flex; align-items: center; padding: 5px 12px; border: 1px solid var(--btn-line); border-radius: 999px; font-size: .84rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.lbl-chip span:hover { background: var(--search-bg); }
.lbl-chip input:checked + span { border-color: var(--muted); background: var(--seg-on); font-weight: 600; box-shadow: 0 0 0 1px var(--muted); }
.lbl-seg label { display: contents; }
.lbl-seg span { display: inline-flex; align-items: center; padding: 5px 13px; border-radius: 999px; color: var(--muted); font-size: .82rem; font-weight: 500; cursor: pointer; }
.lbl-seg span:hover { color: var(--text); }
.lbl-seg input:checked + span { background: var(--seg-on); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(22,30,42,.12), 0 0 0 1px var(--muted); }
.lbl-seg input:disabled + span { opacity: .4; cursor: not-allowed; }
.lbl-chip input:focus-visible + span, .lbl-seg input:focus-visible + span { outline: 2px solid var(--tag-ink); outline-offset: 2px; }
@media (forced-colors: active) { .lbl-chip input:checked + span, .lbl-seg input:checked + span { outline: 2px solid; outline-offset: -2px; } }
.lbl-picks { display: grid; gap: 2px; }
.lbl-pick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: .9rem; cursor: pointer; }
.lbl-pick:hover { background: var(--row-hover); }
.lbl-pick-text { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.lbl-text { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 0 8px; font-size: .9rem; cursor: pointer; }
.lbl-fold > summary { display: none; }
.lbl-help { margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; font-size: .86rem; }
.lbl-help > summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.lbl-help > summary i { margin-right: .45rem; }
.lbl-help ul { margin: 10px 0 0; padding-left: 1.2rem; color: var(--muted); }
.lbl-help li { margin: 6px 0; }
.lbl-help b { color: var(--text); font-weight: 600; }
@media (max-width: 899px) {
  .lbl-grid { grid-template-columns: 1fr; }
  .lbl-stage, .lbl-choices { padding: 14px; }
  .lbl-actions .btn { flex: 1 1 auto; justify-content: center; }
  .lbl-fold > summary { display: flex; align-items: center; gap: .5rem; margin: -2px 0 10px; font-weight: 600; cursor: pointer; list-style: none; }
  .lbl-fold > summary::-webkit-details-marker { display: none; }
  .lbl-fold > summary::after { content: "\f078"; margin-left: auto; font: 900 .75rem "Font Awesome 7 Free", "Font Awesome 6 Free"; color: var(--muted); transition: transform .15s; }
  .lbl-fold[open] > summary::after { transform: rotate(180deg); }
  .lbl-fold:not([open]) { margin-bottom: -4px; }
}
dialog.stk-dialog { width: min(460px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(0,0,0,.28); }
dialog.stk-dialog::backdrop { background: rgba(0,0,0,.45); }
.stk-box { display: grid; gap: 12px; padding: 18px 20px; }
.stk-box h2 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.15rem; }
.stk-box h2 i { color: var(--accent); }
.stk-status { min-height: 1.4em; margin: 0; overflow-wrap: anywhere; }
.stk-status.bad { color: var(--error); }
.stk-found { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.stk-found a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); }
.stk-found a:hover { background: var(--row-hover); text-decoration: none; }
.stk-found .muted { white-space: nowrap; font-variant-numeric: tabular-nums; }
.stk-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.stk-tag { margin: 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: .88rem; overflow-wrap: anywhere; }
.sum-name .sum-tools { margin-top: 8px; }


/* The admins' Site numbers page (app.site_numbers_views): the figures strip and the main chart in one card,
   ranked lists under it, the week's grid; the charts are HTML and inline SVG (static/js/site-numbers.js reads them
   out on hover). A series' colour is set once by its slot class (viz-1 .. viz-4, viz-muted) and taken by its marks. */
.viz-1 { --c: var(--viz-1); } .viz-2 { --c: var(--viz-2); } .viz-3 { --c: var(--viz-3); } .viz-4 { --c: var(--viz-4); }
.viz-muted { --c: var(--viz-muted); }
.an-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; }
.an-head .page-title { margin: 0; }
.an-live { display: inline-flex; align-items: center; gap: .45rem; padding: 3px 11px 3px 9px; border-radius: 999px; background: var(--success-bg); color: var(--success); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .an-live i { animation: an-beat 2.4s ease-out infinite; }
}
@keyframes an-beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.an-updated { margin-left: auto; font-variant-numeric: tabular-nums; }
.an-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.an-periods .an-short { display: none; }
.an-range { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 2px 18px; font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.an-range .muted { font-weight: 400; }

/* the figures: hairlines between them, whatever the number of columns */
.an-overview { margin-bottom: 18px; }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 -1px -1px 0; border-bottom: 1px solid var(--border); }
.an-kpi { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px 14px; box-shadow: inset -1px 0 0 var(--border), inset 0 -1px 0 var(--border); }
.an-kpi-label { color: var(--muted); font-size: .84rem; font-weight: 500; }
.an-kpi-value { margin: 4px 0 10px; font-family: var(--head); font-size: 1.75rem; font-weight: 700; line-height: 1.1; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; min-height: 24px; }
.an-delta { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-delta i { font-size: .68rem; }
.an-delta.good { color: var(--success); }
.an-delta.bad { color: var(--error); }
.an-delta.flat, .an-delta.none { color: var(--muted); font-weight: 500; }
.an-spark { flex: 0 1 84px; width: 84px; min-width: 40px; height: 24px; overflow: visible; }
.an-spark path { fill: none; stroke: var(--viz-spark); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* the main chart */
.an-main { padding: 18px 20px 16px; }
.an-main.an-split { border-top: 1px solid var(--border); }
.an-main-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 14px; }
.an-main-head h2 { margin: 0; font-size: 1.02rem; }
.an-main-head .spacer { flex: 1; }
.an-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .82rem; }
.an-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.an-key { display: inline-block; background: var(--c); }
.an-key.column { width: 10px; height: 10px; border-radius: 3px; }
.an-key.line { width: 16px; height: 2px; border-radius: 1px; }
.an-toggle { display: inline-flex; align-items: center; gap: .45rem; padding: 4px 11px; border-radius: 999px; color: var(--muted); font-size: .82rem; font-weight: 500; }
.an-toggle:hover { background: var(--search-bg); color: var(--text); text-decoration: none; }
.an-toggle.on { color: var(--text); }
.an-chart { --an-h: 248px; display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: var(--an-h) 26px; container-type: inline-size; }
.an-chart.short { --an-h: 168px; }
.an-y { position: relative; }
.an-y span { position: absolute; right: 10px; transform: translateY(50%); color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.an-plot { position: relative; outline: 2px solid transparent; }
.an-plot:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); border-radius: 4px; }
.an-rules i { position: absolute; left: 0; right: 0; height: 1px; background: var(--viz-rule); }
.an-rules i:first-child { background: var(--viz-base); }
.an-cols { position: absolute; inset: 0; display: flex; gap: 2px; }
.an-cols.dense { gap: 1px; }
.an-b { position: relative; flex: 1 1 0; min-width: 0; }
.an-b.on::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--viz-base); }
.an-bar { position: absolute; left: 50%; width: min(24px, 100%); transform: translateX(-50%); border-radius: 4px 4px 0 0; background: var(--c); }
.an-bar:not(:last-of-type) { border-radius: 0; }
.an-bar + .an-bar { box-shadow: inset 0 -2px 0 var(--surface); }
.an-cols.dense .an-bar { border-radius: 2px 2px 0 0; }
.an-b.partial .an-bar { opacity: .55; }
.an-b.on .an-bar { filter: brightness(1.1); }
.an-dot { position: absolute; left: 50%; z-index: 3; display: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); transform: translate(-50%, 50%); }
.an-b.on .an-dot, .an-cols.dots .an-dot { display: block; }
.an-lines { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.an-lines path { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.an-x { position: relative; grid-column: 2; }
.an-x span { position: absolute; top: 7px; transform: translateX(-50%); color: var(--muted); font-size: .74rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@container (max-width: 520px) { .an-x .minor { display: none; } .an-cols.dense { gap: 0; } .an-cols.dense .an-bar { box-shadow: inset -1px 0 0 var(--surface); } }
.an-table { margin-top: 10px; }
.an-table summary { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; cursor: pointer; }
.an-table summary:hover { color: var(--text); }
.an-scroll { max-height: 360px; margin-top: 8px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.an-scroll table.data th, .an-scroll table.data td { padding: 7px 12px; }

/* the read-out (one element, outside the live region) */
.an-tip { position: fixed; z-index: 60; min-width: 150px; max-width: 280px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 8px 28px rgba(22,30,42,.16); color: var(--text); font-size: .8rem; pointer-events: none; }
.an-tip-t { margin-bottom: 5px; color: var(--muted); font-size: .76rem; }
.an-tip-r { display: grid; grid-template-columns: 14px auto minmax(0, 1fr); align-items: center; gap: 8px; line-height: 1.6; }
.an-tip-r b { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.an-tip-r span { color: var(--muted); }
.an-tip-k { width: 14px; height: 2px; border-radius: 1px; background: var(--c, var(--viz-1)); }
.an-tip-n { margin-top: 4px; color: var(--muted); font-size: .74rem; }

/* the ranked lists */
.an-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.an-panels.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.an-panels > .panel { margin: 0; }
.an-measure { color: var(--muted); font-size: .8rem; font-weight: 500; }
.an-rank { margin: 0; padding: 8px 10px 10px; list-style: none; }
.an-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.4rem; align-items: center; gap: 12px; min-height: 34px; padding: 0 8px 0 0; border-radius: 6px; color: var(--text); font-size: .9rem; }
a.an-row:hover { background: var(--row-hover); text-decoration: none; }
a.an-row:hover .an-name { color: var(--link); }
.an-track { position: relative; display: flex; align-items: center; min-width: 0; min-height: 26px; }
.an-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 5px; background: color-mix(in srgb, var(--viz-1) 14%, transparent); }
.an-name { position: relative; overflow: hidden; padding: 0 8px; text-overflow: ellipsis; white-space: nowrap; }
.an-name .mono { font-size: .84rem; }
.an-val { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.an-share { color: var(--muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.an-row.other { color: var(--muted); }
.an-row.other .an-fill { background: color-mix(in srgb, var(--viz-muted) 16%, transparent); }
.an-code { margin-left: .45rem; color: var(--muted); font-size: .76rem; font-weight: 500; }
.an-credit { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 10px 18px 12px; border-top: 1px solid var(--border); }
.an-credit a { color: var(--muted); }
.an-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; padding: 20px; color: var(--muted); font-size: .88rem; text-align: center; }
.an-empty.small { min-height: 120px; }
.an-empty i { color: var(--faint); font-size: 1.5rem; }

/* tables of routes (Health) */
table.data.an-tight th, table.data.an-tight td { padding: 8px 12px; }
table.data.an-tight td.num { white-space: nowrap; }
.an-route-cell { max-width: 0; width: 60%; }
.an-route { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.an-route .mono { font-size: .82rem; }
.an-route:hover { color: var(--link); }
.an-bad { color: var(--error); font-weight: 600; }

/* the week's grid: one hue, light to dark (dark to bright in the dark theme) by the hour's average */
.an-rhythm { margin-bottom: 18px; }
.an-heat { display: grid; grid-template-columns: 2.6rem repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.an-heat-h { color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.an-heat-d { color: var(--muted); font-size: .78rem; }
.an-cell { display: block; height: 22px; border-radius: 4px; background: color-mix(in oklab, var(--viz-1) calc(var(--v) * 100%), var(--viz-heat-0)); }
.an-heat .an-cell.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--text); }
.an-scale { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; }
.an-scale .an-cell { width: 18px; height: 12px; border-radius: 3px; }
.an-scale span { margin: 0 4px; }

/* a drill-down's name */
.an-drill { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -4px 2px 14px; }
.an-drill-kind { color: var(--muted); font-size: .86rem; font-weight: 500; }
.an-drill h2 { margin: 0; font-size: 1.35rem; overflow-wrap: anywhere; }
.an-drill h2.mono { font-family: var(--mono); font-size: 1.1rem; font-weight: 500; }

@media (max-width: 1100px) { .an-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .an-panels, .an-panels.two { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-kpi { padding: 13px 14px 12px; }
  .an-kpi-value { font-size: 1.4rem; }
  .an-spark { width: 56px; flex-basis: 56px; }
  .an-main { padding: 16px 12px 14px; }
  .an-chart { --an-h: 190px; grid-template-columns: 38px minmax(0, 1fr); }
  .an-chart.short { --an-h: 150px; }
  .an-updated { margin-left: 0; }
  .an-controls { align-items: stretch; }
  .an-controls > .seg { width: 100%; }
  .an-controls > .seg a { flex: 1 1 0; justify-content: center; padding: 6px 4px; }
  .an-periods .an-long { display: none; }
  .an-periods .an-short { display: inline; }
  .an-heat { gap: 2px; grid-template-columns: 2.2rem repeat(24, minmax(0, 1fr)); }
  .an-cell { height: 16px; border-radius: 3px; }
  .an-heat-h { font-size: .62rem; }
}

/* the admin's padlock (macro padlock): a small round button; beside a field's label it sits at the label's right end */
.padlock { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--muted); font-size: .72rem; cursor: pointer; }
.padlock:hover { background: var(--search-bg); color: var(--text); }
.padlock.on { color: var(--warning-mark, var(--text)); border-color: var(--border-strong); background: var(--search-bg); }
.padlock:disabled { opacity: .5; cursor: progress; }
.field > .padlock, .lr-cell > .padlock { position: absolute; top: -4px; right: 0; }
.field > label:has(+ .padlock), .lr-cell:has(> .padlock) > .lr-cap { padding-right: 28px; }
.lr-cell { position: relative; }
.lock-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.lock-line > :first-child:not(.padlock) { flex: 1 1 auto; min-width: 0; }
.kv > div > .padlock { margin-left: 6px; vertical-align: middle; }
input.is-locked, textarea.is-locked, select.is-locked { background: var(--search-bg); color: var(--muted); }

/* The data sheet group of the filament page: the version line, the values and the older versions fold open in place. */
.sheet-head { margin: 0 0 8px; }
.sheet-values, .sheet-older { margin-top: 10px; }
.sheet-values > summary, .sheet-older > summary { cursor: pointer; }
.sheet-values .table-wrap, .sheet-older > .kv { margin-top: 8px; }
.sheet-values td:last-child { text-align: right; white-space: nowrap; }

/* The Admin and Account settings screens (app.settings_screens, static/js/settings.js): a search box, then boxes of rows
   under small headings; a row is a coloured square, the name and one line, its live numbers and a chevron. A page a row
   opens is drawn as a panel over the list, which stays behind, dimmed and inert. */
.sl-bar, .sl { width: min(720px, 100%); margin-left: auto; margin-right: auto; }
.sl-bar { display: flex; align-items: center; margin-top: 8px; margin-bottom: 16px; }
.sl-search { position: relative; display: flex; flex: 1; align-items: center; }
.sl-search > i { position: absolute; left: 14px; color: var(--faint); font-size: .82rem; pointer-events: none; }
.sl-search input { width: 100%; height: 42px; padding: 0 12px 0 38px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; }
.sl-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.sl { margin-bottom: 26px; }
.sl-head { margin: 0 4px 6px; font-family: var(--font); font-size: .85rem; font-weight: 700; color: var(--muted); }
.sl-group { margin-bottom: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.sl-head[hidden], .sl-group[hidden], .sl-row[hidden], .sl-none[hidden] { display: none; }
.sl-row { --sl-fill: #475569; display: flex; align-items: center; gap: 14px; width: 100%; margin-top: -1px; padding: 12px 16px; border-top: 1px solid var(--border); background: none; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; }
.sl-row:hover { background: var(--surface-2); text-decoration: none; }
.sl-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sl-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--sl-fill); color: #fff; font-size: 1.05rem; }
.sl-icon[data-ic="blue"] { --sl-fill: #2563eb; }
.sl-icon[data-ic="teal"] { --sl-fill: #0f766e; }
.sl-icon[data-ic="violet"] { --sl-fill: #7c3aed; }
.sl-icon[data-ic="rose"] { --sl-fill: #be123c; }
.sl-icon[data-ic="sky"] { --sl-fill: #0369a1; }
.sl-icon[data-ic="green"] { --sl-fill: #15803d; }
.sl-icon[data-ic="pink"] { --sl-fill: #db2777; }
.sl-icon[data-ic="amber"] { --sl-fill: #b45309; }
.sl-icon[data-ic="indigo"] { --sl-fill: #4338ca; }
.sl-icon[data-ic="red"] { --sl-fill: #b91c1c; }
.sl-icon[data-ic="slate"] { --sl-fill: #475569; }
.sl-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sl-name { font-size: .95rem; font-weight: 600; line-height: 1.3; }
.sl-line { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.sl-value { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .82rem; text-align: right; }
.sl-value:empty { display: none; }
.sl-value b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sl-value b[data-tone="good"] { color: var(--success); }
.sl-value b[data-tone="warn"] { color: var(--warning-ink); }
.sl-value b[data-tone="bad"] { color: var(--error); }
.sl-icon-chev { flex: none; margin-left: 4px; color: var(--faint); font-size: .8rem; }
.sl-none { margin: 36px 0; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .sl-row { padding: 12px 14px; }
  .sl-value { display: none; }
  .sl-icon-chev { margin-left: auto; }
}
html:has(.set-panel) { overflow: hidden; }
.set-dim { position: fixed; z-index: 20; top: var(--set-top, 125px); left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, .5); }
.set-behind { pointer-events: none; }
.set-panel { position: fixed; z-index: 22; top: calc(var(--set-top, 125px) + 10px); bottom: 10px; left: 0; right: 0; margin: 0 auto; width: min(1040px, calc(100vw - 40px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, .35); overflow: hidden; }
.set-panel:focus { outline-style: none; }
.set-panel-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px 10px 20px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-fill) 82%, #fff), var(--accent-fill)); }
:root[data-theme="dark"] .set-panel-head { background: linear-gradient(135deg, color-mix(in srgb, var(--accent-fill) 30%, var(--surface-3)), color-mix(in srgb, var(--accent-fill) 14%, var(--surface))); }
.set-panel-icon { flex: none; font-size: 1.1rem; }
.set-panel-head h2 { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); font-size: 1rem; font-weight: 650; color: #fff; }
.set-panel-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, .18); color: #fff; text-decoration: none; }
.set-panel-close:hover { background: rgba(255, 255, 255, .3); text-decoration: none; }
.set-panel-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.set-panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px; }
.set-panel-body .crumbs, .set-panel-body h1.page-title { display: none; }
.set-fullhead { margin-bottom: 14px; border-radius: 12px; min-height: 52px; }
.set-fullhead-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 650; color: #fff; }
@media (max-width: 760px) {
  .set-panel { left: 8px; right: 8px; width: auto; margin: 0; }
  .set-panel-body { padding: 12px 10px; }
}

/* The inbox (app.inbox_views): the contact form's page-line, a thread's facts and messages, the status badges. */
.inbox-about-line { margin: 0; color: var(--muted); }
.inbox-about { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.inbox-ref { font-size: 1.15rem; }
.badge.inbox-st-new { background: var(--info-bg); color: var(--info); }
.badge.inbox-st-open { background: var(--warning-bg); color: var(--warning-ink); }
.badge.inbox-st-waiting { background: var(--neutral-bg); color: var(--neutral); }
.badge.inbox-st-closed { background: var(--success-bg); color: var(--success); }
.inbox-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 20px; margin: 0; padding: 14px 16px; }
.inbox-facts dt { font-size: .78rem; color: var(--muted); }
.inbox-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.inbox-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.inbox-msg { max-width: 46rem; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.inbox-msg.from-team { background: var(--surface-3); border-color: var(--border-strong); }
.inbox-msg.mine { align-self: flex-end; }
.inbox-msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.inbox-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-mail { margin-top: 8px; color: var(--muted); }
.inbox-mail.bad { color: var(--error); }
.inbox-notes .inbox-note { padding: 8px 12px; margin-bottom: 10px; border-left: 3px solid var(--warning-ink); background: var(--warning-bg); border-radius: 0 var(--radius) var(--radius) 0; }
.inbox-handle { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-end; }
.inbox-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.inbox-form .field { min-width: 11rem; }
@media (max-width: 599px) {
  .inbox-msg, .inbox-msg.mine { max-width: none; align-self: stretch; }
  .inbox-form { width: 100%; }
  .inbox-form .field { flex: 1 1 100%; }
}
.inbox-subject { min-width: 0; overflow-wrap: anywhere; }
.inbox-head { flex-wrap: wrap; }
.inbox-head .inbox-subject { flex: 1 1 10rem; }

/* A signed-in account's label designs: the picker on a record's label page, the designed label's page and the new-design menu (app.label_design_views). */
.dsg-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 14px; }
.dsg-pick-seg { flex-wrap: wrap; border-radius: 18px; }
.dsg-pick-seg a i { font-size: .7rem; color: var(--warning-mark); }
.dsg-pick-acts { display: inline-flex; gap: 8px; }
.dsg-paper { background: #fff; }
.dsg-paper svg { display: block; width: 100%; height: auto; }
.dsg-new { position: relative; }
.dsg-new > summary { list-style: none; cursor: pointer; }
.dsg-new > summary::-webkit-details-marker { display: none; }
.dsg-new-menu { position: absolute; right: 0; z-index: 5; display: grid; min-width: 11rem; margin-top: 4px; padding: 4px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 6px 18px rgba(22,30,42,.18); }
.dsg-new-menu a { padding: 7px 10px; border-radius: 6px; color: var(--text); font-size: .86rem; }
.dsg-new-menu a:hover { background: var(--search-bg); text-decoration: none; }

/* Find by colour (app/templates/colour_find.html): the picker row, the file drop, the asked colours and the result groups. */
.fbc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.fbc-head .page-title { margin: 0 auto 0 0; }
.fbc-pick { padding: 14px 16px; }
.fbc-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fbc-picker { width: 48px; height: 38px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.fbc-drop { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: .86rem; cursor: pointer; }
.fbc-drop[hidden] { display: none; }
.fbc-drop:hover, .fbc-drop:focus-visible, .fbc-drop.over { border-color: var(--accent); background: var(--tag-bg); color: var(--tag-ink); }
.fbc-status { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
.fbc-status[hidden] { display: none; }
.fbc-status.bad { color: var(--error); }
.fbc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
a.fbc-chip { align-items: center; color: var(--text); border: 1px solid var(--btn-line); background: transparent; }
a.fbc-chip:hover { text-decoration: none; background: var(--search-bg); }
.fbc-toggles { gap: 14px; }
.fbc-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; cursor: pointer; }
.fbc-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); }
.fbc-h { margin: 0; font-size: 1.02rem; font-weight: 700; }
.fbc-look { font-size: .8rem; font-weight: 600; }
.fbc-look[data-look="indistinguishable"], .fbc-look[data-look="very close"] { color: var(--success); }
.fbc-look[data-look="close"], .fbc-look[data-look="noticeable"] { color: var(--info); }
.fbc-look[data-look="clearly different"], .fbc-look[data-look="far apart"] { color: var(--muted); }
.fbc-table td[data-col="color"] .swatch-set { margin-right: 6px; }
.fbc-closest { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
@media (max-width: 760px) {
  .fbc-pick { padding: 12px; }
  .fbc-form { gap: 8px; }
  .fbc-form .field { flex: 1 1 110px; min-width: 0; }
  .fbc-form .field input { width: 100%; min-width: 0; }
  .fbc-drop { flex: 1 1 100%; justify-content: center; margin-left: 0; }
}
/* The permission grid of the API key screens (templates/_permission_grid.html, static/js/permission-grid.js) */
.pgrid { margin: 0; padding: 0; border: none; display: grid; gap: 10px; min-width: 0; }
.pgrid legend { margin-bottom: 6px; padding: 0; }
.pgrid-count { margin-left: 8px; font-weight: 400; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pgrid-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.pgrid-tools[hidden], .pgrid [hidden] { display: none; }
.pgrid-search { position: relative; flex: 1 1 14rem; max-width: 22rem; }
.pgrid-search input { width: 100%; padding-right: 2rem; }
.pgrid-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 8px; font-size: .9rem; line-height: 1; }
.pgrid-clear:hover, .pgrid-clear:focus-visible { color: var(--text); }
.pgrid-group { border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px 10px; min-width: 0; }
.pgrid-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.pgrid-head h3 { margin: 0; font-size: .92rem; }
.pgrid-perms { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pgrid label.check { display: inline-flex; align-items: baseline; gap: 6px; font-size: .88rem; }
.pgrid label.check input { width: auto; }
.pgrid-perm .mono { overflow-wrap: anywhere; }

/* Price history on a colour's page: one step line per store link, one chart per currency. */
.ph-chart { margin: 0 0 18px; }
.ph-chart figcaption { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.ph-cur { font-weight: 600; }
.ph-range { margin-left: auto; font-variant-numeric: tabular-nums; }
.ph-svg { display: block; width: 100%; height: 120px; border-bottom: 1px solid var(--viz-base); background: linear-gradient(var(--viz-rule) 1px, transparent 1px) 0 0 / 100% 33.4%; }
.ph-svg path { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ph-key { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.ph-key li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ph-key i { width: 14px; height: 2px; border-radius: 1px; background: var(--c); align-self: center; }
.ph-key b { margin-left: auto; }
.ph-table { margin-top: 8px; }

/* The metric / imperial switch in the header. */
.units-form { display: inline-flex; margin: 0; }
.units-btn { height: 34px; padding: 0 10px; border: 1px solid var(--btn-line); border-radius: 17px; background: transparent; color: var(--text); font: inherit; font-size: .8rem; white-space: nowrap; cursor: pointer; }
.units-btn:hover { background: var(--search-bg); }

/* The Export button on the filament list and brand pages: a button that opens its three links. */
.export-menu { position: relative; display: inline-block; }
.export-menu summary { list-style: none; cursor: pointer; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-list { position: absolute; right: 0; z-index: 20; display: grid; min-width: 140px; margin-top: 4px; padding: 4px; border: 1px solid var(--btn-line); border-radius: 8px; background: var(--card-bg, var(--bg)); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.export-list a { padding: 7px 10px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.export-list a:hover { background: var(--search-bg); text-decoration: none; }

/* The palettes pages (templates/_palettes.html): a palette's colours side by side in one rounded strip. */
.pal-strip { display: inline-flex; width: 100%; min-width: 150px; max-width: 260px; height: 28px; overflow: hidden; vertical-align: middle; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.pal-strip > span { flex: 1 1 0; min-width: 0; }
.pal-strip.sm { width: 96px; min-width: 96px; height: 18px; }
.pal-big { padding: 12px 16px; }
.pal-big .pal-strip { display: flex; max-width: none; width: 100%; height: 56px; }
table.pal-table td[data-col=strip] { width: 270px; }
