:root {
    color-scheme: dark;
    --ink: #f4f7f2;
    --mute: rgba(244, 247, 242, 0.68);
    --line: rgba(255, 255, 255, 0.22);
    --green: #8ee0c0;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: #0c242c;
    color: var(--ink);
    font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
}

button, input { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

::selection { background: rgba(142, 224, 192, 0.28); }

#scene {
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    color: var(--ink);
}

.frame {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

.top {
    padding: 18px 0 8px;
    min-width: 0;
}

.top-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    width: 100%;
}

.brand {
    margin-right: auto;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.85rem;
    font-weight: 650;
    letter-spacing: -0.04em;
    line-height: 1;
}

.brand span { color: var(--green); }

#filter {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

#filter::-webkit-scrollbar { display: none; }

#filter > button { flex: 0 0 auto; }

.gx-search-shell { width: 220px; flex: 0 0 auto; }

.gx-search {
    font-size: 15px;
    caret-color: var(--green);
}

.tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.switch {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--mute);
    font-size: 0.84rem;
    font-weight: 500;
}

#motion {
    --gx-toggle-accent: #1c9a78;
}

#go.gx-choice-trigger {
    width: auto;
    min-height: 40px;
    padding: 8px 14px;
    border-color: var(--line);
    border-radius: 14px;
}

.library {
    min-height: 0;
    min-width: 0;
    overflow: auto;
    padding: 10px 0 28px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

#hero {
    border: 1px solid var(--line);
    margin-bottom: 16px;
    padding: 28px 32px 22px;
}

#hero .kicker,
.card .kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
    opacity: 0.9;
}

#hero h1 {
    margin: 10px 0 0;
    max-width: 12ch;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(3rem, 6vw, 4.6rem);
    font-weight: 560;
    letter-spacing: -0.045em;
    line-height: 0.92;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

#hero .lede {
    max-width: 38rem;
    margin: 16px 0 0;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--mute);
    opacity: 1;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

#hero .gx-button {
    min-height: 46px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid var(--line);
}

#glow {
    max-width: 340px;
    margin-top: 22px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 148px;
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    color: inherit;
}

.card strong {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.card .blurb {
    margin-top: auto;
    color: var(--mute);
    font-size: 0.92rem;
    line-height: 1.35;
}

.empty {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    color: var(--mute);
}

.dock {
    justify-self: center;
    min-width: 0;
    max-width: calc(100% - 16px);
    margin: 4px 0 16px;
    display: flex;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--line);
}

.dock button {
    width: 54px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--ink);
}

.dock svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gx-segmented > button { font-size: 13px; }

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .top-row { flex-wrap: wrap; }
    .brand { margin-right: 0; }
    .tools { margin-left: auto; }
    #filter,
    .gx-search-shell { flex: 1 1 100%; width: 100%; }
    #hero { padding: 22px 20px 18px; }
    #hero h1 { font-size: clamp(2.6rem, 12vw, 3.4rem); }
}

@media (max-width: 560px) {
    .frame { width: min(1120px, calc(100% - 24px)); }
    .grid { grid-template-columns: 1fr; }
    .switch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .dock { gap: 2px; padding: 6px; }
    .dock button { width: 44px; height: 42px; }
}
