/* ==========================================================================
   C4 Fire & Security . /security-integration/
   Scoped stylesheet for page-security-integration.php.

   Every selector is prefixed .si- and every rule is scoped under .si-page,
   so nothing here can reach another template.

   Tokens come from style.css :root. Global .container / .section /
   .section__header / .label / .h1 / .h2 / .h3 / .btn are reused, not redefined.

   MOBILE RULE, learned the hard way on 2026-07-27: grid tracks use
   minmax(0, 1fr), never 1fr. A bare 1fr is minmax(auto, 1fr), so one wide
   child (a table) sets the min-content floor and clips every sibling. That
   defect clipped ~59% of body text on every table-bearing blog post. Any
   wide content here scrolls inside its own overflow-x container instead.
   ========================================================================== */

.si-page {
  overflow-x: hidden;
}

/* ===== HERO ============================================================== */
.si-hero {
  position: relative;
  padding-block: calc(var(--header-height) + var(--space-2xl)) var(--space-2xl);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(209, 26, 34, 0.16), transparent 70%),
    var(--c4-black);
  border-bottom: 1px solid var(--border);
}

.si-hero .label {
  display: block;
  margin-bottom: var(--space-sm);
}

.si-hero__title {
  max-width: 22ch;
  margin-bottom: var(--space-md);
}

.si-hero__sub {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: var(--space-lg);
}

.si-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.si-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  padding: 0;
  margin: 0;
  list-style: none;
}

.si-hero__trust li {
  position: relative;
  padding-left: 1.15rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c4-white);
}

.si-hero__trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c4-red);
}

/* ===== SHARED TYPOGRAPHY ================================================= */

/* Direct answer block. 40 to 60 words, sits under each H2. Targets featured
   snippets and AEO extraction, so it must read as a complete answer alone. */
.si-page .si-direct {
  max-width: 68ch;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  padding-left: var(--space-md);
  border-left: 3px solid var(--c4-red);
  color: var(--c4-white);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* Citation-ready passage. Self-contained, entity-rich, quotable as one block. */
.si-page .si-passage {
  max-width: 68ch;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.si-page .si-note {
  max-width: 68ch;
  margin: var(--space-lg) auto 0;
  padding: var(--space-md);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ===== OUTPUTS TABLE ===================================================== */

/* The table scrolls inside its own box. The page body never scrolls sideways. */
.si-outputs__tablewrap {
  max-width: 900px;
  margin: 0 auto var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.si-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.si-table th,
.si-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.si-table thead th {
  background: var(--surface-elevated);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c4-yellow);
}

.si-table tbody th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--c4-white);
  white-space: nowrap;
}

.si-table tbody td {
  color: var(--text-muted);
}

.si-table tbody tr:last-child th,
.si-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ===== OUTPUT CARDS ====================================================== */
.si-outputs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-md);
}

.si-card {
  min-width: 0;
  padding: var(--space-lg);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.si-card:hover {
  border-color: var(--c4-red);
  transform: translateY(-3px);
}

.si-card__label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c4-red);
}

.si-card__title {
  margin-bottom: 0.625rem;
  font-size: 1.125rem;
  color: var(--c4-white);
}

.si-card__desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ===== PROTOCOLS ========================================================= */
.si-protocols__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-md);
  padding: 0;
  margin: 0;
  list-style: none;
}

.si-protocol {
  min-width: 0;
  padding: var(--space-lg);
  background: var(--c4-black);
  border: 1px solid var(--border);
  border-left: 3px solid var(--c4-yellow);
  border-radius: var(--radius-md);
}

.si-protocol__name {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  color: var(--c4-yellow);
}

.si-protocol__desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ===== SECTORS =========================================================== */
.si-sectors__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
  padding: 0;
  margin: 0;
  list-style: none;
}

.si-sector {
  min-width: 0;
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-lg);
  position: relative;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.si-sector::before {
  content: "";
  position: absolute;
  left: var(--space-md);
  top: 1.55rem;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c4-red);
}

.si-sector__name {
  margin-bottom: 0.375rem;
  font-size: 1rem;
  color: var(--c4-white);
}

.si-sector__why {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ===== PROCESS =========================================================== */
.si-process__list {
  counter-reset: si-step;
  max-width: 820px;
  margin-inline: auto;
  padding: 0;
  list-style: none;
}

.si-process__step {
  counter-increment: si-step;
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
}

.si-process__step::before {
  content: counter(si-step, decimal-leading-zero);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c4-red);
  color: var(--c4-white);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
}

.si-process__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

/* Both real children must be pinned to column 2. The ::before counter is the
   first grid item and takes cell 1, so auto-placement puts the h3 in cell 2 and
   then wraps the <p> back into column 1, squeezing the body text to the width of
   the number circle (44px on mobile). Caught by the Playwright width check on
   2026-07-27. Same failure mode as the .post-content__layout blog clip fixed
   the same day: a narrow track silently swallowing body copy. */
.si-process__step > h3,
.si-process__step > p {
  grid-column: 2;
}

.si-process__step h3 {
  margin-bottom: 0.375rem;
  padding-top: 0.9rem;
  font-size: 1.0625rem;
  color: var(--c4-white);
}

.si-process__step p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ===== SCOPE ============================================================= */
.si-scope__inner {
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-xl);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-top: 3px solid var(--c4-yellow);
  border-radius: var(--radius-lg);
}

.si-scope__title {
  margin-bottom: var(--space-md);
  color: var(--c4-white);
}

.si-scope__inner p {
  margin-bottom: var(--space-sm);
  color: var(--text-muted);
  line-height: 1.75;
}

/* Specificity, not !important: .si-scope__inner p sets the bottom margin above,
   so this has to out-rank it on its own terms. */
.si-scope__inner p.si-scope__cta {
  margin-top: var(--space-md);
  margin-bottom: 0;
}

.si-scope__cta a {
  color: var(--c4-yellow);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 194, 0, 0.4);
}

.si-scope__cta a:hover {
  border-bottom-color: var(--c4-yellow);
}

/* ===== FAQ =============================================================== */
.si-faqs__list {
  max-width: 760px;
  margin-inline: auto;
}

.si-faq {
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.si-faq:last-child {
  border-bottom: 0;
}

.si-faq__q {
  margin-bottom: 0.625rem;
  font-size: 1.0625rem;
  color: var(--c4-white);
}

.si-faq__a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}

/* ===== CTA =============================================================== */
.si-cta__inner {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.si-cta__inner h2 {
  margin-bottom: var(--space-md);
}

.si-cta__inner p {
  margin-bottom: var(--space-lg);
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.si-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* ===== RESPONSIVE ======================================================== */
@media (max-width: 768px) {
  .si-hero {
    padding-block: calc(var(--header-height) + var(--space-xl)) var(--space-xl);
  }

  .si-hero__cta .btn,
  .si-cta__buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .si-page .si-direct {
    padding-left: var(--space-sm);
    font-size: 1rem;
  }

  .si-scope__inner {
    padding: var(--space-lg) var(--space-md);
  }

  .si-process__step {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: var(--space-sm);
  }

  .si-process__step::before {
    width: 44px;
    height: 44px;
    font-size: 0.875rem;
  }

  .si-process__step:not(:last-child)::after {
    left: 21px;
    top: 44px;
  }

  .si-process__step h3 {
    padding-top: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .si-card {
    transition: none;
  }
  .si-card:hover {
    transform: none;
  }
}
