/* Fence Branders product help center.
   Loaded after site.css on /products/ and /help/ pages. Uses site.css tokens. */

/* ---------- hero band ---------- */
.help-hero {
  background: var(--fb-forest);
  color: var(--fb-cream);
  padding: 44px 0 40px;
  border-bottom: 1px solid var(--fb-forest-2);
}
.help-hero .crumbs {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: var(--text-xs); letter-spacing: 0.04em;
  color: rgba(253, 252, 247, 0.66);
  margin: 0 0 18px; padding: 0; list-style: none;
}
.help-hero .crumbs a { color: rgba(253, 252, 247, 0.82); border-bottom: 1px solid transparent; }
.help-hero .crumbs a:hover { color: var(--fb-green); border-bottom-color: var(--fb-green); }
.help-hero .crumbs li + li::before { content: '/'; margin-right: 6px; color: rgba(253, 252, 247, 0.4); }
.help-pill {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fb-forest); background: var(--fb-green);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.help-hero h1 {
  color: var(--fb-cream);
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin-bottom: 10px;
}
.help-hero h1 .accent { color: var(--fb-green); }
.help-hero .lede { color: rgba(253, 252, 247, 0.84); font-size: var(--text-lg); max-width: 62ch; margin: 0; }

/* ---------- search ---------- */
.help-search { position: relative; max-width: 620px; margin-top: 24px; }
.help-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.help-search input {
  width: 100%;
  padding: 15px 18px 15px 48px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--fb-cream);
  color: var(--fb-ink);
  font-size: var(--text-base);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}
.help-search input::placeholder { color: var(--fb-muted); }
.help-search input:focus { outline: none; border-color: var(--fb-green); }
.help-search svg {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; stroke: var(--fb-forest-3); pointer-events: none;
}
.help-results {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--fb-cream); color: var(--fb-body);
  border: 1px solid var(--fb-line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: 8px; margin: 0; list-style: none;
  max-height: min(420px, 60vh); overflow-y: auto;
}
.help-results[hidden] { display: none; }
.help-results a { display: block; padding: 10px 12px; border-radius: 8px; }
.help-results a:hover, .help-results a.is-active { background: var(--fb-cream-2); }
.help-results b { display: block; font-family: var(--font-display); font-weight: 600; color: var(--fb-forest); font-size: var(--text-sm); }
.help-results small { display: block; color: var(--fb-muted); font-size: 0.78rem; margin-top: 2px; }
.help-results .where { color: var(--fb-forest-3); font-weight: 600; }
.help-results .empty { padding: 12px; font-size: var(--text-sm); color: var(--fb-muted); }
.help-results mark { background: rgba(198, 242, 134, 0.6); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---------- three-column layout ---------- */
.help-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 200px;
  gap: 48px;
  padding-top: 44px; padding-bottom: 72px;
  align-items: start;
}
.help-side, .help-toc { position: sticky; top: calc(var(--header-h) + 24px); }
.help-side h2, .help-toc h2 {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fb-muted);
  margin: 0 0 10px;
}
.help-side ul, .help-toc ul { list-style: none; margin: 0; padding: 0; }
.help-side li a, .help-side li span {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px 7px 12px; border-left: 3px solid transparent;
  font-size: var(--text-sm); color: var(--fb-forest); border-radius: 0 6px 6px 0;
}
.help-side li a:hover { background: var(--fb-cream-2); }
.help-side li a[aria-current="page"] { border-left-color: var(--fb-green-3); background: rgba(198, 242, 134, 0.22); font-weight: 600; }
.help-side li span { color: var(--fb-muted); cursor: default; }
.soon {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fb-muted); border: 1px solid var(--fb-line-2); border-radius: 999px; padding: 1px 7px;
}
.help-side .sub { padding-left: 14px; }
.help-side .sub li a, .help-side .sub li span { font-size: 0.82rem; padding-top: 4px; padding-bottom: 4px; }
.help-toc li a {
  display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--fb-line);
  font-size: 0.84rem; color: var(--fb-muted);
}
.help-toc li a:hover, .help-toc li a.is-active { color: var(--fb-forest); border-left-color: var(--fb-green-3); }
.help-side-toggle { display: none; }

/* ---------- article ---------- */
.help-article { max-width: 760px; }
.help-article > section { padding: 0; scroll-margin-top: calc(var(--header-h) + 20px); }
.help-article > section + section { margin-top: 52px; padding-top: 40px; border-top: 1px solid var(--fb-line); }
.help-article h2 { font-size: 1.6rem; margin-bottom: 12px; }
.help-article h3 { font-size: 1.15rem; margin: 30px 0 10px; scroll-margin-top: calc(var(--header-h) + 20px); }
.help-article p, .help-article li, .help-article dd { font-size: 1rem; line-height: 1.65; }
.help-article p { margin-bottom: 16px; }
.help-article ul { padding-left: 0; list-style: none; margin: 0 0 18px; }
.help-article ul li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.help-article ul li::before {
  content: ''; position: absolute; left: 2px; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--fb-green-3);
}
.help-article a:not(.btn):not(.next-card) { color: var(--fb-forest-3); font-weight: 500; border-bottom: 1px solid rgba(44, 81, 25, 0.35); }
.help-article a:not(.btn):not(.next-card):hover { border-bottom-color: var(--fb-forest-3); }
.ui { font-weight: 600; color: var(--fb-forest); }

/* numbered steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 22px; }
.steps > li { counter-increment: step; position: relative; padding-left: 46px; margin-bottom: 14px; min-height: 30px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -1px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  background: var(--fb-forest); color: var(--fb-green);
}

/* screenshots */
.shot { margin: 22px 0 26px; }
.shot img {
  width: 100%; height: auto;
  border-radius: 12px; border: 1px solid var(--fb-line);
  box-shadow: var(--shadow-2); background: #fff;
}
.shot figcaption { font-size: 0.84rem; color: var(--fb-muted); margin-top: 10px; }
.shot.narrow { max-width: 460px; }
.shot.small { max-width: 380px; }
.shot.card { max-width: 250px; }
.shot.phone { max-width: 260px; }
.shot.phone img { border-radius: 26px; border: 6px solid var(--fb-ink); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; }
.split .shot { margin-top: 0; }

/* definition rows */
.defs { margin: 0 0 22px; border: 1px solid var(--fb-line); border-radius: var(--r); overflow: hidden; background: #fff; }
.defs > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 12px 16px; }
.defs > div + div { border-top: 1px solid var(--fb-line); }
.defs dt { font-family: var(--font-display); font-weight: 600; color: var(--fb-forest); font-size: 0.95rem; }
.defs dd { margin: 0; font-size: 0.95rem; }

/* callout */
.note {
  background: var(--fb-cream-2); border: 1px solid var(--fb-line); border-left: 4px solid var(--fb-green-3);
  border-radius: var(--r); padding: 14px 18px; margin: 0 0 22px;
}
.note p { margin: 0; font-size: 0.95rem; }
.note p + p { margin-top: 8px; }
.note strong { color: var(--fb-forest); font-family: var(--font-display); }

/* setup checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; counter-reset: chk; }
.checklist li {
  counter-increment: chk;
  display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; align-items: start;
  background: #fff; border: 1px solid var(--fb-line); border-radius: var(--r); padding: 16px 18px;
}
.checklist li::before {
  content: counter(chk);
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--fb-green); color: var(--fb-forest); font-family: var(--font-display); font-weight: 700;
}
.checklist b { display: block; font-family: var(--font-display); color: var(--fb-forest); margin-bottom: 2px; }
.checklist p { margin: 0; font-size: 0.95rem; }

/* FAQ */
.faq details { border: 1px solid var(--fb-line); border-radius: var(--r); background: #fff; margin-bottom: 10px; scroll-margin-top: calc(var(--header-h) + 20px); }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 44px 14px 18px; position: relative;
  font-family: var(--font-display); font-weight: 600; color: var(--fb-forest);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--fb-forest-3); }
.faq details[open] summary::after { content: '\2212'; }
.faq details > div { padding: 0 18px 16px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* next / contact */
.help-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 52px; }
.next-card {
  display: block; border: 1px solid var(--fb-line); border-radius: var(--r); padding: 16px 18px; background: #fff;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.next-card:hover { border-color: var(--fb-green-3); transform: translateY(-1px); }
.next-card small { display: block; font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fb-muted); }
.next-card b { font-family: var(--font-display); color: var(--fb-forest); }
.next-card.right { text-align: right; grid-column: 2; }
.help-contact {
  margin-top: 28px; background: var(--fb-forest); color: var(--fb-cream); border-radius: var(--r-lg);
  padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between;
}
.help-contact p { margin: 0; }
.help-contact b { font-family: var(--font-display); color: var(--fb-green); }
.help-contact a, .help-article .help-contact a:not(.btn) { color: var(--fb-cream); border-bottom: 1px solid rgba(253, 252, 247, 0.4); }
.help-contact a:hover, .help-article .help-contact a:not(.btn):hover { color: var(--fb-green); border-bottom-color: var(--fb-green); }

/* ---------- help home + products ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.topic { position: relative; background: #fff; border: 1px solid var(--fb-line); border-radius: var(--r-lg); padding: 20px 20px 18px; }
.topic h3 { font-size: 1.1rem; margin: 0 0 6px; }
.topic p { margin: 0; font-size: 0.92rem; color: var(--fb-muted); }
.topic a.cover { position: absolute; inset: 0; border-radius: inherit; }
.topic.ready { transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.topic.ready:hover { border-color: var(--fb-green-3); box-shadow: var(--shadow-1); transform: translateY(-2px); }
.topic.ready h3::after { content: ' \2192'; color: var(--fb-forest-3); }
.topic.later { background: transparent; border-style: dashed; }
.topic.later h3 { color: var(--fb-muted); }
.topic .soon { position: absolute; top: 16px; right: 16px; }
.help-home { padding-top: 44px; padding-bottom: 72px; }
.help-home h2 { font-size: 1.5rem; margin: 0 0 16px; }
.help-home .group + .group { margin-top: 44px; }

.product-card {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0;
  background: #fff; border: 1px solid var(--fb-line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-1);
}
.product-card .pc-body { padding: 36px; }
.product-card .pc-body h2 { font-size: 2rem; margin-bottom: 8px; }
.product-card .pc-body p { color: var(--fb-body); }
.product-card .pc-media { background: var(--fb-cream-2); display: flex; align-items: center; justify-content: center; padding: 24px; border-left: 1px solid var(--fb-line); }
.product-card .pc-media img { border-radius: 10px; border: 1px solid var(--fb-line); box-shadow: var(--shadow-2); }
.product-card .pc-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.product-card ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 6px; }
.product-card ul li { padding-left: 20px; position: relative; font-size: 0.95rem; }
.product-card ul li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 2px; background: var(--fb-green-3); }
.more-soon { margin-top: 22px; color: var(--fb-muted); font-size: 0.95rem; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .help-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .help-toc { display: none; }
}
@media (max-width: 860px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 20px; }
  .help-side { position: static; margin-bottom: 28px; }
  .help-side-toggle {
    display: flex; width: 100%; align-items: center; justify-content: space-between;
    padding: 12px 16px; border: 1px solid var(--fb-line); border-radius: var(--r); background: #fff;
    font-family: var(--font-display); font-weight: 600; color: var(--fb-forest);
  }
  .help-side-toggle::after { content: '\25BE'; color: var(--fb-forest-3); }
  .help-side-toggle[aria-expanded="true"]::after { content: '\25B4'; }
  .help-side nav { display: none; margin-top: 10px; }
  .help-side.is-open nav { display: block; }
  .help-side h2 { display: none; }
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card { grid-template-columns: 1fr; }
  .product-card .pc-media { border-left: 0; border-top: 1px solid var(--fb-line); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .help-hero { padding: 32px 0 30px; }
  .defs > div { grid-template-columns: 1fr; gap: 2px; }
  .topic-grid { grid-template-columns: 1fr; }
  .help-next { grid-template-columns: 1fr; }
  .next-card.right { grid-column: auto; }
  .product-card .pc-body { padding: 24px; }
  .steps > li { padding-left: 42px; }
}

@media print {
  .site-header, .footer, .help-side, .help-toc, .help-search, .help-next, .help-contact { display: none !important; }
  .help-layout { display: block; padding: 0; }
  .help-hero { background: none; color: var(--fb-ink); padding: 0 0 12px; }
  .help-hero h1, .help-hero .lede { color: var(--fb-ink); }
  .faq details > div { display: block; }
  .shot img { box-shadow: none; }
}
