.frontier-algo {
    --frontier-algo-blue: #2563eb;
    --frontier-algo-cyan: #0891b2;
    --frontier-algo-green: #10b981;
    --frontier-algo-amber: #f59e0b;
    --frontier-algo-violet: #7c3aed;
    --frontier-algo-ink: #0f172a;
    --frontier-algo-muted: #64748b;
    --frontier-algo-line: #dbeafe;
    --frontier-algo-panel: rgba(255, 255, 255, 0.94);
    --frontier-algo-soft: #f8fbff;
    --frontier-algo-motion: cubic-bezier(.22,.61,.36,1);
}

.frontier-algo-hero {
    border: 1px solid rgba(191, 219, 254, 0.78);
    box-shadow: 0 16px 34px rgba(8, 145, 178, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.frontier-algo-hero-actions,
.frontier-next-actions {
    flex-wrap: wrap;
}

.frontier-algo-state {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 0 13px;
    color: #075985;
    background: #f0f9ff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.frontier-algo-state--honest {
    border-color: #fed7aa;
    color: #9a3412;
    background: #fff7ed;
}

.frontier-algo-tabs {
    margin-bottom: 8px;
    padding-block: 6px;
    border-radius: 14px;
}

.frontier-algo-tabs.frontier-algo-tabs :is(a, button, span) {
    min-height: 32px;
    padding-inline: 14px;
}

.frontier-algo-workbench {
    grid-template-columns: minmax(236px, 264px) minmax(0, 1fr) minmax(280px, 318px);
    gap: 12px;
}

.frontier-algo-controls,
.frontier-algo-notes {
    gap: 10px;
}

.frontier-algo-controls {
    padding: 12px;
}

.frontier-algo-controls .vision-field {
    gap: 4px;
}

.frontier-algo-controls .vision-field select {
    min-height: 32px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 850;
}

.frontier-control-group,
.frontier-player,
.frontier-note-card,
.frontier-alignment-readout {
    display: grid;
    gap: 8px;
    border: 1px solid #dbeafe;
    border-radius: 13px;
    padding: 10px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.frontier-control-group > strong,
.frontier-note-card > span,
.frontier-alignment-readout span,
.frontier-formula-card > span {
    color: var(--frontier-algo-cyan);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.frontier-segmented {
    display: grid;
    gap: 6px;
}

.frontier-segmented button,
.frontier-player-buttons button,
.frontier-next-panel a {
    min-height: 32px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s var(--frontier-algo-motion), background 0.18s var(--frontier-algo-motion), border-color 0.18s var(--frontier-algo-motion);
}

.frontier-segmented button:hover,
.frontier-player-buttons button:hover,
.frontier-next-panel a:hover,
.frontier-segmented button:focus-visible,
.frontier-player-buttons button:focus-visible,
.frontier-next-panel a:focus-visible {
    border-color: #67e8f9;
    background: #ecfeff;
    outline: none;
    transform: translateY(-1px);
}

.frontier-segmented button.is-active,
.frontier-player-buttons button.is-active {
    border-color: var(--frontier-algo-blue);
    color: #ffffff;
    background: var(--frontier-algo-blue);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.16);
}

.frontier-player-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.frontier-player-buttons button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.frontier-speed-control {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
}

.frontier-speed-control select {
    min-height: 30px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    padding: 0 8px;
    color: #1d4ed8;
    background: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.frontier-current-step {
    display: grid;
    gap: 3px;
    border-top: 1px solid #e5eefb;
    padding-top: 8px;
}

.frontier-current-step strong,
.frontier-note-card strong,
.frontier-alignment-readout strong {
    color: #172554;
    font-size: 13px;
    font-weight: 950;
}

.frontier-current-step span,
.frontier-note-card p,
.frontier-note-grid strong,
.frontier-formula-card small,
.frontier-alignment-readout span {
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

.frontier-status-summary {
    gap: 4px;
    padding: 7px;
}

.frontier-status-summary > div {
    min-height: 28px;
    border-radius: 8px;
    padding: 5px 7px;
}

.frontier-status-summary span {
    font-size: 10px;
}

.frontier-status-summary strong {
    font-size: 11px;
}

.frontier-algo-stage {
    min-height: 0;
}

.frontier-stage-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.frontier-stage-chips span {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0 9px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.frontier-stage-canvas {
    min-height: 0;
    padding: 14px;
    background:
        linear-gradient(90deg, rgba(219, 234, 254, 0.46) 1px, transparent 1px),
        linear-gradient(180deg, rgba(219, 234, 254, 0.46) 1px, transparent 1px),
        #f5f8fc;
    background-size: 26px 26px;
}

.frontier-stage-card,
.frontier-mini-card,
.frontier-matrix-card,
.frontier-output-card,
.frontier-feature-space,
.frontier-distribution-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.045);
}

.frontier-section-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    border-bottom: 1px solid #e8eef6;
    padding: 8px 10px;
}

.frontier-section-headline strong {
    color: #172554;
    font-size: 13px;
    font-weight: 950;
}

.frontier-section-headline span {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.frontier-architecture-card {
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.96)),
        radial-gradient(circle at 16% 16%, rgba(37, 99, 235, 0.12), transparent 32%);
}

.model-arch-graph {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.model-arch-flow,
.model-arch-lane {
    display: grid;
    grid-template-columns: repeat(var(--arch-cols, 5), minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.model-arch-lanes {
    display: grid;
    gap: 8px;
}

.model-arch-lane {
    position: relative;
    border: 1px solid #e0f2fe;
    border-radius: 14px;
    padding: 8px;
    background: rgba(248, 251, 255, 0.86);
}

.model-arch-lane-label {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 3px 8px;
    color: #0f172a;
    background: #ffffff;
    font-size: 10px;
    font-weight: 950;
}

.model-arch-node {
    position: relative;
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
    min-height: 84px;
    border: 1px solid #bfdbfe;
    border-radius: 13px;
    padding: 9px;
    color: #172554;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
    transition:
        border-color 0.24s var(--frontier-algo-motion),
        box-shadow 0.24s var(--frontier-algo-motion),
        transform 0.24s var(--frontier-algo-motion),
        opacity 0.24s var(--frontier-algo-motion);
}

.model-arch-node:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -9px;
    z-index: 2;
    width: 9px;
    border-top: 2px solid #bfdbfe;
}

.model-arch-node:not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(50% - 4px);
    right: -10px;
    z-index: 3;
    border: 4px solid transparent;
    border-left-color: #bfdbfe;
}

.model-arch-node span {
    width: max-content;
    border-radius: 999px;
    padding: 2px 7px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 9px;
    font-weight: 950;
    text-transform: uppercase;
}

.model-arch-node strong {
    min-width: 0;
    color: #172554;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.22;
}

.model-arch-node small {
    min-width: 0;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
}

.model-arch-node.is-complete {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.model-arch-node.is-active {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.16);
    transform: translateY(-2px);
}

.model-arch-node.is-active span {
    color: #ffffff;
    background: #2563eb;
}

.model-arch-node.is-muted {
    opacity: 0.52;
}

.model-arch-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 7px 9px;
    color: #334155;
    background: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 850;
}

.model-arch-caption strong {
    color: #1d4ed8;
}

.clip-stage-layout > .frontier-architecture-card,
.vlm-stage-layout > .frontier-architecture-card,
.mm-stage-layout > .frontier-architecture-card {
    grid-column: 1 / -1;
}

.frontier-sample-frame {
    position: relative;
    display: grid;
    aspect-ratio: 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #e2e8f0;
    isolation: isolate;
}

.frontier-sample-frame::after {
    content: attr(data-caption);
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 8;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    padding: 4px 8px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.58);
    font-size: 10px;
    font-weight: 900;
    pointer-events: none;
}

.frontier-sample-scene {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #bfdbfe 0 42%, #dbeafe 42% 52%, #64748b 52% 100%);
}

.frontier-sample-scene.has-photo {
    background: #111827;
}

.frontier-sample-scene.has-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    background:
        radial-gradient(circle at 50% 42%, transparent 0 54%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.14));
    pointer-events: none;
}

.frontier-sample-photo {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.04);
}

.frontier-sample-scene span {
    position: absolute;
    display: block;
    z-index: 1;
}

.f-scene-sky {
    inset: 0 0 45%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 70%),
        #bfdbfe;
}

.f-scene-ground {
    inset: 52% 0 0;
    background: linear-gradient(115deg, #64748b, #475569);
    clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%);
}

.f-scene-building {
    bottom: 45%;
    width: 25%;
    height: 35%;
    border: 1px solid rgba(255, 255, 255, 0.62);
    background:
        linear-gradient(90deg, rgba(255,255,255,0.26) 1px, transparent 1px) 0 0 / 18px 100%,
        linear-gradient(0deg, rgba(255,255,255,0.28) 1px, transparent 1px) 0 0 / 100% 22px,
        linear-gradient(180deg, #93c5fd, #64748b);
}

.f-scene-building--left {
    left: 8%;
    clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
}

.f-scene-building--right {
    right: 8%;
    width: 29%;
    height: 42%;
    clip-path: polygon(0 0, 100% 13%, 100% 100%, 0 100%);
}

.f-scene-subject {
    left: 29%;
    bottom: 25%;
    width: 33%;
    height: 20%;
    border-radius: 9px 12px 6px 6px;
    background:
        linear-gradient(90deg, #dbeafe 0 24%, transparent 24% 30%, #dbeafe 30% 58%, transparent 58%),
        linear-gradient(180deg, #fbbf24 0 58%, #f59e0b 58%);
    box-shadow: inset 0 -7px 0 rgba(15, 23, 42, 0.18);
}

.f-scene-subject::before {
    content: "";
    position: absolute;
    right: 12%;
    bottom: -9px;
    left: 12%;
    height: 12px;
    background:
        radial-gradient(circle at 14% 50%, #111827 0 7px, transparent 7.5px),
        radial-gradient(circle at 86% 50%, #111827 0 7px, transparent 7.5px);
}

.frontier-sample-scene[data-scene="animal"] {
    background: linear-gradient(180deg, #c7f9cc 0 55%, #7cb342 55% 100%);
}

.frontier-sample-scene[data-scene="animal"] .f-scene-sky {
    inset: 0 0 55%;
    background: linear-gradient(180deg, #bae6fd, #dcfce7);
}

.frontier-sample-scene[data-scene="animal"] .f-scene-ground {
    inset: 55% 0 0;
    clip-path: none;
    background:
        radial-gradient(circle at 22% 38%, rgba(34, 197, 94, 0.28) 0 12%, transparent 13%),
        radial-gradient(circle at 75% 28%, rgba(16, 185, 129, 0.24) 0 10%, transparent 11%),
        #86efac;
}

.frontier-sample-scene[data-scene="animal"] .f-scene-building {
    display: none;
}

.frontier-sample-scene[data-scene="animal"] .f-scene-subject {
    left: 26%;
    bottom: 27%;
    width: 44%;
    height: 30%;
    border-radius: 42% 48% 38% 40%;
    background: linear-gradient(145deg, #92400e, #d97706);
    box-shadow: 34px -22px 0 -16px #b45309, -30px -18px 0 -18px #b45309;
}

.frontier-sample-scene[data-scene="animal"] .f-scene-subject::before {
    right: 15%;
    bottom: -20px;
    left: 12%;
    height: 24px;
    background:
        linear-gradient(90deg, #78350f 0 8px, transparent 8px 28px, #78350f 28px 36px, transparent 36px 58px, #78350f 58px 66px, transparent 66px 86px, #78350f 86px 94px);
}

.frontier-sample-scene[data-scene="object"] {
    background: linear-gradient(180deg, #e0f2fe 0 42%, #f1f5f9 42% 100%);
}

.frontier-sample-scene[data-scene="object"] .f-scene-ground {
    inset: 50% 0 0;
    clip-path: none;
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.28) 1px, transparent 1px),
        linear-gradient(0deg, rgba(148, 163, 184, 0.28) 1px, transparent 1px),
        #e2e8f0;
    background-size: 28px 28px;
}

.frontier-sample-scene[data-scene="object"] .f-scene-building {
    display: none;
}

.frontier-sample-scene[data-scene="object"] .f-scene-subject {
    left: 34%;
    bottom: 24%;
    width: 31%;
    height: 42%;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent 38%),
        linear-gradient(145deg, #60a5fa, #1d4ed8);
    box-shadow: 0 18px 0 -9px rgba(15, 23, 42, 0.18);
}

.frontier-sample-scene[data-scene="object"] .f-scene-subject::before {
    left: 28%;
    right: 28%;
    top: 12%;
    bottom: auto;
    height: 28%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.frontier-sample-scene[data-scene="classroom"] {
    background: linear-gradient(180deg, #f8fafc 0 58%, #cbd5e1 58% 100%);
}

.frontier-sample-scene[data-scene="classroom"] .f-scene-sky {
    inset: 0 0 58%;
    background:
        linear-gradient(90deg, transparent 0 16%, #bfdbfe 16% 36%, transparent 36% 60%, #bfdbfe 60% 82%, transparent 82%),
        #f8fafc;
}

.frontier-sample-scene[data-scene="classroom"] .f-scene-ground {
    inset: 58% 0 0;
    clip-path: none;
    background:
        linear-gradient(90deg, rgba(100, 116, 139, 0.22) 1px, transparent 1px),
        #e2e8f0;
    background-size: 34px 100%;
}

.frontier-sample-scene[data-scene="classroom"] .f-scene-building {
    display: none;
}

.frontier-sample-scene[data-scene="classroom"] .f-scene-subject {
    left: 20%;
    right: 18%;
    bottom: 22%;
    width: auto;
    height: 24%;
    border-radius: 5px;
    background:
        linear-gradient(90deg, #334155 0 14%, transparent 14% 22%, #334155 22% 36%, transparent 36% 54%, #334155 54% 68%, transparent 68% 78%, #334155 78% 92%, transparent 92%),
        linear-gradient(180deg, #fef3c7, #d97706);
    box-shadow: 0 24px 0 -14px #78350f;
}

.frontier-sample-scene[data-scene="person"] .f-scene-subject {
    left: 46%;
    bottom: 24%;
    width: 16%;
    height: 42%;
    border-radius: 999px 999px 12px 12px;
    background: #f8fafc;
    box-shadow:
        0 -18px 0 -7px #111827,
        -15px 39px 0 -8px #111827,
        16px 39px 0 -8px #111827,
        -18px 17px 0 -11px #2563eb,
        18px 17px 0 -11px #2563eb;
}

.frontier-sample-scene[data-scene="street"] .f-scene-subject {
    right: 20%;
    left: auto;
    bottom: 27%;
    width: 22%;
    height: 14%;
    border-radius: 9px 14px 5px 5px;
    background: linear-gradient(180deg, #60a5fa, #1d4ed8);
}

.frontier-pipeline {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
    padding: 10px 12px 12px;
    background: linear-gradient(180deg, #fbfdff, #f5f8fc);
}

.frontier-pipeline article {
    position: relative;
    display: grid;
    align-content: start;
    gap: 4px;
    min-height: 70px;
    min-width: 0;
    border: 1px solid #dbeafe;
    border-radius: 11px;
    padding: 8px;
    background: #ffffff;
    transition: transform 0.24s var(--frontier-algo-motion), border-color 0.24s var(--frontier-algo-motion), background 0.24s var(--frontier-algo-motion);
}

.frontier-pipeline article::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -8px;
    width: 8px;
    height: 2px;
    background: #93c5fd;
}

.frontier-pipeline article:last-child::after {
    display: none;
}

.frontier-pipeline span {
    color: var(--frontier-algo-cyan);
    font-size: 9px;
    font-weight: 950;
}

.frontier-pipeline strong {
    color: #172554;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 950;
}

.frontier-pipeline small {
    color: #64748b;
    font-size: 9px;
    line-height: 1.28;
}

.frontier-pipeline article.is-active {
    border-color: var(--frontier-algo-violet);
    background: #f5f3ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(124, 58, 237, 0.12);
}

.frontier-pipeline article.is-complete {
    border-color: #67e8f9;
    background: #ecfeff;
}

.frontier-note-card {
    box-shadow: none;
}

.frontier-note-card p {
    margin: 0;
}

.frontier-note-grid {
    display: grid;
    gap: 7px;
}

.frontier-note-grid div {
    display: grid;
    gap: 4px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 8px;
    background: #ffffff;
}

.frontier-note-grid span {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 900;
}

.frontier-note-grid strong {
    color: #334155;
    font-weight: 800;
}

.frontier-formula-card strong {
    font-family: Consolas, "Courier New", "Microsoft YaHei", monospace;
    font-size: 11px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.frontier-top-list {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.frontier-top-list li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 10px;
    font-weight: 850;
}

.frontier-top-list i {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: #dbeafe;
}

.frontier-top-list b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #10b981);
}

.frontier-next-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.frontier-next-panel span {
    color: var(--frontier-algo-cyan);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.frontier-next-panel h2 {
    max-width: 820px;
    margin: 5px 0 0;
    color: #172554;
    font-size: clamp(16px, 1.5vw, 22px);
    line-height: 1.35;
}

.frontier-next-panel a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    padding: 0 13px;
}

.frontier-next-actions {
    display: flex;
    gap: 8px;
}

.frontier-loading,
.frontier-error {
    display: grid;
    min-height: 260px;
    place-items: center;
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    color: #1d4ed8;
    background: rgba(239, 246, 255, 0.86);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.frontier-error {
    border-color: #fed7aa;
    color: #9a3412;
    background: #fff7ed;
}

.frontier-algo-stepper {
    margin-top: 12px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.frontier-algo-stepper li {
    cursor: pointer;
}

.frontier-algo-stepper li.is-complete > span {
    border-color: #67e8f9;
    color: #0e7490;
    background: #ecfeff;
}

.frontier-algo-stepper li.is-active strong {
    color: #1d4ed8;
}

.frontier-bottom-player {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.08);
}

.frontier-bottom-player > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.frontier-bottom-player span {
    color: #0891b2;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.frontier-bottom-player strong {
    color: #172554;
    font-size: 14px;
    font-weight: 950;
}

.frontier-bottom-player small {
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.45;
}

.frontier-bottom-player-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.frontier-bottom-player-actions button,
.frontier-bottom-player-actions select {
    min-height: 32px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    padding: 0 12px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 11px;
    font-weight: 900;
}

.frontier-bottom-player-actions button {
    cursor: pointer;
}

.frontier-bottom-player-actions button.is-active {
    border-color: #2563eb;
    color: #ffffff;
    background: #2563eb;
}

.frontier-bottom-player-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.frontier-bottom-player-actions label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.frontier-bottom-player-actions label span {
    letter-spacing: 0;
    text-transform: none;
}

body:is(.vision-transformer-page-shell, .vision-language-page-shell) .ai-assistant-fab {
    display: flex;
}

body:is(.vision-transformer-page-shell, .vision-language-page-shell) .sidebar-toggle {
    top: 18px;
    bottom: auto;
    left: 18px;
    z-index: 80;
    display: grid;
    width: 42px;
    min-width: 0;
    height: 42px;
    place-items: center;
    padding: 0;
    border-radius: 12px;
    font-size: 20px;
}

body.vision-language-page-shell {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 80% 8%, rgba(96, 165, 250, 0.18), transparent 30%),
        linear-gradient(180deg, #f6faff 0%, #eef6ff 52%, #f8fbff 100%);
}

body.vision-language-page-shell .frontier-algo {
    padding-left: 64px;
}

body.vision-language-page-shell :is(.frontier-algo-stage, .frontier-stage-card, .frontier-stage-canvas, .clip-matrix-cell, .mm-fusion-matrix, .vlm-answer-card) {
    scroll-margin-top: 28px;
}

body.home-page-shell:has(.frontier-algo) .frontier-algo {
    padding-left: 74px;
}

body.home-page-shell:has(.frontier-algo) .site-nav {
    min-width: 0;
}

body.home-page-shell:has(.frontier-algo) .site-nav a {
    flex: 0 0 auto;
}

body.home-page-shell:has(.frontier-algo) :is(.frontier-algo-stage, .frontier-stage-card, .frontier-stage-canvas, .clip-matrix-cell, .mm-fusion-matrix, .vlm-answer-card) {
    scroll-margin-top: calc(var(--home-header-height) + 28px);
}

@media (max-width: 1380px) {
    .frontier-algo-workbench {
        grid-template-columns: minmax(220px, 244px) minmax(0, 1fr) minmax(250px, 288px);
        gap: 10px;
    }

    .frontier-pipeline {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .frontier-pipeline article::after {
        display: none;
    }
}

@media (max-width: 1220px) {
    .frontier-algo-workbench {
        grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
    }

    .frontier-algo-notes {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr) minmax(230px, 0.8fr);
        align-items: start;
    }

    .frontier-algo-notes .vision-panel-heading {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    body.vision-language-page-shell .frontier-algo {
        padding-left: 0;
    }

    body.vision-language-page-shell .frontier-algo-hero {
        padding-top: 58px;
    }

    body.home-page-shell:has(.frontier-algo) .frontier-algo {
        padding-left: 0;
    }

    body.home-page-shell:has(.frontier-algo) .site-nav {
        justify-content: space-between;
        gap: 8px;
        overflow-x: hidden;
        scrollbar-width: none;
    }

    body.home-page-shell:has(.frontier-algo) .site-nav a {
        flex: 0 1 auto;
        min-width: auto;
        font-size: 13px;
        white-space: nowrap;
    }

    body.home-page-shell:has(.frontier-algo) .frontier-algo-hero {
        padding-top: 58px;
    }

    .frontier-algo-tabs.station-tabs.station-tabs {
        flex-wrap: wrap;
        overflow: visible;
        gap: 6px;
    }

    .frontier-algo-tabs.station-tabs.station-tabs :is(a, button, span) {
        flex: 0 1 auto;
        min-height: 32px;
        padding-inline: 11px;
        white-space: nowrap;
    }

    .frontier-algo-workbench {
        grid-template-columns: 1fr;
    }

    .frontier-algo-controls {
        order: 1;
    }

    .frontier-algo-stage {
        order: 2;
        min-height: 0;
    }

    .frontier-algo-notes {
        order: 3;
        grid-column: auto;
        display: flex;
    }

    .frontier-stage-canvas {
        min-height: 0;
        padding: 10px;
    }

    .model-arch-flow,
    .model-arch-lane {
        grid-template-columns: 1fr;
    }

    .model-arch-node {
        min-height: 0;
    }

    .model-arch-node:not(:last-child)::after {
        top: auto;
        right: auto;
        bottom: -8px;
        left: 22px;
        width: 0;
        height: 8px;
        border-top: 0;
        border-left: 2px solid #bfdbfe;
    }

    .model-arch-node:not(:last-child)::before {
        top: auto;
        right: auto;
        bottom: -12px;
        left: 18px;
        border: 4px solid transparent;
        border-top-color: #bfdbfe;
    }

    .frontier-pipeline,
    .frontier-algo-stepper {
        grid-template-columns: 1fr;
    }

    .frontier-bottom-player {
        grid-template-columns: 1fr;
    }

    .frontier-bottom-player-actions {
        justify-content: stretch;
    }

    .frontier-bottom-player-actions button {
        flex: 1 1 96px;
    }

    .frontier-next-panel,
    .frontier-next-actions {
        display: grid;
        justify-items: start;
    }
}

@media (max-width: 560px) {
    body.vision-language-page-shell .frontier-algo-hero {
        padding-top: 68px;
    }

    body.home-page-shell:has(.frontier-algo) .frontier-algo-hero {
        padding-top: 68px;
    }

    body.vision-language-page-shell .station-badge,
    body.home-page-shell:has(.frontier-algo) .frontier-algo-state,
    body.home-page-shell:has(.frontier-algo) .station-badge {
        max-width: 100%;
        justify-self: stretch;
        text-align: center;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    body.home-page-shell:has(.frontier-algo) .site-nav {
        gap: 6px;
    }

    body.home-page-shell:has(.frontier-algo) .site-nav a {
        font-size: 12px;
    }

    .frontier-algo-tabs.station-tabs.station-tabs :is(a, button, span) {
        font-size: 12px;
        padding-inline: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .frontier-algo *,
    .frontier-algo *::before,
    .frontier-algo *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
