/* Forms & controls — inputs, selects, toggles, choices, autocomplete, filter bar. */
.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 18px; top: 50%;
  width: 7px; height: 7px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
select.input { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }

/* toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 0.95rem; font-weight: 500; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .switch {
  width: 46px; height: 26px; border-radius: 999px; background: var(--border);
  position: relative; flex: none; transition: background 200ms ease-out;
}
.toggle .switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-card);
  transition: transform 200ms ease-out;
}
.toggle input:checked + .switch { background: var(--orange); }
.toggle input:checked + .switch::after { transform: translateX(20px); }
.toggle input:focus-visible + .switch { outline: 3px solid var(--blue); outline-offset: 2px; }

/* checkbox / radio choices */
.choice { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.95rem; font-weight: 500; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice .box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border);
  background: var(--surface); flex: none; display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 0.7rem; font-weight: 700; transition: all 200ms ease-out;
}
.choice input:checked + .box { background: var(--orange); border-color: var(--orange); color: #fff; }
.choice .box.round { border-radius: 50%; }
.choice input:checked + .box.round { background: var(--surface); border-color: var(--orange); color: var(--orange); font-size: 0; }
.choice input:checked + .box.round::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.choice input:focus-visible + .box { outline: 3px solid var(--blue); outline-offset: 2px; }
.choice-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }

/* autocomplete suggestions */
.autocomplete { max-width: 340px; }
.suggest {
  margin-top: 8px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card);
}
.suggest a {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 16px; font-size: 0.92rem; color: var(--ink);
  border-top: 1px solid var(--border);
}
.suggest a:first-child { border-top: none; }
.suggest a:hover, .suggest a.hl { background: var(--cream); }
.suggest .cc { color: var(--text-muted); font-size: 0.85rem; }
.suggest b { font-weight: 400; }
.suggest b mark { background: none; color: inherit; font-weight: 700; }

/* filter bar (base layout lives on the page; system sets its rounding) */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-media); padding: 16px 20px; }
.filter-bar .input { background: var(--cream); border: 1.5px solid transparent; border-radius: 999px; padding: 10px 20px; width: auto; flex: 1 1 220px; }
.filter-bar .input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-tint); background: var(--surface); }
.filter-bar select.input { flex: 0 1 190px; appearance: none; }
.fmt-chip { font: 500 0.8125rem 'Space Grotesk', sans-serif; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: all 200ms ease-out; }
.fmt-chip:hover { border-color: var(--orange); }
.fmt-chip.active { background: var(--ink); color: var(--ink-inverse); border-color: var(--ink); }
.fmt-chip:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* newsletter combo (pill input + button) */
.newsletter { display: flex; gap: 10px; max-width: 460px; margin-top: 24px; }
.newsletter .input { flex: 1; font: 400 1rem 'Instrument Sans', sans-serif; background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); border-radius: 999px; padding: 12px 22px; transition: border-color 200ms ease-out, box-shadow 200ms ease-out; }
.newsletter .input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-tint); }
.newsletter .btn { flex: none; }
.sub-note { font: 500 0.85rem 'Space Grotesk', sans-serif; font-feature-settings: "tnum"; color: var(--text-muted); margin-top: 12px; }
