/* site.css — the one stylesheet for nostr.net (Night Market design).
   Light or dark follows the visitor's system setting: :root holds the light
   tokens, @media (prefers-color-scheme: dark) swaps in the dark set. Rounded
   geometry: --radius-* for surfaces, 999px for pills. */

/* ===== Tokens ===== */
:root {
    color-scheme: light;
    /* two accents: violet --primary-color is text/focus/borders (≥4.5:1 on
       every surface); zap yellow --primary-fill only ever sits behind
       --on-primary ink. Yellow is unreadable as text on paper, so zap-colored
       text uses gold --primary-display. --accent is the violet fill (search,
       nostr.net's own zap) behind --on-accent. WCAG 2.x ratios are pinned in
       test/contrast.test.mjs. */
    --primary-color: #5b36ef;
    --primary-fill: #ffd23f;
    --primary-display: #8a6100;
    --primary-hover: #ffdd6b;
    --on-primary: #1e1b24;
    --accent: #6c47ff;
    --on-accent: #ffffff;
    --background-color: #faf8f4;
    --text-color: #1e1b24;
    --text-muted: #625d6c;
    --card-background: #ffffff;
    --sidebar-background: #f1eee8;
    --sidebar-border: #e8e4dc;
    --hover-color: #f1eee8;
    --text-primary: var(--text-color);
    --link-color: var(--text-color);
    --star-color: #8a6100;
    --border-color: #e8e4dc;          /* hairlines/dividers (decorative) */
    --control-border: #878276;        /* inputs, icon buttons: ≥3:1 */
    --success: #2b752f;               /* status text (fills keep #2e7d32/#c62828 + white) */
    --danger: #c42828;
    --warning: #a64d08;
    --input-background: #ffffff;
    --glow: #e9e2ff;                  /* the violet haze behind the header */
    --violet-line: #d8cdfb;           /* borders of nostr.net's own (violet) surfaces */
    --shadow-sm: 0 1px 2px rgba(20,16,30,.06);
    --shadow-md: 0 1px 2px rgba(20,16,30,.06), 0 10px 30px rgba(20,16,30,.08);
    --shadow-lg: 0 24px 60px rgba(20,16,30,.16);
    --shadow-glow: none;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
    --font-sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --primary-color: #b4a3ff;
        --primary-fill: #ffd23f;
        --primary-display: #ffd23f;
        --primary-hover: #ffdd6b;
        --on-primary: #14110a;
        --accent: #7650ff;
        --background-color: #0e0c14;
        --text-color: #f3f0fa;
        --text-muted: #a49db6;
        --card-background: #17141f;
        --sidebar-background: #231f2e;
        --sidebar-border: #2a2536;
        --hover-color: #231f2e;
        --star-color: #ffd23f;
        --border-color: #2a2536;
        --control-border: #77708a;
        --success: #6cc070;
        --danger: #f07a6e;
        --warning: #f0a050;
        --input-background: #17141f;
        --glow: #241a4a;
        --violet-line: #3a2f66;
        --shadow-sm: 0 1px 0 rgba(0,0,0,.3);
        --shadow-md: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 32px rgba(0,0,0,.4);
        --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
    }
}

/* ===== Icons =====
   Inline SVG masks under the old Font Awesome class names, so markup in
   render.mjs and the zap scripts keeps working with no icon font download.
   Icons take currentColor. Add one: a --icon-NAME token + .fa-NAME rule. */
:root {
    --icon-chevron-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
    --icon-bars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E");
    --icon-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
    --icon-redo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E");
    --icon-qrcode: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h3v3h-3zM20 14v.01M14 20h.01M17 20h4v-3'/%3E%3C/svg%3E");
    --icon-wallet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4'/%3E%3C/svg%3E");
    --icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8h14v14H8z'/%3E%3Cpath d='M4 16H2V2h14v2'/%3E%3C/svg%3E");
    --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    --icon-github: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4'/%3E%3Cpath d='M9 18c-4.51 2-5-2-7-2'/%3E%3C/svg%3E");
    --icon-spinner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.22-8.56'/%3E%3C/svg%3E");
}
.fas, .fab {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
.fa-chevron-right { --icon: var(--icon-chevron-right); }
.fa-bars { --icon: var(--icon-bars); }
.fa-bolt { --icon: var(--icon-bolt); }
.fa-redo { --icon: var(--icon-redo); }
.fa-qrcode { --icon: var(--icon-qrcode); }
.fa-wallet { --icon: var(--icon-wallet); }
.fa-copy { --icon: var(--icon-copy); }
.fa-check { --icon: var(--icon-check); }
.fa-github { --icon: var(--icon-github); }
.fa-spinner { --icon: var(--icon-spinner); }

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    /* Night Market's violet haze behind the header, over the page color */
    background: radial-gradient(1000px 420px at 75% -12%, var(--glow), transparent 60%) no-repeat, var(--background-color);
    color: var(--text-color);
    line-height: 1.55;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
/* links: ink text, violet underline */
a { text-decoration-color: var(--primary-color); text-underline-offset: .2em; }

/* ===== Layout ===== */
.container {
    display: flex;
    min-height: 100vh;
}

/* ===== Top Navigation ===== */
.top-nav {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    background-image: var(--gradient-subtle);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.7rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav-content h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 272px;
    background-color: var(--sidebar-background);
    padding: 1rem 0.75rem;
    position: fixed;
    height: calc(100vh - 55px);
    overflow-y: auto;
    transition: transform 0.3s ease;
    border-right: 1px solid var(--sidebar-border);
    top: 55px;
    touch-action: pan-y pinch-zoom;
    will-change: transform;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
    padding: 0 0.75rem;
}

/* a plain <p>, not a heading: the sidebar precedes the page's h2 in the
   DOM, so a heading here would break the document's outline order. */
.sidebar .sidebar-title {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 1px;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 999px;
    transition: all var(--transition);
    font-size: 0.88rem;
    font-weight: 400;
    position: relative;
}

.nav-links a:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.nav-links a.active {
    background-color: var(--hover-color);
    color: var(--primary-color);
    font-weight: 700;
}

.nav-links i {
    margin-right: 0.6rem;
    width: 18px;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.5;
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 3px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* ===== Main Content ===== */
.main-content {
    margin-left: 272px;
    padding: 2rem 2.5rem;
    padding-top: 80px;
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.content-header {
    /* visible again — hosts the activity filter bar */
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.75rem;
}

.view-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Main Content Scrollbar */
.main-content::-webkit-scrollbar {
    width: 5px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 999px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.main-content {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* ===== Resource Grid ===== */
#resources-container {
    display: grid;
    /* columns scale with the screen: auto-fill adds one per ~360px of width
       (sidebar aside), so large displays fill the space instead of dead-
       ending at an 1100px cap; generous ceiling keeps lines scannable */
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    height: auto;
    min-height: 200px;
    overflow: visible;
}

#resources-container > h2 {
    grid-column: 1 / -1;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.6rem;
    letter-spacing: -0.03em;
    border-bottom: 2px solid transparent;
}

/* ===== Resource Cards ===== */
.resource-card {
    background: var(--card-background);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.resource-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-md);
    padding: 1px;
    background: var(--primary-color);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.resource-card:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-2px);
}

.resource-card:hover::before {
    opacity: 1;
}

.resource-title {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.3;
}

.resource-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
    overflow-wrap: anywhere;
}

.resource-title a:hover {
    color: var(--primary-color);
}

.resource-description {
    margin: 6px 0 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.resource-description a {
    color: var(--link-color);
    text-decoration-line: underline;
    font-weight: 500;
}

/* ===== Status Messages ===== */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ===== Accessibility ===== */

a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--sidebar-background);
    color: var(--text-muted);
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

/* ===== Menu Toggle (Mobile) ===== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1002;
    background-color: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.menu-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== Responsive: Tablet & Below ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        touch-action: pan-y pinch-zoom;
        will-change: transform;
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-header {
        margin-top: 4rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1.25rem;
        padding-top: 100px;
        height: auto;
        overflow: visible;
        overscroll-behavior: auto;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    .top-nav {
        padding: 0;
    }

    .nav-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "logo . controls"
            "search search search";
        gap: 0.5rem;
        padding: 0.5rem 1rem;
        margin-left: 2.5rem;
        max-width: calc(100% - 2.5rem);
    }

    .nav-content h1 {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        padding: 0.65rem 0.75rem;
        min-height: 44px;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-links a:active,
    .menu-toggle:active {
        opacity: 0.7;
        transition: opacity 0.1s;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }
}

/* ===== Responsive: Small Phones ===== */
@media (max-width: 480px) {
    .nav-content {
        gap: 0.3rem;
        padding: 0.3rem 0.75rem;
    }

    .main-content {
        padding: 0.75rem;
        padding-top: 130px;
    }
}

/* ===== Responsive: Single Column Cards ===== */
@media (max-width: 640px) {
    #resources-container {
        grid-template-columns: 1fr;
    }
}

/* ===== Responsive: Spacing ===== */
@media (max-width: 768px) {
    .main-content {
        padding-top: 110px;
    }

    #resources-container h2 {
        margin-top: 0.5rem;
        font-size: 1.3rem;
    }
}

/* ===== Grantless: zap & donate chips ===== */
.resource-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* Lightning actions: .zap-chip is the FILLED yellow Zap pill, a card's
   primary action. AA pairs are pinned in test/contrast.test.mjs (ON_FILLS):
   --on-primary on --primary-fill, hover on --primary-hover. .is-site is
   nostr.net's own zap: violet (--accent), never builder yellow. .zap-button
   stays outlined for page-level actions (split zap, support nostr.net). */
.zap-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--primary-fill);
    border-radius: 999px;
    background: var(--primary-fill);
    color: var(--on-primary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
    white-space: nowrap;
}

.zap-button .fa-bolt {
    color: var(--primary-display);
}

/* the chip is filled, so its icon takes the button's own ink; the
   zapped/error states below swap the chip color and the icon follows */
.zap-chip .fa-bolt {
    color: inherit;
}

.zap-chip:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--on-primary);
    text-decoration: none;
}

/* visible focus ring on the filled chip (amber ≥3:1 on the card bg;
   a.zap-chip specificity beats the later .atlas-site a:focus-visible) */
a.zap-chip:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.zap-chip.is-site { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.zap-chip.is-site:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 86%, var(--on-accent)); color: var(--on-accent); }

/* quick zap row (directory-shared quickZapHtml): presets, "…", Zap. "…" is
   a field for any amount; in use (.typing, site.js) it replaces the presets
   and shows its unit. 16px field text: iOS Safari zooms into smaller inputs. */
.quick-zap { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.zap-amounts { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--sidebar-background); }
.zap-amounts[hidden], .zap-unit, .zap-amounts.typing button { display: none; }
.zap-amounts button { padding: 4px 9px; border: 0; border-radius: 999px; background: transparent; color: var(--text-muted); font: 600 .8125rem var(--font-sans); cursor: pointer; }
.zap-amounts button[aria-pressed="true"] { background: var(--card-background); color: var(--text-color); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.zap-other { width: 1.75em; padding: 4px 0; border: 0; border-radius: 999px; background: transparent; color: var(--text-color); font: 600 1rem/20px var(--font-sans); text-align: center; }
.zap-other::placeholder { color: var(--text-muted); opacity: 1; }
.zap-amounts.typing .zap-other { width: 5em; padding-left: 9px; text-align: left; }
.zap-amounts.typing .zap-unit { display: block; align-self: center; padding-right: 9px; color: var(--text-muted); font: 600 .8125rem var(--font-sans); }

/* ===== Zap flow + support sheet ===== */
/* the landing's zap flow (render.mjs zapFlowHtml, zap-flow.js): who → how
   much → send. Builder zaps are yellow; the nostr.net add-on is violet. */
.atlas-site .zap-flow { box-sizing: border-box; margin-block: 24px 64px; padding: 26px 30px; border-radius: var(--radius-xl); background: var(--card-background); box-shadow: var(--shadow-md), inset 0 0 0 1px var(--border-color); }
.zap-flow-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; }
.atlas-site .zap-flow-head .eyebrow { color: var(--primary-display); }
.atlas-site .zap-flow-head h2 { margin: 6px 0 0; font: 800 clamp(1.75rem, 3.3vw, 2.5rem)/1.1 var(--font-display); letter-spacing: -.02em; }
.zap-flow-head > p { max-width: 380px; margin: 0; color: var(--text-muted); font-size: .9375rem; }
.zap-flow-steps { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 20px; }
.zap-flow-steps[hidden], .zap-flow-fallback[hidden], .zap-flow-addon[hidden] { display: none; }
.zap-flow-step { min-width: 0; padding: 16px; border-radius: var(--radius-md); background: var(--sidebar-background); transition: opacity var(--transition), box-shadow var(--transition); }
.zap-flow-steps[data-reached="3"] .zap-flow-step:nth-child(3), .zap-flow-steps[data-reached="2"] .zap-flow-step:nth-child(2) { box-shadow: inset 0 0 0 1px var(--primary-display); }
.zap-flow-steps[data-reached="2"] .zap-flow-step:nth-child(3) { opacity: .5; }
.zap-flow-step h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 .95rem var(--font-display); }
.zap-flow-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-fill); color: var(--on-primary); font: 700 .8rem var(--font-sans); }
.zap-flow-picks, .zap-flow-amounts { display: flex; flex-wrap: wrap; gap: 8px; }
.zap-flow-picks button, .zap-flow-amounts button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--card-background); box-shadow: inset 0 0 0 1px var(--control-border); color: var(--text-color); font: 600 .875rem var(--font-sans); cursor: pointer; transition: box-shadow var(--transition); }
.zap-flow-picks button:not(.is-all) { padding-left: 8px; }
.zap-flow-picks button:hover, .zap-flow-amounts button:hover { box-shadow: inset 0 0 0 1px var(--primary-color); }
.zap-flow-picks button[aria-pressed="true"], .zap-flow-amounts button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--primary-display); }
.zap-flow-picks .resource-icon, .zap-flow-picks .resource-tile { width: 28px; height: 28px; border-radius: 8px; font-size: .75rem; }
.zap-flow-picks button.is-all { background: var(--primary-fill); color: var(--on-primary); box-shadow: none; }
.zap-flow-picks button.is-all[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--sidebar-background), 0 0 0 4px var(--primary-display); }
.zap-flow-picks button:focus-visible, .zap-flow-amounts button:focus-visible, .zap-flow-other input:focus-visible, .zap-flow-addon input:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.zap-flow-other { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--text-muted); font: 600 .8125rem var(--font-sans); }
.zap-flow-other input { box-sizing: border-box; width: 8.5em; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--input-background); box-shadow: inset 0 0 0 1px var(--control-border); color: var(--text-color); font: 600 1rem var(--font-sans); }
.zap-flow-other input::placeholder { color: var(--text-muted); opacity: 1; }
.zap-flow-other input:not(:placeholder-shown) { box-shadow: inset 0 0 0 2px var(--primary-display); }
.zap-flow-other input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--danger); }
.zap-flow-share { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; font-size: .875rem; }
.zap-flow-share.is-error { color: var(--danger); }
.atlas-site .site-button.zap-flow-pay { width: 100%; white-space: normal; }
.atlas-site .site-button.zap-flow-pay:disabled { border-color: var(--control-border); background: transparent; color: var(--text-muted); cursor: not-allowed; transform: none; box-shadow: none; }
.zap-flow-addon { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--glow); box-shadow: inset 0 0 0 1px var(--violet-line); font-size: .8125rem; cursor: pointer; }
.zap-flow-addon input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.zap-flow-addon b { color: var(--primary-color); }
.zap-flow-addon small { display: block; margin-top: 2px; color: var(--text-muted); font-size: .75rem; }
.zap-flow-note { margin: 10px 0 0; color: var(--text-muted); font-size: .8125rem; }
.zap-flow-fallback { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 20px 0 0; }
@media (max-width: 960px) {
    .zap-flow-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .atlas-site .zap-flow { padding: 22px 18px; border-radius: var(--radius-lg); }
}

/* after-zap sheet (site.js): a native modal <dialog> docked at the bottom,
   nostr.net's violet. The dialog box is the backdrop area, so a click
   outside .support-sheet-body lands on the dialog and closes it. */
.support-sheet { box-sizing: border-box; width: min(520px, calc(100% - 24px)); max-width: none; margin: auto auto 12px; padding: 0; border: 0; border-radius: var(--radius-xl); background: var(--card-background); color: var(--text-color); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--violet-line); }
.support-sheet[open] { animation: support-sheet-rise .25s cubic-bezier(.2, .7, .2, 1); }
.support-sheet::backdrop { background: color-mix(in srgb, var(--on-primary) 34%, transparent); backdrop-filter: blur(3px); }
.support-sheet-body { display: grid; gap: 12px; padding: 24px; }
.support-sheet-kicker { margin: 0; color: var(--primary-color); font: 800 .75rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
.support-sheet h2 { margin: 0; font: 800 1.625rem/1.15 var(--font-display); }
.support-sheet-body > p:not(.support-sheet-kicker) { margin: 0; color: var(--text-muted); font-size: .875rem; }
.support-sheet-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.support-sheet-row .site-button { min-height: 44px; }
@keyframes support-sheet-rise { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
    .support-sheet[open] { animation: none; }
}

/* ===== In-page zapping (Bitcoin Connect) ===== */
/* zap chip interaction states */
.zap-chip { position: relative; }
.zap-chip[data-state="zapping"] {
    opacity: 0.75;
    pointer-events: none;
}
.zap-chip[data-state="zapping"] .fa-bolt {
    --icon: var(--icon-spinner);
    animation: zap-spin 0.9s linear infinite;
}
.zap-chip[data-state="zapped"] {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
    pointer-events: none;
}
.zap-chip[data-state="zapped"] .fa-bolt { --icon: var(--icon-check); }
.zap-chip[data-state="error"] {
    background: #c62828;
    border-color: #c62828;
    color: #fff;
}

@keyframes zap-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* hint that in-page zapping is available once a wallet is connected */
body.webln-ready .zap-chip {
    box-shadow: inset 0 0 0 1px var(--on-primary);
}

/* payment-recovery panel (wallet failed, invoice still valid).
   Deliberately not a .zap-toast — toast() removes those, and this panel
   must survive reconnect notifications. */
.zap-recovery {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    max-width: min(92vw, 520px);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.45;
    box-shadow: var(--shadow-lg);
    animation: zap-toast-in 0.25s ease;
    background: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--danger);
}
.zap-recovery-msg {
    font-size: 0.85rem;
    line-height: 1.5;
}
.zap-toast-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.zap-toast-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--control-border);
    font-family: inherit;
    transition: all var(--transition);
}
.zap-toast-btn:hover { border-color: var(--primary-color); }
.zap-toast-btn:disabled { opacity: 0.55; cursor: wait; }
.zap-toast-btn-primary {
    background: var(--primary-fill);
    color: var(--on-primary);
    border-color: var(--primary-fill);
}
.zap-toast-btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.zap-recovery-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 999px;
}
.zap-recovery-close:hover { color: var(--text-color); background: var(--hover-color); }

/* zap stats (from relay-aggregated stats.json) */
.zap-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 0.74rem;
    color: var(--star-color);
    font-weight: 600;
    min-height: 1em;
}
.zap-stat:empty { display: none; }

/* relays unreachable AND no cached numbers — say so politely instead of
   leaving empty stat boxes (set by zap-stats.js) */
.zap-stats-unavailable {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

.fund-banner-stats {
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.82rem;
}
.grant-totals {
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    color: var(--text-muted);
}
.grant-totals strong { color: var(--text-color); }
.zap-stat-ours { color: var(--primary-color); font-weight: 600; font-size: 0.82rem; }

/* recent zaps strip (live via SSE from the VPS watcher) */
.recent-zaps {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.5rem;
}
.recent-zap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
    animation: zap-fade-in 0.25s ease;
}
.recent-zap .fa-bolt { color: var(--primary-display); flex-shrink: 0; }
.recent-zap time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}
.recent-zap-dev { border-style: dashed; opacity: 0.8; }

/* repo activity badge ("last updated Xd ago") */
.repo-activity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 10px;
    min-height: 1em;
}
.repo-activity:empty { display: none; }
.repo-activity, .zap-stat { white-space: nowrap; }
.repo-activity-stale { color: var(--star-color); }
.repo-activity-archived,
.repo-activity-gone { color: var(--danger); }

/* one-line card meta row (zap stats + GitHub activity) — never wraps,
at any viewport width */
.resource-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    margin-top: 6px;
    min-height: 1em;
    overflow: hidden;
    white-space: nowrap;
}
.resource-meta .zap-stat { margin-top: 0; }
.resource-meta .repo-activity { margin-left: 0; }

/* ===== from redesign.css ===== */

/* Shared redesign structure ------------------------------------------------ */
body.redesign {
    min-width: 0;
    overflow-x: clip;
}

.redesign .skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 5000;
    padding: 10px 14px;
    transform: translateY(-160%);
    background: var(--text-color);
    color: var(--background-color);
    text-decoration: none;
}

.redesign .skip-link:focus {
    transform: translateY(0);
}

.redesign .top-nav {
    position: sticky;
    top: 0;
    overflow: visible;
    background-image: none;
}

.redesign .nav-content {
    width: 100%;
    max-width: 1500px;
    min-height: 72px;
    padding: 0 32px;
}

.redesign .wordmark {
    display: inline-flex;
    align-items: baseline;
    flex: 0 0 auto;
    width: max-content;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    text-decoration: none;
    color: var(--text-color);
}


.redesign .primary-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.redesign .primary-links a {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    /* a nav label is one unit — "Explore" must never break into
       "Explor/e" when the row runs out of room (see the <=700px panning
       rules near the end of this file) */
    white-space: nowrap;
}

.redesign .primary-links a:hover,
.redesign .primary-links a.active {
    color: var(--text-color);
}


.redesign .eyebrow {
    margin: 0;
    font: 800 .75rem var(--font-sans);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.redesign .directory-shell {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    align-items: start;
    gap: 0 28px;
    width: min(1500px, 100%);
    margin: 0 auto;
    scroll-margin-top: 72px;
}

.redesign .site-stream {
    min-width: 0;
}

.redesign .sidebar {
    position: relative;
    top: auto;
    align-self: start;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 20px 12px;
    overflow: visible;
    transform: none;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.redesign .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px;
    padding: 0 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.redesign .sidebar-header > span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.redesign .nav-links a span {
    min-width: 0;
}

.redesign .nav-links a small {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 8px;
    color: var(--text-muted);
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
}

.redesign .main-content {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 24px clamp(20px, 3vw, 46px) 54px;
    overflow: visible;
}

.redesign .directory-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.redesign .directory-heading h2 {
    margin: 6px 0 0;
    color: var(--text-color);
}

.redesign .directory-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.redesign .directory-meta button {
    padding: 6px 14px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--card-background);
    color: var(--text-color);
    font: inherit;
    cursor: pointer;
}

.redesign .content-header {
    display: flex;
    margin: 0 0 18px;
}

.redesign #resources-container {
    min-width: 0;
    max-width: none;
    margin: 0;
}

.redesign #resources-container > h2 {
    display: none;
}

.redesign .resource-card,
.redesign .resource-content,
.redesign .resource-title,
.redesign .resource-description,
.redesign .resource-meta {
    min-width: 0;
}

.redesign .resource-card {
    overflow: hidden;
}

.redesign .native-resource-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    align-items: start;
    gap: 14px;
}

/* the content column fills the card, so the footer (margin-top: auto)
   pins the Zap row to the bottom edge across a row of cards */
.redesign .native-resource-card .resource-content {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.redesign .native-resource-card .resource-title {
    display: block;
}

.redesign .resource-domain {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    font: 500 .8125rem var(--font-sans);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.redesign .resource-kicker {
    margin-bottom: 8px;
    overflow: hidden;
    color: var(--primary-color);
    font: 800 .6875rem var(--font-sans);
    letter-spacing: .1em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.redesign .resource-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
}

.redesign .native-resource-card .resource-meta,
.redesign .native-resource-card .resource-chips {
    margin-top: 0;
}

.redesign .resource-open {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid transparent;    /* ringed only on card hover */
    border-radius: 50%;
    color: var(--text-muted);
    text-decoration: none;
}

span.resource-open { visibility: hidden; }

.redesign .resource-card:hover .resource-open {
    border-color: var(--control-border);
}

.redesign .resource-card .resource-open:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.redesign .no-results {
    grid-column: 1 / -1;
    padding: 70px 24px;
    color: var(--text-muted);
    text-align: center;
}

.redesign .redesign-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.redesign .redesign-footer a {
    color: inherit;
}


.design-atlas .main-content {
    background: transparent;
}

.design-atlas .directory-heading h2 {
    font: 800 clamp(1.9rem, 2.6vw, 2.4rem)/1.1 var(--font-display);
}

.design-atlas #resources-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.design-atlas .resource-card {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-background);
    box-shadow: var(--shadow-md);
}

.design-atlas .resource-card::before {
    display: none;
}

.design-atlas .resource-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.design-atlas .native-resource-card .resource-title a {
    font: 700 1.1rem/1.3 var(--font-display);
}

/* Density toggle ---------------------------------------------------------- */
.redesign.compact-directory .resource-card {
    padding-top: 12px;
    padding-bottom: 12px;
}

.design-atlas.compact-directory #resources-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.design-atlas .resource-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.design-atlas.compact-directory .resource-description {
    -webkit-line-clamp: 2;
}

/* empty meta (no platforms/tags/update/zap stats yet) must not offset the zap chip */
.design-atlas .resource-meta:not(:has(.resource-platforms, .resource-updated, .resource-nip, .zap-stat:not(:empty))) {
    display: none;
}

/* nothing to show in the footer yet (no platforms, no zap) → no gap */
.design-atlas .resource-footer:not(:has(.resource-chips, .resource-platforms, .zap-stat:not(:empty))) {
    display: none;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1050px) {
    .redesign .primary-links {
        display: none;
    }

}

@media (max-width: 768px) {
    .redesign .top-nav {
        min-height: 64px;
    }

    .redesign .nav-content {
        display: flex;
        min-height: 64px;
        max-width: none;
        margin: 0;
        padding: 0 14px 0 66px;
    }


    .redesign .menu-toggle {
        top: 10px;
        left: 12px;
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
    }

    .redesign .directory-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .redesign .sidebar {
        position: relative;
        top: auto;
        left: auto;
        z-index: auto;
        display: none;
        width: 100%;
        height: auto;
        overflow: visible;
        transform: none;
        border-right: 0;
        border-bottom: 1px solid var(--sidebar-border);
        box-shadow: none;
        scroll-margin-top: 64px;
    }

    .redesign .sidebar.active {
        display: block;
        transform: none;
    }

    .redesign .main-content {
        padding: 28px 18px 64px;
    }

    .redesign .directory-heading {
        align-items: flex-start;
    }

    .redesign .redesign-footer {
        flex-direction: column;
        text-align: left;
    }

}

@media (max-width: 560px) {
    .redesign .nav-content {
        gap: 10px;
    }

    .redesign .directory-heading {
        display: block;
    }

    .redesign .directory-meta {
        margin-top: 12px;
    }

    .redesign .content-header {
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .design-atlas #resources-container,
    .design-atlas.compact-directory #resources-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .redesign .native-resource-card {
        grid-template-columns: minmax(0, 1fr) 28px;
        gap: 10px;
    }

    .redesign .resource-footer {
        display: block;
    }

    .redesign .native-resource-card .resource-chips {
        margin-top: 9px;
    }

}

/* ===== from atlas-site.css ===== */
/* Atlas website: a shared home, directory, and funding experience. */
.atlas-site .top-nav { background: color-mix(in srgb, var(--background-color) 84%, transparent); border-bottom-color: var(--border-color); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.atlas-site .nav-content { max-width: 1400px; padding-inline: 40px; gap: 28px; }
.atlas-site .wordmark { align-items: center; gap: 10px; font: 700 1.2rem var(--font-display); letter-spacing: -0.02em; }
.atlas-site .wordmark-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font: 800 1.15rem/1 var(--font-display); box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent); }
.atlas-site .primary-links { margin-left: auto; gap: 4px; }
.atlas-site .primary-links a { padding: 8px 13px; border-radius: 999px; font-size: .94rem; font-weight: 500; transition: background var(--transition), color var(--transition); }
.atlas-site .primary-links a:hover, .atlas-site .primary-links a[aria-current="page"] { background: var(--hover-color); color: var(--text-color); }
.atlas-site .primary-links a.nav-zap { margin-left: 6px; background: var(--primary-fill); color: var(--on-primary); font-weight: 600; }
.atlas-site .primary-links a.nav-zap:hover, .atlas-site .primary-links a.nav-zap[aria-current="page"] { background: var(--primary-hover); color: var(--on-primary); }
/* ⚡ emoji on a yellow fill: emoji ignore `color`, so draw them as an ink silhouette */
.atlas-site .nav-zap > [aria-hidden="true"], .zap-flow .is-all > [aria-hidden="true"], .atlas-site .site-button.is-primary > span[aria-hidden="true"] { filter: brightness(0); }
/* the nav's nostr.net support popover (render.mjs navSupport, site.js) */
.atlas-site .nav-support { position: relative; flex: none; }
.atlas-site .nav-support-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--hover-color); box-shadow: inset 0 0 0 1px var(--violet-line); color: var(--text-color); font: 600 .9rem var(--font-sans); cursor: pointer; }
.atlas-site .nav-support-toggle[hidden], .atlas-site .nav-support-panel[hidden] { display: none; }
.atlas-site .nav-support-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 1100; display: grid; gap: 10px; width: min(320px, calc(100vw - 32px)); padding: 18px; border-radius: var(--radius-lg); background: var(--card-background); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--violet-line); }
.atlas-site .nav-support-kicker { color: var(--primary-color); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.atlas-site .nav-support-panel p:not(.nav-support-kicker) { color: var(--text-muted); font-size: .875rem; }
.atlas-site .nav-support-panel small { color: var(--text-muted); font-size: .75rem; }
@media (max-width: 520px) {
    .atlas-site .nav-support-label { display: none; }   /* ♥ alone; the button keeps its accessible name */
}
.atlas-site a:focus-visible, .atlas-site button:focus-visible, .atlas-site input:focus-visible, .atlas-site summary:focus-visible {
    outline: 2px solid var(--primary-color); outline-offset: 5px;
}
.atlas-site section[id] { scroll-margin-top: 100px; }
.atlas-site .site-wrap { width: min(1320px, calc(100% - 80px)); margin-inline: auto; }
/* Buttons: pills, three levels. .is-primary is the filled yellow zap/pay
   action (one per section), .is-accent the filled violet one (search,
   nostr.net's own support), plain .site-button an outlined pill, and
   .text-link for everything else. .zap-button marks Lightning actions;
   .is-small is the compact size for toolbars. */
.atlas-site .site-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 1px solid var(--control-border); border-radius: 999px; color: var(--text-color); background: var(--card-background); text-decoration: none; font: 600 .95rem var(--font-sans); white-space: nowrap; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition); }
.atlas-site .site-button:hover { border-color: var(--primary-color); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.atlas-site .site-button:active { transform: scale(.98); }
.atlas-site .site-button.is-primary { border-color: var(--primary-fill); background: var(--primary-fill); color: var(--on-primary); }
.atlas-site .site-button.is-primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.atlas-site .site-button.is-accent { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.atlas-site .site-button.is-small { min-height: 34px; padding: 6px 14px; font-size: .8rem; }
.atlas-site .site-button.is-primary .fa-bolt, .atlas-site .site-button.is-accent .fa-bolt { color: inherit; }
/* [hidden] must beat display: inline-flex (split launcher, wallet button) */
.atlas-site .site-button[hidden] { display: none; }
.atlas-site .home-search { display: flex; align-items: center; gap: 14px; }
.atlas-site .home-search label { flex: 0 0 auto; font: 700 1.1rem var(--font-display); }
.atlas-site .home-search input { flex: 1; min-width: 0; min-height: 48px; border: 1px solid var(--control-border); border-radius: 999px; background: var(--input-background); color: var(--text-color); padding: 12px 20px; font: .95rem var(--font-sans); transition: border-color var(--transition), box-shadow var(--transition); }
.atlas-site .home-search input:hover { border-color: var(--text-muted); }
.atlas-site .home-search input:focus-visible { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 2px var(--accent), 0 0 30px var(--glow); }
.atlas-site .home-search:has(.search-suggestions) { position: relative; }
.atlas-site .search-suggestions { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; right: 0; max-height: min(60vh, 520px); overflow-y: auto; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--card-background); box-shadow: var(--shadow-lg); }
.atlas-site .search-suggestions[hidden] { display: none; }
.atlas-site .search-status { padding: 14px 20px; color: var(--text-muted); font-size: .8125rem; }
.atlas-site .search-matches { list-style: none; }
.atlas-site .search-matches a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 18px; padding: 14px 20px; border-top: 1px solid var(--border-color); color: var(--text-color); text-decoration: none; }
.atlas-site .search-matches a:hover, .atlas-site .search-matches a:focus-visible { background: var(--hover-color); outline-offset: -3px; }
.atlas-site .search-matches strong { font: 700 1.15rem var(--font-display); }
.atlas-site .search-matches small { align-self: center; max-width: 150px; color: var(--primary-color); font: 800 .6875rem var(--font-sans); letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.atlas-site .search-matches span { grid-column: 1 / -1; overflow: hidden; color: var(--text-muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.atlas-site .search-all { display: block; padding: 14px 20px; border-top: 1px solid var(--border-color); color: var(--text-color); font-size: .8rem; text-underline-offset: 4px; }
.atlas-site .search-body:has(.project-preview:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); align-items: start; }
.atlas-site .search-matches li { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.atlas-site .search-matches button { padding: 10px; border: 0; border-top: 1px solid var(--border-color); background: transparent; color: var(--text-muted); font: 600 .75rem var(--font-sans); cursor: pointer; }
.atlas-site .search-matches button:hover, .atlas-site .search-matches button:focus-visible { color: var(--primary-color); background: var(--hover-color); outline-offset: -3px; }
.atlas-site .project-preview { position: sticky; top: 0; padding: 22px; border-top: 1px solid var(--border-color); border-left: 1px solid var(--border-color); overflow-wrap: anywhere; }
.atlas-site .project-preview[hidden] { display: none; }
.atlas-site .project-preview > small { color: var(--primary-color); font: 800 .6875rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
.atlas-site .project-preview h3 { margin: 8px 0 12px; font: 800 1.8rem var(--font-display); }
.atlas-site .project-preview p { color: var(--text-muted); font-size: .85rem; line-height: 1.6; }
.atlas-site .project-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 20px 0; }
.atlas-site .project-preview-actions a { color: var(--primary-color); font-size: .8rem; text-underline-offset: 4px; }
.atlas-site .project-preview-actions .zap-chip { padding: 8px 12px; }
.atlas-site .project-preview-receipts { padding-top: 16px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: .8rem; }
.atlas-site .project-preview-receipts h4 { margin-bottom: 6px; color: var(--text-color); font: 800 .6875rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
.atlas-site .project-preview-receipts p { margin-bottom: 12px; font-size: .72rem; }
.atlas-site .project-preview-receipts ul { list-style: none; }
.atlas-site .project-preview-receipts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .75rem; }
.atlas-site .project-preview-receipts strong { color: var(--text-color); }
@media (max-width: 768px) {
    .atlas-site .search-body:has(.project-preview:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
    .atlas-site .project-preview { position: static; border-left: 0; }
    .atlas-site .search-matches a { gap: 3px 10px; padding: 14px; }
    .atlas-site .search-matches small { max-width: 100px; }
}
/* "How support works": shared 3-step block (core/render.mjs howSupportWorks) —
   rendered under the landing hero and reusable on static pages via the
   {{howSupportWorks}} placeholder. Three columns on desktop, stacked on
   small screens; minmax(0,1fr) + overflow-wrap keep long copy from
   overflowing sideways. */
.atlas-site .how-support { padding-block: 48px; }
.atlas-site .how-support > :is(h2, h3) { margin: 10px 0 22px; font: 800 clamp(1.9rem, 3vw, 2.6rem)/1.1 var(--font-display); }
.atlas-site .how-support-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: support-steps; }
.atlas-site .how-support-steps li { position: relative; min-width: 0; padding: 20px 20px 20px 62px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--card-background); counter-increment: support-steps; }
.atlas-site .how-support-steps li::before { content: counter(support-steps); position: absolute; top: 19px; left: 20px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-fill); color: var(--on-primary); font: 800 .85rem var(--font-display); }
.atlas-site .how-support-steps :is(h3, h4) { margin-bottom: 6px; font: 700 1.05rem var(--font-display); }
.atlas-site .how-support-steps p { color: var(--text-muted); font-size: .9375rem; line-height: 1.6; overflow-wrap: break-word; }
@media (max-width: 640px) {
    .atlas-site .how-support { padding-block: 40px; }
    .atlas-site .how-support-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* ===== Social proof: verified zap totals + the last few zaps =====
   Landing support area and /grant projects column. Ships empty + hidden
   until there are honest numbers (build-time stats or zap.js's live
   refresh) — the hidden attribute keeps it out of layout and a11y trees. */
.atlas-site .social-proof { margin: 16px 0 0; }
.atlas-site .social-proof[hidden] { display: none; }
.atlas-site .social-proof-totals { margin: 0; font-size: .95rem; }
.atlas-site .social-proof-totals strong { color: var(--primary-color); }
.atlas-site .social-proof-recent { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 10px 0 0; padding: 0; list-style: none; }
.atlas-site .social-proof-recent li { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: baseline; color: var(--text-muted); font-size: .85rem; }
.atlas-site .social-proof-recent a { color: var(--link-color); }
.atlas-site .social-proof-recent time { font-size: .78rem; font-variant-numeric: tabular-nums; }
/* "Start here" intent cards (START_HERE in core/render.mjs): the landing
   page (directly after the home search form) and the top of the /explore
   overview's main content. Cards are whole <a> blocks — min-height 44px
   keeps every target comfortable on touch screens — and the grid runs
   5/3/2/1 columns on minmax(0,1fr) tracks, so nothing overflows a 390px
   viewport. The Support-builders card carries the amber zap accent
   (same border/fill treatment as .zap-button). */
.atlas-site .start-here { padding-block: 48px; }
.atlas-site .start-here h2 { margin: 10px 0 22px; font: 800 clamp(1.9rem, 3vw, 2.6rem)/1.1 var(--font-display); }
.atlas-site .start-here-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.atlas-site .start-here-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 44px; padding: 16px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--card-background); box-shadow: var(--shadow-sm); color: var(--text-color); text-decoration: none; transition: border-color var(--transition), background var(--transition), transform var(--transition); }
.atlas-site .start-here-card:hover { border-color: var(--primary-color); transform: translateY(-2px); }
/* a search shows its results right under the bar: the onboarding cards, the
   heading's kicker and the provenance note step aside while a query is
   active (directory.js sets body.is-searching) */
.atlas-site.is-searching .start-here,
.atlas-site.is-searching .directory-heading .eyebrow,
.atlas-site.is-searching .content-header { display: none; }
@media (max-width: 700px) {
    /* on a phone the results matter more than the intro: while searching, the
       eyebrow, the intro line and the category toggle step aside too (the
       h1 and the field's label stay) */
    .atlas-site.is-searching .explore-hero > p,
    .atlas-site.is-searching .menu-toggle { display: none; }
}
.atlas-site .start-here-card h3 { font: 700 1.05rem var(--font-display); }
.atlas-site .start-here-card p { color: var(--text-muted); font-size: .875rem; line-height: 1.5; overflow-wrap: break-word; }
.atlas-site .start-here-card.is-zap { border-color: var(--primary-fill); }
.atlas-site .start-here-card.is-zap h3 { color: var(--primary-display); }
.atlas-site .start-here-card.is-zap:hover { border-color: var(--primary-fill); background: var(--primary-fill); }
.atlas-site .start-here-card.is-zap:hover :is(h3, p) { color: var(--on-primary); }
/* inside the overview's main column the section rides the directory
   shell's own rhythm: no page-level padding, just space below */
.atlas-site .main-content .start-here { padding-block: 0 34px; }
@media (max-width: 1050px) {
    .atlas-site .start-here-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .atlas-site .start-here { padding-block: 42px; }
    .atlas-site .start-here-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .atlas-site .main-content .start-here { padding-block: 0 24px; }
}
@media (max-width: 480px) {
    .atlas-site .start-here-grid { grid-template-columns: minmax(0, 1fr); }
}
.atlas-site .text-link { color: var(--text-color); font-size: .85rem; text-underline-offset: 5px; }
.atlas-site .services-table { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atlas-site .service-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; padding: 20px 22px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--card-background); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text-color); transition: border-color var(--transition), transform var(--transition); }
.atlas-site .service-row strong { font: 700 1.1rem var(--font-display); }
.atlas-site .service-row p { grid-column: 1; color: var(--text-muted); font-size: .875rem; }
.atlas-site .service-row small { grid-column: 1; margin-top: 7px; color: var(--primary-color); font: 800 .6875rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; }
.atlas-site .service-row > span { grid-column: 2; grid-row: 1 / 4; align-self: center; color: var(--primary-color); }
.atlas-site .service-row:hover { border-color: var(--primary-color); transform: translateY(-2px); }
.atlas-site .home-funding { display: flex; justify-content: space-between; align-items: center; gap: 40px; margin-block: 12px 56px; padding: 28px 32px; border: 1px solid var(--border-color); border-radius: var(--radius-xl); background: var(--card-background); box-shadow: var(--shadow-md); }
.atlas-site .home-funding h2 { margin: 8px 0 10px; font: 800 clamp(1.7rem, 2.6vw, 2.2rem)/1.08 var(--font-display); }
.atlas-site .home-funding p:not(.eyebrow) { max-width: 600px; color: var(--text-muted); font-size: .9375rem; }
.atlas-site .home-funding .site-button { flex-shrink: 0; }
.atlas-site .redesign-footer { background: transparent; border-top: 1px solid var(--border-color); color: var(--text-muted); padding: 28px max(40px, calc((100% - 1320px) / 2)) 44px; font-size: .875rem; }
.atlas-site .redesign-footer > span:last-child { display: flex; flex-wrap: wrap; gap: 20px; }
/* short pages (collections, sparse project pages): the footer sits at the
   bottom of the viewport instead of mid-screen */
.atlas-site { display: flex; flex-direction: column; min-height: 100vh; }
.atlas-site > main { flex: 1 0 auto; }
.atlas-site .explore-hero { padding-block: 40px 28px; }
.atlas-site .explore-hero h1 { margin: 10px 0; font: 800 clamp(2.4rem, 4.4vw, 3.6rem)/1 var(--font-display); }
.atlas-site .explore-hero > p:not(.eyebrow) { color: var(--text-muted); max-width: 620px; }
.atlas-site .explore-hero .home-search { margin-top: 28px; }
.atlas-site .directory-shell { width: min(1320px, calc(100% - 80px)); margin-bottom: 50px; }
.atlas-site .directory-meta { white-space: normal; }
.atlas-site .menu-toggle { position: static; margin-top: 22px; padding: 10px 18px; width: auto; height: auto; gap: 10px; border: 1px solid var(--control-border); border-radius: 999px; background: var(--card-background); color: var(--text-color); font: 600 .875rem var(--font-sans); box-shadow: none; }
.atlas-site .main-content { padding-right: 0; }
.atlas-site .resource-description { color: color-mix(in oklab, var(--text-color) 75%, var(--card-background)); font-size: .9375rem; }
.atlas-site .support-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 48px; }
.atlas-site .support-layout h2 { margin: 0 0 12px; font: 800 1.6rem/1.15 var(--font-display); }
.atlas-site .support-layout * + h2 { margin-top: 26px; }
.atlas-site .support-layout p { color: var(--text-muted); margin-bottom: 20px; font-size: .9375rem; }
.atlas-site .support-layout > * { min-width: 0; padding: 26px 28px; border: 1px solid var(--border-color); border-radius: var(--radius-xl); background: var(--card-background); box-shadow: var(--shadow-md); }
/* nostr.net's own support (grant "Keep nostr.net running"): violet, never yellow */
.atlas-site .support-layout > .support-site { border-color: var(--violet-line); background: linear-gradient(160deg, var(--glow), var(--card-background) 70%); }
.atlas-site .support-layout .site-button { margin: 0 10px 12px 0; }
.atlas-site .support-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.atlas-site .support-actions .site-button { margin: 0; }
/* split-zap launcher ("Support all N projects ⚡"): button + helper line
   travel together — both start hidden, zap-all.js reveals the pair once
   the directory confirms there is something to split. The helper stays
   quiet: small, muted, no decoration. */
.atlas-site .zap-all-launcher { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.atlas-site .directory-heading .zap-all-launcher { margin-top: 14px; }
.atlas-site .zap-all-hint { margin: 0; color: var(--text-muted); font-size: .8125rem; }
.atlas-site .wallet-connect { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--border-color); color: var(--text-muted); font-size: .8125rem; }
.atlas-site .wallet-connect p { margin: 0; font-size: .8125rem; }
.atlas-site .zap-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0; border-top: 1px solid var(--border-color); color: var(--text-color); text-decoration: none; }
.atlas-site .zap-row .what { flex: 1 1 200px; color: var(--text-muted); font-size: .8rem; }
.atlas-site .zap-row code { font-size: .75rem; overflow-wrap: anywhere; }
.atlas-site .support-activity { padding-block: 8px 48px; }
.atlas-site .support-activity h2 { margin: 0 0 10px; font: 800 1.6rem var(--font-display); }
.atlas-site .support-activity h3 { margin: 36px 0 14px; font: 700 1.15rem var(--font-display); }
.atlas-site .support-activity > p { max-width: 680px; margin-bottom: 22px; color: var(--text-muted); font-size: .85rem; }
.atlas-site .support-activity .grant-totals { font-size: .9rem; }
.atlas-site #zap-list > p, .atlas-site .zap-sub-empty { padding: 18px 20px; border: 1px dashed var(--control-border); border-radius: var(--radius-md); color: var(--text-muted); font-size: .85rem; }
.atlas-site .recent-zap { border-color: var(--border-color); animation: none; }

/* forms (submit) */
.atlas-site .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-content: start; }
.atlas-site .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.atlas-site .field.is-wide { grid-column: 1 / -1; }
.atlas-site .field label { font: 700 .875rem var(--font-sans); }
.atlas-site .field label small { margin-left: 6px; color: var(--text-muted); font-weight: 400; }
.atlas-site .field-hint { color: var(--text-muted); font-size: .78rem; overflow-wrap: anywhere; }
.atlas-site .field input, .atlas-site .field select, .atlas-site .field textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--input-background); color: var(--text-color); font: .9rem var(--font-sans); transition: border-color var(--transition); }
.atlas-site .field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.atlas-site .field input:hover, .atlas-site .field select:hover, .atlas-site .field textarea:hover { border-color: var(--text-muted); }
.atlas-site .field input:focus-visible, .atlas-site .field select:focus-visible, .atlas-site .field textarea:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.atlas-site .form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 4px; }
.atlas-site .form-status { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: .8125rem; }
.atlas-site .form-status:empty { display: none; }
.atlas-site #submitQr { grid-column: 1 / -1; display: grid; gap: 12px; padding: 18px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--hover-color); }
.atlas-site #submitQr[hidden] { display: none; }
.atlas-site #submitQr textarea { width: 100%; padding: 10px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); background: var(--input-background); color: var(--text-color); font: .7rem var(--font-mono); }
.atlas-site .steps { margin: 0 0 20px; padding: 0; list-style: none; counter-reset: steps; }
.atlas-site .steps li { position: relative; padding: 12px 0 12px 36px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: .875rem; counter-increment: steps; }
.atlas-site .steps li::before { content: counter(steps); position: absolute; top: 12px; left: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hover-color); color: var(--primary-color); font: 800 .75rem var(--font-display); }
.atlas-site .steps strong { color: var(--text-color); font-weight: 600; }
@media (max-width: 1050px) {
    .atlas-site .primary-links { display: flex; gap: 4px; }
    .atlas-site .directory-heading { display: block; }
    .atlas-site .directory-meta { flex-wrap: wrap; margin-top: 14px; white-space: nowrap; }
}
@media (max-width: 768px) {
    .atlas-site .nav-content { flex-wrap: wrap; gap: 0; padding: 12px 20px 0; }
    .atlas-site .nav-support { margin-left: auto; }
    .atlas-site .primary-links { order: 3; width: 100%; justify-content: space-between; margin: 5px 0 0; }
    .atlas-site .primary-links a { padding-block: 12px; font-size: .78rem; }
    .atlas-site .site-wrap, .atlas-site .directory-shell { width: calc(100% - 40px); }
    .atlas-site .home-search { flex-wrap: wrap; gap: 8px; }
    .atlas-site .home-search label { width: 100%; }
    .atlas-site .home-search input { width: 60%; }
    .atlas-site .home-search button { gap: 10px; padding-inline: 12px; }
    .atlas-site .support-layout { grid-template-columns: 1fr; gap: 14px; }
    .atlas-site .support-layout > * { padding: 22px 20px; border-radius: var(--radius-lg); }
    .atlas-site .services-table { grid-template-columns: 1fr; }
    .atlas-site .home-funding { align-items: flex-start; flex-direction: column; gap: 22px; padding: 22px 20px; border-radius: var(--radius-lg); }
    .atlas-site .main-content { padding: 24px 0; }
    .atlas-site .directory-meta { flex-wrap: nowrap; justify-content: space-between; white-space: nowrap; }
    .atlas-site .form-grid { grid-template-columns: 1fr; }
    .atlas-site .redesign-footer { flex-direction: column; padding: 25px 20px; gap: 12px; }
    .atlas-site .sidebar { scroll-margin-top: 120px; }
    .atlas-site section[id] { scroll-margin-top: 130px; }
}
@media (max-width: 480px) {
    /* ~390px phones: the meta row wraps instead of being locked to one
       line — nowrap + space-between here pushed "Compact view" past the
       edge and made the /explore document ~45px wider than the viewport */
    .atlas-site .directory-meta {
        flex-wrap: wrap;
        justify-content: flex-start;
        white-space: normal;
        gap: 8px 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .atlas-site *, .atlas-site *::before, .atlas-site *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ===== from nostrnet.css ===== */
/* nostrnet.css — glue layer between the atlas design (styles/redesign/
   atlas-site) and nostr.net's event-driven directory additions:
   split-zap launcher, platform chips. */


/* ---------- card extras ---------- */
.resource-platforms {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.directory-note {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.directory-note a { color: var(--link-color); }



/* ===== from zap.css ===== */

/* toasts */
.zap-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    max-width: min(92vw, 480px);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.45;
    box-shadow: var(--shadow-lg);
    animation: zap-toast-in 0.25s ease;
    background: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.zap-toast a { color: var(--primary-color); }
.zap-toast-success { border-color: var(--success); }
.zap-toast-success::before { content: "✓ "; color: var(--success); font-weight: 700; }
.zap-toast-error { border-color: var(--danger); }
.zap-toast-error::before { content: "✕ "; color: var(--danger); font-weight: 700; }

@keyframes zap-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* for anything not centred like a toast: zap-toast-in's translateX(-50%)
   would shove it half its width left, then snap back */
@keyframes zap-fade-in { from { opacity: 0; } }

/* ===== Zap fallback dialog (QR + lightning: link, no wallet needed) ===== */
/* the scrim is the page colour, frosted: dark in dark mode, paper in light */
.zap-modal-backdrop,
.zap-batch-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: color-mix(in srgb, var(--background-color) 72%, transparent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: zap-fade-in 0.2s ease;
}

.zap-modal {
    position: relative;
    background: var(--card-background);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 26px 22px 18px;
    width: 100%;
    max-width: 380px;
    /* never taller than the viewport: tall dialogs (QR + hint + address
       + buttons) scroll inside instead of being cut off at the top */
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    text-align: center;
}

.zap-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50%;
}
.zap-modal-close:hover { color: var(--text-color); background: var(--hover-color); }

.zap-modal-title {
    margin: 0 36px 14px;
    font: 800 1.25rem/1.2 var(--font-display);
}
.zap-modal-title .fa-bolt { color: var(--primary-display); margin-right: 4px; }

/* the QR stays black on white in both themes so every wallet can scan it */
.zap-qr-box {
    display: inline-block;
    background: #ffffff;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}
.zap-qr svg {
    display: block;
    width: 160px;
    height: 160px;
}
/* amount-chip dialog: spinner placeholder keeps the QR box's footprint
   while the fixed-amount invoice is prepared (decorative, aria-hidden) */
.zap-qr .fa-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    font-size: 2rem;
    color: var(--text-muted);
    animation: zap-spin 0.9s linear infinite;
}

.zap-modal-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

/* single compact line: address + copy + open-wallet */
.zap-modal-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.zap-modal-addr {
    flex: 1;
    min-width: 0;
    display: block;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    background: var(--hover-color);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 8px 14px;
}

.zap-modal-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--card-background);
    color: var(--text-muted);
    border: 1px solid var(--control-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.zap-modal-copy:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.zap-modal-copy.copied {
    color: var(--success);
    border-color: var(--success);
}

.zap-modal-btn-primary {
    background: var(--primary-fill);
    color: var(--on-primary);
    border-color: var(--primary-fill);
}
.zap-modal-btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); text-decoration: none; }

.zap-modal-connect {
    display: block;
    width: 100%;
    margin-top: 12px;
    background: none;
    border: none;
    border-top: 1px solid var(--border-color);
    padding: 12px 0 2px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    font-family: inherit;
}
.zap-modal-connect:hover { text-decoration: underline; }

/* "New to bitcoin tips?" — quiet onboarding link right under the connect
   button: small, muted, underline on hover only (contrast-safe tokens in
   both themes). */
.zap-modal-learn {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
}
.zap-modal-learn:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* shared compact button base for the zap dialog */
.zap-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid transparent;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

/* paid: the QR dialog turns into its own confirmation (zap.js showPaid);
   site.js puts the after-zap ask or the supporter thanks in .zap-modal-after */
.zap-paid-mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 4px auto 14px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
    font-size: 1.5rem;
    animation: zap-paid-pop .3s cubic-bezier(.2, .7, .2, 1);
}
@keyframes zap-paid-pop { from { opacity: 0; transform: scale(.6); } }
.zap-modal-after {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: .8125rem;
    color: var(--text-muted);
    text-align: left;
}
.zap-modal-after:empty { display: none; }
.zap-modal-after p { margin: 0; }
.zap-modal-after strong { color: var(--text-color); }
.zap-modal-done {
    justify-content: center;
    width: 100%;
    min-height: 44px;
    background: var(--hover-color);
    color: var(--text-color);
    border-color: var(--border-color);
}
@media (prefers-reduced-motion: reduce) {
    .zap-paid-mark { animation: none; }
}

.zap-as-me { color: var(--primary-color); font-weight: 500; }
.zap-as-me:hover { text-decoration: underline; }

/* ===== "zap all projects" batch dialog (index.html, zap-all.js) =====
   Own backdrop class on purpose (styled with .zap-modal-backdrop above):
   zap.js's Escape handler removes .zap-modal-backdrop nodes — it must
   never kill a running batch. Inner styles reuse the zap-modal classes. */
.zap-batch-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 10px;
    font-size: 0.875rem;
}
.zap-batch-amount input,
.zap-batch-input {
    width: 100px;
    padding: 8px 12px;
    text-align: center;
    font: 700 0.9rem var(--font-sans);
    background: var(--input-background);
    color: var(--text-color);
    border: 1px solid var(--control-border);
    border-radius: 999px;
}
.zap-batch-input { width: auto; flex: 1; text-align: left; font-weight: 400; }
.zap-batch-amount strong { color: var(--text-color); }

.zap-batch-wallet {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0 0 10px;
}

.zap-batch-current {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 4px 0 8px;
    overflow-wrap: anywhere;
}

.zap-batch-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--hover-color);
    overflow: hidden;
    margin: 0 0 10px;
}
.zap-batch-bar-fill {
    height: 100%;
    width: 0;
    background: var(--primary-fill);
    border-radius: inherit;
    transition: width 0.3s ease;
}
.zap-batch-bar-fill-pulse { animation: zap-batch-pulse 1.1s ease-in-out infinite; }
@keyframes zap-batch-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .zap-batch-bar-fill-pulse { animation: none; }
    .zap-batch-bar-fill { transition: none; }
}

.zap-batch-tally { font-size: 0.8125rem; color: var(--text-muted); margin: 0 0 10px; }

.zap-batch-note {
    font-size: 0.8rem;
    color: var(--warning);
    margin: 0 0 10px;
}

.zap-batch-failed {
    margin: 0 0 8px;
    padding-left: 18px;
    text-align: left;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.zap-batch-failed li { overflow-wrap: anywhere; }

/* project checklist for the split dialog */
.zap-split-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}
.zap-split-pick {
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    padding: 6px 12px;
    font: 700 0.75rem var(--font-sans);
    color: var(--primary-color);
    cursor: pointer;
}
.zap-split-pick:hover { border-color: var(--primary-color); }

.zap-split-list {
    max-height: 240px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--background-color);
    text-align: left;
    padding: 4px;
    margin: 0 0 12px;
    -webkit-overflow-scrolling: touch;
}
.zap-split-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.zap-split-row:hover { background: var(--hover-color); }
.zap-split-row input { flex-shrink: 0; accent-color: var(--primary-color); }
.zap-split-row b {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zap-split-row small {
    flex-shrink: 1;
    max-width: 42%;
    color: var(--text-muted);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Explore: sort/filter controls, families, pagination, zero state =====
   (explore + search UX) Everything uses existing tokens only, so the
   contrast suite keeps covering these pairs. */

.directory-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 26px;
    margin: 0 0 18px;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-background);
    box-shadow: var(--shadow-sm);
}

.directory-controls[hidden] { display: none; }   /* no JS → no dead controls */

.control-group {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: .8125rem;
    color: var(--text-muted);
}

/* Type filter chips never break mid-word ("Al l", "Repositorie s"):
   each chip stays on one line and the row wraps between chips instead. */
#typeFilter { flex-wrap: wrap; }

.filter-chip {
    padding: 6px 14px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--card-background);
    color: var(--text-color);
    font: 600 .8125rem var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-chip:hover { border-color: var(--primary-color); color: var(--primary-color); }

.filter-chip[aria-pressed="true"] {
    background: var(--text-color);
    border-color: var(--text-color);
    color: var(--background-color);
}

.control-select {
    padding: 6px 12px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--card-background);
    color: var(--text-color);
    font: 600 .8125rem var(--font-sans);
    cursor: pointer;
}

.zap-toggle { cursor: pointer; }
.zap-toggle input { accent-color: var(--primary-color); cursor: pointer; }

/* sidebar families — label spans, not headings (the sidebar sits before
   the page's h2 in the DOM); each family's <ul> is named by its label
   via aria-labelledby. The .75rem floor matters: .56rem rendered at
   ~9px, too small to read. */
.redesign .nav-links .nav-family {
    margin: 20px 0 0;
}

.redesign .nav-links li:first-child.nav-family,
.redesign .nav-links > .nav-family:first-child { margin-top: 2px; }

.redesign .nav-family-label {
    display: block;
    margin: 0 0 7px;
    padding: 0 8px;
    color: var(--primary-color);
    font: 800 .75rem var(--font-sans);
    letter-spacing: .1em;
    text-transform: uppercase;
}

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

/* overview section index */
.section-index {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.section-index h3 {
    margin: 0 0 4px;
    color: var(--text-color);
    font: 800 1.4rem var(--font-display);
}

.section-index-family { margin-top: 20px; }

.section-index-family h4 {
    margin: 0 0 9px;
    color: var(--primary-color);
    font: 800 .75rem var(--font-sans);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.section-index-family ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.section-index-family li { display: flex; }

.section-index-family li a {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-background);
    color: var(--text-color);
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.section-index-family li a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.section-index-family li a small {
    color: var(--text-muted);
    font: 500 .72rem var(--font-sans);
    font-variant-numeric: tabular-nums;
}

/* card head: logo + title, meta tags, updated label */
.resource-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
}

.resource-head .resource-title { flex: 1 1 auto; min-width: 0; margin: 0; }

.resource-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--input-background);
}

.compact-directory .resource-icon { width: 28px; height: 28px; }

/* no logo: a letter tile (directory-shared.js resourceTile) tinted by a
   hue hashed from the name; color-mix keeps it readable in both themes */
.resource-tile {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid color-mix(in oklab, hsl(var(--tile-hue) 45% 50%) 35%, var(--card-background));
    border-radius: var(--radius-sm);
    background: color-mix(in oklab, hsl(var(--tile-hue) 45% 50%) 16%, var(--card-background));
    color: color-mix(in oklab, hsl(var(--tile-hue) 45% 45%) 70%, var(--text-color));
    font: 800 1.15rem var(--font-display);
}

.compact-directory .resource-tile { width: 28px; height: 28px; font-size: .8rem; }

.redesign .resource-meta > * + * { margin-left: 10px; }

.resource-nip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-muted);
    font: 700 .6875rem var(--font-sans);
    letter-spacing: .04em;
}

.resource-updated {
    color: var(--text-muted);
    font-size: .75rem;
    white-space: nowrap;
}

/* search highlight: ink on the violet haze (≥12:1 in both themes) */
.resource-title mark,
.resource-description mark {
    padding: 0 2px;
    border-radius: 4px;
    background: var(--glow);
    color: var(--text-color);
}

/* progressive pagination: all cards ship in the HTML; JS hides the tail */
#resources-container.is-truncated > .resource-card:nth-child(n+49) { display: none; }

.show-more-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 0 4px;
}

.show-more-wrap[hidden] { display: none; }

/* overview: the honest path from the curated shortlist to everything —
   "Show all N projects" (JS, loads the full index) beside the no-JS path
   (the section index further down + the sidebar) */
.overview-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 24px;
    margin-top: 26px;
}

.overview-cta[hidden] { display: none; }

/* zero-result state */
.zero-results { padding: 54px 24px; }

.no-results-title {
    margin: 0 0 14px;
    color: var(--text-color);
    font: 800 1.3rem var(--font-display);
}

.zero-suggestions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    margin-top: 26px;
}

.zero-suggestions-label {
    margin: 0;
    color: var(--primary-color);
    font: 800 .75rem var(--font-sans);
    letter-spacing: .1em;
    text-transform: uppercase;
}

.zero-suggestion-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zero-suggestion-list a {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-background);
    color: var(--text-color);
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.zero-suggestion-list a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .directory-controls { gap: 10px 16px; padding: 11px 12px; }
}

/* ===== Mobile category panel: visible Close button ===== */
/* Desktop never shows it (the sidebar is a permanent column there). On
   mobile the panel expands inline under the toggle; an explicit × gives
   it a visible way out that doesn't depend on scrolling back up. */
.sidebar-close {
    display: none;
}

@media (max-width: 768px) {
    .redesign .sidebar-header {
        justify-content: flex-start;
        gap: 8px;
    }

    .redesign .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin-left: auto;
        margin-right: -8px;
        border: 1px solid var(--control-border);
        border-radius: 50%;
        background: var(--card-background);
        color: var(--text-color);
        font-size: 1.25rem;
        line-height: 1;
        cursor: pointer;
    }

    .redesign .sidebar-close:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

    /* the × is a <span>, and .redesign .sidebar-header's span rule is
       scoped to direct children for exactly this reason — belt and
       braces: the glyph always sizes with its button */
    .redesign .sidebar-close span {
        font-size: inherit;
        line-height: inherit;
    }
}

/* ===== Submit page: requirements up front, explicit steps ===== */
.atlas-site .submit-prereqs {
    margin: 4px 0 20px;
    padding: 22px 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-background);
    box-shadow: var(--shadow-sm);
}

.atlas-site .submit-prereqs h2 { margin: 0 0 10px; font: 800 1.25rem var(--font-display); }
.atlas-site .submit-prereqs ul { margin: 0 0 12px; padding-left: 20px; color: var(--text-muted); font-size: .9rem; }
.atlas-site .submit-prereqs li { margin-bottom: 6px; }
.atlas-site .submit-prereqs li strong { color: var(--text-color); }
.atlas-site .submit-prereqs > p:last-child { margin: 0; color: var(--text-muted); font-size: .85rem; }
.atlas-site .connect-steps.claim-steps { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.atlas-site .connect-steps pre { margin: 0 0 12px; padding: 10px 12px; overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--background-color); color: var(--text-color); font-size: .8rem; }
.atlas-site .connect-steps ul { margin: 0; padding-left: 20px; color: var(--text-muted); font-size: .85rem; }
.atlas-site .project-facts .claim-how { margin: 14px 0 0; color: var(--text-muted); font-size: .875rem; }

.atlas-site .connect-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 34px;
    padding: 0;
    list-style: none;
}

.atlas-site .connect-steps > li { padding: 20px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--card-background); box-shadow: var(--shadow-sm); }
.atlas-site .connect-steps li[data-done="1"] { border-color: var(--primary-color); }
.atlas-site .connect-steps li[data-done="1"] .step-number { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.atlas-site .connect-steps h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 700 1.1rem var(--font-display); }
.atlas-site .connect-steps .step-number { display: inline-grid; place-content: center; width: 28px; height: 28px; flex: none; border: 1px solid var(--primary-color); border-radius: 50%; color: var(--primary-color); font: 800 .8rem var(--font-display); }
.atlas-site .connect-steps p { margin: 0 0 12px; color: var(--text-muted); font-size: .85rem; }
.atlas-site .connect-steps .wallet-connect { margin: 0; padding: 0; border-top: 0; }
.atlas-site .connect-steps .step-status { margin: 10px 0 0; color: var(--text-muted); font-size: .8rem; overflow-wrap: anywhere; }
.atlas-site .step-status:empty { display: none; }
.atlas-site .char-count { align-self: flex-end; }

@media (max-width: 700px) {
    /* requirements + steps stack above the form (DOM order already keeps them first) */
    .atlas-site .connect-steps { grid-template-columns: 1fr; gap: 12px; }
}

/* ===== Grant page: primary support block + amount chips ===== */
.atlas-site .amount-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }

.atlas-site .amount-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--card-background);
    color: var(--text-color);
    font: 700 .875rem var(--font-sans);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

/* builders' amounts: yellow; nostr.net's own (grant .support-site): violet */
.atlas-site .amount-chip .fa-bolt { color: var(--primary-display); }
.atlas-site .amount-chip:hover { border-color: var(--primary-fill); background: var(--primary-fill); color: var(--on-primary); }
.atlas-site .amount-chip:hover .fa-bolt { color: var(--on-primary); }
.atlas-site .support-site .amount-chip .fa-bolt { color: var(--primary-color); }
.atlas-site .support-site .amount-chip:hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.atlas-site .support-site .amount-chip:hover .fa-bolt { color: var(--on-accent); }

/* ===== Project detail pages (/p/<slug>) ===== */
/* Mobile-first DOM order: header → actions → support (zap) → facts →
   "More in <section>". On >900px the grid hands desktop back the old
   two columns — facts + "More in …" on the left, support on the right,
   top-aligned — purely through grid-template-areas, without reordering
   the markup, so a narrow viewport reads info + zapping FIRST. */
.atlas-site .project-page .project-head { padding-block: 40px 26px; }
.atlas-site .project-page .project-head h1 { margin: 6px 0 10px; font: 800 clamp(2.2rem, 4.4vw, 3.4rem)/1.02 var(--font-display); overflow-wrap: anywhere; }
.atlas-site .project-title { display: flex; align-items: flex-start; gap: 18px; min-width: 0; }
.atlas-site .project-title > div { min-width: 0; }
.atlas-site .project-title :is(.resource-icon, .resource-tile) { width: 68px; height: 68px; border-radius: var(--radius-md); font-size: 1.7rem; }
.atlas-site .project-page .project-deck { max-width: 640px; margin: 0; color: var(--text-muted); font-size: .95rem; }

/* actions row: Open website / View repository, right under the
   description — both SECONDARY (outlined), so the Zap button is the
   page's one filled primary; desktop wraps them inline, <=700px becomes
   a 2-up grid (a lone action spans full width). Same 44px+ tap target
   everywhere. */
.atlas-site .project-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.atlas-site .project-actions .site-button { min-height: 44px; }

/* Desktop grid: facts and "More in …" stack in the left column, the
   support card fills the right one. row-gap: 0 + .project-more's own
   margin keeps "More" right below the facts list; grid-template-rows
   auto/1fr + align-content:start stop the spanning support aside from
   stretching row 1 when it is the taller column. */
.atlas-site .project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: "facts support" "more support"; grid-template-rows: auto 1fr; align-content: start; column-gap: 44px; row-gap: 0; align-items: start; padding-bottom: 40px; }
.atlas-site .project-layout .project-facts { grid-area: facts; }
.atlas-site .project-layout .project-more { grid-area: more; }
.atlas-site .project-layout .project-support { grid-area: support; }

/* facts: label/value rows — small caps labels, values wrap (never
   overflow on a 390px phone: the dd takes minmax(0, 1fr) and breaks
   long repo names/hosts anywhere) */
.atlas-site .project-facts { margin: 0; padding: 4px 22px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--card-background); }
.atlas-site .project-facts .fact-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 16px; padding: 6px 0; border-bottom: 1px solid var(--border-color); }
.atlas-site .project-facts .fact-row:last-child { border-bottom: 0; }
.atlas-site .project-facts dt { margin: 0; color: var(--text-muted); font: 800 .72rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; padding-top: 14px; }
.atlas-site .project-facts dd { margin: 0; color: var(--text-color); font-size: .9375rem; overflow-wrap: anywhere; }
.atlas-site .project-facts dd a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-right: 14px; color: var(--primary-color); font-weight: 600; text-underline-offset: 4px; }

/* "More in <Section>": one mini row per project — name + a ⚡ marker
   on zappable entries — 44px bands either way */
.atlas-site .project-more { margin-top: 34px; }
.atlas-site .project-more h2 { margin: 0 0 8px; font: 800 1.35rem var(--font-display); }
.atlas-site .project-more ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border-color); }
.atlas-site .project-more li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border-color); }
.atlas-site .project-more a { display: flex; align-items: center; min-height: 44px; flex: 1; color: var(--text-color); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.atlas-site .project-more li > a:hover { color: var(--primary-color); }
.atlas-site .project-more a:hover { text-decoration: underline; text-underline-offset: 4px; }
.atlas-site .project-more .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.atlas-site .project-more-zap { flex-shrink: 0; color: var(--primary-color); font: 700 .75rem var(--font-sans); white-space: nowrap; }

/* support block: card styling; the zap button is the page's one filled
   primary action (amount chips + bc-button follow the /grant pattern) */
.atlas-site .project-support { padding: 24px; border: 1px solid var(--border-color); border-radius: var(--radius-xl); background: var(--card-background); box-shadow: var(--shadow-md); }
.atlas-site .project-support h2 { margin: 0 0 8px; font: 800 1.4rem var(--font-display); overflow-wrap: anywhere; }
.atlas-site .project-support-note { margin: 0 0 18px; color: var(--text-muted); font-size: .875rem; }
.atlas-site .project-support .project-zap-main { width: 100%; min-height: 52px; font-size: .95rem; }
/* the three amount chips always share ONE row inside the support card,
   at every width — including desktop, where the 330px sidebar leaves
   282px of content (narrower than a phone). Equal-width 3-column grid;
   the labels themselves are short ("21k sats" — the full amount lives on
   data-zap-amount and the aria-label), so readable .85rem type still
   fits the widest chip unwrapped from a 320px phone up. The shared
   .amount-chip rule keeps them >=44px tall; /grant's own amount rows
   keep the wrapping flex layout and their full labels. */
.atlas-site .project-support .amount-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.atlas-site .project-support .amount-chip { justify-content: center; gap: 4px; padding: 8px 1px; font-size: .85rem; white-space: nowrap; }
.atlas-site .project-ln { margin: 4px 0 0; color: var(--text-muted); font-size: .8125rem; }
.atlas-site .project-ln code { font-size: .75rem; overflow-wrap: anywhere; }
.atlas-site .project-zap-stats { margin: 10px 0 0; font-size: .8rem; }
.atlas-site .project-zap-stats[hidden] { display: none; }
.atlas-site .project-support .wallet-connect { margin-top: 18px; }
.atlas-site .project-support .wallet-connect .site-button { width: 100%; }
.atlas-site .project-no-zap { margin: 0 0 10px; padding: 12px 14px; border: 1px dashed var(--control-border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .875rem; }
.atlas-site .project-support .text-link { display: inline-flex; align-items: center; min-height: 44px; }

.atlas-site .project-source { margin: 0 0 50px; padding-top: 14px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: .8125rem; overflow-wrap: anywhere; }
.atlas-site .project-source a { color: var(--link-color); }

/* sticky bottom zap bar: a second a.project-zap-main that keeps a Zap
   button one tap away once the support block has scrolled off. It ships
   `hidden` in the markup; the page's tiny IntersectionObserver flips that
   attribute, so without JS it never appears. Hidden on every >700px
   viewport; while it can be on screen the page gets matching bottom
   padding so the bar never covers the footer or content. */
.atlas-site .project-zap-bar { display: none; }

/* ===== Curated collections (/collections, /collections/<slug>) ===== */
/* Same head treatment as the project pages, above the standard
   #resources-container card grid (the explore look — no new card CSS)
   or, on the index, the landing page's services-table rows. */
.atlas-site .collection-page .collection-head { padding-block: 40px 26px; }
.atlas-site .collection-page .collection-head h1 { margin: 6px 0 10px; font: 800 clamp(2.2rem, 4.4vw, 3.4rem)/1.02 var(--font-display); overflow-wrap: anywhere; }
.atlas-site .collection-page .collection-deck { max-width: 640px; margin: 0; color: var(--text-muted); font-size: .95rem; }
.atlas-site .collection-page #resources-container { margin: 0 0 10px; }
.atlas-site .collection-page .collection-projects-title { margin: 0 0 14px; font: 800 1.35rem var(--font-display); }
.atlas-site .collection-page .services-table { margin-bottom: 50px; }
.atlas-site .collection-page .text-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 50px; }

@media (max-width: 900px) {
    /* <=900px: single column in DOM order — support FIRST (mobile reads
       info + zapping before everything else), then facts, then "More in…".
       The stacked rows carry their own 28px rhythm, so .project-more's
       desktop margin-top is dropped here (row-gap already spaces it). */
    .atlas-site .project-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "support" "facts" "more"; grid-template-rows: none; gap: 28px; }
    .atlas-site .project-more { margin-top: 0; }
}

@media (max-width: 700px) {
    .atlas-site .project-facts .fact-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .atlas-site .project-facts dt { padding-top: 0; }
    .atlas-site .project-support { padding: 16px; }
    .atlas-site .project-support .project-support-note { margin-bottom: 12px; }
    .atlas-site .project-no-zap { padding: 10px 12px; font-size: .8rem; }
    /* less top padding: title + description + the Zap button all fit
       above the fold on a 390x844 phone (header+nav ≈ 130px) */
    .atlas-site .project-page .project-head { padding-block: 14px 16px; }
    .atlas-site .collection-page .collection-head { padding-block: 30px 20px; }
    /* actions row: 2-up full-width buttons (a lone action spans both) */
    .atlas-site .project-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .atlas-site .project-actions .site-button:only-child { grid-column: 1 / -1; }
    /* wallet-connect: the compact mobile treatment — one small line, then
       the connect button (the one-row amount-chip grid above is
       width-independent and already covers phones) */
    .atlas-site .project-support .wallet-connect { margin-top: 12px; }
    .atlas-site .project-support .wallet-connect p { margin: 0 0 8px; font-size: .74rem; }
    /* the bar itself: ~60px tall, a 44px+ button, safe-area aware */
    .atlas-site .project-zap-bar:not([hidden]) {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        gap: 12px;
        padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
        background: var(--card-background);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }
    .atlas-site .project-zap-bar .project-zap-main { flex: 1; min-height: 44px; font-size: .9rem; }
    /* while the bar can be on screen, the page grows to match — the bar
       never covers the footer or the last rows of content. Two paths to
       the same padding: the :has() rule reads the bar's hidden state
       straight from CSS, while body.has-zap-bar (toggled by the page's
       inline observer) is the class-based fallback that also covers
       engines without :has() */
    body:has(> .project-zap-bar:not([hidden])) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    body.has-zap-bar { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ===== Mobile (~390px): touch targets + nothing truncates ===== */
@media (max-width: 700px) {
    /* card controls: ~44x44 hit areas with zero layout change — a
       transparent ::after pad extends the clickable box past the border
       (pseudo-elements hit-test as part of their element; the pads stay
       inside the card, so overflow:hidden never clips them). Base boxes:
       .resource-open 28px, .resource-title a ~22px, .zap-chip ~30px,
       .section-index-family a ~32px, .project-source a ~15px. */
    .redesign .resource-open,
    .redesign .resource-title a,
    .redesign .zap-chip,
    .redesign .project-source a,
    .section-index-family li a {
        position: relative;
    }

    .redesign .resource-open::after {
        content: '';
        position: absolute;
        inset: -8px;              /* 28px box + 2×8 = 44px square */
    }

    /* block = same look (the domain label below is already block); the
       pad then spans every line of a wrapped title, not just the first */
    .redesign .resource-title a {
        display: block;
    }

    .redesign .resource-title a::after {
        content: '';
        position: absolute;
        inset: -12px -8px;        /* ~22px line box + 2×12 = ≥44px tall */
    }

    .redesign .zap-chip::after {
        content: '';
        position: absolute;
        inset: -8px -5px;         /* ~33px filled button + 2×8 = ≥44px tall */
    }

    .section-index-family li a::after {
        content: '';
        position: absolute;
        inset: -6px -4px;         /* ~32px pill + 2×6 = 44px tall */
    }

    /* the /p/<slug> source line's "directory.json" link sits inline in
       small muted text (.76rem → ~15px inline box, so its hit area
       measured only 41px with the old pad) — the same transparent-pad
       trick grows its hit area (15px + 2×15 = 45px tall) without
       reflowing the provenance line */
    .redesign .project-source a::after {
        content: '';
        position: absolute;
        inset: -15px -6px;        /* 15px inline box + 2×15 = 45px tall */
    }

    /* the footer's awesome-nostr credit link sits inline mid-sentence —
       the same transparent-pad trick grows its hit area (~19px line box
       + 2×13 = 45px tall) without reflowing the footer text */
    .redesign .redesign-footer a[href^=http] {
        position: relative;
    }

    .redesign .redesign-footer a[href^=http]::after {
        content: '';
        position: absolute;
        inset: -13px -6px;        /* ~19px line box + 2×13 = 45px tall */
    }

    /* the "Takes zaps" checkbox: the whole label is the control — one
       44px band across checkbox + text (negative margin keeps the
       controls bar the height it was), plus a checkbox big enough to see */
    .zap-toggle {
        min-height: 44px;
        padding: 0 12px;
        margin: -8px;
    }

    .zap-toggle input {
        width: 18px;
        height: 18px;
    }

    /* zap dialogs: every control is a comfortable 44px touch target */
    .zap-modal-close,
    .zap-modal-copy,
    .zap-recovery-close {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .zap-modal-btn,
    .zap-toast-btn,
    .zap-split-pick,
    .zap-modal-connect {
        min-height: 44px;
    }

    .zap-split-pick { padding: 10px 16px; }
    .zap-split-row { padding: 10px 8px; }
    .zap-modal-connect { width: 100%; }

    /* the zap dialog's "Get a Lightning wallet" link: a full-width,
       comfortably tall row like the connect button above it */
    .zap-modal-learn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }
    .zap-batch-amount input,
    .zap-batch-input { min-height: 44px; }

    /* dialog names and addresses wrap instead of truncating */
    .zap-split-row b,
    .zap-split-row small,
    .zap-modal-addr {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }

    .zap-split-row small { max-width: 100%; }
    .zap-modal-line { flex-wrap: wrap; }

    /* card tags/chips wrap instead of clipping on narrow screens */
    .redesign .resource-meta {
        flex-wrap: wrap;
        white-space: normal;
        overflow: visible;
    }

    .redesign .resource-meta > * + * { margin-left: 0; }

    .redesign .resource-kicker {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

/* cards read as one column on small phones (normal + compact density) */
@media (max-width: 480px) {
    .design-atlas #resources-container,
    .design-atlas.compact-directory #resources-container {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== Mobile pass: header, nav row, zap dialog, density ===== */

/* <=700px phones: the header scrolls away with the page instead of
   pinning ~15% of the screen; anchors aim just below where it sat. */
@media (max-width: 700px) {
    .redesign .top-nav { position: static; }
    .redesign .nav-content,
    .atlas-site .nav-content { min-height: 0; }
    .atlas-site section[id] { scroll-margin-top: 12px; }
    .redesign .directory-shell,
    .redesign .sidebar { scroll-margin-top: 12px; }

    /* nav row: one line of links — words never break (nowrap on
       .primary-links a above), and if a very narrow viewport can't hold
       them the row itself pans instead of pushing the document wide
       (scrollbar hidden, links snap while panning). "Zap builders ⚡" is
       much wider than the old "Support" — the slightly tighter gap and
       font keep all five labels on one row at 360px without panning
       (tap targets stay ≥44px: 14px padding-block + line box) */
    .atlas-site .primary-links {
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    .atlas-site .primary-links::-webkit-scrollbar { display: none; }
    .atlas-site .primary-links a { flex: none; padding-block: 14px; padding-inline: 4px; font-size: .7rem; }
    .atlas-site .primary-links a.nav-zap { margin-left: 0; padding-inline: 9px; }

    /* forms: >=16px inputs stop iOS zooming on focus */
    .atlas-site .field input,
    .atlas-site .field select,
    .atlas-site .field textarea,
    .atlas-site .home-search input { font-size: 1rem; }
    .atlas-site .site-button { max-width: 100%; }
}

/* <=480px: the zap QR dialog — address + copy on one full-width row
   (address single-line, ellipsized; the full value stays on the title
   attribute), the Open-wallet primary button full-width below it */
@media (max-width: 480px) {
    .zap-modal-backdrop { padding: 12px; }
    .zap-modal { padding: 18px 14px 12px; }
    .zap-modal-line { flex-wrap: wrap; gap: 8px; }
    .zap-modal-addr {
        flex: 1 1 calc(100% - 52px);   /* beside the 44px copy button */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
    }
    .zap-modal-line .zap-modal-btn-primary {
        flex: 1 1 100%;               /* own full-width row */
        min-height: 48px;
        justify-content: center;
    }
}

/* <=480px density: tighter cards, calmer section rhythm. The 44px hit
   areas (Zap chip, arrow link) come from the ::after pads above and are
   untouched by the slimmer padding. */
@media (max-width: 480px) {
    /* cards (~16px padding, tighter title/meta/description spacing) */
    .design-atlas .resource-card { padding: 16px; }
    .redesign .resource-head { gap: 10px; }
    .redesign .resource-kicker { margin-bottom: 4px; }
    .redesign .resource-description { margin-top: 4px; }
    .redesign .resource-meta { margin-top: 4px; }
    .redesign .resource-footer { margin-top: 8px; padding-top: 0; }
    .redesign .native-resource-card .resource-chips { margin-top: 6px; }
    .atlas-site .site-wrap,
    .atlas-site .directory-shell { width: calc(100% - 32px); }
    .atlas-site .main-content { padding: 16px 0 24px; }

    /* home + /grant sections: ~40% less vertical rhythm, smaller h2s */
    .atlas-site .start-here h2 {
        margin-top: 6px;
        font: 800 clamp(1.6rem, 7vw, 2rem)/1.1 var(--font-display);
    }
    .atlas-site .how-support { padding-block: 32px; }
    .atlas-site .how-support > :is(h2, h3) {
        margin: 8px 0 16px;
        font: 800 clamp(1.6rem, 7vw, 2rem)/1.1 var(--font-display);
    }
    .atlas-site .start-here { padding-block: 26px; }
    .atlas-site .home-funding { padding: 26px 0; }
    .atlas-site .support-layout { padding-bottom: 34px; }
    .atlas-site .support-activity { padding-block: 16px 34px; }
    .atlas-site .support-activity h3 { margin: 24px 0 12px; }
    .atlas-site .explore-hero { padding-block: 28px 20px; }
    .atlas-site .service-row { padding-block: 14px; }
}

/* ===== Landing (Night Market) ===== */
/* hero: copy + search on the left, the featured project beside it */
.atlas-site .home-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 36px; align-items: center; padding-block: 34px 30px; }
.atlas-site .home-hero .eyebrow { margin: 0; color: var(--text-muted); }
.atlas-site .home-hero h1 { margin: 10px 0 12px; font: 800 clamp(2.375rem, 4.8vw, 3.625rem)/.98 var(--font-display); letter-spacing: -.02em; }
.atlas-site .home-hero h1 span { color: var(--primary-display); }
.atlas-site .home-lead { max-width: 470px; color: var(--text-muted); font-size: 1.0625rem; }
.atlas-site .home-hero .home-search { max-width: 520px; margin-top: 20px; }
.atlas-site .home-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.atlas-site .home-topics a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--card-background); color: var(--text-muted); font-size: .875rem; text-decoration: none; transition: color var(--transition), border-color var(--transition); }
.atlas-site .home-topics a:hover { border-color: var(--primary-color); color: var(--text-color); }
.atlas-site .home-featured { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 16px; align-items: center; min-width: 0; padding: 20px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--glow), var(--card-background)); box-shadow: var(--shadow-md); }
.atlas-site .home-featured > :is(.resource-icon, .resource-tile) { grid-row: span 2; width: 72px; height: 72px; border-radius: 20px; font-size: 2rem; }
.atlas-site .home-featured .eyebrow { align-self: end; margin: 0; }
.atlas-site .home-featured h2 { align-self: start; margin: 0; font: 800 1.625rem/1.1 var(--font-display); overflow-wrap: anywhere; }
.atlas-site .home-featured > p:not(.eyebrow) { grid-column: 1 / -1; margin-top: 10px; color: var(--text-muted); font-size: .9375rem; }
.atlas-site .home-featured-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }

/* the blocks below: a heading row, then a grid or a shelf */
.atlas-site .home-block { margin-top: 44px; }
.atlas-site .home-block:last-child { margin-bottom: 56px; }
.atlas-site .home-row-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.atlas-site .home-row-head h2 { margin: 0; font: 700 clamp(1.5rem, 3vw, 2rem)/1.1 var(--font-display); }
.atlas-site .home-row-head a { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 44px; color: var(--primary-color); font-weight: 600; text-decoration: none; white-space: nowrap; }
.atlas-site .home-row-head a:hover { text-decoration: underline; }
.atlas-site .home-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.atlas-site .home-cat { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; min-height: 56px; padding: 14px 16px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--card-background); color: var(--text-color); text-decoration: none; transition: transform var(--transition), border-color var(--transition); }
.atlas-site .home-cat:hover { transform: translateY(-2px); border-color: var(--primary-color); }
.atlas-site .home-cat strong { font: 700 1.0625rem/1.2 var(--font-display); }
/* the count pill: tinted by the name's hue (like the letter tiles), ink stays text-color for AA */
.atlas-site .home-cat span { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; background: color-mix(in oklab, hsl(var(--tile-hue) 60% 50%) 20%, var(--card-background)); font-weight: 700; font-size: .8125rem; }
/* the shelf bleeds 16px past the wrap (the narrowest page gutter) so cards scroll edge to edge */
.atlas-site .home-shelf { display: flex; gap: 16px; overflow-x: auto; margin: 12px -16px 0; padding: 6px 16px 20px; list-style: none; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: thin; }
.atlas-site .home-card { display: flex; flex: 0 0 252px; flex-direction: column; gap: 9px; padding: 15px; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: var(--card-background); box-shadow: var(--shadow-md); scroll-snap-align: start; transition: transform var(--transition), border-color var(--transition); }
.atlas-site .home-card:hover { transform: translateY(-3px); border-color: var(--primary-color); }
.atlas-site .home-card > :is(.resource-icon, .resource-tile) { width: 50px; height: 50px; border-radius: 15px; }
.atlas-site .home-card h3 { margin: 0; font: 700 1.125rem/1.2 var(--font-display); overflow-wrap: anywhere; }
.atlas-site .home-card h3 a { color: var(--text-color); text-decoration: none; }
.atlas-site .home-card h3 a:hover { text-decoration: underline; }
.atlas-site .home-card p { display: -webkit-box; flex: 1; margin: 0; overflow: hidden; color: var(--text-muted); font-size: .875rem; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.atlas-site .home-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.atlas-site .home-card-foot small { min-width: 0; overflow: hidden; color: var(--text-muted); font-size: .8125rem; text-overflow: ellipsis; white-space: nowrap; }
.atlas-site .home-card-foot .site-button { background: var(--sidebar-background); }

/* Run by nostr.net: the services beside the violet card that pays for them */
.atlas-site .home-services { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; margin-top: 14px; }
.atlas-site .home-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.atlas-site .home-service { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 15px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--card-background); color: var(--text-color); text-decoration: none; transition: border-color var(--transition); }
.atlas-site .home-service:hover { border-color: var(--primary-color); }
.atlas-site .home-service small { color: var(--primary-color); font-weight: 700; font-size: .8125rem; }
.atlas-site .home-service strong { font: 700 .9375rem/1.25 var(--font-display); }
.atlas-site .home-service span { color: var(--text-muted); font-size: .8125rem; }
.atlas-site .site-support-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--violet-line); border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--glow), var(--card-background)); }
.atlas-site .site-support-card .eyebrow { margin: 0; }
.atlas-site .site-support-card h3 { margin: 0; font: 800 1.375rem/1.1 var(--font-display); }
.atlas-site .site-support-card p:not(.eyebrow) { margin: 0; color: var(--text-muted); font-size: .875rem; }
.atlas-site .site-support-card small { color: var(--text-muted); font-size: .75rem; overflow-wrap: anywhere; }

@media (max-width: 960px) {
    .atlas-site .home-hero, .atlas-site .home-services { grid-template-columns: minmax(0, 1fr); }
    .atlas-site .home-cats, .atlas-site .home-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .atlas-site .home-hero { padding-block: 24px 20px; gap: 24px; }
    .atlas-site .home-block { margin-top: 36px; }
    .atlas-site .home-cats, .atlas-site .home-service-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse) {
    .atlas-site .home-topics a { min-height: 44px; }
}
