/* ============================================================================
 * PYBEX // ORBIT v2 — site-wide component layer
 * Loaded after style.css and orbit.css. Adds: view transitions, command
 * palette, split hero + answer box, flow diagram, terminal / board / phone
 * mocks, FAQ, document layout (legal + articles), forms, cards, timeline,
 * animated gradient borders and the 404 page.
 * Every animation is disabled under prefers-reduced-motion.
 * ========================================================================= */

/* ---------------------------------------------------------------------------
   0. View transitions — pages cross-fade like an app (Chromium, Safari 18.2+)
   ------------------------------------------------------------------------ */
@view-transition { navigation: auto; }
.top-stack { view-transition-name: site-header; }
.main-footer { view-transition-name: site-footer; }
::view-transition-old(root) { animation: vt-out 0.22s var(--ease-soft) both; }
::view-transition-new(root) { animation: vt-in 0.42s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); filter: blur(2px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }

/* Animated gradient angle for conic borders */
@property --spin { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* ---------------------------------------------------------------------------
   1. Breadcrumbs (shared; .lk-crumbs kept as an alias)
   ------------------------------------------------------------------------ */
.crumbs {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-dim); margin-bottom: 1.5rem;
}
.crumbs a { color: var(--ion); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs [aria-current] { color: var(--text-primary); }
.center .crumbs, .lk-hero .crumbs { justify-content: center; }

/* ---------------------------------------------------------------------------
   2. Command palette
   ------------------------------------------------------------------------ */
.nav-k { display: flex; align-items: center; }
.kbar-trigger {
    display: inline-flex; align-items: center; gap: 0.5rem; height: 2.25rem;
    padding: 0 0.65rem; border-radius: 0.7rem; border: var(--hairline);
    background: rgba(255, 255, 255, 0.03); color: var(--text-muted); cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.kbar-trigger:hover { color: var(--text-primary); border-color: var(--line-strong); background: rgba(255,255,255,.05); }
.kbar-hint { display: inline-flex; gap: 0.2rem; }
kbd {
    font-family: var(--font-mono); font-size: 0.62rem; line-height: 1; padding: 0.22rem 0.36rem;
    border-radius: 0.35rem; border: 1px solid var(--line-strong); background: rgba(255,255,255,.04);
    color: var(--text-secondary);
}
.kbar {
    padding: 0; border: 0; background: transparent; max-width: 640px; width: calc(100% - 2rem);
    margin: 12vh auto auto; color: var(--text-primary); overflow: visible;
}
.kbar::backdrop { background: rgba(2, 4, 10, 0.66); backdrop-filter: blur(6px); }
.kbar[open] .kbar-box { animation: kbar-in 0.28s var(--ease-out); }
@keyframes kbar-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
.kbar-box {
    border-radius: 1.1rem; border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(19, 26, 44, 0.96), rgba(8, 12, 22, 0.98));
    box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--ion-08);
    overflow: hidden;
}
.kbar-input { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.1rem; border-bottom: var(--hairline); color: var(--text-muted); }
.kbar-input input {
    flex: 1; min-width: 0; background: transparent; border: 0; outline: 0;
    font: inherit; font-size: 1.02rem; color: var(--text-primary);
}
.kbar-input input::-webkit-search-cancel-button { display: none; }
.kbar-list { list-style: none; margin: 0; padding: 0.45rem; max-height: min(56vh, 460px); overflow-y: auto; }
.kbar-list li a {
    display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: center;
    padding: 0.7rem 0.8rem; border-radius: 0.7rem; text-decoration: none; color: var(--text-secondary);
}
.kbar-list li a b { color: var(--text-primary); font-weight: 500; display: block; }
.kbar-list li a small { color: var(--text-dim); font-size: 0.78rem; }
.kbar-list li a .k {
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ion); border: 1px solid var(--ion-15); background: var(--ion-08);
    padding: 0.2rem 0.45rem; border-radius: 0.4rem; min-width: 4.6rem; text-align: center;
}
.kbar-list li[aria-selected="true"] a { background: rgba(62, 232, 255, 0.08); box-shadow: inset 0 0 0 1px var(--ion-15); }
.kbar-list li a .go { opacity: 0; color: var(--ion); transition: opacity 0.2s; }
.kbar-list li[aria-selected="true"] a .go { opacity: 1; }
.kbar-empty { padding: 1.5rem; text-align: center; color: var(--text-dim); font-size: 0.9rem; }
.kbar-foot { display: flex; gap: 1.25rem; padding: 0.65rem 1rem; border-top: var(--hairline); font-size: 0.72rem; color: var(--text-dim); }
.kbar-foot span { display: inline-flex; align-items: center; gap: 0.3rem; }
@media (max-width: 1024px) { .kbar-hint { display: none; } }

/* ---------------------------------------------------------------------------
   3. Split hero (v2) + "In short" answer box
   ------------------------------------------------------------------------ */
.hero-v2 { text-align: left; padding: clamp(8.5rem, 17vh, 11.5rem) 0 clamp(3.5rem, 7vw, 5.5rem); }
.hero-v2.center { text-align: center; }
.hero-v2-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-v2 h1 { margin: 1rem 0 1.25rem; }
.hero-v2 .lead { max-width: 58ch; }
.hero-v2.center .lead { margin-inline: auto; }
.hero-v2 .hero-actions { margin: 2rem 0 0; }
.hero-v2.center .hero-actions { justify-content: center; }
.hero-v2 .hud { display: inline-flex; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.hero-v2.center .hero-meta { justify-content: center; }
@media (max-width: 960px) { .hero-v2-grid { grid-template-columns: 1fr; } }

.tldr {
    position: relative; margin-top: 1.75rem; padding: 1rem 1.15rem 1rem 1.15rem;
    border-radius: 0.9rem; border: 1px solid var(--ion-15);
    background: linear-gradient(90deg, rgba(62, 232, 255, 0.07), rgba(109, 124, 255, 0.03));
    max-width: 62ch; text-align: left;
}
.hero-v2.center .tldr { margin-inline: auto; }
.tldr::before {
    content: "In short"; display: block; margin-bottom: 0.35rem;
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ion);
}
.tldr p { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--text-secondary); }

/* Animated gradient border on any element */
.glow-border { position: relative; isolation: isolate; }
.glow-border::after {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
    background: conic-gradient(from var(--spin), transparent 0 60%, var(--ion) 75%, var(--nova) 88%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: spin-border 6s linear infinite; pointer-events: none; opacity: 0.85;
}
@keyframes spin-border { to { --spin: 360deg; } }

/* ---------------------------------------------------------------------------
   4. Flow diagram — nodes joined by a travelling signal
   ------------------------------------------------------------------------ */
.flow {
    position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
    padding: 1.75rem 1.25rem; border-radius: 1.25rem; border: var(--hairline);
    background:
        linear-gradient(rgba(150,178,255,.05) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(90deg, rgba(150,178,255,.05) 1px, transparent 1px) 0 0 / 22px 22px,
        var(--surface);
    overflow: hidden;
}
.flow-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; z-index: 1; }
.flow-dot {
    width: 3.1rem; height: 3.1rem; border-radius: 0.95rem; display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--ion);
    border: 1px solid var(--ion-30); background: rgba(8, 12, 22, 0.9);
    box-shadow: 0 0 0 4px rgba(62, 232, 255, 0.04), 0 0 26px -6px rgba(62, 232, 255, 0.55);
    animation: node-pulse 4.5s var(--ease-soft) infinite; animation-delay: calc(var(--i, 0) * 0.6s);
}
.flow-node:nth-child(even) .flow-dot { color: #c79bff; border-color: rgba(176,107,255,.35); box-shadow: 0 0 0 4px rgba(176,107,255,.05), 0 0 26px -6px rgba(176,107,255,.6); }
.flow-node span { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.3; max-width: 12ch; }
.flow-node + .flow-node::before {
    content: ""; position: absolute; top: 1.55rem; right: 50%; width: 100%; height: 1px; z-index: -1;
    background: linear-gradient(90deg, var(--ion-30), rgba(176,107,255,.3));
}
.flow-node + .flow-node::after {
    content: ""; position: absolute; top: calc(1.55rem - 2px); right: 100%; width: 34px; height: 5px; border-radius: 4px; z-index: -1;
    background: linear-gradient(90deg, transparent, var(--ion));
    filter: drop-shadow(0 0 6px var(--ion));
    animation: signal 2.6s linear infinite; animation-delay: calc(var(--i, 0) * 0.45s);
}
@keyframes signal { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(calc(100% + 100px)); opacity: 0; } }
@keyframes node-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (max-width: 720px) {
    .flow { grid-auto-flow: row; grid-auto-columns: auto; gap: 1.4rem; padding: 1.5rem; }
    .flow-node { flex-direction: row; text-align: left; }
    .flow-node span { max-width: none; }
    .flow-node + .flow-node::before { top: auto; bottom: 100%; left: 1.55rem; right: auto; width: 1px; height: 1.4rem; }
    .flow-node + .flow-node::after { display: none; }
}

/* ---------------------------------------------------------------------------
   5. Device & app mocks — terminal, board, phone
   ------------------------------------------------------------------------ */
.mock { position: relative; }
.terminal {
    border-radius: 1.1rem; border: 1px solid var(--line-strong); overflow: hidden;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.96), rgba(4, 6, 13, 0.98));
    box-shadow: var(--shadow-lift), 0 0 80px -30px rgba(62, 232, 255, 0.35);
    font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.75;
}
.terminal-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; border-bottom: var(--hairline); color: var(--text-dim); font-size: 0.68rem; letter-spacing: 0.08em; }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3247; display: inline-block; }
.terminal-bar i:first-child { background: #ff5f57; } .terminal-bar i:nth-child(2) { background: #febc2e; } .terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-body { padding: 1.1rem 1.25rem 1.4rem; min-height: 15.5rem; color: var(--text-secondary); }
.terminal-body .ln { display: block; white-space: pre-wrap; word-break: break-word; }
.terminal-body .p { color: var(--mint); } .terminal-body .c { color: var(--ion); } .terminal-body .d { color: var(--text-dim); }
.terminal-body .ok { color: var(--mint); } .terminal-body .w { color: var(--plasma); } .terminal-body .v { color: #c79bff; }
.js-term .ln { opacity: 0; }
.js-term .ln.on { opacity: 1; transition: opacity 0.25s; }
.caret { display: inline-block; width: 0.55em; height: 1.05em; vertical-align: -0.15em; background: var(--ion); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.board {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; padding: 1rem;
    border-radius: 1.1rem; border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(12, 17, 32, 0.92), rgba(6, 9, 18, 0.95));
    box-shadow: var(--shadow-lift), 0 0 80px -30px rgba(47, 240, 168, 0.3);
}
.board-col { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; }
.board-col h4 {
    margin: 0 0 0.25rem; display: flex; justify-content: space-between; font-family: var(--font-mono);
    font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); font-weight: 500;
}
.board-card { padding: 0.65rem 0.7rem; border-radius: 0.65rem; border: var(--hairline); background: rgba(255,255,255,.03); font-size: 0.74rem; color: var(--text-secondary); }
.board-card b { display: block; color: var(--text-primary); font-weight: 500; margin-bottom: 0.35rem; font-size: 0.78rem; }
.board-card .tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.board-card .tags i { font-style: normal; font-family: var(--font-mono); font-size: 0.56rem; padding: 0.12rem 0.35rem; border-radius: 0.3rem; background: var(--ion-08); color: var(--ion); }
.board-card .tags i.n { background: rgba(176,107,255,.1); color: #c79bff; }
.board-card .tags i.m { background: rgba(47,240,168,.1); color: var(--mint); }
.board-card.moving { animation: move-card 7s var(--ease-out) infinite; border-color: var(--ion-30); box-shadow: 0 10px 30px -12px rgba(62,232,255,.45); position: relative; z-index: 2; }
@keyframes move-card { 0%, 18% { transform: translate(0, 0); } 38%, 62% { transform: translate(calc(100% + 0.75rem), -0.25rem) rotate(-1.5deg); } 82%, 100% { transform: translate(calc(100% + 0.75rem), 0); } }

.phone {
    width: min(300px, 78vw); margin-inline: auto; aspect-ratio: 9 / 18.5; border-radius: 2.4rem; padding: 0.7rem;
    background: linear-gradient(160deg, #1a2236, #080b14); border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-lift), 0 0 90px -30px var(--phone-glow, rgba(176, 107, 255, 0.5));
}
.phone-screen { height: 100%; border-radius: 1.8rem; overflow: hidden; background: #0a0d17; display: flex; flex-direction: column; position: relative; }
.phone-notch { width: 38%; height: 1.2rem; margin: 0.45rem auto 0; border-radius: 1rem; background: #000; }
.phone-head { padding: 0.75rem 1rem 0.5rem; display: flex; justify-content: space-between; align-items: center; }
.phone-head b { font-family: var(--font-display); font-size: 1rem; color: var(--text-primary); letter-spacing: -0.02em; }
.phone-chips { display: flex; gap: 0.35rem; padding: 0 1rem 0.65rem; overflow: hidden; }
.phone-chips span { font-size: 0.6rem; padding: 0.25rem 0.55rem; border-radius: 1rem; border: var(--hairline); color: var(--text-secondary); white-space: nowrap; }
.phone-chips span:first-child { background: var(--phone-accent, var(--nova)); color: #fff; border-color: transparent; }
.phone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0 0.75rem; flex: 1; align-content: start; }
.phone-tile { border-radius: 0.8rem; aspect-ratio: 3 / 4; position: relative; overflow: hidden; background: linear-gradient(150deg, var(--a, #2b1d4a), var(--b, #0e1424)); }
.phone-tile::after { content: ""; position: absolute; inset: auto 0.45rem 0.45rem; height: 0.4rem; border-radius: 0.2rem; background: rgba(255,255,255,.35); width: 55%; }
.phone-tile::before { content: ""; position: absolute; inset: 22% 26% 34%; border-radius: 50% 50% 0.6rem 0.6rem; background: rgba(255,255,255,.12); }
.phone-tile.shimmer { animation: shimmer 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.35s); }
@keyframes shimmer { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25) saturate(1.2); } }
.phone-bar { margin: 0.6rem 0.75rem 0.75rem; padding: 0.6rem; border-radius: 1rem; background: var(--phone-accent, var(--nova)); color: #fff; text-align: center; font-size: 0.72rem; font-weight: 600; }

/* ---------------------------------------------------------------------------
   6. Outcome cards, stack chips, proof band
   ------------------------------------------------------------------------ */
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.85rem, 1.4vw, 1.25rem); }
.outcome { padding: 1.6rem; }
.outcome .no { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; color: var(--ion); }
.outcome h3 { font-size: 1.15rem; margin: 0.9rem 0 0.55rem; }
.outcome p { font-size: 0.9rem; line-height: 1.6; margin: 0; color: var(--text-muted); }
@media (max-width: 860px) { .outcomes { grid-template-columns: 1fr; } }

.stack-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.stack-chips span {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; padding: 0.45rem 0.75rem;
    border-radius: 0.55rem; border: var(--hairline); background: rgba(255,255,255,.025); color: var(--text-secondary);
    transition: border-color .25s, color .25s, transform .25s;
}
.stack-chips span:hover { border-color: var(--ion-30); color: var(--ion); transform: translateY(-2px); }

.proof {
    display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; padding: 1.5rem 1.6rem;
    background: radial-gradient(120% 140% at 0% 0%, rgba(47,240,168,.09), transparent 55%), var(--surface);
}
.proof .proof-ico { width: 2.6rem; height: 2.6rem; border-radius: 0.8rem; display: grid; place-items: center; color: var(--mint); border: 1px solid rgba(47,240,168,.25); background: rgba(47,240,168,.08); }
.proof b { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mint); margin-bottom: 0.4rem; font-weight: 500; }
.proof p { margin: 0; line-height: 1.65; }

.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.feature-grid li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.95rem; color: var(--text-secondary); padding: 0.55rem 0; border-bottom: var(--hairline); }
.feature-grid li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.55em; border-radius: 2px; background: var(--ion); box-shadow: 0 0 10px var(--ion); }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.two-col.top { align-items: start; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   7. FAQ
   ------------------------------------------------------------------------ */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.faq-head { position: sticky; top: 8rem; margin-bottom: 0; }
.faq-list { display: flex; flex-direction: column; gap: 0.7rem; }
.faq-item { padding: 0; }
.faq-item summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1.15rem 1.35rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.02rem; line-height: 1.4; margin: 0; letter-spacing: -0.015em; font-weight: 500; }
.faq-item p { margin: 0; padding: 0 1.35rem 1.25rem; font-size: 0.94rem; line-height: 1.7; color: var(--text-muted); }
.faq-plus { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 0.5rem; border: var(--hairline); position: relative; transition: transform 0.35s var(--ease-out), border-color .25s; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; background: var(--ion); transform: translate(-50%, -50%); }
.faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform 0.35s var(--ease-out); }
.faq-item[open] .faq-plus { border-color: var(--ion-30); }
.faq-item[open] .faq-plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-item[open] { border-color: var(--ion-15); }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; } .faq-head { position: static; } }

/* ---------------------------------------------------------------------------
   8. Document layout — legal pages and articles
   ------------------------------------------------------------------------ */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.doc.wide { grid-template-columns: minmax(0, 1fr) 300px; }
.toc { position: sticky; top: 8rem; font-size: 0.84rem; }
.toc b { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.85rem; font-weight: 500; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: var(--hairline); }
.toc li a { display: block; padding: 0.38rem 0 0.38rem 0.95rem; margin-left: -1px; border-left: 1px solid transparent; color: var(--text-muted); text-decoration: none; line-height: 1.35; transition: color .2s, border-color .2s; }
.toc li a:hover { color: var(--text-primary); }
.toc li a.active { color: var(--ion); border-left-color: var(--ion); }
.toc li.sub a { padding-left: 1.7rem; font-size: 0.78rem; }
@media (max-width: 960px) { .doc, .doc.wide { grid-template-columns: 1fr; } .toc { position: static; display: none; } }

.prose { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.8; max-width: 74ch; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: clamp(1.4rem, 1.2vw + 1rem, 1.85rem); line-height: 1.2; color: var(--text-primary); margin-top: 2.75rem; padding-top: 0.25rem; scroll-margin-top: 8rem; letter-spacing: -0.03em; }
.prose h3 { font-size: 1.18rem; color: var(--text-primary); margin-top: 2rem; scroll-margin-top: 8rem; letter-spacing: -0.02em; }
.prose h4 { font-size: 1.02rem; color: var(--text-primary); margin-top: 1.5rem; }
.prose p, .prose li { color: var(--text-secondary); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.4rem; }
.prose li::marker { color: var(--ion); }
.prose a { color: var(--ion); text-underline-offset: 3px; }
.prose strong { color: var(--text-primary); }
.prose blockquote { margin-left: 0; padding: 0.9rem 1.2rem; border-left: 2px solid var(--ion); background: rgba(62,232,255,.04); border-radius: 0 0.6rem 0.6rem 0; color: var(--text-muted); }
.prose code { font-family: var(--font-mono); font-size: 0.86em; padding: 0.12rem 0.38rem; border-radius: 0.35rem; background: rgba(255,255,255,.06); color: #cfe9ff; }
.prose pre { position: relative; padding: 1.1rem 1.2rem; border-radius: 0.9rem; border: var(--hairline); background: #060912; overflow-x: auto; font-size: 0.84rem; line-height: 1.65; }
.prose pre code { background: none; padding: 0; color: #d6e2ff; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: var(--hairline); }
.prose th { color: var(--text-primary); font-weight: 600; }
.prose img { max-width: 100%; height: auto; border-radius: 0.9rem; }
.prose hr { border: 0; border-top: var(--hairline); margin: 2.5rem 0; }
.copy-btn {
    position: absolute; top: 0.55rem; right: 0.55rem; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: .1em; text-transform: uppercase;
    padding: 0.3rem 0.55rem; border-radius: 0.45rem; border: var(--hairline); background: rgba(255,255,255,.04); color: var(--text-muted); cursor: pointer;
}
.copy-btn:hover { color: var(--ion); border-color: var(--ion-30); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.doc-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.read-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad-aurora); z-index: 10001; box-shadow: 0 0 12px var(--ion); }

/* ---------------------------------------------------------------------------
   9. Forms, alerts, auth portal
   ------------------------------------------------------------------------ */
.orbit-form { display: grid; gap: 1.1rem; }
.orbit-form label, .auth-form label, .field label {
    display: block; margin-bottom: 0.45rem; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
}
.orbit-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .orbit-form textarea, .orbit-form select,
.form-control, .auth-form input:not([type=checkbox]):not([type=hidden]), .auth-form textarea, .auth-form select {
    width: 100%; padding: 0.85rem 1rem; border-radius: 0.8rem; border: 1px solid var(--line-strong);
    background: rgba(4, 6, 13, 0.6); color: var(--text-primary); font: inherit; font-size: 0.95rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.orbit-form textarea, .auth-form textarea { min-height: 9rem; resize: vertical; }
.orbit-form input:focus, .orbit-form textarea:focus, .orbit-form select:focus,
.form-control:focus, .auth-form input:focus, .auth-form textarea:focus, .auth-form select:focus {
    outline: none; border-color: var(--ion-30); background: rgba(8, 12, 22, 0.85); box-shadow: 0 0 0 4px rgba(62,232,255,.08);
}
.orbit-form ::placeholder, .form-control::placeholder { color: var(--text-dim); }
.form-errors, .errorlist { color: #ff8a8a; font-size: 0.82rem; list-style: none; padding: 0; margin: 0.4rem 0 0; }

.alert, .message {
    display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.95rem 1.1rem; border-radius: 0.85rem; font-size: 0.92rem;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-secondary); margin-bottom: 1rem;
}
.alert.success, .message.success { border-color: rgba(47,240,168,.3); background: rgba(47,240,168,.07); color: #b8ffe3; }
.alert.error, .message.error, .message.danger { border-color: rgba(255,107,107,.3); background: rgba(255,107,107,.07); color: #ffc9c9; }
.message.info, .message.warning { border-color: var(--ion-15); background: var(--ion-08); color: #cdf7ff; }

.auth-section { padding: clamp(8.5rem, 16vh, 11rem) 0 clamp(4rem, 8vw, 6rem); }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.auth-card {
    position: relative; padding: clamp(1.75rem, 3vw, 2.5rem); border-radius: 1.4rem; border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(19, 26, 44, 0.75), rgba(8, 12, 22, 0.85));
    box-shadow: var(--shadow-lift), 0 0 80px -40px rgba(62,232,255,.45); backdrop-filter: blur(14px);
}
.auth-card h2 { font-size: 1.7rem; margin-bottom: 0.4rem; }
.auth-card .subtitle { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.92rem; }
.auth-form { display: grid; gap: 1.1rem; }
.auth-links { margin-top: 1.4rem; text-align: center; font-size: 0.9rem; color: var(--text-muted); }
.auth-links a { color: var(--ion); }
@media (max-width: 900px) { .auth-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------------
   10. Cards — posts, roles, filters, pager
   ------------------------------------------------------------------------ */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.85rem, 1.4vw, 1.25rem); }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; }
.post-media { aspect-ratio: 16 / 9; overflow: hidden; position: relative; background: radial-gradient(120% 120% at 0% 0%, rgba(62,232,255,.22), transparent 55%), radial-gradient(120% 120% at 100% 100%, rgba(176,107,255,.25), transparent 55%), var(--ink-800); }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); filter: saturate(0.85); }
.post-card:hover .post-media img { transform: scale(1.05); }
.post-media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 2.4rem; color: rgba(255,255,255,.14); letter-spacing: -0.04em; }
.post-body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.post-body h3 { font-size: 1.12rem; line-height: 1.3; margin: 0; color: var(--text-primary); }
.post-body p { font-size: 0.88rem; line-height: 1.6; color: var(--text-muted); margin: 0; }
.post-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 0.6rem; font-size: 0.8rem; color: var(--text-dim); }
.post-feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 0; overflow: hidden; text-decoration: none; margin-bottom: clamp(1rem, 2vw, 1.5rem); }
.post-feature .post-media { aspect-ratio: auto; min-height: 320px; }
.post-feature .post-body { padding: clamp(1.5rem, 3vw, 2.5rem); justify-content: center; }
.post-feature h2 { font-size: clamp(1.5rem, 2vw + 0.8rem, 2.3rem); margin: 0; }
@media (max-width: 860px) { .post-feature { grid-template-columns: 1fr; } .post-feature .post-media { min-height: 220px; } }

.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filter-row a {
    font-size: 0.82rem; padding: 0.5rem 0.9rem; border-radius: 2rem; border: var(--hairline); color: var(--text-muted); text-decoration: none;
    transition: color .2s, border-color .2s, background .2s;
}
.filter-row a:hover { color: var(--text-primary); border-color: var(--line-strong); }
.filter-row a.on { color: var(--void); background: var(--ion); border-color: var(--ion); font-weight: 600; }
.search-bar { display: flex; gap: 0.6rem; max-width: 640px; }
.search-bar input { flex: 1; min-width: 0; }
.center .search-bar { margin-inline: auto; }
.pager { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 3rem; flex-wrap: wrap; }
.pager a, .pager span { padding: 0.55rem 1rem; border-radius: 0.7rem; border: var(--hairline); font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.pager span { border-color: transparent; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.72rem; }
.pager a:hover { border-color: var(--ion-30); color: var(--ion); }

.role-list { display: flex; flex-direction: column; gap: 0.75rem; }
.role {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1.35rem 1.5rem; text-decoration: none;
}
.role h3 { font-size: 1.2rem; margin: 0.4rem 0 0.5rem; color: var(--text-primary); }
.role .meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font-size: 0.84rem; color: var(--text-muted); }
.role .meta span { display: inline-flex; gap: 0.4rem; align-items: center; }
.role .arrow { width: 2.6rem; height: 2.6rem; border-radius: 0.8rem; display: grid; place-items: center; border: var(--hairline); color: var(--ion); transition: transform .35s var(--ease-out), border-color .25s; }
.role:hover .arrow { transform: translateX(4px); border-color: var(--ion-30); }
.side-card { position: sticky; top: 8rem; padding: 1.6rem; }
.side-card dl { margin: 0 0 1.4rem; display: grid; gap: 0.85rem; }
.side-card dt { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.side-card dd { margin: 0.2rem 0 0; color: var(--text-primary); font-size: 0.95rem; }
.side-card .btn { width: 100%; justify-content: center; }
.side-card .btn + .btn { margin-top: 0.6rem; }

.empty { padding: 3rem 1.5rem; text-align: center; }
.empty h3 { margin-bottom: 0.5rem; }
.empty p { color: var(--text-muted); max-width: 46ch; margin: 0 auto 1.5rem; }

/* ---------------------------------------------------------------------------
   11. Timeline, values, contact cards
   ------------------------------------------------------------------------ */
.timeline { position: relative; display: grid; gap: 1.1rem; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 0.5rem; top: 0.4rem; bottom: 0.4rem; width: 1px; background: linear-gradient(var(--ion), var(--nova), transparent); }
.tl-item { position: relative; padding: 1.25rem 1.4rem; }
.tl-item::before { content: ""; position: absolute; left: -1.9rem; top: 1.55rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--void); border: 2px solid var(--ion); box-shadow: 0 0 14px var(--ion); }
.tl-item time { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ion); }
.tl-item h3 { font-size: 1.12rem; margin: 0.45rem 0 0.35rem; }
.tl-item p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

.contact-cards { display: grid; gap: 0.75rem; }
.contact-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; text-decoration: none; }
.contact-card .ico { width: 2.6rem; height: 2.6rem; border-radius: 0.8rem; display: grid; place-items: center; color: var(--ion); border: 1px solid var(--ion-15); background: var(--ion-08); }
.contact-card b { display: block; color: var(--text-primary); font-weight: 500; }
.contact-card span { font-size: 0.88rem; color: var(--text-muted); }
.contact-card.wa .ico { color: var(--mint); border-color: rgba(47,240,168,.25); background: rgba(47,240,168,.08); }

/* Magnetic buttons (JS sets --mx / --my) */
.btn-primary, .btn-secondary { transform: translate(var(--mx, 0), var(--my, 0)); }

/* ---------------------------------------------------------------------------
   12. 404 / 500
   ------------------------------------------------------------------------ */
.lost { min-height: 88vh; display: grid; place-items: center; text-align: center; padding: 9rem 1.25rem 4rem; position: relative; overflow: hidden; }
.lost-code {
    font-family: var(--font-display); font-weight: 600; font-size: clamp(6rem, 20vw, 13rem); line-height: 0.9; letter-spacing: -0.07em;
    background: var(--grad-aurora); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 60px rgba(62,232,255,.25));
}
.lost-orbit { position: absolute; left: 50%; top: 48%; width: min(720px, 120vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1px dashed rgba(150,178,255,.14); animation: spin-slow 40s linear infinite; pointer-events: none; }
.lost-orbit::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--ion); box-shadow: 0 0 18px var(--ion); }
.lost h1 { font-size: clamp(1.8rem, 3vw + 1rem, 2.8rem); margin: 1rem 0 0.8rem; }
.lost p { color: var(--text-muted); max-width: 46ch; margin: 0 auto 2rem; }
.lost .hero-actions { justify-content: center; }

/* ---------------------------------------------------------------------------
   13. Section helpers
   ------------------------------------------------------------------------ */
.section-tight-top { padding-top: clamp(2.5rem, 5vw, 4rem); }
.muted { color: var(--text-muted); }
.lead-sm { font-size: 1.02rem; line-height: 1.7; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.stats-inline { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.stats-inline .chip { font-size: 0.64rem; }

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    .flow-dot, .flow-node + .flow-node::after, .board-card.moving, .phone-tile.shimmer,
    .glow-border::after, .lost-orbit, .caret { animation: none !important; }
    .btn-primary, .btn-secondary { transform: none; }
}

/* ---------------------------------------------------------------------------
   14. "At a glance" fact strip
   ------------------------------------------------------------------------ */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: var(--hairline); border-radius: var(--radius-2xl, 1.5rem); overflow: hidden; background: var(--surface); }
.fact { margin: 0; padding: 1.35rem 1.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.fact + .fact { border-left: var(--hairline); }
.fact b { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 1.6vw + 1rem, 2.2rem); letter-spacing: -0.04em; color: var(--text-primary); line-height: 1; }
.fact span { font-size: 0.84rem; color: var(--text-muted); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } .fact:nth-child(3) { border-left: 0; } .fact:nth-child(n+3) { border-top: var(--hairline); } }

/* ---------------------------------------------------------------------------
   15. Fixes against legacy style.css
   ------------------------------------------------------------------------ */
/* style.css styles every <nav> as the site header (max-width, padding). */
nav.crumbs, nav.toc, nav.pager { max-width: none; margin-left: 0; margin-right: 0; padding: 0; }
nav.crumbs { margin-bottom: 1.5rem; }
nav.pager { margin-top: 3rem; }
.center nav.crumbs, .lk-hero nav.crumbs { margin-left: auto; margin-right: auto; }
/* style.css centres the page-header lead; v2 heroes are left-aligned. */
.hero-v2:not(.center) .lead { margin-left: 0; margin-right: 0; }
.hero-v2 h1 { font-size: clamp(2.6rem, 3.8vw + 0.6rem, 4.4rem); line-height: 1.0; }
.mono-word { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: -0.02em; color: var(--ion); }
.lk-hero .tldr { margin-left: auto; margin-right: auto; }
