#role {
  position: relative;
  overflow: hidden;
}

#role::before {
  position: absolute;
  top: 72px;
  right: max(24px, calc((100vw - 1200px) / 2));
  width: 72px;
  height: 72px;
  border-top: 2px solid rgba(37, 99, 235, .22);
  border-right: 2px solid rgba(37, 99, 235, .22);
  content: "";
  pointer-events: none;
}

.role-header {
  max-width: 850px;
}

.role-title {
  max-width: 760px;
  margin-bottom: 24px;
  text-wrap: balance;
}

.role-lead {
  max-width: 720px;
  margin: 0;
  color: #475569;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  text-wrap: balance;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.role-card {
  position: relative;
  min-height: 290px;
  padding: 32px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}

.role-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 6px 24px rgba(37, 99, 235, .06);
  transform: translateY(-2px);
}

.role-card__number {
  display: block;
  margin-bottom: 64px;
  color: #2563eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}

.role-card h3 {
  max-width: 460px;
  margin: 0 0 14px;
  color: #0f172a;
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 600;
  line-height: 1.2;
}

.role-card p {
  max-width: 580px;
  margin: 0;
  color: #526072;
  font-size: 15px;
  line-height: 1.7;
}

.role-card--wide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 80px minmax(0, 1fr);
  min-height: auto;
  border-color: #dbeafe;
  background:
    linear-gradient(
      110deg,
      rgba(239, 246, 255, .95),
      rgba(255, 255, 255, .92)
    );
}

.role-card--wide .role-card__number {
  margin: 4px 0 0;
}

.role-card__wide-content {
  display: grid;
  grid-template-columns: minmax(200px, .7fr) minmax(0, 1.3fr);
  gap: 48px;
  align-items: start;
}

.role-card--wide h3 {
  margin: 0;
}

.role-card--wide p {
  max-width: 650px;
}

.role-link {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  margin-top: 32px;
  padding-bottom: 7px;
  border-bottom: 1px solid #93c5fd;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    gap .2s ease,
    border-color .2s ease;
}

.role-link:hover {
  gap: 32px;
  border-color: #1d4ed8;
}

@media (max-width: 760px) {
  #role::before {
    top: 48px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .role-title br {
    display: none;
  }

  .role-grid {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .role-card {
    min-height: auto;
    padding: 25px;
  }

  .role-card__number {
    margin-bottom: 42px;
  }

  .role-card--wide {
    display: block;
    grid-column: auto;
  }

  .role-card--wide .role-card__number {
    margin: 0 0 42px;
  }

  .role-card__wide-content {
    display: block;
  }

  .role-card--wide h3 {
    margin-bottom: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .role-card,
  .role-link {
    transition: none;
  }
}

/* Equal-width cards in the first data-flow block */
.home-engine,
.home-engine__grid,
.home-flow,
.home-flow__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-engine > *,
.home-engine__grid > *,
.home-flow > *,
.home-flow__grid > * {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* role-grid-3 */
.role-grid{grid-template-columns:repeat(3,1fr)}
@media (max-width:820px){.role-grid{grid-template-columns:1fr}}


/* home-vs */
.home-vs{display:grid;grid-template-columns:repeat(2,1fr);gap:24px;margin-top:24px}
.vs-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:24px;
  box-shadow:0 6px 24px rgba(37,99,235,.06)}
.vs-card__num{display:inline-block;font-family:"JetBrains Mono",ui-monospace,monospace;
  font-size:12px;line-height:1;color:#2563eb;background:#eff6ff;
  border-radius:8px;padding:6px 10px;margin-bottom:8px}
.vs-card__h{font-weight:600;font-size:16px;line-height:1.375;margin:0 0 12px;color:#111827}
.vs-card__label{font-weight:600;font-size:10px;line-height:1.2;letter-spacing:.12em;
  text-transform:uppercase;color:#6b7280;margin:0 0 8px}
.vs-card__label--accent{color:#2563eb;margin-top:12px}
.vs-card__old,.vs-card__new{font-weight:400;font-size:15px;line-height:1.6;margin:0;color:#374151}
.vs-card__old{color:#6b7280}
.vs-card__new code{font-family:"JetBrains Mono",ui-monospace,monospace;font-size:13px;
  background:#eff6ff;border-radius:8px;padding:2px 6px;color:#1d4ed8}
.vs-note{margin-top:24px;font-size:13px;line-height:1.6;color:#6b7280;max-width:70ch}
@media (max-width:820px){.home-vs{grid-template-columns:1fr;gap:16px}}

/* section-rhythm */
#directions.home-section{background:#ffffff}
#role.home-section{background:#eff6ff}
#difference.home-section{background:#ffffff}
#traceability.home-section{background:#eff6ff}
#audience.home-section{background:#ffffff}
#why.home-section{background:#eff6ff}
#about.home-section{background:#ffffff}
#fit.home-section{background:#eff6ff}
#faq.home-section{background:#ffffff}
