html {
    scroll-behavior: smooth;
}

body.kata-help-body {
    margin: 0;
    background: #05070b;
    color: #f8fafc;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

.legacy-help-shell {
    display: none !important;
}

.kata-help-page,
.kata-help-page * {
    box-sizing: border-box;
}

.kata-help-page {
    min-height: 100vh;
    background: #05070b;
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.5;
}

.kata-help-page a {
    color: inherit;
    text-decoration: none;
}

.kata-help-page button,
.kata-help-page input {
    font: inherit;
}

.kata-help-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.kata-help-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 7, 11, 0.96);
    border-bottom: 1px solid #1f2937;
    backdrop-filter: blur(14px);
}

.kata-help-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.kata-help-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 176px;
}

.kata-help-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    background: #0078d4;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.kata-help-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.kata-help-brand-name {
    color: #f8fafc;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.kata-help-brand-sub {
    color: #94a3b8;
    font-size: 10px;
    line-height: 1.2;
    text-transform: uppercase;
}

.kata-help-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 700;
}

.kata-help-menu a {
    transition: color 0.15s ease;
}

.kata-help-menu a:hover,
.kata-help-menu .is-active {
    color: #38bdf8;
}

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

.kata-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #334155;
    background: #0b1220;
    color: #f8fafc !important;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.kata-help-btn:hover {
    border-color: #38bdf8;
    color: #38bdf8 !important;
}

.kata-help-btn-primary {
    border-color: #f97316;
    background: #f97316;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.24);
}

.kata-help-btn-primary:hover {
    border-color: #fb923c;
    background: #fb923c;
    color: #fff !important;
}

.kata-help-hero {
    padding: 42px 0 28px;
    background: #081321;
    border-bottom: 1px solid #243044;
}

.kata-help-eyebrow {
    margin: 0 0 8px;
    color: #38bdf8;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.kata-help-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #f8fafc;
    font-size: 42px;
    font-weight: 900;
    line-height: 1.08;
}

.kata-help-lead {
    margin: 12px 0 0;
    color: #cbd5e1;
    font-size: 17px;
}

.kata-help-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    margin-top: 24px;
    gap: 12px;
}

.kata-help-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    border: 1px solid #466078;
    background: #07111f;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kata-help-search:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.kata-help-search-icon {
    position: relative;
    width: 18px;
    height: 18px;
    margin-left: 20px;
    flex: 0 0 18px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
}

.kata-help-search-icon::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -4px;
    width: 8px;
    height: 2px;
    background: #e2e8f0;
    transform: rotate(45deg);
    transform-origin: left center;
}

.kata-help-search input {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 18px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f8fafc;
    font-size: 17px;
}

.kata-help-search input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.kata-help-search-status {
    flex: 0 0 auto;
    padding-right: 16px;
    color: #94a3b8;
    font-size: 13px;
    white-space: nowrap;
}

.kata-help-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 214px;
    min-height: 58px;
    padding: 0 20px;
    border: 1px solid #38bdf8;
    background: rgba(14, 165, 233, 0.1);
    color: #7dd3fc !important;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kata-help-pdf-btn span {
    margin-right: 9px;
    color: #f8fafc;
    font-size: 20px;
    line-height: 1;
}

.kata-help-pdf-btn:hover {
    border-color: #7dd3fc;
    background: rgba(14, 165, 233, 0.2);
    color: #fff !important;
}

.kata-help-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 12px;
}

.kata-help-quick-links a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 22px;
    border-right: 1px solid #334155;
    color: #38bdf8;
    font-size: 14px;
    font-weight: 800;
}

.kata-help-quick-links a:first-child {
    padding-left: 0;
}

.kata-help-quick-links a:last-child {
    border-right: 0;
}

.kata-help-quick-links a::before {
    content: "\2192";
    margin-right: 8px;
    color: #f8fafc;
}

.kata-help-quick-links a:hover {
    color: #7dd3fc;
}

.kata-help-content {
    min-height: 520px;
    padding: 38px 0 48px;
    background: #05070b;
}

.kata-help-workspace {
    display: grid;
    grid-template-columns: minmax(310px, 0.74fr) minmax(0, 1.46fr);
    align-items: start;
    border: 1px solid #2a3b4f;
    background: #07111f;
}

.kata-help-tree-panel {
    position: sticky;
    top: 92px;
    min-width: 0;
    max-height: calc(100vh - 116px);
    border-right: 1px solid #2a3b4f;
    background: #081321;
    overflow: hidden;
}

.kata-help-articles {
    min-width: 0;
    background: #07111f;
}

.kata-help-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid #2a3b4f;
    background: #0a1625;
    gap: 14px;
}

.kata-help-panel-head h2 {
    min-width: 0;
    margin: 0;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
    text-transform: uppercase;
}

.kata-help-article-head h2 {
    overflow-wrap: anywhere;
}

.kata-help-tree-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kata-help-tree-actions button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #38bdf8;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.kata-help-tree-actions button:hover {
    color: #7dd3fc;
}

.kata-help-tree-body {
    max-height: calc(100vh - 174px);
    padding: 10px 0 14px;
    overflow: auto;
    scrollbar-color: #334155 #081321;
    scrollbar-width: thin;
}

table.kata-help-tree,
.kata-help-tree table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.kata-help-tree td {
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    vertical-align: middle !important;
}

.kata-help-tree tr {
    display: flex;
    align-items: center;
    width: 100%;
}

.kata-help-tree td:last-child {
    min-width: 0;
    flex: 1 1 auto;
    white-space: normal !important;
}

.kata-help-tree a:not([href^="javascript:"]) {
    display: inline-block;
    max-width: 100%;
    padding: 10px 10px 10px 4px;
    color: #dbe8f5 !important;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1.35 !important;
    text-decoration: none !important;
    overflow-wrap: anywhere;
    transition: color 0.15s ease;
}

.kata-help-tree a:not([href^="javascript:"]):hover,
.kata-help-tree a.kata-help-tree-match {
    color: #38bdf8 !important;
}

.kata-help-tree a[href^="javascript:"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 38px;
}

.kata-help-tree a[href^="javascript:"] img {
    display: none !important;
}

.kata-help-tree a[href^="javascript:"]::before {
    content: "+";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border: 1px solid #64748b;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.kata-help-tree a[href^="javascript:"].is-expanded::before {
    content: "\2212";
    border-color: #38bdf8;
    color: #38bdf8;
}

.kata-help-tree img:not([alt^="Expand"]):not([alt^="Collapse"]) {
    opacity: 0.45;
}

.kata-help-tree div[id$="Nodes"] {
    border-left: 1px solid #334155;
    margin-left: 17px;
}

.kata-help-tree-root,
.kata-help-tree-parent {
    color: #f8fafc !important;
    font-weight: 800 !important;
}

.kata-help-tree-node {
    color: #cbd5e1 !important;
}

.kata-help-tree-mobile-toggle {
    display: none;
}

.kata-help-article-count {
    color: #94a3b8;
    font-size: 13px;
    white-space: nowrap;
}

.kata-help-article-body {
    min-height: 410px;
}

.kata-help-list > table,
.kata-help-list > table > tbody {
    display: block;
    width: 100% !important;
}

.kata-help-list > table > tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kata-help-list tr {
    display: block;
    min-width: 0;
    border-right: 1px solid #26384b;
    border-bottom: 1px solid #26384b;
}

.kata-help-list tr:nth-child(2n) {
    border-right: 0;
}

.kata-help-list td {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    height: 100% !important;
    padding: 0 42px 0 50px !important;
    text-align: left !important;
}

.kata-help-list td::before {
    content: "\25B7";
    position: absolute;
    left: 18px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border: 1px solid #0ea5e9;
    color: #38bdf8;
    font-size: 11px;
    transform: translateY(-50%);
}

.kata-help-list td::after {
    content: "\2192";
    position: absolute;
    right: 17px;
    top: 50%;
    color: #dbe8f5;
    font-size: 18px;
    transform: translateY(-50%);
}

.kata-help-list td:hover {
    background: #0b1b2d;
}

.kata-help-list img {
    display: none !important;
}

.kata-help-list a,
.kata-help-list a:link,
.kata-help-list a:visited {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 57px;
    color: #e5eef8 !important;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.35 !important;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

.kata-help-list a:hover {
    color: #38bdf8 !important;
}

.kata-help-detail {
    padding: 26px 30px 38px;
    color: #dbe8f5;
    font-size: 15px;
    line-height: 1.7;
}

.kata-help-detail:empty {
    display: none;
}

.kata-help-detail h1,
.kata-help-detail h2,
.kata-help-detail h3,
.kata-help-detail h4 {
    color: #f8fafc;
    line-height: 1.3;
}

.kata-help-detail a {
    color: #38bdf8 !important;
}

.kata-help-detail img {
    max-width: 100% !important;
    height: auto !important;
}

.kata-help-detail iframe,
.kata-help-detail .overvideo {
    display: block;
    width: min(100%, 800px) !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 24px auto;
}

.kata-help-detail table {
    max-width: 100% !important;
}

.kata-help-empty {
    padding: 48px 24px;
    color: #94a3b8;
    text-align: center;
}

.kata-help-footer {
    padding: 30px 0;
    border-top: 1px solid #1f2937;
    background: #05070b;
    color: #94a3b8;
    font-size: 13px;
}

.kata-help-footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.kata-help-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 24px;
    color: #f8fafc;
    font-weight: 700;
}

.kata-help-footer-links a:hover {
    color: #38bdf8;
}

body.kata-help-body #popup {
    position: fixed;
    right: 10px;
    bottom: 18px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

body.kata-help-body #popup > div {
    position: static !important;
    display: block !important;
    pointer-events: auto;
}

body.kata-help-body #popup img {
    display: block;
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
    background: #0b1220;
    border: 1px solid #243044 !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

@media (max-width: 1020px) {
    .kata-help-menu {
        display: none;
    }

    .kata-help-workspace {
        grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
    }

    .kata-help-list > table > tbody {
        grid-template-columns: 1fr;
    }

    .kata-help-list tr,
    .kata-help-list tr:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .kata-help-shell {
        width: min(100% - 28px, 1180px);
    }

    .kata-help-nav {
        min-height: 64px;
    }

    .kata-help-brand-sub {
        display: none;
    }

    .kata-help-actions .kata-help-btn:first-child {
        display: none;
    }

    .kata-help-btn {
        min-height: 40px;
        padding: 0 14px;
    }

    .kata-help-hero {
        padding: 32px 0 24px;
    }

    .kata-help-hero h1 {
        font-size: 32px;
    }

    .kata-help-lead,
    .kata-help-search input {
        font-size: 15px;
    }

    .kata-help-search-status {
        display: none;
    }

    .kata-help-search-row {
        grid-template-columns: 1fr;
    }

    .kata-help-pdf-btn {
        width: 100%;
    }

    .kata-help-content {
        padding: 24px 0 38px;
    }

    .kata-help-tree-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        margin-bottom: 10px;
        padding: 0 16px;
        border: 1px solid #2a3b4f;
        background: #0a1625;
        color: #f8fafc;
        font-weight: 800;
        text-align: left;
        cursor: pointer;
    }

    .kata-help-workspace {
        grid-template-columns: 1fr;
        border: 0;
        background: transparent;
        gap: 12px;
    }

    .kata-help-tree-panel {
        position: static;
        display: none;
        max-height: none;
        border: 1px solid #2a3b4f;
    }

    .kata-help-tree-panel.is-open {
        display: block;
    }

    .kata-help-tree-body {
        max-height: 420px;
    }

    .kata-help-articles {
        border: 1px solid #2a3b4f;
    }

    .kata-help-footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .kata-help-footer-links {
        justify-content: flex-start;
        gap: 16px 22px;
    }

    body.kata-help-body #popup {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .kata-help-brand {
        min-width: 0;
    }

    .kata-help-brand-mark {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .kata-help-brand-name {
        font-size: 21px;
    }

    .kata-help-hero h1 {
        font-size: 29px;
    }

    .kata-help-quick-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .kata-help-quick-links a,
    .kata-help-quick-links a:first-child {
        min-height: 38px;
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid #26384b;
    }

    .kata-help-quick-links a:last-child {
        border-bottom: 0;
    }

    .kata-help-panel-head {
        align-items: flex-start;
        min-height: 0;
        padding: 14px;
        flex-direction: column;
    }

    .kata-help-tree-actions {
        width: 100%;
        justify-content: space-between;
    }

    .kata-help-article-head {
        flex-direction: row;
        align-items: center;
    }

    .kata-help-list td {
        min-height: 64px;
        padding-left: 46px !important;
    }

    .kata-help-list a,
    .kata-help-list a:link,
    .kata-help-list a:visited {
        min-height: 63px;
    }

    .kata-help-detail {
        padding: 20px 16px 30px;
    }
}
