/* samples.libcna.com — CNA sample gallery */

:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --border: #dfe3e8;
    --ink: #14181d;
    --ink-soft: #5b6570;
    --accent: #1f6feb;
    --accent-soft: #eaf2ff;
    --accent-ink: #ffffff;
    --shadow: 0 1px 2px rgba(20, 24, 29, .06), 0 8px 24px rgba(20, 24, 29, .06);
    --radius: 10px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f1216;
        --surface: #171b21;
        --border: #2a313a;
        --ink: #e7ebf0;
        --ink-soft: #9aa5b1;
        --accent: #4c8dff;
        --accent-soft: #162746;
        --accent-ink: #0f1216;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px 64px;
}

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

.site-head {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 40px;
}

.site-head .wrap { padding-top: 28px; padding-bottom: 28px; }

.site-title {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.02em;
}

.site-title a { color: inherit; text-decoration: none; }

.tagline {
    margin: 6px 0 0;
    color: var(--ink-soft);
    max-width: 62ch;
}

/* ---------- gallery ---------- */

.progress-note {
    margin: 0 0 32px;
    padding: 20px 22px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent-soft);
}

.progress-note h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.progress-note p { margin: 0 0 10px; }

.repo-link { font-weight: 600; }

.gallery {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card img {
    display: block;
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--border);
    background: #000;
}

.card-body { padding: 14px 16px 18px; }

.card h2 {
    margin: 0 0 4px;
    font-size: 18px;
    letter-spacing: -.01em;
}

.card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

/* ---------- detail ---------- */

.detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px 16px;
    margin-bottom: 8px;
}

.detail-head h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -.02em;
}

.origin {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0 0 4px;
}

.sample-source {
    margin: 0 0 24px;
    font-size: 14px;
    font-weight: 600;
}

.shot {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #000;
    margin-bottom: 28px;
}

.play {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 26px;
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.play:hover { filter: brightness(1.08); }

.play-note {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 10px 0 32px;
}

section h2 {
    font-size: 20px;
    letter-spacing: -.01em;
    margin: 32px 0 10px;
}

table.controls {
    border-collapse: collapse;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

table.controls th,
table.controls td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

table.controls th { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
table.controls tr:last-child td { border-bottom: 0; }

kbd {
    font: 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--bg);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 3px 6px;
    white-space: nowrap;
}

/* ---------- prev / next ---------- */

.pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.pager a,
.pager > span {
    font-size: 15px;
    max-width: 45%;
}

.pager a {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
}

.pager a:hover { filter: brightness(1.08); }
.pager .next { text-align: right; }
.pager .label {
    display: block;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-align: center;
    opacity: 1;
    margin-bottom: 6px;
}

.pager-before-about {
    margin-top: 0;
    margin-bottom: 32px;
}

.pager-before-about + section h2 { margin-top: 0; }

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

.site-foot {
    border-top: 1px solid var(--border);
    margin-top: 56px;
    padding: 24px 0 40px;
    color: var(--ink-soft);
    font-size: 14px;
}

.site-foot .wrap { padding-bottom: 0; }
