/* ============================================================ filter sidebar (desktop) */
/* Flat on the page ground, like the category nav above it. Groups are separated
   by hairlines, not by a card. */
.dg-filters{background:none;border:0;border-radius:0;padding:0}
/* Section headings carry the brand: ink, not grey, over a short red rule. A
   10px grey mono label had no more presence than the options beneath it. */
/* A sidebar section label, set like one: the body face at meta size in ink.
   11px mono was a caption pretending to be a heading — too small to lead the
   list under it, and the tracking and caps it used to carry were doing the
   work the size should have done. */
.dg-filters > h2,.dg-catnav h2{font-family:var(--font-ka);font-size:var(--fs-meta);
  line-height:var(--lh-meta);
  font-weight:700;color:var(--ink);margin:0 0 var(--sp-3)}

.dg-fgroup{border-bottom:1px solid var(--rule)}
/* Taller rows and real padding above and below the options: the groups used to
   butt straight into their hairlines and the whole rail read as one dense list. */
.dg-fgroup__head{display:flex;align-items:center;gap:var(--sp-2);width:100%;
  min-height:56px;padding:var(--sp-2) 0;background:none;border:0;cursor:pointer;
  /* Longhands: `inherit` is not a legal family inside the font shorthand, so the
     whole declaration was being dropped and this heading rendered at 400. */
  font-family:inherit;font-weight:700;font-size:var(--fs-card);line-height:var(--lh-card);
  color:var(--ink);text-align:start;
  transition:color var(--dur-instant) linear}
.dg-fgroup__head:hover{color:var(--accent-text)}
.dg-fgroup__head > span:first-child{margin-inline-end:auto}
/* How many options are active in a collapsed group — Selfridges' pattern. */
.dg-fgroup__n{display:inline-flex;align-items:center;justify-content:center;
  min-width:18px;height:18px;padding:0 5px;border-radius:9px;
  background:var(--ink);color:var(--white);font-family:var(--font-mono);
  font-size:10px;font-weight:700;line-height:1}
.dg-fgroup__head .chev{width:22px;height:22px;display:inline-flex;flex:none;
  align-items:center;justify-content:center;color:var(--grey-400);border-radius:2px;
  transition:transform var(--dur-base) var(--ease-standard),
             color var(--dur-instant) linear}
.dg-fgroup__head:hover .chev{color:var(--accent-text)}
.dg-fgroup[open] .chev,.dg-fgroup.is-open .chev{transform:rotate(180deg)}
/* No padding-block, ever. Under border-box a 4px padding-top survives
   height:0, so every collapsed group kept a 4px sliver of itself open and the
   rail read as a list of hairline gaps. The breathing room goes on the first
   child, which collapses with the box. */
.dg-fgroup__body{overflow:hidden}
.dg-fgroup__body > *:first-child{margin-top:var(--sp-1)}
.dg-fgroup__body > *:last-child{margin-bottom:var(--sp-5)}

.dg-opt{display:flex;align-items:center;gap:10px;min-height:36px;
  padding:3px 6px;margin-inline-start:-6px;border-radius:var(--radius-sm);
  text-decoration:none;color:var(--text-2);
  font-size:var(--fs-sm);line-height:var(--lh-sm);
  transition:color var(--dur-instant) linear,background-color var(--dur-instant) linear}
/* The sidebar's options are <a> (a filter has to work with scripting off); the
   drawer's are <button>, because ticking there is deferred and commits once.
   These rules were written for the link and NOTHING in the theme resets a
   button — so the entire mobile filter sheet rendered as native chrome: grey
   buttonface fill, a 2px outset border, Arial, and each row only as wide as its
   own label. The -6px margin then pushed that box under
   .dg-fgroup__body{overflow:hidden}, which cut its left edge off. */
button.dg-opt{
  -webkit-appearance:none;appearance:none;
  width:calc(100% + 12px);margin-inline:-6px;
  background:none;border:0;
  font-family:inherit;font-size:var(--fs-sm);line-height:var(--lh-sm);
  text-align:start;cursor:pointer;-webkit-tap-highlight-color:transparent;
}
/* Room for the -6px overhang the hover ground needs, cancelled again by the
   negative margin so nothing moves. Without it overflow:hidden — which the
   height animation requires — clips every row's leading edge. */
.dg-fgroup__body{padding-inline:6px;margin-inline:-6px}
.dg-opt:hover{color:var(--text);background:var(--grey-100)}
.dg-opt.is-on,.dg-opt[aria-current="true"]{color:var(--ink);font-weight:700}
@media (max-width:1023px){.dg-opt{min-height:var(--touch)}}

/* The box is a span, not a real checkbox — these options are links, because a
   filter has to survive with scripting off. It therefore has to look like a
   control on its own. */
.dg-opt__box{flex:0 0 20px;width:20px;height:20px;border:2px solid var(--grey-300);
  border-radius:6px;background:var(--white);position:relative;
  transition:border-color var(--dur-instant) linear,
             background-color var(--dur-instant) linear,
             box-shadow var(--dur-instant) linear}
.dg-opt:hover .dg-opt__box{border-color:var(--accent-hover)}
.dg-opt[aria-current="true"] .dg-opt__box,.dg-opt.is-on .dg-opt__box{
  background:var(--accent);border-color:var(--accent)}
/* Ink, not white. The tick used to be white on what is now a #FBCA28 fill —
   1.55:1, i.e. an invisible checkmark on every selected filter. */
.dg-opt[aria-current="true"] .dg-opt__box::after,.dg-opt.is-on .dg-opt__box::after{
  content:"";position:absolute;inset-inline-start:6px;top:2px;width:4px;height:9px;
  border:solid var(--on-accent);border-width:0 2.5px 2.5px 0;transform:rotate(45deg)}
.dg-opt:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.dg-opt__label{flex:1;min-width:0}
.dg-opt__count{font-family:var(--font-mono);font-size:var(--fs-micro);color:var(--text-3);
  font-variant-numeric:tabular-nums;flex:none}
/* zero-result options are disabled, not hidden — hiding makes the list jump */
.dg-opt.is-empty{color:var(--grey-400);cursor:default}
.dg-opt.is-empty .dg-opt__box{border-color:var(--grey-300);background:var(--grey-100)}
.dg-opt.is-empty .dg-opt__count{color:var(--grey-400)}

.dg-range{display:flex;align-items:flex-end;gap:var(--sp-2);padding:var(--sp-2) 0}
.dg-range__field{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
/* The label lives above the box, not inside it as a placeholder — a placeholder
   vanishes the moment someone types, taking the only clue which end this is. */
.dg-range__micro{font-size:var(--fs-micro);line-height:1;font-weight:700;color:var(--text-3)}
.dg-range input{width:100%;min-width:0;min-height:44px;padding:0 var(--sp-3);
  border:1px solid var(--grey-300);border-radius:var(--radius);background:var(--white);
  font:inherit;font-size:var(--fs-sm);font-variant-numeric:tabular-nums;color:var(--text);
  transition:border-color var(--dur-instant) linear,box-shadow var(--dur-instant) linear}
.dg-range input:hover{border-color:var(--grey-400)}
.dg-range input:focus{outline:none;border-color:var(--accent-hover);
  box-shadow:0 0 0 3px var(--tint-saved)}
.dg-range input::placeholder{color:var(--grey-400)}
.dg-range__dash{color:var(--text-3);font-size:var(--fs-meta);padding-bottom:12px}

/* Brands as a two-column grid of marks — the mark and nothing else. A tick box
   and a count beside a wordmark were three controls saying one thing; the tile
   itself is the checkbox, so the on state is carried by its ring and tint. The
   name and the machine count still reach a screen reader from .dg-sr. */
.dg-fgroup__body--brands{display:grid;grid-template-columns:1fr 1fr;gap:var(--sp-2);
  padding-bottom:var(--sp-3)}
.dg-opt--brand{position:relative;flex-direction:column;align-items:center;justify-content:center;
  gap:0;min-height:64px;padding:var(--sp-3);margin:0;
  border:1px solid var(--grey-200);border-radius:var(--radius);background:var(--white);
  transition:border-color var(--dur-instant) linear,background-color var(--dur-instant) linear,
             box-shadow var(--dur-base) var(--ease-standard),
             transform var(--dur-base) var(--ease-standard)}
.dg-opt--brand:hover{background:var(--white);border-color:var(--grey-400);
  box-shadow:var(--shadow-1);transform:translateY(-1px)}
/* Ring, not a thicker border: a 2px border would move the logo by a pixel on
   every toggle and the whole grid would twitch. */
.dg-opt--brand.is-on,.dg-opt--brand[aria-current="true"]{
  border-color:var(--accent);background:var(--tint-saved);
  box-shadow:inset 0 0 0 1px var(--accent)}
.dg-opt--brand.is-on:hover,.dg-opt--brand[aria-current="true"]:hover{
  border-color:var(--accent);transform:none}
.dg-opt__logo{max-width:100%;width:auto;height:20px;object-fit:contain;
  display:block;margin:0}
.dg-opt--brand .dg-opt__label{flex:none;text-align:center;font-weight:700;
  font-size:var(--fs-micro)}
.dg-opt--brand.is-empty{opacity:.4;box-shadow:none;transform:none}
.dg-opt--brand.is-empty:hover{border-color:var(--grey-200);box-shadow:none;transform:none}
.dg-range__more{background:none;border:0;padding:var(--sp-2);color:var(--accent-text);
  font:inherit;font-size:var(--fs-meta);cursor:pointer;
  border-bottom:1px solid currentColor;padding-bottom:1px;
  transition:color var(--dur-instant) linear,border-color var(--dur-instant) linear}

/* ============================================================ filter drawer (mobile) */
/* Namespaced: .dg-drawer is also the header shortlist drawer (chrome.css).
   Without the hook these two blocks overwrite each other by load order. */
/* visibility, not display. display:none -> block happened in the SAME style
   change that added .is-open, and a transition cannot start from a box that was
   not laid out — so the sheet appeared already at translateY(0) and the scrim
   already at opacity 1, and on close display:none came back before .is-closing
   got a frame. Both the 300ms slide and the 400ms fade existed in the file and
   neither had ever run. visibility is delayed out and immediate in, which is the
   same trick .dg-util uses. */
.dg-drawer[data-drawer]{position:fixed;inset:0;z-index:60;
  visibility:hidden;pointer-events:none;
  transition:visibility 0s linear var(--dur-panel)}
.dg-drawer[data-drawer].is-open,
.dg-drawer[data-drawer].is-closing{visibility:visible;transition-delay:0s}
.dg-drawer[data-drawer].is-open{pointer-events:auto}
[data-drawer] .dg-drawer__scrim{position:absolute;inset:0;background:rgba(20,20,22,.5);opacity:0;
  transition:opacity var(--dur-backdrop) linear}
.dg-drawer[data-drawer].is-open .dg-drawer__scrim{opacity:1}
[data-drawer] .dg-drawer__panel{position:absolute;inset-inline:0;bottom:0;max-height:92vh;
  display:flex;flex-direction:column;background:var(--white);
  border-radius:var(--radius-lg) var(--radius-lg) 0 0;box-shadow:var(--shadow-panel);
  transform:translateY(100%);transition:transform var(--dur-panel) var(--ease-enter);
  touch-action:pan-y}
/* The grab bar. A bottom sheet that can be flicked away has to say so — without
   it the only way out was a 48px x in the corner or the 40px strip of scrim
   above the panel. app.js reads the drag; this draws it. */
[data-drawer] .dg-drawer__panel::before{content:"";position:absolute;top:7px;left:50%;
  width:40px;height:4px;margin-inline-start:-20px;border-radius:2px;
  background:var(--grey-300)}
[data-drawer].is-dragging .dg-drawer__panel{transition:none}
.dg-drawer[data-drawer].is-open .dg-drawer__panel{transform:translateY(0)}
.dg-drawer[data-drawer].is-closing .dg-drawer__panel{transition-timing-function:var(--ease-exit)}
[data-drawer] .dg-drawer__head{display:flex;align-items:center;justify-content:space-between;
  padding:var(--sp-5) var(--sp-4) var(--sp-3);border-bottom:1px solid var(--rule);flex:0 0 auto}
[data-drawer] .dg-drawer__head h2{margin:0;font-size:var(--fs-h3)}
[data-drawer] .dg-drawer__close{width:var(--touch);height:var(--touch);border:0;background:none;
  font-size:24px;line-height:1;color:var(--text-2);cursor:pointer}
[data-drawer] .dg-drawer__body{flex:1;overflow-y:auto;padding:var(--sp-4);-webkit-overflow-scrolling:touch}
/* deferred apply: ticking changes a counter, not the page — six choices, one reload */
[data-drawer] .dg-drawer__foot{flex:0 0 auto;padding:var(--sp-4);border-top:1px solid var(--rule);
  background:var(--white);display:flex;gap:var(--sp-3);
  padding-bottom:calc(var(--sp-4) + env(safe-area-inset-bottom))}
[data-drawer] .dg-drawer__foot .dg-btn{white-space:nowrap;min-height:48px}
body.dg-locked{overflow:hidden}

/* A phone held sideways gives the sheet 359px, and an 81px head plus an 81px
   foot took 45% of it — about two options visible. Neither needs that height. */
@media (max-height:520px){
  [data-drawer] .dg-drawer__panel{max-height:100%}
  [data-drawer] .dg-drawer__head{padding:var(--sp-4) var(--sp-4) var(--sp-2)}
  [data-drawer] .dg-drawer__head h2{font-size:var(--fs-card)}
  [data-drawer] .dg-drawer__body{padding-block:var(--sp-2)}
  [data-drawer] .dg-drawer__foot{padding-block:var(--sp-2)}
  [data-drawer] .dg-fgroup__head{min-height:44px}
}

/* --------------------------------------------------- categories, in the drawer
   A link, not a checkbox: it goes somewhere rather than adding to a pending set,
   so it carries no box and no tick. Same metrics as .dg-opt beside it, because
   they sit in the same list and a different row height would read as a
   different kind of thing. */
.dg-catopt{display:flex;align-items:center;gap:10px;min-height:38px;
  padding:6px var(--sp-2);border-radius:var(--radius-sm);
  color:var(--text-2);text-decoration:none;
  font-size:var(--fs-sm);line-height:var(--lh-sm);
  transition:background-color var(--dur-instant) linear,color var(--dur-instant) linear}
@media (hover:hover){.dg-catopt:hover{color:var(--ink);background:var(--grey-100)}}
.dg-catopt:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.dg-catopt__label{flex:1;min-width:0}
.dg-catopt__n{flex:none;font-family:var(--font-mono);font-size:var(--fs-micro);
  color:var(--text-3);font-variant-numeric:tabular-nums}
/* The category you are already in. It stays in the list rather than being
   dropped, because a list that silently omits where you are gives no sense of
   where you are among the rest. */
.dg-catopt.is-on{color:var(--ink);font-weight:700;background:var(--grey-100)}
.dg-catopt--up{color:var(--text-3);font-weight:600;
  margin-bottom:var(--sp-1);border-bottom:1px solid var(--grey-200);border-radius:0}
