.hub-page {
    --cyan: #00f0ff;
    --violet: #8e71ff;
    --blue: #3894ff;
}

.hub {
    position: relative;
    min-height: 100svh;
    padding: 118px 0 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    overflow: hidden;
    isolation: isolate;
    background-color: #03100c;
    background-image:
        repeating-linear-gradient(0deg, transparent 0 59px, rgba(130, 230, 186, 0.025) 60px),
        repeating-linear-gradient(90deg, transparent 0 59px, rgba(130, 230, 186, 0.025) 60px);
}

.hub-backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.hub-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 820px;
    max-height: 820px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
}

.hub-glow-recovery {
    left: -18vw;
    top: 10%;
    background: radial-gradient(circle, rgba(130, 230, 186, 0.22), transparent 62%);
}

.hub-glow-compute {
    right: -18vw;
    top: 20%;
    background: radial-gradient(circle, rgba(142, 113, 255, 0.24), rgba(0, 240, 255, 0.06) 45%, transparent 66%);
}

.hub-scanline {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(130, 230, 186, 0.5), rgba(0, 240, 255, 0.5), transparent);
    opacity: 0;
}

.hub-head {
    text-align: center;
}

.hub-head .hero-kicker {
    justify-content: center;
}

.hub h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    line-height: 1.16;
    text-wrap: balance;
}

.hub-h1-split {
    background: linear-gradient(90deg, #b9f3ff, var(--cyan) 40%, var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hub-lead {
    margin: 0;
    color: var(--muted);
    font-size: 1.04rem;
}

.hub-panels {
    display: flex;
    gap: 20px;
    width: min(1180px, calc(100% - 40px));
}

.hub-panel {
    --accent: var(--green);
    --accent-soft: rgba(130, 230, 186, 0.12);
    --accent-line: rgba(130, 230, 186, 0.32);
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 470px;
    display: grid;
    grid-template-rows: auto 190px 1fr;
    gap: 6px;
    padding: 22px 26px 24px;
    overflow: hidden;
    border: 1px solid var(--accent-line);
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 50% 18%, var(--accent-soft), transparent 62%),
        rgba(6, 18, 14, 0.82);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
    transition: flex-grow 520ms cubic-bezier(.2, .8, .2, 1), border-color 300ms ease, opacity 300ms ease;
}

.hub-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--hub-angle, 0deg), transparent 0 70%, var(--accent) 82%, transparent 92%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

.hub-panel-compute {
    --accent: var(--cyan);
    --accent-soft: rgba(142, 113, 255, 0.18);
    --accent-line: rgba(0, 240, 255, 0.3);
    background:
        radial-gradient(ellipse at 50% 18%, var(--accent-soft), transparent 62%),
        rgba(8, 10, 26, 0.82);
}

.hub-panel:hover,
.hub-panel:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.hub-panel:hover::before,
.hub-panel:focus-visible::before {
    opacity: 1;
}

.hub-panel:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow);
}

@media (hover: hover) and (min-width: 861px) {
    .hub-panels:hover .hub-panel {
        flex-grow: 0.86;
        opacity: 0.78;
    }

    .hub-panels .hub-panel:hover {
        flex-grow: 1.18;
        opacity: 1;
    }
}

.hub-panel-index {
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hub-art {
    position: relative;
    display: block;
    width: 100%;
    height: 190px;
}

.hub-panel-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hub-panel-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.hub-panel-sub {
    color: var(--muted);
    font-size: 0.98rem;
}

.hub-panel-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 10px 0 4px;
}

.hub-panel-list > span {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #d9ebe1;
    font-size: 0.88rem;
}

.hub-panel-compute .hub-panel-list > span {
    color: #dbe3f7;
}

.hub-panel-list i {
    width: 16px;
    color: var(--accent);
    text-align: center;
}

.hub-panel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
}

.hub-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.hub-badge-pending {
    border-color: rgba(241, 199, 91, 0.4);
    color: var(--amber);
}

.hub-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 9px;
    background: var(--accent);
    color: #04100b;
    font-weight: 800;
}

.hub-panel-compute .hub-cta {
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    color: #070a1a;
}

.hub-cta i {
    transition: transform 260ms ease;
}

.hub-panel:hover .hub-cta i,
.hub-panel:focus-visible .hub-cta i {
    transform: translateX(4px);
}

/* Recovery art: rotating vault dial with floating recovery clues. */
.vault-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.vault-ring-outer {
    width: 176px;
    height: 176px;
    border: 1px dashed rgba(130, 230, 186, 0.35);
}

.vault-ring-mid {
    width: 132px;
    height: 132px;
    border: 2px solid transparent;
    border-top-color: var(--green);
    border-right-color: rgba(130, 230, 186, 0.3);
}

.vault-ring-inner {
    width: 92px;
    height: 92px;
    border: 1px solid rgba(241, 199, 91, 0.45);
    background: repeating-conic-gradient(from 0deg, rgba(241, 199, 91, 0.5) 0 2deg, transparent 2deg 30deg);
    -webkit-mask: radial-gradient(circle, transparent 38px, #000 39px);
    mask: radial-gradient(circle, transparent 38px, #000 39px);
}

.vault-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, #1d4a35, #0a2017);
    box-shadow: 0 0 30px rgba(130, 230, 186, 0.3);
    color: var(--green);
    font-size: 1.4rem;
    transform: translate(-50%, -50%);
}

.vault-chip {
    position: absolute;
    padding: 4px 9px;
    border: 1px solid rgba(130, 230, 186, 0.3);
    border-radius: 6px;
    background: rgba(12, 32, 23, 0.92);
    color: #cfe8da;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    white-space: nowrap;
}

.vault-chip-a { left: 8%; top: 14%; }
.vault-chip-b { right: 8%; top: 22%; border-color: rgba(241, 199, 91, 0.55); border-style: dashed; color: var(--amber); }
.vault-chip-c { left: 12%; bottom: 14%; }
.vault-chip-d { right: 10%; bottom: 10%; color: var(--teal); }

/* Compute art: node mesh feeding a central grid hub. */
.hub-art-compute svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.mesh-links path {
    fill: none;
    stroke: rgba(0, 240, 255, 0.35);
    stroke-width: 1.2;
    stroke-dasharray: 3 5;
}

.mesh-links .mesh-weak {
    stroke: rgba(142, 113, 255, 0.28);
    stroke-dasharray: none;
}

.mesh-packets circle {
    fill: var(--cyan);
    filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.9));
}

.mesh-nodes rect {
    fill: #10132e;
    stroke: var(--violet);
    stroke-width: 1.4;
}

.mesh-hub {
    fill: #121a3d;
    stroke: var(--cyan);
    stroke-width: 2;
}

.mesh-hub-pulse {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 1.2;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}

.hub-art-compute text {
    fill: #c9f9ff;
    font: 700 12px Inter, Arial, sans-serif;
    letter-spacing: 0.12em;
}

@media (prefers-reduced-motion: no-preference) {
    .vault-ring-outer { animation: vault-spin 38s linear infinite; }
    .vault-ring-mid { animation: vault-spin 6s linear infinite; }
    .vault-ring-inner { animation: vault-spin 22s linear infinite reverse; }
    .vault-core { animation: vault-breathe 3.2s ease-in-out infinite; }
    .vault-chip { animation: chip-float 6s ease-in-out infinite; }
    .vault-chip-b { animation-name: chip-float, chip-blink; animation-duration: 6s, 1.6s; animation-delay: -1.5s, 0s; }
    .vault-chip-c { animation-delay: -3s; }
    .vault-chip-d { animation-delay: -4.5s; }
    .mesh-links path:not(.mesh-weak) { animation: mesh-dash 1.6s linear infinite; }
    .mesh-hub-pulse { animation: mesh-pulse 2.8s ease-out infinite; }
    .mesh-nodes rect { animation: mesh-node 3.6s ease-in-out infinite; }
    .mesh-nodes rect:nth-child(2n) { animation-delay: -1.2s; }
    .mesh-nodes rect:nth-child(3n) { animation-delay: -2.4s; }
    .hub-scanline { animation: hub-scan 7s ease-in-out infinite; }
    .hub-panel::before { animation: hub-border 4s linear infinite; }
}

@media (prefers-reduced-motion: reduce) {
    .mesh-packets { display: none; }
    .hub-panel { transition: none; }
}

@property --hub-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes hub-border { to { --hub-angle: 360deg; } }
@keyframes vault-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes vault-breathe { 0%, 100% { box-shadow: 0 0 18px rgba(130, 230, 186, 0.2); } 50% { box-shadow: 0 0 40px rgba(130, 230, 186, 0.45); } }
@keyframes chip-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes chip-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes mesh-dash { to { stroke-dashoffset: -16; } }
@keyframes mesh-pulse { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes mesh-node { 0%, 100% { stroke: var(--violet); } 50% { stroke: var(--cyan); } }
@keyframes hub-scan { 0% { top: 0; opacity: 0; } 10% { opacity: 0.8; } 90% { opacity: 0.6; } 100% { top: 100%; opacity: 0; } }

/* Architecture diagram */
.hub-architecture {
    background: #081812;
}

.arch {
    display: grid;
    justify-items: center;
}

.arch-root {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.arch-root img {
    border-radius: 8px;
}

.arch-root span {
    display: grid;
}

.arch-root small {
    color: var(--muted);
    font-size: 0.76rem;
}

.arch-trunk {
    position: relative;
    width: 100%;
    height: 44px;
}

.arch-trunk::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    height: 22px;
    border-left: 1px solid var(--line-strong);
}

.arch-trunk::after {
    content: "";
    position: absolute;
    left: calc(100% / 6);
    right: calc(100% / 6);
    top: 22px;
    height: 22px;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.arch-trunk span {
    position: absolute;
    left: 50%;
    top: 0;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
    opacity: 0;
}

.arch-branches {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.62fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
}

.arch-branch {
    --accent: var(--green);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-radius: 12px;
    background: var(--panel);
}

.arch-branch-compute {
    --accent: #00f0ff;
    background: rgba(9, 13, 30, 0.85);
}

.arch-branch-head {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: baseline;
    color: var(--text);
    text-decoration: none;
}

.arch-branch-head b {
    grid-row: span 2;
    color: var(--accent);
    font-size: 0.8rem;
}

.arch-branch-head strong {
    font-size: 1.3rem;
}

.arch-branch-head small {
    color: var(--muted);
    font-size: 0.76rem;
}

.arch-branch-head:hover strong,
.arch-branch-head:focus-visible strong {
    color: var(--accent);
}

.arch-flow {
    counter-reset: arch;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.arch-flow li {
    counter-increment: arch;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #d8e7df;
    font-size: 0.88rem;
}

.arch-flow li::before {
    content: counter(arch, decimal-leading-zero);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 800;
}

.arch-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.arch-links a {
    padding: 4px 10px;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.78rem;
    text-decoration: none;
}

.arch-links a:hover,
.arch-links a:focus-visible {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.arch-bridge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    text-align: center;
}

.arch-bridge p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.7;
}

.arch-bridge strong {
    display: block;
    margin-bottom: 4px;
    color: var(--amber);
    font-size: 0.9rem;
}

.arch-bridge-line {
    position: relative;
    display: block;
    height: 2px;
    background: linear-gradient(90deg, var(--green), #00f0ff);
    opacity: 0.55;
}

.arch-bridge-line::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -4px;
    border: 5px solid transparent;
    border-left-color: #00f0ff;
    border-right: 0;
}

.arch-bridge-back {
    background: linear-gradient(270deg, #00f0ff, var(--green));
}

.arch-bridge-back::after {
    left: -1px;
    right: auto;
    border-left: 0;
    border-right: 5px solid var(--green);
}

.arch-bridge-line span {
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px #00f0ff;
    opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
    .arch-trunk span { animation: arch-drop 2.8s ease-in infinite; }
    .arch-bridge-line span { animation: arch-travel 2.6s linear infinite; }
    .arch-bridge-back span { animation-name: arch-travel-back; animation-delay: 1.3s; }
    .arch.is-revealed .arch-flow li { animation: arch-step 520ms ease both; }
    .arch.is-revealed .arch-flow li:nth-child(2) { animation-delay: 120ms; }
    .arch.is-revealed .arch-flow li:nth-child(3) { animation-delay: 240ms; }
    .arch.is-revealed .arch-flow li:nth-child(4) { animation-delay: 360ms; }
}

@keyframes arch-drop { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 60%, 100% { top: 20px; opacity: 0; } }
@keyframes arch-travel { 0% { left: 0; opacity: 0; } 15%, 80% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes arch-travel-back { 0% { left: calc(100% - 8px); opacity: 0; } 15%, 80% { opacity: 1; } 100% { left: 0; opacity: 0; } }
@keyframes arch-step { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
    .hub {
        min-height: auto;
        padding-top: 104px;
    }

    .hub-panels {
        flex-direction: column;
    }

    .hub-panel {
        flex: none;
        min-height: 0;
        grid-template-rows: auto 160px auto;
    }

    .hub-art {
        height: 160px;
    }

    .arch-trunk::after {
        left: 50%;
        right: auto;
        border-right: 0;
        border-radius: 0;
    }

    .arch-branches {
        grid-template-columns: minmax(0, 1fr);
    }

    .arch-bridge {
        padding: 4px 12%;
    }
}

@media (max-width: 640px) {
    .hub-panels {
        width: min(100% - 28px, 1180px);
    }

    .hub-panel {
        padding: 18px 18px 20px;
    }

    .hub-h1-split {
        display: block;
    }

    .hub-panel-title {
        font-size: 1.66rem;
    }

    .hub-panel-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .hub-cta {
        width: 100%;
        justify-content: center;
    }

    .vault-chip {
        font-size: 0.64rem;
    }
}
