/* Help center: the /help hub and the topic articles under /help/<topic>. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAFCFA; --bg-white: #FFFFFF; --bg-tint: #F0F7F0; --bg-dark: #0B1F0B;
  --surface: #FFFFFF; --surface-hover: #F5FAF5;
  --border: #E2EAE2; --border-light: #EDF3ED; --border-strong: #C9D8CC; --border-accent: rgba(34,153,84,0.25);
  --text: #0F2B1A; --text-body: #2F4A3A; --text-secondary: #4A6B55; --text-muted: #8CA698;
  --accent: #1B9E4B; --accent-dark: #158C40; --accent-ink: #0F7A36;
  --green-50: #ECFDF5; --green-100: #D1FAE5; --green-200: #DCEFE2;
  --warn-bg: #FFF4DC; --warn-border: #F0D49A; --warn-ink: #5C3800;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px; --radius-lg: 16px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }

/* === Top nav (mirrors landing.html) === */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 14px 0; background: rgba(250,252,250,0.92); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--border); }
nav .container { max-width: 1240px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; }
.nav-logo span { font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: -0.3px; }
.nav-logo .brand-mirror { color: var(--accent); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; font-family: var(--font-body); transition: all 0.2s ease; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.lang-switcher { position: relative; }
.lang-switcher-btn { background: transparent; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; font-family: var(--font-body); display: flex; align-items: center; gap: 5px; }
.lang-switcher-btn:hover { border-color: #c8d8c8; background: var(--bg-white); color: var(--text); }
.lang-switcher-btn svg { width: 14px; height: 14px; }
.lang-dropdown { position: absolute; top: calc(100% + 6px); right: 0; background: var(--bg-white); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); min-width: 130px; padding: 4px; display: none; z-index: 200; }
.lang-dropdown.open { display: block; }
.lang-option { display: block; width: 100%; padding: 8px 12px; border: none; background: none; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; border-radius: 7px; text-align: left; font-family: var(--font-body); }
.lang-option:hover { background: var(--bg-tint); color: var(--text); }
.lang-option.active { color: var(--accent); font-weight: 600; }
@media (max-width: 600px) {
  nav .container { padding: 0 16px; }
  nav .btn { padding: 9px 12px; font-size: 13px; white-space: nowrap; }
}
@media (max-width: 420px) { nav .nav-logo > span { display: none; } }

/* === Hub (/help) === */
.hc-hero { background: var(--bg-tint); border-bottom: 1px solid var(--border); padding: 128px 24px 56px; }
.hc-hero-inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.hc-hero h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 52px); line-height: 1.1; letter-spacing: -1px; font-weight: 500; }
.hc-hero p { font-size: 17px; color: var(--text-secondary); max-width: 580px; }
.hc-search { width: 100%; max-width: 640px; display: flex; align-items: center; gap: 12px; background: var(--bg-white); border: 1px solid var(--border-strong); border-radius: 14px; padding: 0 18px; box-shadow: var(--shadow-md); }
.hc-search svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-secondary); }
.hc-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; padding: 15px 0; background: transparent; color: var(--text); }
.hc-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(27,158,75,0.12); }
.hc-results { width: 100%; max-width: 640px; text-align: left; list-style: none; background: var(--bg-white); border: 1px solid var(--border); border-radius: 12px; padding: 6px; }
.hc-results a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.hc-results a span { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.hc-results a:hover, .hc-results a:focus { background: var(--bg-tint); }
.hc-results .hc-empty { padding: 10px 12px; color: var(--text-secondary); font-size: 14px; }

.hc-main { max-width: 1200px; margin: 0 auto; padding: 56px 24px 88px; display: flex; flex-direction: column; gap: 56px; }
.hc-section { display: flex; flex-direction: column; gap: 20px; }
.hc-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.hc-section h2 { font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -0.4px; line-height: 1.2; }
.hc-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.hc-product { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 22px; border-radius: var(--radius-lg); background: var(--bg-white); border: 2px solid var(--border); cursor: pointer; font: inherit; color: inherit; }
.hc-product:hover { border-color: var(--border-accent); }
.hc-product[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(27,158,75,0.12); }
.hc-product-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-200); display: flex; align-items: center; justify-content: center; color: #0F5E2C; }
.hc-product-icon svg { width: 22px; height: 22px; }
.hc-product b { font-size: 19px; }
.hc-product span { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.hc-clients { display: flex; flex-wrap: wrap; gap: 12px; }
.hc-client { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 14px 20px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg-white); text-decoration: none; color: var(--text); }
.hc-client:hover { border-color: var(--accent); background: var(--surface-hover); }
.hc-client b { display: block; font-size: 16px; }
.hc-client small { display: block; font-size: 13px; color: var(--text-secondary); }
.hc-client::after { content: "→"; color: var(--accent-ink); font-weight: 700; }
[dir="rtl"] .hc-client::after { content: "←"; }
.hc-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.hc-topic { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.hc-topic h3 { font-size: 17px; font-weight: 700; }
.hc-topic ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.hc-topic a { color: var(--accent-ink); text-decoration: none; font-size: 15px; }
.hc-topic a:hover { text-decoration: underline; }
.hc-shared { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; border-top: 1px solid var(--border); padding-top: 40px; }
.hc-shared a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 14px; background: var(--bg-tint); text-decoration: none; color: var(--text); }
.hc-shared a:hover { background: var(--green-200); }
.hc-shared b { font-size: 16px; }
.hc-shared span { font-size: 14px; color: var(--text-secondary); }

.help-video { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-md); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.help-video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; cursor: pointer; }
.help-video-frame img, .help-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.help-video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; border: none; background: rgba(15,43,26,0.78); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.help-video-play svg { width: 30px; height: 30px; margin-left: 4px; }
.help-video-frame:hover .help-video-play { background: var(--accent); }
.help-video-body { padding: 22px 24px; }
.help-video-body h2 { font-family: var(--font-display); font-size: 24px; font-weight: 500; margin-bottom: 8px; }
.help-video-body p { font-size: 15px; color: var(--text-secondary); margin-bottom: 12px; }
.help-video-chapters { list-style: none; display: grid; gap: 4px; }
.help-video-chapters button { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; font: inherit; font-size: 14px; color: var(--text-secondary); background: none; border: none; padding: 4px 0; cursor: pointer; }
.help-video-chapters button:hover { color: var(--accent); }
.help-video-chapters time { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); min-width: 34px; }
@media (max-width: 860px) { .help-video { grid-template-columns: 1fr; } }

/* === Article (/help/<topic>) === */
.ha-shell { max-width: 1240px; margin: 0 auto; padding: 96px 24px 88px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.ha-side { flex: 1 1 230px; max-width: 250px; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; display: flex; flex-direction: column; gap: 22px; font-size: 14px; padding-bottom: 12px; }
.ha-side-product { font-size: 13px; font-weight: 700; color: var(--text); padding: 8px 10px; border-radius: 10px; background: var(--bg-tint); }
.ha-side h4 { font-size: 11px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; padding-left: 10px; }
.ha-side ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.ha-side a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-body); text-decoration: none; line-height: 1.35; }
.ha-side a:hover { background: var(--bg-tint); color: var(--text); }
.ha-side a[aria-current="page"] { background: var(--green-200); color: var(--text); font-weight: 700; }
.ha-side-mobile { display: none; }
.ha-main { flex: 999 1 560px; min-width: 0; max-width: 780px; }
.ha-crumbs { font-size: 13px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ha-crumbs a { color: var(--accent-ink); text-decoration: none; }
.ha-main > h1 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 42px); font-weight: 500; letter-spacing: -0.8px; line-height: 1.15; margin-bottom: 12px; }
.ha-lead { font-size: 17px; line-height: 1.65; color: var(--text-secondary); margin-bottom: 24px; }

.ha-platforms { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--bg-white); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 8px; }
.ha-platforms button { min-height: 44px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; background: transparent; color: var(--text-body); border: 1px solid transparent; }
.ha-platforms button:hover { background: var(--bg-tint); }
.ha-platforms button[aria-selected="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.ha-platform-note { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }

.ha-main section { padding: 24px 0 8px; scroll-margin-top: 96px; }
.ha-main section + section { border-top: 1px solid var(--border-light); }
.ha-main h2 { font-family: var(--font-display); font-size: 28px; line-height: 1.2; letter-spacing: -0.4px; font-weight: 500; margin-bottom: 14px; }
.ha-main h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
.ha-main h4 { font-size: 14px; font-weight: 700; letter-spacing: 0.3px; margin: 18px 0 6px; color: var(--accent-ink); }
.ha-main p { font-size: 16px; color: var(--text-body); line-height: 1.75; margin-bottom: 14px; }
.ha-main p strong, .ha-main li strong { color: var(--text); font-weight: 600; }
.ha-main ul { margin: 0 0 16px 22px; }
.ha-main ul li { font-size: 16px; color: var(--text-body); line-height: 1.75; margin-bottom: 6px; }
.ha-main a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid rgba(27,158,75,0.3); }
.ha-main a:hover { border-bottom-color: var(--accent); }
.ha-main kbd { font-family: var(--font-mono); font-size: 12px; background: var(--bg-white); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; color: var(--text); }
[dir="rtl"] .ha-main ul { margin: 0 22px 16px 0; }

.steps { list-style: none; counter-reset: step; padding: 4px 0 12px; }
.steps li { counter-increment: step; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px dashed var(--border-light); }
.steps li:last-child { border-bottom: none; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.steps li p { margin-bottom: 0; }
[dir="rtl"] .steps li { padding: 10px 44px 10px 0; }
[dir="rtl"] .steps li::before { left: auto; right: 0; }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; margin: 16px 0; border: 1px solid; }
.callout-icon { flex-shrink: 0; font-size: 18px; line-height: 1.4; }
.callout-body { font-size: 14.5px; line-height: 1.7; }
.callout.note { background: var(--green-50); border-color: var(--green-100); color: var(--text); }
.callout.note .callout-body { color: var(--text-body); }
.callout.warning { background: var(--warn-bg); border-color: var(--warn-border); }
.callout.warning .callout-body { color: var(--warn-ink); }

figure.screenshot { margin: 18px 0 22px; }
figure.screenshot img { display: block; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-md); background: var(--bg-tint); }
figure.screenshot figcaption { font-size: 13px; color: var(--text-secondary); text-align: center; margin-top: 10px; }
figure.screenshot.auto img { width: auto; max-width: 100%; aspect-ratio: auto; height: auto; background: var(--bg-white); }
figure.screenshot.auto figcaption { text-align: left; }
figure.screenshot.auto.center img { max-width: min(620px, 100%); margin-inline: auto; }
figure.screenshot.auto.center figcaption { text-align: center; }
figure.screenshot.phone img { max-width: 340px; aspect-ratio: auto; height: auto; margin-inline: auto; background: transparent; }
.figure-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; margin: 18px 0 22px; }
.figure-row figure.screenshot { margin: 0; }
.figure-row figure.screenshot.phone img { max-width: 100%; }
.figure-row figure.screenshot figcaption { font-size: 12px; line-height: 1.45; }
@media (max-width: 640px) { .figure-row { grid-template-columns: 1fr; } .figure-row figure.screenshot.phone img { max-width: 340px; } }

.ha-pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 32px; }
.ha-main .ha-pager a { padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-white); display: flex; flex-direction: column; gap: 2px; color: var(--text); font-weight: 700; }
.ha-main .ha-pager a:hover { border-color: var(--accent); }
.ha-pager small { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.ha-pager .next { text-align: right; }
[dir="rtl"] .ha-pager .next { text-align: left; }
.ha-contact { margin-top: 28px; padding: 18px 22px; border-radius: 14px; background: var(--bg-tint); font-size: 15px; color: var(--text-body); }

@media (max-width: 900px) {
  .ha-shell { padding-top: 88px; gap: 0; }
  .ha-side { display: none; }
  .ha-side-mobile { display: block; width: 100%; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-white); }
  .ha-side-mobile summary { min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; cursor: pointer; list-style: none; }
  .ha-side-mobile summary::after { content: "▾"; color: var(--text-secondary); }
  .ha-side-mobile[open] summary::after { content: "▴"; }
  .ha-side-mobile .ha-side { display: flex; position: static; max-width: none; max-height: none; padding: 0 8px 14px; }
}

/* === Footer (mirrors landing.html) === */
footer { background: var(--bg-dark); color: #B5C9BD; padding: 64px 0 32px; }
footer .container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .nav-logo span { color: #FFFFFF; }
.footer-brand p { font-size: 14px; color: #8CA698; margin-top: 12px; line-height: 1.7; max-width: 320px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: #FFFFFF; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: #8CA698; text-decoration: none; }
.footer-col a:hover { color: #FFFFFF; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; font-size: 13px; color: #6B8175; text-align: center; }
