/* ════════════════════════════════════════════════════════════
   MECHANIZ components: navbar, hero, ticker, calendar, cards
   ════════════════════════════════════════════════════════════ */

/* ── navbar ── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(2, 6, 23, .85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.navbar .inner { display: flex; align-items: center; gap: 1.4rem; height: 64px; }
.brand {
    font-family: var(--mono); font-weight: 800; font-size: 1.25rem;
    letter-spacing: .12em; color: var(--text-1);
    display: inline-flex; align-items: center; gap: .5rem;
}
.brand b { color: var(--accent); }
.nav-links { display: flex; gap: 1rem; margin-inline-start: 1rem; flex: 1; flex-wrap: wrap; }
.nav-links a { color: var(--text-2); font-size: .95rem; padding: .3rem .55rem; border-radius: 6px; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.nav-actions { display: flex; gap: .6rem; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text-1); border-radius: 6px; padding: .35rem .7rem; }

@media (max-width: 860px) {
    .nav-links {
        display: none; position: absolute; top: 64px; inset-inline: 0;
        background: rgba(2,6,23,.97); padding: 1rem 1.4rem;
        border-bottom: 1px solid var(--line); flex-direction: column;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: inline-flex; }
}

/* ── hero ── */
.hero { position: relative; padding: 5.5rem 0 4rem; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: -1; opacity: .8; }
.hero h1 {
    font-family: var(--mono); font-size: clamp(2.6rem, 8vw, 4.6rem);
    letter-spacing: .18em; margin: 0;
    background: linear-gradient(120deg, var(--text-1), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { font-size: 1.15rem; color: var(--text-2); margin: .4rem 0 0; font-weight: 600; }
.hero .tagline { font-size: 1.05rem; max-width: 620px; color: var(--text-2); }
.hero .cta { display: flex; gap: .9rem; margin-top: 1.6rem; flex-wrap: wrap; }

/* ── reminders ticker ── */
.ticker {
    border-block: 1px solid var(--line);
    background: rgba(var(--accent-rgb),.05);
    overflow: hidden; white-space: nowrap; padding: .45rem 0;
}
.ticker .track { display: inline-flex; gap: 4rem; animation: ticker 28s linear infinite; direction: rtl; }
.ticker span.item { color: var(--text-2); font-size: .88rem; display: inline-flex; gap: .5rem; align-items: center; }
.ticker span.item.critical { color: var(--danger); }
.ticker span.item.high { color: var(--warn); }
@keyframes ticker { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ── calendar widget ── */
.calendar-widget table { width: 100%; border-collapse: collapse; text-align: center; }
.calendar-widget th { color: var(--accent); font-size: .72rem; padding: .3rem; }
.calendar-widget td {
    padding: .28rem; font-size: .82rem; color: var(--text-2);
    border-radius: 6px; cursor: default; position: relative;
}
.calendar-widget td.has-events { background: rgba(var(--accent-rgb),.12); color: var(--accent); font-weight: 700; cursor: pointer; }
.calendar-widget td.today { outline: 1px solid var(--accent); }

/* ── viewer (InteractiveModelViewer) ── */
.imv { display: grid; grid-template-columns: 170px 1fr 320px; gap: 1rem; min-height: 520px; }
@media (max-width: 1020px) {
    .imv { grid-template-columns: 140px 1fr; }
    .imv .imv-panel { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .imv { grid-template-columns: 1fr; min-height: 420px; }
}
.imv-box {
    position: relative; background: var(--bg-1);
    border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; min-height: 380px;
}
.imv canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.imv iframe { width: 100%; height: 100%; border: 0; display: block; }
.imv-toolbar {
    position: absolute; top: .6rem; inset-inline-end: .6rem;
    display: flex; flex-direction: column; gap: .35rem; z-index: 5;
}
.imv-toolbar button {
    background: rgba(2,6,23,.75); border: 1px solid var(--line);
    color: var(--text-2); width: 34px; height: 34px; border-radius: 8px; font-size: .95rem;
}
.imv-toolbar button:hover { color: var(--accent); border-color: var(--accent); }
.imv-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(2,6,23,.85); backdrop-filter: blur(3px); z-index: 4;
    color: var(--accent); letter-spacing: .15em; animation: pulseTxt 1.4s ease-in-out infinite;
}
@keyframes pulseTxt { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.imv-error { position: absolute; inset: auto 0 0 0; text-align: center; color: var(--danger); font-size: .85rem; padding: .5rem; }

.axis-btns { display: flex; flex-direction: column; gap: .45rem; }
.axis-btn {
    display: flex; gap: .55rem; align-items: baseline;
    background: var(--bg-2); border: 1px solid rgba(var(--accent-rgb),.35);
    color: var(--text-1); border-radius: 8px; padding: .5rem .7rem;
    font-weight: 700; transition: all .18s;
}
.axis-btn small { color: var(--text-2); font-weight: 400; }
.axis-btn:hover { background: rgba(var(--accent-rgb),.12); }
.axis-btn.is-active { background: var(--accent); color: var(--bg-0); border-color: var(--accent); }
.axis-btn.is-active small { color: rgba(2,6,23,.65); }

.parts-list { display: flex; flex-direction: column; gap: .15rem; overflow-y: auto; max-height: 340px; scrollbar-width: thin; }
.part-btn {
    text-align: start; background: transparent; border: 1px solid transparent;
    color: var(--text-2); border-radius: 6px; padding: .32rem .55rem; font-size: .82rem;
}
.part-btn:hover { background: var(--bg-2); color: var(--accent); }
.part-btn.is-active { background: rgba(var(--accent-rgb),.14); border-color: var(--accent); color: var(--accent); }

.imv-panel { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; overflow-y: auto; max-height: 560px; }
.imv-panel h3 { margin: 0 0 .6rem; color: var(--accent); font-size: 1.05rem; }
.imv-desc { background: var(--bg-0); border-inline-start: 3px solid var(--accent); border-radius: 6px; padding: .7rem .9rem; color: var(--text-2); font-size: .88rem; min-height: 70px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: .8rem; }
.spec-table td { border: 1px solid var(--line); padding: .35rem .6rem; }
.spec-table td:first-child { color: var(--accent); white-space: nowrap; }
.mini-viewer { aspect-ratio: 16/10; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; margin-top: .8rem; position: relative; overflow: hidden; }
.mini-viewer canvas { width: 100%; height: 100%; }

@media (max-width: 700px) {
    .imv-panel.mobile-sheet {
        position: fixed; inset-inline: 0; bottom: 0; z-index: 150;
        max-height: 46vh; border-radius: 16px 16px 0 0;
        transform: translateY(calc(100% - 52px)); transition: transform .3s ease;
        box-shadow: 0 -12px 40px rgba(0,0,0,.5);
    }
    .imv-panel.mobile-sheet.open { transform: none; }
    .sheet-handle { display: flex; justify-content: center; padding: .35rem 0 .55rem; cursor: pointer; }
    .sheet-handle::before { content: ""; width: 44px; height: 4px; border-radius: 4px; background: var(--line); }
}

/* ── article reader ── */
.reader-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2.5rem; }
@media (max-width: 900px) { .reader-layout { grid-template-columns: 1fr; } }
.timeline { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: .15rem; }
.timeline a {
    display: flex; gap: .6rem; padding: .42rem .7rem; border-radius: 8px;
    color: var(--text-2); font-size: .86rem; border-inline-start: 2px solid transparent;
}
.timeline a:hover { color: var(--accent); background: rgba(var(--accent-rgb),.07); }
.timeline a.active { color: var(--accent); border-inline-start-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.timeline .n { font-family: var(--mono); opacity: .7; }

.reading-progress { position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0; background: linear-gradient(to left, var(--accent), #ff8f52); z-index: 200; transition: width .12s linear; }
.progress-label { position: fixed; top: 10px; inset-inline-end: 12px; z-index: 200; font-family: var(--mono); font-size: .72rem; color: var(--accent); background: rgba(2,6,23,.7); padding: .1rem .5rem; border-radius: 99px; border: 1px solid rgba(var(--accent-rgb),.3); }

.article-body h2 { color: var(--text-1); border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-top: 3rem; }
.section-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--text-2); margin: -.4rem 0 1.2rem; }
.section-meta b { color: var(--accent); font-weight: 600; }

.block-callout { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.1rem 0; }
.block-callout.note { border-inline-start: 3px solid var(--accent); background: rgba(var(--accent-rgb),.06); }
.block-callout.warning { border-inline-start: 3px solid var(--warn); background: rgba(251,191,36,.06); }
.block-callout.tip { border-inline-start: 3px solid var(--ok); background: rgba(52,211,153,.06); }
.block-callout.principle { border-inline-start: 3px solid var(--accent); background: rgba(var(--accent-rgb),.04); }
.block-callout h4 { margin: 0 0 .3rem; font-size: .92rem; }

.formula-block { direction: ltr; text-align: center; background: var(--bg-1); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.1rem; margin: 1.2rem 0; overflow-x: auto; }
.comparison-table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .88rem; }
.comparison-table th, .comparison-table td { border: 1px solid var(--line); padding: .55rem .8rem; text-align: center; }
.comparison-table thead th { background: var(--bg-2); color: var(--accent); }
.comparison-table td:first-child { font-weight: 700; }

figure.tech-figure { margin: 1.4rem 0; }
figure.tech-figure img { border: 1px solid var(--line); border-radius: var(--radius); cursor: zoom-in; width: 100%; }
figure.tech-figure figcaption { font-size: .8rem; color: var(--text-2); margin-top: .45rem; text-align: center; }

.lightbox { position: fixed; inset: 0; background: rgba(2,6,23,.94); z-index: 400; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; cursor: grab; transition: transform .1s; }
.lightbox .close-x { position: absolute; top: 1rem; inset-inline-end: 1.2rem; font-size: 1.6rem; color: var(--text-2); background: none; border: none; }

/* ── quiz ── */
.quiz-shell { max-width: 720px; margin-inline: auto; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.quiz-bar { height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-bottom: 1.6rem; }
.quiz-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.q-card { padding: 1.6rem; }
.q-card .q-text { font-size: 1.12rem; font-weight: 700; margin: .4rem 0 1.2rem; }
.choice-btn {
    display: block; width: 100%; text-align: start; margin-bottom: .6rem;
    background: var(--bg-2); border: 1px solid var(--line); color: var(--text-1);
    padding: .7rem 1rem; border-radius: var(--radius-sm); transition: all .15s;
}
.choice-btn:hover { border-color: var(--accent); }
.choice-btn.selected { border-color: var(--accent); background: rgba(var(--accent-rgb),.12); color: var(--accent); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 1.2rem; }

.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th, .lb-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); text-align: start; font-size: .9rem; }
.lb-table tr.top td { color: var(--accent); }

/* ── footer & contact ── */
footer.site-footer { border-top: 1px solid var(--line); margin-top: 5rem; padding: 3rem 0 2rem; background: rgba(2,6,23,.6); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.social-icons { display: flex; gap: .7rem; }
.social-icons a { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.social-icons a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* ── admin panel ── */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; } .admin-side { position: static !important; height: auto; } }
.admin-side {
    position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px);
    border-inline-end: 1px solid var(--line); background: rgba(2,6,23,.7);
    padding: 1.2rem .9rem; display: flex; flex-direction: column; gap: .2rem; overflow-y: auto;
}
.admin-side a { color: var(--text-2); padding: .5rem .8rem; border-radius: 8px; font-size: .92rem; display: flex; gap: .6rem; align-items: center; }
.admin-side a:hover, .admin-side a.active { color: var(--accent); background: rgba(var(--accent-rgb),.09); }
.admin-main { padding: 2rem 1.6rem; max-width: 1150px; width: 100%; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { padding: 1rem 1.2rem; }
.stat-card .v { font-size: 1.9rem; font-weight: 800; color: var(--accent); font-family: var(--mono); }
.stat-card .k { color: var(--text-2); font-size: .82rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: start; color: var(--accent); font-size: .8rem; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.admin-table td { padding: .55rem .7rem; border-bottom: 1px solid rgba(51,65,85,.5); }
.row-actions { display: flex; gap: .35rem; flex-wrap: wrap; }

.blocks-editor .block-item { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; margin-bottom: .8rem; }
.blocks-editor .block-head { display: flex; gap: .5rem; align-items: center; margin-bottom: .6rem; }

.drop-zone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 2.2rem; text-align: center; color: var(--text-2); transition: all .2s; cursor: pointer; }
.drop-zone.dragover { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb),.05); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.media-cell { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.media-cell img.thumb { width: 100%; height: 110px; object-fit: cover; }
.media-cell .meta { padding: .5rem .7rem; font-size: .74rem; color: var(--text-2); word-break: break-all; }

.error-hero .code { font-family: var(--mono); font-size: 5.5rem; color: var(--accent); letter-spacing: .1em; }

.error-hero { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-hero .code { font-family: var(--mono); font-size: 5.5rem; color: var(--accent); letter-spacing: .1em; }

/* ═══════════════════════════════════════════════
   Industrial redesign layer (blueprint/CAD motifs)
   ═══════════════════════════════════════════════ */

/* sticky navbar elevation */
.navbar { transition: box-shadow .25s ease, background .25s ease; }
.navbar.scrolled {
    background: rgba(21, 23, 28, .95);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}

/* CAD viewport corner brackets */
.corner-brackets { position: relative; }
.corner-brackets::before,
.corner-brackets::after {
    content: "";
    position: absolute;
    width: 14px; height: 14px;
    border: 2px solid var(--accent);
    pointer-events: none;
}
.corner-brackets::before {
    top: -2px; inset-inline-start: -2px;
    border-inline-end: none; border-bottom: none;
}
.corner-brackets::after {
    bottom: -2px; inset-inline-end: -2px;
    border-inline-start: none; border-top: none;
}

/* dashed dimension-line divider with end ticks */
.dim-line {
    border: none;
    border-top: 1px dashed var(--line);
    margin: 2.4rem 0;
    position: relative;
}
.dim-line::before, .dim-line::after {
    content: "";
    position: absolute; top: -4px;
    width: 7px; height: 7px;
    background: var(--accent);
    transform: rotate(45deg);
}
.dim-line::before { inset-inline-start: 0; }
.dim-line::after { inset-inline-end: 0; }

/* oversized ghost section numerals */
.ghost-num {
    font-family: var(--mono);
    font-weight: 800;
    font-size: clamp(2.6rem, 6vw, 4.2rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(var(--accent-rgb), .55);
    opacity: .9;
}

/* leaderboard medals */
.rank-1 { color: #ffd166; }
.rank-2 { color: #cdd6e0; }
.rank-3 { color: #e8a06a; }
.rank-medal {
    display: inline-grid; place-items: center;
    width: 30px; height: 30px; border-radius: 50%;
    font-family: var(--mono); font-weight: 800;
    background: rgba(var(--accent-rgb), .12);
    border: 1px solid var(--accent);
}
.lb-user-row td { background: rgba(var(--accent-rgb), .08); }

/* magazine filter chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    padding: .32rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-2);
    font-size: .84rem;
    transition: all .18s;
    background: var(--bg-1);
}
.chip:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .5); }
.chip.active {
    background: var(--accent); color: #15171C;
    border-color: var(--accent); font-weight: 700;
}

/* member leadership distinction */
.member-card.is-leader {
    border-color: rgba(var(--accent-rgb), .55);
}
.member-card.is-leader .member-role-badge {
    background: var(--accent); color: #15171C;
    border-color: var(--accent); font-weight: 700;
}

/* mono numerals for data columns */
.num-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* consistent RTL arrow convention: forward = ← after label, back = → before label */
.arrow-fwd { margin-inline-start: .35rem; }
.arrow-back { margin-inline-end: .35rem; }

/* navbar search icon link */
.nav-search-btn {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--text-2); background: none;
    transition: all .18s;
}
.nav-search-btn:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .5); }

/* auth card — calmer variant */
.auth-shell { max-width: 430px; margin-top: 5vh; }
.auth-shell .card { padding: 2.2rem; }


/* editor inline-edit affordances (visible only for staff) */
.edit-strip {
    display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
    background: rgba(var(--accent-rgb), .06);
    border: 1px dashed rgba(var(--accent-rgb), .4);
    border-radius: var(--radius-sm);
    padding: .45rem .8rem; margin-bottom: 1rem;
}
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-inline-end: .35rem; }
.avatar-fallback { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--accent), #3b82f6); color: #04121f; font-weight: 700; font-size: .85rem; }


/* ══════════════════════════════════════════════════════════════════
   Machine hero · original interactive assembly intro (issue opt-in)
   Scoped .mi-* styles reproduce the ORIGINAL index.html look exactly
   (slate surfaces + cyan identity inside the hero only).
   ══════════════════════════════════════════════════════════════════ */
.mi-scope { margin-top: 1.25rem; }
.mi-scope .is-hidden { display: none !important; }

/* ── keyframes (original slideIn / pulseTxt; fadeIn & fadeOut were dropped
      together with the removed fullscreen intro stage) ── */
@keyframes mi-slide-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes mi-pulse    { 0%, 100% { opacity: .6 } 50% { opacity: 1 } }

/* __MI_CSS_2__ */

/* ── assembly stage (original grid: auto | 1fr | 320px) ── */
#assembly-stage { display: none; }
#assembly-stage.active {
    display: grid;
    grid-template-columns: auto 1fr 320px;
    gap: 1.4rem;
    height: calc(100vh - 132px); min-height: 600px;
    padding: 1.4rem;
    background: #020617;
    animation: mi-slide-in .6s cubic-bezier(.4, 0, .2, 1) forwards;
}

/* panels */
.mi-side {
    background: #0f172a; border: 1px solid #334155; border-radius: .8rem;
    padding: 1rem; overflow: hidden;
    display: flex; flex-direction: column; gap: 1rem;
}
.mi-left { width: 172px; }
.mi-h3 {
    color: #22d3ee; font-size: .72rem; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .55rem;
}
.mi-axis-group { display: flex; flex-direction: column; gap: .5rem; }
.mi-axis-btn {
    display: flex; align-items: center; gap: .55rem; width: 100%;
    cursor: pointer; text-align: start;
    padding: .5rem .7rem; border-radius: .5rem;
    font-weight: 700; font-size: .85rem; font-family: inherit;
    background: #1e293b; border: 1px solid rgba(34, 211, 238, .55);
    color: #f1f5f9; transition: all .2s;
}
.mi-axis-btn small { font-size: .68rem; font-weight: 400; color: #94a3b8; }
.mi-axis-btn:hover { background: #22d3ee; color: #020617; }
.mi-axis-btn:hover small { color: #164e63; }
.mi-axis-btn.is-active { background: #35cbe1; color: #020617; }   /* original cyan active */
.mi-axis-btn.is-active small { color: #164e63; }
.mi-divider { border-top: 1px solid #334155; }
.mi-parts-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#parts-list {
    flex: 1; min-height: 0; overflow-y: auto;
    display: flex; flex-direction: column; gap: .15rem;
    scrollbar-width: thin; scrollbar-color: rgba(34, 211, 238, .33) transparent;
    padding-inline-end: .25rem;
}
#parts-list::-webkit-scrollbar { width: 3px; }
#parts-list::-webkit-scrollbar-track { background: transparent; }
#parts-list::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, .33); border-radius: 2px; }

.part-list-btn {
    width: 100%; text-align: start; cursor: pointer;
    background: none; border: 1px solid transparent; border-radius: .35rem;
    padding: .35rem .5rem; font-size: .74rem; line-height: 1.6;
    color: #94a3b8; font-family: inherit; transition: all .15s;
}
.part-list-btn:hover { background: #1e293b; color: #67e8f9; }
.part-list-btn.is-active {
    background: rgba(34, 211, 238, .15);
    border-color: #22d3ee; color: #22d3ee;
}

/* center viewer + right panel + mobile */
.mi-stage-box {
    position: relative; overflow: hidden;
    background: #0f172a; border: 1px solid #334155; border-radius: .8rem;
}
#sketchfab-iframe {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; display: block;
}
#sketchfab-iframe.hide { display: none; }
#canvas3d {
    display: none; position: absolute; inset: 0;
    width: 100%; height: 100%; touch-action: none;
}
#canvas3d.show { display: block; }
#loading-overlay {
    position: absolute; inset: 0; z-index: 20;
    display: flex; align-items: center; justify-content: center;
    background: rgba(2, 6, 23, .92); backdrop-filter: blur(4px);
}
.loader-text {
    animation: mi-pulse 1.5s ease-in-out infinite;
    color: #22d3ee; font-weight: 600; letter-spacing: .06em;
}

/* right info panel */
.mi-right { overflow-y: auto; gap: 1.1rem; }
#partName { color: #22d3ee; font-size: 1.22rem; font-weight: 800; line-height: 1.7; margin: 0; }
#partDesc {
    font-size: .86rem; line-height: 2; color: #94a3b8; margin: 0;
    background: #020617; border-inline-start: 2px solid #22d3ee;
    border-radius: .3rem; padding: .9rem 1rem; min-height: 5rem;
}
.mi-part-media { display: flex; flex-direction: column; gap: .75rem; }
.mi-img-slot, .mi-mini-slot {
    position: relative; width: 100%; aspect-ratio: 16 / 10;
    background: #1e293b; border: 1px solid #334155; border-radius: .55rem;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
#partImg1 { width: 100%; height: 100%; object-fit: cover; }
.mi-mini-ph {
    display: flex; flex-direction: column; align-items: center; gap: .45rem;
    color: #475569;
}
.mi-slot-label { color: #64748b; font-size: .68rem; letter-spacing: .1em; }
#miniCanvas { width: 100%; height: 100%; display: block; }
#miniLoading {
    position: absolute; inset: 0; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    background: rgba(2, 6, 23, .8);
    color: #22d3ee; font-size: .72rem;
    animation: mi-pulse 1.5s infinite;
}

/* skip link under the stage */
.mi-skip { display: flex; justify-content: center; padding-top: .9rem; }
.mi-skip a { color: #64748b; font-size: .8rem; }
.mi-skip a:hover { color: #22d3ee; }

/* ── mobile (req §17): viewer → axis chips → parts drawer → info sheet ── */
@media (max-width: 900px) {
    #assembly-stage.active {
        display: flex; flex-direction: column;
        height: auto; min-height: 0;
    }
    .mi-stage-box { order: -1; aspect-ratio: 4 / 3; min-height: 300px; }
    .mi-left { width: auto; flex-direction: row; flex-wrap: wrap; }
    .mi-left .mi-h3 { width: 100%; margin-bottom: .3rem; }
    .mi-axis-group { flex-direction: row; flex-wrap: wrap; width: 100%; }
    .mi-axis-btn { width: calc(50% - .25rem); flex: 0 0 auto; }
    .mi-divider { display: none; }
    .mi-parts-wrap { max-height: 170px; width: 100%; }
    .mi-right { overflow: visible; }
}






