:root {
    color-scheme: dark light;
    --bg: #191724;
    --surface: #1f1d2e;
    --line: #2d2a45;
    --text: #e0def4;
    --muted: #908caa;
    --accent: #c4a7e7;
    --accent-ink: #191724;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #faf4ed;
        --surface: #fffaf3;
        --line: #e6dccf;
        --text: #3f3a5a;
        --muted: #6e6a86;
        --accent: #7556a8;
        --accent-ink: #faf4ed;
    }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
    max-width: 680px;
    margin: 0 auto;
    padding: 56px 16px 80px;
}

header { margin-bottom: 40px; }

h1 {
    margin: 0;
    font-size: 2.4rem;
    line-height: 1.1;
    font-weight: 650;
    letter-spacing: -0.02em;
}
h1 a { color: inherit; text-decoration: none; }
.dot { color: var(--accent); }

.tagline { margin: 6px 0 0; color: var(--muted); }

section { margin-bottom: 40px; }

.head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

h2 {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.count { margin-left: 4px; font-weight: 400; opacity: 0.8; }

input[type="search"] {
    width: 160px;
    max-width: 50%;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
}
input[type="search"]::placeholder { color: var(--muted); }
input[type="search"]:focus { outline: none; border-color: var(--accent); }

.list { list-style: none; margin: 0; padding: 0; }

.item { padding: 16px 0; border-top: 1px solid var(--line); }
.list .item:last-child { border-bottom: 1px solid var(--line); }

.top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.title { font-weight: 600; overflow-wrap: anywhere; }
a.title { color: var(--text); text-decoration: none; }
a.title:hover { color: var(--accent); }
.meta { flex: none; color: var(--muted); font-size: 0.8rem; white-space: nowrap; }

.desc { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

button,
a.btn {
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
}
button:hover,
a.btn:hover { border-color: var(--accent); color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

pre {
    margin: 12px 0 0;
    padding: 12px 14px;
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    font: 12.5px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    tab-size: 4;
}
code { font: inherit; }

.empty { color: var(--muted); }

@media (max-width: 480px) {
    main { padding-top: 40px; }
    h1 { font-size: 2rem; }
    .top { flex-direction: column; gap: 0; }
}
