/* ===========================================================
   parallengine.com — Engine schematic, bento, merge, buffer
   Palette:
     #ffffff  Engine White
     #0a1628  Core Dark
     #0066ff  Thread Blue   (T1)
     #00cc88  Thread Green  (T2)
     #ff6633  Thread Orange (T3)
     #9933ff  Thread Purple (T4)
     #f5f5f5  Panel Light
     #e0e0e0  Grid Line
   Fonts: Space Grotesk, IBM Plex Sans, IBM Plex Mono
   =========================================================== */

:root {
    --c-bg: #ffffff;
    --c-ink: #0a1628;
    --c-panel: #f5f5f5;
    --c-line: #e0e0e0;
    --c-t1: #0066ff;
    --c-t2: #00cc88;
    --c-t3: #ff6633;
    --c-t4: #9933ff;

    --f-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --f-body: "IBM Plex Sans", "Inter", system-ui, sans-serif;
    --f-mono: "IBM Plex Mono", "Space Mono", ui-monospace, monospace;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --gap: 16px;
    --gap-lg: 24px;

    --shadow-soft: 0 1px 0 rgba(10, 22, 40, 0.04), 0 12px 32px -18px rgba(10, 22, 40, 0.18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--c-bg);
    color: var(--c-ink);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background:
        linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(10, 22, 40, 0.05) 100%) 0 0 / 100% 32px,
        linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(10, 22, 40, 0.04) 100%) 0 0 / 32px 100%,
        var(--c-bg);
    min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--f-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--c-ink);
}

em {
    font-style: normal;
    color: var(--c-ink);
    font-family: var(--f-mono);
    background: rgba(10, 22, 40, 0.05);
    padding: 0 4px;
    border-radius: 3px;
}

/* ============== TOPBAR ============== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(150%) blur(8px);
    -webkit-backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--c-line);
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    grid-template-columns: 8px 8px;
    grid-template-rows: 8px 8px;
    gap: 2px;
    width: 18px;
    height: 18px;
}

.brand-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: block;
}

.brand-dot--t1 { background: var(--c-t1); }
.brand-dot--t2 { background: var(--c-t2); }
.brand-dot--t3 { background: var(--c-t3); }
.brand-dot--t4 { background: var(--c-t4); }

.brand-name {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.brand-tld {
    color: var(--c-t1);
    font-weight: 500;
}

.topnav {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.topnav-link {
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: rgba(10, 22, 40, 0.65);
    text-transform: lowercase;
    letter-spacing: 0.04em;
    transition: color 180ms ease;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
}

.topnav-link:hover {
    color: var(--c-ink);
    border-bottom-color: var(--c-t1);
}

.topstatus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    color: rgba(10, 22, 40, 0.7);
    letter-spacing: 0.06em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-t2);
    box-shadow: 0 0 0 0 rgba(0, 204, 136, 0.5);
    animation: status-pulse 2.4s ease-out infinite;
}

@keyframes status-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 204, 136, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(0, 204, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 204, 136, 0); }
}

/* ============== SHARED SECTION ============== */
main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px 48px;
}

section {
    padding: 72px 0;
    border-bottom: 1px solid var(--c-line);
}

section:last-child { border-bottom: none; }

.section-header {
    max-width: 720px;
    margin-bottom: 40px;
}

.section-header--tight { margin-bottom: 24px; }

.section-kicker {
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: var(--c-t1);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    text-transform: lowercase;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 600;
    margin-bottom: 14px;
}

.section-lede {
    font-size: 1.0rem;
    line-height: 1.7;
    color: rgba(10, 22, 40, 0.72);
    max-width: 60ch;
}

/* ============== ENGINE / HERO ============== */
.engine {
    padding-top: 56px;
    padding-bottom: 88px;
}

.engine-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: rgba(10, 22, 40, 0.6);
    margin-bottom: 28px;
    text-transform: uppercase;
}

.meta-tag {
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.meta-divider { opacity: 0.4; }

.engine-diagram {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--gap);
    min-height: 560px;
    background:
        repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(10, 22, 40, 0.04) 31px, rgba(10, 22, 40, 0.04) 32px),
        repeating-linear-gradient(90deg, transparent 0, transparent 31px, rgba(10, 22, 40, 0.04) 31px, rgba(10, 22, 40, 0.04) 32px),
        #ffffff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.engine-cross {
    position: absolute;
    inset: 24px;
    pointer-events: none;
    opacity: 0.35;
}

.cross-line {
    position: absolute;
    background: linear-gradient(90deg, transparent 0%, var(--c-line) 20%, var(--c-line) 80%, transparent 100%);
}

.cross-line--h {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
}

.cross-line--v {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--c-line) 20%, var(--c-line) 80%, transparent 100%);
}

.engine-cell {
    position: relative;
    background: var(--c-panel);
    border-radius: var(--radius-md);
    padding: 24px 24px 22px;
    overflow: hidden;
    border-left: 3px solid var(--thread-color);
    transition: transform 240ms ease, box-shadow 240ms ease;
    opacity: 0;
    transform: translateY(8px);
    animation: cell-enter 600ms cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
}

.engine-cell--t1 { animation-delay: 0.05s; }
.engine-cell--t2 { animation-delay: 0.15s; }
.engine-cell--t3 { animation-delay: 0.25s; }
.engine-cell--t4 { animation-delay: 0.35s; }

@keyframes cell-enter {
    to { opacity: 1; transform: translateY(0); }
}

.engine-cell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.cell-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--thread-color);
    animation: progress var(--duration, 2s) ease-out forwards;
    animation-delay: inherit;
}

@keyframes progress {
    from { width: 0; }
    to   { width: 100%; }
}

.cell-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--thread-color);
    color: #ffffff;
    font-family: var(--f-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    line-height: 1.4;
}

.engine-cell__label, .cell-label {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    color: rgba(10, 22, 40, 0.55);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.engine-cell__title, .cell-title {
    font-family: var(--f-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--c-ink);
}

.engine-cell__body, .cell-body {
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(10, 22, 40, 0.72);
    margin-bottom: 14px;
}

.engine-cell__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.engine-cell__stats li {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.stat-key {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    color: rgba(10, 22, 40, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-val {
    font-family: var(--f-mono);
    font-size: 0.85rem;
    color: var(--c-ink);
    font-weight: 500;
}

/* Engine core (center) */
.engine-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    max-width: 56%;
    background: #ffffff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 48px -16px rgba(10, 22, 40, 0.18);
    padding: 28px 24px 24px;
    z-index: 5;
    text-align: center;
    animation: core-rise 800ms cubic-bezier(0.2, 0.7, 0.25, 1) 0.45s both;
}

@keyframes core-rise {
    from { opacity: 0; transform: translate(-50%, -42%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.engine-core__inner { position: relative; }

.engine-core__kicker {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--c-t1);
    letter-spacing: 0.18em;
    margin-bottom: 8px;
}

.engine-core__title {
    font-family: var(--f-display);
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.engine-core__tagline {
    font-size: 0.92rem;
    color: rgba(10, 22, 40, 0.68);
    line-height: 1.55;
    margin-bottom: 18px;
}

.engine-core__merge {
    width: 28px;
    height: 28px;
    transform: rotate(45deg);
    margin: 14px auto 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1px;
    background: var(--c-line);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--c-line);
}

.merge-quad { display: block; }
.merge-quad--t1 { background: var(--c-t1); }
.merge-quad--t2 { background: var(--c-t2); }
.merge-quad--t3 { background: var(--c-t3); }
.merge-quad--t4 { background: var(--c-t4); }

.engine-core__hint {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: rgba(10, 22, 40, 0.5);
    letter-spacing: 0.04em;
}

.engine-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 24px;
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: rgba(10, 22, 40, 0.65);
    letter-spacing: 0.04em;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* ============== BENTO PROCESS GRID ============== */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: var(--gap);
}

.cell {
    position: relative;
    background: var(--c-panel);
    border-radius: var(--radius-md);
    padding: 24px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
    grid-column: span 1;
    grid-row: span 1;
    opacity: 0;
    transform: translateY(12px);
    display: flex;
    flex-direction: column;
}

.cell.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 480ms ease var(--delay, 0s), transform 480ms ease var(--delay, 0s);
}

.cell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: var(--c-line);
}

.cell--wide { grid-column: span 2; }
.cell--tall { grid-row: span 2; }
.cell--square { grid-column: span 1; grid-row: span 1; }

.cell-foot {
    margin-top: auto;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: rgba(10, 22, 40, 0.5);
    letter-spacing: 0.04em;
    padding-top: 12px;
}

.cell-meter {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.meter-track {
    flex: 1 1 auto;
    height: 6px;
    background: rgba(10, 22, 40, 0.07);
    border-radius: 999px;
    overflow: hidden;
    display: block;
}

.meter-fill {
    display: block;
    height: 100%;
    background: var(--thread-color);
    border-radius: 999px;
    transform-origin: left center;
    width: 0;
    transition: width 1.2s cubic-bezier(0.2, 0.7, 0.25, 1);
}

.cell.is-visible .meter-fill {
    width: var(--meter-width, 80%);
}

.meter-value {
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: var(--c-ink);
    font-weight: 500;
    min-width: 36px;
    text-align: right;
}

.cell-list {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.cell-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-family: var(--f-mono);
    font-size: 0.78rem;
    border-bottom: 1px dashed rgba(10, 22, 40, 0.1);
    padding-bottom: 4px;
}

.cell-list li:last-child { border-bottom: none; }

.list-key { color: rgba(10, 22, 40, 0.55); letter-spacing: 0.04em; }
.list-val { color: var(--c-ink); }

/* ============== THREAD TELEMETRY ============== */
.thread-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    margin-bottom: 56px;
}

.thread-card {
    position: relative;
    background: var(--c-panel);
    border-radius: var(--radius-md);
    padding: 22px 22px 24px;
    border-top: 3px solid var(--thread-color);
    overflow: hidden;
}

.thread-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.thread-card__badge {
    background: var(--thread-color);
    color: #fff;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.thread-card__name {
    font-family: var(--f-mono);
    font-size: 0.78rem;
    color: rgba(10, 22, 40, 0.7);
    letter-spacing: 0.08em;
}

.thread-card__role {
    font-family: var(--f-display);
    font-size: 1.05rem;
    color: var(--c-ink);
    margin-bottom: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.thread-card__metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 18px;
}

.thread-card__metrics li {
    display: flex;
    justify-content: space-between;
    font-family: var(--f-mono);
    font-size: 0.78rem;
}

.metric-key { color: rgba(10, 22, 40, 0.55); letter-spacing: 0.04em; }
.metric-val { color: var(--c-ink); font-weight: 500; }

.thread-card__bar {
    height: 4px;
    background: rgba(10, 22, 40, 0.07);
    border-radius: 999px;
    overflow: hidden;
}

.thread-card__fill {
    display: block;
    height: 100%;
    background: var(--thread-color);
    border-radius: 999px;
    transform-origin: left center;
    transform: scaleX(0);
    animation: bar-fill 1.6s cubic-bezier(0.2, 0.7, 0.25, 1) 0.2s forwards;
}

@keyframes bar-fill {
    to { transform: scaleX(1); }
}

/* Merge panel */
.merge-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 1.6fr;
    gap: 32px;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.merge-panel__diagram {
    position: relative;
    aspect-ratio: 1 / 1;
    background:
        repeating-linear-gradient(0deg, transparent 0, transparent 23px, rgba(10, 22, 40, 0.05) 23px, rgba(10, 22, 40, 0.05) 24px),
        repeating-linear-gradient(90deg, transparent 0, transparent 23px, rgba(10, 22, 40, 0.05) 23px, rgba(10, 22, 40, 0.05) 24px),
        var(--c-panel);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 240px;
}

.merge-line {
    position: absolute;
    height: 2px;
    background: var(--c-line);
    transform-origin: left center;
}

.merge-line--t1 {
    top: 22%; left: 8%;
    width: 36%;
    background: var(--c-t1);
    transform: rotate(22deg);
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.25);
}
.merge-line--t2 {
    top: 22%; right: 8%;
    width: 36%;
    background: var(--c-t2);
    transform: rotate(-22deg);
    transform-origin: right center;
    box-shadow: 0 0 12px rgba(0, 204, 136, 0.25);
}
.merge-line--t3 {
    bottom: 22%; left: 8%;
    width: 36%;
    background: var(--c-t3);
    transform: rotate(-22deg);
    box-shadow: 0 0 12px rgba(255, 102, 51, 0.25);
}
.merge-line--t4 {
    bottom: 22%; right: 8%;
    width: 36%;
    background: var(--c-t4);
    transform: rotate(22deg);
    transform-origin: right center;
    box-shadow: 0 0 12px rgba(153, 51, 255, 0.25);
}

.merge-diamond {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%) rotate(45deg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--c-line), 0 8px 24px -10px rgba(10, 22, 40, 0.25);
    animation: merge-spin 12s linear infinite;
}

@keyframes merge-spin {
    from { transform: translate(-50%, -50%) rotate(45deg); }
    to   { transform: translate(-50%, -50%) rotate(405deg); }
}

.merge-out {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px dashed rgba(10, 22, 40, 0.25);
    pointer-events: none;
    animation: merge-pulse 2.6s ease-out infinite;
}

@keyframes merge-pulse {
    0%   { width: 60px; height: 60px; opacity: 0.7; }
    100% { width: 140px; height: 140px; opacity: 0; }
}

.merge-panel__title {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    margin-bottom: 12px;
}

.merge-panel__body {
    color: rgba(10, 22, 40, 0.7);
    margin-bottom: 14px;
}

.merge-panel__sig {
    font-family: var(--f-mono);
    font-size: 0.82rem;
    color: var(--c-t1);
    background: rgba(0, 102, 255, 0.06);
    border: 1px solid rgba(0, 102, 255, 0.18);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* ============== OUTPUT BUFFER ============== */
.buffer-stream {
    background: #0a1628;
    border-radius: var(--radius-md);
    padding: 20px 8px;
    counter-reset: bufrow;
}

.buffer-row {
    position: relative;
    display: grid;
    grid-template-columns: 110px 36px 1fr;
    align-items: center;
    gap: 16px;
    padding: 8px 16px 8px 28px;
    font-family: var(--f-mono);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78);
    border-left: 3px solid var(--thread-color, #ffffff);
    margin: 2px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    transition: background 220ms ease;
}

.buffer-row::before {
    counter-increment: bufrow;
    content: counter(bufrow, decimal-leading-zero);
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.28);
}

.buffer-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.buffer-tick {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}

.buffer-pid {
    background: var(--thread-color, rgba(255, 255, 255, 0.2));
    color: #ffffff;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}

.buffer-msg em {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    padding: 0 4px;
}

.buffer-row--merge {
    --thread-color: linear-gradient(90deg, #0066ff 0%, #00cc88 33%, #ff6633 66%, #9933ff 100%);
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, #0066ff, #00cc88 33%, #ff6633 66%, #9933ff) 1;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.buffer-row--merge .buffer-pid {
    background: linear-gradient(135deg, #0066ff, #00cc88, #ff6633, #9933ff);
}

/* ============== FOOTER ============== */
.sitefoot {
    border-top: 1px solid var(--c-line);
    background: #ffffff;
    margin-top: 24px;
}

.sitefoot-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.sitefoot-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.sitefoot-meta {
    font-family: var(--f-mono);
    font-size: 0.74rem;
    color: rgba(10, 22, 40, 0.55);
    letter-spacing: 0.04em;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
    .topbar-inner {
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        gap: 12px;
    }
    .topnav { grid-column: 1 / -1; justify-content: flex-start; gap: 18px; }
    .topstatus { justify-self: end; }

    .engine-diagram { min-height: 700px; }
    .engine-core { width: 280px; max-width: 70%; }

    .thread-grid { grid-template-columns: repeat(2, 1fr); }

    .merge-panel { grid-template-columns: 1fr; }
    .merge-panel__diagram { max-width: 320px; margin: 0 auto; }

    .bento { grid-template-columns: repeat(2, 1fr); }
    .cell--wide { grid-column: span 2; }
    .cell--tall { grid-row: span 2; }
}

@media (max-width: 720px) {
    main { padding: 0 18px 32px; }
    section { padding: 56px 0; }

    .topbar-inner { padding: 12px 18px; }
    .topnav { gap: 12px; }
    .topnav-link { font-size: 0.72rem; }

    .engine-diagram {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
        padding: 18px;
    }
    .engine-core {
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        margin-bottom: 8px;
        animation: cell-enter 600ms ease forwards;
    }
    .engine-cross { display: none; }

    .bento {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .cell--wide, .cell--tall { grid-column: span 1; grid-row: span 1; }
    .cell { min-height: 180px; }

    .thread-grid { grid-template-columns: 1fr; }

    .merge-panel { padding: 20px; }

    .buffer-row {
        grid-template-columns: 90px 32px 1fr;
        gap: 10px;
        font-size: 0.74rem;
        padding-left: 22px;
    }
    .buffer-row::before { left: 4px; font-size: 0.6rem; }

    .sitefoot-inner { padding: 22px 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
