/* Ke.html — tutorial page (legacy helpers kept for footer) */

/* Match other pages: white main nav bar */
.header-bottom,
.header-bottom.is-sticky {
    background: #fff;
}

.wdend {
    width: 1200px;
    margin: 0 auto;
}

.owatw {
    width: 1200px;
    margin: 0 auto;
}

.leisa {
    display: flex;
    justify-content: space-evenly;
}

.leisa li {
    height: 340px;
    list-style: none;
    float: left;
    background: #fff;
    margin-left: 40px;
    width: 290px;
}

.leisa li p {
    margin-top: 10px;
    text-align: center;
}

/* ===== Tutorial main ===== */
:root {
    --ke-bg: #f3f6f8;
    --ke-bg-soft: #e8f1f4;
    --ke-surface: #ffffff;
    --ke-text: #243447;
    --ke-muted: #6b7c8f;
    --ke-line: #d9e4ea;
    --ke-accent: #1f7a8c;
    --ke-accent-soft: #d7eef2;
    --ke-accent-hover: #165f6d;
    --ke-feature: #fc7418;
}

.ke-main {
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(31, 122, 140, 0.10), transparent 60%),
        radial-gradient(700px 360px at 90% 0%, rgba(252, 116, 24, 0.06), transparent 55%),
        var(--ke-bg);
    color: var(--ke-text);
    padding-bottom: 64px;
}

.ke-wrap {
    width: min(960px, calc(100% - 40px));
    margin: 0 auto;
}

.ke-hero {
    position: relative;
    padding: 28px 0 22px;
    margin-bottom: 8px;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(31, 122, 140, 0.12), transparent 55%),
        linear-gradient(180deg, #eef6f8 0%, #f3f6f8 70%, #f3f6f8 100%);
}

.ke-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(31, 122, 140, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 122, 140, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
    pointer-events: none;
}

.ke-hero .ke-wrap {
    position: relative;
    z-index: 1;
}

.ke-eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--ke-accent);
    font-weight: 600;
}

.ke-hero-title {
    margin: 0 0 10px;
    font-size: clamp(26px, 3.6vw, 34px);
    font-weight: 700;
    color: #1b2b3a;
    line-height: 1.3;
}

.ke-hero-desc {
    margin: 0 auto 18px;
    max-width: 460px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ke-muted);
}

.ke-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Shared horizontal tab scroller (Ke / csdoc / helpdoc) */
.ke-tabs-scroller {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ke-tabs-viewport {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.ke-tabs-viewport::before,
.ke-tabs-viewport::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ke-tabs-viewport::before {
    left: 0;
    background: linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0));
}

.ke-tabs-viewport::after {
    right: 0;
    background: linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0));
}

.ke-tabs-scroller.can-scroll-left .ke-tabs-viewport::before,
.ke-tabs-scroller.can-scroll-right .ke-tabs-viewport::after {
    opacity: 1;
}

.ke-tabs-arrow {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ke-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ke-accent);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.ke-tabs-arrow svg {
    width: 16px;
    height: 16px;
}

.ke-tabs-arrow:hover {
    background: var(--ke-accent-soft);
    border-color: #b7d4dc;
}

.ke-tabs-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    background: #fff;
}

.ke-tabs-arrow[hidden] {
    display: none !important;
}

.ke-panel > .ke-tabs {
    margin: 0;
    padding: 4px 0 8px;
    background: transparent;
    border-bottom: 0;
}

.ke-panel > .ke-tabs .ke-tabs-inner {
    padding: 12px 4px;
    scroll-behavior: smooth;
}

.ke-btn-primary,
.ke-btn-secondary {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ke-btn-primary {
    background: var(--ke-accent);
    color: #fff !important;
}

.ke-btn-primary:hover {
    background: var(--ke-accent-hover);
    transform: translateY(-1px);
    color: #fff !important;
}

.ke-btn-secondary {
    background: transparent;
    color: var(--ke-accent) !important;
    border: 1px solid var(--ke-accent);
}

.ke-btn-secondary:hover {
    background: var(--ke-accent-soft);
    transform: translateY(-1px);
    color: var(--ke-accent-hover) !important;
}

.ke-panel {
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto 8px;
    border: 1px solid var(--ke-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 30px rgba(36, 52, 71, 0.04);
    overflow: hidden;
}

.ke-tabs {
    z-index: 20;
    background: #f8fbfc;
    border-bottom: 1px solid var(--ke-line);
}

.ke-tabs-inner {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}

.ke-tabs-inner::-webkit-scrollbar {
    display: none;
}

.ke-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ke-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease;
}

a.ke-tab {
    color: var(--ke-muted) !important;
}

a.ke-tab:hover,
a.ke-tab.is-active {
    color: var(--ke-accent) !important;
}

.ke-tab:hover,
.ke-tab.is-active {
    background: var(--ke-accent-soft);
    color: var(--ke-accent);
}

.ke-content {
    padding: 24px 0 28px;
    min-height: 420px;
}

.ke-section {
    display: none;
}

.ke-section.is-active {
    display: block;
    animation: ke-fade 0.22s ease;
}

@keyframes ke-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ke-section-head {
    margin-bottom: 14px;
}

.ke-section-head h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #1b2b3a;
}

.ke-section-head p {
    margin: 0;
    font-size: 14px;
    color: var(--ke-muted);
}

.ke-video-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--ke-line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--ke-surface);
}

.ke-video-list li + li {
    border-top: 1px solid var(--ke-line);
}

.ke-video-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    text-decoration: none !important;
    color: inherit !important;
    transition: background 0.2s ease;
}

.ke-video-list--all .ke-video-head,
.ke-video-list--all .ke-video-item {
    grid-template-columns: 64px minmax(0, 1fr) 120px 150px;
}

.ke-video-head {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 120px 150px;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: #f3f7f9;
    color: var(--ke-muted);
    font-size: 13px;
    font-weight: 600;
}

.ke-video-index--head,
.ke-video-action--head {
    background: transparent !important;
    color: var(--ke-muted) !important;
    font-weight: 600;
    min-width: 44px;
    height: auto;
    padding: 0;
    border-radius: 0;
    letter-spacing: 0;
}

.ke-video-action--head {
    min-width: 64px;
    justify-content: center;
}

.ke-video-cat {
    text-align: center;
    font-size: 13px;
    color: var(--ke-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ke-video-list--all .ke-video-meta {
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    /* 类别列位置不变，仅把时长/操作整体左移，间距约缩短 1/3 */
    padding-right: 18px;
}

.ke-video-item:hover {
    background: #f7fbfc;
}

.ke-video-item--feature {
    background: linear-gradient(90deg, #fff8f3 0%, #ffffff 55%);
}

.ke-video-item--feature .ke-video-index {
    background: rgba(252, 116, 24, 0.12);
    color: var(--ke-feature);
}

.ke-video-item--feature .ke-video-action {
    background: var(--ke-feature);
}

.ke-video-item--feature:hover .ke-video-action {
    background: #e06510;
}

.ke-video-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--ke-accent-soft);
    color: var(--ke-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.ke-video-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ke-text);
}

.ke-video-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.ke-video-time {
    font-size: 13px;
    color: var(--ke-muted);
    font-variant-numeric: tabular-nums;
}

.ke-video-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    background: var(--ke-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.ke-video-item:hover .ke-video-action {
    background: var(--ke-accent-hover);
}

.ke-doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ke-doc-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 18px;
    border: 1px solid var(--ke-line);
    border-radius: 12px;
    background: var(--ke-surface);
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ke-doc-item:hover {
    border-color: #b7d4dc;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(36, 52, 71, 0.06);
}

.ke-doc-item h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1b2b3a;
}

.ke-doc-item ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ke-muted);
    font-size: 13px;
    line-height: 1.7;
    flex: 1;
}

.ke-doc-link {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ke-accent);
}

@media (max-width: 768px) {
    .ke-hero {
        padding: 24px 0 18px;
    }

    .ke-video-head {
        display: none;
    }

    .ke-video-item {
        grid-template-columns: 48px 1fr;
        gap: 10px 12px;
    }

    .ke-video-list--all .ke-video-item {
        grid-template-columns: 48px 1fr;
    }

    .ke-video-list--all .ke-video-cat {
        grid-column: 2;
        text-align: left;
    }

    .ke-video-list--all .ke-video-cat::before {
        content: "类别：";
    }

    .ke-video-meta {
        grid-column: 2;
        justify-content: space-between;
        width: 100%;
    }

    .ke-video-list--all .ke-video-meta .ke-video-time::before {
        content: "时长：";
    }

    .ke-doc-grid {
        grid-template-columns: 1fr;
    }

    .owatw,
    .wdend {
        width: 100%;
    }

    .leisa {
        flex-wrap: wrap;
    }

    .leisa li {
        margin: 10px;
        width: calc(50% - 20px);
        height: auto;
    }
}
