:root{
    --coffee-1:#2a1c17;
    --coffee-2:#4a3027;
    --coffee-3:#1a120f;

    --page:#f2f3f5;
    --content:#ffffff;
    --text:rgb(17, 24, 39);
    --muted:#475569;
    --line:#e5e7eb;

    --blue-1:#1d7fb1;
    --blue-2:#145f8a;

    --orange-1:#f59e0b;
    --orange-2:#d97706;

    --radius:10px;
    --shadow:0 10px 26px rgba(15,23,42,.08);

    --container:1120px;
    --header-offset: 72px; /* дефолтная высота шапки */
}

*{box-sizing:border-box}
html,body{height:100%}

body{
    margin:0;
    background:var(--page);
    color:var(--text);
    line-height:1.6;
    font-family: Tahoma, Verdana, Segoe UI, Arial, sans-serif;
    font-size: 17px;
}

.h1,.h2,.h3{
    font-family: Tahoma, Verdana, Segoe UI, Arial, sans-serif;
}

img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible,summary:focus-visible,select:focus-visible{
    outline:2px solid rgba(245,158,11,.65);
    outline-offset:3px;
}

.container{
    width:100%;
    max-width:var(--container);
    margin:0 auto;
    padding:0 16px;
}

/* Header */
.site-header{
    border-bottom:1px solid rgba(255,255,255,.10);
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background:
            radial-gradient(
                    circle at 50% -20%,
                    #5a3a2f 0%,
                    var(--coffee-2) 35%,
                    var(--coffee-1) 65%,
                    var(--coffee-3) 100%
            );
}

.header-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:4px 0;
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
}

.brand-logo{
    width:auto;
    height:64px;
}

.header-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

/* Buttons (как в референсе: синяя + оранжевая) */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:14px 19px;
    border-radius:6px;
    border:1px solid transparent;
    font-weight:800;
    letter-spacing:.2px;
    transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
    box-shadow:0 4px 12px rgba(0,0,0,.12);
    user-select:none;
    white-space:nowrap;
    font-size: 120%;
}

.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}

.btn-blue{
    color:#fff;
    background:linear-gradient(180deg, var(--blue-1), var(--blue-2));
}

.btn-orange{
    color:white;
    background:linear-gradient(180deg, var(--orange-1), var(--orange-2));
}

.btn-center{min-width:160px}
.btn-lg{padding:10px 18px; min-width:170px}

/* Main content shell */
.main{
    padding:65px 0 40px;
    padding-top: var(--header-offset);
}

.page{
    background:var(--content);
    border:1px solid var(--line);
    box-shadow:var(--shadow);
}

.page-top{
    padding:22px 0 10px;
}

.h1{
    margin:1rem 0 1rem;
    font-size:45px;
    line-height:1.15;
    letter-spacing:-.2px;

}

.lead{
    margin:0;
    color:var(--muted);
    max-width:920px;
}

/* Intro (как в референсе: текст слева, картинка справа) */
.intro{
    display:grid;
    grid-template-columns: 1.2fr .8fr;
    gap:18px;
    align-items:start;
    padding:12px 0 18px;
}

.intro h2{
    margin:0 0 10px;
    font-size:18px;
}

.intro p{
    margin:0 0 12px;
    color:var(--text);
}

.intro-actions{
    display:flex;
    gap:10px;
    justify-content:center;
    margin:14px 0 0;
}

/* Images full width with border */
.media{
    margin:0;
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden;
    background:#fff;
    margin: 1em 0 1.4em;
}

.media img{
    width:100%;
    height:auto;
}

.media-actions{
    display:flex;
    gap:10px;
    justify-content:center;
    padding:12px 0 0;
}

/* TOC dropdown bar like ref */
.toc{
    margin:10px 0 6px;
    padding:14px 0 18px;
}

.toc-box{
    border:1px solid var(--line);
    border-radius:6px;
    background:#fff;
    box-shadow:0 6px 18px rgba(15,23,42,.06);
    overflow:hidden;
}

.toc-summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    font-weight:800;
    color:var(--text);
    cursor:pointer;
    user-select:none;
}

.toc-summary span{
    color:var(--muted);
    font-weight:700;
}

.toc-list{
    margin:0;
    padding:10px 12px 12px;
    border-top:1px solid var(--line);
    list-style:none;
}

.toc-list li{margin:0}
.toc-list a{
    display:block;
    padding:7px 8px;
    border-radius:6px;
    color:var(--text);
}
.toc-list a:hover{
    background:#f7f7f8;
}

/* Typography sections */
.section{
    padding:18px 0;

}

.h2{
    margin:0 0 10px;
    font-size:28px;
    letter-spacing:-.1px;
}

p{margin:0 0 12px}
p:last-child{margin-bottom:0}

strong{font-weight:900}

/* UL/OL/Tables — аккуратно, без “тяжёлых” блоков */
ul{
    margin:0 0 12px;
    padding:0 0 0 18px;
}
ul li{margin:6px 0}

ol{
    margin:0 0 12px;
    padding:0 0 0 18px;
}
ol li{margin:6px 0}

.table-wrap{
    border:1px solid var(--line);
    border-radius:8px;
    overflow:auto;
    background:#fff;
    margin:10px 0 14px;
}

.table{
    width:100%;
    min-width:640px;
    border-collapse:collapse;
}

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

.table thead th{
    background:#f8fafc;
    font-weight:900;
}

/* Footer */
.site-footer{
    background:linear-gradient(180deg, var(--coffee-1), var(--coffee-3));
    border-top:1px solid rgba(255,255,255,.10);
    color:#e5e7eb;
}

.footer-inner{
    display:grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap:14px;
    padding:18px 0;
    align-items:start;
}

.footer-title{
    margin:0 0 10px;
    font-weight:900;
    letter-spacing:.2px;
    color:#fff;
    font-size:13px;
    text-transform:uppercase;
    opacity:.9;
}

.footer-links{
    list-style:none;
    margin:0;
    padding:0;
}

.footer-links li{margin:6px 0}

.footer-links a{
    color:#d1d5db;
}
.footer-links a:hover{color:#fff}

.footer-copy{
    border-top:1px solid rgba(255,255,255,.10);
    padding:1em 0;
    font-size:13px;
    color:#cbd5e1;
    text-align:center;
    background:
            radial-gradient(
                    circle at 50% 20%,
                    var(--coffee-2) 0%,
                    var(--coffee-1) 55%,
                    var(--coffee-3) 100%
            );
}

/* Responsive */
@media (max-width: 900px){
    .intro{grid-template-columns:1fr}
    .h1{font-size:28px; text-align: center; padding: 10px}
    .footer-inner{grid-template-columns:1fr}
    .btn-center{min-width:140px}
}

@media (max-width: 520px){
    .header-inner{flex-direction:column;align-items:stretch}
    .header-actions{justify-content:flex-end}
    .intro-actions,.media-actions{flex-direction:column}
    .btn-center{min-width:100%}
}

/* =========================
   FIX: layout for current HTML (.grid/.article/.sidebar)
   ========================= */

/* Hero (у тебя он есть в HTML, но в кофейных стилях не был описан) */
.hero{
    background: var(--page);
}
.hero-inner{
    padding: 16px 0 6px;
}

/* Content wrapper */
.content{
    padding: 0 0 22px;
    background: white;
}

/* Desktop grid: content + sidebar */
.grid{
    display:grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items:start;
    grid-template-areas: "article sidebar";
}
.article{
    grid-area: article;
    background: var(--content);
    padding: 18px;
}
.sidebar{
    grid-area: sidebar;
    position: sticky;
    top: 16px;
}

/* Sidebar cards */
.card{
    background: var(--content);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
}
.muted{
    color: var(--muted);
}

/* Sidebar lists */
.navlist{
    list-style:none;
    margin: 10px 0 0;
    padding:0;
}
.navlist li{margin:0}
.navlist a{
    display:block;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #fff;
}
.navlist a:hover{
    background:#f7f7f8;
}

/* Sidebar stack */
.stack{
    display:flex;
    flex-direction:column;
    gap:10px;
}

/* FAQ (в HTML есть, в кофейном css может отсутствовать/не совпадать) */
.faq{margin-top:10px}
.faq-item{
    border:1px solid var(--line);
    border-radius:8px;
    overflow:hidden;
    background:#fff;
    margin-bottom:10px;
}
.faq-item summary{
    cursor:pointer;
    list-style:none;
    padding:12px 12px;
    font-weight:900;
    background:#f8fafc;
}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item div{
    padding: 10px 12px 12px;
    color: var(--text);
}

/* Buttons aliases (в HTML остались btn-gold/btn-outline) */
.btn-gold{
    color:white;
    background: linear-gradient(180deg, var(--orange-1), var(--orange-2));
    border-color: transparent;
}
.btn-outline{
    color:#fff;
    background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
    border-color: transparent;
}

/* Quick links (у тебя внизу страницы) — на мобилке в горизонтальный скролл */
.quick-links{
    background: var(--page);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.quick-links-inner{
    display:flex;
    gap:10px;
    align-items:center;
    padding: 12px 0;
    flex-wrap:wrap;
}
.quick-links-title{
    font-weight:900;
    color: var(--muted);
}
.chip{
    display:inline-flex;
    align-items:center;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background:#fff;
}

/* =========================
   Mobile: sidebar becomes top block, full width
   ========================= */
@media (max-width: 900px){
    .grid{
        grid-template-columns: 1fr;
        grid-template-areas:
            "sidebar"
            "article";
    }
    .sidebar{
        position: static;
        top: auto;
    }
}

/* Mobile header buttons stay readable */
@media (max-width: 520px){
    .header-actions{
        width: 100%;
        justify-content: space-between;
    }
    .btn{
        flex: 1 1 auto;
        min-width: 0;
    }
    .quick-links-inner{
        flex-wrap: nowrap;
        overflow:auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }
    .quick-links-title{
        white-space: nowrap;
    }
    .chip{
        white-space: nowrap;
        flex: 0 0 auto;
    }
}

/* ===== Table: cleaner + premium ===== */
.table-wrap{
    border:1px solid var(--line);
    border-radius:12px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 10px 26px rgba(15,23,42,.06);
    margin:14px 0 18px;
}

/* horizontal scroll on small screens, but keep rounded frame */
.table-wrap{
    overflow:auto;
    -webkit-overflow-scrolling:touch;
}

.table{
    width:100%;
    min-width:720px; /* keep columns readable */
    border-collapse:separate;
    border-spacing:0;
    font-size:16px;
}

/* header */
.table thead th{
    position:sticky;
    top:0;
    z-index:2;
    text-align:left;
    font-weight:900;
    color:var(--text);
    background:linear-gradient(180deg, #fbfbfc, #f4f6f8);
    border-bottom:1px solid var(--line);
    padding:14px 16px;
    white-space:nowrap;
}

/* cells */
.table tbody td{
    padding:14px 16px;
    border-bottom:1px solid var(--line);
    vertical-align:middle;
    color:var(--text);
}

/* zebra */
.table tbody tr:nth-child(even) td{
    background:#fafbfc;
}

/* hover */
.table tbody tr:hover td{
    background:rgba(245,158,11,.08);
}

/* first column looks like "row title" */
.table tbody td:first-child{
    font-weight:900;
}

/* align numeric columns nicely */
.table th:nth-child(2),
.table th:nth-child(3),
.table th:nth-child(4),
.table td:nth-child(2),
.table td:nth-child(3),
.table td:nth-child(4){
    text-align:right;
}

/* make numbers cleaner */
.table td:nth-child(2),
.table td:nth-child(3),
.table td:nth-child(4){
    font-variant-numeric: tabular-nums;
}

/* small badges for % and x */
.table td:nth-child(2),
.table td:nth-child(4){
    font-weight:900;
}

/* remove last border */
.table tbody tr:last-child td{
    border-bottom:none;
}

/* mobile: reduce padding + allow min-width smaller */
@media (max-width: 520px){
    .table{
        min-width:640px;
        font-size:15px;
    }
    .table thead th,
    .table tbody td{
        padding:12px 12px;
    }
}


/* ===== Lists: clean + readable (ul/ol) ===== */
.article ul,
.article ol{
    margin: 0 0 14px;
    padding: 0 0 0 22px;
    color: var(--text);
}

.article ul li,
.article ol li{
    margin: 6px 0;
    line-height: 1.65;
}

/* UL: аккуратный круглый маркер + нормальный отступ */
.article ul{
    list-style: disc;
}
.article ul li::marker{
    color: #94a3b8; /* soft slate */
}

/* OL: нумерация чуть более “премиальная” */
.article ol{
    list-style: decimal;
}
.article ol li::marker{
    color: #64748b;
    font-weight: 900;
}

/* Nested lists: меньше отступов, чтобы не “расползалось” */
.article ul ul,
.article ol ol,
.article ul ol,
.article ol ul{
    margin-top: 8px;
    margin-bottom: 0;
    padding-left: 18px;
}

/* Optional: tighter spacing for lists right after paragraphs */
.article p + ul,
.article p + ol{
    margin-top: -6px;
    padding-left: 2.5em;
}

/* Mobile */
@media (max-width: 520px){
    .article ul,
    .article ol{
        padding-left: 18px;
    }
    .article ul li,
    .article ol li{
        margin: 5px 0;
    }
    .header-actions {
        display: none;
    }
    :root{
        --header-offset: 90px;
    }
}

/* ===== FAQ: only +/- indicator (keep existing background as-is) ===== */
.faq-item summary{
    position: relative;
    padding-right: 44px; /* место под +/− справа */
    cursor: pointer;
}

.faq-item summary::after{
    content: "+";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 900;
    line-height: 1;
    color: #1f1306;
    background: linear-gradient(180deg, var(--orange-1), var(--orange-2));
    box-shadow: 0 6px 14px rgba(0,0,0,.25);
}

.faq-item[open] summary::after{
    content: "−";
}

/* ===== Mobile menu (no JS) ===== */
.nav-mobile{
    display:none; /* показываем только на мобилке */
    position: relative;
}

.nav-mobile__toggle{
    list-style:none;
    cursor:pointer;
    width:44px;
    height:44px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,.16);
    background:rgba(255,255,255,.06);
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 6px 14px rgba(0,0,0,.18);
}

.nav-mobile__toggle::-webkit-details-marker{
    display:none;
}

/* "бургер" линиями */
.nav-mobile__toggle::before{
    content:"";
    width:18px;
    height:2px;
    background:#fff;
    box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
    border-radius:2px;
}

/* панель */
.nav-mobile__panel{
    position:absolute;
    right:0;
    top:52px;
    width:min(320px, calc(100vw - 32px));
    border-radius:12px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.14);
    background:
            radial-gradient(circle at 50% 10%, var(--coffee-2) 0%, var(--coffee-1) 60%, var(--coffee-3) 100%);
    box-shadow:0 18px 40px rgba(0,0,0,.35);
    padding:8px;
    z-index: 1200;
}

.nav-mobile__panel a{
    display:block;
    padding:10px 10px;
    border-radius:10px;
    color:#fff;
    font-weight:800;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.05);
    margin:8px 0;
}

.nav-mobile__panel a:hover{
    background:rgba(255,255,255,.10);
}

/* показываем бургер только на мобилке, кнопки можно оставить */
@media (max-width: 640px){
    .nav-mobile{
        display:block;
    }

    /* чтобы бургер не ломал ряд кнопок */
    .header-actions{
        gap:10px;
        flex-wrap:wrap;
        justify-content:flex-end;
    }
}
/* ===== Mobile header: hide actions, show burger (your structure) ===== */
.nav-mobile{
    display:none;          /* desktop hidden */
    margin-left:auto;      /* push to the right */
    position:relative;     /* anchor dropdown */
}

@media (max-width: 640px){
    .header-actions{
        display:none;      /* you wanted this */
    }

    .nav-mobile{
        display:block;     /* show burger */
    }

    .header-inner{
        justify-content:space-between;
        gap:12px;
    }
    .brand-logo {
        width: auto;
        height: 44px;
        margin: 0 10px;
    }

    .site-header {

        height: 60px;}
}

/* Toggle button */
.nav-mobile__toggle{
    list-style:none;
    cursor:pointer;
    width:44px;
    height:44px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,.16);
    background:rgba(255,255,255,.06);
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 6px 14px rgba(0,0,0,.18);
    margin-top: -54px;
    margin-right: 10px;
}

.nav-mobile__toggle::-webkit-details-marker{
    display:none;
}

/* Burger icon */
.nav-mobile__toggle::before{
    content:"";
    width:18px;
    height:2px;
    background:#fff;
    box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
    border-radius:2px;
}

/* Dropdown panel */
.nav-mobile__panel{
    position:absolute;
    right:0;
    top:0px;
    width:min(320px, calc(100vw - 32px));
    border-radius:12px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.14);
    background:
            radial-gradient(circle at 50% 10%, var(--coffee-2) 0%, var(--coffee-1) 60%, var(--coffee-3) 100%);
    box-shadow:0 18px 40px rgba(0,0,0,.35);
    padding:8px;
    z-index:1200;
}

.nav-mobile__panel a{
    display:block;
    padding:10px 10px;
    border-radius:10px;
    color:#fff;
    font-weight:800;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.05);
    margin:8px 0;
    font-size: 90%;
}

.nav-mobile__panel a:hover{
    background:rgba(255,255,255,.10);
}

footer .buttons {display: none}

/* ===== Mobile fixed bottom buttons ===== */
@media (max-width: 640px){
   footer .buttons{
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        display: flex;
        gap: 10px;
        justify-content: center;
        background: rgba(42, 28, 23, .92);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255,255,255,.12);
        padding: 10px 10px;
    }

    /* чтобы кнопки красиво влезали */
    footer .buttons .btn{
        flex: 1 1 0;
        max-width: 220px;
        min-width: 0;
        font-size: 120%;
    }

    /* чтобы контент не перекрывался фикс. кнопками */
    body{
        padding-bottom: 84px;
    }
}
.reviews {
    margin-top: 16px;
}

.reviews__title {
    margin: 18px 0 12px;
    font-weight: 800;
}

.review {
    position: relative;
    padding: 16px 16px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    margin-bottom: 12px;
    overflow: hidden;
}

.review::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(600px 220px at 18% 0%, rgba(255, 215, 0, 0.12), transparent 60%);
}

.review__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.review__meta {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    opacity: 0.95;
}

.review__meta strong {
    font-weight: 900;
    letter-spacing: 0.2px;
}

.review__meta time {
    opacity: 0.9;
    white-space: nowrap;
}

.review__body p {
    margin: 0;
    line-height: 1.55;
}

.review:hover {
    transform: translateY(-1px);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    border-color: rgba(255, 215, 0, 0.22);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

@media (max-width: 640px) {
    .review {
        padding: 14px 14px 12px;
        border-radius: 14px;
    }

    .review__meta time {
        white-space: normal;
    }
}
