.twi-sf {
  background: var(--sf-bg, #F5F7F9);
  padding: 72px 24px;
  color: var(--sf-heading, #003658);
}
.twi-sf *, .twi-sf *::before, .twi-sf *::after { box-sizing: border-box; }

.twi-sf-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }

.twi-sf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.twi-sf-h2 {
  margin: 0;
  font-size: 40px; line-height: 1.1; font-weight: 900; letter-spacing: -.02em;
  color: var(--sf-heading, #003658);
  overflow-wrap: normal; word-break: normal; hyphens: none;
}
.twi-sf-ref {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .14em;
  color: var(--sf-muted, #667681);
}

.twi-sf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }

.twi-sf-card {
  background: var(--sf-card-bg, #FFFFFF);
  border: 1px solid var(--sf-card-border, #C6CFD6);
  border-radius: 10px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.twi-sf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0,54,88,.12);
}

.twi-sf-icon {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--sf-icon-bg, #E8EFF5);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.twi-sf-card-text { font-size: 19px; line-height: 1.35; font-weight: 800; color: var(--sf-heading, #003658); }

/* ---------- scroll-driven entrance ----------
   The reveal animates `translate`, NOT `transform`, which is what lets the
   hover lift (a transform) run on the very same element without the two
   cancelling each other out. Keep them on separate properties.
   Engines without scroll-driven animations simply show the content with no
   entrance, which is why there is no JS fallback here. */
@keyframes twiSfUp { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

@supports (animation-timeline: view()) {
  .twi-sf-rv {
    animation: twiSfUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .twi-sf { padding: 56px 20px; }
  .twi-sf-h2 { font-size: clamp(28px, 5.4vw, 40px); }
  .twi-sf-inner { gap: 24px; }
}
@media (max-width: 560px) {
  .twi-sf-card { padding: 20px; gap: 14px; }
  .twi-sf-card-text { font-size: 17.5px; }
  /* The label sits beside the heading on wide screens; once wrapped it
     reads better as a line under it than pushed to the far right. */
  .twi-sf-head { justify-content: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .twi-sf *, .twi-sf *::after { animation: none !important; transition: none !important; }
}
