/* Yours. appgen writes this file once and never touches it again,
   and every page loads it after styles.css, so anything here wins.

   The front door, in the ranking sites' style: paper, ink, hairlines.
   Every class custom.js adds starts with cab-. */

/* Fonts are linked from the page head (`fonts:` in site.appgen), not
   @imported here, so they load alongside this file rather than after it. */

:root {
    --paper: #f7f5f0;
    --panel: #efebe3;
    --ink: #1d1b18;
    --muted: #7a736b;
    --rule: #dfd9cf;
    --walnut: #6b4a2f;
    --bark: var(--ink);
    --cream: var(--paper);
    --edge: var(--rule);
    --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
    --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --wrap: 64rem;
}

body {
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 var(--sans);
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ink);
}

a { color: var(--ink); }

::selection { background: #e6d8c6; }

/* ---------------------------------------------------------------- header */

.site-head {
    background: rgba(247, 245, 240, 0.85);
    border-bottom: 1px solid var(--rule);
}
.site-head .wrap { padding-block: 16px; }
.brand { font: 400 1.35rem/1 var(--serif); color: var(--ink); gap: 0; }
.mark { display: none; }
.site-head nav a {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--muted);
    border: 0;
}
.site-head nav a.here { color: var(--ink); }

/* ------------------------------------------------------------------ hero */

.hero {
    background: var(--paper);
    color: var(--ink);
    padding-block: clamp(72px, 14vw, 150px) clamp(40px, 7vw, 72px);
}
.hero h1 {
    color: var(--ink);
    font-size: clamp(3rem, 8.5vw, 6.2rem);
    line-height: 0.98;
    letter-spacing: -0.025em;
    max-width: 13ch;
    margin-bottom: 0.35em;
    text-wrap: balance;
}
.hero .lede {
    color: var(--muted);
    font-size: clamp(1.02rem, 1.8vw, 1.18rem);
    max-width: 44ch;
    margin-bottom: 2em;
}

.btn {
    border-radius: 0;
    padding: 0 0 4px;
    border: 0;
    border-bottom: 1px solid currentColor;
    font-weight: 500;
    font-size: 0.95rem;
}
.btn-primary, .btn-primary:hover { background: none; color: var(--ink); }
.hero .btn { flex: none; }
.btn-primary::after { content: " \2193"; }
.btn-primary[href^="http"]::after { content: " \2192"; }
.btn-primary:hover { color: var(--walnut); }

/* --------------------------------------------------------------- bands */

.band { padding-block: clamp(40px, 7vw, 80px); }
.band + .band { border-top: 1px solid var(--rule); }
.band h2 {
    font-size: 0.78rem;
    font-family: var(--sans);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.6em;
}
.band .intro { color: var(--muted); font-size: 0.98rem; margin-bottom: 2.4em; }
.band-ranking { padding-top: 0; }

.prose { max-width: 60ch; }
.prose p { color: #4a453f; }

/* --------------------------------------------------------------- ranking */

.ranking {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--rule);
}

.rank {
    display: grid;
    grid-template-columns: 5rem 1fr;
    gap: 0 24px;
    padding: 30px 0;
    border-top: 1px solid var(--rule);
}

.rank-no {
    font: 400 2.6rem/1 var(--serif);
    color: #b3aba0;
    font-variant-numeric: tabular-nums;
}
.rank-no::before { content: "No."; font-size: 0.4em; margin-right: 3px; vertical-align: 0.9em; }

.rank h3 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    line-height: 1.1;
    margin: 0 0 0.2em;
}
.rank h3 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s ease, color 0.2s; }
.rank h3 a::after { content: "\2197"; font-family: var(--sans); font-size: 0.5em; margin-left: 6px; vertical-align: 0.5em; color: var(--muted); transition: transform 0.2s ease; display: inline-block; }
.rank h3 a:hover { color: var(--walnut); background-size: 100% 1px; }
.rank h3 a:hover::after { transform: translate(2px, -2px); color: var(--walnut); }

.rank-place { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.9em; }
.rank .blurb { max-width: 60ch; color: #3d3934; margin-bottom: 0.8em; }

.rank-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
    color: var(--muted);
}
.rank-tags li { display: inline; }
.rank-tags li + li::before { content: "  \00b7  "; white-space: pre; }

/* The top pick: more room, larger type, the one place the accent shows. */
.rank-1 {
    background: var(--panel);
    border-top: 0;
    padding: clamp(32px, 5vw, 52px) clamp(20px, 4vw, 44px);
    margin-bottom: 18px;
    grid-template-columns: 7rem 1fr;
}
.rank-1 + .rank { border-top: 0; }
.rank-1 .rank-no { font-size: 5rem; color: var(--walnut); }
.rank-1 h3 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }
.rank-1 .blurb { font-size: 1.08rem; }
.rank-1::before {
    content: "Top pick";
    grid-column: 2;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--walnut);
    margin-bottom: 10px;
}
.rank-1 .rank-no { grid-row: 1 / span 2; }

@media (max-width: 560px) {
    .rank, .rank-1 { grid-template-columns: 1fr; }
    .rank-no { font-size: 1.6rem; margin-bottom: 6px; }
    .rank-1 .rank-no { font-size: 3rem; grid-row: auto; }
    .rank-1::before { grid-column: 1; }
}

/* ------------------------------------------------------------ categories */

.categories {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 16px;
}

.category {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: clamp(26px, 4vw, 40px);
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    transition: background 0.25s ease;
}
.category:hover { background: #e8e2d7; }

.category-name {
    font: 400 clamp(2.2rem, 5vw, 3.2rem)/1 var(--serif);
    letter-spacing: -0.02em;
}
.category-name::after {
    content: " \2192";
    margin-left: 0.3em;
    font-family: var(--sans);
    font-size: 0.45em;
    vertical-align: 0.35em;
    color: var(--muted);
    display: inline-block;
    transition: transform 0.25s ease, color 0.25s ease;
}
.category:hover .category-name::after { transform: translateX(4px); color: var(--walnut); }
.category-blurb { color: var(--muted); max-width: 40ch; }

.cab-motion .categories li { opacity: 0; transform: translateY(16px); }
.cab-motion .categories li.cab-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.band-categories { padding-top: 0; }

/* --------------------------------------------------------------- footer */

.site-foot {
    background: var(--paper);
    color: var(--muted);
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
}
.site-foot strong { color: var(--ink); font-weight: 500; }
.site-foot p:empty { display: none; }
.site-foot .fine { color: var(--muted); }

/* ------------------------------------------------------------ motion */

/* Entries rise in one after another. Only when custom.js has run
   (html.cab-motion), so the page reads without it. */
.cab-motion .rank { opacity: 0; transform: translateY(16px); }
.cab-motion .rank.cab-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cab-motion .hero h1, .cab-motion .hero .lede, .cab-motion .hero .actions {
    opacity: 0;
    transform: translateY(14px);
}
.cab-ready .hero h1, .cab-ready .hero .lede, .cab-ready .hero .actions {
    opacity: 1;
    transform: none;
    transition: opacity 0.9s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cab-ready .hero .lede { transition-delay: 0.12s; }
.cab-ready .hero .actions { transition-delay: 0.24s; }

/* ------------------------------------------------------- votes and signups */

/* A pill, so it reads as the one thing on the row you can press rather than a
   fourth link. The count sits outside it and stays quiet. */
.vote { display: flex; align-items: center; gap: 10px; margin: 1.1em 0 0.2em; }
.vote-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font: 500 0.85rem var(--sans);
    color: var(--ink);
    background: none;
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 6px 14px 6px 11px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.vote-mark {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
    transition: color 0.15s ease;
}
.vote-button:hover:not(:disabled) { color: var(--walnut); border-color: var(--walnut); }
.vote-button:hover:not(:disabled) .vote-mark { color: var(--walnut); }
.vote-button:focus-visible { outline: 2px solid var(--walnut); outline-offset: 2px; }
.vote-button.voted,
.vote-button:disabled {
    cursor: default;
    color: var(--walnut);
    border-color: var(--walnut);
    background: color-mix(in srgb, var(--walnut) 8%, transparent);
}
.vote-button.voted .vote-mark { color: var(--walnut); }
.vote-count { font-size: 0.82rem; color: var(--muted); }
.rank-1 .vote-button { font-size: 0.9rem; padding: 7px 16px 7px 13px; }

.signup { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; max-width: 34rem; }
.signup label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.signup input {
    flex: 1 1 16rem;
    font: 400 1rem var(--sans);
    color: var(--ink);
    background: none;
    border: 0;
    border-bottom: 1px solid var(--rule);
    padding: 6px 0;
}
.signup input:focus { outline: none; border-color: var(--walnut); }
.signup button {
    font: 500 0.9rem var(--sans);
    color: var(--ink);
    background: none;
    border: 0;
    border-bottom: 1px solid currentColor;
    padding: 0 0 4px;
    cursor: pointer;
}
.signup button:hover:not(:disabled) { color: var(--walnut); }
.signup-said { flex: 1 0 100%; margin: 0; font-size: 0.85rem; color: var(--muted); }
