.role-story { --role-nav-height:64px; --tab-height:calc(var(--home-mast-height,68px) + var(--role-nav-height)); }
.role-story .field-toolbar nav { gap:clamp(1px,.6vw,9px); }
.role-story .field-toolbar a { padding-inline:clamp(5px,.8vw,12px); }
.role-story .field-toolbar a > span { font-size:clamp(15px,1.28vw,19px); }

.role-story .field-card { justify-content:center; background:linear-gradient(120deg,#101a25,#1b3443); }
.role-story .field-card::before { display:none; }
.role-story .field-body {
  grid-template-columns:minmax(0,.8fr) minmax(0,1fr); align-items:center; justify-items:stretch;
  gap:clamp(14px,2.6vh,30px) clamp(18px,4vw,64px); max-height:100%; overflow:auto;
  padding:16px 4px; margin-inline:calc(var(--gutter) - 4px);
}
.role-story .field-caption { text-shadow:none; }
.role-story .field-caption h2 { max-width:13em; }

.role-feature,.role-product {
  display:grid; background:#0d1822; color:#fff; text-decoration:none; border:1px solid #ffffff28;
  border-radius:12px; overflow:hidden;
}
.role-feature { width:min(100%,610px); }
.role-story :is(.role-feature,.role-product):is(:hover,:focus-visible) { border-color:#a4d7f5; text-decoration:none; }
.role-feature:is(:hover,:focus-visible) strong,.role-product:is(:hover,:focus-visible) strong { text-decoration:underline; text-underline-offset:.18em; }
.role-media { position:relative; display:block; min-width:0; background:#142735; }
.role-media:has(img[src$=".svg"]) { background:#eaf0f2; }
.role-media img { display:block; width:100%; object-fit:contain; }
.role-media.with-example > span {
  display:block; text-align:center; padding:3px 5px;
  background:#102131; color:#fff; font-size:12px; line-height:1.2; white-space:nowrap;
}
.role-feature img { height:clamp(126px,30svh,285px); }
.role-product-copy { display:grid; align-content:start; gap:4px; min-width:0; padding:10px 13px; }
.role-product-copy strong { font-size:16px; line-height:1.24; word-break:keep-all; overflow-wrap:anywhere; }
.role-product-copy > span { color:#e2eaf1; font-size:14px; line-height:1.35; word-break:keep-all; }
.role-product-copy small { color:#ffdda7; font-size:13px; line-height:1.25; word-break:keep-all; }
.role-feature .role-product-copy { padding:12px 16px; }
.role-feature .role-product-copy strong { font-size:22px; }
.role-feature .role-product-copy > span { font-size:16px; }

.role-related { grid-column:1 / -1; display:grid; gap:9px; }
.role-related h3 { font-size:15px; line-height:1.3; color:#e2eaf1; }
.role-related ul {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr)); gap:8px;
  margin:0; padding:0; list-style:none;
}
.role-related li { min-width:0; }
.role-related ul:has(> li:only-child) { grid-template-columns:minmax(0,min(100%,380px)); }
.role-product { height:100%; }
.role-product:has(.role-media) { grid-template-columns:minmax(70px,90px) minmax(0,1fr); }
.role-product img { height:auto; min-height:0; object-fit:contain; }
.role-product .role-media.with-example { align-self:center; }

@media (max-width:1020px) {
  .role-story .stage-label { display:none; }
  .role-story .field-toolbar nav { margin-inline:var(--gutter); justify-content:space-between; }
  .role-story .field-toolbar a > span { font-size:14px; }
}

@media (min-width:721px) and (max-width:820px) {
  .role-story .field-toolbar nav { gap:1px; }
  .role-story .field-toolbar a { padding-inline:3px; }
}

@media (max-width:720px) {
  .role-story { --role-nav-height:88px; }
  .role-story .field-toolbar nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; margin-inline:12px; }
  .role-story .field-toolbar a { justify-content:center; text-align:center; padding-inline:3px; }
  .role-story .field-toolbar a > span { white-space:normal; word-break:keep-all; }
  .role-story .field-body { grid-template-columns:minmax(0,1fr); grid-auto-rows:max-content; align-content:start; gap:10px; margin-inline:14px; padding-block:8px 12px; }
  .role-story .field-caption h2 { font-size:clamp(26px,7.4vw,38px); }
  .role-story .field-more { min-height:40px; margin-top:1px; font-size:16px; }
  .role-feature img { height:clamp(132px,18svh,175px); }
  .role-related ul { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .role-product-copy { padding:8px; }
  .role-related li:has(.with-example) { grid-column:1 / -1; }
  .role-product:has(.role-media) { grid-template-columns:minmax(0,.95fr) minmax(0,1fr); align-items:center; }
  .role-product img { height:auto; min-height:0; }
}

@media (max-width:720px) and (max-height:650px) {
  .role-story .field-body { gap:7px; padding-block:4px 7px; }
  .role-feature { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); }
  .role-feature img { height:88px; }
  .role-feature .role-product-copy { padding:6px 8px; gap:3px; }
  .role-feature .role-product-copy strong { font-size:17px; }
  .role-feature .role-product-copy > span { font-size:14px; }
  .role-related { gap:5px; }
  .role-product-copy { padding:5px 7px; gap:2px; }
  .role-product-copy strong { font-size:14px; }
  .role-product-copy > span { font-size:13px; }
  .role-product-copy small { font-size:12px; }
  .role-media.with-example > span { font-size:11px; }
}

@media (max-width:365px) and (max-height:650px) {
  .role-story .field-body { gap:4px; padding-block:4px; }
  .role-product:has(.role-media) { grid-template-columns:minmax(0,.68fr) minmax(0,1fr); }
  .role-related ul { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .role-story .field-caption h2 { line-height:1.12; }
}

@media (min-width:721px) and (max-height:500px) {
  .role-story .field-body { gap:8px 18px; padding-block:5px 8px; }
  .role-story .field-caption h2 { font-size:clamp(24px,3.1vw,38px); }
  .role-story .field-more { min-height:38px; margin-top:4px; font-size:16px; }
  .role-feature { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); }
  .role-feature img { height:100%; max-height:140px; min-height:102px; }
  .role-feature .role-product-copy { padding:8px; }
  .role-feature .role-product-copy strong { font-size:18px; }
  .role-feature .role-product-copy > span { font-size:14px; }
  .role-related { gap:5px; }
  .role-related ul { grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr)); gap:6px; }
  .role-product-copy { padding:5px 7px; gap:3px; }
  .role-product-copy strong { font-size:14px; }
  .role-product-copy > span { font-size:13px; }
  .role-product:has(.role-media) { grid-template-columns:58px minmax(0,1fr); }
  .role-product img { min-height:0; }
}
