/* THC Ways to Help: uses the child theme's palette tokens with the same fallbacks as
   THC Library and Field Trips. The Display panel's dark mode flips those tokens
   (html[data-thc-theme="dark"]); the few literal colors below are restated for it.
   The child theme may restyle any .thc-wth* class. No fixed, sticky or floating elements. */

.thc-wth {
  --wth-canvas: var(--wp--preset--color--base, #f7f1e4);
  --wth-raised: var(--wp--preset--color--accent-5, #fcf8ef);
  --wth-muted: var(--wp--preset--color--accent-4, #ece4d9);
  --wth-border: var(--wp--preset--color--accent-6, #d9d0bc);
  --wth-text: var(--wp--preset--color--contrast, #332d25);
  --wth-leaf: var(--wp--preset--color--accent-1, #5e7d53);
  --wth-deep: var(--wp--preset--color--accent-3, #3f5c3b);
  --wth-sage: var(--wp--preset--color--accent-2, #a8b79a);
  --wth-stroke: var(--wp--preset--color--control-stroke, #8a7f66);
  --wth-gold: #b8912a;
  --wth-gold-text: #6b5210;
  --wth-gold-bg: #f3e4b3;
  --wth-warn: #8a2f1f;
  --wth-warn-bg: #fbf1ee;
  --wth-chip-kind: #e6ecdf;
  --wth-chip-fit: #f1ebdc;
  --wth-on-leaf: #fff;
  --wth-quiet: #675d4b; /* small secondary text: the stroke tone, darkened to pass 4.5:1 on every light surface */
  --wth-radius: 12px;
  color: var(--wth-text);
  margin-block: var(--wp--preset--spacing--md, 1rem) 0;
  min-width: 0;
}
html[data-thc-theme="dark"] .thc-wth {
  --wth-gold: #d7b454;
  --wth-gold-text: #f0d99a;
  --wth-gold-bg: #4a3f22;
  --wth-warn: #f0a49d;
  --wth-warn-bg: #3a2522;
  --wth-chip-kind: #34402f;
  --wth-chip-fit: #3a352b;
  --wth-on-leaf: #15130f;
  --wth-quiet: #a79d88;
}
html[data-thc-contrast="high"] .thc-wth {
  --wth-quiet: #000;
  --wth-chip-kind: #efefef;
  --wth-chip-fit: #efefef;
  --wth-warn: #8a0000;
}

.thc-wth *, .thc-wth *::before, .thc-wth *::after { box-sizing: border-box; }
.thc-wth [hidden] { display: none !important; }
.thc-wth__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.thc-wth__lead { margin: 0 0 var(--wp--preset--spacing--lg, 1.5rem); font-size: var(--wp--preset--font-size--large, 1.2rem); max-width: 60ch; }
.thc-wth__h2 { font-size: 1.35rem; line-height: 1.25; margin: 0 0 .35rem; color: var(--wth-deep); overflow-wrap: anywhere; }
.thc-wth__hint { margin: 0 0 .9rem; color: var(--wth-deep); font-size: .95rem; }
.thc-wth__notice { padding: .7em 1em; border-radius: 10px; border: 1px solid var(--wth-sage); background: var(--wth-raised); }
.thc-wth a { color: var(--wth-deep); text-underline-offset: .15em; }
.thc-wth :focus-visible { outline: 3px solid var(--wth-leaf); outline-offset: 2px; }

/* ---------- buttons and inputs ---------- */
.thc-wth__btn { font: inherit; font-weight: 600; border: 1px solid var(--wth-leaf); background: var(--wth-leaf); color: var(--wth-on-leaf); border-radius: 999px; padding: .55em 1.25em; min-height: 44px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .35em; line-height: 1.2; text-align: center; }
.thc-wth__btn:hover { background: var(--wth-deep); border-color: var(--wth-deep); color: var(--wth-on-leaf); }
.thc-wth__btn--ghost { background: transparent; color: var(--wth-deep); border-color: var(--wth-stroke); }
.thc-wth__btn--ghost:hover { background: var(--wth-muted); color: var(--wth-deep); border-color: var(--wth-stroke); }
.thc-wth__btn--ghost[aria-pressed="true"] { background: var(--wth-leaf); border-color: var(--wth-leaf); color: var(--wth-on-leaf); }
.thc-wth__btn--sm { min-height: 38px; padding: .38em .95em; font-size: .92rem; }
.thc-wth__btn[disabled] { opacity: .6; cursor: default; }
.thc-wth__link { font: inherit; color: var(--wth-deep); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.thc-wth input[type="text"], .thc-wth input[type="url"], .thc-wth input[type="email"], .thc-wth select, .thc-wth textarea {
  font: inherit; font-size: max(16px, 1em); color: inherit; background: var(--wth-canvas); border: 1px solid var(--wth-stroke); border-radius: 10px; padding: .55em .8em; width: 100%; min-width: 0; min-height: 44px;
}
.thc-wth textarea { min-height: 0; resize: vertical; }
.thc-wth input[type="checkbox"] { accent-color: var(--wth-leaf); width: 1.15rem; height: 1.15rem; margin: 0; flex: none; }

/* ---------- where are you ---------- */
.thc-wth__where { background: var(--wth-raised); border: 1px solid var(--wth-border); border-radius: var(--wth-radius); padding: var(--wp--preset--spacing--lg, 1.25rem); margin: 0 0 1.5rem; display: grid; gap: .75rem; }
.thc-wth__row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.thc-wth__row--alt { align-items: flex-end; }
.thc-wth__field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; flex: 1 1 12rem; }
.thc-wth__field--place { flex: 3 1 16rem; }
.thc-wth__field--go { flex: 0 0 auto; }
.thc-wth__field--state { flex: 1 1 12rem; max-width: 20rem; }
.thc-wth__label, .thc-wth__field > span { font-size: var(--wp--preset--font-size--small, .9rem); font-weight: 600; color: var(--wth-deep); }
.thc-wth__field em { font-weight: 400; font-style: normal; color: var(--wth-quiet); }
.thc-wth__where .thc-wth__hint { margin: 0; font-size: .88rem; }
.thc-wth__place { margin: 0; font-weight: 600; }
.thc-wth__place .thc-wth__link { font-weight: 400; margin-left: .4em; }
.thc-wth__msg { margin: 0; font-size: .95rem; }
.thc-wth__msg:empty { display: none; }
.thc-wth__msg.is-error { color: var(--wth-warn); font-weight: 600; }

/* ---------- layout ---------- */
.thc-wth__layout { display: grid; grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.thc-wth__main { min-width: 0; }
.thc-wth__main:focus { outline: none; }
.thc-wth__status { margin: 0 0 1rem; font-size: 1rem; color: var(--wth-deep); font-weight: 600; }

/* ---------- filters ---------- */
.thc-wth__filters { background: var(--wth-raised); border: 1px solid var(--wth-border); border-radius: var(--wth-radius); padding: 1rem 1.1rem; min-width: 0; }
.thc-wth__filters-title { font-size: 1.1rem; margin-bottom: .6rem; }
.thc-wth__filters-body { display: flex; flex-direction: column; gap: 1rem; }
.thc-wth__switch { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--wth-border); border-radius: 10px; background: var(--wth-canvas); cursor: pointer; }
.thc-wth__switch input { margin-top: .2rem; }
.thc-wth__switch span { display: flex; flex-direction: column; gap: .1rem; }
.thc-wth__switch small { color: var(--wth-deep); font-size: .85rem; }
.thc-wth__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.thc-wth__group legend { font-size: .85rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--wth-deep); margin-bottom: .35rem; padding: 0; }
.thc-wth__check { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; min-height: 40px; cursor: pointer; font-size: .97rem; }
.thc-wth__check span { flex: 1 1 auto; }
.thc-wth__check small { color: var(--wth-quiet); font-variant-numeric: tabular-nums; }
.thc-wth__check.is-zero { opacity: .55; }
.thc-wth__toggle { display: none; }

/* ---------- season strip ---------- */
.thc-wth__season { margin: 0 0 1.5rem; padding: 1rem 1.1rem; background: var(--wth-muted); border-radius: var(--wth-radius); }
.thc-wth__strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .6rem; }
.thc-wth__strip li { margin: 0; }
.thc-wth__strip a { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .6rem .75rem; background: var(--wth-raised); border: 1px solid var(--wth-border); border-radius: 10px; text-decoration: none; color: var(--wth-text); }
.thc-wth__strip a:hover { border-color: var(--wth-leaf); }
.thc-wth__strip strong { color: var(--wth-deep); line-height: 1.3; overflow-wrap: anywhere; }
.thc-wth__strip span { font-size: .85rem; }

/* ---------- sections and cards ---------- */
.thc-wth__sec { margin: 0 0 2rem; }
.thc-wth__n { font-size: .8em; font-weight: 600; color: var(--wth-quiet); }
.thc-wth__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.thc-wth__card { display: flex; flex-direction: column; gap: .35rem; background: var(--wth-raised); border: 1px solid var(--wth-border); border-radius: var(--wth-radius); padding: 1rem 1.1rem; min-width: 0; }
.thc-wth__card.is-herp { border-left: 4px solid var(--wth-leaf); }
.thc-wth__card, .thc-wth__sec, .thc-wth__main, .thc-wth__live { scroll-margin-top: 7rem; } /* clear of the site's top bar when jumped to */
.thc-wth__card:target { box-shadow: 0 0 0 3px var(--wth-gold); }
.thc-wth__name { font-size: 1.12rem; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.thc-wth__name a { color: var(--wth-deep); text-decoration: none; }
.thc-wth__name a:hover { text-decoration: underline; }
.thc-wth__name a::after { content: " \2197"; font-size: .8em; }
.thc-wth__org { margin: 0; font-size: .95rem; }
.thc-wth__wherel { margin: 0; font-size: .85rem; color: var(--wth-deep); font-weight: 600; }
.thc-wth__summary, .thc-wth__note { margin: .15rem 0 0; font-size: .97rem; overflow-wrap: anywhere; }
.thc-wth__note { padding: .45rem .75rem; border-left: 3px solid var(--wth-gold); background: var(--wth-canvas); font-size: .93rem; }
.thc-wth__chips { list-style: none; margin: .25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.thc-wth__chip { margin: 0; font-size: .78rem; background: var(--wth-muted); color: var(--wth-deep); border-radius: 999px; padding: .15em .65em; }
.thc-wth__chip--kinds { background: var(--wth-chip-kind); }
.thc-wth__chip--fit { background: var(--wth-chip-fit); }
.thc-wth__facts { margin: .35rem 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .15rem .7rem; font-size: .9rem; }
.thc-wth__facts > div { display: contents; }
.thc-wth__facts dt { margin: 0; font-weight: 700; color: var(--wth-deep); }
.thc-wth__facts dd { margin: 0; overflow-wrap: anywhere; }
.thc-wth__warn { margin: .3rem 0 0; padding: .45rem .7rem; border-radius: 8px; background: var(--wth-warn-bg); color: var(--wth-warn); font-size: .9rem; }
.thc-wth__foot { margin: auto 0 0; padding-top: .5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem .8rem; font-size: .82rem; color: var(--wth-quiet); }
.thc-wth__report { color: var(--wth-quiet) !important; }
.thc-wth__report:hover { color: var(--wth-deep) !important; }
.thc-wth__empty { padding: 1.5rem 1rem; text-align: center; background: var(--wth-muted); border-radius: var(--wth-radius); }

/* state-by-state (the full list) */
.thc-wth__jump { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 1rem; }
.thc-wth__jump a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 40px; padding: .2rem .5rem; border: 1px solid var(--wth-border); border-radius: 8px; background: var(--wth-raised); text-decoration: none; font-weight: 600; font-size: .9rem; }
.thc-wth__jump a:hover { border-color: var(--wth-leaf); }
.thc-wth__sthead { font-size: 1.1rem; margin: 1.3rem 0 .6rem; color: var(--wth-deep); scroll-margin-top: 6rem; }

/* ---------- live panels ---------- */
.thc-wth__live, .thc-wth__dirs, .thc-wth__before, .thc-wth__suggest { margin-top: 2rem; }
.thc-wth__panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.thc-wth__panel { background: var(--wth-raised); border: 1px solid var(--wth-border); border-radius: var(--wth-radius); padding: 1rem 1.2rem; min-width: 0; }
.thc-wth__panel h3 { margin: 0 0 .4rem; font-size: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.thc-wth__livebadge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wth-gold-text); background: var(--wth-gold-bg); border-radius: 999px; padding: .12em .6em; }
.thc-wth__src { margin: 0 0 .6rem; font-size: .88rem; color: var(--wth-deep); }
.thc-wth__panel-tools { margin: 0 0 .6rem; }
.thc-wth__plist { list-style: none; margin: 0; padding: 0; }
.thc-wth__plist li { padding: .55rem 0; border-top: 1px solid var(--wth-border); }
.thc-wth__plist li:first-child { border-top: 0; }
.thc-wth__plist a { font-weight: 600; overflow-wrap: anywhere; }
.thc-wth__plist small { display: block; color: var(--wth-deep); font-size: .85rem; margin-top: .1rem; }
.thc-wth__loading { margin: 0; font-style: italic; color: var(--wth-deep); }
.thc-wth__more { border-top: 1px solid var(--wth-border); }
.thc-wth__more > summary { cursor: pointer; font-weight: 600; color: var(--wth-deep); min-height: 44px; display: flex; align-items: center; }
.thc-wth__more[open] > summary { border-bottom: 1px solid var(--wth-border); }
.thc-wth__checked { margin: .6rem 0 0; font-size: .8rem; color: var(--wth-quiet); }

/* ---------- directories ---------- */
.thc-wth__dirlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1rem; }
.thc-wth__dirlist li { margin: 0; display: flex; flex-direction: column; gap: .2rem; max-width: 100%; }
.thc-wth__dirlist small { font-size: .82rem; color: var(--wth-deep); max-width: 26rem; }

/* ---------- before you go ---------- */
.thc-wth__before { background: var(--wth-raised); border: 1px solid var(--wth-border); border-radius: var(--wth-radius); padding: 1rem 1.3rem; }
.thc-wth__before ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.thc-wth__before li { margin-bottom: .55rem; }

/* ---------- suggestion form ---------- */
.thc-wth__suggest { padding: 1.2rem 1.3rem; background: var(--wth-raised); border: 1px solid var(--wth-border); border-radius: var(--wth-radius); scroll-margin-top: 6rem; }
.thc-wth__form { display: flex; flex-direction: column; gap: .8rem; }
.thc-wth__frow { display: flex; flex-wrap: wrap; gap: .8rem; }
.thc-wth__field--wide { flex: 2 1 18rem; }
.thc-wth__problem-of { margin: 0; padding: .6rem .8rem; border-left: 4px solid var(--wth-gold); background: var(--wth-canvas); font-weight: 600; }
.thc-wth__hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.thc-wth__factions { margin: 0; display: flex; align-items: center; gap: .8rem 1rem; flex-wrap: wrap; }
.thc-wth__fmsg { font-size: .95rem; }
.thc-wth__fmsg.is-ok { color: var(--wth-deep); font-weight: 600; }
.thc-wth__fmsg.is-err { color: var(--wth-warn); font-weight: 600; }

/* ---------- without JavaScript: a plain list ---------- */
.thc-wth--nojs .thc-wth__where, .thc-wth--nojs .thc-wth__filters, .thc-wth--nojs .thc-wth__form, .thc-wth--nojs .thc-wth__report { display: none; }
.thc-wth--nojs .thc-wth__layout { grid-template-columns: minmax(0, 1fr); }
.thc-wth--noform .thc-wth__report { display: none; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .thc-wth__layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .thc-wth__filters { padding: .8rem .9rem; }
  .thc-wth__filters-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: 0; }
  .thc-wth__toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; font: inherit; font-weight: 700; background: none; border: 0; padding: .3rem 0; min-height: 44px; color: var(--wth-deep); cursor: pointer; }
  .thc-wth__toggle::after { content: "+"; font-size: 1.3rem; line-height: 1; }
  .thc-wth__toggle[aria-expanded="true"]::after { content: "\2212"; }
  .thc-wth__filters.is-collapsible:not(.is-open) .thc-wth__filters-body { display: none; }
  .thc-wth__filters.is-collapsible.is-open .thc-wth__filters-body { margin-top: .6rem; }
  .thc-wth__where { padding: 1rem; }
  .thc-wth__field--go, .thc-wth__field--go .thc-wth__btn { flex: 1 1 100%; width: 100%; }
  .thc-wth__field--go .thc-wth__label { display: none; }
  .thc-wth__row--alt > .thc-wth__btn { flex: 1 1 auto; }
  .thc-wth__field--state { max-width: none; flex: 1 1 100%; }
  .thc-wth__card { padding: .9rem; }
  .thc-wth__suggest, .thc-wth__before { padding: 1rem; }
}

@media print {
  .thc-wth__where, .thc-wth__filters, .thc-wth__suggest, .thc-wth__live, .thc-wth__report, .thc-wth__jump { display: none !important; }
  .thc-wth__layout { grid-template-columns: 1fr; }
  .thc-wth__card { break-inside: avoid; }
  .thc-wth__name a::after { content: " (" attr(href) ")"; font-size: .75em; font-weight: 400; }
}
