/* ---------- page frame ---------- */
.frame{max-width:1360px;margin:0 auto;padding:28px 20px 120px}

.masthead{border-bottom:1px solid var(--line);padding-bottom:22px;margin-bottom:24px}
.eyebrow{font-family:"IBM Plex Mono",monospace;font-size:0.875rem;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);margin:0 0 12px}
.masthead h1{
  font-family:"IBM Plex Serif",Georgia,serif;
  font-size:clamp(2rem,4.4vw,2.75rem);
  line-height:1.12;font-weight:600;margin:0 0 12px;letter-spacing:-.015em;
  text-wrap:pretty;max-width:23ch;
}
.standfirst{font-family:"IBM Plex Serif",Georgia,serif;font-size:1.25rem;line-height:1.6;color:var(--ink-2);max-width:66ch;margin:0}
.standfirst em{font-style:italic}
.byline{margin-top:16px;display:flex;flex-wrap:wrap;gap:8px 18px;align-items:baseline;font-size:0.875rem;color:var(--muted)}
.byline a{color:var(--accent);text-decoration:none;border-bottom:1px solid var(--line-2);padding-bottom:1px}
/* Hover rules sit behind (hover:hover) throughout: on touch, a tap leaves :hover
   stuck on until you tap somewhere else. */
@media (hover:hover){.byline a:hover{border-bottom-color:var(--accent)}}

/* ---------- app shell ---------- */
.app{
  border:1px solid var(--line);border-radius:6px;background:var(--surface);
  box-shadow:var(--shadow);overflow:hidden;
}
.appbar{
  display:flex;flex-wrap:wrap;gap:10px;align-items:center;
  padding:10px 14px;border-bottom:1px solid var(--line);background:var(--surface-2);
}
.brandmark{font-weight:700;letter-spacing:.02em;font-size:0.9375rem;color:var(--ink);margin-right:6px}
.brandmark span{color:var(--muted);font-weight:400}
/* No overflow:hidden here — it crops the focus ring and leaves a stray sliver.
   The children carry the radius instead. The ring uses the global outside offset,
   never an inset one: inset, it lands on the pressed segment's --accent fill and
   drops to 2.64:1 light / 1.30:1 dark. Outside, it sits on --surface-2. z-index
   lifts it over the neighbouring segment. */
.segmented{display:inline-flex;border:1px solid var(--line-control);border-radius:4px}
.segmented button{
  appearance:none;border:0;background:transparent;color:var(--ink-2);
  font:inherit;font-size:0.875rem;font-weight:500;padding:6px 14px;cursor:pointer;
  position:relative;
}
.segmented button:first-child{border-radius:3px 0 0 3px}
.segmented button:last-child{border-radius:0 3px 3px 0}
.segmented button+button{border-left:1px solid var(--line-control)}
.segmented button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}
.segmented button:focus-visible{z-index:1}
.searchwrap{flex:1 1 200px;min-width:160px;position:relative}
.searchwrap input{
  /* 1rem, not 0.9375: iOS Safari zooms the page on focus when an input is under 16px. */
  width:100%;font:inherit;font-size:1rem;padding:7px 10px 7px 30px;
  border:1px solid var(--line-control);border-radius:4px;background:var(--surface);color:var(--ink);
}
/* Decorative, and sitting over the input's padding — let clicks through to the field. */
.searchwrap svg{position:absolute;left:9px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.kbd{
  font-family:"IBM Plex Mono",monospace;font-size:0.875rem;border:1px solid var(--line-2);
  border-bottom-width:2px;border-radius:3px;padding:1px 5px;color:var(--muted);background:var(--surface);
}

.cols{display:grid;grid-template-columns:252px minmax(0,1fr) minmax(0,336px)}
@media (max-width:1200px){.cols{grid-template-columns:232px minmax(0,1fr)} .mappane{display:none}}
@media (max-width:820px){.cols{grid-template-columns:1fr} .filters{border-right:0;border-bottom:1px solid var(--line)}}

.filters{border-right:1px solid var(--line);padding:16px 14px;display:flex;flex-direction:column;gap:20px}
.fieldset{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:9px}
.legend{font-family:"IBM Plex Mono",monospace;font-size:0.875rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);padding:0}
.check{display:flex;align-items:center;gap:8px;font-size:0.9375rem;color:var(--ink-2);cursor:pointer}
.check input{accent-color:var(--accent);width:15px;height:15px;margin:0}
.check .n{margin-left:auto;font-size:0.875rem;color:var(--muted)}
.rangerow{display:flex;justify-content:space-between;align-items:baseline;font-size:0.875rem;color:var(--ink-2)}
.rangerow output{font-weight:600;color:var(--ink)}
.fieldnote{
  margin:0;font-size:0.875rem;line-height:1.45;color:var(--warn);
  background:var(--warn-soft);border:1px solid var(--warn);border-radius:4px;padding:8px 10px;
}
.fieldset.off .legend,.fieldset.off .rangerow{opacity:.5}
.fieldset.off input[type=range]{opacity:.4;cursor:not-allowed}
input[type=range]{width:100%;accent-color:var(--accent);margin:2px 0 0}
.linkbtn{
  appearance:none;background:transparent;border:0;padding:0;font:inherit;font-size:0.875rem;
  color:var(--accent);text-decoration:underline;text-underline-offset:2px;cursor:pointer;text-align:left;
}
