/* ============================================================
   eSeGeCe Corporate Website — Modern Clean Design
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #0057B8;
  --primary-dk: #003D82;
  --primary-lt: #E8F1FB;
  --accent:     #F0A400;
  --accent-dk:  #D18F00;
  --text:       #1E293B;
  --text-light: #64748B;
  --bg:         #FFFFFF;
  --bg-alt:     #F8FAFC;
  --bg-card:    #FFFFFF;
  --border:     #E2E8F0;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
  --transition: .25s cubic-bezier(.4,0,.2,1);
  --max-width:  1280px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dk); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p  { margin-bottom: 1rem; }

.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}

.section-title { margin-bottom: .75rem; }
.section-subtitle { color: var(--text-light); font-size: 1.125rem; max-width: 640px; margin: 0 auto 2.5rem; }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  font-size: .95rem; font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dk); border-color: var(--primary-dk); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent; color: var(--primary); border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-accent {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dk); border-color: var(--accent-dk); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-sm { padding: 8px 18px; font-size: .85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.btn-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.navbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}

.navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--text); }
.navbar-brand span { color: var(--primary); }

.navbar-nav { display: flex; align-items: center; list-style: none; gap: 4px; }

.navbar-nav > li { position: relative; }
.navbar-nav > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 16px;
  font-size: .9rem; font-weight: 500;
  color: var(--text); border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.navbar-nav > li > a:hover,
.navbar-nav > li.active > a { color: var(--primary); background: var(--primary-lt); }

/* Dropdown */
.dropdown-menu {
  position: absolute; top: 100%; left: 0;
  min-width: 240px; padding: 8px 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  list-style: none; z-index: 100;
}
li:hover > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-menu a {
  display: block; padding: 10px 20px;
  font-size: .88rem; color: var(--text);
  transition: all var(--transition);
}
.dropdown-menu a:hover { background: var(--primary-lt); color: var(--primary); }
.dropdown-menu .divider { height: 1px; margin: 6px 0; background: var(--border); }

/* Nested dropdown */
.dropdown-menu .has-submenu { position: relative; }
.dropdown-menu .has-submenu > .dropdown-menu {
  top: 0; left: 100%;
}

/* ---------- Sub-dropdown (nested product menus) ---------- */
.dropdown .has-submenu { position: relative; }
.dropdown .has-submenu > .sub-dropdown {
  position: absolute; top: 0; left: 100%;
  min-width: 220px; padding: 8px 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateX(8px);
  transition: all var(--transition);
  list-style: none; z-index: 101;
}
.dropdown .has-submenu:hover > .sub-dropdown {
  opacity: 1; visibility: visible; transform: translateX(0);
}
.dropdown .has-submenu > a { display: flex; align-items: center; gap: 6px; }
.dd-arrow { flex-shrink: 0; margin-left: 2px; }
.dd-arrow-r { flex-shrink: 0; width: 8px; height: 8px; }

/* Scrollable dropdown for deep menus (hidden scrollbar).
   The :has() exception lets nested sub-menus escape the scroll container
   horizontally when one is being hovered. Modern browsers (Chrome 105+,
   Firefox 121+, Safari 15.4+) support :has(); older browsers keep the
   pre-fix behavior. */
.scrollable-dropdown {
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollable-dropdown::-webkit-scrollbar { display: none; }
.scrollable-dropdown:has(.has-submenu:hover) { overflow: visible; }

/* ---------- Sub-menu viewport-edge flips (set by main.js) ---------- */
/* Open to the LEFT when there is no room on the right. */
.dropdown .has-submenu > .sub-dropdown.flip-left {
  left: auto;
  right: 100%;
  transform: translateX(-8px);
}
.dropdown .has-submenu:hover > .sub-dropdown.flip-left {
  transform: translateX(0);
}
/* Anchor from the BOTTOM when there is no room below. */
.dropdown .has-submenu > .sub-dropdown.flip-up {
  top: auto;
  bottom: 0;
}

/* Dropdown divider */
.dropdown-divider { height: 1px; margin: 6px 12px; background: var(--border); }

/* Nav badge (e.g. "Free") */
.nav-badge {
  display: inline-block; padding: 1px 8px; margin-left: 6px;
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  background: #E8F5E9; color: #2E7D32; border-radius: 10px;
  letter-spacing: .04em; vertical-align: middle;
}

/* Mobile toggle */
.navbar-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.navbar-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text);
  margin: 6px auto; transition: all var(--transition); border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 80px;
  background: linear-gradient(170deg, var(--bg) 0%, var(--primary-lt) 100%);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,87,184,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 700px; }
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .highlight { color: var(--primary); }
.hero p.lead {
  font-size: 1.2rem; color: var(--text-light);
  margin-bottom: 2rem; max-width: 560px; line-height: 1.8;
}
.hero .btn-group { margin-bottom: 2.5rem; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; color: var(--text-light);
}
.hero-badge svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.card-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-lt); color: var(--primary);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 1.5rem;
}
.card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.card p  { color: var(--text-light); font-size: .95rem; flex: 1; }
.card .card-link {
  margin-top: 16px;
  font-size: .9rem; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 4px;
}
.card .card-link:hover { gap: 8px; }

/* ---------- Feature Row ---------- */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  padding: 60px 0;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-row-text h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.feature-row-text p  { color: var(--text-light); margin-bottom: 1.5rem; }

.feature-list { list-style: none; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; font-size: .95rem; color: var(--text);
}
.feature-list li svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }

.feature-visual {
  background: var(--bg-alt); border-radius: var(--radius);
  padding: 40px; display: flex; align-items: center; justify-content: center;
  min-height: 320px; border: 1px solid var(--border);
}

/* ---------- Stats ---------- */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px; padding: 48px 0;
}
.stat-item { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat-label { font-size: .9rem; color: var(--text-light); margin-top: 4px; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; align-items: start;
}

.pricing-card {
  background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 36px 28px; text-align: center; transition: all var(--transition);
  position: relative;
}
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}
.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 16px; border-radius: 20px;
}
.pricing-card h3 { margin-bottom: 4px; }
.pricing-card .edition-tagline {
  font-size: .82rem; color: var(--text-light); font-weight: 500;
  margin: 0 0 14px; min-height: 1.2em;
}

/* ---------- Application download buttons (applications/) ---------- */
.app-downloads {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center; margin: 14px 0 6px;
}
.app-download-label {
  font-size: .8rem; color: var(--text-light); font-weight: 600;
  margin-right: 4px;
}
.app-download-btn {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 6px;
  background: var(--primary-lt); color: var(--primary-dk);
  border: 1px solid rgba(0, 87, 184, 0.18);
  font-size: .78rem; font-weight: 600; line-height: 1.3;
  text-decoration: none; transition: all var(--transition);
  white-space: nowrap;
}
.app-download-btn:hover {
  background: var(--primary); color: #fff;
  border-color: var(--primary); transform: translateY(-1px);
}
.app-source-note {
  font-size: .78rem; color: var(--text-light);
  margin: 6px 0 0; font-style: italic;
}
.pricing-card .price { font-size: 2.8rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.pricing-card .price span { font-size: 1rem; color: var(--text-light); font-weight: 400; }
.pricing-card .price-note { font-size: .85rem; color: var(--text-light); margin-bottom: 24px; }
.pricing-card ul { list-style: none; text-align: left; margin-bottom: 28px; }
.pricing-card ul li {
  padding: 8px 0; font-size: .9rem; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.pricing-card ul li:last-child { border: none; }
.pricing-card ul li svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }

/* ---------- Code Block ---------- */
.code-block {
  background: #1E293B; color: #E2E8F0; border-radius: var(--radius);
  padding: 24px 28px; font-family: var(--font-mono); font-size: .85rem;
  line-height: 1.7; overflow-x: auto; position: relative;
}
.code-block .code-lang {
  position: absolute; top: 12px; right: 16px;
  font-size: .7rem; color: #64748B; text-transform: uppercase; letter-spacing: .08em;
}
/* ============================================================
   Code-block syntax highlighting (unified scheme).
   Use only inside <pre><code>...</code></pre>:
     .code-keyword  .code-string  .code-number  .code-type  .code-comment
   ============================================================ */
.code-block pre .code-keyword { color: #7DD3FC; }
.code-block pre .code-string  { color: #86EFAC; }
.code-block pre .code-number  { color: #FDE68A; }
.code-block pre .code-type    { color: #FDE68A; }
.code-block pre .code-comment { color: #64748B; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 20px; font-size: .9rem; font-weight: 500;
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: var(--text-light);
  transition: all var(--transition);
}
.tab-btn.active, .tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- Comparison Table ---------- */
.comparison-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.comparison-table th, .comparison-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.comparison-table thead th { background: var(--bg-alt); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); }
.comparison-table tbody tr:hover { background: var(--primary-lt); }
.comparison-table .check { color: var(--primary); font-weight: 700; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dk) 100%);
  color: #fff; padding: 72px 0; text-align: center; border-radius: 0;
}
.cta-banner h2 { color: #fff; margin-bottom: .75rem; }
.cta-banner p  { color: rgba(255,255,255,.8); font-size: 1.1rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-primary { background: #fff; color: var(--primary); border-color: #fff; }
.cta-banner .btn-primary:hover { background: rgba(255,255,255,.9); }
.cta-banner .btn-outline { color: #fff; border-color: rgba(255,255,255,.4); }
.cta-banner .btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* ---------- Testimonials ---------- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 24px; }
.testimonial-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; position: relative;
}
.testimonial-card .quote { font-size: 1rem; color: var(--text); font-style: italic; margin-bottom: 16px; line-height: 1.7; }
.testimonial-card .author { font-weight: 600; font-size: .9rem; }
.testimonial-card .role { font-size: .82rem; color: var(--text-light); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0F172A; color: #94A3B8; padding: 64px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand span { color: var(--accent); }
.footer-desc { font-size: .9rem; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border-radius: var(--radius-sm);
  color: #94A3B8; transition: all var(--transition);
}
.footer-social a:hover { background: var(--primary); color: #fff; }

.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: #94A3B8; font-size: .88rem; transition: color var(--transition); }
.footer-col ul a:hover { color: #fff; }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 0; font-size: .82rem;
}
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { color: #64748B; }
.footer-bottom-links a:hover { color: #94A3B8; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 16px 0; font-size: .85rem; color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  padding: 64px 0 48px;
  background: linear-gradient(170deg, var(--bg) 0%, var(--primary-lt) 100%);
}
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p  { color: var(--text-light); font-size: 1.1rem; max-width: 640px; }

/* ---------- Icon Grid ---------- */
.icon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.icon-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: .82rem;
  text-align: center; color: var(--text-light); font-weight: 500;
  transition: all var(--transition);
}
.icon-item:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }
.icon-item svg { width: 28px; height: 28px; }

/* ---------- Badge / Tag ---------- */
.badge {
  display: inline-block; padding: 4px 12px;
  font-size: .75rem; font-weight: 600; border-radius: 20px;
  background: var(--primary-lt); color: var(--primary);
}
.badge-accent { background: #FEF3C7; color: #92400E; }

/* ---------- Accordion ---------- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border: none; }
.accordion-btn {
  width: 100%; padding: 18px 24px; background: none; border: none;
  text-align: left; font-size: 1rem; font-weight: 600; color: var(--text);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: background var(--transition);
}
.accordion-btn:hover { background: var(--bg-alt); }
.accordion-btn svg { width: 20px; height: 20px; transition: transform var(--transition); }
.accordion-item.open .accordion-btn svg { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.accordion-body-inner { padding: 0 24px 18px; color: var(--text-light); font-size: .95rem; line-height: 1.7; }
.accordion-item.open .accordion-body { max-height: 500px; }

/* ---------- Contact Form ---------- */
.contact-form { max-width: 600px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font); color: var(--text);
  transition: border-color var(--transition);
  background: #fff;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,87,184,.1);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .feature-row { grid-template-columns: 1fr; gap: 40px; }
  .feature-row.reverse { direction: ltr; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .hero { padding: 72px 0 56px; }

  .navbar-toggle { display: block; }
  .navbar-nav {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; padding: 16px;
    transform: translateX(100%); transition: transform var(--transition);
    overflow-y: auto; gap: 0;
  }
  .navbar-nav.open { transform: translateX(0); }
  .navbar-nav > li > a { padding: 14px 16px; font-size: 1rem; }
  .dropdown-menu {
    position: static; box-shadow: none; border: none;
    opacity: 1; visibility: visible; transform: none;
    padding-left: 16px; display: none;
  }
  li.open > .dropdown-menu { display: block; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .pricing-card.featured { transform: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .card-grid, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-badges { flex-direction: column; }
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger > .fade-in:nth-child(1) { transition-delay: .05s; }
.stagger > .fade-in:nth-child(2) { transition-delay: .1s; }
.stagger > .fade-in:nth-child(3) { transition-delay: .15s; }
.stagger > .fade-in:nth-child(4) { transition-delay: .2s; }
.stagger > .fade-in:nth-child(5) { transition-delay: .25s; }
.stagger > .fade-in:nth-child(6) { transition-delay: .3s; }

/* ---------- Protocol / API logo grid ---------- */
.logo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.logo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; color: var(--text);
  transition: all var(--transition);
}
.logo-item:hover { border-color: var(--primary); background: var(--primary-lt); }
.logo-item svg, .logo-item img { width: 24px; height: 24px; }

/* ---------- Two Column Layout ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Sidebar Nav ---------- */
.sidebar-nav { list-style: none; position: sticky; top: 96px; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: block; padding: 10px 16px; font-size: .9rem;
  border-left: 3px solid transparent; color: var(--text-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active { color: var(--primary); border-left-color: var(--primary); background: var(--primary-lt); }

/* ============================================================
   Class Aliases — Support variant naming across pages
   ============================================================ */

/* Header aliases */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }

/* Brand alias */
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.35rem; color: var(--text);
  text-decoration: none;
}
.brand span, .navbar-brand span { color: var(--primary); }
.brand-logo { height: 38px; width: auto; }
.footer .brand-logo { height: 32px; }

/* Nav menu alias */
.nav-menu {
  display: flex; align-items: center; list-style: none; gap: 4px;
}
.nav-menu > li { position: relative; }
.nav-item > a, .nav-item > .nav-link {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 16px; font-size: .9rem; font-weight: 500;
  color: var(--text); border-radius: var(--radius-sm);
  transition: all var(--transition); text-decoration: none;
}
.nav-item > a:hover, .nav-item.active > a { color: var(--primary); background: var(--primary-lt); }

/* Dropdown alias */
.nav-item .dropdown, .has-dropdown .dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 240px; padding: 8px 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  list-style: none; z-index: 100;
}
.nav-item:hover > .dropdown, .has-dropdown:hover > .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-item .dropdown a, .has-dropdown .dropdown a {
  display: block; padding: 10px 20px;
  font-size: .88rem; color: var(--text);
  transition: all var(--transition); text-decoration: none;
}
.nav-item .dropdown a:hover, .has-dropdown .dropdown a:hover {
  background: var(--primary-lt); color: var(--primary);
}

/* Mobile toggle alias */
.mobile-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.mobile-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text);
  margin: 6px auto; transition: all var(--transition); border-radius: 2px;
}

/* Cards grid alias */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Card title/desc aliases */
.card-title { margin-bottom: .5rem; font-size: 1.15rem; }
.card-description { color: var(--text-light); font-size: .95rem; flex: 1; }

/* Section header alias */
.section-header { text-align: center; margin-bottom: 48px; }
.section-description { color: var(--text-light); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }

/* Hero aliases */
.hero-subtitle {
  font-size: 1.2rem; color: var(--text-light);
  margin-bottom: 2rem; max-width: 560px; line-height: 1.8;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-content { max-width: 700px; }

/* Stats grid alias */
.stats {
  padding: 48px 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

/* Feature text alias */
.feature-text h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.feature-text p { color: var(--text-light); margin-bottom: 1.5rem; }

/* Protocol grid */
.protocol-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.protocol-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 20px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); text-align: center;
  transition: all var(--transition); cursor: default;
}
.protocol-badge:hover { border-color: var(--primary); background: var(--primary-lt); }
.protocol-badge strong { font-size: .95rem; color: var(--text); }
.protocol-badge span { font-size: .78rem; color: var(--text-light); }

/* Platform grid */
.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
}
.platform-badge {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-size: .82rem;
  text-align: center; color: var(--text-light); font-weight: 500;
  transition: all var(--transition);
}
.platform-badge:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }

/* CTA aliases */
.cta-content { text-align: center; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-banner .cta-buttons .btn-outline { color: #fff; border-color: rgba(255,255,255,.4); }
.cta-banner .cta-buttons .btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* Footer aliases */
.footer {
  background: #0F172A; color: #94A3B8; padding: 64px 0 0;
}
.footer .brand { color: #fff; font-size: 1.25rem; margin-bottom: 12px; }
.footer .brand span { color: var(--accent); }
.footer-brand p { font-size: .9rem; line-height: 1.7; margin-bottom: 20px; }

.social-links { display: flex; gap: 12px; }
.social-link {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border-radius: var(--radius-sm);
  color: #94A3B8; transition: all var(--transition); text-decoration: none;
}
.social-link:hover { background: var(--primary); color: #fff; }

/* Code block enhancements */
.code-header {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot.red { background: #FF5F56; }
.code-dot.yellow { background: #FFBD2E; }
.code-dot.green { background: #27C93F; }
.code-filename { font-size: .8rem; color: #64748B; margin-left: auto; }
.code-block pre { margin: 0; }
.code-block code { font-family: var(--font-mono); }
.check-icon { flex-shrink: 0; margin-top: 2px; }

/* Legal content */
.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h2 { margin: 2rem 0 1rem; font-size: 1.4rem; }
.legal-content h3 { margin: 1.5rem 0 .75rem; font-size: 1.15rem; }
.legal-content p, .legal-content li { color: var(--text-light); font-size: .95rem; line-height: 1.8; }
.legal-content ul { padding-left: 24px; margin-bottom: 1rem; }

/* Download cards */
.download-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.download-card:hover { border-color: var(--primary); background: var(--primary-lt); }

/* Info cards (contact page) */
.info-card {
  padding: 24px; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px;
}
.info-card h4 { margin-bottom: 8px; }

/* Responsive aliases — covers narrow viewports (incl. landscape phones, all
   tablets) AND any touch-primary device regardless of width. */
@media (max-width: 1024px), (pointer: coarse) {
  .mobile-toggle { display: block !important; z-index: 1001; position: relative; }
  /* Hamburger animates to an X when open (driven by aria-expanded set in JS) */
  .mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-menu {
    position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; padding: 8px 0 24px;
    transform: translateX(100%); transition: transform var(--transition);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    gap: 0;
    /* Stay above all page content; the header is z-index 1000 and sits above this */
    z-index: 999;
    /* Account for iOS Safari viewport bar on smaller devices */
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    /* Subtle shadow on the slide-in edge */
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  }
  .nav-menu.open { transform: translateX(0); }

  /* Top-level items: clear separator + bigger touch targets */
  .nav-menu > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .nav-menu > li:last-child { border-bottom: none; }
  .nav-item > a, .nav-item > .nav-link {
    padding: 18px 24px;
    font-size: 1.0625rem;
    font-weight: 500;
    border-radius: 0;
    justify-content: space-between;
  }
  .nav-item > a:hover, .nav-item > a:active {
    background: rgba(0, 87, 184, 0.06);
    color: var(--primary);
  }
  /* Open-state highlight on the parent link */
  .nav-item.has-dropdown.open > a {
    background: rgba(0, 87, 184, 0.04);
    color: var(--primary);
  }

  /* First-level dropdown: indented + own background */
  .nav-item .dropdown, .has-dropdown .dropdown {
    position: static; box-shadow: none; border: none;
    opacity: 1; visibility: visible; transform: none;
    padding: 4px 0 8px 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.025);
    display: none;
  }
  .nav-item .dropdown li, .has-dropdown .dropdown li {
    border-bottom: none;
  }
  .nav-item .dropdown a, .has-dropdown .dropdown a {
    padding: 14px 24px 14px 36px;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.78);
  }
  .nav-item .dropdown a:hover, .nav-item .dropdown a:active {
    background: rgba(0, 87, 184, 0.06);
    color: var(--primary);
  }
  li.open > .dropdown { display: block; }

  /* Sub-dropdown: nested deeper */
  .dropdown .has-submenu > .sub-dropdown {
    position: static; box-shadow: none; border: none;
    opacity: 1; visibility: visible; transform: none;
    padding: 0;
    background: rgba(0, 0, 0, 0.04);
    display: none;
  }
  .dropdown .has-submenu > .sub-dropdown a {
    padding: 12px 24px 12px 52px;
    font-size: 0.9375rem;
    color: rgba(0, 0, 0, 0.7);
  }
  .dropdown .has-submenu.open > .sub-dropdown { display: block; }

  /* Sub-sub-dropdown: deeper still */
  .sub-dropdown .has-submenu > .sub-dropdown a {
    padding-left: 68px;
    font-size: 0.9rem;
  }

  .dropdown-divider {
    margin: 8px 24px;
    background: rgba(0, 0, 0, 0.08);
  }

  /* Dropdown caret rotation when open */
  .dd-arrow, .dd-arrow-r {
    transition: transform var(--transition);
    flex-shrink: 0;
  }
  .has-dropdown.open > a > .dd-arrow,
  .has-submenu.open > a > .dd-arrow-r {
    transform: rotate(-180deg);
  }
  .dd-arrow-r { transform: rotate(90deg); }
  .has-submenu.open > a > .dd-arrow-r { transform: rotate(-90deg); }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .protocol-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .platform-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

/* ============================================================
   Trusted-by customer logos strip (homepage)
   ============================================================ */
.logo-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    align-items: center;
    margin-top: 40px;
}
.logo-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    border: 1px dashed rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}
.logo-slot img {
    max-height: 40px;
    max-width: 100%;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.2s ease, opacity 0.2s ease;
}
.logo-slot:hover img { filter: none; opacity: 1; }
.logo-placeholder {
    color: rgba(0, 0, 0, 0.35);
    font-size: 0.875rem;
    font-style: italic;
}
@media (max-width: 768px) {
    .logo-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .logo-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Reduced-motion accessibility
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* Disable animations, transitions, and transforms for users who request reduced motion */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Disable fade-in observer effect */
  .fade-in,
  .fade-in.visible {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   Print stylesheet
   ============================================================ */
@media print {
  /* Hide interactive UI */
  .header,
  .footer,
  .cta-banner,
  .mobile-toggle,
  .nav-menu,
  .hero-buttons,
  .btn,
  .related-grid,
  #related-pages {
    display: none !important;
  }

  /* Avoid forcing dark backgrounds for ink */
  body {
    color: #000 !important;
    background: #fff !important;
    font-size: 11pt;
    line-height: 1.4;
  }

  /* Make code blocks render cleanly */
  .code-block,
  .code-block pre,
  pre,
  code {
    background: #fafafa !important;
    color: #000 !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
  .code-block pre .code-keyword { color: #0057B8 !important; font-weight: bold; }
  .code-block pre .code-string  { color: #b35900 !important; }
  .code-block pre .code-number  { color: #006666 !important; }
  .code-block pre .code-type    { color: #267F99 !important; }
  .code-block pre .code-comment { color: #666 !important; font-style: italic; }

  /* Avoid orphaned headings */
  h1, h2, h3 { page-break-after: avoid; }

  /* Show full URL after links so the printed page is useful */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }
  /* But not for self-anchors / decorations */
  a[href^="#"]::after,
  a[aria-label]::after { content: ""; }

  /* Logo placeholder slots are noise on paper */
  .logo-strip { display: none !important; }

  /* Section spacing */
  .section { padding: 16pt 0; }
  .container { max-width: 100%; padding: 0; }

  /* Ensure breadcrumb is visible */
  .breadcrumb { display: block !important; font-size: 9pt; color: #666; }

  /* No fixed positioning */
  * { position: static !important; }
}

/* ============================================================
   Skip-to-content accessibility link
   ============================================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  z-index: 1500;
  padding: 8px 16px;
  background: var(--primary, #0057B8);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ============================================================
   Contact form error banner
   ============================================================ */
.form-error {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 0.9375rem;
}

/* ============================================================
   GDPR cookie consent banner
   ============================================================ */
.consent-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1100;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  animation: consent-slide-up 0.3s ease-out;
}
.consent-banner[hidden] { display: none; }
.consent-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.consent-banner p {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.5;
  min-width: 280px;
}
.consent-banner p a { color: var(--primary, #0057B8); }
.consent-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.consent-btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: #fff;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.consent-btn:hover {
  background: rgba(0, 87, 184, 0.06);
  border-color: rgba(0, 87, 184, 0.3);
  color: var(--primary, #0057B8);
}
.consent-btn-primary {
  background: var(--primary, #0057B8);
  border-color: var(--primary, #0057B8);
  color: #fff;
}
.consent-btn-primary:hover {
  background: #003F87;
  border-color: #003F87;
  color: #fff;
}
@keyframes consent-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Modal (Customize) */
.consent-modal[hidden] { display: none; }
.consent-modal {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.consent-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}
.consent-modal-panel {
  position: relative;
  width: 100%; max-width: 540px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.consent-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.consent-modal-header h2 { margin: 0; font-size: 1.25rem; }
.consent-modal-body {
  padding: 16px 24px;
  max-height: 60vh; overflow-y: auto;
}
.consent-category {
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.consent-category:last-child { border-bottom: none; }
.consent-category-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.consent-category h3 { margin: 0 0 4px; font-size: 1rem; }
.consent-category p { margin: 0; font-size: 0.8125rem; color: rgba(0, 0, 0, 0.6); }
.consent-toggle {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.consent-toggle input { opacity: 0; width: 0; height: 0; }
.consent-toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 22px;
  transition: background 0.15s ease;
}
.consent-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.consent-toggle input:checked + .consent-toggle-slider {
  background: var(--primary, #0057B8);
}
.consent-toggle input:checked + .consent-toggle-slider::before {
  transform: translateX(18px);
}
.consent-toggle input:disabled + .consent-toggle-slider {
  opacity: 0.5; cursor: not-allowed;
}
.consent-modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}
@media (max-width: 600px) {
  .consent-banner-inner { flex-direction: column; align-items: stretch; }
  .consent-actions { justify-content: stretch; }
  .consent-btn { flex: 1; }
}

/* ============================================================
   Feature comparison matrix (modern, icon-rich)
   ============================================================ */

/* Edition tier overview cards */
.edition-tier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0 48px;
}
.edition-tier-card {
  position: relative;
  padding: 32px 24px 28px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.edition-tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.25);
}
.edition-tier-card.featured {
  border-color: var(--primary, #0057B8);
  box-shadow: 0 12px 40px rgba(0, 87, 184, 0.18);
}
.edition-tier-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: var(--primary, #0057B8);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.edition-tier-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(0, 87, 184, 0.08);
  color: var(--primary, #0057B8);
  margin-bottom: 16px;
}
.edition-tier-card h3 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 700;
}
.edition-tier-tagline {
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.edition-tier-summary {
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.55;
  margin: 0;
}

/* Matrix groups — each feature category lives in its own rounded card */
.feature-matrix-group {
  margin: 0 0 32px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.feature-matrix-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(0, 87, 184, 0.05), rgba(0, 87, 184, 0.02));
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.feature-matrix-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(0, 87, 184, 0.1);
  color: var(--primary, #0057B8);
  flex-shrink: 0;
}
.feature-matrix-group-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
}
.feature-matrix-group-header .group-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

/* The matrix table */
.feature-matrix {
  width: 100%;
  border-collapse: collapse;
}
.feature-matrix thead th {
  padding: 12px 16px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
  background: rgba(0, 0, 0, 0.015);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.feature-matrix thead th:first-child { text-align: left; }
.feature-matrix thead th:not(:first-child) { width: 130px; }
.feature-matrix tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  vertical-align: middle;
}
.feature-matrix tbody td:not(:first-child) { text-align: center; }
.feature-matrix tbody tr:last-child td { border-bottom: none; }
.feature-matrix tbody tr {
  transition: background 0.12s ease;
}
.feature-matrix tbody tr:hover {
  background: rgba(0, 87, 184, 0.025);
}
.feature-matrix .feature-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  display: block;
  line-height: 1.35;
}
.feature-matrix .feature-desc {
  display: block;
  font-size: 0.8125rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 400;
  margin-top: 2px;
  line-height: 1.4;
}

/* Check / dash / partial cells */
.matrix-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
}
.matrix-cell.matrix-check {
  background: rgba(46, 125, 50, 0.12);
  color: #2E7D32;
}
.matrix-cell.matrix-dash {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.28);
}
.matrix-cell.matrix-partial {
  background: rgba(255, 152, 0, 0.12);
  color: #E65100;
  font-size: 0.875rem;
  font-weight: 600;
  font-style: normal;
}

/* Legend below matrix */
.matrix-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px 0 0;
  font-size: 0.8125rem;
  color: rgba(0, 0, 0, 0.65);
}
.matrix-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Mobile responsive: stack edition cards, shrink table padding */
@media (max-width: 768px) {
  .edition-tier-cards { grid-template-columns: 1fr; gap: 16px; }
  .edition-tier-card.featured { transform: none; }
  .feature-matrix-group-header { padding: 14px 16px; }
  .feature-matrix-group-header h3 { font-size: 1rem; }
  .feature-matrix thead th,
  .feature-matrix tbody td { padding: 10px 8px; }
  .feature-matrix thead th:not(:first-child) { width: auto; min-width: 60px; font-size: 0.65rem; }
  .feature-matrix .feature-name { font-size: 0.875rem; }
  .feature-matrix .feature-desc { display: none; }
  .matrix-cell { width: 26px; height: 26px; }
}

/* ============================================================
   Testimonials section (homepage)
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  margin: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 87, 184, 0.1);
  border-color: rgba(0, 87, 184, 0.25);
}
.testimonial-quote-mark {
  color: var(--primary, #0057B8);
  opacity: 0.18;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.testimonial-quote {
  flex: 1;
  margin: 0 0 24px;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.82);
  font-style: italic;
  quotes: none;
}
.testimonial-quote::before,
.testimonial-quote::after { content: none; }
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.testimonial-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
}
.testimonial-role {
  font-size: 0.8125rem;
  color: rgba(0, 0, 0, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (max-width: 968px) {
  .testimonial-grid { grid-template-columns: 1fr; gap: 16px; }
  .testimonial-card { padding: 24px 20px 20px; }
}

/* ============================================================
   Front-page enhancements
   New classes for the redesigned homepage. Append-only.
   ============================================================ */

/* ---------- Hero v2: 2-column with illustration ---------- */
.hero.hero-v2 {
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero.hero-v2 .container { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-grid .hero-content { max-width: none; }
.hero.hero-v2 h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.75rem);
  margin-bottom: 1.4rem;
}
.hero-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-illustration svg {
  width: 100%;
  height: auto;
  max-width: 520px;
  filter: drop-shadow(0 12px 28px rgba(0, 87, 184, 0.10));
}

/* ---------- Bento grid: "What You Can Build" ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "chat    chat    trading webrtc"
    "chat    chat    ai      iot   "
    "sign    sign    sign    iot   ";
  gap: 20px;
}
.bento-area-chat    { grid-area: chat;    }
.bento-area-trading { grid-area: trading; }
.bento-area-ai      { grid-area: ai;      }
.bento-area-iot     { grid-area: iot;     }
.bento-area-webrtc  { grid-area: webrtc;  }
.bento-area-sign    { grid-area: sign;    }

.bento-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0, 87, 184, 0.10);
  border-radius: 16px;
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 87, 184, 0.05);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 87, 184, 0.04), rgba(240, 164, 0, 0.03));
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.25);
}
.bento-card:hover::before { opacity: 1; }
.bento-card > * { position: relative; z-index: 1; }
.bento-illustration svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}
.bento-card h3 {
  font-size: 1.15rem;
  margin: 6px 0 0;
  color: var(--text);
}
.bento-card p {
  font-size: 0.92rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.55;
  flex: 1;
}
.bento-lg h3 { font-size: 1.3rem; }
.bento-lg p  { font-size: 0.97rem; }

.use-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.tag-chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--primary-lt);
  color: var(--primary);
  border-radius: 999px;
  border: 1px solid rgba(0, 87, 184, 0.12);
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "chat    chat   "
      "trading webrtc "
      "ai      iot    "
      "sign    sign   ";
  }
}
@media (max-width: 640px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chat"
      "trading"
      "ai"
      "iot"
      "webrtc"
      "sign";
  }
}

/* ---------- Architecture diagram ---------- */
.architecture-diagram {
  background: #fff;
  border: 1px solid rgba(0, 87, 184, 0.10);
  border-radius: 16px;
  padding: 32px 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 87, 184, 0.06);
  overflow-x: auto;
}
.architecture-diagram svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
  margin: 0 auto;
}
.architecture-caption {
  text-align: center;
  color: var(--text-light);
  font-size: 0.92rem;
  margin: 16px 0 0;
  font-style: italic;
}

/* ---------- Code playground (multi-language tabs) ---------- */
.feature-visual-playground {
  background: transparent;
  padding: 0;
  border: none;
  align-items: stretch;
  min-height: 0;
  display: block;
}
.code-playground {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 87, 184, 0.06);
  overflow: hidden;
}
.code-playground .tabs {
  margin: 0;
  padding: 0 12px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  flex-wrap: wrap;
}
.code-playground .tab-btn {
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}
.code-playground .tab-content {
  padding: 0;
}
.code-playground .code-block {
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---------- Performance & Scale ---------- */
.perf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.perf-card {
  background: #fff;
  border: 1px solid rgba(0, 87, 184, 0.10);
  border-radius: 16px;
  padding: 28px 22px 24px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 87, 184, 0.05);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.perf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.25);
}
.perf-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-lt);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.perf-number {
  display: block;
  font-size: clamp(2.1rem, 3.4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--primary);
}
.perf-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  margin-top: -2px;
}
.perf-detail {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.55;
  margin: 4px 0 0;
}

@media (max-width: 1024px) {
  .perf-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .perf-grid { grid-template-columns: 1fr; }
}

/* ---------- Categorized protocol rows ---------- */
.protocol-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
}
.protocol-row:last-child { margin-bottom: 0; }
.protocol-row-label .row-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-lt);
  padding: 8px 14px;
  border-radius: 8px;
  line-height: 1.25;
}
.protocol-row .protocol-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
@media (max-width: 768px) {
  .protocol-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }
  .protocol-row-label .row-tag { display: inline-block; }
}

/* ---------- AI cards: small art above the icon ---------- */
.ai-card { position: relative; }
.ai-card .ai-art {
  margin: -8px -8px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-lt), #fff);
  padding: 8px;
}
.ai-card .ai-art svg {
  width: 100%;
  height: auto;
  max-height: 80px;
  display: block;
}

/* ---------- Rich CTA ---------- */
.cta-banner.cta-rich {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  text-align: left;
}
.cta-rich .cta-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.cta-rich .container { position: relative; z-index: 1; }
.cta-rich-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.cta-rich-text h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin-bottom: 1rem;
}
.cta-rich-text p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.08rem;
  max-width: 560px;
  margin: 0 0 2rem;
}
.cta-rich-text .cta-buttons { justify-content: flex-start; }
.cta-rich-visual {
  display: flex;
  justify-content: center;
}
.cta-rich-visual svg {
  width: 100%;
  height: auto;
  max-width: 360px;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.18));
}

@media (max-width: 1024px) {
  .hero.hero-v2 { padding: 48px 0 56px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-content { order: 1; }
  .hero-illustration { order: 2; max-width: 420px; margin: 0 auto; }
  .hero-illustration svg { max-width: 420px; }
  .cta-rich-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .cta-rich-text .cta-buttons { justify-content: center; }
  .cta-rich-text p { margin-left: auto; margin-right: auto; }
}
@media (max-width: 768px) {
  .hero.hero-v2 { padding: 24px 0 40px; }
  .hero-illustration { display: none; }
  .architecture-diagram { padding: 16px 8px 12px; }
}


/* ============================================================
   Cross-platform feature row — balanced two-side layout
   ============================================================ */
.cross-platform-row .feature-visual,
.cross-platform-row .feature-text {
  flex: 1 1 0;
  min-width: 0;
}

.cp-showcase {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cp-group-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}
.cp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.cp-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.cp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 8px 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  text-align: center;
  color: rgba(0, 0, 0, 0.75);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.3);
  color: var(--primary, #0057B8);
}
.cp-card svg {
  flex-shrink: 0;
  margin-bottom: 8px;
}
.cp-card .cp-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.2;
}
.cp-card:hover .cp-name {
  color: var(--primary, #0057B8);
}
.cp-card .cp-detail {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

/* IDE card variant — slightly bigger emphasis */
.cp-card.cp-ide {
  padding: 22px 10px 18px;
  background: linear-gradient(180deg, #fff 0%, rgba(0, 87, 184, 0.025) 100%);
}

/* Right side stat treatment */
.cp-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
  margin: 0 0 24px;
}
.cp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cp-stat {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.cp-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary, #0057B8), #003F87);
}
.cp-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.3);
}
.cp-stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary, #0057B8);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.cp-stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 4px;
}
.cp-stat-detail {
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.4;
}

/* Responsive: tablet — keep both sides but allow wrap */
@media (max-width: 1024px) {
  .cp-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .cp-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cp-card { padding: 14px 6px 12px; }
  .cp-card svg { width: 30px; height: 30px; }
  .cp-card .cp-detail { font-size: 0.65rem; }
  .cp-stat-num { font-size: 2rem; }
}
@media (max-width: 768px) {
  .cp-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cp-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cp-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cp-stat { padding: 14px 14px 12px; }
  .cp-stat-num { font-size: 1.75rem; }
}
@media (max-width: 480px) {
  .cp-grid { grid-template-columns: repeat(3, 1fr); }
  .cp-stats { grid-template-columns: 1fr; }
}

/* ============================================================
   Messaging protocols — detailed cards (homepage)
   ============================================================ */
.messaging-detail {
  margin: 32px 0;
}
.messaging-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.messaging-detail-header .row-tag {
  flex-shrink: 0;
}
.messaging-detail-lead {
  flex: 1 1 300px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.65);
  margin: 0;
}
.messaging-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.messaging-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.messaging-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 87, 184, 0.12);
  border-color: rgba(0, 87, 184, 0.25);
}
.messaging-head {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.messaging-head h4 {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.msg-version {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary, #0057B8);
  background: rgba(0, 87, 184, 0.08);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.msg-tagline {
  display: block;
  font-size: 0.825rem;
  color: rgba(0, 0, 0, 0.55);
  font-style: italic;
  line-height: 1.45;
}
.msg-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.72);
  margin: 0 0 14px;
}
.msg-features {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.7);
}
.msg-features li {
  position: relative;
  padding: 4px 0 4px 18px;
}
.msg-features li::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #0057B8);
  opacity: 0.5;
}
.msg-features strong {
  color: rgba(0, 0, 0, 0.88);
  font-weight: 600;
}

@media (max-width: 768px) {
  .messaging-grid { grid-template-columns: 1fr; gap: 14px; }
  .messaging-card { padding: 18px 18px 16px; }
  .messaging-head h4 { font-size: 1.125rem; }
  .messaging-detail-header { flex-direction: column; gap: 12px; }
}

/* ============================================================
   Login / Logout link in nav
   ============================================================ */
.nav-account { margin-left: auto; }
.nav-account .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(0, 87, 184, 0.08);
  color: var(--primary, #0057B8);
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(0, 87, 184, 0.18);
  transition: background 0.15s, border-color 0.15s;
}
.nav-account .nav-link:hover {
  background: rgba(0, 87, 184, 0.14);
  border-color: rgba(0, 87, 184, 0.32);
}
@media (max-width: 1024px), (pointer: coarse) {
  /* In mobile slide-in panel, behave like a regular menu item */
  .nav-account { margin-left: 0; border-top: 1px solid rgba(0, 0, 0, 0.06); }
  .nav-account .nav-link {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 18px 24px;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ============================================================
   Blog — long-form article reading
   ============================================================ */
.blog-article { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.blog-article-header { margin-bottom: 32px; }
.blog-article-header .breadcrumb { margin-bottom: 16px; font-size: 0.875rem; }
.blog-article-header h1 {
  font-size: 2.25rem; line-height: 1.2; letter-spacing: -0.01em;
  margin: 8px 0 12px; color: rgba(0,0,0,0.92);
}
.blog-meta { font-size: 0.9rem; color: rgba(0,0,0,0.55); margin-bottom: 24px; }
.blog-meta-tag { color: var(--primary, #0057B8); text-decoration: none; font-weight: 500; }
.blog-meta-tag:hover { text-decoration: underline; }
.blog-meta-sep { margin: 0 8px; opacity: 0.5; }
.blog-article-cover {
  display: block; width: 100%; height: auto;
  margin: 24px 0 32px; border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
}
.blog-article-body { font-size: 1.0625rem; line-height: 1.7; color: rgba(0,0,0,0.78); }
.blog-article-body > * + * { margin-top: 1.1em; }
.blog-article-body h2 {
  font-size: 1.5rem; margin-top: 2.4rem; margin-bottom: 0.6rem;
  color: rgba(0,0,0,0.9); letter-spacing: -0.005em;
}
.blog-article-body h3 {
  font-size: 1.2rem; margin-top: 1.8rem; margin-bottom: 0.4rem; color: rgba(0,0,0,0.88);
}
.blog-article-body p { margin: 0; }
.blog-article-body a {
  color: var(--primary, #0057B8); text-decoration: underline;
  text-decoration-color: rgba(0, 87, 184, 0.3); text-underline-offset: 3px;
}
.blog-article-body a:hover { text-decoration-color: var(--primary, #0057B8); }
.blog-article-body ul, .blog-article-body ol { padding-left: 1.5em; }
.blog-article-body li + li { margin-top: 0.4em; }
.blog-article-body img {
  display: block; max-width: 100%; height: auto;
  margin: 1.6em auto; border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
}
.blog-article-body blockquote {
  margin: 1.4em 0; padding: 12px 20px;
  border-left: 3px solid var(--primary, #0057B8);
  background: rgba(0, 87, 184, 0.04);
  font-style: italic; color: rgba(0,0,0,0.7);
}
.blog-article-body pre {
  margin: 1.4em 0; padding: 18px 20px;
  background: #1e293b; color: #e2e8f0;
  border-radius: 10px; overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem; line-height: 1.5;
}
.blog-article-body pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }
.blog-article-body code {
  background: rgba(0, 87, 184, 0.08); color: var(--primary, #0057B8);
  padding: 1px 6px; border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.92em;
}
.blog-article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; }
.blog-article-body th, .blog-article-body td {
  padding: 10px 14px; border-bottom: 1px solid rgba(0,0,0,0.08); text-align: left;
}
.blog-article-body th { background: rgba(0, 87, 184, 0.04); font-weight: 600; }

@media (max-width: 768px) {
  .blog-article { padding: 28px 16px 48px; }
  .blog-article-header h1 { font-size: 1.75rem; }
  .blog-article-body { font-size: 1rem; }
}

/* ============================================================
   Blog — index page
   ============================================================ */
.blog-controls {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 32px;
}
.blog-controls input[type="search"] {
  flex: 1 1 240px; padding: 10px 14px; font-size: 0.95rem;
  border: 1px solid rgba(0,0,0,0.12); border-radius: 8px; background: #fff;
  font-family: inherit;
}
.blog-controls select {
  padding: 10px 14px; font-size: 0.95rem;
  border: 1px solid rgba(0,0,0,0.12); border-radius: 8px;
  background: #fff; cursor: pointer; font-family: inherit;
}
/* Blog card — adds cover image + blog-specific meta to the standard .card */
.blog-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.blog-card .blog-card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: linear-gradient(135deg, #0057B8 0%, #003F87 100%);
  border-radius: 0;
  border: none;
  margin: 0;
}
.blog-card .card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card .blog-card-meta {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.55);
  margin-bottom: 6px;
}
.blog-card .blog-card-meta-tag {
  color: var(--primary, #0057B8);
  font-weight: 600;
}
.blog-card .blog-card-meta-sep { margin: 0 6px; opacity: 0.5; }
.blog-card .card-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.blog-card .card-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.65);
  flex: 1;
}
.blog-empty { max-width: 760px; margin: 32px auto; padding: 32px 24px; text-align: center; color: rgba(0,0,0,0.55); }
.blog-pagination { display: flex; gap: 8px; justify-content: center; margin: 32px 0; flex-wrap: wrap; }
.blog-pagination button {
  padding: 8px 14px; font-size: 0.9rem; font-family: inherit;
  background: #fff; border: 1px solid rgba(0,0,0,0.12); border-radius: 6px; cursor: pointer;
}
.blog-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.blog-pagination button.active {
  background: var(--primary, #0057B8); color: #fff; border-color: var(--primary, #0057B8);
}

/* ---------- Component-page Resources table ---------- */
table.resources-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
table.resources-table tr {
  transition: background var(--transition);
}
table.resources-table tbody tr:hover {
  background: var(--primary-lt);
}
table.resources-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
}
table.resources-table tbody tr:last-child td { border-bottom: none; }
table.resources-table td.resource-icon {
  width: 56px;
  padding-right: 0;
  text-align: center;
}
table.resources-table td.resource-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  vertical-align: middle;
}
table.resources-table td.resource-name strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
table.resources-table td.resource-name .resource-desc {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.45;
}
table.resources-table td.resource-link {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
table.resources-table td.resource-link a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-lt);
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid rgba(0, 87, 184, 0.18);
}
table.resources-table td.resource-link a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}
@media (max-width: 600px) {
  table.resources-table td { padding: 12px 14px; }
  table.resources-table td.resource-icon { display: none; }
  table.resources-table td.resource-name strong { font-size: 0.95rem; }
  table.resources-table td.resource-name .resource-desc { font-size: 0.8rem; }
  table.resources-table td.resource-link a { padding: 6px 10px; font-size: 0.8rem; }
}

/* ===== Phase-2 additions ===== */

/* Blog author bio appended to article footers. */
.blog-author {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border, #e2e8f0);
  font-size: 0.95rem;
  color: var(--text-light, #475569);
}
.blog-author p { margin: 0; }
.blog-author a {
  color: var(--primary, #0057B8);
  text-decoration: none;
}
.blog-author a:hover { text-decoration: underline; }

/* Glossary definition list — two-column on wide screens, single column on mobile. */
.glossary {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 18px;
  font-size: 0.95rem;
}
.glossary dt {
  font-weight: 600;
  margin: 0;
  scroll-margin-top: 80px;
}
.glossary dd {
  margin: 4px 0 0;
  color: var(--text-light, #475569);
}
.glossary dt a.glossary-anchor {
  color: var(--primary, #0057B8);
  text-decoration: none;
  margin-left: 6px;
  opacity: 0.4;
  font-size: 0.85em;
}
.glossary dt:hover a.glossary-anchor { opacity: 1; }
@media (max-width: 720px) {
  .glossary { grid-template-columns: 1fr; }
}
