/* Family History Book tool (/family-history-book/). Uses the site tokens. */
.fh-wrap { display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .fh-wrap { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
  .fh-side { position: sticky; top: 1rem; } }
.fh-form { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 1.2rem; box-shadow: var(--shadow-sm); }
.fh-form h2 { margin: 1.4rem 0 .4rem; font-size: 1.25rem; }
.fh-form h2:first-child { margin-top: 0; }
.fh-step { display: inline-block; background: var(--green); color: #fff; border-radius: 999px; width: 1.7rem; height: 1.7rem;
  line-height: 1.7rem; text-align: center; font-size: .95rem; margin-right: .45rem; }
.fh-form label.fh-l { font-weight: 700; display: block; margin: .7rem 0 .3rem; }
.fh-form input[type=text], .fh-form input[type=search], .fh-form textarea, .fh-form select { width: 100%; font: inherit;
  padding: .55rem .7rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); color: var(--ink); box-sizing: border-box; }
.fh-form textarea { min-height: 4rem; }
.fh-form select[size] { min-height: 11rem; }
.fh-row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.fh-help { color: var(--muted); font-size: .92rem; margin: .3rem 0 0; }
.fh-drop { display: block; border: 2px dashed var(--rule); border-radius: 14px; padding: 1.3rem 1rem; text-align: center;
  cursor: pointer; background: var(--paper-2); }
.fh-drop.on { border-color: var(--green); }
.fh-drop strong { display: block; font-size: 1.1rem; margin-bottom: .3rem; }
.fh-drop input { display: block; margin: .6rem auto 0; max-width: 100%; }
.fh-out { font-weight: 600; min-height: 1.2em; margin: .6rem 0 0; }
.fh-swatches, .fh-checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.fh-swatches label, .fh-checks label { border: 2px solid var(--rule); border-radius: 999px; padding: .4rem .85rem; cursor: pointer; font-weight: 600; }
.fh-swatches input, .fh-checks input { margin-right: .35rem; }
.fh-dot { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; vertical-align: -2px; margin-right: .3rem; border: 1px solid #0003; }
.fh-dot-heirloom { background: #1F3A2E; } .fh-dot-navy { background: #1D2B45; } .fh-dot-burgundy { background: #5E1F2B; }
.fh-dot-ivory { background: #FBF8F1; }
.fh-livlist { max-height: 14rem; overflow: auto; border: 1px solid var(--rule); border-radius: 10px; padding: .4rem .7rem; margin-top: .5rem; }
.fh-livlist label { display: block; padding: .2rem 0; }
.fh-why { color: var(--muted); font-size: .85rem; }
.fh-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.fh-err { color: var(--ox, #8a2a1a); font-weight: 600; margin: .4rem 0; padding-left: 1.2rem; }
.fh-note { color: var(--amber-text); margin: .4rem 0; padding-left: 1.2rem; }
.fh-box { background: var(--paper-2); border-radius: 14px; padding: 1rem 1.2rem; margin-top: 1.2rem; }
.fh-box h2 { margin-top: 0; }
.fh-price { font-size: 1.9rem; font-weight: 800; line-height: 1.1; margin: .2rem 0 .4rem; }
.fh-price small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.fh-key { display: flex; gap: .5rem; flex-wrap: wrap; }
.fh-key input { flex: 1 1 16rem; }
.fh-fan { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: .6rem; box-shadow: var(--shadow-sm); }
.fh-fan svg { display: block; width: 100%; height: auto; }
.fh-cap { text-align: center; color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }
.fh-side img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); display: block; margin-top: 1rem; }
.fh-gallery { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.fh-gallery figure { margin: 0; }
.fh-gallery img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 4px; box-shadow: var(--shadow-sm); display: block; }
.fh-gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: .3rem; text-align: center; }
.fh-hero-img { width: 100%; height: auto; max-width: 40rem; display: block; margin: 0 auto; border-radius: 6px; }
.fh-wrap [hidden] { display: none !important; }
.hist-cta { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: center; background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 14px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
@media (min-width: 760px) { .hist-cta { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.hist-cta img { width: 100%; height: auto; border-radius: 6px; display: block; }
.hist-cta h2 { margin: .2rem 0 .4rem; }
.hist-cta-sm { display: block; }
.fh-size { margin: .2rem 0 .8rem; }
.fh-size:empty { display: none; }
.fh-size-small { background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--amber-text); border-radius: 10px; padding: .7rem .9rem; }
