/* ==========================================================================
   Hosted partner pages (WHITE_LABEL_DESIGN.md, section 7.11)
   Shared by every partner. Each section type has one block below; a partner changes only the --partner-* tokens in
   its own tenants/<id>/static/theme.css. The fallbacks are neutral, so a partner without a theme still reads well.
   ========================================================================== */

.hosted-page {
  --hs-primary: var(--partner-primary, #1f3b73);
  --hs-primary-hover: var(--partner-primary-hover, #162b55);
  --hs-accent: var(--partner-accent, #2b7fc4);
  --hs-text: var(--partner-text, #0f1c2e);
  --hs-muted: var(--partner-muted, #55657a);
  --hs-surface: var(--partner-surface, #ffffff);
  --hs-surface-alt: var(--partner-surface-alt, #f5f7fa);
  --hs-border: var(--partner-border, rgba(15, 28, 46, 0.10));
  --hs-gradient: var(--partner-gradient, linear-gradient(135deg, #1f3b73, #2b7fc4));
  --hs-gradient-deep: var(--partner-gradient-deep, linear-gradient(160deg, #0f1c2e, #1f3b73));
  --hs-radius-sm: var(--partner-radius-sm, 8px);
  --hs-radius-md: var(--partner-radius-md, 14px);
  --hs-radius-lg: var(--partner-radius-lg, 20px);
  --hs-heading: var(--partner-font-heading, system-ui, sans-serif);
  --hs-body: var(--partner-font-body, system-ui, sans-serif);
  color: var(--hs-text);
  font-family: var(--hs-body);
  line-height: 1.7;
  overflow-x: clip;
}

.hosted-page h1, .hosted-page h2, .hosted-page h3 { font-family: var(--hs-heading); color: inherit; letter-spacing: -0.01em; }
.hs-container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hs-section { padding: clamp(56px, 8vw, 96px) 0; }
.hs-section.hs-alt { background: var(--hs-surface-alt); }
.hs-section-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.hs-eyebrow { display: inline-block; margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hs-accent); }
.hs-section-title { margin: 0 0 14px; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; line-height: 1.3; }
.hs-section-intro { margin: 0; color: var(--hs-muted); font-size: 17px; }

/* Buttons */
.hs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hs-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
.hs-btn:focus-visible { outline: 3px solid var(--hs-accent); outline-offset: 3px; }
.hs-btn-primary { background: #ffffff; color: var(--hs-primary); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16); }
.hs-btn-primary:hover { transform: translateY(-1px); }
.hs-btn-ghost { color: #ffffff; border: 1.5px solid rgba(255, 255, 255, 0.6); }
.hs-btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.hs-btn-solid { background: var(--hs-primary); color: #ffffff; }
.hs-btn-solid:hover { background: var(--hs-primary-hover); }

/* hero */
.hs-hero { position: relative; color: #ffffff; background: var(--hs-gradient-deep); padding: clamp(64px, 10vw, 128px) 0 clamp(64px, 9vw, 112px); }
.hs-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(0, 143, 213, 0.35), transparent 45%); pointer-events: none; }
.hs-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hs-hero.hs-compact .hs-hero-inner { grid-template-columns: minmax(0, 1fr); }
.hs-hero .hs-eyebrow { color: #8fd3f4; }
.hs-hero-title { margin: 0; font-size: clamp(30px, 4.6vw, 54px); font-weight: 800; line-height: 1.22; color: #ffffff; }
.hs-hero-text { margin: 20px 0 0; max-width: 620px; font-size: clamp(16px, 1.6vw, 19px); color: rgba(255, 255, 255, 0.86); }
.hs-hero-art { display: flex; justify-content: center; }
.hs-hero-art svg, .hs-hero-art img { width: min(420px, 100%); height: auto; }

/* feature_grid */
/* Up to four columns, never an orphan card: the template sets --hs-cols to the item count (at most 4) */
.hs-grid { display: grid; grid-template-columns: repeat(var(--hs-cols, 3), minmax(0, 1fr)); gap: 20px; }
.hs-card { background: var(--hs-surface); border: 1px solid var(--hs-border); border-radius: var(--hs-radius-lg); padding: 28px 26px; box-shadow: 0 10px 30px rgba(0, 29, 69, 0.05); }
.hs-card-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; background: var(--hs-gradient); color: #ffffff; margin-bottom: 18px; }
.hs-card h3 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.hs-card p { margin: 0; color: var(--hs-muted); font-size: 15px; }

/* steps */
.hs-steps { display: grid; grid-template-columns: repeat(var(--hs-cols, 4), minmax(0, 1fr)); gap: 20px; counter-reset: hs-step; list-style: none; margin: 0; padding: 0; }
.hs-step { position: relative; background: var(--hs-surface); border: 1px solid var(--hs-border); border-radius: var(--hs-radius-md); padding: 26px 24px 24px; }
.hs-step::before { counter-increment: hs-step; content: counter(hs-step, decimal-leading-zero); display: block; margin-bottom: 12px; font-family: var(--hs-heading); font-weight: 800; font-size: 28px; background: var(--hs-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hs-step h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.hs-step p { margin: 0; color: var(--hs-muted); font-size: 15px; }

/* split */
.hs-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hs-split.hs-reverse .hs-split-art { order: -1; }
.hs-split-copy p { color: var(--hs-muted); font-size: 16px; }
.hs-split-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.hs-split-list li { position: relative; padding-left: 30px; }
.hs-split-list li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 18px; height: 18px; border-radius: 50%; background: var(--hs-gradient); -webkit-mask: radial-gradient(circle, transparent 35%, #000 36%); mask: radial-gradient(circle, transparent 35%, #000 36%); }
.hs-split-art { display: flex; justify-content: center; }
.hs-split-art img, .hs-split-art svg { width: 100%; max-width: 480px; height: auto; border-radius: var(--hs-radius-lg); }

/* stats */
.hs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; text-align: center; }
.hs-stat-value { font-family: var(--hs-heading); font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--hs-primary); }
.hs-stat-label { color: var(--hs-muted); font-size: 14px; }

/* faq */
.hs-faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.hs-faq details { background: var(--hs-surface); border: 1px solid var(--hs-border); border-radius: var(--hs-radius-md); padding: 0 22px; }
.hs-faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; position: relative; font-weight: 700; font-size: 16px; }
.hs-faq summary::-webkit-details-marker { display: none; }
.hs-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--hs-accent); }
.hs-faq details[open] summary::after { content: "\2212"; }
.hs-faq details p { margin: 0 0 20px; color: var(--hs-muted); }

/* cta */
.hs-cta { background: var(--hs-gradient); color: #ffffff; border-radius: var(--hs-radius-lg); padding: clamp(36px, 6vw, 64px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.hs-cta h2 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); font-weight: 800; color: #ffffff; }
.hs-cta p { margin: 0; color: rgba(255, 255, 255, 0.88); max-width: 620px; }
.hs-cta .hs-actions { margin-top: 0; }

/* rich_text */
.hs-prose { max-width: 820px; margin: 0 auto; font-size: 16px; }
.hs-prose h2 { font-size: 24px; margin: 1.8em 0 0.6em; }
.hs-prose h3 { font-size: 19px; margin: 1.5em 0 0.5em; }
.hs-prose p, .hs-prose li { color: var(--hs-text); }
.hs-prose a { color: var(--hs-primary); }

/* contact_form */
.hs-contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.hs-contact-aside p { color: var(--hs-muted); }
.hs-contact-aside a { color: var(--hs-primary); font-weight: 600; }
.hs-form { background: var(--hs-surface); border: 1px solid var(--hs-border); border-radius: var(--hs-radius-lg); padding: clamp(22px, 4vw, 36px); display: grid; gap: 16px; box-shadow: 0 10px 30px rgba(0, 29, 69, 0.06); }
.hs-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hs-field { display: grid; gap: 6px; }
.hs-field label { font-size: 14px; font-weight: 600; }
.hs-field .hs-required { color: #d14343; margin-left: 4px; }
.hs-field input, .hs-field textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid #c8d4e3; border-radius: var(--hs-radius-sm); font: inherit; font-size: 16px; color: var(--hs-text); background: #ffffff; }
.hs-field input:focus, .hs-field textarea:focus { outline: none; border-color: var(--hs-accent); box-shadow: 0 0 0 3px rgba(0, 143, 213, 0.18); }
.hs-field textarea { min-height: 150px; resize: vertical; }
.hs-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.hs-form-note { margin: 0; font-size: 13px; color: var(--hs-muted); }
.hs-alert { border-radius: var(--hs-radius-sm); padding: 12px 16px; font-size: 15px; }
.hs-alert-success { background: #e8f7ef; color: #11643a; border: 1px solid #b7e4c9; }
.hs-alert-error { background: #fdecec; color: #9b1c1c; border: 1px solid #f5c2c2; }

/* Legal pages */
.hs-legal { padding: clamp(40px, 6vw, 72px) 0; }
.hs-legal .hs-prose { background: var(--hs-surface); border: 1px solid var(--hs-border); border-radius: var(--hs-radius-lg); padding: clamp(22px, 5vw, 56px); }
.hs-legal .hs-prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.hs-legal .hs-prose th, .hs-legal .hs-prose td { border: 1px solid var(--hs-border); padding: 8px 10px; text-align: left; vertical-align: top; }
.hs-draft-note { max-width: 820px; margin: 0 auto 16px; padding: 10px 14px; border-radius: var(--hs-radius-sm); background: #fff6e0; border: 1px solid #f0d58c; color: #6b4e00; font-size: 14px; }

@media (max-width: 1100px) {
  .hs-grid, .hs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hs-grid, .hs-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hs-hero-inner, .hs-split, .hs-contact { grid-template-columns: minmax(0, 1fr); }
  .hs-hero-art { order: 2; }
  .hs-hero-art svg { width: min(300px, 80%); }
  .hs-split.hs-reverse .hs-split-art { order: 0; }
  .hs-form-row { grid-template-columns: minmax(0, 1fr); }
  .hs-cta { flex-direction: column; align-items: flex-start; }
}
