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

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

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

/* The source pulls the intro up by 12px to tighten it against the heading
   row, which is a real layout value, not a reset to zero. */
.twi-st-intro { margin: -12px 0 0; font-size: 19px; line-height: 1.55; color: var(--st-body, #3D4F5C); }

/* ---------- comparison image ---------- */
.twi-st-figure { position: relative; border-radius: 12px; overflow: hidden; }
.twi-st-figure img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.twi-st-fig-label {
  position: absolute; top: 20px;
  padding: 8px 14px; border-radius: 6px;
  color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
}
.twi-st-fig-label--left { left: 20px; background: rgba(15,30,43,.85); }
.twi-st-fig-label--right { right: 20px; background: var(--st-accent, #D1035A); }

/* ---------- comparison lists ---------- */
.twi-st-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

.twi-st-list {
  border-radius: 10px;
  padding: 8px 20px;
}
.twi-st-list--neg { border: 1px solid var(--st-border, #DCE5EC); background: var(--st-neg-bg, #FAFBFC); }
.twi-st-list--pos { border: 1.5px solid var(--st-blue, #125383); }

.twi-st-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  /* The source keeps the dashed rule on every row including the last. */
  border-bottom: 1px dashed var(--st-border, #DCE5EC);
}
.twi-st-row svg { flex-shrink: 0; }
.twi-st-list--neg .twi-st-row span { font-size: 16px; color: var(--st-neg-text, #4F606C); }
.twi-st-list--pos .twi-st-row span { font-size: 16px; font-weight: 700; color: var(--st-pos-text, #0F1E2B); }

/* ---------- benefits panel ---------- */
.twi-st-panel {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px;
  background: var(--st-panel-bg, #F5F7F9);
  border-radius: 12px;
}
.twi-st-panel-h3 { margin: 0; font-size: 24px; font-weight: 900; color: var(--st-heading, #003658); }
.twi-st-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }

.twi-st-benefit {
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--st-border, #DCE5EC);
  border-radius: 10px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.twi-st-benefit:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0,54,88,.12); }

.twi-st-benefit-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--st-accent, #D1035A);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.twi-st-benefit-text { font-size: 17px; line-height: 1.3; font-weight: 800; color: var(--st-heading, #003658); }

/* ---------- scroll-driven entrance ----------
   Animates `translate`, not `transform`, so the benefit cards' hover lift
   (a transform) composes with it instead of being cancelled. Keep them on
   separate properties. */
@keyframes twiStUp { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }

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

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .twi-st { padding: 56px 20px; }
  .twi-st-h2 { font-size: clamp(27px, 5.2vw, 40px); }
  .twi-st-intro { font-size: 17.5px; }
  .twi-st-panel { padding: 22px; }
}
@media (max-width: 560px) {
  .twi-st-head { justify-content: flex-start; gap: 6px; }
  /* Two long labels across a narrow 16:9 frame overlap each other, so they
     stack down the left instead of sitting in opposite corners. */
  .twi-st-fig-label { position: static; display: inline-block; letter-spacing: .1em; font-size: 11px; }
  .twi-st-fig-labels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .twi-st-figure { overflow: visible; }
  .twi-st-figure img { border-radius: 12px; }
  .twi-st-list { padding: 4px 16px; }
  .twi-st-benefit { padding: 16px; }
}

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