/* ==========================================================================
   StorageCow — design tokens
   Palette pulled from the logo (dark navy-charcoal ground, warm white mark)
   plus a barn-gold accent and a barn-red used sparingly for alerts.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --bg: #1b1c26;
    --surface: #23242f;
    --surface-2: #2b2c3a;
    --border: #383a4d;
    --text: #f5f3ee;
    --text-muted: #9a9db0;
    --gold: #e8b23d;
    --gold-dark: #c98f23;
    --red: #d1554a;
    --green: #7fbf76;

    --font-display: 'Oswald', 'Arial Narrow', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

    --radius: 8px;
    --container: 1080px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ==========================================================================
   Header — corrugated barn-door stripe texture behind the logo bar
   ========================================================================== */
.site-header {
    background:
        repeating-linear-gradient(
            115deg,
            rgba(255,255,255,0.025) 0px,
            rgba(255,255,255,0.025) 2px,
            transparent 2px,
            transparent 14px
        ),
        var(--surface);
    border-bottom: 3px solid var(--gold);
}
.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.brand__logo { height: 100px; display: block; }

.search {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 6px 4px 16px;
    min-width: 220px;
    flex: 1;
    max-width: 360px;
}
.search input {
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    flex: 1;
    outline: none;
}
.search input::placeholder { color: var(--text-muted); }
.search button {
    background: var(--gold);
    border: none;
    border-radius: 999px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 13px;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    margin: 24px 0 12px;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb__current { color: var(--text); }

/* ==========================================================================
   Listing layout
   ========================================================================== */
.listing-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
    padding-bottom: 48px;
}
@media (max-width: 860px) {
    .listing-layout { grid-template-columns: 1fr; }
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}

.file-row {
    display: grid;
    grid-template-columns: 1fr 100px 160px 110px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.file-row:last-child { border-bottom: none; }
.file-row:hover,
.file-row.is-focused { background: var(--surface-2); }

.file-row--head {
    background: var(--surface-2);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.file-row__name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.file-row__name:hover { color: var(--gold); }
.file-row__icon { font-size: 16px; flex-shrink: 0; }

.file-row__size,
.file-row__date { color: var(--text-muted); font-family: var(--font-mono); font-size: 12.5px; }

/* Ear-tag style badge for the download counter — the page's one
   signature flourish: a rounded chip with a little punch-hole, echoing
   a livestock ear tag. */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 3px 10px 3px 8px;
    border-radius: 0 999px 999px 0;
    position: relative;
}
.tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
}

@media (max-width: 640px) {
    .file-row { grid-template-columns: 1fr auto; }
    .file-row__date, .file-row--head span:nth-child(3) { display: none; }
}

.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 20px;
}
.empty-state p:first-child { font-size: 40px; margin-bottom: 8px; }

/* ==========================================================================
   Ad slots — fixed dimensions so nothing shifts layout; clearly labeled.
   ========================================================================== */
.ad-slot {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
}
.ad-slot__label {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.ad-slot__placeholder { font-size: 13px; }

.ad-slot--banner { min-height: 100px; margin: 20px 0; }
.ad-slot--sidebar { min-height: 260px; position: sticky; top: 20px; }
.ad-slot--interstitial { min-height: 300px; margin: 24px auto; max-width: 360px; }

.file-row--ad.ad-slot {
    grid-template-columns: 1fr;
    min-height: 64px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.listing-sidebar { display: none; }
@media (min-width: 861px) { .listing-sidebar { display: block; } }

/* ==========================================================================
   Adblock notice
   ========================================================================== */
.adblock-notice {
    background: var(--red);
    color: #2a1210;
}
.adblock-notice__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.adblock-notice__icon { font-size: 20px; }
.adblock-notice__inner p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; }
.adblock-notice__dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
}
.adblock-notice__dismiss:hover { opacity: 1; }

/* ==========================================================================
   Download interstitial
   ========================================================================== */
.download-gate {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
}
.download-gate__title {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 22px;
    margin-bottom: 12px;
}
.download-gate__file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.download-gate__status { color: var(--text-muted); font-size: 13px; margin: 20px 0 12px; }

.button {
    display: inline-block;
    background: var(--gold);
    color: #2a1c05;
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 999px;
    transition: background 0.15s ease;
}
.button:hover { background: var(--gold-dark); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;
}
.site-footer__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}
.site-footer__powered a { color: var(--gold); }
.site-footer__powered a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
