/* Public website styles. Palette follows docs/design/BUILD-GUIDE.md §5 (mockup values). */
:root {
    --site-navy: var(--leap-navy, #1E365E);
    --site-orange: var(--leap-orange, #F69139);
    --site-bg-alt: #F5F6F7;
    --site-surface: #FFFFFF;
    --site-text: #2B2F36;
    --site-muted: #58595B;
    --site-border: #E2E4E8;
    --site-input-border: #A9ADB4;
    --site-divider: #EEF0F2;
    --site-link: #0B4F8A;
    --chip-info-bg: #DCE6F2; --chip-info-fg: #1E365E;
    --chip-success-bg: #E3F1E8; --chip-success-fg: #1F5C38;
    --chip-warning-bg: #FDEBDC; --chip-warning-fg: #7A3A06;
    --chip-danger-bg: #FBE3E1; --chip-danger-fg: #8C1D18;
    --chip-ai-bg: #EFE7F7; --chip-ai-fg: #5B2F86;
    --site-danger-text: #B3261E;
}

html, body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    color: var(--site-text);
    background: var(--site-surface);
    max-width: 100vw;
    /* clip, not hidden: overflow-x: hidden makes <body> a scroll container, which silently breaks
       position: sticky (the site header and the legal "Contents" box). */
    overflow-x: clip;
    margin: 0;
}
a { color: var(--site-link); }
a:hover { color: var(--site-navy); }
/* theme.css (shared with the app) sets h1-h3 to weight 400 with -0.5px tracking and a 14px body;
   the website mockups use bold headings, normal tracking and the 16px browser default. */
h1, h2, h3, h4 { color: var(--site-navy); font-weight: 700; letter-spacing: normal; }
:focus-visible { outline: 3px solid var(--site-orange); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--site-navy); color: #fff; padding: 8px 16px; z-index: 2000; }
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ── Layout primitives ─────────────────────────────── */
.site-wrap { max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; box-sizing: border-box; }
.site-narrow { max-width: 880px; }
.site-section { padding: 80px 0; border-bottom: 1px solid var(--site-border); }
.site-section-alt { background: var(--site-bg-alt); }
.site-section-navy { background: var(--site-navy); color: #fff; }
.site-section-navy h2, .site-section-navy h3 { color: #fff; }
.site-split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.site-split > * { flex: 1 1 440px; min-width: 0; }
.site-split-reverse { flex-direction: row-reverse; }
.site-stack { display: flex; flex-direction: column; gap: 16px; }
.site-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.site-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ── Type ─────────────────────────────────────────── */
.site-h1 { margin: 0; font-size: 46px; line-height: 1.15; font-weight: 700; }
.site-h1-sm { font-size: 40px; }
.site-h2 { margin: 0; font-size: 32px; line-height: 1.25; font-weight: 700; }
.site-h3 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 700; }
.site-h4 { margin: 0; font-size: 16px; font-weight: 700; color: var(--site-navy); }
.site-lead { margin: 0; font-size: 19px; line-height: 1.6; }
.site-body { margin: 0; font-size: 16px; line-height: 1.65; }
.site-muted { color: var(--site-muted); }
.site-small { font-size: 14px; line-height: 1.55; }
.site-caption { font-size: 13px; line-height: 1.5; color: var(--site-muted); margin: 0; }
.site-list { margin: 0; padding-left: 20px; font-size: 16px; line-height: 1.65; display: flex; flex-direction: column; gap: 8px; }
.site-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--site-muted); }

/* ── Chips ────────────────────────────────────────── */
.site-chip { display: inline-flex; align-items: center; align-self: flex-start; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 12px; background: var(--chip-info-bg); color: var(--chip-info-fg); }
.site-chip-success { background: var(--chip-success-bg); color: var(--chip-success-fg); }
.site-chip-warning { background: var(--chip-warning-bg); color: var(--chip-warning-fg); }
.site-chip-danger { background: var(--chip-danger-bg); color: var(--chip-danger-fg); }
.site-chip-ai { background: var(--chip-ai-bg); color: var(--chip-ai-fg); }
.site-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.site-pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--site-input-border); background: #fff; color: var(--site-navy); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-pill:hover { border-color: var(--site-navy); }

/* ── Buttons ──────────────────────────────────────── */
.btn-site { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px; border-radius: 8px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; box-sizing: border-box; cursor: pointer; font-family: inherit; }
.btn-site-lg { height: 52px; padding: 0 26px; font-size: 17px; }
.btn-site-primary { background: var(--site-navy); color: #fff; }
.btn-site-primary:hover { background: #142642; color: #fff; }
.btn-site-outline { background: #fff; border-color: var(--site-navy); color: var(--site-navy); }
.btn-site-outline:hover { background: var(--site-bg-alt); color: var(--site-navy); }
.btn-site-inverse { background: #fff; color: var(--site-navy); }
.site-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── Cards ────────────────────────────────────────── */
.site-card { background: #fff; border: 1px solid var(--site-border); border-radius: 12px; padding: 24px; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; }
.site-card-featured { border: 2px solid var(--site-navy); }
.site-callout { background: var(--site-bg-alt); border: 1px solid var(--site-border); border-radius: 12px; padding: 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.site-callout > div { flex: 1 1 420px; min-width: 0; }

/* ── Screenshots (illustrations of the app, drawn from the design mockups) ── */
.site-figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.site-browser { background: #fff; border: 1px solid #C4C9D1; border-radius: 12px; overflow: hidden; }
.site-browser-bar { height: 34px; background: var(--site-divider); border-bottom: 1px solid var(--site-border); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.site-browser-bar span.dot { width: 10px; height: 10px; border-radius: 5px; background: #C4C9D1; flex: none; }
.site-browser-bar span.url { margin-left: 10px; flex: 1; min-width: 0; max-width: 400px; height: 22px; border-radius: 11px; background: #fff; border: 1px solid var(--site-border); font-size: 12px; color: var(--site-muted); display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; }
.site-browser img, .site-phone img { display: block; width: 100%; height: auto; }
.site-phones { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.site-phone { width: 220px; max-width: 46%; border: 8px solid #1F2329; border-radius: 28px; overflow: hidden; background: #fff; }

/* ── Details/FAQ ──────────────────────────────────── */
.site-faq { border-top: 1px solid var(--site-border); }
.site-faq details { border-bottom: 1px solid var(--site-border); padding: 18px 0; }
.site-faq summary { cursor: pointer; font-weight: 700; font-size: 17px; color: var(--site-navy); }
.site-faq details p { margin: 12px 0 0; font-size: 16px; line-height: 1.65; }

/* ── Forms ────────────────────────────────────────── */
.site-field { display: flex; flex-direction: column; gap: 6px; }
.site-field label { font-weight: 600; font-size: 15px; }
.site-field input, .site-field select, .site-field textarea { font: inherit; font-size: 16px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--site-input-border); border-radius: 8px; background: #fff; color: var(--site-text); box-sizing: border-box; width: 100%; }
.site-field textarea { min-height: 110px; }
.site-hint { font-size: 13px; color: var(--site-muted); }
.site-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.site-table th, .site-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--site-divider); vertical-align: top; }
.site-table th { font-size: 13px; color: var(--site-muted); font-weight: 700; }
.site-table-scroll { overflow-x: auto; }
/* Mockup tables (Pricing › Compare plans, Security › Sub-processors) sit in a bordered card with a grey header row. */
.site-table-card { border: 1px solid var(--site-border); border-radius: 12px; background: var(--site-surface); }
.site-table-card .site-table th, .site-table-card .site-table td { padding: 12px 18px; }
.site-table-card .site-table thead tr { background: var(--site-bg-alt); }
.site-table-card .site-table thead th { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--site-border); font-size: 15px; color: var(--site-navy); }
.site-table-card .site-table tbody tr:last-child > * { border-bottom: 0; }

.form-status { margin: 0; font-size: 15px; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status-success { color: var(--chip-success-fg); background: var(--chip-success-bg); padding: 10px 14px; border-radius: 8px; }
.form-status-error { color: var(--site-danger-text); background: var(--chip-danger-bg); padding: 10px 14px; border-radius: 8px; }
[data-captcha]:empty { display: none; }

/* ── Header ───────────────────────────────────────── */
.site-header { background: #fff; border-bottom: 1px solid var(--site-border); position: sticky; top: 0; z-index: 1030; }
.site-header-inner { min-height: 72px; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.site-brand { font-weight: 700; font-size: 21px; color: var(--site-navy); text-decoration: none; }
.site-nav-group { margin-left: auto; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; }
.site-nav a { color: var(--site-text); text-decoration: none; padding: 8px 0; border-bottom: 3px solid transparent; }
.site-nav a[aria-current="page"] { color: var(--site-navy); font-weight: 700; border-bottom-color: var(--site-orange); }
.site-nav a.site-nav-login { color: var(--site-link); font-weight: 600; }
.site-nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--site-border); border-radius: 8px; width: 44px; height: 44px; font-size: 20px; color: var(--site-navy); cursor: pointer; }

@media (max-width: 900px) {
    .site-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav-group { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 16px; }
    .site-nav-group.open { display: flex; }
    .site-nav { flex-direction: column; align-items: stretch; }
    .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--site-divider); }
    .site-wrap { padding-left: 20px; padding-right: 20px; }
    .site-section { padding: 56px 0; }
    .site-h1 { font-size: 34px; }
    .site-h2 { font-size: 26px; }
}

/* ── Footer ───────────────────────────────────────── */
.site-footer { background: var(--site-navy); color: #fff; }
.site-footer-inner { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 24px; }
.site-footer-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.site-footer-about { flex: 1 1 320px; display: flex; flex-direction: column; gap: 8px; }
.site-footer-brand { font-weight: 700; font-size: 19px; }
.site-footer-about p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--chip-info-bg); }
.site-footer-nav { flex: 2 1 520px; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; }
.site-footer-nav a { color: #fff; }
.site-footer-legal { border-top: 1px solid rgba(255,255,255,.2); padding-top: 18px; font-size: 13px; color: var(--chip-info-bg); }

/* ── Legal documents (docs/design/html/WebLegal.html, shared by Layout/LegalDocument.razor) ── */
.legal-page { padding: 48px 0 72px; }
.legal-page-inner { display: flex; flex-direction: column; gap: 28px; }
.legal-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-docs a { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--site-input-border); background: var(--site-surface); color: var(--site-navy); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; box-sizing: border-box; }
.legal-docs a:hover { border-color: var(--site-navy); color: var(--site-navy); }
.legal-docs a[aria-current="page"] { background: var(--site-navy); border-color: var(--site-navy); color: #fff; }
.legal-body { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.legal-toc { flex: 1 1 240px; max-width: 280px; background: var(--site-bg-alt); border: 1px solid var(--site-border); border-radius: 12px; padding: 14px; box-sizing: border-box; }
.legal-toc-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--site-muted); padding: 4px 10px 8px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.legal-toc a { min-height: 36px; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 7px; border-left: 3px solid transparent; border-radius: 8px; color: var(--site-text); text-decoration: none; font-size: 15px; line-height: 1.35; box-sizing: border-box; }
.legal-toc a:hover { background: var(--site-surface); color: var(--site-navy); }
.legal-toc a[aria-current="location"] { background: var(--site-surface); color: var(--site-navy); font-weight: 700; border-left-color: var(--site-orange); }
.legal-toc-num { color: var(--site-muted); min-width: 20px; font-weight: 400; }
.legal-doc { flex: 999 1 560px; min-width: 0; max-width: 780px; display: flex; flex-direction: column; gap: 32px; overflow-wrap: anywhere; }
.legal-doc-head { display: flex; flex-direction: column; gap: 10px; }
.legal-doc-head h1 { margin: 0; font-size: 38px; line-height: 1.2; }
.legal-tag { font-size: 12px; padding: 2px 10px; }
.legal-meta { margin: 0; font-size: 15px; color: var(--site-muted); }
.legal-summary { background: var(--site-bg-alt); border: 1px solid var(--site-border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 96px; }
.legal-summary h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.legal-summary ul { margin: 0; padding-left: 22px; font-size: 16px; line-height: 1.65; display: flex; flex-direction: column; gap: 6px; }
.legal-summary p { margin: 0; font-size: 16px; line-height: 1.7; }
.legal-section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 96px; }
.legal-section h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.legal-section p, .legal-section ul { margin: 0; font-size: 16px; line-height: 1.7; }
.legal-section ul { padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.legal-section h3 { margin: 6px 0 0; font-size: 18px; line-height: 1.35; }
@media (min-width: 901px) {
    .legal-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; }
}
@media (max-width: 900px) {
    .legal-page { padding: 32px 0 56px; }
    .legal-toc { max-width: none; }
    .legal-doc-head h1 { font-size: 30px; }
}

/* ── 404 ──────────────────────────────────────────── */
.not-found-section { padding: 96px 0; text-align: center; }
