.hiw-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--fg-strong);
    margin: 0 0 8px;
}
.hiw-intro {
    color: var(--fg-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
}

/* ── Accordion stage (details/summary) ── */
details.hiw-stage {
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg-surface);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

summary.hiw-stage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    background: var(--bg-muted);
    list-style: none;
    transition: background 0.15s;
}
summary.hiw-stage-header::-webkit-details-marker { display: none; }
summary.hiw-stage-header::marker { display: none; }
summary.hiw-stage-header:hover { background: var(--bg-app); }

.hiw-stage-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--seg-blue);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hiw-stage-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--fg-strong);
    flex: 1;
}

.hiw-stage-arrow {
    font-size: 12px;
    color: var(--fg-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
details.hiw-stage[open] .hiw-stage-arrow {
    transform: rotate(180deg);
}

.hiw-stage-body {
    padding: 16px 20px;
    border-top: 1px solid var(--border-soft);
}

details.hiw-stage[open] > .hiw-stage-body {
    animation: hiwFadeIn 0.2s ease;
}
.hiw-stage-body p,
.hiw-stage-body li {
    font-size: 14px;
    color: var(--fg-default);
    line-height: 1.6;
}
.hiw-stage-body ul {
    padding-left: 20px;
    margin: 8px 0;
}
.hiw-stage-body code {
    background: var(--bg-muted);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 13px;
}
.hiw-stage-body a {
    color: var(--link);
    text-decoration: underline;
}

/* ── FAQ ── */
.hiw-faq-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fg-strong);
    margin: 2.5rem 0 1rem;
}

details.hiw-faq {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--bg-surface);
    overflow: hidden;
    margin-bottom: 8px;
}

summary.hiw-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-strong);
    background: var(--bg-muted);
    list-style: none;
    transition: background 0.15s;
    gap: 12px;
}
summary.hiw-faq-q::-webkit-details-marker { display: none; }
summary.hiw-faq-q::marker { display: none; }
summary.hiw-faq-q:hover { background: var(--bg-app); }

.hiw-faq-icon {
    font-size: 18px;
    color: var(--fg-muted);
    font-weight: 400;
    flex-shrink: 0;
    transition: transform 0.2s;
}
details.hiw-faq[open] .hiw-faq-icon {
    transform: rotate(45deg);
}

.hiw-faq-a {
    padding: 12px 18px;
    font-size: 13px;
    color: var(--fg-secondary);
    line-height: 1.6;
    border-top: 1px solid var(--border-soft);
}

details.hiw-faq[open] > .hiw-faq-a {
    animation: hiwFadeIn 0.2s ease;
}

@keyframes hiwFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* CSS-only radio tabs (ApiReference) */
.hiw-tab-radio { display: none; }

.hiw-tabs-wrap {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    overflow: hidden;
}

.hiw-tabs-bar {
    display: flex;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border-soft);
}

.hiw-tab-lbl {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.hiw-tab-lbl:hover { color: var(--fg-default); }

.hiw-tab-panel {
    display: none;
    background: var(--bg-surface);
}

/* Show active tab panel */
#tab-swagger:checked ~ .hiw-tabs-bar label[for="tab-swagger"],
#tab-ref:checked ~ .hiw-tabs-bar label[for="tab-ref"] {
    color: var(--fg-strong);
    border-bottom-color: var(--seg-blue);
    background: var(--bg-surface);
}

#tab-swagger:checked ~ .hiw-tab-swagger { display: block; }
#tab-ref:checked ~ .hiw-tab-ref { display: block; }

/* 4-tab code-samples panel selectors */
#cs-curl:checked ~ .hiw-tabs-bar label[for="cs-curl"],
#cs-csharp:checked ~ .hiw-tabs-bar label[for="cs-csharp"],
#cs-python:checked ~ .hiw-tabs-bar label[for="cs-python"],
#cs-nodejs:checked ~ .hiw-tabs-bar label[for="cs-nodejs"] {
    color: var(--fg-strong);
    border-bottom-color: var(--seg-blue);
    background: var(--bg-surface);
}
#cs-curl:checked ~ .cs-tab-curl { display: block; }
#cs-csharp:checked ~ .cs-tab-csharp { display: block; }
#cs-python:checked ~ .cs-tab-python { display: block; }
#cs-nodejs:checked ~ .cs-tab-nodejs { display: block; }
