/* "Find the right fit", the session finder (/sites/finder.js), on all five sites (30 November).
 *
 * Moved from foxwood.html as it was, with the additions for the camps' home pages: the
 * availability badge and the column it shares with the row's button (.fside, .fav), the button
 * to the camp's own dates page (.fmore), and the line to the hub's finder under it (.fhub).
 *
 * It reads the sites' tokens: --accent, --card, --sand, --ink, --ink-2, --muted-ink, --line,
 * --field-line, --shadow, --shadow-lg, --display. site.css defines them for the hub and the
 * camps; windward.css maps them onto Windward's own, on #finder only. */
.finder{background:var(--card);border:2px solid var(--accent);border-radius:26px;padding:clamp(22px,3.5vw,38px);box-shadow:var(--shadow-lg)}
.finder-bar{display:grid;grid-template-columns:1fr;gap:14px;align-items:end;margin-top:8px}
@media (min-width:680px){.finder-bar{grid-template-columns:1fr auto}}
.ff{display:flex;flex-direction:column;gap:7px}
.ff label{font-family:var(--display);font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--finder-ink,var(--accent));font-weight:800}
.ff input,.ff select{font:inherit;font-size:16px;background:var(--sand);border:2px solid var(--field-line);border-radius:12px;padding:13px 14px;color:var(--ink)}
.ff input{max-width:200px}
.ff input:focus,.ff select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 24%,transparent)}
.ff-types{margin-top:16px}
.ff-types-label{font-family:var(--display);font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--finder-ink,var(--accent));font-weight:800;display:block}
.ff-checks{display:flex;flex-wrap:wrap;gap:9px;margin-top:9px}
.ff-chk{display:inline-flex;align-items:center;gap:8px;font:inherit;font-size:14.5px;font-weight:700;color:var(--ink-2);background:var(--sand);border:2px solid var(--field-line);border-radius:100px;padding:9px 16px;cursor:pointer;user-select:none;transition:.14s}
.ff-chk:hover{border-color:var(--accent)}
.ff-chk.on{background:color-mix(in srgb,var(--accent) 16%,var(--card));border-color:var(--accent);color:var(--ink)}
.ff-chk input{accent-color:var(--accent);width:16px;height:16px;margin:0;cursor:pointer}
.finder-sum{font-family:var(--display);font-weight:700;font-size:14px;color:var(--ink-2);margin:24px 0 12px;letter-spacing:.02em}
.fres{display:flex;flex-direction:column;gap:10px;max-height:440px;overflow-y:auto}
.frow{display:flex;align-items:center;gap:14px;background:var(--card);border:1px solid var(--line);border-left:4px solid var(--fc);border-radius:14px;padding:13px 16px;box-shadow:var(--shadow);transition:transform .12s}
.frow:hover{transform:translateX(3px)}
/* --fc-ink, not --fc: the raw brand color is the FILL. Carvela's gold reads 3.32:1
   as text on this card, so the label takes the darkened partner instead. */
.frow .fp{font-family:var(--display);font-weight:800;font-size:12.5px;color:var(--fc-ink);min-width:132px}
.frow .fmid{flex:1;min-width:0}
.frow .fn{font-family:var(--display);font-weight:700;font-size:15px}
.frow .fmeta{font-size:13px;color:var(--ink-2);font-variant-numeric:tabular-nums}
/* Why a 7-year-old is being shown a program whose site says Ages 11-18. Quieter than
   the meta line above it: it explains a result rather than describing one. */
.frow .fnote{font-size:12.5px;color:var(--muted-ink);margin-top:3px;font-style:italic}
.frow .fdate{font-family:var(--display);font-weight:800;font-size:14px;color:var(--fc-ink);font-variant-numeric:tabular-nums}
.frow .fx{flex:none;font-family:var(--display);font-weight:700;font-size:13px;color:var(--fc-ink);white-space:nowrap}
.frow .fn a,.frow a.fn{color:inherit}
.frow .fn a:hover,.frow a.fn:hover{color:var(--fc-ink)}
/* White on the gold fill is 3.32:1; the dark ink on it is 4.98:1. --fc-on picks
   whichever survives, per program, the same way the camps pick --on-accent. */
.fbtn{flex:none;font-family:var(--display);font-weight:700;font-size:13px;background:var(--fc);color:var(--fc-on);border-radius:100px;padding:8px 17px;white-space:nowrap;transition:transform .14s,filter .14s}
.fbtn:hover{transform:translateY(-2px);filter:brightness(1.06)}
.fnone{color:var(--muted-ink);font-size:15px}
/* Additions (30 November). */
.ff-types-hint{font-weight:600;text-transform:none;letter-spacing:0;color:var(--muted-ink)}
.frow .fside{flex:none;display:flex;align-items:center;gap:10px}
/* Availability, as the camps' dates pages say it. Fixed light chips with dark text, so each
   reads at more than 7:1 on itself in either theme. */
.fav{font-family:var(--display);font-weight:700;font-size:12px;border-radius:100px;padding:4px 10px;white-space:nowrap}
.fav.open{background:#E3F1E1;color:#1D4A2B}
.fav.full{background:#F6E1DC;color:#7A2418}
/* Under a camp's finder: every other program, on the hub's finder. */
/* An add-on trip, under the week it is booked with (1 December): set in from the week, and
   labeled, so it never reads as a session of its own. */
.frow.addon{margin-left:28px;box-shadow:none;border-style:dashed;border-left-style:solid}
.faddon{display:inline-block;font-family:var(--display);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2);background:var(--sand);border:1px solid var(--line);border-radius:100px;padding:2px 8px;margin-right:6px;vertical-align:2px}
/* On a phone the set-in row has least room: the program's name takes its own line, and a long
   session name breaks rather than running past the row (any row). */
.frow .fn,.frow .fnote{overflow-wrap:anywhere}
@media (max-width:560px){.frow.addon{margin-left:14px}.frow.addon .fp{flex-basis:100%}.frow.addon .fmid{flex-basis:100%}}
/* A camp hides the type boxes its sessions do not have; .ff-chk's own display would show them. */
.ff-types[hidden],.ff-chk[hidden]{display:none}
.fhub{margin:16px 0 0;font-size:14.5px;color:var(--ink-2)}
.fhub a{color:var(--finder-ink,var(--accent));font-weight:700}
.fmore{margin-top:22px;display:flex;flex-wrap:wrap;gap:12px}
@media (max-width:560px){.frow{flex-wrap:wrap}.frow .fp{min-width:0}.frow .fside{width:100%;flex-wrap:wrap;padding-top:6px;border-top:1px solid var(--line)}.frow .fside .fx,.frow .fside .fbtn{margin-left:auto}.frow .fside .fbtn{text-align:center}.fmore .btn{width:100%;justify-content:center;text-align:center;white-space:normal}}
/* On a phone (1 December), Clear sits on the age box's line, to its right, and the box takes the
   rest of the width. Clear is the secondary action there: outlined in the finder's readable accent
   rather than filled, and still a 44px target. #finder #ffClear outranks Windward's
   #finder .btn-accent. Desktop is as it was. tests/camp-home-finder.spec.js. */
@media (max-width:679px){
  .finder-bar{grid-template-columns:1fr auto;gap:10px}
  .ff input{max-width:none;width:100%;box-sizing:border-box}
  #finder #ffClear{background:transparent;color:var(--finder-ink,var(--accent));border:2px solid currentColor;min-height:44px;padding:0 18px;box-shadow:none}
}
