/* Hosait design system — shared foundations and components.
 *
 * Tokens (colours, type scale, spacing) are defined twice on purpose: as
 * Tailwind theme values in hosait-theme.js, for utility classes in markup, and
 * as custom properties here, for the components below and for JS-built UI.
 * Keep the two in step.
 *
 * Components use the `hx-` prefix. Tailwind utilities load after this file,
 * so a utility on an element always wins over the component default.
 */

:root {
  color-scheme: dark;

  /* Surfaces */
  --hx-bg: #0d0d11;
  --hx-bg-deep: #08080b;
  --hx-surface-1: #131318;
  --hx-surface-2: #18181e;
  --hx-surface-3: #202027;
  --hx-surface-4: #2a2a32;
  --hx-line: rgba(255, 255, 255, 0.08);
  --hx-line-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --hx-text: #f5f5f7;
  --hx-text-2: #a9a9b6;
  --hx-text-3: #8a8a97;

  /* Accent + status */
  --hx-accent: #b8b9ff;
  --hx-accent-hover: #d4d5ff;
  --hx-on-accent: #15135c;
  --hx-accent-soft: rgba(184, 185, 255, 0.12);
  --hx-live: #5fd38d;
  --hx-live-soft: rgba(95, 211, 141, 0.12);
  --hx-warn: #ffb783;
  --hx-error: #ffb4ab;
  --hx-error-soft: rgba(255, 180, 171, 0.1);

  /* Type */
  --hx-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  --hx-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hx-fs-display: clamp(40px, 3.6vw + 26px, 80px);
  --hx-fs-title: clamp(30px, 2.2vw + 21px, 52px);
  --hx-fs-subtitle: clamp(21px, 0.5vw + 19px, 26px);
  --hx-fs-lead: clamp(19px, 0.45vw + 16.5px, 23px);
  --hx-fs-body: clamp(17px, 0.2vw + 16px, 18px);
  --hx-fs-small: 15px;
  --hx-fs-caption: 14px;

  /* Space (4 · 8 · 12 · 16 · 24 · 32 · 48 · 64 · 96 · 128) */
  --hx-s1: 4px;  --hx-s2: 8px;  --hx-s3: 12px; --hx-s4: 16px; --hx-s5: 24px;
  --hx-s6: 32px; --hx-s7: 48px; --hx-s8: 64px; --hx-s9: 96px; --hx-s10: 128px;
  --hx-gutter: 20px;
  --hx-max: 1200px;
  --hx-max-wide: 1320px;
  --hx-section-y: clamp(64px, 7vw + 30px, 136px);
  --hx-header-h: 56px;

  /* Shape + motion */
  --hx-r-sm: 10px;
  --hx-r-md: 14px;
  --hx-r-lg: 22px;
  --hx-r-xl: 28px;
  --hx-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --hx-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --hx-fast: 180ms;
  --hx-med: 400ms;
}
@media (min-width: 640px)  { :root { --hx-gutter: 32px; } }
@media (min-width: 1024px) { :root { --hx-gutter: 40px; --hx-header-h: 60px; } }

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hx-header-h) + 16px); }
body {
  background: var(--hx-bg);
  color: var(--hx-text);
  font-family: var(--hx-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
::selection { background: rgba(184, 185, 255, 0.3); }
/* Google's sign-in button is an iframe with a light colour scheme. Inside a
   dark page Chrome paints an opaque white box behind any iframe whose scheme
   differs from its embedder — giving the iframe element itself "light" makes
   them match, and the button's own dark pill shows on a transparent ground. */
iframe[src*="accounts.google.com/gsi"] { color-scheme: light; }
:focus-visible { outline: 2px solid var(--hx-accent) !important; outline-offset: 3px !important; border-radius: 6px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--hx-error) !important; }
img, video { max-width: 100%; }
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.hx-skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--hx-accent); color: var(--hx-on-accent); font-weight: 600;
}
.hx-skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.hx-container { width: 100%; max-width: calc(var(--hx-max) + 2 * var(--hx-gutter)); margin-inline: auto; padding-inline: var(--hx-gutter); }
.hx-container--wide { max-width: calc(var(--hx-max-wide) + 2 * var(--hx-gutter)); }
.hx-container--narrow { max-width: calc(760px + 2 * var(--hx-gutter)); }
.hx-section { padding-block: var(--hx-section-y); }
.hx-section--tight { padding-block: calc(var(--hx-section-y) * 0.62); }
.hx-section--alt { background: var(--hx-surface-1); }
.hx-section--deep { background: var(--hx-bg-deep); }
.hx-page { padding-top: var(--hx-header-h); min-height: 100vh; }
.hx-center { text-align: center; margin-inline: auto; }
.hx-center .hx-lead, .hx-center .hx-body { margin-inline: auto; }
.hx-grid { display: grid; gap: var(--hx-s5); }
@media (min-width: 768px) {
  .hx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .hx-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Type ---------- */
.hx-eyebrow { font-size: var(--hx-fs-body); font-weight: 600; color: var(--hx-accent); letter-spacing: -0.005em; margin: 0 0 var(--hx-s3); }
.hx-display { font-size: var(--hx-fs-display); line-height: 1.06; letter-spacing: -0.028em; font-weight: 600; margin: 0; text-wrap: balance; }
.hx-title { font-size: var(--hx-fs-title); line-height: 1.1; letter-spacing: -0.022em; font-weight: 600; margin: 0; text-wrap: balance; }
.hx-subtitle { font-size: var(--hx-fs-subtitle); line-height: 1.25; letter-spacing: -0.014em; font-weight: 600; margin: 0; text-wrap: balance; }
.hx-lead { font-size: var(--hx-fs-lead); line-height: 1.45; letter-spacing: -0.008em; color: var(--hx-text-2); max-width: 36em; margin: var(--hx-s5) 0 0; text-wrap: pretty; }
.hx-body { font-size: var(--hx-fs-body); line-height: 1.6; color: var(--hx-text-2); max-width: 64ch; margin: 0; text-wrap: pretty; }
.hx-small { font-size: var(--hx-fs-small); line-height: 1.5; color: var(--hx-text-2); }
.hx-caption { font-size: var(--hx-fs-caption); line-height: 1.45; color: var(--hx-text-3); }
.hx-muted { color: var(--hx-text-2); }
.hx-strong { color: var(--hx-text); font-weight: 600; }
.hx-accent-text { color: var(--hx-accent); }
.hx-display + .hx-lead, .hx-title + .hx-lead { margin-top: var(--hx-s5); }
.hx-subtitle + .hx-body, .hx-subtitle + .hx-small { margin-top: var(--hx-s3); }
.hx-intro { margin-bottom: clamp(40px, 4vw + 16px, 64px); }
.hx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hx-s4) var(--hx-s5); margin-top: var(--hx-s6); }
.hx-center .hx-actions, .hx-actions--center { justify-content: center; }
.hx-prose { font-size: var(--hx-fs-body); line-height: 1.65; color: var(--hx-text-2); max-width: 68ch; }
.hx-prose h2 { color: var(--hx-text); font-size: var(--hx-fs-subtitle); line-height: 1.25; font-weight: 600; letter-spacing: -0.014em; margin: 2.2em 0 0.6em; }
.hx-prose h3 { color: var(--hx-text); font-size: 19px; font-weight: 600; margin: 1.8em 0 0.5em; }
.hx-prose p, .hx-prose ul, .hx-prose ol { margin: 0 0 1em; }
.hx-prose ul { list-style: disc; padding-left: 1.3em; }
.hx-prose ol { list-style: decimal; padding-left: 1.3em; }
.hx-prose li { margin: 0.35em 0; }
.hx-prose a { color: var(--hx-accent); text-decoration: underline; text-underline-offset: 3px; }
.hx-prose strong { color: var(--hx-text); font-weight: 600; }
.hx-prose code, .hx-code { font-family: var(--hx-mono); font-size: 0.88em; background: var(--hx-surface-3); border-radius: 6px; padding: 0.12em 0.4em; color: var(--hx-text); }

/* ---------- Buttons + links ---------- */
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--hx-s2);
  min-height: 44px; padding: 10px 22px; border-radius: 999px;
  font: 500 17px/1.2 var(--hx-font); letter-spacing: -0.005em; text-align: center; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color var(--hx-fast) var(--hx-ease), color var(--hx-fast) var(--hx-ease),
              border-color var(--hx-fast) var(--hx-ease), transform var(--hx-fast) var(--hx-ease);
}
.hx-btn:active:not([disabled]):not([aria-disabled="true"]) { transform: scale(0.98); }
.hx-btn .material-symbols-outlined { font-size: 20px; }
.hx-btn.hx-btn--primary { background: var(--hx-accent); color: var(--hx-on-accent); }
.hx-btn.hx-btn--primary:hover { background: var(--hx-accent-hover); }
.hx-btn.hx-btn--secondary { background: transparent; color: var(--hx-text); border-color: var(--hx-line-strong); }
.hx-btn.hx-btn--secondary:hover { background: var(--hx-surface-3); border-color: rgba(255, 255, 255, 0.22); }
.hx-btn.hx-btn--quiet { background: var(--hx-surface-3); color: var(--hx-text); }
.hx-btn.hx-btn--quiet:hover { background: var(--hx-surface-4); }
.hx-btn.hx-btn--danger { background: transparent; color: var(--hx-error); border-color: rgba(255, 180, 171, 0.35); }
.hx-btn.hx-btn--danger:hover { background: var(--hx-error-soft); }
.hx-btn--sm { min-height: 36px; padding: 6px 16px; font-size: 15px; }
.hx-btn--lg { min-height: 52px; padding: 14px 30px; font-size: 18px; }
.hx-btn--block { width: 100%; }
.hx-btn[disabled], .hx-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.hx-btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.hx-btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--hx-on-accent) var(--hx-on-accent) transparent transparent;
  animation: hx-spin 0.8s linear infinite;
}
.hx-btn--secondary[aria-busy="true"]::after, .hx-btn--quiet[aria-busy="true"]::after { border-color: var(--hx-text) var(--hx-text) transparent transparent; }
/* Small header CTA keeps a 44px hit area around a 36px pill. */
.hx-btn--sm { position: relative; }
.hx-btn--sm::before { content: ""; position: absolute; inset: -4px 0; }

.hx-link {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px;
  color: var(--hx-accent); font-size: 17px; font-weight: 500; text-decoration: none;
  transition: color var(--hx-fast) var(--hx-ease);
}
.hx-link::after { content: "›"; font-size: 1.25em; line-height: 1; margin-left: 3px; transform: translateY(-1px); transition: transform var(--hx-fast) var(--hx-ease); }
.hx-link:hover { color: var(--hx-accent-hover); text-decoration: underline; text-underline-offset: 4px; }
.hx-link:hover::after { transform: translate(2px, -1px); }
.hx-link--plain::after { content: none; }

@keyframes hx-spin { to { transform: rotate(360deg); } }

/* ---------- Surfaces ---------- */
.hx-card { background: var(--hx-surface-1); border: 1px solid var(--hx-line); border-radius: var(--hx-r-lg); padding: clamp(22px, 2vw + 14px, 32px); }
.hx-card--flat { background: transparent; }
.hx-card--raised { background: var(--hx-surface-2); }
.hx-card--accent { border-color: rgba(184, 185, 255, 0.4); }
.hx-tile { background: var(--hx-surface-1); border-radius: var(--hx-r-xl); overflow: hidden; }
.hx-divider { height: 1px; background: var(--hx-line); border: 0; margin: 0; }
.hx-icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; background: var(--hx-accent-soft); color: var(--hx-accent);
}
.hx-icon-badge .material-symbols-outlined { font-size: 24px; }

/* Status: a dot + a word, never colour alone. */
.hx-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--hx-text-2); }
.hx-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.hx-status--live { color: var(--hx-live); }
.hx-status--busy { color: var(--hx-warn); }
.hx-status--error { color: var(--hx-error); }
.hx-status--idle { color: var(--hx-text-3); }
.hx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; background: var(--hx-surface-3); color: var(--hx-text-2); }
.hx-chip--accent { background: var(--hx-accent-soft); color: var(--hx-accent); }
.hx-chip--live { background: var(--hx-live-soft); color: var(--hx-live); }

/* Numbered steps */
.hx-steps { display: grid; gap: var(--hx-s6); counter-reset: hx-step; list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .hx-steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hx-s7); } }
.hx-step { counter-increment: hx-step; }
.hx-step::before {
  content: counter(hx-step); display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; margin-bottom: var(--hx-s4);
  background: var(--hx-accent-soft); color: var(--hx-accent); font-weight: 600; font-size: 16px;
}
.hx-step h3 { font-size: var(--hx-fs-subtitle); line-height: 1.25; font-weight: 600; letter-spacing: -0.014em; margin: 0 0 var(--hx-s2); }
.hx-step p { font-size: var(--hx-fs-body); line-height: 1.6; color: var(--hx-text-2); margin: 0; }

/* ---------- Forms ---------- */
.hx-field { display: flex; flex-direction: column; gap: 6px; }
.hx-label { font-size: 15px; font-weight: 500; color: var(--hx-text); }
.hx-help { font-size: 14px; color: var(--hx-text-2); }
.hx-error-text { font-size: 14px; color: var(--hx-error); }
.hx-input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px;
  background: var(--hx-surface-2); border: 1px solid var(--hx-line-strong); color: var(--hx-text);
  font: 400 16px/1.4 var(--hx-font);
  transition: border-color var(--hx-fast) var(--hx-ease), box-shadow var(--hx-fast) var(--hx-ease);
}
.hx-input::placeholder { color: var(--hx-text-3); }
.hx-input:hover { border-color: rgba(255, 255, 255, 0.24); }
.hx-input:focus { outline: none; border-color: var(--hx-accent); box-shadow: 0 0 0 3px rgba(184, 185, 255, 0.22); }
.hx-alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.hx-alert--error { background: var(--hx-error-soft); color: var(--hx-error); }
.hx-alert--info { background: var(--hx-accent-soft); color: var(--hx-text); }
.hx-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hx-line-strong); border-top-color: var(--hx-accent); animation: hx-spin 0.8s linear infinite; }

/* ---------- Site header (marketing pages) ---------- */
.hx-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--hx-header-h);
  background: rgba(13, 13, 17, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--hx-fast) var(--hx-ease), background-color var(--hx-fast) var(--hx-ease);
}
.hx-header.is-scrolled { border-bottom-color: var(--hx-line); background: rgba(13, 13, 17, 0.86); }
.hx-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--hx-s5); }
.hx-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--hx-text); text-decoration: none; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.hx-brand img { width: 26px; height: 30px; object-fit: contain; }
.hx-nav { display: flex; align-items: center; gap: clamp(18px, 2vw, 32px); }
.hx-nav a {
  display: inline-flex; align-items: center; min-height: 44px; position: relative;
  font-size: 14px; font-weight: 400; color: var(--hx-text-2); text-decoration: none; white-space: nowrap;
  transition: color var(--hx-fast) var(--hx-ease);
}
.hx-nav a:hover { color: var(--hx-text); }
.hx-nav a[aria-current="page"] { color: var(--hx-text); font-weight: 500; }
.hx-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; border-radius: 2px; background: var(--hx-accent); }
.hx-header__actions { display: flex; align-items: center; gap: var(--hx-s4); }
.hx-menu-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px;
  border-radius: 999px; color: var(--hx-text); background: transparent; border: 0; cursor: pointer;
}
.hx-menu-btn:hover { background: var(--hx-surface-3); }
.hx-mobile-menu {
  position: fixed; inset: var(--hx-header-h) 0 0 0; z-index: 45;
  background: var(--hx-bg); overflow-y: auto; overscroll-behavior: contain;
}
.hx-mobile-menu a.mobile-nav-link {
  display: flex; align-items: center; justify-content: space-between; min-height: 60px;
  font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--hx-text); text-decoration: none;
  border-bottom: 1px solid var(--hx-line);
}
.hx-mobile-menu a.mobile-nav-link[aria-current="page"] { color: var(--hx-accent); }
.hx-mobile-menu:not(.hidden) { animation: hx-fade-down var(--hx-med) var(--hx-ease-out); }
@keyframes hx-fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Language switcher (built by i18n.js) */
[id^="lang-switcher-"] > button {
  min-height: 44px; min-width: 44px; justify-content: center; gap: 4px;
  font-size: 14px !important; letter-spacing: 0 !important; color: var(--hx-text-2);
}
[id^="lang-menu-"] { background: var(--hx-surface-2) !important; border: 1px solid var(--hx-line) !important; border-radius: 14px !important; padding: 6px; max-height: min(560px, 82vh); overflow-y: auto !important; }
[id^="lang-menu-"] .js-lang-option { border-radius: 8px; min-height: 40px; font-size: 15px !important; }
#mobile-menu [id^="lang-menu-"] { position: static; width: 100%; margin-top: 8px; }

/* ---------- Footer ---------- */
.hx-footer { background: var(--hx-bg-deep); border-top: 1px solid var(--hx-line); padding-block: var(--hx-s8) var(--hx-s6); font-size: 14px; color: var(--hx-text-2); }
.hx-footer h2 { font-size: 13px; font-weight: 600; color: var(--hx-text); margin: 0 0 var(--hx-s3); }
.hx-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hx-footer a { color: var(--hx-text-2); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.hx-footer a:hover { color: var(--hx-text); text-decoration: underline; text-underline-offset: 3px; }
.hx-footer__grid { display: grid; gap: var(--hx-s6) var(--hx-s5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hx-footer__brand { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .hx-footer__grid { grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); }
  .hx-footer__brand { grid-column: auto; }
}
.hx-footer__base { margin-top: var(--hx-s7); padding-top: var(--hx-s5); border-top: 1px solid var(--hx-line); color: var(--hx-text-3); }

/* ---------- FAQ / disclosure ---------- */
.hx-faq { border-top: 1px solid var(--hx-line); }
.hx-faq details { border-bottom: 1px solid var(--hx-line); }
.hx-faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--hx-s4);
  min-height: 64px; padding-block: var(--hx-s4); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--hx-text);
}
.hx-faq summary::-webkit-details-marker { display: none; }
.hx-faq summary::after { content: "+"; font-size: 26px; font-weight: 300; color: var(--hx-text-2); transition: transform var(--hx-fast) var(--hx-ease); flex: none; }
.hx-faq details[open] summary::after { transform: rotate(45deg); }
.hx-faq summary:hover { color: var(--hx-accent); }
.hx-faq details > div { padding: 0 0 var(--hx-s5); font-size: var(--hx-fs-body); line-height: 1.6; color: var(--hx-text-2); max-width: 64ch; }

/* ---------- Media ---------- */
.hx-media { position: relative; border-radius: var(--hx-r-xl); overflow: hidden; background: var(--hx-bg-deep); border: 1px solid var(--hx-line); }
.hx-media video, .hx-media img { display: block; width: 100%; height: auto; }

/* Hero entrance: once, short, and skipped with reduced motion. */
.hx-rise { animation: hx-rise 700ms var(--hx-ease-out) both; }
.hx-rise--2 { animation-delay: 80ms; }
.hx-rise--3 { animation-delay: 160ms; }
.hx-rise--4 { animation-delay: 260ms; }
@keyframes hx-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hx-float { animation: hx-float 6s ease-in-out infinite; }
@keyframes hx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hx-float { animation: none; } }

/* Hosa chat on phones: stay out of the way of forms and bottom CTAs. */
@media (max-width: 639px) {
  #hosa-widget { right: 12px !important; bottom: 12px !important; }
  #hosa-fab { width: 52px !important; height: 52px !important; }
}
body.hx-hosa-lift #hosa-widget { transform: translateY(-72px); transition: transform var(--hx-fast) var(--hx-ease); }

/* Screen-reader only (for pages without Tailwind's sr-only) */
.hx-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main[tabindex="-1"]:focus, main[tabindex="-1"]:focus-visible { outline: none !important; }

/* ---------- Docs reference ---------- */
.hx-docs-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hx-docs-toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hx-line-strong); color: var(--hx-text-2); font-size: 15px; text-decoration: none; }
.hx-docs-toc a:hover, .hx-docs-toc a[aria-current="true"] { color: var(--hx-text); background: var(--hx-surface-3); }
@media (min-width: 1024px) {
  .hx-docs-toc { position: sticky; top: calc(var(--hx-header-h) + 24px); align-self: start; }
  .hx-docs-toc ul { flex-direction: column; flex-wrap: nowrap; gap: 2px; border-left: 1px solid var(--hx-line); }
  .hx-docs-toc a { border: 0; border-radius: 0; min-height: 36px; padding: 0 16px; margin-left: -1px; border-left: 2px solid transparent; }
  .hx-docs-toc a[aria-current="true"] { background: transparent; border-left-color: var(--hx-accent); color: var(--hx-text); }
}
.hx-docs-sec { padding-bottom: var(--hx-s8); margin-bottom: var(--hx-s8); border-bottom: 1px solid var(--hx-line); }
.hx-docs-sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.hx-docs p, .hx-docs li, .hx-docs dd { line-height: 1.6; }
.hx-docs code { font-family: var(--hx-mono); font-size: 0.9em; }
.hx-docs :not(pre) > code { background: var(--hx-surface-3); border-radius: 6px; padding: 0.1em 0.4em; color: var(--hx-text); }
.hx-docs pre { font-size: 14px; line-height: 1.6; }
.hx-docs table td, .hx-docs table th { vertical-align: top; }
.hx-docs a:not(.hx-btn) { color: var(--hx-accent); text-decoration: underline; text-underline-offset: 3px; }

/* Long words (Norwegian, German, Finnish compounds) must break, not overflow. */
.hx-display, .hx-title, .hx-subtitle { overflow-wrap: break-word; }
@media (max-width: 480px) { .hx-display, .hx-title { -webkit-hyphens: auto; hyphens: auto; } }

/* A help "?" inside a heading follows the last word instead of floating at
   the far edge of a wrapped, flex-centred heading. */
.hx-heading-help { vertical-align: middle; position: relative; top: -0.06em; margin-left: 0.2em; }

/* ---------- Hosa chat panel ----------
   The panel used the same surface and hairline as the cards behind it, so
   it sank into the page. It is a floating sheet: a lighter, slightly
   translucent surface with the page blurred behind it, a clear edge and a
   deep shadow — the way macOS panels sit above a window. */
#hosa-panel, #app-hosa-panel, #proj-hosa-panel {
  background: rgba(40, 40, 49, 0.9) !important;
  -webkit-backdrop-filter: saturate(170%) blur(28px);
  backdrop-filter: saturate(170%) blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 22px !important;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.85), 0 10px 24px -6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
#hosa-panel > :first-child, #app-hosa-panel > :first-child, #proj-hosa-panel > :first-child {
  background: rgba(255, 255, 255, 0.035) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}
#hosa-panel form, #app-hosa-panel form, #proj-hosa-panel form { border-top-color: rgba(255, 255, 255, 0.1) !important; }
/* Hosa's bubbles: a step lighter than the sheet so they read as bubbles. */
#hosa-messages .bg-surface-container-highest, #app-hosa-messages .bg-surface-container-highest, #proj-hosa-messages .bg-surface-container-highest {
  background: rgba(255, 255, 255, 0.09) !important;
}
/* One focus ring on the message field, not the global outline on top of it. */
#hosa-input:focus-visible, #app-hosa-input:focus-visible, #proj-hosa-input:focus-visible {
  outline: none !important;
  border-color: var(--hx-accent) !important;
  box-shadow: 0 0 0 3px rgba(184, 185, 255, 0.25);
}
#hosa-input, #app-hosa-input, #proj-hosa-input { background: rgba(0, 0, 0, 0.25) !important; }
@media (prefers-reduced-transparency: reduce) {
  #hosa-panel, #app-hosa-panel, #proj-hosa-panel { background: #282831 !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Wizard stepper ----------
   Done: frosted glass with a check. Current: a bright disc in a glass ring
   with a soft blue glow. Upcoming: a quiet matte dot. The line into a step
   lights up (blue → lavender) once that step is reached. */
.hx-stepper { list-style: none; margin: 0; padding: 8px 0 4px; gap: 0; }
.hx-stepper__item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.hx-stepper__line {
  position: absolute; top: 23px; height: 6px; border-radius: 3px;
  left: calc(-50% + 34px); right: calc(50% + 34px);
  background: rgba(255, 255, 255, 0.08);
}
.hx-stepper__item.is-done .hx-stepper__line,
.hx-stepper__item.is-active .hx-stepper__line {
  background: linear-gradient(90deg, #6fb4ff, #8fd0f8 55%, #b8b9ff);
  box-shadow: 0 0 14px rgba(111, 180, 255, 0.35);
}
.hx-stepper__item.is-active + .hx-stepper__item .hx-stepper__line {
  background: linear-gradient(90deg, rgba(150, 140, 255, 0.6), rgba(255, 255, 255, 0.08));
}
.hx-stepper__dot {
  position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 17px/1 var(--hx-font); color: var(--hx-text-3);
  background: #34343d; border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform var(--hx-fast) var(--hx-ease), background-color var(--hx-fast) var(--hx-ease), box-shadow var(--hx-med) var(--hx-ease);
}
.is-done .hx-stepper__dot {
  color: #fff; cursor: pointer;
  background: linear-gradient(160deg, rgba(235, 235, 255, 0.46), rgba(190, 190, 240, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.35);
}
.is-done .hx-stepper__dot .material-symbols-outlined { font-size: 26px; font-variation-settings: 'wght' 500; }
.is-done .hx-stepper__dot:hover { transform: scale(1.05); background: linear-gradient(160deg, rgba(255, 255, 255, 0.36), rgba(200, 200, 255, 0.18)); }
.is-active .hx-stepper__dot {
  background: radial-gradient(circle at 38% 32%, #e4f7ff 0%, #a4e0fa 45%, #6cc4ef 100%);
  border: 0;
  box-shadow:
    0 0 0 7px rgba(255, 255, 255, 0.12),
    0 0 0 8px rgba(255, 255, 255, 0.2),
    0 0 44px 16px rgba(110, 185, 255, 0.45),
    0 0 110px 44px rgba(120, 110, 255, 0.24);
}
.hx-stepper__label {
  margin-top: 18px; padding-inline: 4px; max-width: 100%;
  font-size: 14px; line-height: 1.3; color: var(--hx-text-3); overflow-wrap: break-word;
}
.is-done .hx-stepper__label { color: var(--hx-text-2); }
.is-active .hx-stepper__label { color: var(--hx-text); font-weight: 500; }
@media (prefers-reduced-transparency: reduce) {
  .is-done .hx-stepper__dot { -webkit-backdrop-filter: none; backdrop-filter: none; background: #4a4a57; }
}
.hx-stepper__label { -webkit-hyphens: auto; hyphens: auto; }
@media (max-width: 1100px) { .hx-stepper__label { font-size: 13px; } }

/* Video player controls, after apple.com: a frosted pill of chapter dots —
   the current one stretches and fills as it plays — and a round play/pause
   button beside it. Used by hosait-live.js. */
.hx-player { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.hx-player-dots { display: flex; align-items: center; gap: 2px; height: 56px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.hx-player-dot { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 5px; background: none; border: 0; cursor: pointer; }
.hx-player-pip { position: relative; display: block; width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.38); overflow: hidden; transition: width 0.45s var(--hx-ease), background-color 0.2s; }
.hx-player-dot:hover .hx-player-pip { background: rgba(255, 255, 255, 0.62); }
.hx-player-dot[aria-current="true"] .hx-player-pip { width: 48px; background: rgba(255, 255, 255, 0.24); }
.hx-player-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: var(--hx-text); }
.hx-player-btn { width: 56px; height: 56px; flex: none; border-radius: 999px; border: 0; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); color: var(--hx-text); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); cursor: pointer; transition: background-color 0.2s; }
.hx-player-btn.hidden { display: none; }
.hx-player-btn:hover { background: rgba(255, 255, 255, 0.15); }
.hx-player-btn .material-symbols-outlined { font-size: 28px; font-variation-settings: "FILL" 1, "wght" 500; }
@media (max-width: 420px) { .hx-player-dots { padding: 0 10px; } .hx-player-dot[aria-current="true"] .hx-player-pip { width: 36px; } }
@media (prefers-reduced-motion: reduce) { .hx-player-pip { transition: none; } }


/* Profile menu: quiet identity panel, generous hit areas and restrained chrome. */
header .hx-profile-trigger {
  gap: 10px;
  padding: 5px 10px 5px 14px;
  border: 1px solid var(--hx-line);
  background: var(--hx-surface-1);
  border-radius: 16px;
  min-height: 48px;
  transition: background .18s ease, border-color .18s ease;
}
header .hx-profile-trigger:hover,
header .hx-profile-trigger[aria-expanded="true"] {
  background: var(--hx-surface-3);
  border-color: var(--hx-line-strong);
}
header .hx-profile-trigger > .material-symbols-outlined {
  font-size: 18px;
  transition: transform .18s ease;
}
header .hx-profile-trigger[aria-expanded="true"] > .material-symbols-outlined {
  transform: rotate(180deg);
}
header .hx-profile-menu {
  box-sizing: border-box;
  width: 304px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  margin-top: 12px;
  padding: 8px;
  border-radius: 22px;
  border: 1px solid var(--hx-line-strong);
  background: linear-gradient(150deg, var(--hx-surface-3), var(--hx-surface-2) 65%);
  box-shadow: 0 24px 64px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.18), inset 0 1px 0 var(--hx-line);
  font-family: var(--hx-font);
}
.hx-profile-menu .hx-profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 12px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--hx-line);
}
.hx-profile-menu .hx-profile-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--hx-accent-soft);
  color: var(--hx-accent-hover);
  border: 1px solid rgba(184,185,255,.16);
  font-size: 17px;
  font-weight: 500;
}
.hx-profile-menu .hx-profile-details { min-width: 0; }
.hx-profile-menu .hx-profile-name {
  margin: 0 0 4px;
  color: var(--hx-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  letter-spacing: -.2px;
}
.hx-profile-menu .hx-profile-email {
  margin: 0;
  color: var(--hx-text-2);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
header .hx-profile-menu > [role="menuitem"] {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 11px;
  color: var(--hx-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  transition: background .15s ease;
}
header .hx-profile-menu > [role="menuitem"]:hover {
  background: rgba(255,255,255,.055);
}
header .hx-profile-menu > [role="menuitem"] > .material-symbols-outlined {
  font-size: 20px;
  flex-shrink: 0;
  color: var(--hx-text-2);
  font-variation-settings: 'wght' 300;
}
header .hx-profile-menu > .hx-profile-logout {
  margin-top: 8px;
  border-top: 1px solid var(--hx-line);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding-top: 15px;
  color: var(--hx-text-2);
}
header .hx-profile-trigger:focus-visible,
header .hx-profile-menu > [role="menuitem"]:focus-visible {
  outline: 2px solid var(--hx-accent);
  outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
  header .hx-profile-trigger,
  header .hx-profile-trigger > .material-symbols-outlined,
  header .hx-profile-menu > [role="menuitem"] { transition: none; }
}
