.wt-help-page {
    max-width: 1200px;
    margin: 0 auto;
    color: var(--wt-text);
}

.wt-page-header.wt-help-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
    gap: 0.85rem 1.2rem;
    align-items: start;
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--wt-border);
    border-radius: 12px;
    background: var(--wt-surface);
    color: var(--wt-text);
}

.wt-help-hero-main {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.wt-help-hero-main > h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
    color: var(--wt-text);
}

.wt-help-hero-main > p {
    margin: 0;
    max-width: 58ch;
    color: var(--wt-text-muted);
}

.wt-help-hero-side {
    display: flex;
    align-items: stretch;
}

.wt-help-quick-tips {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

.wt-help-quick-tip {
    border: 1px solid var(--wt-border);
    border-radius: 10px;
    background: var(--wt-surface-muted);
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--wt-text-muted);
}

.wt-help-quick-tip strong {
    color: var(--wt-text);
}

.wt-help-search-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    max-width: 520px;
}

.wt-help-search-input {
    min-width: 240px;
    flex: 1 1 300px;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--wt-border-strong);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--wt-bg);
    color: var(--wt-text);
}

.wt-help-search-input::placeholder {
    color: var(--wt-text-subtle);
}

.wt-help-ask-row,
.wt-help-ask-panel .wt-help-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    max-width: none;
    width: 100%;
}

.wt-help-ask-input,
.wt-help-ask-panel .wt-help-search-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .wt-page-header.wt-help-hero {
        grid-template-columns: 1fr;
        padding: 0.75rem 0.8rem;
    }

    .wt-help-search-row {
        max-width: none;
    }
}

.wt-help-category-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.8rem;
}

.wt-help-featured-section {
    padding-top: 0.85rem;
}

.wt-help-security-featured-card {
    display: flex;
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 0.95rem 1rem;
    border: 2px solid #0f4c81;
    background: linear-gradient(180deg, #f8fcff 0%, #eef6ff 100%);
    align-items: flex-start;
    text-align: left;
    gap: 0.25rem;
}

.wt-help-security-featured-icon {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.wt-help-security-featured-card .wt-tile-label {
    font-size: 1.1rem;
}

.wt-help-security-featured-meta {
    font-size: 0.9rem;
    color: #1f2937;
}

.wt-help-category-card {
    width: 160px;
    flex: 0 0 160px;
    min-height: 145px;
    justify-content: center;
}

@media (max-width: 720px) {
    .wt-help-category-card {
        width: calc(50% - 0.4rem);
        flex-basis: calc(50% - 0.4rem);
    }
}

.wt-help-category-card:hover {
    border-color: var(--wt-accent);
    box-shadow: 0 3px 10px var(--wt-shadow-soft);
}

.wt-help-category-icon {
    font-size: 1.4rem;
}

.wt-help-category-title {
    text-align: center;
}

.wt-help-category-meta {
    margin-top: 0.2rem;
    color: var(--wt-text-muted);
    font-size: 0.78rem;
    border: 1px solid var(--wt-border);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    background: var(--wt-surface-muted);
}

.wt-help-module-group .wt-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.wt-help-module-icon {
    font-size: 1.05em;
    line-height: 1;
}

.wt-help-topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.wt-help-topic-cards > li {
    border: 1px solid var(--wt-border);
    border-radius: 10px;
    padding: 0.8rem;
    background: var(--wt-surface-muted);
    color: var(--wt-text);
}

.wt-help-topic-title {
    font-weight: 600;
    text-decoration: none;
    color: var(--wt-link);
}

.wt-help-topic-title:hover {
    text-decoration: underline;
}

.wt-help-topic-meta {
    color: var(--wt-text-subtle);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.wt-help-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    color: var(--wt-text-muted);
}

.wt-help-breadcrumbs a {
    color: var(--wt-link);
}

.wt-help-topic-content h2 {
    margin-top: 0;
    color: var(--wt-text);
}

.wt-help-permission {
    margin-bottom: 0.8rem;
    color: var(--wt-text-muted);
    font-size: 0.9rem;
}

.wt-help-image-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin: 0.7rem 0 1rem;
}

.wt-help-figure {
    margin: 0;
    border: 1px solid var(--wt-border);
    border-radius: 8px;
    background: var(--wt-surface-muted);
    padding: 0.55rem;
}

.wt-help-figure img {
    width: 100%;
    max-height: 170px;
    border-radius: 6px;
    display: block;
    object-fit: contain;
    background: var(--wt-surface);
}

.wt-help-figure figcaption {
    margin-top: 0.45rem;
    color: var(--wt-text-muted);
    font-size: 0.85rem;
}

.wt-help-markdown {
    color: var(--wt-text);
}

.wt-help-markdown h2,
.wt-help-markdown h3,
.wt-help-markdown h4 {
    margin-top: 1.1rem;
    color: var(--wt-text);
}

.wt-help-markdown p,
.wt-help-markdown li {
    line-height: 1.6;
}

.wt-help-markdown a {
    color: var(--wt-link);
}

.wt-help-markdown hr {
    border: none;
    border-top: 1px solid var(--wt-border);
}

.wt-help-markdown code {
    background: var(--wt-surface-alt);
    color: inherit;
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.wt-help-markdown pre {
    margin: 0.85rem 0;
    border: 1px solid var(--wt-border);
    border-radius: 8px;
    background: var(--wt-surface-muted);
    color: var(--wt-text);
    padding: 0.7rem;
    overflow-x: auto;
}

.wt-help-markdown pre code {
    background: transparent;
    padding: 0;
}

.wt-help-search-snippet {
    margin-top: 0.45rem;
    color: var(--wt-text-muted);
    font-size: 0.9rem;
}

.wt-help-topic-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.wt-help-perm-pill {
    border: 1px solid var(--wt-border);
    border-radius: 999px;
    background: var(--wt-surface-muted);
    color: var(--wt-text-muted);
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
}

.wt-help-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.9rem 0;
}

.wt-help-markdown th,
.wt-help-markdown td {
    border: 1px solid var(--wt-border);
    padding: 0.45rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

.wt-help-markdown th {
    background: var(--wt-surface-muted);
}

.wt-help-markdown pre.mermaid {
    margin: 0.85rem 0;
    border: 1px solid var(--wt-border);
    border-radius: 8px;
    background: var(--wt-surface-muted);
    padding: 0.7rem;
    overflow-x: auto;
}

.wt-help-callout {
    margin: 0.9rem 0;
    border-left: 4px solid var(--wt-text-subtle);
    border-radius: 6px;
    background: var(--wt-surface-muted);
    color: var(--wt-text);
    padding: 0.55rem 0.7rem;
}

.wt-help-callout-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--wt-text);
}

.wt-help-callout-info {
    border-left-color: #0ea5e9;
}

.wt-help-callout-tip {
    border-left-color: #22c55e;
}

.wt-help-callout-warning {
    border-left-color: #f59e0b;
}

.wt-help-callout-danger {
    border-left-color: #ef4444;
}

.wt-help-home-footer {
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--wt-border);
    font-size: 0.9rem;
}

.wt-help-home-footer a {
    color: var(--wt-link);
}

.wt-help-home-footer a:hover {
    color: var(--wt-accent);
}

.wt-help-topic-layout {
    display: grid;
    grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 900px) {
    .wt-help-topic-layout {
        grid-template-columns: 1fr;
    }
}

.wt-help-toc {
    position: sticky;
    top: 0.75rem;
}

.wt-help-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wt-help-toc-list a {
    color: var(--wt-link);
}

.wt-help-toc-level-3 {
    padding-left: 0.75rem;
    font-size: 0.92em;
}

.wt-help-ask-panel .wt-help-ask-answer {
    margin-top: 0.75rem;
    border: 1px solid var(--wt-border);
    border-radius: 8px;
    background: var(--wt-surface-muted);
    color: var(--wt-text);
    padding: 0.75rem 0.85rem;
}

.wt-help-ask-answer-text {
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0 0 0.75rem;
    color: var(--wt-text);
}

.wt-help-search-snippet mark {
    background: #fef08a;
    color: #1a1a1a;
    padding: 0 0.1em;
}

[data-theme="dark"] .wt-section .wt-help-security-featured-card {
    background: linear-gradient(180deg, #132844 0%, #1a355b 100%);
    border-color: #2e6aa5;
}

[data-theme="dark"] .wt-help-security-featured-meta {
    color: #dbeafe;
}

[data-theme="dark"] .wt-help-search-snippet mark {
    background: #854d0e;
    color: #fef9c3;
}

[data-theme="dark"] .wt-help-callout-info {
    background: #1a2e3d;
}

[data-theme="dark"] .wt-help-callout-tip {
    background: #1a3328;
}

[data-theme="dark"] .wt-help-callout-warning {
    background: #3a2d16;
}

[data-theme="dark"] .wt-help-callout-danger {
    background: #3a1f22;
}
