:root {
    --bw-ink: #161310;
    --bw-muted: #75695d;
    --bw-line: #eadfd1;
    --bw-paper: #fffaf2;
    --bw-card: #ffffff;
    --bw-saffron: #f97316;
    --bw-gold: #facc15;
    --bw-blue: #1d4ed8;
    --bw-green: #166534;
    --bw-red: #7f1d1d;
    --bw-amoled: #0f172a;
    --bw-ivory: #fff7e6;
    --bw-shadow: 0 16px 40px rgba(22, 19, 16, 0.12);
    --bw-radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bw-paper);
    color: var(--bw-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(249, 115, 22, 0.45);
    outline-offset: 3px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bw-site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 250, 242, 0.94);
    border-bottom: 1px solid var(--bw-line);
    backdrop-filter: blur(16px);
}

body.admin-bar .bw-site-header {
    top: 32px;
}

.bw-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 16px;
}

.bw-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.bw-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    background: conic-gradient(from 180deg, var(--bw-saffron), var(--bw-gold), var(--bw-red), var(--bw-saffron));
    box-shadow: 0 8px 22px rgba(249, 115, 22, 0.25);
}

.bw-brand strong {
    display: block;
    font-size: 1rem;
    line-height: 1;
}

.bw-brand small {
    display: block;
    color: var(--bw-muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bw-search {
    display: flex;
    min-width: 0;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.bw-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 10px 12px;
    background: transparent;
    color: var(--bw-ink);
}

.bw-search button {
    border: 0;
    padding: 0 12px;
    background: var(--bw-ink);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.bw-menu-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--bw-line);
    border-radius: var(--bw-radius);
    background: #fff;
    color: var(--bw-ink);
}

.bw-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 2px 0;
    background: currentColor;
}

.bw-menu-toggle em {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.bw-primary-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px 12px;
}

.is-menu-open .bw-primary-nav {
    display: block;
}

.bw-menu-list,
.bw-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bw-menu-list a,
.bw-footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bw-muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.bw-site-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 16px 48px;
}

.bw-hero {
    display: grid;
    gap: 22px;
    align-items: center;
    min-height: 430px;
    padding: 26px 0 18px;
}

.bw-eyebrow {
    margin: 0 0 8px;
    color: var(--bw-saffron);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.bw-hero h1,
.bw-page-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.2rem, 9vw, 5.6rem);
    line-height: 0.95;
}

.bw-hero p:not(.bw-eyebrow),
.bw-section-head p,
.bw-page-hero p,
.bw-editorial-note p,
.bw-empty p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--bw-muted);
}

.bw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.bw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--bw-ink);
    border-radius: var(--bw-radius);
    background: var(--bw-ink);
    color: #fff;
    font-weight: 900;
}

.bw-button-soft {
    border-color: var(--bw-line);
    background: #fff;
    color: var(--bw-ink);
}

.bw-hero-phone {
    display: grid;
    justify-content: center;
}

.bw-phone-preview {
    position: relative;
    width: min(68vw, 270px);
    aspect-ratio: 9 / 18.5;
    padding: 16px;
    border: 10px solid #18120d;
    border-radius: 34px;
    background:
        linear-gradient(145deg, rgba(250, 204, 21, 0.34), transparent 34%),
        linear-gradient(315deg, rgba(29, 78, 216, 0.42), transparent 44%),
        #0f172a;
    box-shadow: var(--bw-shadow);
    color: #fff;
    overflow: hidden;
}

.bw-phone-preview span,
.bw-mandala-ring {
    position: absolute;
    inset: 17%;
    border: 1px solid rgba(250, 204, 21, 0.46);
    border-radius: 50%;
}

.bw-phone-preview span::before,
.bw-mandala-ring::before {
    content: "";
    position: absolute;
    inset: 18%;
    border: 1px dashed rgba(255, 250, 242, 0.5);
    border-radius: 50%;
}

.bw-phone-preview strong {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3.6rem;
}

.bw-phone-preview em {
    position: absolute;
    right: 18px;
    bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-style: normal;
    font-weight: 800;
}

.bw-chip-row {
    display: flex;
    gap: 8px;
    margin: 0 -16px;
    padding: 0 16px 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.bw-chip-row::-webkit-scrollbar {
    display: none;
}

.bw-section-spacing {
    margin-top: 8px;
    margin-bottom: 10px;
}

.bw-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    white-space: nowrap;
    padding: 8px 13px;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bw-ink);
    font-size: 0.86rem;
    font-weight: 900;
}

.bw-section,
.bw-page-hero,
.bw-editorial-note,
.bw-empty {
    margin-top: 34px;
}

.bw-section-head {
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
}

.bw-section-head h2,
.bw-editorial-note h2,
.bw-empty h1,
.bw-empty h2 {
    margin: 0;
    font-size: clamp(1.45rem, 5vw, 2.6rem);
    line-height: 1.05;
}

.bw-grid {
    column-count: 2;
    column-gap: 12px;
}

.bw-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 12px;
    overflow: hidden;
    break-inside: avoid;
    border: 1px solid var(--bw-line);
    border-radius: var(--bw-radius);
    background: var(--bw-card);
    box-shadow: 0 9px 22px rgba(22, 19, 16, 0.06);
}

.bw-card-media {
    display: block;
    background: #161310;
}

.bw-card-image {
    width: 100%;
    aspect-ratio: 9 / 15;
    object-fit: cover;
}

.bw-card-case .bw-card-image {
    aspect-ratio: 4 / 5;
}

.bw-visual {
    position: relative;
    display: grid;
    min-height: 220px;
    aspect-ratio: 9 / 15;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 28%),
        linear-gradient(315deg, rgba(0, 0, 0, 0.24), transparent 44%),
        var(--bw-saffron);
}

.bw-visual-saffron {
    background-color: var(--bw-saffron);
}

.bw-visual-gold {
    background-color: var(--bw-gold);
    color: #2f2413;
}

.bw-visual-blue {
    background-color: var(--bw-blue);
}

.bw-visual-green {
    background-color: var(--bw-green);
}

.bw-visual-red {
    background-color: var(--bw-red);
}

.bw-visual-amoled {
    background-color: var(--bw-amoled);
}

.bw-tone-gold {
    --tone: #facc15;
}

.bw-tone-blue {
    --tone: #93c5fd;
}

.bw-tone-green {
    --tone: #86efac;
}

.bw-tone-red {
    --tone: #fecaca;
}

.bw-tone-ivory {
    --tone: #fff7e6;
}

.bw-visual::before,
.bw-visual::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 22px;
}

.bw-visual::after {
    inset: auto 24px 24px;
    height: 18%;
    border-style: dashed;
    opacity: 0.68;
}

.bw-mandala-ring {
    border-color: color-mix(in srgb, var(--tone, #facc15), white 12%);
}

.bw-visual strong {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    font-size: 2.5rem;
    font-weight: 900;
}

.bw-visual em {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 18px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

.bw-card-body {
    padding: 12px;
}

.bw-card-kicker {
    color: var(--bw-saffron);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bw-card h3 {
    margin: 4px 0 0;
    font-size: 1rem;
    line-height: 1.16;
}

.bw-card p {
    margin: 7px 0 0;
    color: var(--bw-muted);
    font-size: 0.84rem;
}

.bw-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--bw-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.bw-fav {
    min-height: 30px;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    background: #fffaf2;
    color: var(--bw-ink);
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 900;
}

.bw-fav[aria-pressed="true"] {
    border-color: var(--bw-saffron);
    background: var(--bw-saffron);
    color: #fff;
}

.bw-case-section {
    padding: 24px 16px;
    margin-right: -16px;
    margin-left: -16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: #161310;
    color: #fff;
}

.bw-case-section .bw-section-head p {
    color: rgba(255, 255, 255, 0.68);
}

.bw-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.bw-case-grid .bw-card {
    background: #221b14;
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.bw-case-grid .bw-card p,
.bw-case-grid .bw-card-meta {
    color: rgba(255, 255, 255, 0.66);
}

.bw-case-shell {
    min-height: 260px;
    aspect-ratio: 4 / 5;
}

.bw-phone-frame {
    position: relative;
    width: 48%;
    aspect-ratio: 9 / 18.5;
    display: grid;
    place-items: center;
    border: 7px solid #050505;
    border-radius: 22px;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 6px, transparent 6px 14px),
        rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
}

.bw-phone-frame span {
    position: absolute;
    top: 10px;
    width: 34%;
    height: 5px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.56);
}

.bw-phone-frame i {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.7rem;
    font-style: normal;
    font-weight: 900;
}

.bw-color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.bw-color-swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 10px;
    border: 1px solid var(--bw-line);
    border-radius: var(--bw-radius);
    background: #fff;
}

.bw-color-swatch span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.bw-editorial-note,
.bw-empty {
    padding: 22px;
    border: 1px solid var(--bw-line);
    border-radius: var(--bw-radius);
    background: #fff;
}

.bw-page-hero {
    padding: 24px 0 4px;
}

.bw-archive-description {
    color: var(--bw-muted);
}

.bw-pagination {
    margin-top: 24px;
}

.bw-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bw-pagination a,
.bw-pagination span {
    display: inline-flex;
    min-width: 36px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid var(--bw-line);
    border-radius: var(--bw-radius);
    background: #fff;
    font-weight: 900;
}

.bw-single {
    display: grid;
    gap: 22px;
    margin-top: 24px;
}

.bw-single-preview {
    overflow: hidden;
    border: 1px solid var(--bw-line);
    border-radius: var(--bw-radius);
    background: #161310;
}

.bw-single-preview .bw-visual {
    min-height: 520px;
}

.bw-single-image {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #161310;
}

.bw-single-content {
    padding: 18px;
    border: 1px solid var(--bw-line);
    border-radius: var(--bw-radius);
    background: #fff;
}

.bw-single-content h1 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 4rem);
    line-height: 1;
}

.bw-single-meta,
.bw-single-actions,
.bw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.bw-single-meta span,
.bw-tags a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    color: var(--bw-muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.bw-entry-content {
    margin-top: 18px;
    color: #302820;
}

.bw-grid-related {
    column-count: 2;
}

.bw-empty-page {
    min-height: 58vh;
    display: grid;
    align-content: center;
    gap: 16px;
}

.bw-empty .search-form {
    display: flex;
    max-width: 520px;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.bw-empty .search-field {
    flex: 1;
    border: 0;
    padding: 12px;
}

.bw-empty .search-submit {
    border: 0;
    padding: 0 16px;
    background: var(--bw-ink);
    color: #fff;
    font-weight: 900;
}

.bw-site-footer {
    background: #161310;
    color: #fffaf2;
}

.bw-footer-inner {
    display: grid;
    gap: 22px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 16px;
}

.bw-footer-inner h2 {
    margin: 0;
}

.bw-footer-inner p {
    max-width: 560px;
    color: rgba(255, 250, 242, 0.7);
}

.bw-site-footer .bw-footer-links a {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fffaf2;
}

.bw-back-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    min-height: 40px;
    border: 1px solid var(--bw-line);
    border-radius: 999px;
    background: #fff;
    color: var(--bw-ink);
    box-shadow: var(--bw-shadow);
    cursor: pointer;
    font-weight: 900;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.bw-back-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (min-width: 720px) {
    .bw-site-main {
        padding-right: 24px;
        padding-left: 24px;
    }

    .bw-header-inner {
        padding-right: 24px;
        padding-left: 24px;
    }

    .bw-menu-toggle {
        display: none;
    }

    .bw-primary-nav {
        display: block;
        padding-right: 24px;
        padding-left: 24px;
    }

    .bw-hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
        min-height: 560px;
    }

    .bw-grid {
        column-count: 3;
        column-gap: 16px;
    }

    .bw-card {
        margin-bottom: 16px;
    }

    .bw-color-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bw-case-section {
        padding-right: 24px;
        padding-left: 24px;
        margin-right: -24px;
        margin-left: -24px;
    }

    .bw-single {
        grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
        align-items: start;
    }
}

@media (min-width: 1040px) {
    .bw-grid {
        column-count: 4;
    }

    .bw-grid-related {
        column-count: 4;
    }

    .bw-footer-inner {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

@media (max-width: 520px) {
    .bw-header-inner {
        grid-template-columns: auto auto;
    }

    .bw-search {
        grid-column: 1 / -1;
        order: 3;
    }

    .bw-brand strong {
        font-size: 0.94rem;
    }

    .bw-hero h1,
    .bw-page-hero h1 {
        font-size: clamp(2rem, 13vw, 3.7rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
