/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --bg: #121518;
    --sidebar: #161A1E;
    --surface: #1B2025;
    --surface-2: #222930;
    --surface-3: #2A323A;
    --border: rgba(255, 255, 255, .07);
    --border-strong: rgba(255, 255, 255, .14);

    --brand: #FF4500;
    --brand-hover: #FF5A1F;
    --brand-soft: rgba(255, 69, 0, .14);
    --success: #00C853;
    --success-hover: #19D466;
    --on-success: #06140C;

    --text: #E2E8F0;
    --text-strong: #FFFFFF;
    --muted: #94A3B8;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-pill: 20px;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 24px rgba(0, 0, 0, .35);

    --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: "Open Sans", Inter, system-ui, sans-serif;

    --sidebar-w: 260px;
    --bar-h: 64px;
    --tabs-h: 0px;
    --header-h: calc(var(--bar-h) + var(--tabs-h));
    --gutter: 24px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

@media (max-width: 1023px) {
    :root {
        --tabs-h: 52px;
        --gutter: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --bar-h: 56px;
        --gutter: 12px;
    }
}

/* ==========================================================================
   Fonts (only files that actually exist in /fonts)
   ========================================================================== */
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/Inter-Regular.woff2) format("woff2");
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url(../fonts/Inter-Medium.woff2) format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(../fonts/OpenSans-Regular.woff2) format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url(../fonts/OpenSans-Bold.woff2) format("woff2");
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

body {
    margin: 0;
    min-width: 320px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.is-locked {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-strong);
}

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

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

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

::selection {
    background: var(--brand);
    color: #fff;
}

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

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Images whose src is still empty (template placeholders) are not rendered,
   so broken-image icons and empty boxes never break the layout. */
img[src=""],
picture:has(img[src=""]),
.photo:has(img[src=""]) {
    display: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn,
.new-btn,
.header__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.btn:active,
.new-btn:active,
.header__btn:active {
    transform: translateY(1px);
}

/* primary / target action */
.btn,
.header__btn-first {
    background: var(--success);
    color: var(--on-success);
    box-shadow: 0 6px 18px rgba(0, 200, 83, .25);
}

.btn:hover,
.header__btn-first:hover {
    background: var(--success-hover);
}

/* secondary accent */
.new-btn {
    background: var(--brand);
    color: #fff;
}

.new-btn:hover {
    background: var(--brand-hover);
}

.btn--block {
    width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
}

.header__background {
    position: relative;
    background: var(--brand);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.header__container {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--bar-h);
    padding: 0 var(--gutter);
}

.header__logo {
    display: flex;
    align-items: center;
    min-height: 44px;
    flex-shrink: 0;
}

.header__logo img {
    width: 138px;
}

.header__nav {
    display: none;
    min-width: 0;
}

.header__menu {
    display: flex;
    gap: 2px;
}

.header__link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #fff;
    white-space: nowrap;
    transition: background-color .2s var(--ease);
}

.header__link:hover,
.header__link.is-active {
    background: rgba(0, 0, 0, .18);
}

/* search */
.search {
    position: relative;
    display: flex;
    align-items: center;
    width: 260px;
    margin-left: auto;
}

.search__input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 18px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, .22);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: background-color .2s var(--ease), border-color .2s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.search__input::placeholder {
    color: rgba(255, 255, 255, .8);
}

.search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.search__input:focus {
    background: rgba(0, 0, 0, .35);
    border-color: #fff;
}

.search__btn {
    position: absolute;
    right: 0;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: #fff;
    transform: translateY(-50%);
}

.search.is-empty .search__input {
    border-color: #fff;
    animation: shake .3s;
}

@keyframes shake {
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.header__icon-btn,
.burger {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: #fff;
    transition: background-color .2s var(--ease);
}

.header__icon-btn:hover,
.burger:hover {
    background: rgba(0, 0, 0, .15);
}

.header__icon-btn .icon {
    width: 22px;
    height: 22px;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header__btn {
    font-size: 13px;
    padding: 0 18px;
}

.header__btn-last {
    background: rgba(0, 0, 0, .22);
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
}

.header__btn-last:hover {
    background: rgba(0, 0, 0, .35);
}

/* burger icon */
.burger__line,
.burger__line::before,
.burger__line::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .3s var(--ease), background-color .3s var(--ease);
}

.burger__line {
    position: relative;
}

.burger__line::before,
.burger__line::after {
    content: "";
    position: absolute;
    left: 0;
}

.burger__line::before {
    top: -7px;
}

.burger__line::after {
    top: 7px;
}

.burger[aria-expanded="true"] .burger__line {
    background: transparent;
}

.burger[aria-expanded="true"] .burger__line::before {
    transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__line::after {
    transform: translateY(-7px) rotate(-45deg);
}

/* horizontal category tabs (tablet & mobile) */
.header__mobile-menu {
    display: none;
    background: var(--sidebar);
    border-bottom: 1px solid var(--border);
}

.header__menu-link {
    display: flex;
    gap: 8px;
    height: var(--tabs-h);
    align-items: center;
    padding: 0 var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding: 0 var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.header__menu-link::-webkit-scrollbar {
    display: none;
}

.header__menu-link li {
    flex-shrink: 0;
    scroll-snap-align: start;
}

.header__tab {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-strong);
    border-radius: 22px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--text);
    white-space: nowrap;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.header__tab:hover {
    border-color: var(--brand);
}

.header__tab.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* ==========================================================================
   Layout: sidebar + content
   ========================================================================== */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    align-items: start;
    /* sidebar column colour continues below the sticky sidebar */
    background: linear-gradient(to right, var(--sidebar) calc(var(--sidebar-w) - 1px), var(--border) 0, var(--border) var(--sidebar-w), transparent 0);
}

.sidebar {
    position: sticky;
    top: var(--header-h);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 16px 12px 24px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-3) transparent;
}

.sidebar__head,
.sidebar__actions {
    display: none;
}

.sidebar__caption {
    margin: 16px 12px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.sidebar__caption:first-child {
    margin-top: 4px;
}

.sidebar__list {
    display: grid;
    gap: 2px;
}

.sidebar__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: background-color .2s var(--ease), color .2s var(--ease);
}

.sidebar__link .icon {
    color: var(--brand);
}

.sidebar__link:hover {
    background: rgba(255, 255, 255, .04);
    color: var(--text-strong);
}

.sidebar__link.is-active {
    background: var(--brand-soft);
    color: var(--brand);
}

.sidebar__link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand);
}

.sidebar__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .05);
    color: var(--text);
}

.sidebar__close:hover {
    background: rgba(255, 255, 255, .1);
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(5, 7, 9, .65);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.content {
    min-width: 0;
    padding: var(--gutter);
}

main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* every article section is a card on the dark background */
main > section:not(.hero) {
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* readable line length for running text */
.container > p,
.container > ol,
.container > ul:not(.card-grid),
.split > div > p,
.split > p,
.split > div > ol,
.split > div > ul:not(.card-grid) {
    max-width: 80ch;
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */
.title {
    font-size: clamp(22px, 1.2vw + 14px, 30px);
    letter-spacing: -.01em;
}

.title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 12px;
    border-radius: 3px;
    background: var(--brand);
}

.subtitle,
.system__subtitle {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-strong);
}

.install__subtext {
    font-weight: 700;
    color: var(--brand);
    letter-spacing: .06em;
}

.download__subtext,
.version__text,
.enclosure__text {
    color: var(--text-strong);
    font-weight: 500;
}

.download__title {
    margin-top: 16px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 6vw, 96px) clamp(20px, 4vw, 56px);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        linear-gradient(100deg, rgba(18, 21, 24, .94) 0%, rgba(18, 21, 24, .7) 55%, rgba(255, 69, 0, .25) 100%),
        url(../img/banner-betano.webp) center / cover no-repeat,
        var(--surface);
}

.hero .container {
    gap: 28px;
}

.hero__title {
    max-width: 16ch;
    font-size: clamp(30px, 3.6vw + 12px, 60px);
    line-height: 1.05;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.hero__div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__div .btn,
.hero__div .new-btn {
    min-height: 52px;
    padding: 0 32px;
    font-size: 16px;
}

/* ==========================================================================
   Lists
   ========================================================================== */
.num-div {
    display: grid;
    gap: 12px;
    counter-reset: step;
}

.number {
    position: relative;
    counter-increment: step;
    padding: 14px 16px 14px 60px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.number::before {
    content: counter(step);
    position: absolute;
    left: 14px;
    top: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
}

.point-div {
    display: grid;
    gap: 10px;
}

.point {
    position: relative;
    padding-left: 22px;
}

.point::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
}

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.card {
    padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.card:hover {
    border-color: rgba(255, 69, 0, .45);
}

.card__title {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--text-strong);
}

.card .subtitle {
    margin-bottom: 8px;
}

/* compact content cards: 1 → 2 → 3 → 4 → 5 → 6 columns */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 399px) {
    .card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 769px) {
    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 1536px) {
    .card-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* text-heavy cards need wider columns to stay readable */
.card-grid--text {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 600px) {
    .card-grid--text {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .card-grid--text {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.sport {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 12px 14px;
    font-weight: 500;
    color: var(--text-strong);
}

.sport::before {
    content: "";
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: 3px;
    background: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .03);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.casino__cube {
    gap: 8px;
}

@media (min-width: 1024px) {
    .customer__list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.customer__item {
    display: flex;
    align-items: center;
    min-height: 56px;
    font-weight: 500;
    color: var(--text-strong);
}

.customer__item::first-letter {
    text-transform: uppercase;
}

.system__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin: 4px 0;
}

.system__grid .system__subtitle {
    margin-bottom: 10px;
    font-size: 16px;
}

.install__div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 14px 16px;
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--brand-soft);
}

/* ==========================================================================
   Two-column blocks (text + phone screenshot)
   ========================================================================== */
.split {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.split > div,
.split > p {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.split > div > .btn,
.split > div > .new-btn,
.container > .btn,
.container > .new-btn {
    align-self: flex-start;
}

.split > picture {
    flex: 0 0 300px;
}

.split > picture img,
.photo img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.photo {
    display: flex;
    justify-content: center;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.table table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 15px;
}

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

.table thead th {
    background: var(--surface-3);
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-strong);
}

.table tbody th {
    font-weight: 500;
    color: var(--text-strong);
}

.table tbody td {
    color: var(--text);
}

.table tbody tr:last-child > * {
    border-bottom: 0;
}

.table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, .02);
}

.table tbody tr:hover {
    background: var(--brand-soft);
}

/* ==========================================================================
   FAQ accordion (native <details>)
   ========================================================================== */
.faq {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition: border-color .2s var(--ease);
}

.faq[open] {
    border-color: rgba(255, 69, 0, .45);
}

.faq__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
}

.faq__summary::-webkit-details-marker {
    display: none;
}

.faq__summary::after {
    content: "";
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-right: 4px;
    border-right: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: translateY(-3px) rotate(45deg);
    transition: transform .25s var(--ease);
}

.faq[open] .faq__summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.questions__accordion {
    font-size: 16px;
    font-weight: 700;
}

.questions__text {
    padding: 0 16px 16px;
    color: var(--text);
}

.questions .container {
    gap: 10px;
}

.questions__title {
    margin-bottom: 6px;
}

/* ==========================================================================
   Comments form
   ========================================================================== */
.comments__form {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.comments__div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.comments__input,
.comments__textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, .04);
    color: var(--text-strong);
    font-size: 15px;
    outline: none;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.comments__textarea {
    min-height: 140px;
    resize: vertical;
}

.comments__input::placeholder,
.comments__textarea::placeholder {
    color: var(--muted);
}

.comments__input:focus,
.comments__textarea:focus {
    border-color: var(--brand);
    background: rgba(255, 255, 255, .06);
}

.comments__btn {
    justify-self: start;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    max-width: 1400px;
    margin: 16px auto 0;
    padding: 32px;
    background: var(--sidebar);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
}

.footer__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.footer__subtitle {
    margin-bottom: 14px;
    font-size: 15px;
    letter-spacing: .02em;
}

.footer__div {
    display: grid;
    gap: 0;
}

.footer__link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    transition: color .2s var(--ease);
}

.footer__link:hover {
    color: var(--brand);
}

.footer__subtext {
    margin-bottom: 14px;
}

.footer__icons,
.footer__flex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer__icon,
.footer__app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: border-color .2s var(--ease);
}

.footer__icon:hover,
.footer__app:hover {
    border-color: var(--brand);
}

/* text fallback while payment/app logos are not uploaded yet */
.footer__icon:has(img[src=""])::after,
.footer__app:has(img[src=""])::after {
    content: attr(aria-label);
}

.footer__copyright {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

/* ==========================================================================
   Search highlight
   ========================================================================== */
.is-found {
    border-radius: 4px;
    animation: found 2.4s var(--ease);
}

@keyframes found {
    0%, 60% {
        background: rgba(255, 69, 0, .28);
        box-shadow: 0 0 0 6px rgba(255, 69, 0, .28);
    }
    100% {
        background: transparent;
        box-shadow: 0 0 0 6px transparent;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 1280px) {
    .header__nav {
        display: block;
    }

    .search {
        width: 220px;
    }
}

@media (min-width: 1440px) {
    .search {
        width: 280px;
    }
}

@media (max-width: 1279px) {
    .footer__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- < 1024: sidebar becomes an off-canvas drawer ---------- */
@media (max-width: 1023px) {
    .burger {
        display: grid;
        margin-left: -8px;
    }

    .header__mobile-menu {
        display: block;
    }

    .layout {
        display: block;
        background: none;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 100;
        width: min(320px, 86vw);
        height: 100%;
        padding: 0 12px 24px;
        border-right: 1px solid var(--border-strong);
        box-shadow: 12px 0 32px rgba(0, 0, 0, .45);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .3s var(--ease), visibility .3s;
    }

    .sidebar__head {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: var(--bar-h);
        margin: 0 -12px 8px;
        padding: 0 12px 0 16px;
        background: var(--brand);
    }

    .sidebar__actions {
        display: grid;
        gap: 10px;
        margin-top: auto;
        padding-top: 24px;
    }

    body.nav-open .sidebar {
        transform: none;
        visibility: visible;
    }

    body.nav-open .overlay {
        opacity: 1;
        visibility: visible;
    }

    main > section:not(.hero),
    .footer {
        padding: 24px;
    }
}

/* ---------- ≤ 768: compact header ---------- */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .header__container {
        gap: 8px;
    }

    .header__logo {
        margin-right: auto;
    }

    .header__logo img {
        width: 116px;
    }

    .header__icon-btn {
        display: grid;
    }

    .header__btn-last {
        display: none;
    }

    .header__btn-first {
        min-height: 44px;
        padding: 0 14px;
    }

    .search {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        width: auto;
        margin: 0;
        padding: 8px var(--gutter) 10px;
        background: var(--brand);
        box-shadow: 0 8px 16px rgba(0, 0, 0, .25);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
    }

    .header.is-search-open .search {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .search__input {
        height: 44px;
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .search__btn {
        right: var(--gutter);
    }

    main {
        gap: 12px;
    }

    main > section:not(.hero),
    .footer {
        padding: 20px 16px;
    }

    .container {
        gap: 14px;
    }

    .split {
        flex-direction: column;
        gap: 20px;
    }

    .split > picture {
        flex: none;
        align-self: center;
        width: min(300px, 100%);
    }

    .hero__div .btn,
    .hero__div .new-btn {
        flex: 1 1 180px;
    }

    .number {
        padding: 12px 14px 12px 54px;
    }

    .number::before {
        left: 12px;
        top: 10px;
    }

    .table table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 12px 14px;
    }

    .comments__div {
        grid-template-columns: minmax(0, 1fr);
    }

    .comments__input {
        font-size: 16px;
    }

    .comments__textarea {
        font-size: 16px;
        border-radius: var(--radius);
    }

    .comments__btn {
        justify-self: stretch;
    }

    .customer__btn,
    .split > div > .btn,
    .split > div > .new-btn,
    .container > .btn,
    .container > .new-btn {
        align-self: stretch;
    }

    .footer__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .footer__link {
        min-height: 44px;
    }

    .footer__div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
    }
}

@media (max-width: 399px) {
    .header__container {
        gap: 4px;
        padding: 0 8px;
    }

    .header__logo img {
        width: 96px;
    }

    .header__btn-first {
        padding: 0 12px;
        font-size: 12px;
    }

    .footer__div {
        grid-template-columns: minmax(0, 1fr);
    }
}