/* =========================================================
   COMMANDS PAGE
   ========================================================= */

.commands {
    width: min(1000px, calc(100% - 48px));
    margin: 0 auto;
    padding: 70px 0 110px;
}


/* =========================================================
   HEADER
   ========================================================= */

.commands__header {
    padding-bottom: 50px;
    border-bottom: 2px solid #111111;
}

.commands__eyebrow {
    margin-bottom: 14px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #315cff;
}

.commands__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.commands__title {
    max-width: 700px;
    margin: 0;
    font-size: clamp(38px, 5.5vw, 64px);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.06em;
    color: #111111;
}

.commands__description {
    max-width: 560px;
    margin: 22px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
}

.commands__updated {
    flex-shrink: 0;
    padding-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #999999;
}


/* =========================================================
   TABS
   ========================================================= */

.commands__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 30px;
    border-bottom: 2px solid #111111;
}

.commands__tab {
    padding: 14px 20px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777777;
    cursor: pointer;
    position: relative;
    transition: color 0.15s ease, background 0.15s ease;
}

.commands__tab:hover {
    background: #eeeeeb;
    color: #111111;
}

.commands__tab.is-active {
    color: #ffffff;
    background: #111111;
}

.commands__tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: #315cff;
}


/* =========================================================
   PANELS
   ========================================================= */

.commands__panel {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.commands__panel[hidden] {
    display: none;
}


/* =========================================================
   GROUPS (collapsible)
   ========================================================= */

.commands__group {
    border: 2px solid #111111;
    background: #ffffff;
}

.commands__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 22px;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.commands__group-toggle:hover {
    background: #f5f4f0;
}

.commands__group-title {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #111111;
}

.commands__group-icon {
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    color: #315cff;
    transition: transform 0.2s ease;
}

.commands__group-toggle.is-open .commands__group-icon {
    transform: rotate(45deg);
}

.commands__group-body {
    display: none;
    padding: 0 22px 22px;
    border-top: 1px solid #d4d3cf;
}

.commands__group-toggle.is-open + .commands__group-body {
    display: block;
}


/* =========================================================
   TABLE
   ========================================================= */

.commands__table {
    width: 100%;
    margin-top: 18px;
    border-collapse: collapse;
    font-size: 13px;
}

.commands__table thead th {
    padding: 10px 14px;
    border-bottom: 2px solid #111111;
    text-align: left;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #777777;
    background: #f5f4f0;
}

.commands__table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #d4d3cf;
    vertical-align: top;
    line-height: 1.5;
    color: #333333;
}

.commands__table tbody tr:last-child td {
    border-bottom: 0;
}

.commands__table tbody tr:hover {
    background: #f9f9f7;
}


/* =========================================================
   CODE
   ========================================================= */

code {
    display: inline-block;
    padding: 3px 8px;
    background: #111111;
    color: #ffffff;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 0;
    white-space: nowrap;
}

.commands__code {
    margin: 14px 0;
    padding: 16px;
    background: #111111;
    border-left: 4px solid #315cff;
    overflow-x: auto;
}

.commands__code pre {
    margin: 0;
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #ffffff;
    white-space: pre;
}


/* =========================================================
   STEPS
   ========================================================= */

.commands__steps {
    margin: 18px 0 0;
    padding: 0 0 0 24px;
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
}

.commands__steps > li {
    margin-bottom: 10px;
}

.commands__steps ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.commands__steps ul li {
    margin-bottom: 4px;
}


/* =========================================================
   NOTE / EXAMPLE
   ========================================================= */

.commands__note {
    margin: 16px 0 0;
    padding: 12px 16px;
    background: #fff4d6;
    border-left: 4px solid #d4a017;
    font-size: 13px;
    line-height: 1.5;
    color: #6b4d00;
}

.commands__example {
    margin-top: 20px;
    padding: 16px;
    background: #f5f4f0;
    border: 1px solid #d4d3cf;
}

.commands__example-label {
    margin-bottom: 10px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #777777;
}

.commands__example-note {
    margin: 12px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #666666;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {
    .commands {
        padding: 50px 0 80px;
    }

    .commands__heading {
        display: block;
    }

    .commands__updated {
        margin-top: 16px;
    }

    .commands__tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .commands__tabs::-webkit-scrollbar {
        display: none;
    }

    .commands__tab {
        flex-shrink: 0;
        padding: 12px 16px;
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .commands {
        width: calc(100% - 28px);
    }

    .commands__title {
        font-size: 34px;
    }

    .commands__description {
        font-size: 13px;
    }

    .commands__group-toggle {
        padding: 14px 16px;
    }

    .commands__group-body {
        padding: 0 16px 18px;
    }

    .commands__table {
        font-size: 12px;
    }

    .commands__table thead th {
        font-size: 9px;
        padding: 8px 10px;
    }

    .commands__table tbody td {
        padding: 10px;
    }

    code {
        font-size: 11px;
        padding: 2px 6px;
        white-space: normal;
        word-break: break-word;
    }

    .commands__code {
        padding: 12px;
    }

    .commands__code pre {
        font-size: 11px;
    }
}

@media (max-width: 420px) {
    .commands {
        width: calc(100% - 24px);
    }

    .commands__title {
        font-size: 30px;
    }
}