/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
  padding: 58px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 32px;
  align-items: start;
}

.hero-grid > * {
  min-inline-size: 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-inline-size: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: var(--amber-bright);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.28);
  margin-bottom: 18px;
}

.hero-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(2rem, 1.35rem + 3.2vw, 4.15rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero-title .accent {
  color: var(--emerald-bright);
  font-style: italic;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 610px;
  margin-bottom: 24px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.telemetry-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 680px) {
  .telemetry-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.telemetry-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  min-inline-size: 0;
}

.telemetry-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--emerald-bright);
}

.telemetry-val.gold {
  color: var(--amber-bright);
}

.telemetry-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* =========================================================================
   CARDS & CONCIERGE WIDGET
   ========================================================================= */
.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 249, 255, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  min-inline-size: 0;
}

.concierge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.badge-mono {
  display: inline-flex;
  align-items: center;
  max-inline-size: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.32);
  color: var(--blue);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.36);
  color: var(--amber-bright);
}

.chat-log {
  background: #f4f9ff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  min-block-size: 180px;
  max-block-size: min(260px, 38dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.chat-bubble {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 0.87rem;
  max-width: 90%;
}

.chat-bubble.ai {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.28);
  color: #0c4a6e;
  align-self: flex-start;
}

.chat-bubble.user {
  background: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--text);
  align-self: flex-end;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip {
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.77rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--emerald);
  color: var(--emerald-bright);
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.voice-controls-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.voice-persona-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-select-light {
  width: auto;
  max-inline-size: 100%;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="tel"],
textarea,
select {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(2, 132, 199, 0.22);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* =========================================================================
   SECTIONS & GRIDS
   ========================================================================= */
.section {
  padding: 64px 0;
  border-top: 1px solid rgba(2, 132, 199, 0.10);
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.section-header {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-header h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.65rem, 1.25rem + 2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 10px 0 12px;
}

.section-header p {
  color: var(--muted);
  font-size: 0.98rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 920px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-inline-size: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(14, 165, 233, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(2, 132, 199, 0.10);
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.spec-list {
  list-style: none;
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.spec-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.spec-list li::before {
  content: "✓";
  color: var(--emerald-bright);
  font-weight: 800;
}

/* =========================================================================
   LIVE AUDIT & AUTONOMOUS SANDBOX BUILDER
   ========================================================================= */
.audit-shell {
  background: linear-gradient(140deg, rgba(14, 165, 233, 0.10) 0%, rgba(255, 255, 255, 0.98) 55%, rgba(251, 191, 36, 0.08) 100%);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.audit-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

@media (max-width: 900px) {
  .audit-form-grid {
    grid-template-columns: 1fr;
  }
}

.audit-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
}

@media (max-width: 860px) {
  .audit-result-grid {
    grid-template-columns: 1fr;
  }
}

.audit-box {
  background: #f4f9ff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  min-inline-size: 0;
}

.audit-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(115px, 100%), 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.audit-greeting-box {
  font-size: 0.9rem;
  color: #065f46;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 13px;
  border-radius: 10px;
  line-height: 1.55;
}

/* =========================================================================
   PRICING TIERS & TERMS BOUNDARIES
   ========================================================================= */
.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-inline-size: 0;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.06);
}

.pricing-card.featured {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.10) 0%, #ffffff 65%, rgba(251, 191, 36, 0.08) 100%);
  border-color: rgba(14, 165, 233, 0.48);
  box-shadow: 0 24px 60px rgba(14, 165, 233, 0.14);
}

.price-figure {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.85rem, 1.4rem + 1.5vw, 2.3rem);
  font-weight: 800;
  color: var(--text);
  margin: 8px 0 4px;
}

.price-figure span {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.terms-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin-top: 18px;
}

/* =========================================================================
   DARK ROI CALCULATOR SURFACE (Component-specific dark color-scheme)
   ========================================================================= */
.roi-shell {
  color-scheme: only dark;
  background: #09090b;
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 20px;
  padding: clamp(18px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(18px, 3vw, 28px);
  align-items: center;
}

.roi-shell > * {
  min-inline-size: 0;
}

.roi-shell h2 {
  color: #ffffff;
}

.roi-shell .roi-subcopy {
  color: #cbd5e1;
  font-size: 0.94rem;
  margin-top: 8px;
}

.roi-panel {
  background: #121215;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: clamp(16px, 3vw, 24px);
  display: grid;
  gap: 14px;
  min-inline-size: 0;
}

.roi-leak-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.roi-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 12px;
}

/* =========================================================================
   RESPONSIVE DATA TABLES (Shared Public & Backoffice)
   ========================================================================= */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(2, 132, 199, 0.10);
  font-size: 0.87rem;
}

th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: #f4f9ff;
}

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(520px, 75dvh);
  container-type: inline-size;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
}

table.responsive-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

table.responsive-data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
}

table.responsive-data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.88rem;
}

.vs-table {
  --label-2: "GoHighLevel ($97/mo DIY)";
  --label-3: "Westminster Systems (£35–£97/mo)";
}

@container (width < 560px) {
  table.responsive-data-table,
  table.responsive-data-table thead,
  table.responsive-data-table tbody,
  table.responsive-data-table tr,
  table.responsive-data-table th,
  table.responsive-data-table td {
    display: block;
  }
  table.responsive-data-table thead {
    display: none;
  }
  table.responsive-data-table tbody {
    padding: 10px;
  }
  table.responsive-data-table tbody tr {
    margin-block-end: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-elevated);
  }
  table.responsive-data-table tbody tr:last-child {
    margin-block-end: 0;
  }
  table.responsive-data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: #f4f9ff;
    border-bottom: 1px solid var(--border);
    padding: 11px 14px;
  }
  table.responsive-data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(2, 132, 199, 0.08);
  }
  table.responsive-data-table tbody td:last-child {
    border-bottom: 0;
  }
  table.responsive-data-table td::before {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--muted);
    margin-block-end: 2px;
  }
  table.responsive-data-table td:nth-child(2)::before {
    content: var(--label-2) ": ";
  }
  table.responsive-data-table td:nth-child(3)::before {
    content: var(--label-3) ": ";
  }
  table.responsive-data-table td:nth-child(4)::before {
    content: var(--label-4) ": ";
  }
  table.responsive-data-table td:nth-child(5)::before {
    content: var(--label-5) ": ";
  }
}

/* =========================================================================
   NATIVE TOP-LAYER MODAL DIALOGS (Shared Public & Admin)
   ========================================================================= */
dialog.ws-native-dialog {
  inline-size: min(560px, calc(100dvw - 24px));
  max-inline-size: calc(100dvw - 24px);
  max-block-size: 90dvh;
  margin: auto;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-card);
  overflow-y: auto;
}

dialog.ws-native-dialog.wide {
  inline-size: min(760px, calc(100dvw - 24px));
}

dialog.ws-native-dialog[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

dialog.ws-native-dialog:modal {
  overscroll-behavior: contain;
}

dialog.ws-native-dialog::backdrop {
  background: rgba(12, 35, 64, 0.48);
  overflow: hidden;
  overscroll-behavior: contain;
}

/* =========================================================================
   PEDIGREE LOGOS / BADGES
   ========================================================================= */
.pedigree-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 920px) {
  .pedigree-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.pedigree-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
}

.pedigree-item strong {
  display: block;
  font-size: 0.96rem;
  color: var(--text);
  margin-bottom: 4px;
}

.pedigree-item span {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .hero {
    padding: 28px 0 32px;
  }
  .section {
    padding: 44px 0;
  }
  .glass-card,
  .audit-shell,
  .pricing-card,
  .feature-card {
    padding: 18px;
  }
  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-row > * {
    width: 100%;
  }
}
