/* The Hub website: landing page and developer wiki. Same "on air" identity as the app: sea-teal surfaces, one amber glow. */
:root {
    --bg: #0e1f24; --s1: #132b31; --s2: #17333a; --s3: #1f414a; --s4: #28525c;
    --line: #2a4f58; --line-soft: rgba(146, 196, 196, .12);
    --text: #e6f0ee; --strong: #ffffff; --muted: #93adad; --faint: #62807f;
    --air: #ffc94d; --air-ink: #2a1e00; --air-soft: rgba(255, 201, 77, .14); --air-glow: rgba(255, 201, 77, .45);
    --mint: #52e0a4; --rose: #ff6b7a; --lilac: #a9b8ff;
    --display: 'Bricolage Grotesque', system-ui, sans-serif; --body: 'Figtree', system-ui, sans-serif;
    --mono: ui-monospace, 'Cascadia Mono', 'JetBrains Mono', Consolas, monospace;
    --r: 18px; --wrap: 1160px;
    color-scheme: dark;
}
@media (prefers-color-scheme: light) {
    :root {
        --bg: #dde8e5; --s1: #eef4f2; --s2: #fbfdfc; --s3: #e3ece9; --s4: #d0dfdb;
        --line: #c3d6d1; --line-soft: rgba(20, 60, 60, .1);
        --text: #1d3236; --strong: #0b1c20; --muted: #4f6b6c; --faint: #7a9493;
        --air: #e8a400; --air-ink: #2a1e00; --air-soft: rgba(232, 164, 0, .16); --air-glow: rgba(232, 164, 0, .35);
        --mint: #16a36b; --lilac: #4b5fd6;
        color-scheme: light;
    }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); color: var(--strong); letter-spacing: -.02em; line-height: 1.08; margin: 0; }
code, pre { font-family: var(--mono); }
.muted { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* buttons + brand */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14.5px; }
.btn-air { background: var(--air); color: var(--air-ink); box-shadow: 0 0 0 0 var(--air-glow); }
.btn-air:hover { box-shadow: 0 0 28px var(--air-glow); }
.btn-ghost { border: 1px solid var(--line); color: var(--strong); }
.btn-ghost:hover { background: var(--s2); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--air); outline-offset: 3px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 20px var(--display); color: var(--strong); text-decoration: none; letter-spacing: -.02em; }
.brand.small { font-size: 16px; gap: 8px; }
.mark { width: 34px; height: 34px; border-radius: 11px; background: var(--air); display: grid; place-items: center; flex-shrink: 0; }
.mark.sm { width: 24px; height: 24px; border-radius: 8px; }
.mark svg { width: 64%; height: 64%; fill: none; stroke: var(--air-ink); stroke-width: 2.8; stroke-linecap: round; }

/* landing: nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; max-width: var(--wrap); margin: 0 auto; padding: 16px 24px;
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); }
.nav .links { display: flex; gap: 22px; margin-left: auto; }
.nav .links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav .links a:hover { color: var(--strong); }

/* hero */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 56px 24px 72px; display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 12px; border-radius: 999px; background: var(--air-soft); color: var(--air); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.lamp, .lampsm { width: 8px; height: 8px; border-radius: 50%; background: var(--air); box-shadow: 0 0 10px var(--air-glow); animation: pulse 1.8s ease-in-out infinite; display: inline-block; }
@keyframes pulse { 50% { opacity: .45; } }
.hero h1 { font-size: clamp(40px, 4.7vw, 64px); font-weight: 800; text-wrap: balance; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 34em; margin: 22px 0 30px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--faint); font-size: 14px; margin: 18px 0 0; }

/* the app impression */
.mock { border-radius: 22px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px var(--line-soft); overflow: hidden; font-size: 13px; }
.mock-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.pill { padding: 4px 10px; border-radius: 999px; background: var(--s2); color: var(--muted); font-weight: 600; }
.pill.on { background: var(--air-soft); color: var(--air); }
.pill.add { color: var(--mint); }
.mock-body { display: grid; grid-template-columns: 190px 1fr; min-height: 330px; }
.mock-side { background: var(--s1); padding: 12px 10px; display: flex; flex-direction: column; gap: 3px; }
.mock-side b { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 8px 6px 4px; }
.room, .chan { padding: 6px 8px; border-radius: 9px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.room.live { color: var(--strong); background: var(--s2); }
.chan.on { background: var(--s3); color: var(--strong); }
.who { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 22px; color: var(--text); }
.av { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.av.big { width: 58px; height: 58px; }
.a1 { background: linear-gradient(135deg, #ff9ad5, #c792ea); }
.a2 { background: linear-gradient(135deg, #4cc9f0, #5c7cfa); }
.a3 { background: linear-gradient(135deg, #52e0a4, #2bb3a3); }
.speaking { box-shadow: 0 0 0 2px var(--air), 0 0 14px var(--air-glow); animation: talk 1.4s ease-in-out infinite; }
.who .speaking { animation: none; }
@keyframes talk { 50% { box-shadow: 0 0 0 2px var(--air), 0 0 4px transparent; } }
.mock-stage { background: var(--s2); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.tiles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; border-radius: 14px; background: color-mix(in srgb, var(--bg) 70%, var(--s3)); display: grid; place-items: center; min-height: 112px; }
.tile.speaking { animation: none; box-shadow: inset 0 0 0 2px var(--air), 0 0 20px var(--air-soft); }
.tile em { position: absolute; left: 8px; bottom: 6px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(5, 16, 19, .55); padding: 1px 7px; border-radius: 6px; }
.tile.share .screen { width: 78%; height: 62%; border-radius: 8px; background: linear-gradient(160deg, #2a3f6b, #11202f 55%), #11202f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.dock { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg); }
.dock b { color: var(--strong); }
.dock .time { color: var(--air); font-variant-numeric: tabular-nums; font-weight: 700; }
.wave { margin-left: auto; display: flex; align-items: center; gap: 3px; height: 20px; }
.wave i { width: 3px; border-radius: 2px; background: var(--air); animation: bar 1s ease-in-out infinite; height: 40%; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; } .wave i:nth-child(4) { animation-delay: .45s; }
.wave i:nth-child(5) { animation-delay: .1s; } .wave i:nth-child(6) { animation-delay: .25s; } .wave i:nth-child(7) { animation-delay: .4s; }
@keyframes bar { 50% { height: 100%; } }

/* sections */
section > h2 { font-size: clamp(30px, 3.4vw, 44px); text-align: center; }
.sub { text-align: center; color: var(--muted); margin: 12px auto 36px; max-width: 36em; font-size: 17px; }
.features, .devs { max-width: var(--wrap); margin: 0 auto; padding: 64px 24px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid article { padding: 22px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line-soft); }
.grid h3 { font-size: 19px; margin: 14px 0 8px; }
.grid p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--air-soft); }
.ico svg { width: 22px; height: 22px; fill: none; stroke: var(--air); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.split { max-width: var(--wrap); margin: 0 auto; padding: 64px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 16px; }
.split p { color: var(--muted); font-size: 17px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--bg); font-size: 12px; font-weight: 800; }
.term { margin: 0; padding: 22px 24px; border-radius: var(--r); background: #08161a; color: #d9ecea; font-size: 14px; line-height: 1.7; overflow-x: auto; border: 1px solid var(--line); }
.term .c { color: #62807f; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cards a { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line-soft); text-decoration: none; transition: border-color .15s, transform .15s; }
.cards a:hover { border-color: var(--air); transform: translateY(-2px); }
.cards b { font: 700 19px var(--display); color: var(--strong); }
.cards span { color: var(--muted); font-size: 15px; }
.foot { max-width: var(--wrap); margin: 0 auto; padding: 36px 24px 48px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-soft); font-size: 14px; }
.foot nav { margin-left: auto; display: flex; gap: 18px; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--strong); }

@media (max-width: 980px) {
    .hero, .split { grid-template-columns: 1fr; }
    .grid, .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
    .nav { gap: 12px; padding: 12px 16px; }
    .nav .links { display: none; }
    .nav .btn { margin-left: auto; }
    .hero, .features, .devs, .split { padding-left: 16px; padding-right: 16px; }
    .grid, .cards { grid-template-columns: 1fr; }
    .mock-body { grid-template-columns: 1fr; }
    .mock-side { display: none; }
    .foot nav { margin-left: 0; }
}

/* =========================== developer wiki =========================== */
.wiki { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.wiki-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--s1); border-right: 1px solid var(--line-soft); padding: 20px 16px; display: flex; flex-direction: column; gap: 4px; }
.wiki-side a.brand { display: inline-flex; margin: 0 8px 14px; padding: 0; font-size: 18px; color: var(--strong); background: none; }
.wiki-side input { margin: 0 0 12px; width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--s2); color: var(--text); font: inherit; font-size: 14.5px; }
.wiki-side input:focus { outline: 2px solid var(--air); outline-offset: 0; border-color: transparent; }
.wiki-side .grp { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 14px 10px 4px; }
.wiki-side a { display: block; padding: 7px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.wiki-side a:hover { background: var(--s2); color: var(--strong); }
.wiki-side a.on { background: var(--air-soft); color: var(--air); }
.wiki-side .back { margin-top: auto; padding-top: 16px; font-size: 14px; }
.wiki-main { padding: 48px clamp(20px, 5vw, 72px) 96px; max-width: 900px; width: 100%; }
.toc-btn { display: none; }
.doc { font-size: 16.5px; }
.doc h1 { font-size: clamp(34px, 4vw, 46px); margin: 0 0 20px; }
.doc h2 { font-size: 27px; margin: 46px 0 14px; padding-top: 8px; }
.doc h3 { font-size: 20px; margin: 30px 0 10px; }
.doc h4 { font: 700 16px var(--body); color: var(--strong); margin: 22px 0 8px; }
.doc h2 .anchor, .doc h3 .anchor { opacity: 0; margin-left: 8px; color: var(--faint); text-decoration: none; font-weight: 400; }
.doc h2:hover .anchor, .doc h3:hover .anchor { opacity: 1; }
.doc p, .doc li { color: var(--text); }
.doc a { color: var(--air); text-underline-offset: 3px; }
.doc ul, .doc ol { padding-left: 24px; }
.doc li { margin: 5px 0; }
.doc strong { color: var(--strong); }
.doc code { font-size: .88em; padding: 2px 6px; border-radius: 6px; background: var(--s3); color: var(--strong); }
.doc pre { padding: 18px 20px; border-radius: 14px; background: #08161a; border: 1px solid var(--line); overflow-x: auto; line-height: 1.6; }
.doc pre code { padding: 0; background: none; color: #d9ecea; font-size: 14px; }
.doc blockquote { margin: 18px 0; padding: 4px 18px; border-left: 3px solid var(--air); background: var(--s1); border-radius: 0 12px 12px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.doc th { color: var(--strong); font-weight: 700; border-bottom-color: var(--line); white-space: nowrap; }
.doc hr { border: 0; border-top: 1px solid var(--line-soft); margin: 36px 0; }
.doc img { max-width: 100%; border-radius: 12px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.pager a { display: flex; flex-direction: column; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; min-width: 0; }
.pager a:hover { border-color: var(--air); }
.pager small { color: var(--faint); }
.pager b { color: var(--strong); }
.pager .next { margin-left: auto; text-align: right; }
.edit-note { margin-top: 18px; font-size: 13.5px; color: var(--faint); }
@media (max-width: 860px) {
    .wiki { grid-template-columns: 1fr; }
    .wiki-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); }
    .wiki-side nav { display: none; }
    .wiki-side.open nav { display: block; }
    .toc-btn { display: inline-flex; margin: 0 8px 8px; }
    .wiki-main { padding-top: 28px; }
}
