/* ==========================================================================
   intelligence.cloud — Components
   Product-specific UI components for Tresic Intelligence Cloud
   Depends on: base.css (brand tokens), layout.css, Google Fonts
   ========================================================================== */

/* ==========================================================================
   1. Compliance Badges
   ========================================================================== */
.compliance-badge {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25em 0.75em;
  border-radius: 100px;
  background: var(--intelligence-blue);
  color: var(--cloud-white);
  line-height: 1.4;
  white-space: nowrap;
}

.badge-hipaa  { background: var(--intelligence-blue); }
.badge-tcpa   { background: var(--intelligence-blue); }
.badge-pci    { background: var(--intelligence-blue); }
.badge-soc2   { background: var(--intelligence-blue); }
.badge-cmmc   { background: var(--intelligence-blue); }
.badge-glba   { background: var(--intelligence-blue); }
.badge-ecoa   { background: var(--intelligence-blue); }
.badge-ferpa  { background: var(--intelligence-blue); }

/* ==========================================================================
   2. Persona Tags
   ========================================================================== */
.persona-tag {
  display: inline-flex;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--medium-gray);
  padding: 0.2em 0.7em 0.2em 0.5em;
  border-radius: 4px;
  background: var(--light-gray);
  gap: 0.4em;
}

.persona-tag::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--intelligence-blue);
  flex-shrink: 0;
}

.persona-tag.persona-ops::before       { background: var(--tresic-gold); }
.persona-tag.persona-compliance::before { background: var(--signal-orange); }
.persona-tag.persona-it::before         { background: var(--insights-purple); }
.persona-tag.persona-executive::before  { background: var(--deep-navy); }
.persona-tag.persona-sales::before      { background: var(--success-green); }

/* ==========================================================================
   3. Pricing Cards
   ========================================================================== */
.pricing-card {
  background: var(--cloud-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(26, 35, 50, 0.08);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.pricing-card:hover {
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.12);
  transform: translateY(-4px);
}

/* Product accent border-top — set via inline style or modifier */
.pricing-card             { border-top: 3px solid var(--intelligence-blue); }
.pricing-card.accent-gold { border-top-color: var(--tresic-gold); }
.pricing-card.accent-orange { border-top-color: var(--signal-orange); }
.pricing-card.accent-green  { border-top-color: var(--success-green); }
.pricing-card.accent-purple { border-top-color: var(--insights-purple); }

.pricing-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
}

.pricing-card .price {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--deep-navy);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-card .price-model {
  font-size: 0.85rem;
  color: var(--medium-gray);
  margin-bottom: 1.5rem;
}

.pricing-card .features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  flex: 1;
}

.pricing-card .features li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.6em;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.pricing-card .features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success-green);
  font-weight: 800;
}

.pricing-card .pricing-cta {
  display: block;
  width: 100%;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75em 1.5em;
  border-radius: 6px;
  border: 2px solid var(--intelligence-blue);
  background: transparent;
  color: var(--intelligence-blue);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  margin-top: auto;
}

.pricing-card .pricing-cta:hover {
  background: var(--intelligence-blue);
  color: var(--cloud-white);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Featured pricing card */
.pricing-card.featured {
  border: 2px solid var(--tresic-gold);
  border-top: 4px solid var(--tresic-gold);
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.12);
}

.pricing-card.featured .pricing-cta {
  background: var(--tresic-gold);
  color: var(--deep-navy);
  border-color: var(--tresic-gold);
}

.pricing-card.featured .pricing-cta:hover {
  background: #e69a1e;
  border-color: #e69a1e;
}

/* ==========================================================================
   4. Comparison Table
   ========================================================================== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.comparison-table thead {
  background: var(--deep-navy);
  color: var(--cloud-white);
  position: sticky;
  top: var(--header-height);
  z-index: 10;
}

.comparison-table th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.comparison-table tbody tr:hover {
  background: var(--light-gray);
}

.comparison-table .check {
  color: var(--success-green);
  font-weight: 800;
  font-size: 1.1em;
}

.comparison-table .check::before {
  content: '\2713';
}

.comparison-table .no-check {
  color: var(--medium-gray);
  font-size: 1.1em;
}

.comparison-table .no-check::before {
  content: '\2014';
}

.comparison-table .product-col {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Product column accent colors via modifier */
.comparison-table .product-col.accent-gold   { border-bottom: 2px solid var(--tresic-gold); }
.comparison-table .product-col.accent-orange { border-bottom: 2px solid var(--signal-orange); }
.comparison-table .product-col.accent-green  { border-bottom: 2px solid var(--success-green); }
.comparison-table .product-col.accent-blue   { border-bottom: 2px solid var(--intelligence-blue); }
.comparison-table .product-col.accent-purple { border-bottom: 2px solid var(--insights-purple); }

/* ==========================================================================
   5. Framework Grid
   ========================================================================== */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.framework-card {
  background: var(--cloud-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.framework-card:hover {
  box-shadow: 0 8px 24px rgba(26, 35, 50, 0.12);
  transform: translateY(-3px);
}

.framework-card .framework-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(74, 144, 226, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--intelligence-blue);
}

.framework-card .framework-icon svg {
  width: 24px;
  height: 24px;
}

.framework-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--deep-navy);
  margin-bottom: 0.5rem;
}

.framework-card p {
  font-size: 0.9rem;
  color: var(--medium-gray);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.framework-card .framework-verticals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.framework-card .framework-verticals span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2em 0.6em;
  border-radius: 100px;
  background: var(--light-gray);
  color: var(--medium-gray);
}

/* ==========================================================================
   6. Workflow Steps (horizontal numbered)
   ========================================================================== */
.workflow {
  display: flex;
  align-items: flex-start;
  position: relative;
  gap: 0;
  padding: 2rem 0;
}

/* Connecting line — Transformation Wave gradient */
.workflow::before {
  content: '';
  position: absolute;
  top: calc(2rem + 22px);
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, var(--intelligence-blue), var(--tresic-gold));
  z-index: 0;
}

.workflow-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 0.75rem;
}

.workflow-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--intelligence-blue);
  background: var(--cloud-white);
  color: var(--intelligence-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.workflow-step:last-child .workflow-number {
  border-color: var(--tresic-gold);
  color: var(--tresic-gold);
}

.workflow-step h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--deep-navy);
  margin-bottom: 0.35rem;
}

.workflow-step p {
  font-size: 0.85rem;
  color: var(--medium-gray);
  line-height: 1.55;
  margin-bottom: 0;
}

/* ==========================================================================
   7. Tab Navigation (product detail pages)
   ========================================================================== */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-nav button {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--medium-gray);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75em 1.25em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -2px;
}

.tab-nav button:hover {
  color: var(--charcoal);
}

.tab-nav button.active {
  color: var(--intelligence-blue);
  border-bottom-color: var(--intelligence-blue);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==========================================================================
   8. Feature Grid
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.feature-item {
  display: flex;
  flex-direction: column;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  background: rgba(74, 144, 226, 0.1);
  color: var(--intelligence-blue);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-icon.icon-gold   { background: rgba(245, 166, 35, 0.1); color: var(--tresic-gold); }
.feature-icon.icon-orange { background: rgba(233, 79, 55, 0.1); color: var(--signal-orange); }
.feature-icon.icon-green  { background: rgba(46, 204, 113, 0.1); color: var(--success-green); }
.feature-icon.icon-purple { background: rgba(155, 89, 182, 0.1); color: var(--insights-purple); }
.feature-icon.icon-navy   { background: rgba(26, 35, 50, 0.08); color: var(--deep-navy); }

.feature-item h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--deep-navy);
  margin-bottom: 0.35rem;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--medium-gray);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ==========================================================================
   9. Product Companion Cards ("Works with")
   ========================================================================== */
.companion-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--cloud-white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.companion-card:hover {
  box-shadow: 0 4px 12px rgba(26, 35, 50, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.companion-card .companion-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.companion-card .companion-icon svg {
  width: 20px;
  height: 20px;
}

/* Companion accent colors matching products */
.companion-card.companion-aftercall   .companion-icon { background: rgba(245, 166, 35, 0.12); color: var(--tresic-gold); }
.companion-card.companion-firstalert  .companion-icon { background: rgba(233, 79, 55, 0.12); color: var(--signal-orange); }
.companion-card.companion-scriptcoach .companion-icon { background: rgba(46, 204, 113, 0.12); color: var(--success-green); }
.companion-card.companion-compliance  .companion-icon { background: rgba(74, 144, 226, 0.12); color: var(--intelligence-blue); }
.companion-card.companion-insights    .companion-icon { background: rgba(155, 89, 182, 0.12); color: var(--insights-purple); }
.companion-card.companion-devstudio   .companion-icon { background: rgba(26, 35, 50, 0.08); color: var(--deep-navy); }

.companion-card .companion-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--deep-navy);
  margin-bottom: 0.15rem;
}

.companion-card .companion-desc {
  font-size: 0.82rem;
  color: var(--medium-gray);
  line-height: 1.4;
  margin: 0;
}

/* Companion cards on dark sections — text must be light */
.section-dark .companion-card .companion-name {
  color: var(--cloud-white);
}

.section-dark .companion-card .companion-desc {
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   10. FAQ Accordion
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-item:first-child {
  border-top: 1px solid var(--border-color);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--deep-navy);
  line-height: 1.4;
  transition: color 0.15s;
  gap: 1rem;
}

.faq-question:hover {
  color: var(--intelligence-blue);
}

/* Expand/collapse indicator */
.faq-question::after {
  content: '+';
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--medium-gray);
  flex-shrink: 0;
  transition: transform 0.2s;
  line-height: 1;
}

.faq-item.open .faq-question::after {
  content: '\2212'; /* minus sign */
  color: var(--intelligence-blue);
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-answer p {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   11. Responsive — 1024px
   ========================================================================== */
@media (max-width: 1024px) {
  .framework-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workflow {
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }

  .workflow::before {
    display: none;
  }

  .workflow-step {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

/* ==========================================================================
   Responsive — 768px (mobile)
   ========================================================================== */
@media (max-width: 768px) {
  .framework-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .feature-grid.cols-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .workflow-step {
    flex: 0 0 100%;
  }

  /* Comparison table: horizontal scroll */
  .comparison-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Tab nav: scroll horizontally */
  .tab-nav {
    gap: 0;
    padding-bottom: 2px;
  }

  .tab-nav button {
    font-size: 0.82rem;
    padding: 0.65em 1em;
  }

  /* Pricing cards stack */
  .pricing-card {
    padding: 2rem 1.5rem;
  }

  /* Companion cards stack full width */
  .companion-card {
    width: 100%;
  }

  /* FAQ */
  .faq-question {
    font-size: 0.92rem;
    padding: 1rem 0;
  }
}

/* ==========================================================================
   Responsive — 480px (small mobile)
   ========================================================================== */
@media (max-width: 480px) {
  .pricing-card .price {
    font-size: 2.25rem;
  }

  .workflow-number {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .companion-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  .companion-card .companion-info {
    text-align: center;
  }
}

/* ==========================================================================
   12. Product Detail Page Enhancements
   ========================================================================== */

/* Tighter spacing on product detail pages */
.product-page .section,
.product-page .section-alt,
.product-page .section-dark {
  padding: var(--space-xl) 0;
}

/* Hero with product visual — 2-column layout */
.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.product-hero-visual {
  display: flex;
  justify-content: center;
}

.product-hero-visual svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.3));
}

/* Primary outcome cards — large, centered, with icons */
.outcome-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.outcome-primary .card {
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.outcome-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.outcome-icon svg {
  width: 28px;
  height: 28px;
}

.outcome-icon-gold { background: rgba(245, 166, 35, 0.1); }
.outcome-icon-orange { background: rgba(233, 79, 55, 0.1); }
.outcome-icon-green { background: rgba(46, 204, 113, 0.1); }
.outcome-icon-purple { background: rgba(155, 89, 182, 0.1); }
.outcome-icon-blue { background: rgba(74, 144, 226, 0.1); }
.outcome-icon-navy { background: rgba(26, 35, 50, 0.08); }

/* Secondary features — compact checklist row */
.outcome-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.outcome-secondary-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.outcome-secondary-item .check {
  color: var(--tresic-gold);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.5;
}

/* Workflow enhancements — larger circles, gold fill on last */
.workflow-enhanced .workflow-number {
  width: 56px;
  height: 56px;
  font-size: 1.25rem;
}

.workflow-enhanced .workflow-step:last-child .workflow-number {
  background: var(--tresic-gold);
  border-color: var(--tresic-gold);
  color: var(--deep-navy);
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.3);
}

/* Companion cards enhanced — accent border, larger icons */
.companion-enhanced {
  border-left: 3px solid transparent;
  padding: 1.25rem 1.5rem;
}

.companion-enhanced .companion-icon {
  width: 52px;
  height: 52px;
}

.companion-enhanced .companion-icon svg {
  width: 24px;
  height: 24px;
}

.companion-enhanced.companion-aftercall   { border-left-color: var(--tresic-gold); }
.companion-enhanced.companion-firstalert  { border-left-color: var(--signal-orange); }
.companion-enhanced.companion-scriptcoach { border-left-color: var(--success-green); }
.companion-enhanced.companion-compliance  { border-left-color: var(--deep-navy); }
.companion-enhanced.companion-insights    { border-left-color: var(--insights-purple); }
.companion-enhanced.companion-devstudio   { border-left-color: var(--intelligence-blue); }

/* Value prop heading — largest on page, descending hierarchy */
.value-prop-heading {
  font-size: 2.5rem;
}

@media (max-width: 1024px) {
  .product-hero-grid { grid-template-columns: 1fr; }
  .product-hero-visual { display: none; }
}

@media (max-width: 768px) {
  .outcome-primary { grid-template-columns: 1fr; }
  .outcome-secondary { grid-template-columns: 1fr; }
  .value-prop-heading { font-size: 1.85rem; }
}

/* ==========================================================================
   Platform-evaluation components
   Added for the intelligence.cloud repositioning (site charter v1.0.0).
   These serve the three platform readers: partner, developer, investor.
   ========================================================================== */

/* Payload / schema block — the most persuasive element on the property for
   developer and partner readers, so it gets first-class treatment. */
.code-frame {
  background: var(--deep-navy);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-frame-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tresic-gold);
  padding: 0.75rem var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.20);
}

.code-frame pre {
  margin: 0;
  padding: var(--space-md);
  overflow-x: auto;
  font-family: 'Courier Prime', 'SF Mono', Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  tab-size: 2;
}

.code-frame .c-key { color: var(--intelligence-blue); }
.code-frame .c-str { color: var(--success-green); }
.code-frame .c-num { color: var(--tresic-gold); }
.code-frame .c-com { color: rgba(255, 255, 255, 0.42); font-style: italic; }

.code-note {
  font-size: 0.85rem;
  color: var(--medium-gray);
  margin-top: var(--space-sm);
}

/* Reader routing — three doors, one per evaluator */
.reader-split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.reader-door {
  display: flex;
  flex-direction: column;
  background: var(--cloud-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.reader-door:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.reader-door h3 { margin-bottom: 0.4rem; }

.reader-door .reader-q {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: var(--space-sm);
}

.reader-door p { flex: 1; }

/* Field contract — name plus meaning, for signal and schema documentation */
.contract-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border-color);
}

.contract-row {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.contract-row dt {
  font-family: 'Courier Prime', 'SF Mono', Menlo, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--deep-navy);
}

.contract-row dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.contract-row dd .fires-not {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--medium-gray);
}

.section-dark .contract-list { border-top-color: rgba(255, 255, 255, 0.14); }
.section-dark .contract-row { border-bottom-color: rgba(255, 255, 255, 0.14); }
.section-dark .contract-row dt { color: var(--tresic-gold); }
.section-dark .contract-row dd { color: var(--text-on-dark); }
.section-dark .contract-row dd .fires-not { color: var(--text-on-dark-muted); }

/* Edges and limits — stated in reach, never buried (charter §7.3) */
.edge-note {
  border-left: 4px solid var(--intelligence-blue);
  background: var(--light-gray);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
}

.edge-note h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.edge-note p:last-child { margin-bottom: 0; }

.section-dark .edge-note {
  background: rgba(255, 255, 255, 0.05);
  border-left-color: var(--tresic-gold);
}

/* Built vs researched — the honesty table */
.status-pill {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.status-live      { background: rgba(46, 204, 113, 0.16); color: #1E8449; }
.status-progress  { background: rgba(245, 166, 35, 0.18); color: #9C6508; }
.status-researched { background: rgba(139, 149, 165, 0.18); color: var(--charcoal); }

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

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

/* Reader doors are anchors, so body copy inherits link color without this */
.reader-door p,
.reader-door h3 {
  color: var(--charcoal);
}

.reader-door .reader-q {
  color: var(--deep-navy);
  font-style: italic;
}

/* Hero word-stats need a label/value hierarchy when there is no numeral */
.home-hero .stat-row dt {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--tresic-gold);
  margin-bottom: 0.35rem;
}

.home-hero .stat-row dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}

/* Channel chips — breadth of input channels, tier-1 richness element */
.channel-chip {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.35em 0.9em;
  margin: 0.2rem 0.15rem;
  border-radius: 100px;
  background: rgba(74, 144, 226, 0.12);
  color: var(--intelligence-blue);
  border: 1px solid rgba(74, 144, 226, 0.30);
  line-height: 1.4;
  white-space: nowrap;
}

/* Cards used as links inherit anchor color on their body copy. Keep the card
   reading as a card; the accent border and hover lift carry the affordance. */
a.card h3,
a.card p,
a.companion-card h3,
a.companion-card p {
  color: var(--charcoal);
}

a.card h3,
a.companion-card h3 {
  color: var(--deep-navy);
}

.section-dark a.card h3,
.section-dark a.companion-card h3 { color: var(--cloud-white); }

.section-dark a.card p,
.section-dark a.companion-card p { color: var(--text-on-dark); }

/* The gold "see more" line inside a linked card must stay gold */
a.card p.text-gold,
a.companion-card p.text-gold,
a.reader-door p.text-gold,
.reader-door p.text-gold { color: var(--tresic-gold); }

/* ==========================================================================
   Flow graphic — conversations into data, insight, action, automation.
   Inline SVG styled here so the palette stays tied to the design tokens.
   ========================================================================== */
.flow-graphic {
  background: var(--cloud-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.flow-graphic svg {
  display: block;
  width: 100%;
  min-width: 900px;   /* below this the labels collide; the container scrolls */
  height: auto;
}

.flow-graphic text {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  fill: var(--charcoal);
}

.flow-graphic .fg-stage {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  fill: var(--medium-gray);
}

.flow-graphic .fg-note {
  font-size: 13px;
  fill: var(--medium-gray);
}

/* input + destination chips */
.flow-graphic .fg-chip rect,
.flow-graphic .fg-chip-voice rect,
.flow-graphic .fg-chip-out rect {
  fill: var(--light-gray);
  stroke: var(--border-color);
  stroke-width: 1;
}

.flow-graphic .fg-chip-voice rect { fill: #EAF2FC; stroke: rgba(74, 144, 226, 0.35); }

.flow-graphic .fg-chip-brand rect {
  fill: rgba(245, 166, 35, 0.14);
  stroke: rgba(245, 166, 35, 0.55);
  stroke-width: 1.5;
}

/* the layer itself */
.flow-graphic .fg-layer rect {
  fill: var(--deep-navy);
  stroke: none;
}

.flow-graphic .fg-layer-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 600;
  fill: var(--cloud-white);
  text-anchor: middle;
}

.flow-graphic .fg-layer-sub { fill: rgba(255,255,255,0.82); text-anchor: middle; }

.flow-graphic .fg-layer-std {
  font-size: 12.5px;
  fill: var(--tresic-gold);
  text-anchor: middle;
}

/* what comes back — data / insight / action */
.flow-graphic .fg-chip-data rect    { fill: rgba(74,144,226,0.10);  stroke: rgba(74,144,226,0.45); }
.flow-graphic .fg-chip-insight rect { fill: rgba(155,89,182,0.10);  stroke: rgba(155,89,182,0.45); }
.flow-graphic .fg-chip-action rect  { fill: rgba(46,204,113,0.12);  stroke: rgba(46,204,113,0.50); }

.flow-graphic .fg-chip-h {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  fill: var(--deep-navy);
}

.flow-graphic .fg-chip-s { font-size: 12.5px; fill: var(--charcoal); }

@media (max-width: 768px) {
  .flow-graphic { padding: var(--space-sm) 0.5rem; }
}

/* ==========================================================================
   CARD WITH A FOOTED CALL TO ACTION
   Opt-in. A card's final element (usually its call to action) sits on a shared
   baseline across the row regardless of how long the body copy above it runs.
   Additive: `.card` itself is untouched, so no existing card changes.
   ========================================================================== */

.card-footed {
  display: flex;
  flex-direction: column;
}

.card-footed > :last-child {
  margin-top: auto;
  margin-bottom: 0;
}

/* Code-frame header: label plus a copy control. js/main.js wires any
   .code-copy inside a .code-frame to copy that frame's <pre> text. */

.code-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.20);
}

.code-frame-head .code-frame-label {
  border-bottom: none;
  background: none;
}

.code-copy {
  flex: 0 0 auto;
  margin-right: var(--space-md);
  padding: 0.3rem 0.7rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.code-copy:hover {
  color: var(--cloud-white);
  background: rgba(255, 255, 255, 0.14);
}

/* A long payload should scroll inside its frame rather than run the page long. */
.code-frame-scroll pre {
  max-height: 30rem;
  overflow-y: auto;
}

/* ==========================================================================
   SPEC TABLE
   Field/contract tables for the depth pages. Denser and more code-friendly than
   .comparison-table: top-aligned cells (spec prose wraps to several lines), no
   sticky header (these sit mid-page, not as a full-page comparison), and inline
   <code> styled to read against body text.
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.spec-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.spec-table thead {
  background: var(--deep-navy);
  color: var(--cloud-white);
}

.spec-table th {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.spec-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
  line-height: 1.55;
}

.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.015); }

/* First column of a spec table is the field or type name — keep it unwrapped
   where it fits so a reader can scan the contract vertically. */
.spec-table td:first-child { white-space: nowrap; }
.spec-table td:first-child code { font-size: 0.86rem; }

@media (max-width: 768px) {
  .spec-table td:first-child { white-space: normal; }
}

/* Inline code in body copy and spec tables. */
.spec-table code,
.section p code,
.card p code,
.edge-note code {
  font-family: 'Courier Prime', 'SF Mono', Menlo, monospace;
  font-size: 0.88em;
  padding: 0.1em 0.32em;
  border-radius: 3px;
  background: rgba(74, 144, 226, 0.10);
  color: var(--deep-navy);
  white-space: nowrap;
}

.section-dark p code,
.section-dark .companion-card code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cloud-white);
}
