:root {
    --paper: #e7edf2;
    --ink: #15202b;
    --card: #ffffff;
    --copper: #c4511a;
    --copper-deep: #9a3d12;
    --stem: #5a6a78;
    --line: #d0dae3;
    --stamp: #1d4e6f;
    --stamp-wash: #e5eef5;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    background-color: var(--paper);
    background-image:
        linear-gradient(to right, rgba(29, 78, 111, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(29, 78, 111, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
}

.shelf-top,
.shelf-main {
    width: min(920px, calc(100% - 40px));
    margin-inline: auto;
}

.shelf-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 28px;
}

.mark {
    font-family: "Darker Grotesque", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 1.85rem;
    letter-spacing: -0.03em;
    color: var(--ink);
    text-decoration: none;
}

.quiet {
    color: var(--stamp);
    font-weight: 600;
    text-decoration: none;
}

.shelf-main { padding: 36px 0 72px; }

.intro-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}

.eyebrow,
.count,
code,
.file {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.eyebrow,
.count {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--stamp);
}

h1 {
    margin: 10px 0 0;
    max-width: 12ch;
    font-family: "Darker Grotesque", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: clamp(2.8rem, 6vw, 4rem);
    line-height: 0.88;
    letter-spacing: -0.035em;
}

.lede {
    margin: 16px 0 0;
    max-width: 36ch;
    color: var(--stem);
    font-size: 1.15rem;
}

.empty {
    margin-top: 32px;
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: var(--card);
    color: var(--stem);
}

.shelf {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shelf li {
    animation: rise 0.45s ease both;
}

.shelf li:nth-child(2) { animation-delay: 0.05s; }
.shelf li:nth-child(3) { animation-delay: 0.1s; }
.shelf li:nth-child(4) { animation-delay: 0.15s; }
.shelf li:nth-child(5) { animation-delay: 0.2s; }

.shelf article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: stretch;
    background: var(--card);
    border: 1px solid #c3cfd9;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(21, 32, 43, 0.06);
    overflow: hidden;
}

.stamp {
    align-self: center;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 18px 0 18px 18px;
    border: 1.5px solid var(--stamp);
    border-radius: 12px;
    background: var(--stamp-wash);
    color: var(--stamp);
    font-family: "Darker Grotesque", "Segoe UI", sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.stamp-icon {
    padding: 0;
    object-fit: cover;
    background: #fff;
}

.prices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.prices li {
    display: flex;
    flex-direction: column;
    min-width: 88px;
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--stamp-wash);
    font-size: 0.92rem;
    font-weight: 600;
}

.prices span {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--stem);
}

.meta {
    min-width: 0;
    padding: 18px 20px;
}

.meta h2 {
    margin: 0;
    font-family: "Darker Grotesque", "Segoe UI", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.meta code {
    display: inline-block;
    margin-top: 6px;
    color: var(--stem);
    font-size: 0.82rem;
}

.file {
    display: block;
    margin-top: 8px;
    max-width: 100%;
    overflow: hidden;
    color: var(--stamp);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.file.is-empty {
    color: var(--stem);
    text-decoration: none;
}

.pull {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 0 22px;
    background: var(--copper);
    color: #fffaf6;
    font-family: "Darker Grotesque", "Segoe UI", sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.pull:hover { background: var(--copper-deep); }

.pull.is-waiting {
    background: #d7e0e8;
    color: #3e4e5c;
}

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

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 680px) {
    .shelf article { grid-template-columns: auto minmax(0, 1fr); }
    .pull,
    .pull.is-waiting {
        grid-column: 1 / -1;
        min-height: 52px;
        padding: 12px;
    }
    h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .shelf li { animation: none; }
}
