/* The faceted search page (/find/): the live tool of the split-stage design. It lives on the
   paper sheet (the shared styles.css carries the frame: sheet, cine, ledger .row, buttons, tokens);
   this layer adds only the tool: the big search, the sticky results bar, the results ledger and
   the filters drawer — an overlay, so it may sit above the sheet. Flat surfaces, no rules:
   space, tone and scale separate, as on the guide pages. */

.f-hero { padding: 40px 0 8px; }
.f-hero h1 { font-size: var(--t-head); line-height: 1.04; letter-spacing: -0.015em; margin: 0 0 14px; }
.f-hero .lede { max-width: 34em; }

/* the search box: the page's one big input, the first screen's focal point */
.f-search { position: relative; margin-top: 30px; max-width: 620px; }
.f-search input { width: 100%; font: 400 var(--t-body)/1.3 var(--serif); color: var(--ink); padding: 16px 46px;
  border: 1px solid #b9b8b0; border-radius: var(--radius-s); background: var(--paper); color: var(--ink); transition: border-color .15s ease; }
.f-search input::placeholder { color: #8a8c84; }
.f-search input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.f-search input::-webkit-search-cancel-button { display: none; }
.f-mag { position: absolute; left: 15px; top: 50%; translate: 0 -50%; color: #8a8c84; }
.f-x { position: absolute; right: 8px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: transparent; color: #8a8c84; cursor: pointer; }
.f-x:hover { background: var(--paper-2); color: var(--ink); }
.f-x .i { width: 16px; height: 16px; }

/* the sticky results bar: count, the filters control, sort */
.f-bar { position: sticky; top: 76px; z-index: 4; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 0 12px; margin-top: 26px; background: var(--paper); }
.f-count { margin: 0; font-size: var(--t-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.f-count strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.f-open { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--t-small)/1 var(--serif); color: var(--ink);
  background: var(--paper); border: 1px solid #b9b8b0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
  transition: border-color .15s ease, color .15s ease; }
.f-open::before { content: ""; width: 13px; height: 13px; border: 2px solid var(--ink-2); border-top: 0; border-right: 0; translate: 0 1px; }
.f-open:hover { border-color: var(--accent); color: var(--accent); }
.f-sortlab { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: var(--t-small); color: var(--ink-2); white-space: nowrap; }
.f-sortlab select { font: 500 var(--t-mid)/1 var(--serif); color: var(--ink); padding: 8px 10px; border: 1px solid #b9b8b0;
  border-radius: var(--radius-s); background: var(--paper); color: var(--ink); cursor: pointer; }
.f-sortlab select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* active-filter chips: quiet controls, removable */
.f-active { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 10px; margin: 0; }
.f-active button { display: inline-flex; align-items: center; gap: 7px; font: 500 var(--t-small)/1 var(--serif); color: var(--ink);
  background: var(--paper-2); border: 0; border-radius: 999px; padding: 9px 13px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.f-active button:hover { background: color-mix(in srgb, var(--accent) 22%, var(--paper-2)); color: var(--ink); }
.f-active button .i { width: 13px; height: 13px; color: var(--ink-2); }
.f-clearrow button { background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; padding: 9px 4px; }
.f-clearrow button:hover { color: var(--accent); }

/* the results ledger reuses .row from the shared stylesheet; each result rises in as it renders */
.f-list { margin-top: 6px; }
@keyframes f-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.f-list .fr { animation: f-rise .55s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms) both; }

/* empty state: a quiet tone block, no outline */
.f-empty { max-width: 560px; margin: 30px auto 10px; text-align: center; background: var(--paper-2); border-radius: var(--radius); padding: 44px 28px; }
.f-empty h2 { margin: 0 0 10px; }
.f-empty p { color: var(--ink-2); font-size: var(--t-mid); margin: 0 0 20px; }
.f-more { display: flex; justify-content: center; margin: 24px 0 10px; }

/* the filters drawer: a real overlay above the sheet, at every width */
.f-side::backdrop { background: rgb(20 20 20 / .45); }
.f-side:not([open]), .f [hidden] { display: none; }
.f-side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin: auto auto 0; border: 0; padding: 0; width: min(100%, 640px); z-index: 41; display: flex; flex-direction: column; max-height: 84vh;
  background: var(--paper); color: var(--ink); border-radius: 18px 18px 0 0; transform: translateY(103%);
  transition: transform .3s cubic-bezier(.3, .9, .3, 1); visibility: hidden; }
.f-side[open] { transform: translateY(0); visibility: visible; }
.f-side::before { content: ""; flex: none; width: 38px; height: 4px; border-radius: 999px; background: #b9b8b0; margin: 10px auto 2px; }
.f-side-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 22px 0; }
.f-side-top h2 { font: 600 var(--t-lead)/1.2 var(--serif); margin: 0; }
.f-side-btns { display: flex; align-items: center; gap: 10px; }
.f-reset { border: 0; background: none; padding: 6px 2px; font: 500 var(--t-small)/1 var(--serif); color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.f-reset:hover { color: var(--accent); }
.f-close { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #b9b8b0; border-radius: 50%;
  background: var(--paper); color: var(--ink); color: var(--ink-2); cursor: pointer; }
.f-close:hover { color: var(--ink); }
.f-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 8px; }

/* facet groups: separated by air, legends do the labelling */
.f-group { border: 0; margin: 0; padding: 22px 0 8px; }
.f-group legend { float: left; width: 100%; padding: 0; font: 600 var(--t-small)/1.4 var(--serif); letter-spacing: .04em;
  text-transform: none; color: var(--ink-2); margin-bottom: 10px; }
.f-hint { margin: -4px 0 10px; font-size: var(--t-small); color: var(--ink-2); }
.f-hint em { font-style: italic; }
.f-cityq { margin-bottom: 10px; }
.f-cityq input { width: 100%; font: 400 var(--t-mid)/1.4 var(--serif); padding: 10px 14px; border: 1px solid #b9b8b0;
  border-radius: var(--radius-s); background: var(--paper); color: var(--ink); }
.f-cityq input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.f-opts-scroll { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.f-none { margin: 4px 0 0; font-size: var(--t-small); color: var(--ink-2); }

/* one option row: native control left, live count right */
.f-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: var(--t-mid); color: var(--ink); cursor: pointer; }
.f-opt input { accent-color: var(--accent); width: 16px; height: 16px; flex: none; margin: 0; }
.f-optl { flex: 1; min-width: 0; }
.f-opt:hover .f-optl { color: var(--accent); }
.f-opt.zero { opacity: .45; }
.f-opt.zero .f-n:empty::after { content: "0"; }
.f-n { color: var(--ink-2); font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.f-num { display: flex; align-items: baseline; gap: 6px; font-size: var(--t-mid); }
.f-num input { width: 84px; font: inherit; padding: 8px 10px; border: 1px solid #b9b8b0; border-radius: var(--radius-s); background: var(--paper); color: var(--ink); }
.f-num input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.f-unit { color: var(--ink-2); font-size: var(--t-small); }
.f-side-cta { flex: none; padding: 12px 22px calc(16px + env(safe-area-inset-bottom)); }
.f-side-cta .btn { width: 100%; justify-content: center; padding: 15px 18px; font-size: var(--t-mid); }

.f-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .f-side, .f-search input, .f-list .fr { transition: none; animation: none; }
}
