/* Knowledge Hub model previews share the compact MEWP layout. */
.kh-model-tile {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(16px, 2.2vw, 28px);
  max-width: 940px;
  margin: 1rem auto;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid #b8cad9;
  border-top: 4px solid #d20b30;
  border-radius: 12px;
  background: #fff;
  color: #173047;
}
.kh-model-picture img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.kh-model-tile .kh-model-picture,
.kh-model-tile .kh-model-copy {min-width: 0;}
.kh-model-kicker {
  color: #38556b;
  font-size: .77rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kh-model-tile .kh-model-heading {
  margin: .35rem 0;
  color: #14385b;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.18;
}
.kh-model-copy p { margin: .55rem 0 0; }
.kh-model-tile .kh-model-copy,
.mewp-preview-tile .mewp-preview-copy {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.kh-model-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kh-model-tile .kh-model-actions,
.mewp-preview-tile .mewp-preview-actions {
  margin-block-start: auto;
  padding-block-start: 1rem;
}
.kh-model-open[data-kh-model-url],
.kh-model-access-actions a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  min-width: min(100%, 222px);
  padding: 10px 18px;
  border: 1px solid #14385b;
  border-radius: 8px;
  background: #14385b;
  color: #fff !important;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.kh-model-tile .kh-model-actions .kh-model-open { min-height: 56px !important; }
/* Launch controls also sit inside legacy players that style all descendant buttons. */
.kh-model-open[data-kh-model-url],
.mewp-preview-tile .mewp-preview-actions .mewp-preview-open:not([hidden]) {
  border-color: #bd1232;
  background: #bd1232;
  color: #fff;
}
.kh-model-open[data-kh-model-url]:hover,
.mewp-preview-tile .mewp-preview-actions .mewp-preview-open:not([hidden]):hover {
  border-color: #970d28;
  background: #970d28;
}
.kh-model-access-actions a:hover { background: #092744; }
@media (forced-colors: active) {
  .kh-model-open[data-kh-model-url],
  .mewp-preview-tile .mewp-preview-actions .mewp-preview-open:not([hidden]) {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText !important;
  }
}
.kh-model-open:focus-visible, .kh-model-dialog :focus-visible { outline: 3px solid #14385b; outline-offset: 3px; }
.kh-model-reading { max-width: 940px; margin: 1.1rem auto; }
.kh-model-reading > details { margin-block: .5rem; }
.kh-model-reading summary { padding: .55rem 0; color: #14385b; font-weight: 700; cursor: pointer; }
figure > .kh-model-tile { margin: 0; }
.kh-model-dialog {
  box-sizing: border-box;
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 16px);
  padding: 0;
  border: 1px solid #b8cad9;
  border-radius: 10px;
  background: #f1f5f8;
  color: #173047;
  overscroll-behavior: contain;
}
.kh-model-dialog::backdrop { background: rgb(9 39 68 / 76%); }
html:has(.kh-model-dialog[open]) { overflow: hidden; }
.kh-model-dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #b8cad9;
  background: #fff;
}
.kh-model-dialog-bar h2 { margin: 0; font: inherit; font-weight: 700; }
.kh-model-dialog-bar > button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #b8cad9;
  border-radius: 6px;
  background: #fff;
  color: #14385b;
  font: 24px/1 Arial, sans-serif;
  cursor: pointer;
}
.kh-model-dialog [data-viewer-body] { min-height: 1.5rem; }
.kh-model-dialog iframe { display: block; width: 100%; height: min(75dvh, 860px); border: 0; }
.kh-model-dialog-restricted { width: min(540px, calc(100% - 24px)); }
.kh-model-dialog-restricted [data-viewer-body] { padding: 12px 18px 20px; }
.kh-model-access-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kh-model-access-actions a { min-width: auto; min-height: 48px; font-size: 1rem; }
@media (max-width: 700px) {
  .kh-model-tile { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .kh-model-open { width: 100%; }
  .kh-model-dialog { width: calc(100% - 16px); }
  .kh-model-dialog-bar { padding: 8px; }
}
@media print {
  .kh-model-actions, .kh-model-dialog { display: none; }
}
:is(.share-demo-card, .bex-topic-card, .cw-topic-card, .grid > article, .grid > section) > .kh-model-tile {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  margin-block: 0 .75rem;
}
@media (max-width: 420px) {
  .kh-model-actions .kh-model-open { gap: 8px; }
}
main article > .hub-section.topic-practice[data-topic-practice][data-kh-model-section] {
  box-sizing: border-box;
  margin-block: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(.9rem, 2.6vw, 1.65rem);
  border: 1px solid #c5d5e4;
  border-radius: 12px;
  background: #f2f6fb;
}
.topic-practice[data-kh-model-section] > header {
  margin: 0 0 .75rem;
}
.topic-practice[data-kh-model-section] .topic-practice__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-block-end: .65rem;
}
.topic-practice[data-kh-model-section] .topic-practice__eyebrow img {
  display: block;
  height: auto;
}
.topic-practice[data-kh-model-section] > header h2 {
  margin: 0;
}
.topic-practice__access {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  margin-block-end: 1rem;
  padding: .35rem .85rem;
  border-left: 3px solid #14385b;
  border-radius: 4px;
  background: #e2ebf5;
  color: #14385b;
}
.topic-practice__access p {
  margin: .2rem 0;
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.45;
}
.topic-practice .topic-practice__access a {
  align-items: center;
  font-size: .875rem;
}
.kh-model-practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 218px), 1fr));
  gap: clamp(.75rem, 1.5vw, 1rem);
}
.kh-model-practice-grid .kh-model-tile {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  border: 1px solid #b9cddd;
  border-radius: 10px;
  background: #fff;
}
.kh-model-practice-grid .kh-model-picture {
  padding: 0;
}
.kh-model-practice-grid .kh-model-picture img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 9px 9px 0 0;
}
.kh-model-practice-grid .kh-model-tile .kh-model-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-block-end: .45rem;
}
.kh-model-practice-grid .kh-model-tile .kh-model-kicker > span {
  display: none;
}
.kh-model-practice-grid .kh-model-tile .kh-model-kicker::before {
  flex-basis: 18px;
  height: 18px;
}
.kh-model-practice-grid .kh-model-tile .kh-model-kicker .kh-model-brand {
  width: 65px;
}
.kh-model-practice-grid .kh-model-copy {
  padding: .85rem;
}
.kh-model-practice-grid .kh-model-copy .kh-model-heading {
  margin: 0;
  font-size: clamp(1.04rem, 1.75vw, 1.23rem);
  line-height: 1.27;
}
.kh-model-practice-grid .kh-model-actions .kh-model-open {
  width: 100%;
  min-width: 0;
  min-height: 50px !important;
  gap: .5rem;
  padding-inline: .8rem;
  border-color: #14385b;
  background: #14385b;
  font-size: .95rem;
}
.kh-model-practice-grid .kh-model-actions .kh-model-open:hover {
  border-color: #092744;
  background: #092744;
}
@media (forced-colors: active) {
  .kh-model-practice-grid .kh-model-actions .kh-model-open {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText !important;
  }
}
.topic-practice__all .kh-model-open {
  min-width: auto;
  min-height: 48px;
  margin-block: 4px;
  font-size: .95rem;
  text-align: left;
}

.kh-model-kicker, .mewp-preview-copy .tm-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.kh-model-kicker .kh-model-brand,
.mewp-preview-copy .tm-kicker .kh-model-brand {
  display: block;
  width: 88px;
  height: auto;
  margin: 0;
  border: 0;
}
