/*
Theme Name: DigiStorm
Theme URI: https://www.digistorm.com.cn/
Author: DigiStorm
Description: DigiStorm 官网主题。内容由 WordPress 管理，配置器通过 iframe 挂载到独立的 Nuxt 工具服务。
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: digistorm
*/

/* ---------------------------------------------------------------
   设计令牌
   默认暗色，和现有 Nuxt 站保持一致；浅色由 html[data-theme=light] 覆盖。
   --------------------------------------------------------------- */
:root {
    --ds-primary: #06b6d4;
    --ds-primary-600: #0891b2;
    --ds-primary-400: #22d3ee;
    --ds-primary-soft: rgba(6, 182, 212, .12);

    --ds-bg: #030712;
    --ds-bg-soft: #0b1120;
    --ds-panel: #111827;
    --ds-panel-2: #0f172a;
    --ds-text: #f3f4f6;
    --ds-text-soft: #d1d5db;
    --ds-muted: #9ca3af;
    --ds-faint: #6b7280;
    --ds-border: #1f2937;
    --ds-border-soft: rgba(255, 255, 255, .08);

    --ds-amber-bg: rgba(245, 158, 11, .1);
    --ds-amber-border: rgba(245, 158, 11, .28);
    --ds-amber-text: #fcd34d;
    --ds-red: #f87171;

    --ds-header-h: 64px;
    --ds-max: 1400px;
    --ds-tool-max: 1920px;
    --ds-radius: 12px;
    --ds-radius-lg: 18px;
    --ds-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --ds-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --ds-shadow: 0 18px 50px rgba(0, 0, 0, .28);

    color-scheme: dark;
}

html[data-theme="light"] {
    --ds-primary: #0891b2;
    --ds-primary-600: #0e7490;
    --ds-primary-400: #06b6d4;
    --ds-primary-soft: rgba(8, 145, 178, .09);

    --ds-bg: #ffffff;
    --ds-bg-soft: #f9fafb;
    --ds-panel: #ffffff;
    --ds-panel-2: #f3f4f6;
    --ds-text: #111827;
    --ds-text-soft: #374151;
    --ds-muted: #6b7280;
    --ds-faint: #9ca3af;
    --ds-border: #e5e7eb;
    --ds-border-soft: rgba(17, 24, 39, .08);

    --ds-amber-bg: #fffbeb;
    --ds-amber-border: #fde68a;
    --ds-amber-text: #92400e;
    --ds-red: #dc2626;
    --ds-shadow: 0 18px 50px rgba(17, 24, 39, .1);

    color-scheme: light;
}

/* ---------------------------------------------------------------
   基础
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ds-bg);
    color: var(--ds-text);
    font-family: var(--ds-font);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--ds-primary-400); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .6em;
    color: var(--ds-text);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1em; }

code, pre, kbd {
    font-family: var(--ds-mono);
    font-size: .925em;
}

code {
    padding: .15em .4em;
    border-radius: 6px;
    background: var(--ds-panel-2);
    color: var(--ds-primary-400);
}

pre {
    overflow: auto;
    padding: 1rem 1.15rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-panel-2);
}

hr { border: 0; border-top: 1px solid var(--ds-border); margin: 2.5rem 0; }

::selection { background: var(--ds-primary); color: #04121a; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.ds-container {
    width: 100%;
    max-width: var(--ds-max);
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .ds-container { padding-inline: 1.5rem; }
}

.ds-section { padding-block: 4.5rem; }
.ds-section--tight { padding-block: 3rem; }
.ds-muted { color: var(--ds-muted); }
.ds-mono { font-family: var(--ds-mono); }
.ds-center { text-align: center; }

/* ---------------------------------------------------------------
   头部
   --------------------------------------------------------------- */
.ds-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--ds-border);
    background: var(--ds-bg);
    background: color-mix(in srgb, var(--ds-bg) 86%, transparent);
    backdrop-filter: blur(12px);
}

.ds-header__inner {
    display: flex;
    align-items: center;
    gap: .75rem;
    height: var(--ds-header-h);
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .ds-header__inner { padding-inline: 1.5rem; }
}

.ds-brand {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    flex: 0 0 auto;
    color: var(--ds-text);
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
}

.ds-brand:hover { text-decoration: none; }
.ds-brand__mark { width: 36px; height: 36px; border-radius: 10px; display: block; }
.ds-brand__text { font-size: 1.125rem; }
.ds-brand__text span { color: var(--ds-primary); }

.ds-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.ds-nav::-webkit-scrollbar { display: none; }

.ds-nav a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex: 0 0 auto;
    padding: .45rem .7rem;
    border-radius: 8px;
    color: var(--ds-muted);
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease;
}

.ds-nav a:hover { color: var(--ds-text); background: var(--ds-panel-2); text-decoration: none; }
.ds-nav a.is-active { color: var(--ds-primary-400); background: var(--ds-primary-soft); }
.ds-nav svg { width: 16px; height: 16px; flex: 0 0 auto; }

.ds-header__actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex: 0 0 auto;
}

.ds-lang {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    padding: .15rem;
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    background: var(--ds-panel);
}

.ds-lang a {
    padding: .2rem .45rem;
    border-radius: 5px;
    color: var(--ds-muted);
    font-size: .75rem;
    line-height: 1.5;
    text-decoration: none;
}

.ds-lang a:hover { color: var(--ds-text); text-decoration: none; }
.ds-lang a.is-current { background: var(--ds-primary-soft); color: var(--ds-primary-400); }

.ds-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    background: var(--ds-panel);
    color: var(--ds-muted);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}

.ds-icon-btn:hover { color: var(--ds-text); border-color: var(--ds-border-soft); }
.ds-icon-btn svg { width: 18px; height: 18px; }

.ds-theme-toggle .ds-icon-sun { display: none; }
html[data-theme="light"] .ds-theme-toggle .ds-icon-sun { display: block; }
html[data-theme="light"] .ds-theme-toggle .ds-icon-moon { display: none; }

.ds-menu-toggle { display: none; }

@media (max-width: 1100px) {
    .ds-nav {
        position: absolute;
        top: var(--ds-header-h);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        max-height: calc(100vh - var(--ds-header-h));
        overflow: auto;
        padding: .75rem 1rem 1.25rem;
        border-bottom: 1px solid var(--ds-border);
        background: var(--ds-bg);
        box-shadow: var(--ds-shadow);
    }

    .ds-nav.is-open { display: flex; }
    .ds-nav a { padding: .7rem .75rem; font-size: .95rem; }
    .ds-menu-toggle { display: inline-flex; }
}

/* ---------------------------------------------------------------
   按钮
   --------------------------------------------------------------- */
.ds-btn,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 42px;
    padding: .55rem 1rem;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--ds-panel-2);
    color: var(--ds-text);
    font: inherit;
    font-size: .925rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}

.ds-btn:hover,
.wp-block-button__link:hover { text-decoration: none; transform: translateY(-1px); }

.ds-btn svg,
.wp-block-button__link svg { width: 18px; height: 18px; }

.ds-btn--primary,
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background: var(--ds-primary);
    color: #04121a;
}

.ds-btn--primary:hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    background: var(--ds-primary-400);
    color: #04121a;
}

.ds-btn--outline,
.wp-block-button.is-style-outline .wp-block-button__link {
    border-color: var(--ds-border);
    background: transparent;
    color: var(--ds-text);
}

.ds-btn--outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--ds-primary); }

.ds-btn--soft {
    border-color: var(--ds-border);
    background: var(--ds-panel);
    color: var(--ds-text-soft);
}

.ds-btn--sm { min-height: 34px; padding: .35rem .7rem; font-size: .8rem; }
.ds-btn[disabled],
.ds-btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* ---------------------------------------------------------------
   首页 hero / features / CTA
   --------------------------------------------------------------- */
.ds-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--ds-border);
    padding-block: 5rem;
    max-width: none !important;
}

.ds-cta {
    max-width: none !important;
}

.ds-hero__inner {
    max-width: var(--ds-max);
    margin-inline: auto;
}

.ds-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 380px at 18% 0%, var(--ds-primary-soft), transparent 70%),
        linear-gradient(180deg, rgba(6, 182, 212, .06), transparent 40%);
}

.ds-hero > * { position: relative; }
.ds-hero__inner {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .ds-hero__inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
}

.ds-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.ds-tags li {
    padding: .2rem .7rem;
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    color: var(--ds-muted);
    font-size: .75rem;
    font-weight: 600;
}

.ds-hero h1 {
    max-width: 18ch;
    margin-bottom: 1rem;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    letter-spacing: -.035em;
}

.ds-hero__sub {
    max-width: 42rem;
    margin-bottom: 1.5rem;
    color: var(--ds-text-soft);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.ds-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.ds-note {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 1.15rem 0 0;
    color: var(--ds-muted);
    font-size: .85rem;
}

.ds-note svg { width: 18px; height: 18px; color: var(--ds-primary); flex: 0 0 auto; }

.ds-hero__mark {
    justify-self: center;
    width: min(280px, 55vw);
    border-radius: 2rem;
    box-shadow: 0 24px 60px rgba(6, 182, 212, .22);
}

.ds-features {
    display: grid;
    gap: 1.25rem;
    margin-top: 2.75rem;
}

@media (min-width: 640px) { .ds-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ds-features { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ds-feature {
    padding: 1.4rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-panel);
}

.ds-feature__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    margin-bottom: .9rem;
    background: var(--ds-primary);
    -webkit-mask: var(--ds-icon) center / contain no-repeat;
    mask: var(--ds-icon) center / contain no-repeat;
}

.ds-feature:nth-child(1) .ds-feature__icon {
    --ds-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M11 9h4a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2h1'/%3E%3Ccircle cx='7' cy='7' r='1'/%3E%3Ccircle cx='7' cy='17' r='1'/%3E%3Cpath d='M7 8v8'/%3E%3C/svg%3E");
}

.ds-feature:nth-child(2) .ds-feature__icon {
    --ds-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18M8 4v5'/%3E%3C/svg%3E");
}

.ds-feature:nth-child(3) .ds-feature__icon {
    --ds-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3Ccircle cx='9' cy='6' r='2'/%3E%3Ccircle cx='15' cy='12' r='2'/%3E%3Ccircle cx='8' cy='18' r='2'/%3E%3C/svg%3E");
}

.ds-feature:nth-child(4) .ds-feature__icon {
    --ds-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5A5.5 5.5 0 0 1 20 11v8H4v-8a5.5 5.5 0 0 1 8-4.9'/%3E%3Cpath d='M12 6.5V3'/%3E%3C/svg%3E");
}

.ds-feature h3 { margin-bottom: .4rem; font-size: 1rem; }
.ds-feature p { margin: 0; color: var(--ds-muted); font-size: .9rem; }

.ds-cta {
    border-top: 1px solid var(--ds-border);
    background: var(--ds-bg-soft);
    padding-block: 4.5rem;
    text-align: center;
}

.ds-cta p { max-width: 42rem; margin-inline: auto; color: var(--ds-text-soft); }
.ds-cta .ds-actions { justify-content: center; margin-top: 1.75rem; }

/* ---------------------------------------------------------------
   提示条
   --------------------------------------------------------------- */
.ds-alert {
    display: flex;
    gap: .8rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--ds-amber-border);
    border-radius: var(--ds-radius);
    background: var(--ds-amber-bg);
    color: var(--ds-amber-text);
    font-size: .9rem;
}

.ds-alert svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: .1rem; }
.ds-alert strong { display: block; margin-bottom: .15rem; font-weight: 700; }
.ds-alert p { margin: 0; }

/* ---------------------------------------------------------------
   通用页面头 / 正文
   --------------------------------------------------------------- */
.ds-page-head {
    border-bottom: 1px solid var(--ds-border);
    padding-block: 3.5rem 2.5rem;
}

/* Intro only: the page title is screen-reader-only, so this band is one lead
   line above the content. Full padding would read as an empty strip. */
.ds-page-head--lead { padding-block: 2rem 2rem; }

.ds-page-head__inner { max-width: 56rem; }
.ds-page-head h1 { margin-bottom: .75rem; }
.ds-page-head p { max-width: 46rem; margin: 0; color: var(--ds-text-soft); font-size: 1.05rem; }

.ds-page-body { padding-block: 3.5rem 5rem; }

/* ---------------------------------------------------------------
   正文排版（产品详情、文档页共用）
   --------------------------------------------------------------- */
.ds-prose { max-width: 52rem; }
.ds-prose p { line-height: 1.75; }
.ds-prose h2 { margin-top: 2.4em; padding-top: 1.4em; border-top: 1px solid var(--ds-border); }
.ds-prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
/* Step headings sit inside a procedure: they need to stand out from the body
   text, and to stay glued to the sentence that explains the step. The doc
   template sets a larger top margin of its own, a few lines below. */
.ds-prose h3 { margin-top: 1.8em; font-size: 1.2rem; }
.ds-prose h3 + p { margin-top: -.15em; }
.ds-prose ul, .ds-prose ol { padding-left: 1.4rem; }
.ds-prose li { margin-bottom: .35rem; line-height: 1.7; }
.ds-prose img { max-width: 100%; height: auto; border-radius: var(--ds-radius); }
.ds-prose a { color: var(--ds-primary-400); }
.ds-prose strong { color: var(--ds-text); }

/* 图片、图注与图集：图文混排的主体 */
.ds-prose figure,
.ds-prose .wp-block-image { margin: 1.8rem 0; }
.ds-prose figure img { display: block; width: 100%; }
.ds-prose figcaption {
    margin-top: .6rem;
    color: var(--ds-muted);
    font-size: .82rem;
    line-height: 1.6;
    text-align: center;
}

.ds-prose .wp-block-gallery {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.ds-prose .wp-block-gallery figure { margin: 0; }
.ds-prose .wp-block-gallery figcaption { text-align: left; }

/* 表格：窄屏可横向滑动，不撑破容器 */
.ds-prose .wp-block-table { margin: 1.6rem 0; overflow-x: auto; }
.ds-prose table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ds-prose th, .ds-prose td { padding: .55rem .7rem; border-bottom: 1px solid var(--ds-border); text-align: left; }
.ds-prose th { color: var(--ds-muted); font-weight: 600; }
.ds-prose td:first-child { width: 38%; color: var(--ds-text-soft); }

.ds-prose blockquote {
    margin: 1.6rem 0;
    padding: .9rem 1.2rem;
    border-left: 3px solid var(--ds-primary);
    border-radius: 0 var(--ds-radius) var(--ds-radius) 0;
    background: var(--ds-panel);
    color: var(--ds-text-soft);
}

.ds-prose hr { margin: 2.5rem 0; border: 0; border-top: 1px solid var(--ds-border); }

.ds-prose .wp-block-columns { gap: 1.25rem; }
.ds-prose .wp-block-group { margin-bottom: 1.5rem; }
.ds-prose .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.ds-prose .wp-block-button { margin: 0; }

/* ---------------------------------------------------------------
   产品
   --------------------------------------------------------------- */
.ds-products {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) { .ds-products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ds-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.ds-product {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-panel);
    transition: border-color .15s ease, transform .15s ease;
}

.ds-product:hover { border-color: rgba(6, 182, 212, .55); transform: translateY(-2px); }

.ds-product__media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background:
        radial-gradient(circle at 30% 20%, var(--ds-primary-soft), transparent 60%),
        var(--ds-panel-2);
    overflow: hidden;
}

.ds-product__media img { width: 100%; height: 100%; object-fit: cover; }
.ds-product__media svg { width: 72px; height: 72px; color: var(--ds-primary); opacity: .75; }

.ds-product__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 1.25rem;
}

.ds-product h2, .ds-product h3 { margin-bottom: .75rem; font-size: 1.05rem; }

.ds-specs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
    margin: 0 0 1rem;
}

.ds-specs dt { color: var(--ds-muted); font-size: .7rem; }
.ds-specs dd { margin: .1rem 0 0; font-family: var(--ds-mono); font-size: .8rem; color: var(--ds-text-soft); }

.ds-product__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
}

.ds-price { font-size: 1.15rem; font-weight: 800; }
.ds-price small { color: var(--ds-muted); font-size: .75rem; font-weight: 500; }
.ds-product__actions { display: flex; flex-wrap: wrap; gap: .4rem; }

.ds-empty {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-panel);
    color: var(--ds-muted);
    font-size: .9rem;
}

/* ---------------------------------------------------------------
   下载页
   --------------------------------------------------------------- */
.ds-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.ds-search {
    flex: 1 1 280px;
    min-height: 42px;
    padding: .5rem .8rem;
    border: 1px solid var(--ds-border);
    border-radius: 9px;
    background: var(--ds-panel);
    color: var(--ds-text);
    font: inherit;
    font-size: .9rem;
}

.ds-search:focus { outline: 2px solid var(--ds-primary); outline-offset: 1px; }

.ds-download {
    margin-bottom: .9rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-panel);
    overflow: hidden;
}

.ds-download > summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: .9rem 1.1rem;
    color: var(--ds-text);
    font-weight: 650;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.ds-download > summary .ds-muted { margin-left: auto; }

.ds-download > summary::-webkit-details-marker { display: none; }
.ds-download > summary::after {
    content: "+";
    color: var(--ds-muted);
    font-family: var(--ds-mono);
    font-size: 1.1rem;
}

.ds-download[open] > summary { border-bottom: 1px solid var(--ds-border); }
.ds-download[open] > summary::after { content: "−"; }

.ds-download__body { padding: 1rem 1.1rem 1.2rem; }

.ds-download__group { margin-bottom: .75rem; }
.ds-download__group:last-child { margin-bottom: 0; }

.ds-download__group > summary {
    padding: .4rem 0;
    color: var(--ds-text-soft);
    font-family: var(--ds-mono);
    font-size: .85rem;
    cursor: pointer;
}

.ds-files {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .25rem .75rem;
    margin: .4rem 0 .9rem;
}

@media (max-width: 900px) { .ds-files { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ds-files { grid-template-columns: 1fr; } }

.ds-file {
    overflow: hidden;
    padding: .2rem 0;
    color: var(--ds-text-soft);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ds-file:hover { color: var(--ds-primary-400); }
.ds-file.is-dim { opacity: .22; }

/* ---------------------------------------------------------------
   文档
   一条一条的记录：列表里给标题、类型、日期和摘要，点开是全文。
   --------------------------------------------------------------- */
/* 列表与页头标题同宽同列 */
.ds-docs { max-width: 56rem; }

.ds-docs__notice { margin: 0 0 1.5rem; }

/* 一行浏览器提示，别让它占掉半屏 */
.ds-doc-tip {
    margin: 0 0 1.5rem;
    color: var(--ds-faint);
    font-size: .82rem;
}

/* 筛选与搜索同一行，窄屏换行 */
.ds-doc-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1.6rem;
}

.ds-doc-filters { display: flex; flex-wrap: wrap; gap: .4rem; }

.ds-doc-filters a {
    padding: .3rem .8rem;
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    background: var(--ds-panel);
    color: var(--ds-muted);
    font-size: .82rem;
}

.ds-doc-filters a:hover {
    border-color: rgba(6, 182, 212, .55);
    color: var(--ds-text);
    text-decoration: none;
}

.ds-doc-filters a.is-active {
    border-color: var(--ds-primary);
    background: var(--ds-primary);
    color: #04121a;
    font-weight: 650;
}

.ds-doc-search {
    display: flex;
    flex: 0 1 290px;
    gap: .4rem;
}

.ds-doc-search input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 38px;
    padding: .4rem .7rem;
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    background: var(--ds-panel);
    color: var(--ds-text);
    font: inherit;
    font-size: .85rem;
}

.ds-doc-search input:focus { outline: 2px solid var(--ds-primary); outline-offset: 1px; }

.ds-doc-search button {
    min-height: 38px;
    padding: .4rem .85rem;
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    background: var(--ds-panel-2);
    color: var(--ds-text-soft);
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}

.ds-doc-search button:hover { border-color: rgba(6, 182, 212, .55); color: var(--ds-text); }

@media (max-width: 560px) { .ds-doc-search { flex: 1 1 100%; } }

.ds-doc-summary { margin: 0 0 1.25rem; color: var(--ds-muted); font-size: .85rem; }
.ds-doc-summary a { margin-left: .6rem; }

/* 文章流：一条一条，靠分隔线区分，不用卡片 */
.ds-doc-list { display: block; }

.ds-doc-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--ds-border);
}

.ds-doc-item:first-child { padding-top: .3rem; }
.ds-doc-item:last-child { padding-bottom: 0; border-bottom: 0; }

.ds-doc-item__body { flex: 1 1 auto; min-width: 0; }

.ds-doc-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .7rem;
    margin-bottom: .5rem;
    color: var(--ds-muted);
    font-size: .76rem;
}

.ds-doc-kind {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .12rem .6rem;
    border-radius: 999px;
    background: var(--ds-panel-2);
    color: var(--ds-text-soft);
    font-size: .72rem;
}

.ds-doc-kind svg { width: 13px; height: 13px; color: var(--ds-primary); }

.ds-doc-kind--release-notes {
    background: var(--ds-primary-soft);
    color: var(--ds-primary-400);
}

.ds-doc-item__title { margin: .1rem 0 .45rem; font-size: 1.2rem; line-height: 1.4; }

.ds-doc-item__title a { color: var(--ds-text); }
.ds-doc-item__title a:hover { color: var(--ds-primary-400); text-decoration: none; }

.ds-doc-item__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--ds-muted);
    font-size: .9rem;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.ds-doc-item__thumb {
    flex: 0 0 176px;
    overflow: hidden;
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    background: var(--ds-panel-2);
}

.ds-doc-item__thumb img { display: block; width: 100%; height: 110px; object-fit: cover; }

@media (max-width: 640px) { .ds-doc-item__thumb { display: none; } }

/* 分页 */
.ds-pager {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 2rem;
}

.ds-pager a,
.ds-pager span {
    min-width: 34px;
    padding: .35rem .6rem;
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    color: var(--ds-text-soft);
    font-size: .85rem;
    text-align: center;
}

.ds-pager a:hover { border-color: rgba(6, 182, 212, .55); text-decoration: none; }

.ds-pager .current {
    border-color: var(--ds-primary);
    background: var(--ds-primary);
    color: #04121a;
    font-weight: 700;
}

/* 单条文档 */
.ds-doc-single { max-width: 56rem; }

.ds-doc-single__head {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--ds-border);
}

.ds-doc-single__head h1 { margin: .6rem 0 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* 文档正文的标题比产品页更紧凑：一条记录通常有好几个小节 */
.ds-doc-single__body h2 { margin-top: 2rem; padding-top: 1.25rem; }
.ds-doc-single__body h3 { margin-top: 2.2rem; }

.ds-doc-nav {
    display: grid;
    gap: .75rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ds-border);
}

@media (min-width: 720px) {
    .ds-doc-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ds-doc-nav__item.is-next { text-align: right; }
}

.ds-doc-nav__item {
    padding: .85rem 1rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    background: var(--ds-panel);
    color: var(--ds-text);
    font-size: .9rem;
}

.ds-doc-nav__item:hover { border-color: rgba(6, 182, 212, .55); text-decoration: none; }

.ds-doc-nav__dir {
    display: block;
    margin-bottom: .25rem;
    color: var(--ds-muted);
    font-size: .75rem;
}

/* 正文里用到的代码与表格（板名规则这类条目会用） */
.ds-code {
    display: inline-block;
    margin: .5rem 0 .25rem;
    padding: .5rem .75rem;
    border-radius: 8px;
    background: var(--ds-panel-2);
    color: var(--ds-primary-400);
    font-family: var(--ds-mono);
    font-size: .85rem;
}

.ds-table-wrap { overflow-x: auto; margin: 1.25rem 0; }
.ds-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ds-table th, .ds-table td { padding: .55rem .7rem; border-bottom: 1px solid var(--ds-border); text-align: left; }
.ds-table th { color: var(--ds-muted); font-weight: 600; }
.ds-table td { color: var(--ds-text-soft); }
.ds-table .is-mono { font-family: var(--ds-mono); }
.ds-table .is-next { color: var(--ds-primary-400); }

/* 操作提示（导入的版本说明正文里用） */
.ds-action {
    margin-top: 1rem;
    padding: .7rem .85rem;
    border: 1px solid var(--ds-amber-border);
    border-radius: 9px;
    background: var(--ds-amber-bg);
    color: var(--ds-amber-text);
    font-size: .85rem;
}

.ds-action strong { font-weight: 700; }

/* 通用小徽标 */
.ds-chip {
    display: inline-block;
    padding: .1rem .6rem;
    border-radius: 999px;
    background: var(--ds-panel-2);
    color: var(--ds-muted);
    font-size: .72rem;
}

/* ---------------------------------------------------------------
   配置器
   --------------------------------------------------------------- */
.ds-tool-page { padding: 1rem 0 2rem; }

.ds-tool-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

.ds-tool-bar__hint { display: flex; align-items: center; gap: .5rem; color: var(--ds-muted); font-size: .82rem; }
.ds-tool-bar__hint svg { width: 18px; height: 18px; color: var(--ds-primary); }
.ds-tool-bar__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.ds-tool-frame {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--ds-header-h) - 120px);
    min-height: 760px;
    overflow: hidden;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-bg);
}

.ds-tool-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.ds-tool-frame:fullscreen { height: 100vh; border-radius: 0; border: 0; }

@media (max-width: 768px) {
    .ds-tool-frame { height: calc(100vh - var(--ds-header-h) - 150px); min-height: 620px; }
}

/* ---------------------------------------------------------------
   页脚
   --------------------------------------------------------------- */
.ds-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--ds-border);
    background: var(--ds-bg-soft);
}

.ds-footer__grid {
    display: grid;
    gap: 2rem;
    padding-block: 3rem;
}

@media (min-width: 640px) { .ds-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ds-footer__grid { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); } }

.ds-footer h3 { margin-bottom: .75rem; color: var(--ds-text); font-size: .85rem; }
.ds-footer ul { margin: 0; padding: 0; list-style: none; }
.ds-footer li { margin-bottom: .5rem; }
.ds-footer a { color: var(--ds-muted); font-size: .88rem; }
.ds-footer a:hover { color: var(--ds-primary-400); }
.ds-footer__brand { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.ds-footer__brand img { width: 32px; height: 32px; border-radius: 8px; }
.ds-footer__brand span { font-weight: 800; letter-spacing: -.02em; }
.ds-footer__brand span span { color: var(--ds-primary); }
.ds-footer__tagline { max-width: 20rem; margin: 0; color: var(--ds-muted); font-size: .88rem; }

.ds-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-block: 1rem;
    border-top: 1px solid var(--ds-border);
    color: var(--ds-faint);
    font-size: .75rem;
}

.ds-footer__legal { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.ds-footer__legal a { color: var(--ds-faint); font-size: .75rem; }

/* ---------------------------------------------------------------
   WordPress 核心块补齐
   --------------------------------------------------------------- */
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100%; max-width: none; }
.wp-block-image img { border-radius: var(--ds-radius); }
.wp-block-quote {
    margin: 1.5rem 0;
    padding: .25rem 0 .25rem 1rem;
    border-left: 3px solid var(--ds-primary);
    color: var(--ds-text-soft);
}
.wp-block-separator { border-top: 1px solid var(--ds-border); }
.wp-block-table table { width: 100%; border-collapse: collapse; }
.wp-block-table td, .wp-block-table th { padding: .55rem .7rem; border-bottom: 1px solid var(--ds-border); }

/* 编辑器里也尽量接近前台 */
.editor-styles-wrapper {
    background: var(--ds-bg);
    color: var(--ds-text);
    font-family: var(--ds-font);
}

/* ---------------------------------------------------------------
   模板补充
   --------------------------------------------------------------- */
.ds-hero,
.ds-section,
.ds-cta { padding-inline: 1rem; }

@media (min-width: 640px) {
    .ds-hero,
    .ds-section,
    .ds-cta { padding-inline: 1.5rem; }
}

.ds-page-intro {
    max-width: 52rem;
    margin-bottom: 2rem;
}

.ds-tool-container {
    width: 100%;
    max-width: var(--ds-tool-max);
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .ds-tool-container { padding-inline: 1.5rem; }
}

.ds-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: .9rem;
    border-radius: 10px;
    background: var(--ds-primary-soft);
    color: var(--ds-primary-400);
}

.ds-card-icon svg { width: 24px; height: 24px; }

.ds-feature h2 { margin-bottom: .4rem; font-size: 1.05rem; }
.ds-feature .wp-block-buttons { margin-top: 1rem; }
.ds-feature .wp-block-paragraph { margin-bottom: .4rem; }

.ds-back { margin: 0 0 1.25rem; font-size: .9rem; }
.ds-back a { color: var(--ds-muted); }
.ds-back a:hover { color: var(--ds-primary-400); }

.ds-product-single {
    display: grid;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 900px) {
    .ds-product-single { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.ds-product-single__media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 1.5rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background:
        radial-gradient(circle at 30% 20%, var(--ds-primary-soft), transparent 60%),
        var(--ds-panel-2);
}

.ds-product-single__media img {
    width: 100%;
    border-radius: var(--ds-radius);
    object-fit: cover;
}

.ds-product-single__media svg { width: 110px; height: 110px; color: var(--ds-primary); opacity: .7; }
.ds-product-single__info { display: flex; flex-direction: column; align-items: flex-start; }
.ds-product-single__info h1 { margin: .6rem 0 .9rem; }
.ds-product__lead { margin-bottom: 1.35rem; color: var(--ds-text-soft); font-size: 1.02rem; line-height: 1.65; }
.ds-product-single__info .ds-specs { width: 100%; max-width: 28rem; margin-bottom: 1.5rem; }
.ds-product__price { margin-bottom: 1.1rem; }
.ds-product__price .ds-price { font-size: 1.9rem; }
.ds-product-single__info .ds-product__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ds-product__note { margin-top: .9rem; max-width: 32rem; color: var(--ds-muted); font-size: .82rem; line-height: 1.6; }

/* 正文区：图、表、分栏都在这里，与上面的两栏左对齐 */
.ds-product__content { max-width: 60rem; margin-top: 3.25rem; }

/* 底部再给一次购买入口，长页面滚到底不用往上翻 */
.ds-product__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 60rem;
    margin-top: 2.75rem;
    padding: 1.35rem 1.6rem;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-lg);
    background: var(--ds-panel);
}

.ds-product__cta strong { display: block; margin-bottom: .25rem; }
.ds-product__cta p { margin: 0; color: var(--ds-muted); font-size: .85rem; }

.ds-alert + .ds-products { margin-top: 1.5rem; }

/* ---------------------------------------------------------------
   响应式微调
   --------------------------------------------------------------- */
@media (max-width: 640px) {
    .ds-section { padding-block: 3rem; }
    .ds-hero { padding-block: 3.5rem; }
    .ds-page-head { padding-block: 2.5rem 2rem; }
    .ds-page-body { padding-block: 2.5rem 3.5rem; }
    .ds-footer__bottom { flex-direction: column; align-items: flex-start; }
    .ds-product__foot { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------------------
 * WP 核心的 is-layout-flow 会给「相邻块」加 margin-block-start, 落到 grid 容器
 * 里就变成第一张卡比后面几张高一截（.ds-features 四列时最明显）。间距统一交给
 * gap 处理, 这里把流式外边距清掉。
 * ------------------------------------------------------------------------ */
.ds-features > *,
.ds-products > *,
.ds-files > *,
.ds-footer__grid > * {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}
