/* ============================================================================
   hub-templates.css — the Lab Hub template system.
   One place for: the hub chrome (index + post), the prose kit, the per-type
   templates and the resource file-type panels.
   Loaded by /hub/ pages only. Colours are the site's own vocabulary:
   #CBD2DC steel text, #8E939C muted, #c9a96a brass (material only), #07080b
   panels, #17181c hairlines. No yellow text anywhere.
   ============================================================================ */

:root {
    --hp-bg:      #050608;
    --hp-panel:   #07080b;
    --hp-panel-2: #040507;
    --hp-line:    #17181c;
    --hp-line-2:  rgba(255, 255, 255, 0.07);
    --hp-steel:   #CBD2DC;
    --hp-muted:   #8E939C;
    --hp-dim:     #6B7280;
    --hp-white:   #fff;
    --hp-brass:   #c9a96a;
    --hp-good:    #34d399;
}

/* --- hub shell (index) --------------------------------------------------- */
body.hub-body{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif!important}
.hub-shell{min-height:100vh;padding-top:80px}
.hub-side{position:fixed;top:80px;bottom:0;left:0;width:240px;padding:28px 18px;border-right:1px solid rgba(255,255,255,.08);background:rgba(5,6,8,.88);z-index:40;display:flex;flex-direction:column;gap:26px}
.hub-nav{display:flex;flex-direction:column;gap:6px}
.hub-nav a{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;color:#9aa0ab;font-family:var(--font-mono);font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;text-decoration:none;border:1px solid transparent}
.hub-nav a:hover{color:#e5e7eb}
.hub-nav a.active{background:rgba(255,255,255,.06);color:#fff;border-color:rgba(255,255,255,.14)}
.hub-nav a.active::before{content:"";width:6px;height:6px;border-radius:50%;background:#c9a96a;flex:none}
.hub-main{margin-left:240px;padding:44px 34px 70px;max-width:1200px}
.hub-eyebrow{font-family:var(--font-mono);font-size:11px;letter-spacing:.3em;text-transform:uppercase;color:#CBD2DC;display:flex;align-items:center;gap:12px}
.hub-eyebrow::before{content:"";width:34px;height:1px;background:rgba(201,169,106,.5)}
.hub-main h1{color:#fff;font-size:clamp(28px,4vw,44px);font-weight:800;letter-spacing:-.02em;margin:14px 0 10px;text-transform:uppercase}
.hub-sub{color:#9aa0ab;font-size:14px;line-height:1.7;max-width:640px;font-weight:300}
.hub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px;margin-top:32px}
.hub-card{position:relative;display:flex;flex-direction:column;padding:22px;text-decoration:none;color:inherit}
.hub-card h2{color:#fff;font-size:16px;font-weight:700;line-height:1.35;margin:12px 0 8px}
.hub-card p{color:#9aa0ab;font-size:12.5px;line-height:1.65;font-weight:300;flex:1}
.hub-meta{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:16px;padding-top:14px;border-top:1px solid rgba(255,255,255,.07);font-family:var(--font-mono);font-size:10px;letter-spacing:.08em;color:#8E939C;text-transform:uppercase}
.chip{align-self:flex-start;font-family:var(--font-mono);font-size:9.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#d4d4d8;border:1px solid rgba(255,255,255,.14);border-radius:4px;padding:3px 8px}
.chip.gold{color:#CBD2DC;border-color:rgba(201,169,106,.45)}
.hub-thumb{position:relative;margin:-22px -22px 0;border-radius:22px 22px 0 0;overflow:hidden;border-bottom:1px solid rgba(255,255,255,.08)}
.hub-thumb img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}
.hub-dur{position:absolute;right:10px;bottom:10px;font-family:var(--font-mono);font-size:10px;font-weight:700;background:rgba(5,6,8,.85);border:1px solid rgba(255,255,255,.15);color:#fff;border-radius:5px;padding:2px 7px}
.hub-cta{margin-top:14px;font-family:var(--font-mono);font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#CBD2DC}
.hub-empty{grid-column:1/-1;padding:48px 24px;text-align:center;color:#8E939C;font-family:var(--font-mono);font-size:12px;letter-spacing:.1em;border:1px dashed rgba(255,255,255,.12);border-radius:16px}
.hub-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:30px}
.hub-search{flex:1;min-width:220px;background:#0a0a0d;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:10px 14px;color:#fff;font-size:13px;outline:none;font-family:inherit}
.hub-search::placeholder{color:#6b7078}
.hub-search:focus{border-color:rgba(201,169,106,.5)}
.fchip{font-family:var(--font-mono);font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#9aa0ab;background:transparent;border:1px solid rgba(255,255,255,.14);border-radius:999px;padding:7px 13px;cursor:pointer}
.fchip:hover{color:#e5e7eb}
a.fchip{text-decoration:none;display:inline-block}
.fchip.on{background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.055));color:#f2f4f7;border-color:rgba(255,255,255,.24);box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 6px 18px -12px rgba(0,0,0,.9)}
.hub-side .hub-cats{display:flex;flex-direction:column;gap:2px;padding:0 6px}
.hub-side .hub-cats>b{font-family:var(--font-mono);font-size:9px;letter-spacing:.28em;color:#8E939C;margin:0 0 6px 10px;font-weight:700}
.hub-side .hub-cats a{font-family:var(--font-mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:#9aa0ab;text-decoration:none;padding:8px 10px;border-radius:8px;display:flex;justify-content:space-between;gap:8px}
.hub-side .hub-cats a:hover{color:#e5e7eb;background:rgba(255,255,255,.04)}
.hub-side .hub-cats a.active{color:#fff;background:rgba(255,255,255,.06)}
.hub-side .hub-cats a span{color:#8E939C}
@media (max-width:1023.98px){
.hub-side{position:sticky;top:80px;width:auto;flex-direction:row;align-items:center;gap:16px;padding:12px 16px;border-right:0;border-bottom:1px solid rgba(255,255,255,.08);overflow-x:auto}
.hub-nav{flex-direction:row;gap:8px}
.hub-nav a{white-space:nowrap;padding:9px 12px}
.hub-main{margin-left:0;padding:30px 16px 56px}
.hub-side .hub-cats{display:none}
}

/* --- post shell ---------------------------------------------------------- */
.post-shell{max-width:1180px;margin:0 auto;padding:116px 22px 110px;display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:56px}
.post-back{font-family:var(--font-mono);font-size:10.5px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#CBD2DC;text-decoration:none}
.post-back:hover{color:#fff}
.post-chip{display:inline-block;font-family:var(--font-mono);font-size:9.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#CBD2DC;border:1px solid rgba(201,169,106,.45);border-radius:4px;padding:3px 9px}
.post-title{color:#fff;font-size:clamp(26px,4.5vw,40px);font-weight:800;letter-spacing:-.02em;line-height:1.12;margin:14px 0 0}
.post-dek{margin:14px 0 0;color:#a6adb8;font-size:17px;line-height:1.65;font-weight:300;max-width:56ch}
.post-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;margin-top:20px;padding:13px 0;border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08);font-family:var(--font-mono);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:#8E939C}
.pm-author{display:inline-flex;align-items:center;gap:9px;color:#d4d4d8}
.ps-ava-img{width:28px;height:28px;border-radius:8px;object-fit:cover;border:1px solid rgba(255,255,255,.14)}
.dot{width:3px;height:3px;border-radius:50%;background:#4b5563}
.post-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin-top:22px}
.post-stat{border:1px solid rgba(255,255,255,.09);border-top-color:rgba(255,255,255,.22);border-radius:14px;padding:14px 16px;background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012))}
.post-stat-value{display:block;color:#fff;font-size:24px;font-weight:800;letter-spacing:-.02em}
.post-stat-label{display:block;margin-top:4px;font-family:var(--font-mono);font-size:9px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:#8E939C}
.post-media{margin-top:30px}
.post-cover{border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.1);aspect-ratio:16/9;max-height:460px}
.post-cover img{width:100%;max-height:420px;object-fit:cover;display:block}
.post-embed{aspect-ratio:16/9;border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.12);background:#000}
.post-embed iframe{width:100%;height:100%;border:0;display:block}
.post-view{margin-top:14px;border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.12);background:#0a0a0d;max-height:70vh}
.post-view iframe{width:100%;height:60vh;border:0;display:block}
.post-filecard{display:flex;align-items:center;gap:14px;margin-top:14px;padding:14px 16px;border:1px solid rgba(255,255,255,.1);border-top-color:rgba(255,255,255,.22);border-radius:16px;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.015))}
.filecard-ext{flex:none;width:44px;height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-size:10px;font-weight:800;color:#06070a;background:linear-gradient(180deg,#c9d5df,#8fa3b6);box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
.filecard-main{min-width:0;flex:1}
.filecard-main b{display:block;color:#fff;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.filecard-main i{display:block;margin-top:3px;font-style:normal;font-family:var(--font-mono);font-size:9.5px;letter-spacing:.08em;color:#8E939C;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.filecard-actions{display:flex;gap:8px}
.filecard-actions a{font-family:var(--font-mono);font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;text-decoration:none;color:#06070a;background:linear-gradient(180deg,#c9d5df,#8fa3b6);border-radius:8px;padding:8px 11px}
.filecard-actions a:last-child{background:transparent;color:#e5e7eb;border:1px solid rgba(255,255,255,.16)}
.post-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:30px}
.post-tags span{font-family:var(--font-mono);font-size:10px;letter-spacing:.1em;color:#9aa0ab;border:1px solid rgba(255,255,255,.14);border-radius:999px;padding:6px 12px}
.post-side{display:flex;flex-direction:column;gap:18px;position:sticky;top:104px;align-self:start}
.ps-block{border:1px solid rgba(255,255,255,.1);border-top-color:rgba(255,255,255,.22);border-radius:18px;padding:18px;background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012))}
.ps-title{font-family:var(--font-mono);font-size:9px;font-weight:700;letter-spacing:.28em;text-transform:uppercase;color:#8E939C;margin-bottom:14px}
.ps-toc{color:#e5e7eb;font-size:14px;font-weight:600;line-height:1.4;margin-bottom:10px}
.ps-toc-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.ps-toc-list a{display:block;padding:7px 9px;border-radius:8px;color:#9aa0ab;text-decoration:none;font-size:12.5px;line-height:1.35}
.ps-toc-list a:hover{color:#fff;background:rgba(255,255,255,.05)}
.ps-toc-sub a{padding-left:22px;color:#7c828d}
.ps-author{display:flex;gap:12px;align-items:center}
.ps-ava{width:40px;height:40px;border-radius:10px;flex:none;display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:700;color:#fff;background:linear-gradient(140deg,#1c1c20,#0d0d10);border:1px solid rgba(255,255,255,.12);border-top-color:rgba(255,255,255,.3)}
.ps-ava-img{width:40px;height:40px;border-radius:10px;object-fit:cover;flex:none;border:1px solid rgba(255,255,255,.14)}
.ps-name{color:#fff;font-size:13.5px;font-weight:700;display:block}
.ps-role{font-family:var(--font-mono);font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:#8E939C;margin-top:3px;display:block}
.ps-row{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-top:1px solid rgba(255,255,255,.06);font-size:12.5px;color:#d4d4d8}
.ps-row:first-of-type{border-top:0}
.ps-row b{font-family:var(--font-mono);font-size:9.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#8E939C}
.hub-actions{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:60;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px;border-radius:14px;background:rgba(10,10,13,.92);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(10px);box-shadow:0 20px 50px -20px rgba(0,0,0,.9);max-width:calc(100vw - 24px);justify-content:center}
.hub-actions a,.hub-actions button{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:9px;border:1px solid transparent;background:transparent;color:#c9cdd4;font-family:var(--font-mono);font-size:10.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;text-decoration:none;cursor:pointer}
.hub-actions a:hover,.hub-actions button:hover{color:#fff;background:rgba(255,255,255,.06)}
.hub-actions .primary{background:linear-gradient(180deg,#c9d5df,#8fa3b6);color:#06070a;border-color:rgba(255,255,255,.26)}
.hub-actions .primary:hover{background:#c9a96a;border-color:#c9a96a;color:#14100a}
.hub-actions .div{width:1px;height:20px;background:rgba(255,255,255,.12)}
.hub-toast{position:fixed;left:50%;bottom:84px;transform:translateX(-50%);z-index:61;display:flex;align-items:center;gap:8px;padding:10px 16px;border-radius:10px;background:linear-gradient(180deg,rgba(21,23,28,.97),rgba(7,8,11,.97));border:1px solid rgba(193,154,107,.35);box-shadow:0 22px 50px -20px rgba(0,0,0,.95),inset 0 1px 0 rgba(255,255,255,.07);color:#e9ebef;font-family:var(--font-mono);font-size:11px;font-weight:700;letter-spacing:.08em;opacity:0;pointer-events:none;transition:opacity .2s}
.hub-toast.show{opacity:1}
@media (max-width:900px){.post-shell{grid-template-columns:minmax(0,1fr);gap:34px;padding:100px 16px 120px}.post-side{position:static;order:2}.post-body{font-size:15.5px}}