body.website-mode #frame[data-website-route="ilnbroadcasters"] #contentframe {
  overflow: hidden;
}

body.website-mode #frame[data-website-route="message_terminal"] #content {
  height: 100%;
}

/* The landing-stacked rule gives #content `padding:1em` while it is content-box,
 * so on mobile the padding is ADDED to its 100% width and #content overflows
 * #contentframe (~30px), pushing the terminal form/lines past the right edge.
 * Force border-box so the padding is contained. Selector matches the framework
 * rule's #display #contentframe #content chain (+ route attr) to win specificity.
 * Site-only scope: terminal route on mobile/compact tiers. */
body.website-mode #frame[data-website-route="message_terminal"][data-layout="stacked"] #display #contentframe #content,
body.website-mode #frame[data-website-route="message_terminal"][data-layout="split"][data-tier="compact"] #display #contentframe #content,
body.website-mode #frame[data-website-route="message_terminal"][data-layout="split"][data-tier="minimal"] #display #contentframe #content {
  box-sizing: border-box;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-view {
  gap: 16px;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-kicker,
body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-status {
  margin: 0;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-kicker {
  color: var(--highlight);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-form {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-label {
  align-self: flex-start;
  color: var(--message-font-color);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row {
  display: flex;
  gap: 12px;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row input,
body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row button {
  min-height: 52px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--highlight) 34%, rgba(255, 255, 255, 0.12));
  font: inherit;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 18px;
  background: color-mix(in srgb, var(--frame-bg) 82%, rgba(0, 0, 0, 0.42));
  color: var(--font-color);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  outline: none;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row input:focus {
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--highlight) 22%, transparent);
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row button {
  flex: 0 0 auto;
  padding: 0 22px;
  background: var(--menu-button-bg);
  color: var(--font-color);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row button:hover,
body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row button:focus-visible {
  border-color: var(--highlight);
  transform: translateY(-1px);
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row button:disabled,
body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row input:disabled {
  cursor: wait;
  opacity: 0.72;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-status {
  min-height: 1.5em;
  color: var(--message-font-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-status.is-error {
  color: #ff8f8f;
}

body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-status.is-ready {
  color: var(--highlight);
}

/* Terminal rotating-message progress bar: align it to the start of the column
 * (the shared .progress-container is centered for Home) and let the view's own
 * gap handle spacing instead of the shared margin-top. */
body.website-mode #frame[data-website-route="message_terminal"] .progress-container {
  align-self: flex-start;
  margin-top: 0;
}

/* Fixed instruction shown above the form, separate from the rotating headlines. */
body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-instruction {
  margin: 0;
  color: var(--message-font-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

body.website-mode #frame[data-website-route="home"] #submenu {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

body.website-mode #frame[data-website-route="home"] .website-home-context-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
}

body.website-mode #frame[data-website-route="home"] .website-home-context-card .il-video-card {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 260px;
}

body.website-mode #frame[data-website-route="home"] .website-home-context-card .il-room-sign--video {
  height: min(9vh, 96px);
}

body.website-mode #frame[data-website-route="home"] .website-home-context-card .il-video-card.il-answer-mode-active .il-room-sign--video {
  height: min(52%, 320px);
}

body.website-mode #frame[data-website-route="ilnbroadcasters"] #content {
  height: 100%;
}

body.website-mode #frame[data-website-route="ilnbroadcasters"] .example .image {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.website-mode #frame[data-website-route="ilnbroadcasters"] .example .image > .iln-media-shell {
  width: min(100%, 760px);
  max-width: 100%;
}

.iln-media-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--highlight) 18%, rgba(255, 255, 255, 0.15));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    #ffffff;
  box-shadow:
    0 24px 48px rgba(22, 31, 48, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.iln-media-shell.is-fallback-white {
  background: #ffffff;
}

.iln-media-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.iln-media-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 23, 35, 0.12) 0%, rgba(16, 23, 35, 0.05) 32%, rgba(16, 23, 35, 0.42) 100%);
  pointer-events: none;
}

.iln-media-shell.is-fallback-white::after {
  background:
    linear-gradient(180deg, rgba(240, 243, 247, 0.16) 0%, rgba(240, 243, 247, 0.06) 32%, rgba(210, 216, 224, 0.18) 100%);
}

.iln-media-meta,
.iln-media-avatar,
.iln-live-card {
  position: absolute;
  z-index: 2;
}

.iln-media-meta {
  top: 18px;
  left: 18px;
  max-width: calc(100% - 84px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.iln-media-name,
.iln-media-kind,
.iln-live-label,
.iln-live-title,
.iln-open-link,
.iln-toolbar-stat-label,
.iln-toolbar-stat-value {
  margin: 0;
}

.iln-media-name {
  color: #ffffff;
  font-size: clamp(1.2rem, 1vw + 0.85rem, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.iln-media-kind {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

body.website-mode #frame[data-website-route="ilnbroadcasters"] .iln-media-name,
body.website-mode #frame[data-website-route="ilnbroadcasters"] .iln-media-kind {
  color: #ffffff !important;
}

.iln-media-avatar {
  top: 14px;
  right: 14px;
  width: clamp(56px, 5vw, 80px);
  height: clamp(56px, 5vw, 80px);
  max-width: 80px;
  max-height: 80px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  background: #ffffff;
}

.iln-live-card {
  left: 18px;
  right: 18px;
  bottom: 18px;
  max-width: min(78%, 340px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(27, 31, 38, 0.82);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.iln-live-accent {
  width: min(72px, 38%);
  height: 6px;
  border-radius: 999px;
  background: var(--highlight);
}

.iln-live-label {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.iln-live-title {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 600;
}

body.website-mode #frame[data-website-route="ilnbroadcasters"] .iln-live-label,
body.website-mode #frame[data-website-route="ilnbroadcasters"] .iln-live-title {
  color: var(--highlight) !important;
}

.iln-project-card {
  display: flex;
  flex-direction: column;
  min-height: min(100%, 420px);
}

body.website-mode #frame[data-website-route="ilnbroadcasters"] .project-title {
  text-transform: uppercase;
}

.iln-description.is-hidden {
  display: none;
}

.iln-card-actions {
  padding-top: 16px;
}

.iln-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--highlight) 26%, rgba(0, 0, 0, 0.06));
  background: var(--menu-button-bg);
  color: var(--font-color);
  text-decoration: none;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--highlight) 10%, transparent);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.iln-open-link:hover,
.iln-open-link:focus-visible {
  border-color: var(--highlight);
  transform: translateY(-1px);
}

.iln-toolbar-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 247, 250, 0.82));
  box-shadow:
    0 10px 20px rgba(22, 31, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.iln-toolbar-stat-label {
  color: var(--message-font-color);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.iln-toolbar-stat-value {
  color: var(--font-color);
  font-size: 1.05rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .iln-live-card {
    max-width: calc(100% - 36px);
  }
}

@media (max-width: 760px) {
  body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row {
    flex-direction: column;
  }

  body.website-mode #frame[data-website-route="message_terminal"] .message-terminal-row button {
    width: 100%;
  }

  .iln-media-meta {
    max-width: calc(100% - 74px);
  }
}

/* ---------------------------------------------------------------------------
 * Mobile (stacked) broadcaster card.
 * The framework stacked rules stretch `.image` and reset only img/video — they
 * never target the `.iln-media-shell` wrapper, so on mobile the card stretched
 * vertically, kept the desktop 18px radius, and sat centered. Re-assert the
 * desktop card shape (16:9), top-anchor it, and use a tighter 8px radius for the
 * smaller device. Scoped to the broadcaster route + stacked/compact/minimal tiers
 * so no other collection page or the desktop split view is affected.
 * ------------------------------------------------------------------------- */
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="stacked"] .example .image,
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="split"][data-tier="compact"] .example .image,
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="split"][data-tier="minimal"] .example .image {
  align-items: flex-start;
  justify-content: flex-start;
}

body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="stacked"] .example .image > .iln-media-shell,
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="split"][data-tier="compact"] .example .image > .iln-media-shell,
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="split"][data-tier="minimal"] .example .image > .iln-media-shell {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  align-self: flex-start;
  border-radius: 8px;
}

/* The framework's stacked/compact `.example .image img { height: 100% }` reset
 * (specificity 1,5,1) also hits the avatar <img>, stretching the circular logo
 * into a tall rectangle. Re-assert its square size with a matching-or-higher
 * specificity selector (same .example .image chain + img.iln-media-avatar) so the
 * override actually wins. Only the height was overridden. */
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="stacked"] .example .image img.iln-media-avatar,
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="split"][data-tier="compact"] .example .image img.iln-media-avatar,
body.website-mode #frame[data-website-route="ilnbroadcasters"][data-layout="split"][data-tier="minimal"] .example .image img.iln-media-avatar {
  width: clamp(56px, 14vw, 80px);
  height: clamp(56px, 14vw, 80px);
  max-width: 80px;
  max-height: 80px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.92);
  align-self: auto;
}

/* ---------------------------------------------------------------------------
 * "The Network" route (#/network) — full-bleed iframe of the Agents Hub viewer.
 * The viewer is a full-canvas app, so #content must NOT apply the collection
 * (grid) / landing (centered) layout: drop padding/gap/scroll and let the iframe
 * fill the content area. Scoped to data-content-template="network".
 * ------------------------------------------------------------------------- */
body.website-mode #frame[data-content-template="network"] #content {
  display: block;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

body.website-mode #frame[data-content-template="network"] .network-embed,
body.website-mode #frame[data-content-template="network"] .network-embed-frame {
  width: 100%;
  height: 100%;
}

body.website-mode #frame[data-content-template="network"] .network-embed-frame {
  display: block;
  border: 0;
}
