/*
 * 仅保留 MDUI 1 无法表达的结构性补充：
 * 页面底色、图表画布高度、桌面端常驻抽屉、登录页居中、代码块换行。
 * 一切视觉样式（颜色、间距、阴影、排版、组件外观）均来自 MDUI 1 原生组件。
 */

body {
    background: #f2f3f5;
}

body.mdui-theme-layout-dark {
    background: #212121;
}

/* 抽屉底色：MDUI 1 抽屉默认透明，页面底色为浅灰时需要白底以符合设计规范 */
.mdui-drawer {
    background: #fff;
}

body.mdui-theme-layout-dark .mdui-drawer {
    background: #424242;
}

/* 桌面端抽屉常驻，移动端仍使用 MDUI 原生抽屉交互 */
@media (min-width: 1024px) {
    #site-drawer {
        transform: translateX(0) !important;
        box-shadow: none;
    }
    #nav-toggle {
        display: none;
    }
}

/* 顶栏品牌：按钮组件会强制全大写，这里用普通链接保持站名原样 */
.appbar-brand {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 8px;
    color: #fff;
    text-decoration: none;
}

.appbar-brand .material-icons {
    margin-right: 8px;
}

/* MDUI 1 工具栏默认无内边距，右侧按钮会贴边 */
.mdui-appbar .mdui-toolbar {
    padding-right: 16px;
}

/* 工具栏元素不压缩，避免窄屏下按钮文字被截断 */
.mdui-appbar .mdui-toolbar > * {
    flex-shrink: 0;
}

.mdui-appbar .mdui-toolbar > .mdui-toolbar-spacer {
    flex: 1 1 auto;
}

/* 抽屉固定满高，内容少时也铺满整列 */
#site-drawer {
    height: 100vh;
    overflow-y: auto;
}

/* 站点名属专有名词，不适用按钮组件的全大写规则 */
.site-name {
    text-transform: none;
}

/* 内容较少时页脚仍贴近视口底部 */
main.mdui-container-fluid {
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
}

/* MDUI 1 卡片内容固定 24px 行高，大号数字需按字号撑开，否则上下被裁 */
.mdui-card-content > .mdui-typo-display-1 {
    line-height: 1.2;
}

/* 表格操作列不换行、按钮间距一致 */
.mdui-table th:last-child,
.mdui-table td:last-child {
    white-space: nowrap;
}

.mdui-table td:last-child .mdui-btn-icon + .mdui-btn-icon,
.mdui-table td:last-child form + form .mdui-btn-icon {
    margin-left: 4px;
}

/* 表格内的操作按钮并排显示（MDUI 1 未提供该布局工具类） */
.mdui-table td form {
    display: inline-block;
    vertical-align: middle;
}

/* 等高卡片网格：同一行的卡片高度一致，避免参差与空缺 */
.card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

/* 手机端指标卡两列，避免五张卡各占一整行 */
@media (max-width: 599px) {
    .card-grid-4,
    .card-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .card-grid-5 > .mdui-card:last-child {
        grid-column: span 2;
    }
}

@media (min-width: 600px) {
    .card-grid-2,
    .card-grid-3,
    .card-grid-4,
    .card-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* 5 个指标在双列下让最后一张占满整行，避免右侧留空 */
    .card-grid-5 > .mdui-card:last-child {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .card-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .card-grid-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .card-grid-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .card-grid-5 > .mdui-card:last-child {
        grid-column: auto;
    }
}

.card-grid > .mdui-card {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.card-grid > .mdui-card > .mdui-list {
    flex: 1 1 auto;
}

/* 长路径 / 长标题在列表中省略显示，避免撑破行高 */
.mdui-list-item-title,
.mdui-list-item-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 图表画布必须有确定高度，Chart.js 才能正确计算尺寸 */
#hs-chart {
    height: 300px;
}

#hs-realtime-chart {
    height: 180px;
}

canvas {
    max-width: 100%;
}

/* 登录页垂直居中 */
#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    box-sizing: border-box;
}

/* 跟踪代码、文档代码块自动换行 */
pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Material 规范里的链接色：MDUI 不提供，避免暗色下链接不可读 */
a {
    color: var(--slx-primary, #3f51b5);
}

body.mdui-theme-layout-dark a {
    color: var(--slx-primary-soft, #7986cb);
}

/* 暗色主题下 MDUI tab 非激活项对比度补齐（MDUI 原生 opacity .7 在深底上偏暗） */
body.mdui-theme-layout-dark .mdui-tab a {
    color: #fff;
    opacity: .8;
}


/* 验证码：输入框与图片同一行 */
.captcha-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.captcha-row .mdui-textfield {
    flex: 1 1 auto;
    min-width: 0;
}

.captcha-img {
    width: 132px;
    height: 44px;
    margin-top: 20px;
    border-radius: 2px;
    cursor: pointer;
    flex: 0 0 auto;
}

/* 世界地图：国家按访问量着色 */
.worldmap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.worldmap path {
    fill: #e0e0e0;
    stroke: #fff;
    stroke-width: .4;
    transition: fill .2s;
}

body.mdui-theme-layout-dark .worldmap path {
    fill: #4a4a4a;
    stroke: #424242;
}

.worldmap path.has-data {
    fill: var(--slx-primary, #3f51b5);
    fill-opacity: .3;
}

.worldmap path.lv1 { fill-opacity: .24; }
.worldmap path.lv2 { fill-opacity: .38; }
.worldmap path.lv3 { fill-opacity: .54; }
.worldmap path.lv4 { fill-opacity: .72; }
.worldmap path.lv5 { fill-opacity: 1; }

body.mdui-theme-layout-dark .worldmap path.has-data {
    fill: var(--slx-primary-soft, #7986cb);
}

/* 台湾、香港、澳门与大陆同色同边，视觉上连成一片 */
.worldmap path.is-cn-part {
    stroke: var(--slx-primary, #3f51b5);
    stroke-opacity: .5;
}

body.mdui-theme-layout-dark .worldmap path.is-cn-part {
    stroke: var(--slx-primary-soft, #7986cb);
    stroke-opacity: .5;
}

/* 首页动效：逐行淡入、渐变标题、数字滚动 */
@keyframes slx-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slx-sheen {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

/* 未启用脚本时保持可见，避免内容永久隐藏 */
.reveal {
    opacity: 1;
}

html.js .reveal {
    opacity: 0;
}

.reveal.is-in {
    animation: slx-rise .7s cubic-bezier(.2, .7, .3, 1) forwards;
}

.hero-title {
    background: linear-gradient(100deg, var(--slx-primary, #3f51b5) 0%, var(--slx-primary-soft, #7986cb) 26%, var(--slx-primary, #3f51b5) 48%, var(--slx-primary-soft, #7986cb) 72%, var(--slx-primary, #3f51b5) 100%);
    background: linear-gradient(100deg,
        color-mix(in srgb, var(--slx-primary, #3f51b5) 78%, #0b0b0b) 0%,
        color-mix(in srgb, var(--slx-primary-soft, #7986cb) 74%, #0b0b0b) 26%,
        color-mix(in srgb, var(--slx-primary, #3f51b5) 88%, #0b0b0b) 48%,
        color-mix(in srgb, var(--slx-primary-soft, #7986cb) 74%, #0b0b0b) 72%,
        color-mix(in srgb, var(--slx-primary, #3f51b5) 78%, #0b0b0b) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--slx-primary, #3f51b5);
    animation: slx-sheen 12s linear infinite;
}

body.mdui-theme-layout-dark .hero-title {
    background: linear-gradient(100deg, #e8eaf6 0%, var(--slx-primary-soft, #c5cae9) 26%, #e8eaf6 48%, var(--slx-primary-soft, #c5cae9) 72%, #e8eaf6 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #e8eaf6;
}

.hero-cursor::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: .95em;
    margin-left: 4px;
    background: var(--slx-primary, #3f51b5);
    vertical-align: -.08em;
    animation: slx-blink 1.1s steps(1) infinite;
}

@keyframes slx-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* 卡片悬浮轻微上浮，强调可点 */
.lift {
    transition: transform .22s ease, box-shadow .22s ease;
}

.lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .22);
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .hero-title, .hero-cursor::after, .lift {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* 世界地图容器与图例 */
.worldmap svg {
    width: 100%;
    height: auto;
    max-height: 400px;
    display: block;
}

.worldmap path:hover {
    fill: var(--slx-primary, #3f51b5);
    fill-opacity: 1;
    cursor: pointer;
}

body.mdui-theme-layout-dark .worldmap path:hover {
    fill: var(--slx-primary-soft, #7986cb);
    fill-opacity: 1;
}

.worldmap-loading {
    padding: 56px 0;
    text-align: center;
}

.worldmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.worldmap-swatch {
    width: 18px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

.worldmap-swatch.lv1 { background: var(--slx-primary, #3f51b5); opacity: .24; }
.worldmap-swatch.lv2 { background: var(--slx-primary, #3f51b5); opacity: .38; }
.worldmap-swatch.lv3 { background: var(--slx-primary, #3f51b5); opacity: .54; }
.worldmap-swatch.lv4 { background: var(--slx-primary, #3f51b5); opacity: .72; }
.worldmap-swatch.lv5 { background: var(--slx-primary, #3f51b5); }

/* 访问质量分 */
.slx-score {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0 12px;
}

.slx-score-value {
    font-size: 56px;
    line-height: 1;
    font-weight: 300;
    color: var(--slx-primary, #3f51b5);
}

body.mdui-theme-layout-dark .slx-score-value {
    color: var(--slx-primary-soft, #9fa8da);
}

.slx-score-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 表格与卡片内的小图标对齐 */
.slx-inline-icon {
    font-size: 18px;
    vertical-align: -4px;
    margin-right: 4px;
}

.slx-cell-path {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 成员表格：首列收窄，操作按钮横向排列不换行 */
.slx-col-member {
    width: 42%;
}

.mdui-table td .mdui-btn-icon {
    margin: 0 2px;
}

.mdui-table td form {
    display: inline-block;
    margin: 0;
}

/* 落地页步骤卡的大号序号 */
.slx-step-index {
    display: block;
    color: var(--slx-primary, #3f51b5);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .02em;
    line-height: 1.4;
}

body.mdui-theme-layout-dark .slx-step-index {
    color: #9fa8da;
}

/* 卡片底部按钮：图标与文字之间留出固定间距 */
.slx-btn-icon {
    padding-left: 8px;
    padding-right: 12px;
}

.slx-btn-icon > i.material-icons {
    font-size: 18px;
    margin-right: 6px;
    vertical-align: -4px;
}

.slx-icon-trail {
    font-size: 18px;
    margin-left: 6px;
}

/* 站点设置里的开关行：复选框独占一行，说明紧随其下 */
.slx-check-row {
    display: block;
    margin-top: 18px;
}

.slx-check-row .mdui-checkbox {
    display: inline-flex;
    align-items: center;
}

.slx-check-row .mdui-typo-caption-opacity {
    display: block;
    margin: 4px 0 0 32px;
}

/* 主题色选择：菜单里的小圆点与设置页的色块 */
.slx-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 12px;
    vertical-align: -2px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.slx-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.slx-color-chip {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.slx-color-chip:hover {
    transform: scale(1.08);
}

.slx-color-chip.is-active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 0, 0, .28);
}

body.mdui-theme-layout-dark .slx-color-chip.is-active {
    box-shadow: 0 0 0 2px #303030, 0 0 0 4px rgba(255, 255, 255, .5);
}

/* 首页：斜放在一台笔记本上的面板截图 */
.slx-hero-visual {
    position: relative;
    perspective: 1500px;
    padding: 30px 40px 46px 30px;
    margin-top: 8px;
    max-width: 100%;
}

.slx-laptop {
    position: relative;
    transform: rotateX(7deg) rotateY(-17deg) rotate(-1.5deg);
    transform-style: preserve-3d;
    transition: transform .5s ease;
}

.slx-hero-visual:hover .slx-laptop {
    transform: rotateX(3deg) rotateY(-9deg) rotate(-1deg);
}

.slx-laptop-screen {
    padding: 9px 9px 12px;
    border-radius: 12px;
    background: linear-gradient(160deg, #2a2d3a, #1b1d27);
    box-shadow: 0 26px 50px -18px rgba(26, 35, 126, .45), 0 4px 10px rgba(0, 0, 0, .16);
}

.slx-laptop-screen img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.slx-laptop-base {
    height: 13px;
    margin: 0 -8px;
    border-radius: 0 0 12px 12px;
    background: linear-gradient(#d5d8e2, #a9aebc);
    box-shadow: 0 10px 18px -8px rgba(0, 0, 0, .3);
}

.slx-float {
    position: absolute;
    width: 40%;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .35);
}

.slx-float img {
    display: block;
    width: 100%;
    height: auto;
}

.slx-float-a {
    top: -16px;
    right: 0;
    transform: rotate(6deg);
}

.slx-float-b {
    bottom: 0;
    left: 0;
    transform: rotate(-6deg);
}

body.mdui-theme-layout-dark .slx-float {
    border-color: #303030;
    background: #303030;
}

/* 手机上不再做 3D 倾斜，样机按容器宽度等比收缩，避免溢出屏幕 */
@media (max-width: 767px) {
    .slx-hero-visual {
        padding: 8px 0 18px;
    }
    .slx-hero-visual .slx-laptop {
        transform: none;
    }
    .slx-hero-visual:hover .slx-laptop {
        transform: none;
    }
    .slx-float {
        display: none;
    }
}

@media (max-width: 599px) {
    .hero-title { font-size: 30px !important; line-height: 1.32 !important; }
    .slx-hero-visual .slx-laptop-screen { padding: 6px 6px 8px; border-radius: 9px; }
    .slx-hero-visual .slx-laptop-base { height: 9px; }
}

/* 浅色主题下的深色文字：保证按钮与顶栏的对比度 */
body.mdui-theme-primary-amber .mdui-color-theme,
body.mdui-theme-primary-light-green .mdui-color-theme,
body.mdui-theme-primary-light-blue .mdui-color-theme,
body.mdui-theme-primary-cyan .mdui-color-theme,
body.mdui-theme-primary-orange .mdui-color-theme,
body.mdui-theme-primary-deep-orange .mdui-color-theme {
    color: rgba(0, 0, 0, .87) !important;
}

body.mdui-theme-primary-amber .mdui-appbar .mdui-appbar-inset,
body.mdui-theme-primary-amber .mdui-appbar,
body.mdui-theme-primary-light-green .mdui-appbar,
body.mdui-theme-primary-light-blue .mdui-appbar,
body.mdui-theme-primary-cyan .mdui-appbar,
body.mdui-theme-primary-orange .mdui-appbar,
body.mdui-theme-primary-deep-orange .mdui-appbar {
    color: rgba(0, 0, 0, .87);
}

body.mdui-theme-primary-amber .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-light-green .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-light-blue .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-cyan .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-orange .mdui-appbar .mdui-text-color-white,
body.mdui-theme-primary-deep-orange .mdui-appbar .mdui-text-color-white {
    color: rgba(0, 0, 0, .87) !important;
}

/* 地图悬停提示 */
.worldmap-tip {
    position: absolute;
    z-index: 5;
    min-width: 108px;
    padding: 8px 11px;
    border-radius: 6px;
    background: rgba(33, 33, 33, .95);
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45);
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .12s ease, transform .12s ease;
}

.worldmap-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.worldmap-tip-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.worldmap-tip-value {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .72);
    white-space: nowrap;
}

body.mdui-theme-layout-dark .worldmap-tip {
    background: rgba(66, 66, 66, .98);
}

/* ---------- 落地页视觉 ---------- */
html.mdui-theme-layout-dark body,
body.mdui-theme-layout-dark {
    background: #17171c;
}

.slx-landing {
    position: relative;
}

.slx-landing::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(760px 460px at 82% -4%, rgba(63, 81, 181, .16), transparent 68%),
        radial-gradient(560px 420px at 6% 14%, rgba(121, 134, 203, .14), transparent 70%);
}

body.slx-landing.mdui-theme-layout-dark::before,
html.mdui-theme-layout-dark body.slx-landing::before {
    background:
        radial-gradient(760px 460px at 82% -4%, rgba(121, 134, 203, .22), transparent 68%),
        radial-gradient(560px 420px at 6% 14%, rgba(63, 81, 181, .18), transparent 70%);
}

.slx-landing main,
.slx-landing footer {
    position: relative;
    z-index: 1;
}

/* 主按钮：深色实心 + 投影，和浅灰背景拉开层次 */
.slx-cta.mdui-btn {
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}

.slx-cta.mdui-btn:hover {
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .55);
}

/* 次按钮：白底 + 浅描边 + 双层投影，和主按钮同一高度但仍是次要层级 */
.slx-btn-outline.mdui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
    line-height: 1;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, .06),
        0 6px 16px -8px rgba(0, 0, 0, .45),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: box-shadow .2s ease, transform .2s ease;
}

.slx-btn-outline.mdui-btn:hover {
    box-shadow:
        0 2px 2px rgba(0, 0, 0, .08),
        0 10px 22px -8px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

.slx-btn-outline.mdui-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .4);
}

body.mdui-theme-layout-dark .slx-btn-outline.mdui-btn {
    border-color: rgba(255, 255, 255, .16);
    background: #26262e;
    color: #fff;
    box-shadow:
        0 1px 1px rgba(0, 0, 0, .3),
        0 8px 20px -10px rgba(0, 0, 0, .9),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}

.slx-appbar-cta.mdui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: #fff;
    color: rgba(0, 0, 0, .87) !important;
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35);
}

.slx-appbar-cta.mdui-btn:hover {
    background: #f5f5f5;
}

body.mdui-theme-primary-amber .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-light-green .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-light-blue .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-cyan .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-orange .slx-appbar-cta.mdui-btn,
body.mdui-theme-primary-deep-orange .slx-appbar-cta.mdui-btn {
    border-color: rgba(0, 0, 0, .35);
    color: rgba(0, 0, 0, .87) !important;
}

.slx-cta-light.mdui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
    background: #fff;
    color: rgba(0, 0, 0, .87);
    line-height: 1;
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45);
}

/* 分区标题左边的小竖条，给版面一个呼吸的切入点 */
.slx-landing #features > .mdui-typo,
.slx-landing #why > .mdui-typo,
.slx-landing #start > .mdui-typo {
    position: relative;
}

.slx-landing #features > .mdui-typo::after,
.slx-landing #why > .mdui-typo::after,
.slx-landing #start > .mdui-typo::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    margin: 14px auto 0;
    border-radius: 2px;
    background: var(--slx-primary, #3f51b5);
    opacity: .8;
}

/* 功能卡图标底 */
.slx-landing .mdui-card-primary-title .material-icons {
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 9px;
    background: rgba(63, 81, 181, .1);
    background: color-mix(in srgb, var(--slx-primary, #3f51b5) 12%, transparent);
    font-size: 19px;
    line-height: 34px;
    text-align: center;
    vertical-align: middle;
}

/* 深色下的卡片与文字 */
body.mdui-theme-layout-dark .mdui-card {
    background: #23232b;
}

body.mdui-theme-layout-dark .mdui-card-content,
body.mdui-theme-layout-dark .mdui-card-primary-title {
    color: rgba(255, 255, 255, .92);
}

body.mdui-theme-layout-dark .mdui-text-color-black-secondary,
body.mdui-theme-layout-dark .mdui-typo-body-1-opacity,
body.mdui-theme-layout-dark .mdui-typo-caption-opacity {
    color: rgba(255, 255, 255, .72) !important;
}

/* 深色下顶栏压深一档，和深底更协调 */
body.mdui-theme-layout-dark .mdui-appbar.mdui-color-theme {
    background-color: color-mix(in srgb, var(--slx-primary, #3f51b5) 72%, #0b0b10);
}

body.mdui-theme-layout-dark .hero-title {
    color: #e8eaf6;
}

body.mdui-theme-layout-dark .slx-laptop-screen {
    background: linear-gradient(160deg, #1b1b22, #0e0e13);
}

body.mdui-theme-layout-dark .slx-laptop-base {
    background: linear-gradient(#3a3a45, #23232b);
}

/* 深色下 MDUI 会把 .mdui-text-color-white 反转成黑字，顶栏压深后必须强制回白 */
body.mdui-theme-layout-dark .mdui-appbar .appbar-brand,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > a.mdui-btn.mdui-text-color-white:not(.mdui-btn-raised):not(.slx-appbar-cta),
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > a.mdui-btn-dense:not(.mdui-btn-raised):not(.slx-appbar-cta),
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > button.mdui-btn-icon,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar .material-icons,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > .mdui-btn-icon .material-icons {
    color: #fff !important;
}

body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > a.mdui-btn.mdui-text-color-white:not(.mdui-btn-raised):hover,
body.mdui-theme-layout-dark .mdui-appbar .mdui-toolbar > button.mdui-btn-icon:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, .12);
}

body.mdui-theme-layout-dark footer .mdui-divider {
    background-color: rgba(255, 255, 255, .12);
}

/* 在线人数 chip：图标在圆心里真正居中 */
.mdui-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mdui-chip-icon .material-icons {
    font-size: 18px;
    line-height: 18px;
}

/* 分享页：居中容器 + 可横向滚动的分段标签 */
.slx-share-main {
    max-width: 1280px;
}

.slx-share-toolbar .mdui-tab {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.slx-share-toolbar .mdui-tab::-webkit-scrollbar {
    display: none;
}

.slx-share-toolbar .mdui-tab a {
    flex: 0 0 auto;
    padding: 0 18px;
}

.slx-range-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.slx-range-line .material-icons {
    font-size: 17px;
    margin-right: 6px;
    vertical-align: -3px;
}

/* 同一行的卡片等高，避免右侧空一块 */
.mdui-row > div[class*="mdui-col"] > .mdui-card {
    height: 100%;
    box-sizing: border-box;
}

/* 设置页：字段标签与单选行 */
.slx-field-label {
    font-size: 12px;
    color: rgba(0, 0, 0, .54);
    margin: 6px 0 8px;
    letter-spacing: .2px;
}

.mdui-theme-layout-dark .slx-field-label {
    color: rgba(255, 255, 255, .5);
}

.slx-radio-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 22px;
    min-height: 32px;
}

.slx-radio-row .mdui-radio {
    margin: 0;
}

.slx-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.mdui-theme-layout-dark .slx-form-actions {
    border-top-color: rgba(255, 255, 255, .1);
}

.slx-form-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slx-inline-code {
    margin: 0;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .05);
    color: rgba(0, 0, 0, .7);
    font-family: Roboto Mono, Menlo, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.mdui-theme-layout-dark .slx-inline-code {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .7);
}

/* 等高行：让同一行卡片上下边对齐 */
.slx-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.slx-row > [class*="mdui-col"] {
    display: flex;
    flex-direction: column;
}

.slx-row > [class*="mdui-col"] > .mdui-card {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.slx-row > [class*="mdui-col"] > .mdui-card > .mdui-card-content {
    flex: 1 0 auto;
}

/* 登录卡：收紧顶部留白，验证码辅助文字不裁切 */
#login-page .mdui-card-primary {
    padding-bottom: 4px;
}

#login-page .mdui-card-content {
    padding-top: 4px;
}

.captcha-row .mdui-textfield-helper {
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: 0;
}

/* 弹窗：去掉标题后，内容区自己撑起上边距 */
.slx-dialog-body {
    padding-top: 20px;
}

/* 顶栏：文字与图标统一垂直居中，基线不再漂 */
.mdui-toolbar {
    align-items: center;
}

.mdui-toolbar > a,
.mdui-toolbar > button,
.mdui-toolbar > .appbar-brand,
.mdui-toolbar > .mdui-toolbar-spacer + a,
.mdui-toolbar > .mdui-toolbar-spacer + button {
    display: inline-flex;
    align-items: center;
    align-self: center;
}

.mdui-toolbar .appbar-brand {
    height: 56px;
    line-height: 1;
    text-decoration: none;
}

.mdui-toolbar .mdui-btn,
.mdui-toolbar .mdui-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    line-height: 1;
}

.mdui-toolbar .material-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mdui-toolbar .mdui-typo-title,
.mdui-toolbar .mdui-typo-caption-opacity {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* 下拉菜单不能被卡片裁掉：卡片与内容区不建立裁剪上下文 */
.mdui-card,
.mdui-card-content,
.card-grid > .mdui-card {
    overflow: visible;
}

.mdui-select-menu {
    z-index: 4000;
}

.mdui-card .mdui-table-fluid {
    overflow-x: auto;
    overflow-y: visible;
}

.slx-nowrap {
    white-space: nowrap;
}

/* 地区下钻条：返回 + 当前范围 */
.slx-drill-bar {
    padding: 8px 12px;
}

.slx-drill-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slx-drill-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.slx-drill-label {
    font-size: 12px;
    color: rgba(0, 0, 0, .5);
}

.slx-drill-title {
    font-size: 15px;
    font-weight: 500;
    color: rgba(0, 0, 0, .87);
}

.mdui-theme-layout-dark .slx-drill-label {
    color: rgba(255, 255, 255, .5);
}

.mdui-theme-layout-dark .slx-drill-title {
    color: rgba(255, 255, 255, .87);
}

/* 首页按钮组：同一行垂直居中，间距统一 */
.slx-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.slx-cta-row .mdui-btn {
    margin: 0 !important;
}

/* 分享页二级导航：图标与文字同行，第一条 tab 的分隔线与下一条区分开 */
.slx-share-sections {
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.slx-share-sections > a {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.slx-share-sections .slx-tab-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    opacity: .82;
}

body.mdui-theme-layout-dark .slx-share-sections {
    border-bottom-color: rgba(255, 255, 255, .12);
}

/* ---------- WordPress 接入页 ---------- */
.slx-wp-hero {
    max-width: 760px;
}

.slx-wp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border-radius: 0;
    background: none;
    color: rgba(0, 0, 0, .55);
    line-height: 1.4;
    letter-spacing: .02em;
}

.slx-wp-badge .material-icons {
    font-size: 17px;
}

body.mdui-theme-layout-dark .slx-wp-badge {
    background: rgba(255, 255, 255, .09);
    color: rgba(255, 255, 255, .74);
}

.slx-wp-lead {
    max-width: 620px;
    font-size: 17px;
    line-height: 1.75;
}

.slx-wp-sec-icon {
    font-size: 26px;
    vertical-align: -5px;
    margin-right: 6px;
}

.slx-wp-sec-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 32px;
    margin-top: 22px;
}

.slx-wp-sec-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.slx-wp-sec-item > .material-icons {
    flex: 0 0 auto;
    font-size: 22px;
    margin-top: 2px;
}

@media (max-width: 719px) {
    .slx-wp-sec-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
}

/* ---------- 落地页 WordPress 横条 ---------- */
.slx-wp-strip {
    margin-top: 48px;
    overflow: hidden;
}

.slx-wp-strip-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 36px 40px;
}

.slx-wp-strip-text {
    min-width: 0;
    max-width: 560px;
}

.slx-wp-strip-art {
    min-width: 0;
}
.slx-wp-strip-art img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 18px 40px -22px rgba(26, 35, 126, .45);
}
body.mdui-theme-layout-dark .slx-wp-strip-art img {
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
}

.slx-wp-mock {
    border-radius: 12px;
    background: rgba(0, 0, 0, .035);
    padding: 14px 16px 16px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

body.mdui-theme-layout-dark .slx-wp-mock {
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.slx-wp-mock-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
}

body.mdui-theme-layout-dark .slx-wp-mock-head {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.slx-wp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .16);
}

body.mdui-theme-layout-dark .slx-wp-dot {
    background: rgba(255, 255, 255, .22);
}

.slx-wp-mock-title {
    margin-left: 8px;
    font-size: 12px;
    letter-spacing: .02em;
    opacity: .62;
}

.slx-wp-mock-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.slx-wp-mock-label {
    font-size: 12px;
    opacity: .62;
}

.slx-wp-mock-input {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    color: rgba(0, 0, 0, .74);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.mdui-theme-layout-dark .slx-wp-mock-input {
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .82);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.slx-wp-mock-muted {
    opacity: .55;
    letter-spacing: .04em;
}

.slx-wp-mock-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.slx-wp-mock-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: rgba(63, 81, 181, .1);
    color: #303f9f;
    font-size: 11px;
    line-height: 1.6;
}

.slx-wp-mock-chip .material-icons {
    font-size: 14px;
}

.slx-wp-mock-ok {
    background: rgba(46, 125, 50, .12);
    color: #2e7d32;
}

body.mdui-theme-layout-dark .slx-wp-mock-chip {
    background: rgba(121, 134, 203, .2);
    color: #c5cae9;
}

body.mdui-theme-layout-dark .slx-wp-mock-ok {
    background: rgba(102, 187, 106, .18);
    color: #a5d6a7;
}

@media (max-width: 899px) {
    .slx-wp-strip-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding: 28px 22px;
    }
}

/* 站点设置里的 WordPress 卡片：收窄行宽、按钮图标留出间距 */
.slx-wp-cta {
    max-width: 680px;
}

.slx-wp-cta p {
    margin: 0 0 10px;
}

.slx-wp-cta .mdui-btn .material-icons {
    margin-right: 6px;
    font-size: 18px;
    vertical-align: -4px;
}

/* 窄屏顶栏：只留图标，给右侧按钮让出空间 */
@media (max-width: 599px) {
    .mdui-appbar .mdui-toolbar {
        padding-left: 10px;
        padding-right: 10px;
    }
    .mdui-toolbar .appbar-brand .mdui-typo-title {
        display: block;
        font-size: 17px;
        letter-spacing: 0;
    }
    .mdui-toolbar .appbar-brand {
        min-width: 0;
        justify-content: flex-start;
    }
    .mdui-toolbar .appbar-brand .material-icons { font-size: 22px; margin-right: 6px; }
    .mdui-appbar .mdui-toolbar > a.mdui-btn {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* 作者区块 */
.slx-author .mdui-card-content { padding: 24px; }
.slx-author-head { display: flex; align-items: center; gap: 14px; }
.slx-author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #3f51b5; color: #fff; font-size: 20px; font-weight: 500;
  flex: 0 0 44px;
}
.slx-author-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.slx-footer-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mdui-theme-layout-dark .slx-author { background: #2b2b2b; }
.mdui-theme-layout-dark .slx-author-avatar { background: #7986cb; }
.slx-author-links .mdui-btn { text-transform: none; letter-spacing: 0; }

/* ---------- 设备样机展示 ---------- */
.slx-stage {
    position: relative;
    margin: 26px 0 36px;
    padding: 0 0 62px;
}
.slx-stage-inner {
    position: relative;
    max-width: 840px;
    margin: 0 auto;
    padding-right: 38px;
}
.slx-laptop {
    position: relative;
    width: 100%;
    transform: perspective(2000px) rotateY(-5deg) rotateX(2deg);
    transform-origin: 50% 62%;
    transition: transform .55s cubic-bezier(.2, .8, .25, 1);
}
.slx-stage-inner:hover .slx-laptop {
    transform: perspective(1900px) rotateY(-2deg) rotateX(1deg);
}
.slx-laptop-screen {
    position: relative;
    padding: 12px 12px 14px;
    border-radius: 14px 14px 3px 3px;
    background: linear-gradient(160deg, #30343d, #15171c 65%);
    box-shadow:
        0 34px 60px -22px rgba(9, 12, 24, .62),
        inset 0 1px 0 rgba(255, 255, 255, .16);
}
.slx-laptop-screen::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
    border-radius: 50%;
    background: #454b57;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.slx-laptop-view {
    position: relative;
    border-radius: 7px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #0e1014;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.slx-laptop-view img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.slx-laptop-base {
    position: relative;
    height: 15px;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(180deg, #414651, #23262d);
    box-shadow: 0 22px 34px -16px rgba(9, 12, 24, .6);
}
.slx-laptop-base::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 132px;
    height: 6px;
    transform: translateX(-50%);
    border-radius: 0 0 8px 8px;
    background: rgba(0, 0, 0, .38);
}
.slx-phone {
    position: absolute;
    right: -78px;
    bottom: -20px;
    z-index: 3;
    width: 180px;
    transform: rotate(2.4deg);
    transition: transform .45s cubic-bezier(.2, .8, .25, 1);
}
.slx-phone:hover { transform: rotate(0deg) translateY(-6px); }
.slx-phone-frame {
    padding: 7px;
    border-radius: 30px;
    background: linear-gradient(160deg, #363b45, #14161a);
    box-shadow:
        0 26px 46px -16px rgba(9, 12, 24, .66),
        inset 0 0 0 1px rgba(255, 255, 255, .11);
}
.slx-phone-view {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 9 / 19;
    background: #0e1014;
}
.slx-phone-view img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.slx-phone-notch {
    position: absolute;
    top: 7px;
    left: 50%;
    z-index: 2;
    width: 54px;
    height: 13px;
    transform: translateX(-50%);
    border-radius: 9px;
    background: #0c0e12;
}
.slx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.slx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 12.5px;
    letter-spacing: .01em;
    color: rgba(0, 0, 0, .66);
    background: rgba(63, 81, 181, .09);
    border: 1px solid rgba(63, 81, 181, .14);
}
.slx-chip .material-icons { font-size: 15px; opacity: .7; }
body.mdui-theme-layout-dark .slx-chip {
    color: rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .1);
}
.slx-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(63, 81, 181, .12);
}
.slx-meta-item { min-width: 120px; }
.slx-meta-item .k {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .55;
}
.slx-meta-item .v { margin-top: 4px; font-size: 15px; }
@media (max-width: 860px) {
    .slx-stage { margin: 26px 0 22px; padding: 0; }
    .slx-stage-inner { padding-right: 18px; }
    .slx-laptop { transform: none; }
    .slx-stage-inner:hover .slx-laptop { transform: none; }
    .slx-phone {
        position: relative;
        right: auto;
        bottom: auto;
        width: 132px;
        margin: -18px auto 0;
        transform: none;
    }
    .slx-meta-row { gap: 16px; }
}

/* ---------- 教程页 ---------- */
.slx-doc-steps { display: flex; flex-direction: column; gap: 14px; }
.slx-doc-step {
    display: flex;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 14px;
    background: rgba(63, 81, 181, .05);
    border: 1px solid rgba(63, 81, 181, .10);
}
body.mdui-theme-layout-dark .slx-doc-step {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .08);
}
.slx-doc-num {
    flex: 0 0 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(135deg, #5c6bc0, #3f51b5);
    box-shadow: 0 6px 14px -6px rgba(63, 81, 181, .7);
}
.slx-doc-body { min-width: 0; }
.slx-shot {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 18px 40px -24px rgba(9, 12, 24, .5);
    background: #f3f4f8;
}
body.mdui-theme-layout-dark .slx-shot { border-color: rgba(255, 255, 255, .1); background: #16181d; }
.slx-shot img { display: block; width: 100%; height: auto; }
.slx-faq-list { padding: 0; margin: 0; }
.slx-faq-item { align-items: flex-start !important; height: auto !important; padding-top: 16px !important; padding-bottom: 16px !important; }
.slx-faq-item .mdui-list-item-icon { margin-top: 2px; }
.slx-faq-item .mdui-list-item-title { font-size: 15px; }
.slx-faq-item .mdui-list-item-text { margin-top: 4px; opacity: .72; line-height: 1.6; }

@media (max-width: 599px) {
    .slx-stage { padding: 18px 12px 20px; margin: 18px 0 32px; border-radius: 18px; }
    .slx-phone { width: 124px; margin-top: -28px; margin-right: 2px; }
}

/* ---------- 按钮内部对齐：图标与文字统一居中 ---------- */
.mdui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    vertical-align: middle;
}
.mdui-btn > .material-icons,
.mdui-btn > .mdui-icon {
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}
.mdui-btn > .material-icons:only-child { margin: 0; }
.slx-icon-trail { margin-left: 0; }

/* ---------- 移动端抽屉导航 ---------- */
.mdui-toolbar > .slx-nav-toggle { display: none; }
@media (min-width: 600px) {
    #slx-nav-drawer { display: none !important; }
}
@media (max-width: 599px) {
    .mdui-toolbar > .slx-nav-toggle { display: inline-flex !important; margin-left: 0; margin-right: 0; }
    .mdui-toolbar > .mdui-btn.slx-appbar-cta { display: none !important; }
    .mdui-appbar .mdui-toolbar { padding-right: 6px; }
}
.slx-drawer-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
}
.mdui-drawer .mdui-list-item { padding-left: 24px; }

/* ---------- 作者头像 ---------- */
img.slx-author-avatar {
    object-fit: cover;
    background: #e8eaf6;
    border-radius: 50%;
}

/* ---------- 教程步骤 ---------- */
.slx-doc-steps { display: grid; gap: 12px; }

#slx-nav-drawer { width: 272px; max-width: 82vw; }
.slx-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 10px 20px;
}
.slx-drawer-head .mdui-typo-title { font-size: 17px; }

/* 插件页 hero 收紧，让样机在首屏完整露出 */
.slx-wp-page .slx-wp-hero.mdui-p-t-4 { padding-top: 16px !important; }

/* 控制台主区域呼吸感：卡片不贴边 */
main.mdui-container-fluid {
    padding: 16px 24px 40px;
}
@media (max-width: 767px) {
    main.mdui-container-fluid { padding: 12px 12px 32px; }
}

/* 同一行内的卡片等高 */
.slx-row > [class*="mdui-col"] > .mdui-card { flex: 1 1 auto; }

/* 纯文本标签行：不再使用自绘胶囊 */
.slx-wp-badge .material-icons { font-size: 16px; opacity: .7; }
.slx-step-index { font-size: 12.5px; letter-spacing: .08em; }

/* 开发者文档：单列阅读宽度，代码块用浅底 */
.slx-doc-page {
    max-width: 920px;
    padding-top: 28px;
    padding-bottom: 24px;
}
.slx-doc-hero {
    padding: 4px 0 0;
}
.slx-doc-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    margin: 22px 0 6px;
    border-radius: 8px;
    background: rgba(63, 81, 181, .07);
    font-size: 14px;
    line-height: 1.7;
}
.slx-doc-note .material-icons {
    font-size: 20px;
    line-height: 1.4;
    color: #3f51b5;
}
.slx-doc-h2 {
    margin: 38px 0 12px;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.4;
}
.slx-doc-code {
    margin: 12px 0 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f5f6f8;
}
.slx-doc-code pre {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
}
.slx-doc-code-title {
    margin-bottom: 6px;
    font-size: 12px;
    color: #6b7280;
}
.slx-api-steps {
    margin: 4px 0 8px;
}
.slx-api-step {
    padding: 2px 0 12px;
}
.slx-api-step-n {
    display: inline-block;
    min-width: 22px;
    margin-right: 6px;
    font-weight: 600;
    color: #3f51b5;
}
.slx-api-step b {
    font-weight: 500;
}
.slx-api-step p {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(0, 0, 0, .6);
}
.slx-doc-list li {
    margin-bottom: 6px;
}
.slx-doc-security .mdui-card-content {
    font-size: 13px;
    line-height: 1.7;
}
body.mdui-theme-layout-dark .slx-doc-note {
    background: rgba(121, 134, 203, .14);
}
body.mdui-theme-layout-dark .slx-doc-note .material-icons,
body.mdui-theme-layout-dark .slx-api-step-n {
    color: #9fa8da;
}
body.mdui-theme-layout-dark .slx-doc-code {
    background: rgba(255, 255, 255, .08);
}
body.mdui-theme-layout-dark .slx-doc-code-title,
body.mdui-theme-layout-dark .slx-api-step p {
    color: rgba(255, 255, 255, .6);
}

/* MDUI 开关：滑块会伸出轨道 4px，文字要留出距离 */
.slx-switch-label {
    margin-left: 12px;
}

/* 邮件设置：helper 文字不截断，移动端端口/加密各占一行 */
.slx-mail-form .mdui-textfield {
    overflow: visible;
}
.slx-mail-form .mdui-textfield-helper {
    position: static;
    bottom: auto;
    height: auto;
    margin-top: 6px;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.5;
}
.slx-mail-secure {
    margin-top: 4px;
}
.slx-mail-secure .mdui-select {
    width: 100%;
}
@media (max-width: 599px) {
    .slx-mail-port,
    .slx-mail-secure {
        margin-top: 8px;
    }
}
