.demo-card {
    min-height: 11rem;
}

.demo-card .video-card-thumbnail {
    aspect-ratio: 2.4 / 1;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0.75rem;
}

.demo-card-token {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-base);
    background: var(--color-primary);
    padding: 0.2rem 0.45rem;
}

.demo-card-body {
    pointer-events: auto;
}

.demo-card-body p {
    margin: 0;
    color: var(--color-subtle);
    font-size: 0.9rem;
    line-height: 1.45;
}

.demo-card-action,
.viewer-hero-link,
.viewer-route-nav a {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 0.85rem;
    color: var(--color-base);
    background: var(--color-primary);
    padding: 0.45rem 0.7rem;
    text-decoration: none;
    font-weight: 700;
}

.demo-card-action:hover,
.viewer-hero-link:hover,
.viewer-route-nav a:hover {
    filter: brightness(1.05);
}

.demo-context {
    margin: 1rem 0 1.5rem;
    padding: 0.75rem 1rem;
    border-inline-start: 3px solid var(--color-primary);
    background: var(--color-surface);
    color: var(--color-subtle);
}

.demo-context strong {
    color: var(--color-text);
}

.viewer-route-page {
    min-height: 100vh;
    padding: clamp(1rem, 4vw, 3rem);
    background: var(--color-background);
    color: var(--color-text);
}

.viewer-route-nav {
    margin: 0 auto 1rem;
    max-width: 72rem;
}

.model-viewer-shell {
    display: grid;
    gap: 1rem;
    max-width: 72rem;
    margin: 0 auto;
}

.model-viewer-header,
.model-viewer-boundary,
.viewer-demo-controls {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.model-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.model-viewer-header h1,
.model-viewer-header p {
    margin: 0;
}

.viewer-eyebrow {
    font-family: var(--font-mono);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.viewer-status-pill {
    white-space: nowrap;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.35rem 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.viewer-demo-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
}

.viewer-demo-button {
    border: 1px solid var(--color-border);
    background: var(--color-background);
    color: var(--color-text);
    padding: 0.45rem 0.65rem;
    cursor: pointer;
}

.viewer-demo-button:hover,
.viewer-demo-button.is-active {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.model-viewer-boundary {
    position: relative;
    overflow: hidden;
    min-height: min(72vh, 42rem);
}

.model-viewer-stage {
    position: relative;
    min-height: min(72vh, 42rem);
    background:
        linear-gradient(135deg, rgb(255 255 255 / 0.06), transparent 30%),
        radial-gradient(circle at 50% 35%, rgb(255 255 255 / 0.12), transparent 24%),
        var(--color-background);
}

.model-viewer-canvas {
    display: block;
    width: 100%;
    min-height: min(72vh, 42rem);
    touch-action: none;
    cursor: grab;
}

.model-viewer-overlay {
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    max-width: 38rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-surface) 92%, transparent);
    pointer-events: none;
}

.model-viewer-overlay h2,
.model-viewer-overlay p,
.viewer-mesh-summary {
    margin: 0;
}

.model-viewer-overlay p + .viewer-mesh-summary,
.viewer-mesh-summary + .viewer-lifecycle-note {
    margin-top: 0.75rem;
}

.viewer-mesh-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
}

.viewer-mesh-summary div {
    display: grid;
    gap: 0.15rem;
}

.viewer-mesh-summary dt {
    color: var(--color-subtle);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.viewer-mesh-summary dd {
    margin: 0;
}

.viewer-lifecycle-note {
    color: var(--color-subtle);
    font-size: 0.85rem;
}
