/* Progressive Disclosure Interaction** -- primary card interaction model. */
/* ==========================================================================
   AIICE.IO  —  TERMINAL DECO DESIGN SYSTEM
   Palette: #0D0F12 void · #00FF88 phosphor · #C9A84C brass · #8B7A4E aged brass
            #E8E4DC parchment · #16181D panel · #1A1A1E panel-2 · #FF5E5B coral
            #3D8B7A teal
   Fonts:   Poiret One (display / Art Deco) · Share Tech Mono (chrome / mono)
            DM Sans (body) · Inter / Space Mono (secondary fallbacks)
   ========================================================================== */

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

:root {
    --void:        #0D0F12;
    --panel:       #16181D;
    --panel-2:     #1A1A1E;
    --parchment:   #E8E4DC;
    --brass:       #C9A84C;
    --brass-aged:  #8B7A4E;
    --phosphor:    #00FF88;
    --teal:        #3D8B7A;
    --coral:       #FF5E5B;

    --grid-gap:    8px;
    --card-pad:    18px;
    --bar-height:  56px;

    --fnt-display: "Poiret One", "Space Mono", serif;
    --fnt-mono:    "Share Tech Mono", "Space Mono", ui-monospace, monospace;
    --fnt-body:    "DM Sans", "Inter", system-ui, sans-serif;
}

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    font-size: 16px;
    background: var(--void);
}

body {
    background: var(--void);
    color: var(--parchment);
    font-family: var(--fnt-body);
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    padding-bottom: var(--bar-height);
    -webkit-font-smoothing: antialiased;
}

/* --- Grain overlay (page-level) ----------------------------------------- */
.grain {
    position: fixed;
    top: -25%;
    left: -25%;
    width: 150%;
    height: 150%;
    pointer-events: none;
    z-index: 9000;
    mix-blend-mode: overlay;
    opacity: 0.16;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'/></filter><rect width='256' height='256' filter='url(%23n)'/></svg>");
    background-size: 256px 256px;
    background-repeat: repeat;
    will-change: background-position;
}

.grain-page {
    /* background-position animated by JS */
}

/* Per-card coarser grain */
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0.20;
    mix-blend-mode: overlay;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='128' height='128'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/></filter><rect width='128' height='128' filter='url(%23n)'/></svg>");
    background-size: 128px 128px;
}

/* --- Floor sections ------------------------------------------------------ */
.floor {
    position: relative;
    min-height: 100vh;
    padding: 72px clamp(20px, 4vw, 56px) 80px;
    scroll-snap-align: start;
    border-bottom: 1px solid rgba(201, 168, 76, 0.10);
}

.floor + .floor::before {
    /* Art Deco chevron divider between floors */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background-image:
        repeating-linear-gradient( 45deg, rgba(201, 168, 76, 0.35) 0 1px, transparent 1px 6px),
        repeating-linear-gradient(-45deg, rgba(201, 168, 76, 0.35) 0 1px, transparent 1px 6px);
    opacity: 0.8;
}

/* Subtle phosphor glow radial per floor */
.floor::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 10%, rgba(0, 255, 136, 0.035), transparent 60%);
    z-index: 0;
}

/* --- Floor marker (top-left tag) ---------------------------------------- */
.floor-marker {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--fnt-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--brass-aged);
    margin-bottom: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(201, 168, 76, 0.25);
    background: rgba(22, 24, 29, 0.6);
    text-transform: uppercase;
}

.floor-marker-num   { color: var(--brass); font-weight: 400; }
.floor-marker-sep   { color: var(--teal); opacity: 0.8; }
.floor-marker-name  { color: var(--parchment); letter-spacing: 0.28em; }
.floor-marker-blink {
    color: var(--phosphor);
    animation: cursor-blink 1s steps(1) infinite;
    font-size: 12px;
    line-height: 1;
}

/* --- Floor header -------------------------------------------------------- */
.floor-header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 56px;
    padding: 24px 0 32px;
}

.sunburst-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 520px;
    height: 520px;
    max-width: 90vw;
    max-height: 90vw;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.55;
    z-index: -1;
}

.sunburst {
    width: 100%;
    height: 100%;
    animation: spin 120s linear infinite;
}

.sunburst line { stroke: var(--phosphor); stroke-width: 0.5; opacity: 0.18; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ascii-border {
    font-family: var(--fnt-mono);
    font-size: 10px;
    line-height: 1.2;
    color: var(--phosphor);
    opacity: 0.38;
    white-space: pre;
    margin-bottom: 18px;
    letter-spacing: 0;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.25);
}

.floor-title {
    font-family: var(--fnt-display);
    font-size: clamp(52px, 9vw, 108px);
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--parchment);
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.18);
    line-height: 1.0;
    margin: 12px 0 10px;
    display: inline-flex;
    align-items: baseline;
    gap: 0.08em;
}

.title-main { display: inline-block; }

.title-cursor {
    display: inline-block;
    color: var(--phosphor);
    font-family: var(--fnt-mono);
    font-size: 0.55em;
    line-height: 1;
    margin-left: 0.18em;
    animation: cursor-blink 1s steps(1) infinite;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.floor-tagline {
    font-family: var(--fnt-mono);
    font-size: 12px;
    letter-spacing: 0.28em;
    color: var(--brass-aged);
    text-transform: uppercase;
    margin-top: 4px;
}

.chevron-divider {
    width: 220px;
    height: 4px;
    margin: 22px auto 18px;
    background-image:
        repeating-linear-gradient( 45deg, rgba(201, 168, 76, 0.55) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(-45deg, rgba(201, 168, 76, 0.55) 0 1px, transparent 1px 5px);
}

.floor-summary {
    max-width: 640px;
    margin: 12px auto 0;
    font-family: var(--fnt-body);
    font-size: 15px;
    line-height: 1.75;
    color: var(--parchment);
    opacity: 0.82;
}

/* --- Card grid ----------------------------------------------------------- */
.card-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    max-width: 1280px;
    margin: 0 auto;
}

.card[data-span="3"] { grid-column: span 3; }
.card[data-span="4"] { grid-column: span 4; }
.card[data-span="5"] { grid-column: span 5; }
.card[data-span="6"] { grid-column: span 6; }
.card[data-span="7"] { grid-column: span 7; }
.card[data-span="8"] { grid-column: span 8; }

/* --- Card (progressive disclosure) -------------------------------------- */
.card {
    position: relative;
    background: var(--panel);
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 0;
    overflow: hidden;
    max-height: 72px;
    transition:
        max-height 420ms cubic-bezier(0.23, 1, 0.32, 1),
        border-color 320ms ease,
        background 320ms ease,
        transform 320ms ease;
    opacity: 0;
    transform: translateY(12px);
}

.card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover:not(.is-expanded) {
    border-color: rgba(201, 168, 76, 0.7);
    background: var(--panel-2);
}

.card.is-expanded {
    max-height: 1400px;
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.08), 0 10px 40px rgba(0, 0, 0, 0.45);
    background: linear-gradient(180deg, var(--panel) 0%, rgba(232, 228, 220, 0.03) 100%);
}

/* Card chrome (top strip) */
.card-chrome {
    position: relative;
    z-index: 4;
    height: 32px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
    background: rgba(13, 15, 18, 0.65);
    font-family: var(--fnt-mono);
    font-size: 11px;
    letter-spacing: 0.10em;
    color: var(--brass);
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}

.chrome-title {
    color: var(--brass);
    font-weight: 400;
}

.card.is-expanded .chrome-title {
    color: var(--phosphor);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.45);
}

.chrome-dots {
    display: inline-flex;
    gap: 5px;
    font-size: 9px;
    line-height: 1;
}

.chrome-dots i {
    color: var(--brass-aged);
    opacity: 0.8;
    font-style: normal;
}

.chrome-dots i:first-child {
    color: var(--phosphor);
    opacity: 1;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.6);
}

.card.is-expanded .chrome-dots i:first-child {
    color: var(--coral);
    text-shadow: 0 0 6px rgba(255, 94, 91, 0.6);
}

/* Card collapsed summary line */
.card-summary {
    position: relative;
    z-index: 4;
    height: 40px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--fnt-mono);
    font-size: 12px;
    color: var(--parchment);
    opacity: 0.75;
    cursor: pointer;
    user-select: none;
    background: rgba(22, 24, 29, 0.4);
    transition: opacity 200ms ease, color 200ms ease;
}

.card:hover .card-summary { opacity: 1; }
.card.is-expanded .card-summary { display: none; }

.card-cursor {
    color: var(--phosphor);
    font-size: 11px;
    line-height: 1;
    animation: cursor-blink 1.1s steps(1) infinite;
    opacity: 0.55;
}

/* Card full content (hidden until expanded) */
.card-content {
    position: relative;
    z-index: 4;
    padding: 18px var(--card-pad) 22px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 260ms ease 140ms, transform 260ms ease 140ms;
}

.card.is-expanded .card-content {
    opacity: 1;
    transform: translateY(0);
}

/* Typed-in prefix inserted by JS at expand time */
.typed-prefix {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--fnt-mono);
    font-size: 11px;
    color: var(--phosphor);
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.4);
}

.typed-prefix .typed-cursor {
    display: inline-block;
    width: 7px;
    height: 12px;
    background: var(--phosphor);
    animation: cursor-blink 0.9s steps(1) infinite;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.6);
}

/* --- Card featured (Deco fan corner ornament) --------------------------- */
.fan-corner {
    position: absolute;
    width: 56px;
    height: 56px;
    pointer-events: none;
    z-index: 5;
    opacity: 0.6;
}

.fan-corner::before,
.fan-corner::after,
.fan-corner i { content: ""; position: absolute; inset: 0; }

.fan-corner::before {
    border: 1.5px solid var(--brass);
    opacity: 0.9;
}

.fan-corner::after {
    inset: 8px;
    border: 1.5px solid var(--brass);
    opacity: 0.6;
}

.fan-corner-tr {
    top: 0; right: 0;
    border-radius: 0 0 0 100%;
}
.fan-corner-tr::before { border-radius: 0 0 0 100%; border-top: 0; border-right: 0; }
.fan-corner-tr::after  { border-radius: 0 0 0 100%; border-top: 0; border-right: 0; }

.fan-corner-tl {
    top: 0; left: 0;
    border-radius: 0 0 100% 0;
}
.fan-corner-tl::before { border-radius: 0 0 100% 0; border-top: 0; border-left: 0; }
.fan-corner-tl::after  { border-radius: 0 0 100% 0; border-top: 0; border-left: 0; }

.fan-corner-br {
    bottom: 0; right: 0;
    border-radius: 100% 0 0 0;
}
.fan-corner-br::before { border-radius: 100% 0 0 0; border-bottom: 0; border-right: 0; }
.fan-corner-br::after  { border-radius: 100% 0 0 0; border-bottom: 0; border-right: 0; }

.fan-corner-bl {
    bottom: 0; left: 0;
    border-radius: 0 100% 0 0;
}
.fan-corner-bl::before { border-radius: 0 100% 0 0; border-bottom: 0; border-left: 0; }
.fan-corner-bl::after  { border-radius: 0 100% 0 0; border-bottom: 0; border-left: 0; }

/* --- Typography helpers inside cards ------------------------------------ */
.card-paragraph {
    font-family: var(--fnt-body);
    font-size: 15px;
    line-height: 1.72;
    color: var(--parchment);
    opacity: 0.88;
    margin-bottom: 14px;
}

.card-paragraph:last-child { margin-bottom: 0; }

.card-meta {
    font-family: var(--fnt-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--brass-aged);
    opacity: 0.6;
    text-transform: uppercase;
    margin-top: 10px;
}

.card-meta.centered { text-align: center; }

.card-quote {
    font-family: var(--fnt-body);
    font-size: 17px;
    line-height: 1.75;
    font-weight: 400;
    color: var(--parchment);
    padding: 8px 0 8px 16px;
    border-left: 2px solid var(--brass);
    margin-bottom: 10px;
}

/* Zig-list: ziggurat bullet */
.zig-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 4px;
}

.zig-list li {
    position: relative;
    padding: 5px 0 5px 22px;
    font-family: var(--fnt-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--parchment);
    opacity: 0.88;
}

.zig-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 12px;
    height: 8px;
    background:
        linear-gradient(var(--brass), var(--brass)) 0 0 / 12px 2px no-repeat,
        linear-gradient(var(--brass), var(--brass)) 2px 3px / 8px 2px no-repeat,
        linear-gradient(var(--brass), var(--brass)) 4px 6px / 4px 2px no-repeat;
    opacity: 0.65;
}

/* Status list (dl) */
.status-list {
    display: grid;
    gap: 0;
}

.status-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 7px 0;
    font-family: var(--fnt-mono);
    font-size: 12px;
    border-bottom: 1px dashed rgba(201, 168, 76, 0.18);
}

.status-row:last-child { border-bottom: none; }
.status-row dt { color: var(--brass-aged); letter-spacing: 0.14em; text-transform: uppercase; }
.status-row dd { color: var(--parchment); letter-spacing: 0.06em; }
.status-row dd.status-active {
    color: var(--phosphor);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.35);
}

/* Terminal / ascii blocks */
.terminal-block,
.micro-log {
    font-family: var(--fnt-mono);
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--parchment);
    opacity: 0.88;
    background: rgba(13, 15, 18, 0.75);
    border: 1px solid rgba(0, 255, 136, 0.12);
    padding: 12px 14px;
    white-space: pre;
    overflow-x: auto;
    margin: 6px 0;
}

.terminal-block { color: var(--parchment); }
.micro-log { color: var(--brass); font-size: 11px; }

.ascii-art,
.ascii-diagram,
.ascii-sign {
    font-family: var(--fnt-mono);
    font-size: 10.5px;
    line-height: 1.3;
    color: var(--phosphor);
    opacity: 0.75;
    white-space: pre;
    text-align: left;
    margin: 6px 0;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.2);
}

.ascii-sign { text-align: center; color: var(--brass); opacity: 0.9; }

/* --- Descend link (replaces CTA button) --------------------------------- */
.descend-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 255, 136, 0.4);
    background: rgba(0, 255, 136, 0.04);
    font-family: var(--fnt-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--phosphor);
    text-decoration: none;
    text-transform: uppercase;
    transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.descend-link:hover {
    background: rgba(0, 255, 136, 0.10);
    border-color: var(--phosphor);
    color: var(--parchment);
}

.descend-arrow { font-size: 14px; color: var(--phosphor); }
.descend-cursor {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: var(--phosphor);
    animation: cursor-blink 0.9s steps(1) infinite;
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.6);
}

/* --- Metric bars --------------------------------------------------------- */
.metric { margin: 10px 0; }

.metric-head {
    display: flex;
    justify-content: space-between;
    font-family: var(--fnt-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--brass-aged);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.metric-val {
    color: var(--phosphor);
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.3);
}

.metric-track {
    height: 4px;
    background: rgba(201, 168, 76, 0.12);
    position: relative;
}

.metric-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--teal), var(--phosphor));
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.35);
    transition: width 1400ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- Deploy step list ---------------------------------------------------- */
.deploy-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 0;
}

.deploy-step {
    flex: 1 1 80px;
    padding: 9px 8px;
    text-align: center;
    background: rgba(26, 26, 30, 0.6);
    border: 1px solid rgba(201, 168, 76, 0.18);
    font-family: var(--fnt-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--brass-aged);
    transition: all 300ms ease;
}

.deploy-step .step-num {
    display: block;
    font-size: 9px;
    color: var(--brass-aged);
    margin-bottom: 3px;
}

.deploy-step.is-complete {
    border-color: rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.06);
    color: var(--phosphor);
}

.deploy-step.is-complete .step-num { color: var(--phosphor); }

.deploy-step.is-active {
    border-color: var(--coral);
    background: rgba(255, 94, 91, 0.10);
    color: var(--coral);
    animation: coral-pulse 1.6s ease-in-out infinite;
}

.deploy-step.is-active .step-num { color: var(--coral); }

@keyframes coral-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 94, 91, 0.35); }
    50%      { box-shadow: 0 0 12px 2px rgba(255, 94, 91, 0.2); }
}

/* --- Pipeline flow ------------------------------------------------------- */
.pipeline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}

.pipe-node {
    font-family: var(--fnt-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    padding: 7px 12px;
    border: 1px solid rgba(61, 139, 122, 0.55);
    background: rgba(61, 139, 122, 0.08);
    color: var(--parchment);
    text-transform: uppercase;
    transition: all 200ms ease;
}

.pipe-node.is-hot {
    border-color: var(--phosphor);
    background: rgba(0, 255, 136, 0.12);
    color: var(--phosphor);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.35);
}

.pipe-arrow {
    color: var(--brass);
    font-family: var(--fnt-mono);
    font-size: 14px;
    opacity: 0.75;
}

/* --- Monitor grid -------------------------------------------------------- */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 12px;
}

.monitor-cell {
    padding: 12px 10px;
    background: rgba(13, 15, 18, 0.72);
    border: 1px solid rgba(201, 168, 76, 0.15);
    text-align: center;
}

.monitor-label {
    display: block;
    font-family: var(--fnt-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--brass-aged);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.monitor-value {
    display: block;
    font-family: var(--fnt-mono);
    font-size: 18px;
    color: var(--phosphor);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.35);
    letter-spacing: 0.04em;
}

/* --- Timeline ------------------------------------------------------------ */
.timeline {
    list-style: none;
    padding: 0 0 0 20px;
    position: relative;
    margin-top: 4px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: linear-gradient(180deg, var(--brass), rgba(201, 168, 76, 0.15));
}

.timeline-entry {
    position: relative;
    padding: 8px 0 8px 8px;
}

.timeline-entry::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 13px;
    width: 9px;
    height: 9px;
    border: 1px solid var(--brass);
    background: var(--void);
    transform: rotate(45deg);
}

.timeline-entry:last-child::before {
    border-color: var(--phosphor);
    background: var(--phosphor);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.timeline-date {
    display: block;
    font-family: var(--fnt-mono);
    font-size: 10.5px;
    letter-spacing: 0.15em;
    color: var(--brass);
    margin-bottom: 2px;
}

.timeline-event {
    display: block;
    font-family: var(--fnt-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--parchment);
    opacity: 0.88;
}

/* --- Log gutter (ambient bottom-right scroll) --------------------------- */
.log-gutter {
    position: relative;
    z-index: 2;
    margin: 40px auto 0;
    max-width: 1280px;
    height: 22px;
    padding: 0 10px;
    overflow: hidden;
    border-top: 1px dashed rgba(61, 139, 122, 0.35);
    font-family: var(--fnt-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--teal);
    opacity: 0.55;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.log-entry {
    display: inline-block;
    padding-top: 4px;
}

.log-cursor {
    display: inline-block;
    margin-left: 4px;
    color: var(--phosphor);
    animation: cursor-blink 0.8s steps(1) infinite;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.45);
}

/* --- Bottom terminal nav bar -------------------------------------------- */
#bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9500;
    height: var(--bar-height);
    background: rgba(13, 15, 18, 0.92);
    border-top: 1px solid rgba(201, 168, 76, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#bottom-bar::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-image:
        repeating-linear-gradient( 45deg, rgba(201, 168, 76, 0.6) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(-45deg, rgba(201, 168, 76, 0.6) 0 1px, transparent 1px 5px);
    opacity: 0.9;
}

.bar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    height: 100%;
    padding: 0 clamp(14px, 2vw, 28px);
    max-width: 1400px;
    margin: 0 auto;
}

.bar-prompt {
    display: flex;
    align-items: center;
    font-family: var(--fnt-mono);
    font-size: 14px;
    color: var(--phosphor);
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(0, 255, 136, 0.35);
}

.prompt-string { display: inline-block; }

.prompt-cursor {
    display: inline-block;
    color: var(--phosphor);
    line-height: 1;
    animation: cursor-blink 1s steps(1) infinite;
    font-size: 14px;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.55);
}

.bar-commands {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    padding: 0;
    overflow: hidden;
}

.cmd-link {
    position: relative;
    font-family: var(--fnt-mono);
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--parchment);
    text-decoration: none;
    padding: 6px 4px;
    transition: color 180ms ease, text-shadow 180ms ease;
    white-space: nowrap;
}

.cmd-link::before {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: 2px;
    height: 1px;
    background: var(--phosphor);
    box-shadow: 0 0 6px rgba(0, 255, 136, 0.6);
    transition: left 200ms ease, right 200ms ease;
}

.cmd-link:hover {
    color: var(--phosphor);
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.cmd-link:hover::before,
.cmd-link.is-active::before {
    left: 0;
    right: 0;
}

.cmd-link.is-active {
    color: var(--phosphor);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

/* Tooltip (appears above command on hover) */
.cmd-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translate(-50%, 4px);
    padding: 6px 10px;
    background: rgba(13, 15, 18, 0.96);
    border: 1px solid rgba(0, 255, 136, 0.5);
    color: var(--phosphor);
    font-family: var(--fnt-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
    text-shadow: 0 0 4px rgba(0, 255, 136, 0.4);
}

.cmd-link:hover::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.bar-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--fnt-mono);
    font-size: 10.5px;
    letter-spacing: 0.15em;
    color: var(--teal);
    text-transform: uppercase;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--phosphor);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.55);
    animation: status-pulse 1.8s ease-in-out infinite;
}

.status-time {
    color: var(--brass);
    letter-spacing: 0.1em;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.85); }
}

/* --- Global animations -------------------------------------------------- */
@keyframes cursor-blink {
    0%, 50%   { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
    .card-grid { grid-template-columns: repeat(6, 1fr); }
    .card[data-span] { grid-column: span 6; }
    .card[data-span="3"] { grid-column: span 3; }
    .card[data-span="4"] { grid-column: span 3; }
    .floor-title { font-size: clamp(48px, 10vw, 72px); }
    .monitor-grid { grid-template-columns: repeat(2, 1fr); }
    .bar-commands { gap: 12px; }
}

@media (max-width: 720px) {
    .floor { padding: 56px 18px 72px; }
    .card-grid { grid-template-columns: 1fr; gap: 6px; }
    .card[data-span] { grid-column: 1 / -1; }
    .floor-title { font-size: clamp(40px, 12vw, 64px); }
    .floor-tagline { font-size: 10px; letter-spacing: 0.22em; }
    .ascii-border { font-size: 8px; }
    .monitor-grid { grid-template-columns: 1fr 1fr; }
    .pipeline { flex-direction: column; align-items: flex-start; }
    .pipe-arrow { transform: rotate(90deg); }
    .bar-inner {
        grid-template-columns: auto 1fr;
        gap: 8px;
        padding: 0 12px;
    }
    .bar-status { display: none; }
    .bar-commands { gap: 10px; overflow-x: auto; font-size: 12px; }
    .bar-prompt { font-size: 12px; }
    .cmd-link { font-size: 12px; }
    .cmd-link::after { display: none; }
    .card-summary { font-size: 11px; }
}

@media (max-width: 480px) {
    .floor-marker { font-size: 10px; }
    .bar-prompt .prompt-string { font-size: 11px; }
    .cmd-link { font-size: 11px; letter-spacing: 0.08em; }
}

/* --- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .sunburst,
    .status-dot,
    .deploy-step.is-active,
    .title-cursor,
    .floor-marker-blink,
    .prompt-cursor,
    .card-cursor,
    .descend-cursor,
    .typed-prefix .typed-cursor {
        animation: none;
    }
    .grain { display: none; }
}
