/* Support page (search, sticky section nav, FAQ groups, policy summaries, contact band) and the 404 page.
   Shared primitives (.page-head, .input, .icon-btn, .acc, .tag, .join, .mesh, .link, .btn) come from
   components.css / sections.css; everything here reads from tokens.css. */

/* ---------- Search ---------- */
.faq-search { display: grid; gap: var(--s-3); align-items: center; max-width: 760px; }
@media (min-width: 640px) { .faq-search { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-4); } }
.faq-search__row { position: relative; }
.faq-search__row > svg { position: absolute; left: 20px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); stroke: var(--fg-3); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke var(--t-fast); }
.faq-search__row:focus-within > svg { stroke: var(--lime); }
.faq-search__row .input { min-height: 56px; padding-left: 3.1rem; font-size: var(--text-md); text-overflow: ellipsis; }
.faq-search__row.has-value .input { padding-right: 3.4rem; }
.faq-search__row .input::-webkit-search-cancel-button, .faq-search__row .input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.faq-search__clear { position: absolute; right: 6px; top: 6px; color: var(--fg-2); }
.faq-search__clear svg { width: 16px; height: 16px; }
.faq-search__count { color: var(--fg-3); white-space: nowrap; min-height: 1.2em; }

/* ---------- Layout: section nav + groups ---------- */
.support { --support-nav-h: 54px; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
.support > * { min-width: 0; }
@media (min-width: 900px) {
  .support { grid-template-columns: 240px minmax(0, 820px); gap: var(--s-9); align-items: start; }
  .support__body { grid-column: 2; } /* stays put when a search hides the nav */
}

/* Phones: a floating glass strip that sticks under the top edge (the dock is at the bottom there) and scrolls sideways.
   Desktop: a sticky column beside the answers with a 1px line and a lime marker that slides to the current section. */
.support__nav { position: sticky; top: 10px; z-index: var(--z-sticky); border-radius: var(--r-pill); background: rgb(21 21 24 / 0.82); border: 1px solid var(--glass-line); backdrop-filter: blur(var(--glass-blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3); box-shadow: var(--shadow-1); }
.support__nav ul { position: relative; isolation: isolate; display: flex; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; border-radius: inherit; }
.support__nav ul::-webkit-scrollbar { display: none; }
.support__nav li { display: flex; flex: none; }
.support__nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; color: var(--fg-2); white-space: nowrap; border-radius: var(--r-pill); transition: color var(--t-fast); }
.support__nav a:hover { color: var(--fg); }
.support__nav a[aria-current] { color: var(--lime); }
.support__nav-ink { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: var(--x, 0px); width: var(--w, 0px); background: rgb(255 255 255 / 0.1); border-radius: var(--r-pill); opacity: 0; pointer-events: none; transition: left var(--t-base) var(--ease-expo), width var(--t-base) var(--ease-expo), opacity var(--t-fast); }
@media (min-width: 900px) {
  .support__nav { top: var(--page-top); z-index: auto; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .support__nav ul { flex-direction: column; gap: 2px; padding: 0 0 0 var(--s-4); overflow: visible; border-left: 1px solid var(--line); border-radius: 0; }
  .support__nav li { flex: initial; }
  .support__nav li.is-policy + li.is-policy { margin-top: 0; }
  .support__nav li:not(.is-policy) + li.is-policy { margin-top: var(--s-4); }
  .support__nav a { min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-2); transition: color var(--t-fast), background var(--t-fast); }
  .support__nav a:hover { background: var(--glass); }
  .support__nav-ink { top: var(--y, 0px); bottom: auto; left: -1px; width: 2px; height: var(--h, 0px); background: var(--lime); border-radius: 0; box-shadow: 0 0 12px rgb(216 255 63 / 0.6); transition: top var(--t-base) var(--ease-expo), height var(--t-base) var(--ease-expo), opacity var(--t-fast); }
}

/* Anchors land clear of the sticky strip (phones) or the floating dock (desktop). */
.support__group, [data-faq-item] { scroll-margin-top: calc(var(--support-nav-h, 54px) + 26px); }
@media (min-width: 900px) { .support__group, [data-faq-item] { scroll-margin-top: var(--page-top); } }

.support__body { display: grid; gap: var(--s-8); }
.support__group { display: grid; gap: var(--s-5); }
.support__group-head { display: flex; align-items: baseline; gap: var(--s-3); }
.support__group-head > .mono { flex: none; }
/* The question wrapper is a heading for outline only — its type comes from the trigger. */
.support__q { font: inherit; font-variation-settings: "opsz" 14; line-height: inherit; letter-spacing: 0; text-wrap: initial; }
.support__q .acc__trigger { line-height: 1.35; }
.acc__item:target { border-color: rgb(216 255 63 / 0.5); }

/* Policy summaries: one glass panel, a row per point. A search hides the points that do not match, so the first
   visible row (marked .is-first by faq.js; :first-child covers the no-JS page) drops its rule instead of the first one. */
.support__policy .support__group-head { flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3) var(--s-4); }
.support__policy .tag { color: var(--fg-2); white-space: normal; max-width: 100%; border-radius: var(--r-2); line-height: 1.4; }
.policy { display: grid; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.policy > div { display: grid; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); }
.policy > div:first-child, .policy > div.is-first { border-top: 0; }
@media (min-width: 640px) { .policy > div { grid-template-columns: 180px minmax(0, 1fr); gap: var(--s-5); padding-block: var(--s-5); } }
.policy dt { color: var(--fg-3); padding-top: 3px; }
.policy dd { color: var(--fg-2); text-wrap: pretty; }

/* Empty state */
.support__empty { display: grid; gap: var(--s-2); justify-items: start; padding: var(--s-6); border-radius: var(--r-3); }
.support__empty .link { min-height: var(--tap); margin-top: var(--s-2); }

/* ---------- Still stuck ---------- */
.support__help p { max-width: 44ch; }
.support__help p.support__help-facts { margin-top: var(--s-4); max-width: none; }
.support__help-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
.support__help-actions .link { min-height: var(--tap); }
@media (min-width: 900px) { .support__help-actions { justify-content: end; } }

/* ---------- 404 ---------- */
.notfound { isolation: isolate; overflow: clip; display: grid; min-height: 100svh; }
.notfound .mesh { opacity: 0.8; }
/* The mesh dissolves into the page instead of stopping at the section's edge. */
.notfound::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; z-index: -1; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; }
.notfound__inner { display: grid; grid-template-rows: auto 1fr; }
.notfound__block { display: grid; gap: var(--s-4); align-content: center; justify-items: start; padding-block: var(--s-7) var(--s-6); }
.notfound__code { font-size: clamp(5rem, 1.5rem + 20vw, 20rem); line-height: 0.85; margin-bottom: var(--s-2); }
.notfound__block h1 { max-width: 12ch; }
.notfound__block p { max-width: 46ch; }
.notfound__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-2); }
.notfound__links li { display: flex; }
.notfound__links .link { min-height: var(--tap); }
.notfound__block .btn { margin-top: var(--s-3); }
.notfound__block .btn:hover .ic { transform: none; }
/* Phones: the dock sits at the bottom of the screen, so the full-height first screen reserves that zone and the block
   is centred in what is actually visible; on short phones the stack is also tightened so the button clears the dock. */
@media (max-width: 899.98px) {
  .notfound { padding-bottom: calc(var(--dock-h-m) + max(var(--dock-gap-m), env(safe-area-inset-bottom)) + var(--s-4)); }
  .notfound__block { gap: var(--s-3); padding-block: var(--s-5) var(--s-4); }
  .notfound__links { gap: 0 var(--s-5); margin-top: 0; }
  .notfound__block .btn { margin-top: var(--s-2); }
}
/* Short phones (320x568 and the like): a smaller numeral and less air so the whole block fits above the dock. */
@media (max-width: 899.98px) and (max-height: 620px) {
  .notfound__block { padding-top: var(--s-3); }
  .notfound__code { font-size: clamp(4rem, 1rem + 18vw, 20rem); margin-bottom: 0; }
}
