/* EVO TrustGuard — page-help.css
 *
 * Owned by:    help.html
 * Category:    portal feature page (in-app Help & How-To, C113)
 * Cascade:     tokens → base → utilities → components → portal-chrome → shared → shared-themes → page
 * Edit policy: rules unique to this page only. Anything used by 5+
 *              pages should be promoted to /css/components.css or
 *              /css/portal-chrome.css with a /css/AGENTS.md update.
 *
 * Design system: cards are the canonical Tier-1 recipe (the .tg-tier1 class
 *                on each element — var(--tier1-bg) + --hairline + --radius-2xl
 *                + --shadow-float + ::before edge highlight). The search bar +
 *                section chrome use the 3G.1 Glass tokens. Accent = var(--red).
 *                ALL colors via tokens — ZERO hardcoded hex in this file.
 */

/* ── Page shell — centered 720px column, matches the dashboard greeting/tile
   column so Help lines up with the rest of the portal. ── */
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); line-height: var(--leading-relaxed); min-height: 100vh; padding-bottom: var(--space-20); }
.help-wrap { max-width: 720px; margin: 0 auto; width: 100%; padding: 0 var(--space-5); }

/* ── Welcome banner (first run, ?welcome=1) — Tier-1 surface with the brand
   accent edge. Ships hidden; page-help.js un-hides on the param. ── */
.help-welcome { margin-top: var(--space-5); padding: var(--space-5); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.help-welcome[hidden] { display: none; }
.help-welcome-body { flex: 1; min-width: 220px; }
.help-welcome-eyebrow { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); margin-bottom: var(--space-1-5); }
.help-welcome-title { font-family: var(--font-serif); font-size: var(--text-2xl); font-weight: var(--weight-regular); line-height: var(--leading-tight); color: var(--text); }
.help-welcome-text { font-size: var(--text-md); color: var(--text-muted); margin-top: var(--space-2); line-height: var(--leading-relaxed); }
.help-welcome-btn { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; background: var(--red); color: var(--white); font-weight: var(--weight-semibold); font-size: var(--text-base); padding: var(--space-2-5) var(--space-4); border-radius: var(--radius-lg); text-decoration: none; transition: filter 0.15s ease, transform 0.18s var(--ease-spring); }
.help-welcome-btn:hover { filter: brightness(1.06); }
.help-welcome-btn:active { transform: scale(var(--press-scale)); }

/* ── Hero ── */
.help-hero { padding: var(--space-8) 0 var(--space-2); }
.help-hero-title { font-family: var(--font-serif); font-size: var(--text-display-sm); font-weight: var(--weight-regular); letter-spacing: -0.01em; line-height: var(--leading-tight); color: var(--text); }
.help-hero-title .accent { color: var(--text); }
.help-hero-sub { color: var(--text-muted); margin-top: var(--space-2); font-size: var(--text-lg); max-width: 54ch; line-height: var(--leading-relaxed); }

/* ── Search bar — Glass Tier-3 surface ── */
.help-search { margin-top: var(--space-4-5); display: flex; align-items: center; gap: var(--space-2-5); min-height: 48px; box-sizing: border-box; background: var(--tier3-tint); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate)); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-3-5); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .help-search { background: var(--tier3-tint-opaque); }
}
.help-search-icon { width: 18px; height: 18px; flex: none; color: var(--text-faint); }
/* Compound selector (0,0,2,0) so the transparent fill beats any global
   input[type="search"] / dark-mode input background rule (0,0,1,1). */
.help-search .help-search-input { flex: 1; background: transparent; background-color: transparent; border: none; outline: none; box-shadow: none; color: var(--text); font-family: var(--font-sans); font-size: var(--text-base); min-width: 0; padding: 0; height: auto; }
.help-search .help-search-input:focus { background: transparent; background-color: transparent; box-shadow: none; outline: none; }
.help-search .help-search-input::placeholder { color: var(--text-faint); }
.help-search .help-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* ── No-results ── */
.help-noresults { margin-top: var(--space-6); padding: var(--space-6); text-align: center; color: var(--text-muted); font-size: var(--text-base); border: 1px dashed var(--hairline); border-radius: var(--radius-2xl); }
.help-noresults[hidden] { display: none; }

/* ── Section ── */
.help-sec { margin-top: var(--space-8); }
.help-sec-head { display: flex; align-items: baseline; gap: var(--space-2-5); margin-bottom: var(--space-1); padding-left: var(--space-0-5); }
.help-sec-num { font-family: var(--font-serif); font-size: var(--text-2xl); color: var(--red); line-height: 1; }
.help-sec-title { font-size: var(--text-xl); font-weight: var(--weight-bold); letter-spacing: -0.01em; color: var(--text); }
.help-sec-intro { color: var(--text-muted); font-size: var(--text-md); margin: 0 0 var(--space-3-5); padding-left: var(--space-8); }
@media (max-width: 560px) { .help-sec-intro { padding-left: var(--space-0-5); } }

/* ── How-to cards (Tier-1 recipe via .tg-tier1) ── */
.help-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.help-card { padding: var(--space-4) var(--space-4-5); cursor: pointer; transition: transform 0.18s var(--ease-spring), border-color 0.15s ease; display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-4); align-items: start; overflow: hidden; }
.help-card:active { transform: scale(var(--press-scale)); }
.help-card > .help-card-title, .help-card > .help-card-desc, .help-card > details { grid-column: 2; text-align: left; }
/* Neutral icon tile — mirrors the canonical .tg-icon-tile recipe
   (components.css: --icon-tile-bg gradient + hairline edge) rather than a
   bespoke red wash, so the glyphs read as native chrome. Red stays scarce on
   this page (section numbers, "Show steps", FAQ plus, Get-support CTA). C114. */
.help-card-tile { width: 38px; height: 38px; box-sizing: border-box; border-radius: var(--radius-lg); background: var(--icon-tile-bg); border: 1px solid var(--hairline); display: grid; place-items: center; grid-column: 1; grid-row: 1; }
.help-card-tile svg { width: 20px; height: 20px; color: var(--mid); }
.help-card-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin-bottom: var(--space-1); color: var(--text); }
.help-card-desc { font-size: var(--text-md); color: var(--text-muted); line-height: var(--leading-normal); }
.help-card details { margin-top: var(--space-2-5); }
.help-card summary { display: inline-flex; align-items: center; min-height: 32px; padding: var(--space-1-5) 0; font-size: var(--text-sm); color: var(--red); font-weight: var(--weight-semibold); cursor: pointer; list-style: none; }
.help-card summary::-webkit-details-marker { display: none; }
.help-card ol { margin: var(--space-2-5) 0 var(--space-0-5); padding-left: var(--space-4-5); color: var(--text-muted); font-size: var(--text-md); }
.help-card ol li { margin-bottom: var(--space-1-5); line-height: var(--leading-normal); }
.help-card ol li b { color: var(--text); font-weight: var(--weight-semibold); }
.help-card mark { background: var(--red-faint); color: var(--text); border-radius: var(--radius-sm); padding: 0 2px; }

/* ── FAQ (single Tier-1 container, hairline-divided rows) ── */
.help-faq { overflow: hidden; }
.help-faq details { border-bottom: 1px solid var(--hairline); }
.help-faq details:last-child { border-bottom: none; }
.help-faq summary { padding: var(--space-4) var(--space-4-5); font-size: var(--text-base); font-weight: var(--weight-medium); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3-5); list-style: none; color: var(--text); }
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq-plus { flex: none; width: 20px; height: 20px; color: var(--text-faint); transition: transform 0.2s ease, color 0.2s ease; }
.help-faq details[open] summary .help-faq-plus { transform: rotate(45deg); color: var(--red); }
.help-faq-ans { padding: 0 var(--space-4-5) var(--space-4); color: var(--text-muted); font-size: var(--text-md); line-height: var(--leading-loose); }

/* ── Still-need-help hub ── */
.help-hub { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 560px) { .help-hub { grid-template-columns: 1fr; } }
.help-hub-card { padding: var(--space-4-5); }
.help-hub-card.live { border-color: var(--red); }
.help-hub-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin-bottom: var(--space-1-5); display: flex; align-items: center; gap: var(--space-2); color: var(--text); }
.help-hub-title svg { width: 18px; height: 18px; color: var(--mid); flex: none; }
.help-hub-desc { font-size: var(--text-md); color: var(--text-muted); margin-bottom: var(--space-3-5); line-height: var(--leading-normal); }
.help-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; background: var(--red); color: var(--white); font-weight: var(--weight-semibold); font-size: var(--text-base); padding: var(--space-2-5) var(--space-4); border-radius: var(--radius-lg); text-decoration: none; border: none; cursor: pointer; font-family: var(--font-sans); transition: filter 0.15s ease, transform 0.18s var(--ease-spring); }
.help-btn:hover { filter: brightness(1.06); }
.help-btn:active { transform: scale(var(--press-scale)); }
.help-btn.ghost { background: transparent; border: 1px solid var(--hairline); color: var(--text-muted); cursor: not-allowed; }
.help-btn.ghost:hover { filter: none; }
.help-btn.ghost:active { transform: none; }
.help-soon { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); border: 1px solid var(--hairline); border-radius: var(--radius-pill); padding: 2px var(--space-2); margin-left: var(--space-1-5); }
