:root {
    /* Dark cinema palette, every text/background pair verified for WCAG AA. */
    --bg: #141414;
    --surface: #1f1f1f;
    --surface-hover: #2a2a2a;
    --ink: #f5f5f1;          /* 16.86:1 on --bg, 15.08:1 on --surface */
    --muted: #b3b3b3;        /* 8.79:1 on --bg, 7.86:1 on --surface, 6.85:1 on --surface-hover */
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --input-border: #757575; /* 3.54:1 vs --bg, passes 3:1 non-text */
    --red: #e50914;          /* non-text accents + large bold only: 3.84:1 on --bg */
    --red-deep: #b00610;     /* solid red surfaces: white on it is 7.29:1 */
    --red-soft: #f0777d;     /* red for small text: 6.70:1 on --bg, 5.22:1 on --surface-hover */
    --good: #46d369;         /* 9.46:1 on --bg, 7.37:1 on --surface-hover */
    --warn: #f0777d;
    --radius: 14px;
    --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { background: var(--bg); }
body {
    margin: 0;
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    accent-color: var(--red);
}

::selection { background: var(--red-deep); color: #fff; }

[hidden] { display: none !important; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a.skip {
    position: absolute; left: -9999px; top: 0;
    background: var(--red-deep); color: #fff; padding: 0.6rem 1rem; z-index: 20;
    border-radius: 0 0 8px 0;
}
a.skip:focus { left: 0; }

a:focus-visible, button:focus-visible {
    outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px;
}

.wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    flex: 1;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.75rem;
}

/* Logo home link + tooltip (hover AND keyboard focus) */
.home-link { position: relative; display: inline-flex; border-radius: 10px; }
.home-link img { width: 40px; height: 40px; display: block; transition: transform 0.15s ease; }
.home-link:hover img, .home-link:focus-visible img { transform: rotate(-8deg) scale(1.08); }
.home-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.home-link .tip {
    position: absolute; top: calc(100% + 9px); left: 0;
    background: var(--ink); color: var(--bg);
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.01em;
    white-space: nowrap; padding: 0.4rem 0.7rem; border-radius: 8px;
    opacity: 0; transform: translateY(-4px); pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 30;
}
.home-link .tip::before {
    content: ''; position: absolute; top: -4px; left: 14px;
    width: 8px; height: 8px; background: var(--ink);
    transform: rotate(45deg);
}
.home-link:hover .tip, .home-link:focus-visible .tip { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .home-link img, .home-link .tip { transition: none; }
    .home-link:hover img, .home-link:focus-visible img { transform: none; }
}

h1 {
    font-size: 1.9rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.6rem;
    font-weight: 650;
}
/* Red kicker bar, decorative accent, never body-size red text */
h1::before {
    content: '';
    display: block;
    width: 52px; height: 4px;
    border-radius: 2px;
    background: var(--red);
    margin-bottom: 0.9rem;
}
.lede {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 1.9rem;
    max-width: 58ch;
}

/* Search, sticks to the top while you scroll the list */
.searchbar {
    position: sticky; top: 0; z-index: 5;
    background: var(--bg);
    /* Widened to match the rows below (which bleed 0.6rem for their
       hover surface) so nothing peeks out while scrolling underneath. */
    padding: 0.75rem 0.6rem 0.55rem;
    margin: 0 -0.6rem;
    box-shadow: 0 1px 0 var(--line);
}
.search {
    width: 100%;
    border: 1px solid var(--input-border);
    border-radius: 11px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    color: var(--ink);
    background: var(--surface);
    outline: none;
    appearance: none;
}
.search::-webkit-search-cancel-button { -webkit-appearance: none; }
.search:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,9,20,0.3); }
.search::placeholder { color: #9a9a9a; } /* 5.86:1 on --surface */

.meta-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 1rem; margin-top: 0.5rem; min-height: 1.2rem;
}
.count { font-size: 0.8rem; color: var(--muted); margin: 0; }

button.linkish {
    appearance: none; border: none; background: none; padding: 0;
    font-size: 0.82rem; color: var(--muted); text-decoration: underline;
    cursor: pointer; font-family: inherit; white-space: nowrap;
}
button.linkish:hover { color: var(--ink); }

/* Popular filter chips */
.chipbar {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 0.45rem; margin: 1.1rem 0 0;
}
.chip-label {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--muted); margin-right: 0.2rem;
}
.chip {
    appearance: none; font-family: inherit;
    font-size: 0.82rem; font-weight: 500; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 999px; padding: 0.32rem 0.8rem; cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--red); background: var(--surface-hover); }

/* A–Z jump links */
.letters { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 1.3rem 0 0; }
.letters a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 30px; height: 30px; padding: 0 0.35rem;
    border-radius: 8px; font-size: 0.82rem; font-weight: 600;
    color: var(--muted); text-decoration: none;
}
.letters a:hover { background: var(--surface-hover); color: var(--ink); }

/* Letter sections */
.gsec {
    margin-top: 2.1rem;
    scroll-margin-top: 7.5rem;
    content-visibility: auto;
    contain-intrinsic-size: auto 2400px;
}
.gsec h2 {
    display: flex; align-items: baseline; gap: 0.6rem;
    font-size: 1.05rem; font-weight: 700; letter-spacing: 0.01em;
    margin: 0; padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--line-strong);
}
.gcount { font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.gsec ul { list-style: none; margin: 0; padding: 0; }
.gsec li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.9rem; align-items: baseline;
    padding: 0.55rem 0.6rem;
    margin: 0 -0.6rem;
    border-bottom: 1px solid var(--line);
}
.gsec li:hover { background: var(--surface-hover); }
.gsec li a {
    color: var(--ink); text-decoration: none;
    line-height: 1.45; min-width: 0; overflow-wrap: anywhere;
}
.gsec li a:hover { text-decoration: underline; text-decoration-color: var(--red-soft); }
.gsec li a::after {
    content: "\2197"; margin-left: 0.35em;
    font-size: 0.72em; color: var(--muted);
}
.gsec li a:hover::after { color: var(--red-soft); }
.gsec li code { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
button.copy {
    appearance: none; border: none; background: none; padding: 0;
    font-family: inherit; font-size: 0.8rem; color: var(--muted);
    text-decoration: underline; cursor: pointer;
    min-width: 5.4em; text-align: right; white-space: nowrap;
}
button.copy:hover { color: var(--ink); }
button.copy.done { color: var(--good); text-decoration: none; font-weight: 600; }
button.copy.failed { color: var(--warn); text-decoration: none; font-weight: 600; }

/* No matches */
.empty {
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 2.2rem 1.25rem;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    font-size: 0.92rem;
    margin-top: 1.5rem;
}
.empty p { margin: 0 0 0.6rem; }
.empty strong { color: var(--ink); overflow-wrap: anywhere; }

.backtop { margin: 1.7rem 0 0; text-align: center; }
.backtop a { font-size: 0.82rem; color: var(--muted); }
.backtop a:hover { color: var(--ink); }

/* Explainer */
.about {
    margin-top: 3.5rem;
    border-top: 1px solid var(--line-strong);
    padding-top: 2.25rem;
}
.about h2 {
    font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em;
    margin: 1.9rem 0 0.6rem; color: var(--ink);
}
.about h2:first-child { margin-top: 0; }
.about p, .about ol {
    color: var(--muted); font-size: 0.95rem; line-height: 1.6;
    margin: 0 0 0.9rem; max-width: 62ch;
}
.about ol { padding-left: 1.2rem; }
.about li { margin-bottom: 0.45rem; }
.about strong { color: var(--ink); font-weight: 600; }
.about code {
    font-family: var(--mono); font-size: 0.85em;
    background: var(--surface-hover); border-radius: 4px; padding: 0.1em 0.35em;
    color: var(--ink); overflow-wrap: anywhere;
}

.foot {
    text-align: center; padding: 1.5rem 1rem 2rem;
    font-size: 0.8rem; color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
    .chip { transition: none; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    .wrap { padding-top: 1.5rem; }
    .topbar { margin-bottom: 2rem; }
    .gsec li { gap: 0.6rem; }
}

/* ---- Site footer ----
   footer.liquid is written against Tailwind utilities, which this
   standalone page doesn't load; these rules cover exactly the classes
   that markup uses (plus sketch-styles.liquid for the doodles). */
/* The footer keeps its own light cream background; a thin light hairline
   above it makes the dark-page/light-footer seam read as deliberate. */
footer.brand-color-background { position: relative; overflow: visible; padding: 1rem; box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.18); }
footer .mx-auto { margin-left: auto; margin-right: auto; }
footer .max-w-7xl { max-width: 80rem; padding: 3rem 1rem; }
footer .max-w-2xl { max-width: 42rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
footer .mb-4 { display: inline-block; margin-bottom: 1rem; border-radius: 1rem; }
footer img { height: 4rem; width: 4rem; }
footer h2 { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 700; }
footer p { margin: 0; font-size: 0.875rem; }
footer .text-stone-600 { color: #57534e; }
footer .font-semibold { font-weight: 600; }
footer .text-base { font-size: 1rem; }
footer .text-lg { font-size: 1.125rem; }
footer .flex-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
footer .flex-wrap a { display: inline-flex; padding: 0.5rem; border-radius: 1rem; color: #78716c; transition: color 0.15s; }
footer .flex-wrap svg { height: 1.5rem; width: 1.5rem; }
footer .hover\:text-blue-400:hover { color: #60a5fa; }
footer .hover\:text-pink-500:hover { color: #ec4899; }
footer .hover\:text-indigo-500:hover { color: #6366f1; }
footer .hover\:text-stone-900:hover { color: #1c1917; }
footer .hover\:text-red-500:hover { color: #ef4444; }
footer p.text-center { margin-top: 2rem; text-align: center; }
/* The footer sits on its light background, so its focus ring stays dark. */
footer a:focus-visible { outline: 2px solid #16161a; outline-offset: 2px; }
@media (min-width: 640px) {
    footer.brand-color-background { padding: 1.5rem; }
    footer .sm\:text-lg { font-size: 1.125rem; }
    footer .sm\:text-xl { font-size: 1.25rem; }
    footer .max-w-7xl { padding: 4rem 1.5rem; }
    footer img { height: 5rem; width: 5rem; }
    footer h2 { font-size: 1.25rem; }
    footer p { font-size: 1rem; }
    footer .flex-wrap { gap: 1.5rem; margin-top: 3rem; }
    footer .flex-wrap svg { height: 1.75rem; width: 1.75rem; }
    footer p.text-center { margin-top: 2.5rem; }
}
@media (min-width: 1024px) {
    footer.brand-color-background { padding: 2.5rem; }
    footer .max-w-7xl { padding: 5rem 2rem; }
    footer img { height: 6rem; width: 6rem; }
    footer h2 { font-size: 1.5rem; }
    footer .flex-wrap { margin-top: 4rem; }
    footer p.text-center { margin-top: 3rem; }
}
