:root {
    color-scheme: dark;
    font-family: system-ui, "Segoe UI", sans-serif;
    color: #edf7ff;
    background: #0c1624;
    --panel: #142337;
    --line: #29465e;
    --muted: #a9bfd4;
    --accent: #83ccfa;
    --focus: #a8dcff;
}
* { box-sizing: border-box; }
body { margin: 0; }
html { scroll-padding-top: 5.5rem; }
[hidden] { display: none !important; }
a { color: var(--focus); text-decoration: none; }
button, input, textarea { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: progress; opacity: .6; }
input, textarea {
    min-width: 0; width: 100%; border-radius: 10px; border: 1px solid var(--line);
    background: #101e2e; padding: .72rem .82rem; color: inherit;
}
.shell { max-width: 1200px; width: calc(100% - 4rem); margin-inline: auto; }
.top { background: #0c1624f2; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.top-inner { min-height: 68px; display: flex; gap: 1.75rem; align-items: center; justify-content: space-between; }
.wordmark { display: flex; align-items: center; color: #fff; font-weight: 850; letter-spacing: -.04em; font-size: 1.2rem; }
.wordmark span:last-child, .hero h1 span { color: var(--focus); }
.mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: .65rem; border-radius: 9px; background: var(--accent); color: #0b2036; font-style: italic; }
nav { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 2rem); }
nav a { color: var(--muted); font-size: .92rem; }
nav a:hover, .plain:hover { color: #fff; }
.account { color: #fff; font-weight: 700; overflow-wrap: anywhere; }
.hero {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
    min-height: 490px; margin-top: 2rem; padding: clamp(1.5rem, 5vw, 5rem); border: 1px solid #365974; border-radius: 24px;
    background: linear-gradient(90deg, #0c1729 7%, #132840ed 33%, #11283c22 100%), url('/assets/terrain.svg') center 48% / cover, #17314b;
}
.hero h1 { margin: .25rem 0 .7rem; font-size: clamp(2.4rem, 7.5vw, 6.5rem); line-height: .97; letter-spacing: -.075em; }
.hero-copy > p:not(.kicker) { max-width: 42ch; color: #deebf7; font-size: clamp(.95rem, 2vw, 1.16rem); line-height: 1.6; }
.hero-tag { position: absolute; bottom: 1.35rem; right: 1.75rem; font-size: .75rem; font-weight: 850; letter-spacing: .24em; color: #fff; opacity: .78; }
.kicker { margin: 0 0 .55rem; font-size: .75rem; line-height: 1.3; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.kicker span { display: inline-block; width: 7px; height: 7px; margin-right: .4rem; border-radius: 50%; background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero .actions { margin-top: 1.6rem; }
.button { display: inline-flex; gap: .6rem; justify-content: center; align-items: center; border-radius: 10px; border: 1px solid transparent; font-weight: 750; padding: .65rem .95rem; line-height: 1.35; }
.button.primary { color: #0b1d30; background: var(--focus); }
.button.primary:hover { background: #c8e5fb; }
.button.secondary { background: #1b3047; color: #edf7ff; border-color: #365b77; }
.button.secondary:hover { background: #2d4861; }
.section { margin-top: clamp(2.4rem, 6vw, 5rem); }
.section-title { margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -.055em; margin: 0; }
h3 { margin: 0 0 .5rem; font-size: 1.2rem; letter-spacing: -.02em; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 1rem; }
.card, .empty, .social { background: var(--panel); border-radius: 16px; border: 1px solid var(--line); }
.card, .empty { padding: 1.25rem; }
.card p:not(.kicker), .empty, #profile-panel p { color: var(--muted); line-height: 1.5; }
.card .tag { display: inline-block; padding: .25rem .5rem; background: #1c3550; border-radius: 6px; }
.card details { margin-top: 1rem; color: var(--muted); }
.card details code { display: block; overflow-wrap: anywhere; margin-top: .6rem; }
.card summary { cursor: pointer; }
.dependencies { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem .75rem; }
.dependencies dd { margin: 0; overflow-wrap: anywhere; }
.pack-cover { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 10px; margin-bottom: 1.2rem; }
.server-address, .preline { white-space: pre-line; overflow-wrap: anywhere; }
.sign-in { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.sign-in p { margin-bottom: 0; }
.social { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr); }
.social-side, .social-main { min-width: 0; padding: 1.2rem; }
.social-side { border-right: 1px solid var(--line); }
.social-main { min-height: 400px; }
#people-search label { display: block; font-weight: 700; margin-bottom: .5rem; }
.search-row, #chat-send { display: flex; align-items: stretch; gap: .5rem; }
.social-list { list-style: none; margin: .55rem 0 1rem; padding: 0; display: grid; gap: .35rem; }
.list-heading { margin: 1.2rem 0 .45rem; color: var(--muted); font-size: .85rem; font-weight: 700; }
.person { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .65rem; background: #0e1a2a; border: 1px solid transparent; border-radius: 8px; color: inherit; text-align: left; overflow-wrap: anywhere; }
.person:hover, .person[aria-current="true"] { background: #1b344e; border-color: #315873; }
.person small, .timestamp { display: block; color: var(--muted); }
.count { font-size: .8rem; font-weight: 750; border-radius: 99px; padding: .16rem .5rem; background: var(--accent); color: #132840; }
.account-footer { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; border-top: 1px solid var(--line); padding-top: .85rem; margin-top: 1.3rem; font-size: .85rem; }
.plain { padding: 0; border: none; color: var(--focus); background: transparent; }
.status { color: #ffd0e5; margin: 0 0 .6rem; }
.status:empty { display: none; }
.profile-actions { margin: .75rem 0; }
.profile-actions .button { font-size: .85rem; }
#chat { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 1rem; }
#chat-messages { height: 325px; display: flex; flex-direction: column; gap: .65rem; overflow: auto; padding: .6rem .35rem .6rem 0; overscroll-behavior: contain; }
#chat-send textarea { resize: vertical; min-height: 55px; }
.bubble { align-self: flex-start; max-width: min(90%, 55ch); padding: .62rem .8rem; border-radius: 12px 12px 12px 3px; background: #223b56; }
.bubble.mine { align-self: flex-end; border-radius: 12px 12px 3px 12px; background: #24466b; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .3rem; }
.timestamp { font-size: .72rem; }
.chat-empty { color: var(--muted); align-self: center; margin: auto; }
.footer { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 3.5rem; padding-block: 1.5rem; color: var(--muted); font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 750px) {
    .shell { width: calc(100% - 2rem); }
    .hero { min-height: 390px; background-position: 57% center; }
    .social { grid-template-columns: 1fr; }
    .social-side { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 500px) {
    .top-inner { min-height: 58px; flex-wrap: wrap; gap: .65rem; padding-block: .65rem; }
    .top-inner nav { order: 3; width: 100%; }
    .hero { min-height: 355px; margin-top: 1rem; }
    .hero-tag { display: none; }
    #chat-send { flex-wrap: wrap; }
}
.hero-logo { display: block; margin-bottom: 1.3rem; max-width: 75%; height: auto; }
