@layer components {
/* ============================================================
   WebBLE Shared Components — single source of truth for every
   reusable primitive (buttons, cards, sections, code blocks,
   forms, prose, callouts, FAQ, layout helpers).
   Load AFTER design-tokens.css, BEFORE page-specific CSS.

   This file serves as the component library for secondary /
   marketing pages (pricing, mcp, changelog, for-hardware-companies).
   It is NOT loaded on index.html, docs.html, demo.html, or
   dashboard.html. Any selectors here that overlap with home.css
   are intentional fallbacks/overrides for those secondary pages.

   NOTE: Selector duplication with site.css is intentional.
   site.css is loaded on the home page; components.css provides
   the same base styles for secondary pages that don't load
   site.css. Changes to shared selectors must be applied in
   both files.
   ============================================================ */

/* 1. BUTTON SYSTEM ------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-target);
  font-family: var(--font);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition:
    background-color var(--ds-duration-fast) var(--ease-standard),
    border-color var(--ds-duration-fast) var(--ease-standard),
    color var(--ds-duration-fast) var(--ease-standard),
    box-shadow var(--ds-duration-fast) var(--ease-standard),
    transform var(--ds-duration-fast) var(--ease-standard),
    opacity var(--ds-duration-fast) var(--ease-standard);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius-pill);
}

.btn-md {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius-pill);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--glass-bg-prominent);
  color: var(--ds-text-on-accent);
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  background: rgba(var(--blue-rgb), 0.7);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(var(--blue-rgb), 0.35);
}

.btn-secondary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--glass-border);
}

.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.985);
}

.btn:focus-visible,
.nav-cta:focus-visible,
.nav-links a:focus-visible,
.nav-mobile a:focus-visible {
  outline: 3px solid var(--ds-focus-ring);
  outline-offset: 3px;
}

/* Home-page button overrides — specular highlight removal + flat gradient fills */
body[data-nav-page='home'] .nav.scrolled::before,
body[data-nav-page='home'] .nav.scrolled::after,
body[data-nav-page='home'] .nav-cta::before,
body[data-nav-page='home'] .nav-cta::after,
body[data-nav-page='home'] .btn-primary::before,
body[data-nav-page='home'] .btn-primary::after,
body[data-nav-page='home'] .btn-secondary::before,
body[data-nav-page='home'] .btn-secondary::after {
  opacity: 0;
  box-shadow: none;
}

body[data-nav-page='home'] .nav-cta,
body[data-nav-page='home'] .btn-primary {
  background: linear-gradient(180deg, rgba(var(--blue-rgb), 0.94), rgba(var(--blue-rgb), 0.82));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 24px rgba(var(--blue-rgb), 0.16);
}

body[data-nav-page='home'] .nav-cta:hover,
body[data-nav-page='home'] .btn-primary:hover {
  background: linear-gradient(180deg, rgba(var(--blue-rgb), 0.98), rgba(var(--blue-rgb), 0.88));
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(var(--blue-rgb), 0.18);
}

body[data-nav-page='home'] .btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body[data-nav-page='home'] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.12);
}

/* 2. SECTION PRIMITIVES -------------------------------------- */

.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad {
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

body[data-nav-page='home'] .section-label {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: none;
}

.section-footer {
  text-align: center;
  margin-top: 48px;
}

.section-demo {
  padding-top: 40px;
  padding-bottom: 80px;
}

/* 3. CARD SYSTEM --------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform var(--ds-duration-normal) var(--ease-standard), box-shadow var(--ds-duration-normal) var(--ease-standard);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 4. LAYOUT HELPERS ------------------------------------------ */

.page-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 5. CODE DISPLAY -------------------------------------------- */

.code-block {
  background: #1c1c1e;
  color: #f5f5f7;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.code-inline {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.08em 0.28em;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  transition:
    background 0.2s,
    color 0.2s;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
}

.copy-button.copied {
  color: var(--green);
}

/* Code syntax highlighting — dark theme tokens for code blocks */
.hl-kw {
  color: #c792ea;
}

.hl-str {
  color: #c3e88d;
}

.hl-fn {
  color: #82aaff;
}

.hl-cmt {
  color: #8a9bab;
}

.hl-tag {
  color: #f78c6c;
}

.hl-attr {
  color: #ffcb6b;
}

.highlight-code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.08em 0.28em;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

/* 6. TEXT UTILITIES ------------------------------------------ */

.muted {
  color: var(--text-secondary);
  font-size: 14px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.lede {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  line-height: 1.55;
}

/* 7. CALLOUTS ------------------------------------------------ */

.callout {
  padding: 16px 20px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
}

.callout-info {
  background: rgba(var(--blue-rgb), 0.08);
  border-color: rgba(var(--blue-rgb), 0.15);
}

.callout-warn {
  background: rgba(255, 149, 0, 0.08);
  border-color: rgba(255, 149, 0, 0.16);
}

.callout-tip {
  background: rgba(52, 199, 89, 0.08);
  border-color: rgba(52, 199, 89, 0.18);
}

.callout p {
  margin-bottom: 0;
  color: var(--text);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

/* 8. PROSE (DOCUMENTATION) ----------------------------------- */

.page-prose {
  min-width: 0;
}

.page-prose h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-prose h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.page-prose h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.page-prose h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.page-prose p,
.page-prose li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.page-prose p {
  margin-bottom: 16px;
}

.page-prose strong {
  color: var(--text);
}

.page-prose ul,
.page-prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.page-prose li {
  margin-bottom: 6px;
}

.page-prose p a:not(.btn):not(.page-card-cta),
.page-prose li a:not(.btn):not(.page-card-cta) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-prose code {
  font-size: 0.9em;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.page-prose pre {
  background: #1c1c1e;
  color: #f5f5f7;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.page-prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.page-prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}

.page-prose th,
.page-prose td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.page-prose th {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.page-prose td {
  color: var(--text-secondary);
}

.page-prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.page-prose .card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin: 24px 0;
}

.page-prose .card ul,
.page-prose .card ol {
  margin-bottom: 0;
}

.page-prose em {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  margin-top: 8px;
  line-height: 1.6;
}

/* 9. CONTACT FORMS ------------------------------------------- */

.contact-section {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}

.contact-row {
  display: flex;
  gap: 12px;
}

@media (max-width: 640px) {
  .contact-row {
    flex-direction: column;
  }
}

.contact-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.contact-input,
.contact-textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}

.contact-textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.5;
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: var(--blue);
}

.contact-input:focus-visible,
.contact-textarea:focus-visible {
  outline: 3px solid rgba(var(--blue-rgb), 0.4);
  outline-offset: 2px;
  border-color: var(--blue);
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: var(--text-secondary);
}

.contact-btn {
  align-self: flex-start;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--glass-bg-prominent);
  color: var(--ds-text-on-accent);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    box-shadow 0.2s;
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
}

.contact-btn:hover {
  background: rgba(var(--blue-rgb), 0.7);
  box-shadow: 0 4px 20px rgba(var(--blue-rgb), 0.3);
}

.contact-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.contact-field-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: -2px;
  line-height: 1.4;
}

.contact-label-optional {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.contact-success {
  padding: 16px 20px;
  background: rgba(52, 199, 89, 0.12);
  border: 1px solid rgba(52, 199, 89, 0.28);
  border-radius: var(--radius);
  color: var(--ds-success);
  font-weight: 500;
  display: none;
}

.contact-success.visible {
  display: block;
}

/* 11. DOCS LAYOUT -------------------------------------------- */

.docs-section,
.support-section,
.legal-section {
  padding-bottom: 72px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.docs-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.docs-sidebar-section + .docs-sidebar-section {
  margin-top: 20px;
}

.docs-sidebar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.docs-sidebar-nav {
  list-style: none;
}

.docs-sidebar-nav li + li {
  margin-top: 4px;
}

.docs-sidebar-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.docs-sidebar-nav a:hover {
  background: rgba(var(--blue-rgb), 0.08);
  color: var(--text);
  text-decoration: none;
}

.docs-sidebar-nav a.active {
  background: rgba(var(--blue-rgb), 0.12);
  color: var(--accent-text);
  font-weight: 600;
}

.docs-content {
  min-width: 0;
}

@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    top: auto;
  }
}

/* 12. CHANGELOG ---------------------------------------------- */
  margin-top: 40px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.changelog-subscribe input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

.changelog-subscribe input[type="email"]:focus {
  outline: 3px solid rgba(var(--blue-rgb), 0.32);
  outline-offset: 2px;
  border-color: var(--blue);
}

/* 13. PRODUCT SURFACE NOTE ----------------------------------- */

.product-surface-note {
  max-width: 840px;
  margin: 24px auto 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.product-surface-note p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.product-surface-note strong {
  color: var(--text);
}

.product-surface-note code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.08em 0.32em;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

/* 14. WIZARD MODAL ------------------------------------------- */

.wizard-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.wizard-modal.open {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.wizard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.wizard-panel {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-saturate) blur(40px);
  backdrop-filter: var(--glass-saturate) blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.4s ease;
  padding: 40px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.wizard-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    transform 0.2s;
  font-family: var(--font);
}

.wizard-close:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(90deg);
}

.wizard-panel h2 {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.wizard-panel .wizard-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}

.wizard-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 32px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.wizard-step {
  text-align: center;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard-step-icon {
  margin-bottom: 20px;
}

.wizard-step h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.wizard-step p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 24px;
}

.wizard-btns {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.wizard-btns .btn {
  flex: 1;
  justify-content: center;
}

.wizard-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}

@media (max-width: 640px) {
  .wizard-panel {
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
    padding: 24px;
  }
}

/* 15. SCROLL REVEAL ------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 16. GLOBAL FOCUS RING -------------------------------------- */

:focus-visible {
  outline: 3px solid rgba(var(--blue-rgb), 0.4);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
[role="tab"]:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(var(--blue-rgb), 0.4);
  outline-offset: 2px;
}

/* 17. SPINNER ------------------------------------------------ */

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* 18. RESPONSIVE OVERRIDES ----------------------------------- */

@media (max-width: 768px) {
  .section {
    padding: 0 16px;
  }

  .section-pad {
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

@media (max-width: 640px) {
  .section-pad {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .faq-item {
    padding: 18px 16px;
  }
}

/* 21. HERO CTA BUTTONS --------------------------------------- */

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  min-height: var(--touch-target);
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition:
    background-color var(--ds-duration-fast) var(--ease-standard),
    color var(--ds-duration-fast) var(--ease-standard),
    border-color var(--ds-duration-fast) var(--ease-standard),
    transform var(--ds-duration-fast) var(--ease-standard),
    box-shadow var(--ds-duration-fast) var(--ease-standard);
  border: 1px solid transparent;
  cursor: pointer;
}

.hero-cta-primary {
  background: var(--blue);
  color: var(--ds-text-on-accent);
  box-shadow: 0 8px 24px rgba(var(--blue-rgb), 0.25);
}

.hero-cta-primary:hover {
  background: var(--ds-accent-text);
  color: var(--ds-text-on-accent);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(var(--blue-rgb), 0.3);
}

.hero-cta-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.1);
}

.hero-cta-secondary:hover {
  background: var(--ds-surface);
  color: var(--text);
  text-decoration: none;
  border-color: rgba(15, 23, 42, 0.16);
}

.hero-cta:active { transform: scale(0.985); }

@media (prefers-color-scheme: dark) {
  .hero-cta-secondary {
    background: rgba(44, 44, 46, 0.76);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.1);
  }
  .hero-cta-secondary:hover {
    background: rgba(58, 58, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.16);
  }
}

[data-theme="dark"] .hero-cta-secondary {
  background: rgba(44, 44, 46, 0.76);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero-cta-secondary:hover {
  background: rgba(58, 58, 60, 0.9);
  border-color: rgba(255, 255, 255, 0.16);
}

@media (max-width: 640px) {
  .hero-install { font-size: 12px; padding: 6px 8px 6px 12px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .hero-cta { width: 100%; }
}

/* Liquid Glass retrofit — Hero CTAs */
.hero-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero-cta::before,
.hero-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.hero-cta::before {
  background: radial-gradient(ellipse at 50% 28%, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
}

.hero-cta::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 48%, transparent 100%);
}

.hero-cta-primary {
  background: var(--glass-bg-prominent);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
}

.hero-cta-primary:hover {
  background: rgba(var(--blue-rgb), 0.78);
}

.hero-cta-secondary {
  background: var(--glass-bg);
  color: var(--text);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--glass-border);
}

@media (prefers-color-scheme: dark) {
  .hero-cta-secondary:hover {
    background: rgba(58, 58, 60, 0.88);
  }
}

[data-theme="dark"] .hero-cta-secondary:hover {
  background: rgba(58, 58, 60, 0.88);
}

/* 22. SHARED PAGE COMPONENTS --------------------------------- */

.whofor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.whofor-card {
  padding: 22px 22px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whofor-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.whofor-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.whofor-card .step-code {
  margin-top: 4px;
}

.whofor-card .step-code code {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.calc-card h3 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.calc-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin: 0; }

.calc-card-feature { border-color: rgba(52, 199, 89, 0.3); background: rgba(52, 199, 89, 0.06); }

.calc-total {
  margin-top: 20px;
  padding: 20px 24px;
  background: var(--blue);
  color: var(--ds-text-on-accent);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 768px) { .calc-grid { grid-template-columns: 1fr; } }

.mcp-snippet {
  background: #1c1c1e;
  color: #f5f5f7;
  border-radius: var(--radius);
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
}

.mcp-clients {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.mcp-client-row {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

.mcp-what {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mcp-what code { font-family: var(--mono); font-size: 13px; background: var(--bg); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); }

@media (max-width: 768px) { .mcp-clients { grid-template-columns: 1fr; } }

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-row-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.step-row-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--blue-rgb), 0.1);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-row-item h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.step-row-item p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin: 0; }

@media (max-width: 768px) {
  .steps-row { grid-template-columns: 1fr; }
}

/* 23. LIQUID GLASS RETROFITS --------------------------------- */

.step-row-item,
.calc-card,
.mcp-client-row,
.mcp-what {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
}

.step-row-item::before,
.calc-card::before,
.mcp-client-row::before,
.mcp-what::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.16) 0%, transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 48%, transparent 100%);
}


.calc-total {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--glass-bg-prominent);
  border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  backdrop-filter: var(--glass-saturate) blur(var(--glass-blur));
  box-shadow: 0 12px 32px rgba(var(--blue-rgb), 0.22);
}

.calc-total::before,
.calc-total::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.calc-total::before {
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 255, 255, 0.22) 0%, transparent 65%);
}

.calc-total::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.04) 50%, transparent 100%);
}

/* 20. DARK MODE OVERRIDES ------------------------------------ */

@media (prefers-color-scheme: dark) {
  /* Token alias overrides — mirror site.css dark block so
     components.css is self-contained for all primitives. */

  :root {
    --blue: #0a84ff;
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --blue-light: #64d2ff;
    --glass-bg-prominent: rgba(10, 132, 255, 0.72);
    --text-secondary: #8E8E93;
    --link-color: #64d2ff;
    /* Dark mode uses the brighter `--ds-accent-dark` family; Apple blue on
       near-black background easily clears AA at its default lightness. */
    --accent-text: #64d2ff;
  }

  /* --- Buttons --- */

  .btn-secondary:hover {
    background: var(--glass-bg-pressed, rgba(58, 58, 60, 0.88));
  }

  .btn-ghost:hover {
    background: rgba(10, 132, 255, 0.14);
  }

  /* Home-page button overrides — dark */
  body[data-nav-page='home'] .nav-cta,
  body[data-nav-page='home'] .btn-primary {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.92), rgba(10, 132, 255, 0.76));
    box-shadow: 0 10px 24px rgba(10, 132, 255, 0.2);
  }

  body[data-nav-page='home'] .nav-cta:hover,
  body[data-nav-page='home'] .btn-primary:hover {
    background: linear-gradient(180deg, rgba(10, 132, 255, 0.98), rgba(10, 132, 255, 0.82));
    box-shadow: 0 12px 28px rgba(10, 132, 255, 0.22);
  }

  body[data-nav-page='home'] .btn-secondary {
    background: rgba(44, 44, 46, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
  }

  body[data-nav-page='home'] .btn-secondary:hover {
    background: rgba(58, 58, 60, 0.86);
    border-color: rgba(255, 255, 255, 0.12);
  }

  body[data-nav-page='home'] .section-label {
    background: rgba(44, 44, 46, 0.74);
    border-color: rgba(255, 255, 255, 0.08);
  }

  /* --- Cards --- */

  .card-glass {
    background: rgba(28, 28, 30, 0.72);
    border-color: rgba(255, 255, 255, 0.12);
  }

  /* --- Code --- */

  .copy-button {
    background: rgba(58, 58, 60, 0.86);
    border-color: rgba(255, 255, 255, 0.08);
  }

  .copy-button:hover {
    background: rgba(72, 72, 74, 0.96);
    color: var(--ds-text-on-accent);
  }

  /* --- Contact --- */

  .contact-success {
    background: rgba(48, 209, 88, 0.14);
    border-color: rgba(48, 209, 88, 0.32);
    color: var(--green);
  }

  /* --- Wizard --- */

  .wizard-close:hover {
    background: rgba(40, 40, 42, 0.7);
  }
}
}
