/* ==========================================================================
   Site B - design system
   --------------------------------------------------------------------------
   Palette      petrol ink + signal coral, sea-glass for "live", marigold for
                "featured". White page, coloured header and footer.
   Type         Fraunces (display, optical serif) over Archivo (UI grotesque).
   Signature    the launch pass: a perforated ticket stub on every ranked row,
                with the rank numeral punched into the stub and the status
                shown as a stamp.
   ========================================================================== */

:root {
    /* Core palette */
    --ink:        #0B2E36;
    --ink-2:      #123F4A;
    --ink-3:      #1D5566;
    --flare:      #FF5C4D;
    --flare-dark: #E0402F;
    --sea:        #17A398;
    --sun:        #F6C445;

    /* Neutrals */
    --paper: #FFFFFF;
    --mist:  #F4F7F7;
    --line:  #DDE7E9;
    --line-2:#EDF3F4;
    --muted: #5C7480;
    --body:  #23414A;

    /* Type */
    --display: "Fraunces", Georgia, "Times New Roman", serif;
    --ui: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Scale */
    --t-xs: 0.75rem;
    --t-sm: 0.8125rem;
    --t-base: 0.9375rem;
    --t-md: 1.0625rem;
    --t-lg: 1.25rem;
    --t-xl: 1.625rem;
    --t-2xl: 2.125rem;
    --t-3xl: 2.75rem;

    /* Space + shape */
    --gap: 1.5rem;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(11, 46, 54, .06), 0 8px 24px -12px rgba(11, 46, 54, .18);
    --shadow-lift: 0 2px 4px rgba(11, 46, 54, .08), 0 18px 36px -18px rgba(11, 46, 54, .3);
    --wrap: 1280px;
}

/* --------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--body);
    font-family: var(--ui);
    font-size: var(--t-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 .5em;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink-3); text-decoration: none; }
a:hover { color: var(--flare); }

img { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

small { font-size: var(--t-sm); }

code, pre { font-family: var(--mono); font-size: var(--t-sm); }

:focus-visible {
    outline: 3px solid var(--flare);
    outline-offset: 2px;
    border-radius: 3px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--flare);
    color: #fff;
    padding: .75rem 1.25rem;
    z-index: 100;
    font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 1.25rem;
}

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

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

.masthead {
    background: var(--ink);
    color: #E8F1F2;
    border-bottom: 3px solid var(--flare);
}

.masthead a { color: #E8F1F2; }

.masthead-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 68px;
    padding-top: .6rem;
    padding-bottom: .6rem;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: var(--display);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    flex: 0 0 auto;
}
.brand:hover { color: #fff; }
.brand-mark { flex: 0 0 auto; display: block; }

/* The full lockup carries the wordmark, so the masthead shows no text beside it. */
.brand-logo {
    flex: 0 0 auto;
    display: block;
    height: 32px;
    width: auto;
}

@media (max-width: 560px) {
    .brand-logo { height: 26px; }
}

.nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.nav a {
    padding: .45rem .7rem;
    border-radius: 999px;
    font-size: var(--t-base);
    font-weight: 500;
    color: #B9D3D8;
    white-space: nowrap;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); }

.masthead-tools {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex: 0 0 auto;
}

.searchbox { position: relative; }
.searchbox input {
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    border-radius: 999px;
    padding: .5rem .9rem .5rem 2.1rem;
    font: inherit;
    font-size: var(--t-sm);
    width: 190px;
    transition: width .18s ease, background .18s ease;
}
.searchbox input::placeholder { color: #8FB3BB; }
.searchbox input:focus { width: 230px; background: rgba(255,255,255,.16); outline-color: var(--sun); }
.searchbox svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); opacity: .7; }

.avatar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    font-size: var(--t-sm);
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}
.avatar-link:hover { background: var(--flare); border-color: var(--flare); color: #fff; }

/* ------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    font: inherit;
    font-weight: 600;
    font-size: var(--t-base);
    line-height: 1.2;
    padding: .65rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--flare);
    color: #fff;
    cursor: pointer;
    transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
    text-align: center;
}
.btn:hover { background: var(--flare-dark); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}
.btn-ghost:hover { background: var(--mist); border-color: var(--ink-3); color: var(--ink); }

.btn-ink { background: var(--ink); }
.btn-ink:hover { background: var(--ink-2); }

.btn-sea { background: var(--sea); }
.btn-sea:hover { background: #128c83; }

.btn-quiet {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
    padding: .35rem .6rem;
    font-size: var(--t-sm);
}
.btn-quiet:hover { background: var(--mist); color: var(--ink); }

.btn-danger { background: transparent; border-color: #E8B4AE; color: #B03A2B; }
.btn-danger:hover { background: #FDF1EF; border-color: #B03A2B; color: #B03A2B; }

.btn-sm { padding: .4rem .8rem; font-size: var(--t-sm); }
.btn-lg { padding: .85rem 1.6rem; font-size: var(--t-md); }
.btn-block { display: flex; width: 100%; }

/* ---------------------------------------------------- three-column grid */

.layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 300px;
    gap: 2rem;
    align-items: start;
    padding-top: 2rem;
    padding-bottom: 3.5rem;
}

.rail { position: sticky; top: 1.5rem; }

.page { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.page-narrow { max-width: 760px; }

/* Tag chips: each one searches for itself. */
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid var(--line-2);
}

.tag {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--mist);
    color: var(--body);
    font-size: var(--t-xs);
    text-decoration: none;
}
.tag:hover { border-color: var(--ink-3); color: var(--ink); background: var(--paper); }

/* "required" tag beside a field label. */
.req {
    display: inline-block;
    margin-left: .4rem;
    padding: .1rem .4rem;
    border-radius: 999px;
    background: #FDECEA;
    color: #B03A2B;
    font-family: var(--ui);
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Wide enough for four cards a row, with the lede still readable above them. */
.page-wide { max-width: 1080px; }
.page-wide .lede { max-width: 68ch; }

/* --------------------------------------------------------------- panels */

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem;
    margin-bottom: 1.25rem;
}

.panel-tint { background: var(--mist); border-color: var(--line-2); }

.panel-title {
    font-family: var(--ui);
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 .85rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.panel-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ------------------------------------------------- section headings */

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}
.section-head h1, .section-head h2 { margin: 0; }
.section-head p { margin: .25rem 0 0; color: var(--muted); font-size: var(--t-sm); }

.eyebrow {
    display: inline-block;
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--flare);
    margin-bottom: .5rem;
}

.lede { font-size: var(--t-md); color: var(--body); }

/* =====================================================================
   SIGNATURE: the launch pass
   A ranked row is a ticket. The rank is punched into a perforated stub on
   the left; the perforation is a dashed rule with two half-circle notches.
   ===================================================================== */

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

.pass {
    position: relative;
    display: grid;
    grid-template-columns: 68px 1fr;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: .85rem;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pass:hover {
    border-color: #C3D6DA;
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.pass-stub {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mist);
    border-radius: var(--radius) 0 0 var(--radius);
}

/* the perforation */
.pass-stub::after {
    content: "";
    position: absolute;
    top: 12px; bottom: 12px; right: -1px;
    border-right: 2px dashed var(--line);
}
/* the notches */
.pass-stub::before {
    content: "";
    position: absolute;
    right: -7px;
    top: -1px;
    width: 12px; height: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--paper);
}

.pass-rank {
    font-family: var(--display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    opacity: .55;
}

.pass:nth-child(1) .pass-stub { background: #FFF1EF; }
.pass:nth-child(1) .pass-rank { color: var(--flare); opacity: 1; }
.pass:nth-child(2) .pass-rank,
.pass:nth-child(3) .pass-rank { opacity: .8; }

.pass-body {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    min-width: 0;
}

.pass-logo {
    flex: 0 0 auto;
    width: 52px; height: 52px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--mist);
    object-fit: contain;
    padding: 4px;
}

.pass-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
}

.pass-main { min-width: 0; flex: 1 1 auto; }

.pass-title {
    font-family: var(--display);
    font-size: var(--t-md);
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 .2rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    /* Titles wrap; they never truncate mid-word. */
    overflow-wrap: anywhere;
}
.pass-title a { color: inherit; }
.pass-title a:hover { color: var(--flare); }

.pass-desc {
    margin: 0;
    color: var(--muted);
    font-size: var(--t-base);
    overflow-wrap: anywhere;
}

.pass-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .6rem;
    font-size: var(--t-sm);
    color: var(--muted);
    flex-wrap: wrap;
}
.pass-meta a { color: var(--muted); }
.pass-meta a:hover { color: var(--flare); }

.pass-vote {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
    min-width: 58px;
    padding: .45rem .3rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 700;
    font-size: var(--t-md);
    line-height: 1.1;
    cursor: pointer;
    font-family: var(--ui);
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pass-vote span { font-size: var(--t-xs); font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.pass-vote:hover { border-color: var(--flare); color: var(--flare); }
.pass-vote:hover span { color: var(--flare); }
.pass-vote.is-voted { background: var(--flare); border-color: var(--flare); color: #fff; }
.pass-vote.is-voted span { color: rgba(255,255,255,.85); }
.pass-vote svg { display: block; }

/* --------------------------------------------------------- status stamps */

.stamp {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--ui);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .2rem .5rem;
    border-radius: 4px;
    border: 1.5px solid currentColor;
    white-space: nowrap;
}

.stamp-live      { color: #0F7F76; background: #E6F6F4; border-color: #9BD8D2; }
.stamp-scheduled { color: #8A6100; background: #FEF6E0; border-color: #EBD08A; }
.stamp-review    { color: #8A4C1E; background: #FBEEE4; border-color: #E4BE99; }
.stamp-draft     { color: var(--muted); background: var(--mist); border-color: var(--line); }
.stamp-rejected  { color: #96382B; background: #FBECEA; border-color: #E4B0A8; }
.stamp-featured  { color: #7A5B00; background: #FDF3D3; border-color: #E9CE72; }
.stamp-count  { color: var(--ink-3); background: #EAF3F5; border-color: #BFD9DE; }

/* A stamp that really looks stamped - used once per page, on the hero state. */
.stamp-large {
    font-size: var(--t-sm);
    padding: .45rem .85rem;
    border-width: 2px;
    border-radius: 6px;
    transform: rotate(-2.5deg);
}

/* ---------------------------------------------------------- rail lists */

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

.rail-item {
    display: flex;
    gap: .65rem;
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px dashed var(--line);
}
.rail-item:last-child { border-bottom: 0; padding-bottom: 0; }

.rail-index {
    flex: 0 0 auto;
    width: 20px;
    font-family: var(--display);
    font-weight: 700;
    color: var(--flare);
    font-size: var(--t-sm);
    font-variant-numeric: tabular-nums;
}

.rail-logo {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--mist);
    object-fit: contain;
    padding: 2px;
}

.rail-body { min-width: 0; }
.rail-name {
    display: block;
    font-weight: 600;
    color: var(--ink);
    font-size: var(--t-sm);
    overflow-wrap: anywhere;
}
.rail-name:hover { color: var(--flare); }
.rail-note { font-size: var(--t-xs); color: var(--muted); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    background: var(--mist);
    border: 1px solid var(--line-2);
    font-size: var(--t-sm);
    color: var(--ink);
}
.tag:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag-count { color: var(--muted); font-size: var(--t-xs); }
.tag:hover .tag-count { color: rgba(255,255,255,.7); }

/* ------------------------------------------------------------ CTA card */

.cta-card {
    background: var(--ink);
    color: #D8E8EB;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
.cta-card h3 { color: #fff; font-size: var(--t-lg); margin-bottom: .4rem; }
.cta-card p { font-size: var(--t-sm); color: #A8C6CC; }
.cta-card .btn { margin-top: .75rem; }
.cta-card::after {
    content: "";
    position: absolute;
    right: -30px; top: -30px;
    width: 110px; height: 110px;
    border: 2px dashed rgba(255,255,255,.12);
    border-radius: 50%;
}

/* ---------------------------------------------------------------- cards */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover { border-color: #C3D6DA; box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card h3 { font-size: var(--t-md); margin-bottom: .35rem; overflow-wrap: anywhere; }
.card h3 a { color: inherit; }
.card p { color: var(--muted); font-size: var(--t-sm); margin: 0; }
.card-foot {
    margin-top: auto;
    padding-top: .9rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: var(--t-xs);
    color: var(--muted);
    flex-wrap: wrap;
}

.card-cover {
    display: block;
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--mist);
    margin-bottom: .9rem;
}

/* -------------------------------------------------------- listing page */

.listing-head {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.75rem;
}

.listing-logo {
    width: 88px; height: 88px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--mist);
    object-fit: contain;
    padding: 8px;
    flex: 0 0 auto;
}

.listing-headline { flex: 1 1 320px; min-width: 0; }
.listing-headline h1 {
    font-size: var(--t-2xl);
    margin-bottom: .35rem;
    overflow-wrap: anywhere;
}
.listing-headline .lede { color: var(--muted); margin-bottom: .75rem; }

.listing-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.listing-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 2.5rem;
    align-items: start;
}

.prose { font-size: var(--t-md); color: var(--body); }
.prose p { margin-bottom: 1.1em; }
.prose h2 { font-size: var(--t-xl); margin-top: 1.8em; }
.prose h3 { font-size: var(--t-lg); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
    margin: 1.5em 0;
    padding: .25rem 0 .25rem 1.25rem;
    border-left: 3px solid var(--flare);
    color: var(--ink);
    font-family: var(--display);
    font-size: var(--t-lg);
}
.prose a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--flare); }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.prose code {
    background: var(--mist);
    padding: .1rem .35rem;
    border-radius: 4px;
    border: 1px solid var(--line-2);
}

.shots { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.shots img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--mist);
}

.meta-list { list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem 0;
    border-bottom: 1px dashed var(--line);
}
.meta-list li:last-child { border-bottom: 0; }
.meta-list dt, .meta-list .k { color: var(--muted); }
.meta-list .v { color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.social-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.social-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: var(--t-sm);
    color: var(--ink);
    background: var(--paper);
}
.social-chip:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ------------------------------------------------------------ comments */

.comment {
    display: flex;
    gap: .85rem;
    padding: 1rem 0;
    border-bottom: 1px dashed var(--line);
}
.comment:last-child { border-bottom: 0; }

.comment-avatar {
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--mist);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--t-sm);
    font-weight: 700;
    color: var(--ink-3);
    text-transform: uppercase;
}
.comment-body { min-width: 0; }
.comment-who { font-weight: 600; color: var(--ink); font-size: var(--t-sm); }
.comment-when { color: var(--muted); font-size: var(--t-xs); }
.comment-text { margin-top: .25rem; overflow-wrap: anywhere; }

/* --------------------------------------------------------------- forms */

.form-row { margin-bottom: 1.25rem; }

label, .label {
    display: block;
    font-weight: 600;
    font-size: var(--t-sm);
    color: var(--ink);
    margin-bottom: .35rem;
}

.hint { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-sm); margin-bottom: .4rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="search"], input[type="number"], select, textarea {
    width: 100%;
    font: inherit;
    font-size: var(--t-base);
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .65rem .8rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--ink-3);
    box-shadow: 0 0 0 3px rgba(29, 85, 102, .12);
    outline: none;
}

input[type="file"] { font-size: var(--t-sm); }

textarea { min-height: 140px; resize: vertical; line-height: 1.65; }

.field-error {
    display: block;
    color: #B03A2B;
    font-size: var(--t-sm);
    margin-top: .35rem;
}

input.has-error, textarea.has-error { border-color: #D98A7E; }

.counter {
    display: flex;
    justify-content: space-between;
    font-size: var(--t-xs);
    color: var(--muted);
    margin-top: .3rem;
    font-variant-numeric: tabular-nums;
}
.counter .count-under { color: #B03A2B; font-weight: 600; }
.counter .count-ok { color: #0F7F76; font-weight: 600; }

.form-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-weight: 400;
    color: var(--body);
}
.check input { width: auto; margin-top: .25rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

.auth-card {
    max-width: 440px;
    margin: 3rem auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: var(--t-xl); }

.divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--muted);
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 1.25rem 0;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.btn-google {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}
.btn-google:hover { background: var(--mist); color: var(--ink); border-color: #C3D6DA; }

/* -------------------------------------------------------------- flashes */

.flash {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid;
    margin-bottom: 1rem;
    font-size: var(--t-base);
}
.flash-success { background: #E9F7F5; border-color: #A8DCD6; color: #0C5F58; }
.flash-error   { background: #FDEEEB; border-color: #EFBDB4; color: #8F2E20; }
.flash-warning { background: #FEF6E4; border-color: #EDD292; color: #7A5600; }
.flash-info    { background: #EAF3F6; border-color: #BCD8E0; color: #14505F; }
.flash strong { font-weight: 700; }

.flash-stack { margin: 1.25rem 0 0; }

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

.steps {
    display: flex;
    align-items: center;
    gap: .5rem;
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    flex-wrap: wrap;
    font-size: var(--t-sm);
}
.steps li {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--muted);
}
.steps li + li::before {
    content: "";
    width: 26px;
    border-top: 2px dashed var(--line);
    display: inline-block;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    font-weight: 700;
    font-size: var(--t-xs);
    color: var(--muted);
    background: var(--paper);
}
.steps .is-current { color: var(--ink); font-weight: 600; }
.steps .is-current .step-num { border-color: var(--flare); background: var(--flare); color: #fff; }
.steps .is-done .step-num { border-color: var(--sea); background: var(--sea); color: #fff; }

/* ------------------------------------------------------- choice cards */

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }

.choice {
    display: flex;
    flex-direction: column;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--paper);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: #C3D6DA; box-shadow: var(--shadow); }
.choice-primary { border-color: var(--flare); }
.choice h2 { font-size: var(--t-lg); margin-bottom: .3rem; }
.choice ul { list-style: none; margin: 1rem 0 1.25rem; padding: 0; font-size: var(--t-base); }
.choice li { display: flex; gap: .5rem; padding: .3rem 0; color: var(--body); }
.choice li::before { content: "→"; color: var(--flare); flex: 0 0 auto; }
.choice form { margin-top: auto; }

/* ---------------------------------------------------------- code blocks */

.codeblock {
    position: relative;
    background: var(--ink);
    color: #D6E7EA;
    border-radius: var(--radius-sm);
    padding: 1rem 1rem;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: var(--t-sm);
    line-height: 1.65;
    white-space: pre;
    margin: 0 0 .75rem;
    -webkit-overflow-scrolling: touch;
}
.copy-btn {
    position: absolute;
    top: .55rem; right: .55rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    border-radius: 6px;
    padding: .25rem .6rem;
    font: inherit;
    font-family: var(--ui);
    font-size: var(--t-xs);
    cursor: pointer;
}
.copy-btn:hover { background: var(--flare); border-color: var(--flare); }

.badge-preview {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--mist);
    margin-bottom: 1rem;
}
.badge-preview .on-dark { background: var(--ink); padding: .75rem; border-radius: var(--radius-sm); }

.tabs { display: flex; gap: .35rem; margin-bottom: .75rem; flex-wrap: wrap; }
.tab {
    padding: .35rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    font: inherit;
    font-size: var(--t-sm);
    color: var(--muted);
    cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --------------------------------------- the last screen of the submit flow */

.review-url {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--mist);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: .7rem .9rem;
    margin-bottom: 1.5rem;
}

.review-url-label {
    display: block;
    font-size: var(--t-xs);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--muted);
}

.review-url-value {
    font-family: var(--mono);
    font-size: var(--t-sm);
    color: var(--ink);
    overflow-wrap: anywhere;
}

/* The one-line intro above the URL: let it run past the reading measure. */
.page-wide .lede-tight { max-width: none; }

.final-steps-head {
    margin-bottom: 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
}

.final-steps-head h2 {
    font-size: var(--t-lg);
    margin: 0 0 .15rem;
}

.final-steps-head p {
    margin: 0;
    font-size: var(--t-sm);
    color: var(--muted);
}

/* Two compact steps, so the votes sit in view under the badge. */
.final-step { margin-bottom: 1.5rem; }

.final-step-head {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-bottom: .7rem;
}

.final-step-head > div:first-of-type { flex: 1 1 auto; min-width: 0; }

.final-step-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: var(--t-xs);
    font-weight: 700;
}

.final-step-num.is-done { background: var(--sea); }

.final-step-title {
    font-size: var(--t-md);
    margin: 0 0 .1rem;
}

.final-step-note {
    margin: 0;
    font-size: var(--t-sm);
    color: var(--muted);
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: .85rem;
}

.badge-row-img { flex: 0 0 auto; }
.badge-row-code { flex: 1 1 320px; min-width: 0; }

.codeblock-tight {
    max-height: 74px;
    overflow: auto;
    margin-bottom: .5rem;
    font-size: var(--t-xs);
}

.support-meter {
    flex: 0 0 auto;
    min-width: 150px;
    background: var(--mist);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: .5rem .7rem;
}

.support-meter-track {
    height: 6px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.support-meter-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--flare);
    transition: width .25s ease;
}

.support-meter.is-met .support-meter-fill { background: var(--sea); }

.support-meter-text {
    margin: .35rem 0 0;
    font-size: var(--t-xs);
    color: var(--muted);
    white-space: nowrap;
}
.support-meter-text strong { color: var(--ink); }

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .85rem;
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
}

/* Four a row once there is room, so twelve cards read as a block of three rows
   rather than a long column with dead space beside it. */
@media (min-width: 880px) {
    .support-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.support-card {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .9rem;
}

.support-card.is-voted { border-color: var(--sea); background: #F2FBFA; }

.support-card-head { display: flex; align-items: center; gap: .6rem; }

.support-logo {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    background: var(--mist);
}

.support-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    color: var(--ink);
}

.support-card-name { min-width: 0; }
.support-card-name a {
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.support-card-desc {
    flex: 1 1 auto;
    margin: 0;
    font-size: var(--t-sm);
    color: var(--muted);
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    font: inherit;
    font-size: var(--t-sm);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    cursor: pointer;
}
.vote-btn:hover { border-color: var(--flare); color: var(--flare-dark); }
.vote-btn.is-voted { background: var(--sea); border-color: var(--sea); color: #fff; }
.vote-btn.is-voted:hover { background: #128c83; border-color: #128c83; color: #fff; }

.support-finish { display: flex; justify-content: center; }

/*
 * Locked-looking, but a working link all the same - the three upvotes are a
 * nudge, never a gate. Keep it clickable if you touch this.
 */
.btn.is-locked {
    background: var(--line);
    border-color: var(--line);
    color: var(--muted);
}
.btn.is-locked:hover {
    background: var(--line);
    border-color: var(--line);
    color: var(--muted);
    transform: none;
}

.support-lock { opacity: .75; }

/* ----------------------------------------- "How a listing gets here" block */

.how {
    background: var(--mist);
    border-top: 1px solid var(--line);
    padding: 3rem 0 3.25rem;
}

.how-title {
    font-size: var(--t-2xl);
    margin: 0 0 2rem;
}

.how-lede {
    max-width: 62ch;
    margin: 0 0 2rem;
    font-size: var(--t-md);
    color: var(--body);
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.how-item h3 {
    font-family: var(--ui);
    font-size: var(--t-base);
    font-weight: 700;
    margin: 0 0 .35rem;
    padding-top: .7rem;
    border-top: 2px solid var(--flare);
}

.how-item p {
    margin: 0;
    font-size: var(--t-sm);
    color: var(--muted);
}

.how-item code {
    font-family: var(--mono);
    font-size: .85em;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0 4px;
}

.how-foot {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin: 0;
}

/* ------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--t-sm);
    background: var(--paper);
}
table.data th, table.data td {
    text-align: left;
    padding: .7rem .85rem;
    border-bottom: 1px solid var(--line-2);
    vertical-align: middle;
}
table.data th {
    font-size: var(--t-xs);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--mist);
    white-space: nowrap;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #FBFDFD; }
.cell-actions { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ------------------------------------------------------------ empty state */

.empty {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    background: var(--mist);
}
.empty h3 { margin-bottom: .35rem; }
.empty p { color: var(--muted); max-width: 44ch; margin: 0 auto 1rem; }

/* ------------------------------------------------------------ pagination */

.pager {
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pager a, .pager span {
    padding: .45rem .8rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-size: var(--t-sm);
    color: var(--ink);
}
.pager a:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.pager .is-current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.pager .is-disabled { color: var(--muted); border-color: var(--line-2); }

/* ------------------------------------------------------------ breadcrumb */

.crumbs {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    font-size: var(--t-sm);
    color: var(--muted);
    margin-bottom: 1rem;
    list-style: none;
    padding: 0;
}
.crumbs li { display: flex; gap: .4rem; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--flare); }

/* ----------------------------------------------------------- featured on */

.featured-on {
    padding: 2.5rem 0 0;
    text-align: center;
}
.featured-on h4 {
    font-family: var(--ui);
    font-size: var(--t-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 2rem;
}
.featured-on-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.featured-on-badges a {
    display: inline-block;
    line-height: 0;
    transform: scale(.55);
    transform-origin: center;
    margin: -1.25rem -2rem;
}
.featured-on-badges img { max-width: 250px; height: auto; }

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

.footer {
    background: var(--ink);
    color: #A8C6CC;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
    border-top: 3px solid var(--flare);
}
.footer a { color: #C7DEE2; }
.footer a:hover { color: #fff; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer h4 {
    color: #fff;
    font-family: var(--ui);
    font-size: var(--t-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: .85rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.footer li { margin-bottom: .5rem; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    font-size: var(--t-sm);
}
.footer-brand { color: #fff; font-family: var(--display); font-size: var(--t-lg); font-weight: 700; }
.footer-blurb { font-size: var(--t-sm); max-width: 34ch; margin-top: .5rem; }

/* --------------------------------------------------------------- admin */

.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2rem; padding-top: 2rem; padding-bottom: 4rem; }

.admin-nav { position: sticky; top: 1.5rem; list-style: none; margin: 0; padding: 0; }
.admin-nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    color: var(--body);
    font-size: var(--t-base);
    font-weight: 500;
}
.admin-nav a:hover { background: var(--mist); color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.admin-nav .pill {
    background: var(--flare);
    color: #fff;
    border-radius: 999px;
    padding: 0 .45rem;
    font-size: var(--t-xs);
    font-weight: 700;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin-bottom: 2rem; }
.stat {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .9rem 1rem;
    background: var(--paper);
}
.stat .n { font-family: var(--display); font-size: var(--t-2xl); font-weight: 700; color: var(--ink); line-height: 1; }
.stat .k { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-top: .35rem; }

/* -------------------------------------------------------------- utility */

.stack > * + * { margin-top: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: var(--t-sm); }
.tiny { font-size: var(--t-xs); }
.strong { font-weight: 700; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.75rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.75rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.inline-form { display: inline; }

/* ---------------------------------------------------------- responsive */

@media (max-width: 1080px) {
    .layout { grid-template-columns: minmax(0, 1fr) 280px; }
    /* Main column first on tablets; trending moves under it. */
    .rail-left { grid-column: 1 / -1; order: 3; position: static; }
    .rail-left .panel { margin-bottom: 0; }
    .rail-left .panel + .panel { margin-top: 1.25rem; }
    .listing-columns { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    :root { --t-3xl: 2.125rem; --t-2xl: 1.75rem; --t-xl: 1.4rem; }
    .layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .rail { position: static; }
    .rail-right { order: 4; }
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-nav { position: static; display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; }
    .admin-nav li { flex: 0 0 auto; }
    .masthead-inner { min-height: 0; }
    .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: .25rem; }
    .searchbox input, .searchbox input:focus { width: 150px; }
}

@media (max-width: 560px) {
    /* Search takes its own row so the header cannot force a horizontal scroll. */
    .masthead-tools { flex-wrap: wrap; width: 100%; }
    .searchbox { flex: 1 1 100%; order: -1; }
    .searchbox input,
    .searchbox input:focus { width: 100%; }

    .pass { grid-template-columns: 46px 1fr; }
    .pass-rank { font-size: 1.25rem; }
    .pass-body { padding: .85rem; gap: .75rem; flex-wrap: wrap; }
    .pass-logo { width: 42px; height: 42px; }
    .pass-vote { order: 3; flex-direction: row; gap: .4rem; min-width: 0; padding: .3rem .6rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .auth-card { margin: 1.5rem auto; padding: 1.5rem; }
    .listing-logo { width: 64px; height: 64px; }
}

/* --------------------------------------------------- motion + printing */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .pass:hover, .card:hover, .btn:hover { transform: none; }
}

@media print {
    .masthead, .footer, .rail, .listing-actions { display: none; }
    body { color: #000; }
}

/* The "reading your site" spinner - the one animated thing on the site. */
.pulse {
    width: 54px; height: 54px;
    border-radius: 50%;
    border: 3px solid var(--line);
    border-top-color: var(--flare);
    animation: spin 900ms linear infinite;
    margin: 0 auto 1.25rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.reading-card {
    max-width: 480px;
    margin: 4rem auto;
    text-align: center;
    padding: 2.5rem 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
