/* ===================================================
   FINYXFIN HELP DESIGN SYSTEM  v2.0
   One unified stylesheet for all help pages.

   §  1  Design tokens
   §  2  Global reset & base
   §  3  Navigation  (sticky)
   §  4  Footer
   §  5  Help page shell & 2-column grid
   §  6  Sidebar
   §  7  Mobile sidebar controls
   §  8  Help content & typography
   §  9  Components
          9a  Section spacing
          9b  Video section
          9c  Feature grid
          9d  Steps
          9e  Callout boxes (info / success / warning / highlight)
          9f  Content cards
          9g  Callout alt (data-protection style)
          9h  Account / bill types grids
          9i  Tables (sync-table, shortcut-table, help-content table)
          9j  FAQ list
          9k  Sync-options
          9l  Flow diagram
          9m  Divider & accent-note
          9n  Premium & beta badges
          9o  Back link
          9p  KBD
          9q  Loan / Goal visual widgets
          9r  Adjustment options
          9s  Stats grid
          9t  Action pills (investments)
          9u  Siri examples
          9v  TOC block
          9w  Danger box
          9x  Status badges
          9y  Video links row
   § 10  Utility classes
   § 11  Responsive breakpoints

   Breakpoints
   ─────────────────────────────────────────────────
     xs : < 480 px   (small phones)
     sm : 480–767 px (large phones)
     md : 768–959 px (tablets)
     lg : ≥ 960 px   (desktop)
=================================================== */


/* ═══════════════════════════════════════════════════
   § 1 · DESIGN TOKENS
═══════════════════════════════════════════════════ */
:root {
  /* ── Brand ── */
  --brand-primary:    #667eea;
  --brand-secondary:  #764ba2;
  --brand-red:        #ef4444;
  --gradient-brand:   linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Legacy aliases for backward compat */
  --primary-color:    var(--brand-primary);
  --secondary-color:  var(--brand-secondary);
  --accent-red:       var(--brand-red);
  --gradient-primary: var(--gradient-brand);

  /* ── Backgrounds ── */
  --global-bg:   #f5f6fa;
  --global-bg-2: #edf1f8;
  --card-bg:     #ffffff;

  /* ── Text ── */
  --text-primary:   #1a1a2e;
  --text-secondary: #49556a;
  --text-muted:     #94a3b8;

  /* ── Borders & shadows ── */
  --border-color: #e2e8f0;
  --border-subtle: rgba(255, 255, 255, 0.70);
  --shadow-sm:  0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md:  0 10px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg:  0 20px 48px rgba(15, 23, 42, 0.12);

  /* ── Semantic palette ── */
  --blue:        #0a84ff;
  --blue-soft:   rgba(10,  132, 255, 0.09);
  --green:       #16a34a;
  --green-soft:  rgba(22,  163,  74, 0.09);
  --orange:      #d97706;
  --orange-soft: rgba(217, 119,   6, 0.09);
  --purple:      #667eea;
  --purple-soft: rgba(102, 126, 234, 0.10);
  --red:         #ef4444;
  --red-soft:    rgba(239,  68,  68, 0.09);

  /* ── Radii ── */
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm:  9px;
  --radius-xs:  6px;
}


/* ═══════════════════════════════════════════════════
   § 2 · GLOBAL RESET & BASE
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1000px 500px at 88% -12%, rgba(102, 126, 234, 0.13), transparent 55%),
    linear-gradient(180deg, #f8f9fc 0%, var(--global-bg) 45%, var(--global-bg-2) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; }

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


/* ═══════════════════════════════════════════════════
   § 3 · NAVIGATION  (sticky — stays in document flow)
═══════════════════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  isolation: isolate;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.logo .tm {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  vertical-align: super;
  margin-left: -2px;
}

/* Desktop links */
nav ul {
  display: flex;
  list-style: none;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}

nav a:hover {
  background: rgba(102, 126, 234, 0.08);
  color: var(--brand-primary);
}

/* Hamburger — hidden desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.18s;
}

.nav-hamburger:hover { background: rgba(102, 126, 234, 0.07); }

.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Animated → X */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav dropdown */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 16px;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border-color);
  position: absolute;
  top: 100%; left: 0;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.nav-mobile-menu.open { display: flex; }

.nav-mobile-menu a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.18s;
}

.nav-mobile-menu a:hover { background: rgba(102, 126, 234, 0.07); }


/* ═══════════════════════════════════════════════════
   § 4 · FOOTER
═══════════════════════════════════════════════════ */
footer {
  background: var(--text-primary);
  color: #fff;
  padding: 3rem 5%;
  text-align: center;
  margin-top: auto;
}

footer .logo-img {
  height: 40px;
  margin: 0 auto 14px;
  opacity: 0.85;
}

footer p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.87rem;
  line-height: 1.65;
  margin: 0.35rem 0;
}

.legal-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.legal-links a {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 0.87rem;
  transition: color 0.2s;
}

.legal-links a:hover { color: #fff; }

/* ── nav-cta (Download button) ── */
.nav-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border-radius: 10px;
  padding: 0.45rem 1.1rem !important;
  font-weight: 600;
}
.nav-cta:hover {
  opacity: 0.88;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

/* ── Social links (footer) ── */
.social-links {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.social-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 600;
}
.social-icons { display: flex; gap: 0.6rem; align-items: center; }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.social-icon:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.social-icon svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── YouTube tutorial callout (help footer) ── */
.yt-callout {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-top: 1.25rem;
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.55);
}
.yt-callout a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.yt-callout a:hover { color: #fff; }


/* ═══════════════════════════════════════════════════
   § 5 · HELP PAGE SHELL & 2-COLUMN GRID
═══════════════════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.help-page {
  padding: 32px 0 60px;
  min-height: calc(100vh - 66px);
  flex: 1;
}

/* 2-column grid: sidebar | content */
.help-wrapper {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}


/* ═══════════════════════════════════════════════════
   § 6 · SIDEBAR
═══════════════════════════════════════════════════ */
#helpSidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #dbe4ef transparent;
}

#helpSidebar::-webkit-scrollbar       { width: 5px; }
#helpSidebar::-webkit-scrollbar-track { background: transparent; }
#helpSidebar::-webkit-scrollbar-thumb { background: #dbe4ef; border-radius: 999px; }

#helpSidebar .help-sidebar { position: static !important; }

.help-sidebar {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  padding: 18px 14px 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.help-sidebar h3 {
  margin: 0 0 12px;
  padding: 0 4px;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

/* Collapsible groups */
.sidebar-group { margin-bottom: 2px; }

.sidebar-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.18s, color 0.18s;
  text-align: left;
  gap: 6px;
}

.sidebar-group-toggle:hover { background: #f1f5f9; }

.sidebar-group-toggle.active-group {
  background: #eef2ff;
  color: #4f46e5;
}

.sidebar-group-toggle.active-group .sidebar-chevron { color: #4f46e5; }

.sidebar-group-label { flex: 1; }

.sidebar-chevron {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: transform 0.22s ease;
  display: inline-block;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-group-toggle[aria-expanded="true"] .sidebar-chevron { transform: rotate(90deg); }

/* Sub-links */
.sidebar-group-links {
  display: none;
  padding: 2px 0 4px 10px;
  border-left: 2px solid #e2e8f0;
  margin-left: 10px;
  margin-top: 2px;
}

.sidebar-group-links.open { display: block; }

.sidebar-group-links a {
  display: block;
  padding: 5px 9px;
  margin-bottom: 1px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.81rem;
  line-height: 1.45;
  transition: background 0.18s, color 0.18s;
}

.sidebar-group-links a:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.sidebar-group-links a.active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}


/* ═══════════════════════════════════════════════════
   § 7 · MOBILE SIDEBAR CONTROLS
═══════════════════════════════════════════════════ */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 200;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sidebar-backdrop.open { display: block; }

/* Toggle button — hidden desktop */
.sidebar-mobile-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.18s;
  margin-bottom: 14px;
}

.sidebar-mobile-toggle:hover { background: rgba(241, 245, 249, 0.98); }
.sidebar-mobile-toggle svg   { flex-shrink: 0; }


/* ═══════════════════════════════════════════════════
   § 8 · HELP CONTENT & TYPOGRAPHY
═══════════════════════════════════════════════════ */
.help-content {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  min-width: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ── Headings ── */
.help-content h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
}

.help-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

.help-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.75rem 0 0.55rem;
}

.help-content h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.3rem;
}

/* ── Body text ── */
.help-content p {
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.72;
  margin: 0 0 0.85rem;
}

.help-content ul,
.help-content ol {
  color: var(--text-secondary);
  padding-left: 1.4rem;
  margin: 0 0 0.85rem;
}

.help-content li {
  font-size: 0.97rem;
  line-height: 1.65;
  margin-bottom: 0.42rem;
}

.help-content strong  { color: var(--text-primary); font-weight: 600; }
.help-content em      { font-style: italic; }

.help-content a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}

.help-content a:hover { text-decoration: underline; }

.help-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}


/* ═══════════════════════════════════════════════════
   § 9 · COMPONENTS
═══════════════════════════════════════════════════ */

/* ── 9a · Section spacing ─────────────────────── */
.section { margin-bottom: 52px; }

/* ── 9b · Video section ──────────────────────── */
.video-section {
  background: linear-gradient(160deg, #1a2035 0%, #323c55 100%);
  border-radius: var(--radius-lg);
  padding: 26px 24px 22px;
  margin: 0 0 2rem;
  text-align: center;
  border: none;
}

.video-section h3 {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.video-section p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.87rem;
  margin: 0 0 1rem;
}

.video-link,
button.video-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.87rem;
  font-weight: 600;
  font-family: inherit;
  padding: 9px 20px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

a.video-link {
  color: #fff !important;
  text-decoration: none;
}

.video-link:hover { opacity: 0.86; transform: translateY(-1px); }

/* ── 9c · Feature grid ───────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 1.2rem 0;
}

.feature-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(102, 126, 234, 0.28);
}

.feature-card .icon {
  font-size: 1.65em;
  line-height: 1;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 5px;
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

/* ── 9d · Steps ───────────────────────────────── */
.steps {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  margin: 1rem 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.step:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.step-number {
  background: var(--gradient-brand);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

.step-content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 3px;
}

.step-content p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

.step-content ul,
.step-content ol {
  font-size: 0.86rem;
  color: var(--text-secondary);
  padding-left: 1.2rem;
  margin: 5px 0 0;
}

/* ── 9e · Callout boxes ───────────────────────── */
.info-box,
.success-box,
.warning-box,
.highlight-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid;
  margin: 1rem 0;
}

.info-box      { background: var(--blue-soft);   border-left-color: var(--blue);   }
.success-box   { background: var(--green-soft);  border-left-color: var(--green);  }
.warning-box   { background: var(--orange-soft); border-left-color: var(--orange); }
.highlight-box { background: var(--purple-soft); border-left-color: var(--purple); }

.info-box strong,
.success-box strong,
.warning-box strong,
.highlight-box strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.info-box      strong { color: var(--blue);   }
.success-box   strong { color: var(--green);  }
.warning-box   strong { color: var(--orange); }
.highlight-box strong { color: var(--purple); }

.info-box p,
.success-box p,
.warning-box p,
.highlight-box p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.info-box ul,
.success-box ul,
.warning-box ul,
.highlight-box ul {
  margin: 5px 0 0;
  padding-left: 1.2rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* ── 9f · Content cards ───────────────────────── */
.content-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.content-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.content-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

.content-card p {
  font-size: 0.96rem;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.65;
}

.content-card ul,
.content-card ol {
  margin: 6px 0 14px;
  padding-left: 1.3rem;
  color: var(--text-secondary);
}

.content-card li {
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.content-card li strong { color: var(--text-primary); }

/* ── 9g · Callout alt (data-protection) ──────── */
.callout {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple);
  background: var(--purple-soft);
  margin: 1rem 0;
}

.callout.success { border-left-color: var(--green);  background: var(--green-soft);  }
.callout.warning { border-left-color: var(--orange); background: var(--orange-soft); }

.callout strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 5px;
}

.callout.success strong { color: var(--green);  }
.callout.warning strong { color: var(--orange); }

.callout p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── 9h · Account / bill types grids ─────────── */
.account-types,
.bill-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 12px;
  margin: 1rem 0;
}

.account-type,
.bill-type,
.bill-type-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.account-type:hover,
.bill-type:hover,
.bill-type-card:hover {
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.account-type .icon,
.bill-type .icon,
.bill-type-card .icon { font-size: 1.55em; line-height: 1; margin-bottom: 8px; }

.account-type h4,
.bill-type h4,
.bill-type-card h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.bill-type p,
.bill-type-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

/* ── 9i · Tables ──────────────────────────────── */
.sync-table,
.shortcut-table,
.help-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
}

.sync-table th,
.sync-table td,
.shortcut-table th,
.shortcut-table td,
.help-content th,
.help-content td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.sync-table th,
.shortcut-table th,
.help-content th {
  background: rgba(241, 245, 249, 0.75);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sync-table td,
.shortcut-table td,
.help-content td { color: var(--text-secondary); }

.sync-table tr:last-child td,
.shortcut-table tr:last-child td,
.help-content tr:last-child td { border-bottom: none; }

.sync-table tbody tr:hover td,
.shortcut-table tbody tr:hover td { background: rgba(102, 126, 234, 0.03); }

/* ── 9j · FAQ list ────────────────────────────── */
.faq { margin: 1rem 0; }

.faq-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  padding: 13px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  border-bottom: 1px solid var(--border-color);
}

.faq-answer {
  padding: 12px 16px 13px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── 9k · Sync-options ────────────────────────── */
.sync-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  margin: 1rem 0;
}

.sync-option {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s;
}

.sync-option.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.sync-option .icon { font-size: 1.45em; line-height: 1; margin-bottom: 4px; }
.sync-option h4    { font-size: 0.87rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.sync-option p     { font-size: 0.8rem; color: var(--text-secondary); margin: 0; }

.toggle {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  margin-top: 6px;
  align-self: flex-start;
}

.toggle.on  { background: rgba(22, 163, 74, 0.18); color: var(--green); }
.toggle.off { background: rgba(148, 163, 184, 0.14); color: var(--text-muted); }

/* ── 9l · Flow diagram ────────────────────────── */
.flow-diagram {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 1rem 0;
}

.flow-diagram h4 {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.flow-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-primary);
}

.flow-item.highlight {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
}

.flow-arrow { color: var(--text-muted); font-size: 1.1rem; font-weight: 600; }

/* ── 9m · Divider & accent-note ──────────────── */
.divider {
  height: 1px;
  background: var(--border-color);
  border: none;
  margin: 3rem 0;
}

.accent-note {
  margin-top: 12px;
  font-weight: 500;
  color: var(--brand-primary);
  font-size: 0.93rem;
}

/* ── 9n · Premium & beta badges ──────────────── */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.beta-badge,
.beta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: #fef08a;
  color: #713f12;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  vertical-align: middle;
}

/* ── 9o · Back link ───────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.back-link:hover { text-decoration: underline; }

/* ── 9p · KBD ─────────────────────────────────── */
kbd,
.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Courier New", monospace;
  font-size: 0.83em;
  padding: 2px 7px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-xs);
  background: rgba(248, 250, 252, 0.95);
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: 0 1px 0 #cbd5e1;
}

.shortcut-keys {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── 9q · Loan / Goal visual widgets ─────────── */
.loan-visual,
.progress-visual {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 1rem 0;
}

.loan-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.loan-header h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.loan-header .amount { font-size: 1.25rem; font-weight: 700; color: var(--brand-primary); }

.loan-progress,
.progress-bar-container {
  background: #e2e8f0;
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
  margin: 8px 0;
}

.loan-progress-bar,
.progress-bar {
  height: 100%;
  border-radius: 100px;
  background: var(--gradient-brand);
  transition: width 0.4s ease;
}

.w-50 { width: 50%; }
.w-65 { width: 65%; }

.loan-stats,
.progress-labels {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.loan-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loan-stat .value,
.progress-labels .value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.loan-stat .label,
.progress-labels .label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── 9r · Adjustment options ─────────────────── */
.adjustment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 1rem 0;
}

.adjustment-option {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.adjustment-option:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(102, 126, 234, 0.28);
}

.adjustment-option .icon { font-size: 1.5em; line-height: 1; margin-bottom: 10px; }

.adjustment-option h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 5px;
}

.adjustment-option p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

/* ── 9s · Stats grid (backup / investments) ───── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin: 1rem 0;
}

.stat-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-card .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand-primary);
  display: block;
}

.stat-card .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  display: block;
}

/* ── 9t · Action pills (investments) ─────────── */
.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.75rem 0;
}

.action-row-vertical {
  flex-direction: column;
  align-items: flex-start;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(102, 126, 234, 0.12);
  color: var(--brand-primary);
  white-space: nowrap;
}

.pill-green  { background: rgba(22, 163, 74, 0.12);  color: var(--green);  }
.pill-red    { background: rgba(239, 68, 68, 0.12);   color: var(--red);    }
.pill-cyan   { background: rgba(6, 182, 212, 0.12);   color: #0891b2;       }
.pill-blue   { background: rgba(10, 132, 255, 0.12);  color: var(--blue);   }
.pill-purple { background: rgba(102, 126, 234, 0.12); color: var(--purple); }
.pill-orange { background: rgba(217, 119, 6, 0.12);   color: var(--orange); }

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 1rem 0;
}

/* ── 9u · Siri examples ───────────────────────── */
.siri-examples {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 16px 10px;
  margin: 1rem 0;
}

.siri-command {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.siri-command:last-child { border-bottom: none; }

.siri-command::before {
  content: "🎙";
  flex-shrink: 0;
  font-size: 1rem;
}

/* ── 9v · TOC block ───────────────────────────── */
.toc {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 20px 16px;
  margin: 0 0 2rem;
}

.toc h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 8px; }

.toc a {
  color: var(--brand-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc a:hover { text-decoration: underline; }

/* ── 9w · Danger box ──────────────────────────── */
.danger-box {
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 1rem 0;
}

.danger-box strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 5px;
}

.danger-box p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── 9x · Status badges ───────────────────────── */
.status-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.81rem;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--text-primary);
}

.status-badge.unpaid  { background: var(--orange-soft); color: var(--orange); }
.status-badge.partial { background: var(--blue-soft);   color: var(--blue);   }
.status-badge.paid    { background: var(--green-soft);  color: var(--green);  }
.status-badge.overdue { background: var(--red-soft);    color: var(--red);    }

/* ── 9y · Video links row ─────────────────────── */
.video-links-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.video-link-alt {
  background: var(--brand-secondary);
}


/* ═══════════════════════════════════════════════════
   § 10 · UTILITY CLASSES
═══════════════════════════════════════════════════ */

/* Link variants */
.link-blue         { color: var(--blue) !important; text-decoration: none; font-weight: 500; }
.link-blue:hover   { text-decoration: underline; }

.link-accent-plain       { color: var(--brand-primary); text-decoration: none; font-weight: 500; }
.link-accent-plain:hover { text-decoration: underline; }

.link-accent-strong       { color: var(--brand-primary); text-decoration: none; font-weight: 700; }
.link-accent-strong:hover { text-decoration: underline; }

/* Spacing helpers */
.mt-0  { margin-top:    0   !important; }
.mt-8  { margin-top:    8px !important; }
.mt-10 { margin-top:   10px !important; }
.mt-12 { margin-top:   12px !important; }
.mt-20 { margin-top:   20px !important; }
.mb-0  { margin-bottom: 0   !important; }
.mb-8  { margin-bottom: 8px !important; }

/* Text helpers */
.text-xs { font-size: 0.8em; }

/* List helpers */
.list-tight { margin-top: 10px; margin-left: 20px; }


/* ═══════════════════════════════════════════════════
   § 11 · RESPONSIVE BREAKPOINTS
═══════════════════════════════════════════════════ */

/* ── TABLET (768px – 959px) ── */
@media (max-width: 959px) {
  .help-wrapper {
    grid-template-columns: 1fr;
  }

  /* Sidebar becomes fixed left drawer */
  #helpSidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 86vw);
    height: 100vh;
    max-height: none;
    z-index: 300;
    transform: translateX(-104%);
    transition: transform 0.26s ease;
    padding: 72px 0 24px;
    overflow-y: auto;
    border-radius: 0;
  }

  #helpSidebar .help-sidebar {
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  #helpSidebar.drawer-open {
    transform: translateX(0);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.15);
  }

  .sidebar-mobile-toggle {
    display: inline-flex;
  }

  .help-content {
    padding: 26px;
  }

  .help-content h1 { font-size: 1.6rem; }
  .help-content h2 { font-size: 1.28rem; }
}

/* ── MOBILE (≤ 768px) ── */
@media (max-width: 768px) {
  /* Navigation */
  nav ul         { display: none; }
  .nav-hamburger { display: flex; }

  .container { padding: 0 18px; }

  .help-page { padding: 24px 0 48px; }

  .help-content {
    padding: 22px 18px;
    border-radius: var(--radius-lg);
  }

  .help-content h1 { font-size: 1.45rem; }
  .help-content h2 { font-size: 1.18rem; }

  /* Grids → 2 col on mobile */
  .feature-grid    { grid-template-columns: repeat(2, 1fr); }
  .account-types,
  .bill-types      { grid-template-columns: repeat(2, 1fr); }
  .sync-options    { grid-template-columns: 1fr; }

  /* Flow → vertical */
  .flow-steps { flex-direction: column; align-items: flex-start; }
  .flow-arrow { transform: rotate(90deg); }
}

/* ── SMALL PHONE (< 480px) ── */
@media (max-width: 480px) {
  .container { padding: 0 14px; }

  .help-page { padding: 16px 0 40px; }

  .help-content {
    padding: 18px 14px;
  }

  .help-content h1 { font-size: 1.3rem; }
  .help-content h2 { font-size: 1.08rem; }

  /* Tables scroll horizontally */
  .sync-table,
  .shortcut-table,
  .help-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* All grids → single column */
  .feature-grid,
  .account-types,
  .bill-types,
  .sync-options,
  .adjustment-options,
  .stats-grid,
  .two-col {
    grid-template-columns: 1fr !important;
  }

  /* Steps tighter */
  .step          { gap: 10px; }
  .step-number   { width: 30px !important; height: 30px !important; font-size: 0.78rem !important; }

  /* Shortcut keys wrap */
  .shortcut-keys { flex-wrap: wrap; }

  /* Video section */
  .video-section { padding: 20px 14px 18px; }

  /* Status badges stack */
  .status-badges { flex-direction: column; align-items: flex-start; }
}
