/* ==========================================================================
   SnapLocal Blog — "Contact Sheet" editorial layer.
   Sits on top of ../assets/styles.css and reuses its darkroom design tokens
   (--c-void, --c-paper, --c-safelight, serif display, mono labels).
   CSS-only interactions. Zero external requests. Zero JS.
   ========================================================================== */

/* ---------- top bar ---------- */
.bk-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem var(--gutter);
    border-bottom: 1px solid var(--c-line-soft);
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--c-void) 88%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.bk-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-mono);
    font-size: .82rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--c-paper);
}

.bk-brand b {
    color: var(--c-safelight);
    font-weight: 600;
}

.bk-brand:hover {
    color: var(--c-safelight);
}

.bk-top__nav {
    display: flex;
    align-items: center;
    gap: clamp(.8rem, 2vw, 1.6rem);
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-mute);
}

.bk-top__nav a:hover {
    color: var(--c-safelight);
}

.bk-top__nav .bk-install {
    color: var(--c-void);
    background: var(--c-safelight);
    padding: .45rem .9rem;
    border-radius: var(--r-sm);
    font-weight: 700;
    transition: background var(--d-fast) var(--e-out);
}

.bk-top__nav .bk-install:hover {
    background: var(--c-paper);
    color: var(--c-void);
}

/* ---------- shared page frame ---------- */
.bk-wrap {
    max-width: var(--wrap-narrow);
    margin: 0 auto;
    padding: 0 var(--gutter) 4rem;
    position: relative;
    z-index: 1;
}

.bk-wrap--wide {
    max-width: 1060px;
}

.bk-crumb {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2.2rem;
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-mute);
}

.bk-crumb:hover {
    color: var(--c-safelight);
}

.bk-crumb .safelight {
    flex: none;
}

/* ---------- index masthead ---------- */
.bk-masthead {
    padding-top: clamp(3rem, 7vw, 5.5rem);
    padding-bottom: clamp(2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--c-line);
}

.bk-masthead h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.6rem, 6.4vw, 4.6rem);
    letter-spacing: -0.02em;
    line-height: 1.02;
    color: var(--c-paper);
    margin: 1rem 0 1.1rem;
}

.bk-masthead h1 em {
    font-style: italic;
    color: var(--c-safelight);
}

.bk-masthead__lede {
    max-width: 46ch;
    color: var(--c-mute);
    font-size: var(--fs-lede);
    line-height: 1.65;
}

.bk-masthead__lede strong {
    color: var(--c-paper);
    font-weight: 600;
}

/* ---------- index: contact-sheet post cards ---------- */
.bk-posts {
    margin-top: clamp(2rem, 4vw, 3.2rem);
    border-top: 1px solid var(--c-line-soft);
}

.bk-postcard {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2.4rem);
    padding: clamp(1.6rem, 3.4vw, 2.6rem) 0;
    border-bottom: 1px solid var(--c-line-soft);
    position: relative;
}

.bk-postcard__idx {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .12em;
    color: var(--c-faint);
    padding-top: .5rem;
    text-transform: uppercase;
    line-height: 2;
}

.bk-postcard__idx b {
    display: block;
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--c-safelight);
    line-height: 1.1;
}

.bk-postcard h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    letter-spacing: -0.01em;
    line-height: 1.22;
    color: var(--c-paper);
    margin-bottom: .7rem;
}

.bk-postcard h2 a {
    background-image: linear-gradient(var(--c-safelight), var(--c-safelight));
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size var(--d-med) var(--e-out), color var(--d-fast) var(--e-out);
}

.bk-postcard:hover h2 a {
    background-size: 100% 1px;
    color: var(--c-safelight);
}

.bk-postcard p {
    color: var(--c-mute);
    line-height: 1.7;
    max-width: 62ch;
    margin-bottom: 1rem;
}

.bk-postcard__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-faint);
}

.bk-postcard__meta .read {
    color: var(--c-safelight);
}

.bk-postcard__meta .read:hover {
    color: var(--c-paper);
}

@media (max-width: 640px) {
    .bk-postcard {
        grid-template-columns: 1fr;
        gap: .6rem;
    }

    .bk-postcard__idx {
        display: flex;
        align-items: baseline;
        gap: .8rem;
        padding-top: 0;
    }

    .bk-postcard__idx b {
        display: inline;
        font-size: 1.4rem;
    }
}

/* ---------- article head ---------- */
.bk-head {
    padding-top: clamp(2.6rem, 6vw, 4.6rem);
    padding-bottom: clamp(1.6rem, 3vw, 2.6rem);
    border-bottom: 1px solid var(--c-line);
}

.bk-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .9rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-faint);
}

.bk-kicker .tag {
    color: var(--c-safelight);
    border: 1px solid var(--c-safelight-deep);
    background: var(--c-safelight-soft);
    padding: .25rem .6rem;
    border-radius: 999px;
}

.bk-head h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4.6vw, 3.2rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
    color: var(--c-paper);
    margin: 1.1rem 0 1.2rem;
    text-wrap: balance;
}

.bk-head h1 em {
    font-style: italic;
    color: var(--c-safelight);
}

.bk-head__lede {
    color: var(--c-mute);
    font-size: var(--fs-lede);
    line-height: 1.7;
    max-width: 60ch;
}

.bk-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1.6rem;
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-faint);
}

.bk-byline .safelight {
    flex: none;
}

/* ---------- article prose ---------- */
.bk-prose {
    padding-top: clamp(2rem, 4vw, 3rem);
    font-size: 1.04rem;
    line-height: 1.78;
    color: #cfccc4;
}

.bk-prose>*+* {
    margin-top: 1.35em;
}

.bk-prose h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.8vw, 1.95rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--c-paper);
    margin-top: 2.4em;
    scroll-margin-top: 5rem;
}

.bk-prose h2::before {
    content: "▸";
    color: var(--c-safelight);
    font-size: .7em;
    margin-right: .6em;
    vertical-align: .18em;
}

.bk-prose h3 {
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--c-safelight);
    margin-top: 2.2em;
}

.bk-prose p.lede-first::first-letter {
    font-family: var(--font-display);
    float: left;
    font-size: 3.4em;
    line-height: .82;
    padding: .06em .12em 0 0;
    color: var(--c-safelight);
}

.bk-prose a {
    color: var(--c-paper);
    text-decoration: underline;
    text-decoration-color: var(--c-safelight-deep);
    text-underline-offset: 3px;
    transition: color var(--d-fast) var(--e-out), text-decoration-color var(--d-fast) var(--e-out);
}

.bk-prose a:hover {
    color: var(--c-safelight);
    text-decoration-color: var(--c-safelight);
}

.bk-prose strong {
    color: var(--c-paper);
    font-weight: 650;
}

.bk-prose em {
    color: var(--c-paper);
}

.bk-prose code {
    font-family: var(--font-mono);
    font-size: .84em;
    background: var(--c-panel);
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    padding: .12em .42em;
    color: var(--c-mint);
}

.bk-prose ul,
.bk-prose ol {
    padding-left: 1.4em;
}

.bk-prose ul {
    list-style: none;
    padding-left: 1.5em;
}

.bk-prose ul>li {
    position: relative;
    padding-left: .2em;
}

.bk-prose ul>li+li {
    margin-top: .55em;
}

.bk-prose ul>li::before {
    content: "✦";
    position: absolute;
    left: -1.35em;
    color: var(--c-safelight);
    font-size: .78em;
    top: .32em;
}

.bk-prose ol {
    list-style: decimal;
}

.bk-prose ol::marker,
.bk-prose ol>li::marker {
    font-family: var(--font-mono);
    color: var(--c-safelight);
    font-size: .86em;
}

.bk-prose ol>li+li {
    margin-top: .55em;
}

.bk-prose blockquote {
    border-left: 2px solid var(--c-safelight);
    background: var(--c-safelight-soft);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    padding: 1.1rem 1.4rem;
    font-family: var(--font-display);
    font-size: 1.14em;
    font-style: italic;
    line-height: 1.55;
    color: var(--c-paper);
}

.bk-prose blockquote p+p {
    margin-top: .7em;
}

/* callout / note box */
.bk-note {
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    background: var(--c-panel);
    padding: 1.2rem 1.4rem;
}

.bk-note__label {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--c-safelight);
    margin-bottom: .6rem;
}

.bk-note p {
    color: var(--c-mute);
    font-size: .96rem;
    line-height: 1.7;
}

.bk-note strong {
    color: var(--c-paper);
}

/* step cards for tutorials */
.bk-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.bk-steps>li {
    counter-increment: step;
    position: relative;
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    background: var(--c-panel);
    padding: 1.2rem 1.4rem 1.2rem 3.9rem;
}

.bk-steps>li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 1.1rem;
    top: 1.15rem;
    font-family: var(--font-mono);
    font-size: .95rem;
    font-weight: 700;
    color: var(--c-safelight);
    border: 1px solid var(--c-safelight-deep);
    background: var(--c-safelight-soft);
    border-radius: var(--r-sm);
    padding: .18rem .4rem;
    line-height: 1.2;
}

.bk-steps h3 {
    margin-top: 0;
}

.bk-steps p {
    color: var(--c-mute);
    font-size: .96rem;
    line-height: 1.7;
    margin-top: .45em;
}

.bk-steps p+p {
    margin-top: .7em;
}

/* ---------- comparison table ---------- */
.bk-tablewrap {
    overflow-x: auto;
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    background: var(--c-panel);
}

table.bk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    min-width: 640px;
}

table.bk-table caption {
    caption-side: bottom;
    text-align: left;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-faint);
    padding: .8rem 1rem;
    border-top: 1px solid var(--c-line-soft);
}

table.bk-table th,
table.bk-table td {
    text-align: left;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--c-line-soft);
    vertical-align: top;
    line-height: 1.5;
}

table.bk-table thead th {
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-mute);
    background: var(--c-raise);
    border-bottom: 1px solid var(--c-line);
    white-space: nowrap;
}

table.bk-table thead th.us {
    color: var(--c-safelight);
}

table.bk-table tbody th {
    font-weight: 600;
    color: var(--c-paper);
    white-space: nowrap;
}

table.bk-table tbody tr:last-child th,
table.bk-table tbody tr:last-child td {
    border-bottom: 0;
}

table.bk-table td {
    color: var(--c-mute);
}

table.bk-table td.us {
    color: var(--c-paper);
    background: var(--c-safelight-soft);
}

table.bk-table .v-yes {
    color: var(--c-mint);
    font-weight: 600;
}

table.bk-table .v-no {
    color: var(--c-danger);
    font-weight: 600;
}

table.bk-table .v-warn {
    color: var(--c-amber);
    font-weight: 600;
}

/* ---------- verdict / pros-cons cards ---------- */
.bk-cards2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
}

.bk-cards2>li {
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    background: var(--c-panel);
    padding: 1.1rem 1.3rem;
}

.bk-cards2 h3 {
    margin-top: 0;
    margin-bottom: .5rem;
}

.bk-cards2 ul {
    padding-left: 1.4em;
    margin-top: .4em;
}

.bk-cards2 ul>li+li {
    margin-top: .4em;
}

.bk-cards2 p {
    color: var(--c-mute);
    font-size: .94rem;
}

/* ---------- end CTA block ---------- */
.bk-cta {
    margin-top: clamp(3rem, 6vw, 4.5rem);
    border: 1px solid var(--c-safelight-deep);
    border-radius: var(--r-xl);
    background:
        radial-gradient(120% 140% at 85% -10%, var(--c-safelight-soft), transparent 55%),
        var(--c-panel);
    padding: clamp(1.8rem, 4vw, 2.8rem);
    text-align: center;
}

.bk-cta h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.6rem, 3.4vw, 2.3rem);
    letter-spacing: -0.015em;
    line-height: 1.15;
    color: var(--c-paper);
    margin: .9rem 0 .8rem;
}

.bk-cta h2 em {
    font-style: italic;
    color: var(--c-safelight);
}

.bk-cta p {
    color: var(--c-mute);
    max-width: 52ch;
    margin: 0 auto 1.6rem;
    line-height: 1.7;
}

.bk-cta__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .9rem;
}

.bk-btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .9rem 1.6rem;
    border-radius: var(--r-md);
    transition: transform var(--d-fast) var(--e-out), background var(--d-fast) var(--e-out), color var(--d-fast) var(--e-out), border-color var(--d-fast) var(--e-out);
}

.bk-btn--primary {
    background: var(--c-safelight);
    color: #1a0500;
    box-shadow: 0 0 28px var(--c-safelight-glow);
}

.bk-btn--primary:hover {
    background: var(--c-paper);
    transform: translateY(-2px);
}

.bk-btn--ghost {
    border: 1px solid var(--c-line);
    color: var(--c-paper);
}

.bk-btn--ghost:hover {
    border-color: var(--c-safelight);
    color: var(--c-safelight);
    transform: translateY(-2px);
}

.bk-cta__fine {
    margin-top: 1.2rem;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-faint);
}

.bk-cta__fine a {
    color: var(--c-mute);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bk-cta__fine a:hover {
    color: var(--c-safelight);
}

/* ---------- related posts ---------- */
.bk-related {
    margin-top: clamp(2.6rem, 5vw, 4rem);
    border-top: 1px solid var(--c-line);
    padding-top: 1.8rem;
}

.bk-related h2 {
    font-family: var(--font-mono);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--c-faint);
    margin-bottom: 1.1rem;
}

.bk-related ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: .8rem;
}

.bk-related a {
    display: flex;
    align-items: baseline;
    gap: .8rem;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    background: var(--c-panel);
    padding: .95rem 1.15rem;
    color: var(--c-paper);
    font-size: .98rem;
    line-height: 1.45;
    transition: border-color var(--d-fast) var(--e-out), transform var(--d-fast) var(--e-out);
}

.bk-related a:hover {
    border-color: var(--c-safelight-deep);
    transform: translateX(4px);
}

.bk-related a span.n {
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    color: var(--c-safelight);
    flex: none;
}

/* ---------- footer ---------- */
.bk-footer {
    border-top: 1px solid var(--c-line-soft);
    margin-top: clamp(3rem, 6vw, 5rem);
    padding: 2rem var(--gutter) 2.6rem;
    position: relative;
    z-index: 1;
}

.bk-footer__in {
    max-width: var(--wrap-narrow);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-faint);
}

.bk-footer__in nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
}

.bk-footer__in a:hover {
    color: var(--c-safelight);
}

/* ---------- entrance motion (CSS-only, respects reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .bk-rise {
        animation: bk-rise .7s var(--e-out) both;
    }

    .bk-rise-1 {
        animation-delay: .06s;
    }

    .bk-rise-2 {
        animation-delay: .14s;
    }

    .bk-rise-3 {
        animation-delay: .22s;
    }

    @keyframes bk-rise {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}
