:root {
    --help-ink: #101817;
    --help-muted: #63716c;
    --help-soft: #f5f8f5;
    --help-card: #ffffff;
    --help-line: rgba(15, 23, 42, .10);
    --help-green: #11684d;
    --help-green-dark: #0d2f28;
    --help-gold: #d7a43d;
    --help-red: #a94939;
    --help-blue: #315f8f;
    --help-radius: 4px;
    --help-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

html {
    scroll-behavior: smooth;
}

.help-app {
    width: min(100% - 36px, 1180px);
    margin: 0 auto;
    padding: 18px 0 42px;
    color: var(--help-ink);
}

.help-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: var(--help-radius);
    padding: 24px;
    color: #fffdf6;
    background:
        radial-gradient(circle at 86% -20%, rgba(215, 164, 61, .38), transparent 30%),
        linear-gradient(135deg, #0d2f28 0%, #134d3c 54%, #10362e 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: var(--help-radius);
    padding: 0 9px;
    color: rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .08);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.help-hero h2 {
    max-width: 720px;
    margin: 0;
    font-size: 38px;
    line-height: 1.12;
    letter-spacing: -.04em;
}

.help-hero p {
    max-width: 740px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 14px;
    line-height: 1.75;
}

.hero-summary {
    display: grid;
    align-content: end;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--help-radius);
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06));
}

.hero-summary strong {
    font-size: 13px;
    color: #f6d78d;
}

.hero-summary span {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.toc {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    gap: 7px;
    overflow-x: auto;
    margin: 14px 0;
    padding: 7px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--help-radius);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    backdrop-filter: blur(12px);
    scrollbar-width: none;
}

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

.toc a {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(17, 104, 77, .10);
    border-radius: var(--help-radius);
    padding: 0 12px;
    color: var(--help-green);
    background: rgba(17, 104, 77, .06);
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.toc a:hover {
    color: #fff;
    background: var(--help-green);
}

.help-section {
    margin-top: 14px;
    border: 1px solid var(--help-line);
    border-radius: var(--help-radius);
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .90)),
        var(--help-card);
    box-shadow: var(--help-shadow);
}

.section-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.section-heading > span {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--help-radius);
    color: #fff;
    background: var(--help-green);
    font-size: 13px;
    font-weight: 900;
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--help-muted);
    font-size: 13px;
    line-height: 1.65;
}

.quickstart {
    border-color: rgba(17, 104, 77, .16);
    background:
        radial-gradient(circle at 94% 0, rgba(215, 164, 61, .16), transparent 28%),
        linear-gradient(180deg, #fff, #f8fbf9);
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.step-grid article,
.page-grid article,
.backtest-cards article,
.rulelab-grid article {
    min-width: 0;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--help-radius);
    padding: 13px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.step-grid article {
    min-height: 188px;
}

.step-grid b {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    margin-bottom: 9px;
    border-radius: var(--help-radius);
    padding: 0 8px;
    color: var(--help-green);
    background: rgba(17, 104, 77, .08);
    font-size: 12px;
}

.step-grid strong,
.page-grid strong,
.backtest-cards strong,
.rulelab-grid strong {
    display: block;
    margin-bottom: 7px;
    color: var(--help-ink);
    font-size: 15px;
}

.step-grid p,
.page-grid p,
.backtest-cards p,
.rulelab-grid p,
.plain-box p,
.note p,
details p {
    margin: 0;
    color: var(--help-muted);
    font-size: 12px;
    line-height: 1.68;
}

.rule-strip {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 12px;
    border: 1px dashed rgba(169, 73, 57, .26);
    border-radius: var(--help-radius);
    padding: 10px;
    background: rgba(169, 73, 57, .055);
}

.rule-strip span {
    color: var(--help-red);
    font-size: 12px;
    font-weight: 900;
}

.rule-strip b {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--help-radius);
    padding: 0 9px;
    color: #7d3025;
    background: #fff;
    font-size: 12px;
}

.workflow-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.workflow-map article {
    position: relative;
    z-index: 1;
    min-height: 190px;
    display: grid;
    align-content: start;
    gap: 8px;
    border: 1px solid rgba(17, 104, 77, .12);
    border-radius: var(--help-radius);
    padding: 15px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
}

.workflow-map article::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--help-green), var(--help-gold));
}

.workflow-map em {
    color: var(--help-blue);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.workflow-map strong {
    font-size: 16px;
}

.workflow-map p {
    margin: 0;
    color: var(--help-muted);
    font-size: 12px;
    line-height: 1.68;
}

.workflow-map i {
    position: relative;
    align-self: center;
    display: none;
}

.workflow-note,
.plain-box,
.note {
    margin-top: 12px;
    border: 1px solid rgba(17, 104, 77, .16);
    border-left: 3px solid var(--help-green);
    border-radius: var(--help-radius);
    padding: 11px 12px;
    background: rgba(17, 104, 77, .055);
}

.workflow-note strong,
.plain-box strong,
.note strong {
    color: var(--help-green);
    font-size: 13px;
}

.workflow-note span {
    color: var(--help-muted);
    font-size: 13px;
    line-height: 1.65;
}

.page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.page-grid article {
    display: grid;
    min-height: 154px;
}

.page-grid a {
    width: fit-content;
    align-self: end;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(17, 104, 77, .18);
    border-radius: var(--help-radius);
    padding: 0 10px;
    color: var(--help-green);
    background: rgba(17, 104, 77, .06);
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.page-grid a:hover {
    color: #fff;
    background: var(--help-green);
}

.term-list {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 0 16px;
    margin: 0;
}

.term-list dt,
.term-list dd {
    min-height: 42px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    padding: 10px 0;
}

.term-list dt {
    color: var(--help-ink);
    font-size: 13px;
    font-weight: 900;
}

.term-list dd {
    margin: 0;
    color: var(--help-muted);
    font-size: 13px;
    line-height: 1.62;
}

.term-list dt:last-of-type,
.term-list dd:last-of-type {
    border-bottom: 0;
}

.strategy-layout {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 14px;
}

.do-list {
    border: 1px solid rgba(215, 164, 61, .20);
    border-radius: var(--help-radius);
    padding: 14px;
    background: linear-gradient(180deg, #fffaf0, #fff);
}

.do-list h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.do-list p {
    margin: 0;
    border-top: 1px solid rgba(15, 23, 42, .07);
    padding: 10px 0;
    color: var(--help-muted);
    font-size: 13px;
    line-height: 1.6;
}

.do-list p:last-child {
    padding-bottom: 0;
}

.term-list.compact {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--help-radius);
    padding: 0 12px;
    background: #fff;
}

.backtest-cards,
.rulelab-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

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

.ticket-flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.ticket-flow span {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(17, 104, 77, .16);
    border-radius: var(--help-radius);
    padding: 8px;
    color: var(--help-green);
    background: rgba(17, 104, 77, .06);
    text-align: center;
    font-size: 12px;
    font-weight: 900;
}

.note.warning {
    border-color: rgba(169, 73, 57, .20);
    border-left-color: var(--help-red);
    background: rgba(169, 73, 57, .055);
}

.note.warning strong {
    color: var(--help-red);
}

details {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--help-radius);
    background: #fff;
}

details + details {
    margin-top: 8px;
}

summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 12px;
    color: var(--help-ink);
    font-size: 13px;
    font-weight: 900;
}

details p {
    border-top: 1px solid rgba(15, 23, 42, .08);
    padding: 11px 12px 12px;
}

@media (max-width: 1320px) {
    .step-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .workflow-map,
    .ticket-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .backtest-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .help-app {
        width: calc(100% - 24px);
    }

    .help-hero,
    .strategy-layout {
        grid-template-columns: 1fr;
    }

    .page-grid,
    .rulelab-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .help-app {
        width: calc(100% - 18px);
    }

    .help-section,
    .help-hero {
        padding: 14px;
    }

    .help-hero h2 {
        font-size: 28px;
    }

    .step-grid,
    .workflow-map,
    .page-grid,
    .backtest-cards,
    .rulelab-grid,
    .ticket-flow,
    .term-list {
        grid-template-columns: 1fr;
    }

    .term-list dt {
        min-height: auto;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .term-list dd {
        padding-top: 4px;
    }
}
