
:root {
    --bg: #f5efe3; /* parchment */
    --bg-2: #ece3d3; /* lighter parchment */
    --ink: #2a1a07; /* sepia ink */
    --ink-2: #5a3d1c; /* warm dark */
    --accent: #b5753a; /* bronze */
    --accent-2: #824c22; /* leather */
    --line: rgba(42, 26, 7, .12);
    --success: #2f6f3a;
    --danger: #7f1d1d;
    --maxw: 1120px;
}

/* Reset & base */
*, *::before, *::after {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Subtle parchment texture */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(1000px 600px at 10% -10%, rgba(0, 0, 0, .05), transparent 60%),
    radial-gradient(1200px 800px at 110% 110%, rgba(0, 0, 0, .07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .03) 0 2px, transparent 2px 6px);
    filter: sepia(.35) contrast(1.02);
}

a {
    color: var(--accent-2);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px
}

img {
    max-width: 100%;
    display: block
}

.container {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: clamp(14px, 2vw, 24px)
}

/* Header (Wanted poster style) */
.site-header {
    background: linear-gradient(180deg, #f9f3e8, #efe5d5);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    letter-spacing: .04em;
    font-family: "Cinzel", serif;
    font-weight: 800;
    color: var(--ink);
}

.brand .star {
    width: 28px;
    height: 28px;
    border: 3px solid var(--ink);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(from 0turn, #d8c4a6, #f5ecda);
    box-shadow: inset 0 0 0 2px var(--bg);
}

.brand .star svg {
    width: 18px;
    height: 18px;
    fill: var(--ink)
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.nav-desktop {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap
}

.nav-desktop a {
    font-weight: 600;
    padding: .55rem .8rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.nav-desktop a:hover {
    background: var(--bg-2);
    border-color: var(--line)
}

/* Burger */
.burger {
    display: none;
    appearance: none;
    background: transparent;
    border: 0;
    padding: .75rem;
    border-radius: 12px
}

.burger:focus-visible {
    outline: 2px dashed var(--accent)
}

.burger svg {
    width: 28px;
    height: 28px
}

/* Drawer */
.drawer {
    position: fixed;
    inset: 0;
    translate: 0 -100%;
    transition: translate .4s ease, opacity .3s ease;
    opacity: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 60
}

.drawer.open {
    translate: 0 0;
    opacity: 1
}

.drawer-panel {
    background: linear-gradient(180deg, #f9f3e8 0%, #efe2cf 100%);
    border-bottom: 3px solid #d1bda2;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    padding: 16px 20px 28px;
    max-height: 92vh;
    overflow: auto;
}

.drawer-nav a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
    font-weight: 700
}

.drawer-nav a + a {
    border-top: 1px dashed var(--line)
}

.drawer-close {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 8px;
    margin-left: auto
}

/* Hero (desert svg) */
.hero {
    position: relative;
    overflow: hidden
}

.hero .poster {
    border: 4px solid #3e2a14;
    border-radius: 14px;
    background: #f6eddc;
    margin-top: 18px;
    padding: clamp(18px, 3vw, 28px);
    box-shadow: 0 10px 0 #3e2a14, 0 18px 40px rgba(0, 0, 0, .16);
}

.hero h1 {
    margin: 0 0 10px;
    font-family: "Special Elite", system-ui;
    font-size: clamp(30px, 4vw, 56px);
    line-height: 1.05;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-align: center;
}

.hero .sub {
    font-weight: 600;
    text-align: center;
    color: var(--ink-2)
}

.hero .desert {
    position: absolute;
    inset: auto 0 -1px 0;
    height: 110px;
    pointer-events: none
}

/* Featured slider */
.slider-section {
    margin-top: 18px
}

.slider-wrap {
    position: relative;
    border: 2px solid #3e2a14;
    border-radius: 16px;
    background: linear-gradient(180deg, #f4ead7, #efe0c8);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .12)
}

.slider-rail {
    display: flex;
    overflow: hidden
}

.slide {
    min-width: 100%;
    padding: 22px;
    display: grid;
    gap: 8px
}

.slide h4 {
    font-family: "Cinzel", serif;
    font-size: clamp(20px, 2.4vw, 28px);
    margin: 0
}

.slide p {
    margin: 0
}

.slider-controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-top: 1px dashed var(--line)
}

.slider-btn {
    appearance: none;
    border: 2px solid #3e2a14;
    background: #f6eddc;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 800
}

.slider-dots {
    display: flex;
    gap: 8px;
    align-items: center
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cdb79b;
    border: 1px solid #3e2a14;
    opacity: .6
}

.dot.active {
    opacity: 1;
    background: #8a6a44
}

/* Article content (kept intact) */
main#article {
    max-width: var(--maxw);
    margin-inline: auto;
    padding: clamp(18px, 3vw, 28px)
}

body > h1, body > p, body > h2, body > h3, body > ul, body > ol { /* while JS wraps, this helps FOUC */
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: clamp(18px, 3vw, 28px);
}

#article h1 {
    font-family: "Special Elite";
    text-align: center;
    font-size: clamp(32px, 4.4vw, 60px);
    line-height: 1.05;
    margin-top: 28px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

#article h2 {
    font-family: "Cinzel", serif;
    font-size: clamp(22px, 2.6vw, 34px);
    margin-top: 36px
}

#article h3 {
    font-family: "Cinzel", serif;
    font-size: clamp(18px, 2.2vw, 26px);
    margin-top: 22px
}

#article p {
    margin: 14px 0
}

#article ul, #article ol {
    padding-left: 1.25rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.02), transparent 50%);
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 14px 18px
}

#article li + li {
    margin-top: 8px
}

#article ul li {
    list-style: none;
    position: relative;
    padding-left: 22px
}

#article ul li::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    font-size: .9rem;
    transform: translateY(2px)
}

#article ol {
    counter-reset: cowboy
}

#article ol li {
    list-style: none;
    counter-increment: cowboy;
    position: relative;
    padding-left: 32px
}

#article ol li::before {
    content: counter(cowboy) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800
}

/* Section chips (auto-injected) */
.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px
}

.chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .35rem .7rem;
    background: #fff3;
    backdrop-filter: blur(4px)
}

/* Back to top */
.to-top {
    position: fixed;
    right: 12px;
    bottom: 12px;
    appearance: none;
    border: 2px solid #3e2a14;
    background: #f6eddc;
    padding: .55rem .8rem;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
    opacity: 0;
    transform: translateY(20px);
    transition: .25s
}

.to-top.show {
    opacity: 1;
    transform: none
}

/* Footer */
footer {
    max-width: var(--maxw);
    margin: 48px auto 32px;
    padding: 12px 18px;
    border-top: 2px dashed var(--line);
    color: var(--ink-2)
}

/* Responsive */
@media (max-width: 1000px) {
    .nav-desktop {
        display: none
    }

    .burger {
        display: inline-grid
    }

    .hero .poster {
        padding: 16px
    }
}

/* FIX */
.drawer{
    position: fixed;
    inset: 0;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform .35s ease, opacity .3s ease;
    background: rgba(0,0,0,.35);
    z-index: 60;
    pointer-events: none;
}
.drawer.open{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.drawer-panel{
    background: linear-gradient(180deg, #f9f3e8 0%, #efe2cf 100%);
    border-bottom: 3px solid #d1bda2;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    padding: 16px 20px 28px;
    max-height: 92vh;
    overflow: auto;
}


:root{
    --li-gap: 14px;
    --li-bullet-size: 18px;
    --li-accent: #8a6a44;
}

#article ul,
#article ol{
    margin: 16px 0;
    padding: 14px 18px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: linear-gradient(0deg, rgba(0,0,0,.02), transparent 50%);
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

#article ul li,
#article ol li{
    list-style: none;
    position: relative;
    padding-left: calc(var(--li-bullet-size) + var(--li-gap));
}
#article li + li{ margin-top: 8px; }


#article ul li::before{
    content:"★";
    position:absolute; left:0; top:.15em;
    display:inline-grid; place-items:center;
    width:var(--li-bullet-size); height:var(--li-bullet-size);
    border-radius:50%;
    font-size:.8rem; font-weight:800; line-height:1;
    color:#f6eddc;
    background: radial-gradient(circle at 35% 35%, #b5753a, var(--li-accent));
    box-shadow: 0 0 0 1px #3e2a14 inset, 0 1px 2px rgba(0,0,0,.25);
}


#article ol{ counter-reset: cowboy; }
#article ol li{ counter-increment: cowboy; }
#article ol li::before{
    content: counter(cowboy) ".";
    position:absolute; left:0; top:.05em;
    display:inline-grid; place-items:center;
    min-width:var(--li-bullet-size); height:var(--li-bullet-size);
    padding:0 4px;
    border-radius:999px;
    font-weight:800; font-size:.82rem; color:#f6eddc;
    background: linear-gradient(180deg, #8a6a44, #6e4f2c);
    box-shadow: 0 0 0 1px #3e2a14 inset, 0 1px 2px rgba(0,0,0,.25);
}


#article li a,
#article li code,
#article li span{
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width:420px){
    :root{ --li-bullet-size:16px; --li-gap:10px; }
}

/* Responsive: ховаємо десктоп-меню до 1000px */
@media (max-width: 1000px){
    .nav-desktop{ display:none; }
    .burger{ display:inline-grid; }
}
