:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --demo-canvas: #0f1114;
  --demo-surface: #17191d;
  --demo-surface-elevated: #1f2126;
  --demo-border: #2c2f36;
  --demo-text: #e3e5ec;
  --demo-muted: #9ca0aa;
  --demo-blue: #5d93ff;
  --demo-green: #95c23d;
  --demo-control-radius: 6px;
  --demo-panel-radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--demo-canvas);
}

body,
body.theme-light,
body.theme-dark,
body[data-mpr-theme="light"],
body[data-mpr-theme="dark"] {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--demo-canvas);
  background-image: none;
  color: var(--demo-text);
  --mpr-color-surface-primary: var(--demo-canvas);
  --mpr-color-surface-elevated: var(--demo-surface-elevated);
  --mpr-color-surface-backdrop: rgba(15, 17, 20, 0.82);
  --mpr-color-text-primary: var(--demo-text);
  --mpr-color-text-muted: #c4c7d1;
  --mpr-color-border: var(--demo-border);
  --mpr-color-divider: var(--demo-border);
  --mpr-color-accent: var(--demo-blue);
  --mpr-color-accent-alt: var(--demo-green);
  --mpr-chip-bg: rgba(93, 147, 255, 0.12);
  --mpr-chip-hover-bg: rgba(93, 147, 255, 0.2);
  --mpr-menu-hover-bg: rgba(114, 120, 135, 0.16);
  --mpr-shadow-elevated: none;
  --mpr-shadow-flyout: 0 8px 20px rgba(0, 0, 0, 0.35);
  --mpr-content-width: 960px;
  --mpr-content-width-expanded: 1180px;
  --mpr-radius-control: var(--demo-control-radius);
}

mpr-header,
mpr-footer {
  display: block;
  width: 100%;
  min-width: 0;
}

button,
input,
a {
  font: inherit;
  font-size: 0.78rem;
}

button,
.entity-demo__button {
  min-height: 2.125rem;
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-control-radius);
  padding: 0.35rem 0.55rem;
  background: var(--demo-surface-elevated);
  color: var(--demo-text);
  font-weight: 600;
  cursor: pointer;
}

button:hover,
.entity-demo__button:hover {
  border-color: var(--demo-blue);
  color: var(--demo-blue);
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--demo-blue);
  outline-offset: 2px;
}

a {
  color: var(--demo-blue);
}

p {
  margin-top: 0;
}

.entity-demo {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 1.5rem 1rem 5rem;
}

.entity-demo__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 22rem);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.entity-demo__hero-copy {
  max-width: 680px;
}

.entity-demo__eyebrow {
  margin-bottom: 0.35rem;
  color: var(--demo-green);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-demo__title {
  margin: 0 0 0.5rem;
  color: var(--demo-text);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.entity-demo__lede,
.entity-demo__hero-note,
.entity-demo__playlist-summary,
.entity-demo__toolbar-copy,
.entity-demo__sidebar-description,
.entity-demo__tile-subtitle,
.entity-demo__video-summary,
.entity-demo__empty-copy,
.entity-demo__drawer-copy {
  margin-bottom: 0;
  color: var(--demo-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.entity-demo__hero-panel,
.entity-demo__notice,
.entity-demo__workspace-shell {
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-panel-radius);
  background: var(--demo-surface);
  box-shadow: none;
}

.entity-demo__hero-panel,
.entity-demo__notice {
  padding: 0.75rem;
}

.entity-demo__hero-links,
.entity-demo__toolbar-meta,
.entity-demo__filters,
.entity-demo__bulk-actions,
.entity-demo__video-actions,
.entity-demo__tag-row,
.entity-demo__drawer-tags,
.entity-demo__drawer-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.entity-demo__hero-links {
  margin-top: 0.6rem;
}

.entity-demo__notice {
  margin-bottom: 0.75rem;
  color: #c4c7d1;
  font-size: 0.78rem;
}

.entity-demo__notice--warning {
  border-color: rgba(234, 180, 101, 0.4);
}

.entity-demo__notice--error {
  border-color: rgba(224, 86, 86, 0.45);
}

.entity-demo__workspace-shell {
  overflow: hidden;
}

.entity-demo__workspace-header,
.entity-demo__heading-row,
.entity-demo__toolbar,
.entity-demo__video-footer,
.entity-demo__drawer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.entity-demo__workspace-header {
  padding: 0.75rem;
  border-bottom: 1px solid var(--demo-border);
  background: var(--demo-canvas);
}

.entity-demo__section-title,
.entity-demo__playlist-title,
.entity-demo__tile-name,
.entity-demo__video-status,
.entity-demo__empty-title,
.entity-demo__drawer-stat-value {
  margin: 0;
  color: var(--demo-text);
  font-size: 0.86rem;
}

.entity-demo__workspace-content {
  display: grid;
  min-width: 0;
  gap: 0.75rem;
}

.entity-demo__sidebar-items,
.entity-demo__rail-items,
.entity-demo__video-list {
  display: grid;
  min-width: 0;
  gap: 0.5rem;
}

.entity-demo__rail-items {
  grid-auto-flow: column;
  grid-auto-columns: minmax(12rem, 15rem);
}

.entity-demo__sidebar-button {
  width: 100%;
  min-height: 0;
  padding: 0.3rem 0.45rem;
  line-height: 1.2;
  text-align: left;
}

.entity-demo__sidebar-label,
.entity-demo__tile-title,
.entity-demo__video-metric,
.entity-demo__drawer-stat-label,
.entity-demo__swatch-label {
  color: #c4c7d1;
  font-size: 0.72rem;
}

.entity-demo__sidebar-description {
  font-size: 0.67rem;
  line-height: 1.2;
}

.entity-demo__tile,
.entity-demo__video-frame,
.entity-demo__drawer-panel,
.entity-demo__empty-state {
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-control-radius);
  background: var(--demo-canvas);
}

.entity-demo__tile,
.entity-demo__drawer-panel,
.entity-demo__empty-state {
  padding: 0.65rem;
}

.entity-demo__tile-copy,
.entity-demo__heading,
.entity-demo__toolbar-copy,
.entity-demo__drawer-layout,
.entity-demo__drawer-panel,
.entity-demo__detail-list {
  display: grid;
  min-width: 0;
  gap: 0.4rem;
}

.entity-demo__pill,
.entity-demo__tag,
.entity-demo__drawer-mode {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  border: 1px solid var(--demo-border);
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  background: rgba(93, 147, 255, 0.08);
  color: #c4c7d1;
  font-size: 0.67rem;
}

.entity-demo__search {
  display: grid;
  width: min(100%, 24rem);
  gap: 0.3rem;
  color: #c4c7d1;
  font-size: 0.72rem;
}

.entity-demo__search input {
  width: 100%;
  min-height: 2.125rem;
  border: 1px solid var(--demo-border);
  border-radius: var(--demo-control-radius);
  padding: 0.4rem 0.5rem;
  background: var(--demo-canvas);
  color: var(--demo-text);
}

.entity-demo__video-list {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.entity-demo__video-frame {
  display: grid;
  min-height: 7rem;
  place-items: center;
  color: var(--demo-muted);
}

.entity-demo__video-frame-label {
  font-size: 0.72rem;
}

.entity-demo__video-meta,
.entity-demo__video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.entity-demo__checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--demo-blue);
}

.entity-demo__drawer-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.5rem;
}

.entity-demo__drawer-stat {
  border-top: 1px solid var(--demo-border);
  padding-top: 0.4rem;
}

.entity-demo__swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border: 1px solid var(--demo-border);
  border-radius: 2px;
}

@media (max-width: 62rem) {
  .entity-demo__hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 48rem) {
  .entity-demo {
    padding: 1rem 0.75rem 7rem;
  }

  .entity-demo__workspace-header,
  .entity-demo__heading-row,
  .entity-demo__toolbar,
  .entity-demo__video-footer,
  .entity-demo__drawer-header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .entity-demo__button,
  .entity-demo__search {
    max-width: 100%;
  }
}
