@font-face {
    font-family: 'Recoleta';
    src: url('./fonts/recoleta-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta';
    src: url('./fonts/recoleta-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ── diff. website-aligned design tokens ─────────────────── */
:root {
    --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, monospace;
    --font-display: 'Recoleta', 'Newsreader', Georgia, serif;

    --radius: 0.375rem;

    --background: 45 26% 94%;
    --foreground: 0 0% 13%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 13%;
    --popover: 42 31% 98%;
    --popover-foreground: 0 0% 13%;
    --primary: 0 0% 13%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 97%;
    --secondary-foreground: 0 0% 13%;
    --muted: 42 18% 89%;
    --muted-foreground: 35 8% 40%;
    --accent: 14 86% 57%;
    --accent-foreground: 0 0% 13%;
    --destructive: 0 72% 46%;
    --destructive-foreground: 45 26% 94%;
    --border: 40 14% 79%;
    --input: 40 14% 79%;
    --ring: 14 86% 57%;
    --shadow-offset: 3px 3px 0 0 hsl(var(--accent));
}

/* ── reset ───────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

/* ── layout ──────────────────────────────────────────────── */
.site-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.045;
    pointer-events: none;
    background-image:
        linear-gradient(to right, currentColor 1px, transparent 1px),
        linear-gradient(to bottom, currentColor 1px, transparent 1px);
    background-size: 60px 60px;
}

.app-shell {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.tool-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.35rem 0 0.65rem;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 0.75rem;
}

.terminal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid hsl(var(--primary));
    background: hsl(var(--secondary));
    color: hsl(var(--primary));
}

.tool-title-block {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.badge-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    gap: 0.25rem;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 1.5rem;
    padding: 0.125rem 0.5rem;
    margin-bottom: 0;
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--primary));
    box-shadow: 3px 3px 0 0 hsl(var(--primary));
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}

.tool-title-block h1 {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.brand {
    font-family: var(--font-mono);
    font-weight: 700;
}

.tool-title-block p {
    display: none;
}

.info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--muted-foreground));
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.info-trigger:hover,
.info-trigger:focus-visible,
.info-trigger[aria-expanded="true"] {
    border-color: hsl(var(--primary));
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    outline: none;
}

.info-popover {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    z-index: 20;
    display: none;
    width: min(24rem, calc(100vw - 2rem));
    padding: 0.75rem 0.85rem;
    border: 1px solid hsl(var(--primary));
    background: hsl(var(--card));
    box-shadow: var(--shadow-offset);
    color: hsl(var(--foreground));
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.55;
}

.info-popover.open {
    display: block;
}

.tool-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    padding-top: 0.35rem;
}

.status-led {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.4rem;
    border-radius: 999px;
    background: hsl(142 71% 39%);
}

.container {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.provider-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid hsl(266 90% 54%);
    background:
        linear-gradient(135deg, hsl(266 90% 54% / 0.16), hsl(266 72% 42% / 0.08) 52%, hsl(var(--card)) 100%);
    box-shadow: 4px 4px 0 0 hsl(266 90% 54%);
}

.provider-copy {
    min-width: 0;
}

.provider-copy span {
    display: block;
    margin-bottom: 0.25rem;
    color: hsl(266 90% 42%);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.provider-copy h2 {
    margin: 0;
    color: hsl(var(--foreground));
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.25;
}

.provider-copy p {
    margin: 0.24rem 0 0;
    max-width: 38rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.82rem;
    line-height: 1.45;
}

.provider-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.2rem;
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    border: 1px solid hsl(266 90% 54%);
    background: hsl(266 90% 54%);
    color: white;
    box-shadow: 3px 3px 0 0 hsl(var(--primary));
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
}

.provider-link:hover {
    background: hsl(266 84% 47%);
    transform: translateY(-1px);
}

.provider-link:active {
    box-shadow: 2px 2px 0 0 hsl(var(--primary));
    transform: translate(1px, 1px);
}

.section {
    margin-bottom: 0;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    padding: 1rem;
    overflow: hidden;
    transition:
        padding 280ms ease,
        transform 280ms ease,
        opacity 280ms ease,
        box-shadow 280ms ease,
        border-color 280ms ease;
}

.compact-summary {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
}

.compact-summary > div {
    min-width: 0;
}

.compact-kicker {
    display: block;
    margin-bottom: 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
}

.compact-summary strong {
    display: block;
    overflow: hidden;
    color: hsl(var(--foreground));
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-edit {
    flex-shrink: 0;
    height: 1.65rem;
    padding: 0 0.5rem;
    border: 1px solid hsl(var(--primary));
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.compact-edit:hover {
    background: hsl(var(--accent));
}

/* ── labels ──────────────────────────────────────────────── */
.field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    line-height: 1;
    margin-bottom: 0.5rem;
}

.field-label.sub-label {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.375rem;
}

/* ── inputs ──────────────────────────────────────────────── */
input[type=text],
input[type=url] {
    display: flex;
    width: 100%;
    height: 2.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: hsl(var(--foreground));
    background: transparent;
    border: 1px solid hsl(var(--input));
    border-radius: calc(var(--radius) - 2px);
    outline: none;
    transition: box-shadow 0.15s, border-color 0.15s;
    line-height: 1.5;
}

input[type=text]:focus-visible,
input[type=url]:focus-visible {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.12);
}

input[type=text]::placeholder,
input[type=url]::placeholder {
    color: hsl(var(--muted-foreground));
}

/* ── GPU chips ───────────────────────────────────────────── */
.gpu-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0.625rem;
}

.gpu-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    font-weight: 450;
    color: hsl(var(--foreground));
    background: transparent;
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    user-select: none;
}

.gpu-chip:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--accent-foreground) / 0.2);
}

.gpu-chip.selected {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    border-color: hsl(var(--foreground));
}

.more-chip {
    background: transparent;
    border-style: dashed;
    color: hsl(var(--muted-foreground));
}

.model-tabs {
    display: inline-flex;
    align-items: center;
    background: hsl(var(--secondary));
    padding: 2px;
    border-radius: var(--radius);
}

.model-tab {
    background: transparent;
    border: none;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    padding: 0.375rem 0.75rem;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: all 0.15s;
}

.model-tab:hover {
    color: hsl(var(--foreground));
}

.model-tab.active {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.gpu-chip .chip-vram {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    font-weight: 400;
}

.gpu-chip.selected .chip-vram {
    color: hsl(var(--muted-foreground));
    opacity: 0.6;
}

.org-logo {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    border-radius: 2px;
    display: inline-block;
    vertical-align: text-bottom;
}

/* ── GPU search trigger ──────────────────────────────────── */
.gpu-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: 1px dashed hsl(var(--border));
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.gpu-search-trigger:hover {
    color: hsl(var(--foreground));
    border-color: hsl(var(--muted-foreground));
    background: hsl(var(--accent) / 0.5);
}

.kbd-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.25rem;
    padding: 0 0.375rem;
    font-size: 0.625rem;
    font-family: var(--font-sans);
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: 4px;
    line-height: 1;
    pointer-events: none;
}

/* ── GPU selected info ───────────────────────────────────── */
.gpu-selected-info {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.gpu-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gpu-selected-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.gpu-selected-specs {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}

.gpu-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.gpu-clear-btn:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--accent));
    border-color: hsl(var(--accent-foreground) / 0.2);
}

/* ── GPU count row + stepper ─────────────────────────────── */
.gpu-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    overflow: hidden;
}

.stepper-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.1s;
}

.stepper-btn:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--accent));
}

.stepper-btn:active {
    background: hsl(var(--accent));
}

.stepper-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-mono);
    color: hsl(var(--foreground));
    border-left: 1px solid hsl(var(--border));
    border-right: 1px solid hsl(var(--border));
    user-select: none;
}

/* ── GPU auto-populated specs ────────────────────────────── */
.gpu-specs-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.spec-pill {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    background: hsl(var(--secondary) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
}

.spec-primary {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.spec-total {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.spec-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.spec-value {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: hsl(var(--foreground));
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.spec-unit {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
}

.spec-secondary {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.3;
    padding-top: 0.125rem;
    border-top: 1px solid hsl(var(--border) / 0.5);
}

.gpu-specs-note {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.375rem;
    opacity: 0.7;
}

/* ── Inference Settings compact panel ──────────────────────── */
.settings-panel {
    display: flex;
    align-items: center;
    background: hsl(var(--secondary) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: calc(var(--radius) - 2px);
    padding: 0.75rem 1.25rem;
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.setting-divider {
    width: 1px;
    height: 2.25rem;
    background: hsl(var(--border) / 0.5);
}

.si-label {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.si-hint {
    opacity: 0.6;
    font-weight: 400;
}

.si-value-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.75rem;
}

.si-text {
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: hsl(var(--foreground));
    font-weight: 500;
}

.si-override {
    background: transparent;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.si-override:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--accent));
}

.si-input {
    width: 5rem;
    height: 1.875rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 4px);
    padding: 0 0.5rem;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: hsl(var(--foreground));
}

/* Compact Inline Toggle */
.inline-toggle {
    display: inline-flex;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    padding: 2px;
}

.it-btn {
    background: transparent;
    border: none;
    color: hsl(var(--muted-foreground));
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) - 4px);
    cursor: pointer;
    transition: all 0.15s;
}
.it-btn:hover {
    color: hsl(var(--foreground));
}
.it-btn.active {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
}

/* Compact Slider */
.slider-wrap {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.25rem;
}
.slider-wrap input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    margin: 0;
    background: transparent;
}
.slider-wrap input[type=range]:focus {
    outline: none;
}
.slider-wrap input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: hsl(var(--border));
    border-radius: 2px;
}
.slider-wrap input[type=range]::-webkit-slider-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: hsl(var(--foreground));
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    margin-top: -4px;
    box-shadow: 0 0 0 2px hsl(var(--background));
}
.slider-marks {
    display: block;
    position: relative;
    height: 12px;
    margin-top: 4px;
    margin-left: 6px;
    margin-right: 6px;
}
.slider-marks span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.625rem;
    color: hsl(var(--muted-foreground));
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ── Button ──────────────────────────────────────────────── */
.btn-run {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    line-height: 1.25;
    cursor: pointer;
    border-radius: calc(var(--radius) - 2px);
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    transition: background 0.15s;
    white-space: nowrap;
    user-select: none;
}

.btn-run:hover {
    background: hsl(var(--primary) / 0.9);
}

.btn-run:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.btn-run:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* ── separator ───────────────────────────────────────────── */
.sep {
    border: none;
    border-top: 1px solid hsl(var(--border));
    margin: 1.5rem 0;
}

/* ── metric cards ────────────────────────────────────────── */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.metric {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.metric.active {
    border-color: hsl(var(--primary) / 0.5);
    background: hsl(var(--primary) / 0.05);
    box-shadow: 0 0 0 1px hsl(var(--primary) / 0.5);
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.25rem;
}

.metric .val {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-top: 0.125rem;
    font-family: var(--font-mono);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.metric .unit {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}

/* ── Metric action btn & Eq Drawer ────────────────────────────────── */
.metric-action-btn {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    transition: color 0.15s;
    padding: 0;
}
.metric-action-btn:hover, .metric.active .metric-action-btn {
    color: hsl(var(--primary));
}
.eq-drawer {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--primary) / 0.2);
    border-left: 3px solid hsl(var(--primary));
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: none;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    animation: fadeIn 0.15s ease-out;
}
.eq-drawer.open {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.eq-title {
    font-size: 0.6875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}
.eq-math {
    font-size: 1.125rem;
    color: hsl(var(--foreground));
    padding: 0;
    overflow-x: auto;
}
.eq-desc {
    font-size: 0.75rem;
    line-height: 1.4;
}
.katex .math-hover {
    cursor: crosshair;
    transition: color 0.2s;
    pointer-events: auto !important;
    position: relative;
}
.katex .math-hover::after {
    content: '';
    position: absolute;
    top: -0.4em;
    bottom: -0.4em;
    left: -0.4em;
    right: -0.4em;
    z-index: 1;
}
.katex .math-hover:hover {
    color: hsl(var(--primary)) !important;
}
.ui-glow {
    box-shadow: 0 0 0 2px hsl(var(--primary)), 0 0 12px hsl(var(--primary) / 0.3) !important;
    border-color: hsl(var(--primary)) !important;
    transition: all 0.2s ease !important;
    z-index: 10;
    background: hsl(var(--accent)) !important;
    position: relative;
    border-radius: calc(var(--radius) - 2px);
}

/* ── output area ─────────────────────────────────────────── */
.output-box {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    min-height: 120px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: hsl(var(--foreground));
    line-height: 1.8;
    position: relative;
    overflow: hidden;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: hsl(var(--foreground));
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 1px;
}

.model-output-row {
    margin-bottom: 0.875rem;
    line-height: 1.6;
}
.model-output-row:last-child {
    margin-bottom: 0;
}
.model-label {
    display: inline-flex;
    align-items: center;
    padding: 0 0.375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    color: hsl(var(--background));
    vertical-align: middle;
}

.model-text {
    color: hsl(var(--foreground));
}

.prefill-stage {
    margin-bottom: 0.9rem;
    padding: 0.5rem 0.65rem;
    border-left: 3px solid hsl(var(--accent));
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
}

.prefill-stage.complete {
    color: hsl(var(--muted-foreground));
    border-left-color: hsl(142 71% 39%);
}

.metric-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 0.25rem;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
    padding-bottom: 0.25rem;
}
.metric-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.metric-row-label {
    font-size: 0.6875rem;
    font-weight: 500;
}
.metric-row-val {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

/* ── result guidance ─────────────────────────────────────── */
.insight-panel {
    display: none;
    margin: -0.5rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid hsl(var(--primary));
    background: hsl(var(--card));
    box-shadow: var(--shadow-offset);
}

.insight-panel.ready {
    display: block;
}

.insight-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.insight-kicker,
.insight-item span {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.insight-head h2 {
    margin: 0.18rem 0 0;
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.25;
    color: hsl(var(--foreground));
}

.insight-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.6rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid hsl(var(--primary));
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
    box-shadow: 3px 3px 0 0 hsl(var(--primary));
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.insight-badge.good {
    background: hsl(142 55% 37%);
    color: hsl(var(--background));
}

.insight-badge.warn {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
}

.insight-badge.risk {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.insight-summary {
    margin: 0 0 0.85rem;
    max-width: 58rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.86rem;
    line-height: 1.55;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.insight-item {
    padding: 0.7rem 0.75rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--secondary) / 0.45);
}

.insight-item p {
    margin: 0.32rem 0 0;
    color: hsl(var(--foreground));
    font-size: 0.78rem;
    line-height: 1.45;
}

.insight-actions {
    display: none;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.95rem;
}

.insight-panel.ready .insight-actions {
    display: flex;
}

.insight-primary,
.insight-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid hsl(var(--primary));
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.insight-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: var(--shadow-offset);
}

.insight-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--foreground));
}

.insight-primary:hover,
.insight-secondary:hover {
    transform: translateY(-1px);
}

.insight-secondary:hover {
    background: hsl(var(--accent));
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ── status bar ──────────────────────────────────────────── */
.status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--muted));
}

.dot.active {
    background: hsl(142 76% 36%);
}

.dot.loading {
    background: hsl(38 92% 50%);
    animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

/* ── model info ──────────────────────────────────────────── *//* ── model URL manual input ──────────────────────────────── */
.model-url-row {
    margin-top: 0.75rem;
}

.model-info {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.5rem;
    display: none;
}

.model-info .mname {
    font-weight: 500;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}

/* ── progress bar ────────────────────────────────────────── */
.progress-bar {
    height: 4px;
    background: hsl(var(--secondary));
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: hsl(var(--foreground));
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 9999px;
}

/* ── warnings ────────────────────────────────────────────── */
.warn {
    font-size: 0.8125rem;
    color: hsl(38 92% 50%);
    margin-top: 0.25rem;
}


/* ════════════════════════════════════════════════════════════
   COMMAND PALETTE (Spotlight / Alfred style)
   ════════════════════════════════════════════════════════════ */

.cmd-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    background: hsl(0 0% 0% / 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.cmd-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cmd-palette {
    width: 100%;
    max-width: 540px;
    background: hsl(var(--popover));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow:
        0 0 0 1px hsl(var(--border)),
        0 16px 70px hsl(0 0% 0% / 0.5);
    overflow: hidden;
    transform: scale(0.96) translateY(-8px);
    transition: transform 0.15s ease;
}

.cmd-overlay.open .cmd-palette {
    transform: scale(1) translateY(0);
}

.cmd-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
}

.cmd-search-icon {
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}

.cmd-input {
    flex: 1;
    height: 1.75rem;
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    color: hsl(var(--foreground));
    background: transparent;
    border: none;
    outline: none;
    line-height: 1.5;
}

.cmd-input::placeholder {
    color: hsl(var(--muted-foreground));
}

.kbd-esc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.25rem;
    padding: 0 0.375rem;
    font-size: 0.625rem;
    font-family: var(--font-sans);
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
}

.cmd-separator {
    height: 1px;
    background: hsl(var(--border));
}

.cmd-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.375rem;
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--muted)) transparent;
}

.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: calc(var(--radius) - 4px);
    cursor: pointer;
    transition: background 0.08s;
}

.cmd-item:hover,
.cmd-item.highlighted {
    background: hsl(var(--accent));
}

.cmd-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cmd-item-meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    flex-shrink: 0;
}

.cmd-empty {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}

.cmd-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid hsl(var(--border));
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground));
}

.cmd-footer kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.125rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    font-family: var(--font-sans);
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: 3px;
    line-height: 1;
    margin-right: 0.25rem;
}
/* ── Concurrent Runs ────────────────────────────── */
.concurrent-run {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.run-header {
  font-size: 0.8125rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.run-metrics {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}

.run-progress-bar {
  height: 2px;
  background: hsl(var(--muted));
  width: 100%;
  margin-bottom: 0.25rem;
  overflow: hidden;
}

.run-progress-fill {
  height: 100%;
  width: 0%;
}

.run-output-box {
  background: hsl(var(--muted) / 0.3);
  border: 1px solid hsl(var(--border) / 0.5);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  font-family: var(--font-mono);
  min-height: 80px;
}

/* diff. style overrides */
.field-label,
.metric-label,
.spec-label,
.eq-title,
.si-label {
    font-family: var(--font-mono);
    letter-spacing: 0;
    text-transform: uppercase;
}

.field-label {
    font-size: 0.76rem;
    font-weight: 700;
}

.field-label::before {
    content: "// ";
    color: hsl(var(--accent));
}

.field-label.sub-label::before {
    content: "";
}

input[type=text],
input[type=url],
.si-input,
.cmd-input {
    border-radius: 0;
    font-family: var(--font-mono);
}

input[type=text],
input[type=url],
.si-input {
    background: hsl(var(--background));
    border-color: hsl(var(--border));
}

input[type=text]:focus-visible,
input[type=url]:focus-visible,
.si-input:focus-visible {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--accent) / 0.22);
}

.gpu-chips {
    gap: 0.5rem;
}

.gpu-chip,
.gpu-search-trigger,
.model-tab,
.gpu-clear-btn,
.stepper,
.inline-toggle,
.it-btn,
.metric,
.spec-pill,
.settings-panel,
.gpu-selected-info,
.output-box,
.eq-drawer,
.cmd-palette,
.run-output-box {
    border-radius: 0;
}

.gpu-chip {
    height: 2.15rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
}

.gpu-chip:hover {
    background: hsl(var(--secondary));
    border-color: hsl(var(--foreground));
}

.gpu-chip.selected {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-offset);
}

.gpu-chip.selected .chip-vram {
    color: hsl(var(--primary-foreground));
    opacity: 0.72;
}

.model-tabs {
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: 0;
}

.model-tab {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0;
}

.model-tab.active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    box-shadow: none;
}

.gpu-search-trigger {
    height: 2.15rem;
    border-style: solid;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: hsl(var(--muted-foreground));
}

.gpu-search-trigger:hover,
.gpu-clear-btn:hover,
.stepper-btn:hover,
.si-override:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    border-color: hsl(var(--primary));
}

.kbd-hint,
.kbd-esc,
.cmd-footer kbd {
    border-radius: 0;
    font-family: var(--font-mono);
    background: hsl(var(--background));
}

.gpu-selected-info,
.settings-panel,
.output-box,
.eq-drawer {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
}

.gpu-selected-info {
    border-left: 4px solid hsl(var(--accent));
}

.gpu-count-row {
    padding-top: 0.75rem;
    border-top: 1px solid hsl(var(--border));
}

.stepper {
    background: hsl(var(--background));
}

.stepper-value,
.spec-value,
.metric .val,
.metric-row-val,
.si-text {
    font-family: var(--font-mono);
    letter-spacing: 0;
}

.stepper-btn,
.gpu-clear-btn,
.si-override {
    color: hsl(var(--foreground));
}

.gpu-specs-row {
    gap: 0;
    border: 1px solid hsl(var(--border));
}

.spec-pill {
    border: 0;
    border-right: 1px solid hsl(var(--border));
    background: hsl(var(--background));
}

.spec-pill:last-child {
    border-right: 0;
}

.settings-panel {
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
}

.setting-divider {
    background: hsl(var(--border));
}

.inline-toggle {
    background: hsl(var(--background));
}

.it-btn.active {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.slider-wrap input[type=range]::-webkit-slider-runnable-track {
    background: hsl(var(--border));
}

.slider-wrap input[type=range]::-webkit-slider-thumb {
    border-radius: 0;
    background: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--background));
}

.btn-run {
    height: 2.75rem;
    border-radius: 0;
    border: 1px solid hsl(var(--primary));
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--shadow-offset);
}

.btn-run:hover {
    background: hsl(var(--primary));
    box-shadow: 0 0 0 0 hsl(var(--accent));
    transform: translate(3px, 3px);
}

.btn-run:disabled {
    transform: none;
    box-shadow: none;
}

.sep {
    border-top-color: hsl(var(--border));
    margin: 0.75rem 0 0;
}

.metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 0.5rem;
    border: 1px solid hsl(var(--border));
}

.metric {
    min-height: 9rem;
    background: hsl(var(--card));
    border: 0;
    border-right: 1px solid hsl(var(--border));
}

.metric:last-child {
    border-right: 0;
}

.metric.active {
    border-color: hsl(var(--border));
    background: hsl(var(--secondary));
    box-shadow: inset 0 3px 0 0 hsl(var(--accent));
}

.metric-label {
    color: hsl(var(--muted-foreground));
}

.metric .val {
    font-size: 1.45rem;
}

.metric-action-btn {
    font-family: var(--font-mono);
    letter-spacing: 0;
    color: hsl(var(--muted-foreground));
}

.metric-action-btn:hover,
.metric.active .metric-action-btn {
    color: hsl(var(--accent));
}

.metric-row {
    gap: 0.5rem;
    border-bottom-color: hsl(var(--border));
}

.metric-row-label,
.metric-row-val {
    min-width: 0;
}

.eq-drawer {
    border-left: 4px solid hsl(var(--accent));
}

.katex .math-hover:hover {
    color: hsl(var(--accent)) !important;
}

.ui-glow {
    box-shadow: 0 0 0 2px hsl(var(--primary)), var(--shadow-offset) !important;
    border-color: hsl(var(--primary)) !important;
    background: hsl(var(--secondary)) !important;
}

.progress-bar {
    height: 6px;
    background: hsl(var(--secondary));
    border: 1px solid hsl(var(--border));
    border-radius: 0;
    margin-top: 0;
}

.progress-fill {
    background: hsl(var(--accent));
    border-radius: 0;
}

.output-box {
    border-top: 0;
    min-height: 11rem;
    transition:
        min-height 320ms ease,
        box-shadow 320ms ease,
        border-color 320ms ease,
        transform 320ms ease;
}

.model-label {
    border-radius: 0;
    font-family: var(--font-mono);
}

.cursor {
    border-radius: 0;
}

.dot.active {
    background: hsl(142 71% 39%);
}

.dot.loading {
    background: hsl(var(--accent));
}

.cmd-overlay {
    background: hsl(var(--foreground) / 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.cmd-palette {
    border-color: hsl(var(--primary));
    box-shadow: 8px 8px 0 0 hsl(var(--accent));
}

.cmd-item {
    border-radius: 0;
}

.cmd-item:hover,
.cmd-item.highlighted {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.cmd-item:hover .cmd-item-name,
.cmd-item.highlighted .cmd-item-name,
.cmd-item:hover .cmd-item-meta,
.cmd-item.highlighted .cmd-item-meta {
    color: hsl(var(--accent-foreground));
}

.cmd-footer {
    font-family: var(--font-mono);
}

.run-output-box {
    background: hsl(var(--background));
}

.is-simulating .section {
    padding: 0.55rem 0.65rem;
    opacity: 1;
    transform: translateY(0);
    background:
        linear-gradient(90deg, hsl(var(--accent) / 0.08), transparent 42%),
        hsl(var(--card));
}

.is-simulating .compact-summary {
    display: flex;
}

.is-simulating .section > :not(.compact-summary) {
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition:
        max-height 240ms ease,
        opacity 160ms ease,
        margin 240ms ease,
        padding 240ms ease;
}

.is-simulating .field-label {
    margin-bottom: 0.4rem;
}

.is-simulating .gpu-chips {
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.is-simulating .gpu-chip {
    height: 1.8rem;
    padding-inline: 0.55rem;
    font-size: 0.7rem;
}

.is-simulating .gpu-search-trigger {
    height: 1.85rem;
    font-size: 0.7rem;
}

.is-simulating .gpu-selected-info,
.is-simulating .gpu-count-row,
.is-simulating .gpu-specs-row,
.is-simulating .settings-panel {
    margin-top: 0.5rem;
}

.is-simulating .settings-panel {
    padding: 0.7rem;
    gap: 0.75rem;
}

.is-simulating .spec-pill {
    padding: 0.5rem 0.65rem;
}

.is-simulating .spec-value {
    font-size: 1rem;
}

.is-simulating .btn-run {
    display: none;
}

.is-simulating .sep {
    opacity: 0;
    margin: 0;
}

.is-simulating .metrics {
    box-shadow: var(--shadow-offset);
    transform: translateY(2px);
}

.is-simulating .output-heading {
    padding-top: 0.25rem;
}

.is-simulating .output-box {
    min-height: 23rem;
    border: 1px solid hsl(var(--primary));
    box-shadow: var(--shadow-offset);
    transform: translateY(2px);
}

.is-simulating .progress-bar {
    border-color: hsl(var(--primary));
}

.is-simulating .status-bar {
    color: hsl(var(--foreground));
}

@media (min-width: 880px) {
    .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .section:nth-of-type(3),
    .provider-cta,
    .btn-run,
    .sep,
    .eq-drawer,
    .metrics,
    .insight-panel,
    .output-heading,
    .progress-bar,
    .output-box,
    .status-bar {
        grid-column: 1 / -1;
    }

    .is-simulating .container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .is-simulating .section:nth-of-type(3) {
        grid-column: auto;
    }

    .is-simulating .section {
        min-height: 0;
    }

    .is-simulating .settings-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

    .is-simulating .setting-divider {
        width: 100%;
        height: 1px;
    }

    .is-simulating .gpu-specs-row {
        grid-template-columns: 1fr;
    }

    .is-simulating .spec-pill {
        border-right: 0;
        border-bottom: 1px solid hsl(var(--border));
    }

    .is-simulating .spec-pill:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 760px) {
    .app-shell {
        padding: 0.75rem 0.75rem 2rem;
    }

    .tool-header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tool-status {
        grid-column: 1 / -1;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        padding-top: 0;
    }

    .tool-title-block {
        flex-wrap: wrap;
        gap: 0.55rem;
    }

    .tool-title-block h1 {
        font-size: 0.78rem;
    }

    .provider-cta {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.85rem;
    }

    .provider-link {
        width: 100%;
    }

    .settings-panel,
    .gpu-specs-row,
    .metrics,
    .insight-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .insight-panel {
        margin-top: 0;
        padding: 0.85rem;
    }

    .insight-head,
    .insight-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .insight-primary,
    .insight-secondary {
        width: 100%;
    }

    .setting-divider {
        width: 100%;
        height: 1px;
    }

    .spec-pill,
    .metric {
        border-right: 0;
        border-bottom: 1px solid hsl(var(--border));
    }

    .spec-pill:last-child,
    .metric:last-child {
        border-bottom: 0;
    }

    .model-tabs {
        flex-shrink: 0;
    }

    .model-tab {
        padding-inline: 0.45rem;
        font-size: 0.68rem;
    }

    .cmd-overlay {
        padding: 1rem;
        padding-top: 10vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section,
    .output-box,
    .is-simulating .section,
    .is-simulating .metrics,
    .is-simulating .output-box {
        transition: none;
        transform: none;
    }
}
