/* ==========================================================================
   知错鸟官网样式（www.zhicuoniao.com）
   --------------------------------------------------------------------------
   来源：docs/APP官网/docs/04_视觉设计规范.md + assets/design-tokens.css。
   色值、圆角、阴影一律以令牌为准，不要在规则里另写品牌色，避免 VI 改色时漏改。

   为什么是独立文件而不是内联到 Blade：规范 §06-4 要求上线 CSP，
   script-src/style-src 不开 'unsafe-inline' 时内联样式与脚本都会被拦；
   九个页面共用一份样式，长缓存 + ?v= 版本号的传输量也远小于每页内联。
   仍然不引任何外部 CDN：字体走系统栈（§06-3 不加载完整中文字体包）。
   ========================================================================== */

/* ---------------------------------------------------------- 1. 设计令牌 */

:root {
    --brand-primary: #6caf7b;
    --brand-light: #8bc68d;
    --brand-pale: #cde5cf;
    --brand-mint: #eaf3e8;
    --ivory: #f7f3ea;
    --forest: #2e3a2f;
    --text-secondary: #5a6b5c;
    --text-muted: #8fa191;
    --border: #c7d1c9;
    --warm-yellow: #ffd98a;
    --cream: #ffecc2;
    --surface-white: #f3f6f0;
    --surface-soft: #e9ece7;
    --accent-natural: #a7c7a0;
    --accent-sage: #dce9d7;
    --error: #f26d62;

    --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-latin: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    --shadow-paper: 0 12px 40px rgb(46 58 47 / 8%);
    --shadow-lift: 0 18px 56px rgb(46 58 47 / 12%);

    /* 断点内边距与内容宽度（交互规格 §2） */
    --page-pad: 20px;
    --content-max: 1200px;
    --reading-max: 680px;
    --header-h: 116px;

    /* 区块纵向间距：移动 72–96，桌面 112–160（视觉规范 §4） */
    --section-gap: 76px;

    --ease-out: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 768px) {
    :root {
        --page-pad: 32px;
        --header-h: 144px;
        --section-gap: 112px;
    }
}

@media (min-width: 1024px) {
    :root {
        --page-pad: 40px;
        --header-h: 144px;
        --section-gap: 136px;
    }
}

@media (min-width: 1440px) {
    :root {
        --page-pad: 64px;
        --content-max: 1280px;
    }
}

/* ---------------------------------------------------------- 2. 基础重置 */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* 锚点跳转时留出粘性页头高度，否则标题被压住 */
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--ivory);
    color: var(--forest);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.75;
    /* 页头固定，正文顶部留白由具体页面处理 */
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.375rem, 1.6rem + 3.1vw, 4rem);
    line-height: 1.18;
    text-wrap: balance;
}

h2 {
    font-size: clamp(2rem, 1.5rem + 2.1vw, 2.5rem);
    line-height: 1.25;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 650;
}

p {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: var(--forest);
    text-decoration-color: var(--border);
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-color: var(--brand-primary);
}

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

button {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

/* 数字与英文走 Inter，中文回退思源黑体（视觉规范 §3） */
.num,
.latin {
    font-family: var(--font-latin);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- 3. 无障碍基座 */

.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    inset-block-start: -64px;
    z-index: 60;
    padding: 12px 20px;
    background: var(--forest);
    color: var(--ivory);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: inset-block-start .18s var(--ease-out);
}

.skip-link:focus {
    inset-block-start: 0;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    /* §06-2：可见焦点环 ≥ 2px，且不得用 outline:none 抹掉 */
    outline: 3px solid var(--forest);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.on-dark :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline-color: var(--warm-yellow);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* 键盘用户才看见的跳转提示，鼠标用户看不到（避免视觉噪声） */
.only-keyboard {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------------------------------- 4. 版心与区块 */

.wrap {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--page-pad);
}

.wrap-narrow {
    max-width: var(--reading-max);
}

main {
    display: block;
}

.section {
    padding-block: var(--section-gap);
}

.section-tight {
    padding-block: calc(var(--section-gap) * .68);
}

.section-head {
    max-width: 44em;
    margin-block-end: 40px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-block-end: 14px;
    padding: 6px 14px;
    background: var(--brand-mint);
    color: var(--forest);
    border: 1px solid var(--brand-pale);
    border-radius: var(--radius-pill);
    font-size: .875rem;
    font-weight: 650;
    letter-spacing: .01em;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--brand-primary);
    border-radius: 50%;
}

.section-head h2 {
    margin-block-end: 14px;
}

.lead {
    max-width: var(--reading-max);
    color: var(--text-secondary);
    font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
}

.muted {
    color: var(--text-muted);
    font-size: .9375rem;
}

/* ---------------------------------------------------------- 5. 页头 */

.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: rgb(247 243 234 / 82%);
    border-block-end: 1px solid transparent;
    transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out);
}

/* 滚动 24px 后加不透明米白底与分隔线，不用重阴影（交互规格 §3） */
.site-header.is-scrolled {
    background: var(--ivory);
    border-block-end-color: var(--border);
}

.header-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

/* 横版主 LOGO（鸟图 + 字标）大尺寸展示：移动 96px 受 320px 屏宽限制，≥768px 按需 120px */
.brand img {
    height: 96px;
    width: auto;
}

@media (min-width: 768px) {
    .brand img {
        height: 120px;
    }
}

.nav-toggle {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: .9375rem;
    font-weight: 650;
}

.nav-toggle .bars {
    display: grid;
    gap: 3px;
    width: 16px;
}

.nav-toggle .bars i {
    display: block;
    height: 2px;
    background: var(--forest);
    border-radius: 2px;
    transition: transform .2s var(--ease-out), opacity .2s var(--ease-out);
}

.nav-toggle[aria-expanded="true"] .bars i:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bars i:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bars i:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* 折叠态只由 JS 接管：没有 JS 时列表直接展开，核心导航仍可用（交互规格 §3、§7） */
.site-nav[data-collapsed="true"] {
    display: none;
}

.site-nav[data-collapsed="true"].is-open {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: 49;
    padding: 24px var(--page-pad) 32px;
    background: var(--ivory);
    border-block-end: 1px solid var(--border);
    box-shadow: var(--shadow-paper);
    overflow-y: auto;
    max-height: calc(100svh - var(--header-h));
}

.site-nav ul {
    display: grid;
    gap: 4px;
}

.site-nav a {
    display: block;
    padding: 14px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1.0625rem;
    font-weight: 600;
}

.site-nav a:hover {
    color: var(--forest);
    background: var(--brand-mint);
}

/* 当前页用「下划线 + 底色」双重提示，不只靠颜色（交互规格 §3） */
.site-nav a[aria-current="page"] {
    color: var(--forest);
    background: var(--brand-pale);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.header-cta {
    display: none;
}

/* 抽屉内的主 CTA：移动端 header-cta 隐藏，靠它保证「下载 / 加入体验」在窄屏也拿得到 */
.nav-cta {
    margin-block-start: 18px;
}

.nav-cta .btn {
    inline-size: 100%;
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }

    .site-nav,
    .site-nav[data-collapsed="true"] {
        display: block;
        margin-inline-start: auto;
    }

    .site-nav ul {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .site-nav a {
        padding: 8px 14px;
        font-size: 1rem;
        border-radius: var(--radius-pill);
    }

    .site-nav a[aria-current="page"] {
        background: var(--brand-mint);
        text-underline-offset: 4px;
    }

    .header-cta {
        display: inline-flex;
        margin-inline-start: 12px;
    }

    .nav-cta {
        display: none;
    }
}

/* ---------------------------------------------------------- 6. 按钮 */

.btn {
    --btn-pad-y: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: var(--btn-pad-y) 26px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1.0625rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    /* 触控目标 ≥ 44×44（无障碍 §06-2） */
    touch-action: manipulation;
    transition: background-color .18s var(--ease-out), transform .18s var(--ease-out), border-color .18s var(--ease-out);
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
}

.btn-primary:hover {
    background: #5f9d6d;
}

.btn-primary:active {
    background: #548c62;
    transform: translateY(1px);
}

.btn-secondary {
    background: var(--brand-pale);
    color: var(--forest);
}

.btn-secondary:hover {
    background: #bcdec0;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--forest);
}

.btn-ghost:hover {
    background: var(--surface-white);
    border-color: var(--brand-light);
}

.btn-text {
  min-height: 44px;
  padding: 10px 4px;
  background: none;
  color: var(--forest);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* 未配置链接时的「即将上线」：不可点击，也不给假 href */
.btn-disabled {
    background: var(--surface-soft);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: var(--border);
}

.btn-sm {
    --btn-pad-y: 10px;
    min-height: 44px;
    padding-inline: 18px;
    font-size: .9375rem;
}

.btn-loading {
    pointer-events: none;
    opacity: .75;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

/* ---------------------------------------------------------- 7. 卡片与纸张感 */

.card {
    padding: 28px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-paper);
}

.card-flat {
    background: var(--surface-white);
    box-shadow: none;
}

.card h3 {
    margin-block-end: 8px;
}

/* 卡片里的小标题（设备名等）：视觉与 .card h3 一致，但不占标题层级。
   写成 .card .card-title 是为了压过下面的 .card p 颜色规则（特异性 0-2-0 > 0-1-1）。 */
.card .card-title {
    margin-block-end: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--forest);
}

.card p {
    color: var(--text-secondary);
}

.card-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-block-end: 16px;
    background: var(--brand-mint);
    border-radius: var(--radius-md);
}

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

.grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
}

/* ---------------------------------------------------------- 8. Hero */

.hero {
    position: relative;
    padding-block: 44px 0;
    overflow: clip;
}

@media (min-width: 1024px) {
    .hero {
        display: grid;
        min-height: max(680px, calc(100svh - var(--header-h)));
        align-items: center;
        padding-block: 64px 72px;
    }
}

/* 背景：一层极浅的薄荷渐变 + 纸感，不引外部图 */
.hero::before {
    content: "";
    position: absolute;
    inset: -20% -20% auto -20%;
    height: 120%;
    background:
        radial-gradient(58% 52% at 78% 26%, var(--brand-mint) 0%, rgb(234 243 232 / 0%) 72%),
        radial-gradient(46% 44% at 8% 78%, var(--accent-sage) 0%, rgb(220 233 215 / 0%) 70%);
    z-index: 0;
    pointer-events: none;
}

.hero .wrap {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 40px;
}

@media (min-width: 1024px) {
    .hero .wrap {
        grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
        align-items: center;
        gap: 48px;
    }
}

.hero h1 {
    margin-block: 6px 20px;
    max-width: 15em;
}

.hero .lead {
    margin-block-end: 30px;
}

.hero-note {
    margin-block-start: 20px;
    color: var(--text-muted);
    font-size: .9375rem;
}

.hero-visual {
    position: relative;
    display: grid;
    gap: 20px;
    justify-items: center;
}

@media (min-width: 1024px) {
    .hero-visual {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: end;
        gap: 8px;
    }
}

/* 小知：首屏唯一实时加载的 IP，装饰性故 alt 为空 */
.hero-mascot {
    width: clamp(160px, 40vw, 268px);
    align-self: end;
}

.hero-mascot img {
    width: 100%;
    height: auto;
}

.hero-shot {
    position: relative;
    width: min(320px, 78vw);
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lift);
}

.hero-shot img {
    width: 100%;
    border-radius: calc(var(--radius-xl) - 8px);
}

.hero-shot figcaption {
    padding: 10px 6px 4px;
    color: var(--text-secondary);
    font-size: .875rem;
    line-height: 1.5;
}

@media (min-width: 1024px) {
    .hero-shot {
        width: min(330px, 30vw);
        transform: rotate(-1.2deg);
    }
}

/* 呼吸感：幅度极小、周期 7s，符合 §5 动效原则 */
.breathe {
    animation: breathe 7s ease-in-out infinite;
    transform-origin: 50% 90%;
}

@keyframes breathe {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.012); }
}

/* 子页通用页头（无 Hero 叠层，只留主张与导语） */
.page-head {
    padding-block: clamp(48px, 9vw, 96px) 0;
}

.page-head h1 {
    max-width: 20em;
    margin-block: 10px 18px;
}

.page-head .hero-mascot {
    width: clamp(120px, 26vw, 168px);
}

@media (min-width: 768px) {
    .page-head-split {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 32px;
    }
}

/* ---------------------------------------------------------- 9. 问题共鸣对照 */

.contrast {
    display: grid;
    gap: 16px;
    margin-block-start: 32px;
}

@media (min-width: 768px) {
    .contrast {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.contrast-item {
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-white);
}

/* 「不是」用中性灰、「而是」用浅绿：错误类内容不用红色（视觉规范 §2） */
.contrast-item.is-not {
    background: var(--surface-soft);
    color: var(--text-secondary);
}

.contrast-item.is-but {
    background: var(--brand-mint);
    border-color: var(--brand-pale);
}

.contrast-kind {
    display: block;
    margin-block-end: 6px;
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text-muted);
}

.contrast-item.is-but .contrast-kind {
    color: #3f6f4a;
}

/* ---------------------------------------------------------- 10. 五步闭环 */

/* 桌面横向 5 步；移动纵向时间线。序号与文字同时存在，不只用图标（§4） */
.loop {
    counter-reset: step;
    display: grid;
    gap: 4px;
    position: relative;
}

.loop-step {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    padding-block: 18px;
}

.loop-step::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-block-end: 0;
    inset-inline-start: 21px;
    width: 2px;
    background: var(--brand-pale);
}

.loop-step:first-child::before {
    inset-block-start: 26px;
}

.loop-step:last-child::before {
    inset-block-end: auto;
    block-size: 26px;
}

.loop-no {
    counter-increment: step;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-latin);
    font-size: 1.0625rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.loop-no::after {
    content: counter(step);
}

.loop-step h3 {
    font-size: 1.25rem;
    margin-block-end: 4px;
}

.loop-step p {
    color: var(--text-secondary);
}

@media (min-width: 1024px) {
    .loop {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 20px;
    }

    .loop-step {
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
        padding-block: 24px 0;
    }

    .loop-step::before {
        inset: 21px auto auto 21px;
        inline-size: calc(100% + 20px);
        block-size: 2px;
    }

    .loop-step:first-child::before {
        inset-inline-start: 43px;
        inline-size: calc(100% - 22px);
    }

    .loop-step:last-child::before {
        inline-size: 0;
        block-size: 2px;
    }
}

/* 七步旅程：桌面横向 5 列放不下七步，改用编号卡片网格；
   序号与文字同时存在（交互规格 §4），不靠颜色区分先后 */
.step-grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 768px) {
    .step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .step-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.step-card {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-paper);
}

.step-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.125rem;
    margin-block-end: 8px;
}

.step-card p {
    color: var(--text-secondary);
}

.num-badge {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    inline-size: 32px;
    block-size: 32px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-latin);
    font-size: .9375rem;
    font-weight: 700;
}

/* 「小知是谁」这类以 IP 为主体的区块：比 .mascot-inline 大一号 */
.mascot-lg {
    inline-size: clamp(160px, 34vw, 260px);
    block-size: auto;
}

/* ---------------------------------------------------------- 11. 错因标签 */

/* 纯展示不可点：避免暗示筛选功能（交互规格 §4） */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-block: 28px;
}

.tag {
    padding: 9px 18px;
    background: var(--brand-pale);
    color: #2f4230;
    border-radius: var(--radius-pill);
    font-size: .9375rem;
    font-weight: 600;
}

.tag-soft {
    background: var(--surface-white);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 500;
}

.tag-warm {
    background: var(--cream);
    color: #6b5320;
    border: 1px solid var(--warm-yellow);
}

/* ---------------------------------------------------------- 12. 对话与引用 */

.quote {
    margin-block-start: 32px;
    padding: 26px 28px;
    background: var(--surface-white);
    border-inline-start: 4px solid var(--brand-primary);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: 1.125rem;
    line-height: 1.7;
}

.quote footer {
    margin-block-start: 10px;
    color: var(--text-muted);
    font-size: .9375rem;
}

.dialogue {
    display: grid;
    gap: 14px;
    margin-block-start: 8px;
}

.turn {
    display: grid;
    gap: 6px;
    max-width: 46ch;
}

.turn .who {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text-muted);
}

.turn .said {
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* 小知的话用浅绿底并右移，形成对话方向感 */
.turn.is-xiaozhi {
    margin-inline-start: auto;
}

.turn.is-xiaozhi .who {
    text-align: end;
    color: #3f6f4a;
}

.turn.is-xiaozhi .said {
    background: var(--brand-mint);
    border-color: var(--brand-pale);
    position: relative;
}

/* 小知气泡带一个小尾巴。刻意用边框画而不是引 IP 图：
   CSS 里写死的 url 拿不到 manifest 的 ?v= 版本号，长缓存下会拿到旧素材。 */
.turn.is-xiaozhi .said::after {
    content: "";
    position: absolute;
    inset-block-end: -8px;
    inset-inline-end: 26px;
    inline-size: 14px;
    block-size: 14px;
    background: var(--brand-mint);
    border-inline-end: 1px solid var(--brand-pale);
    border-block-end: 1px solid var(--brand-pale);
    border-end-end-radius: 3px;
    transform: rotate(45deg);
}

/* ---------------------------------------------------------- 13. 产品界面画廊 */

.gallery {
    position: relative;
}

.gallery-track {
    display: grid;
    gap: 16px;
    /* 移动端横向可滑，带分页指示（交互规格 §4） */
    grid-auto-flow: column;
    grid-auto-columns: min(78vw, 300px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--page-pad);
    padding-inline: max(var(--page-pad), calc((100vw - var(--content-max)) / 2 + var(--page-pad)));
    padding-block-end: 12px;
    -webkit-overflow-scrolling: touch;
}

.gallery-track::-webkit-scrollbar {
    height: 6px;
}

.gallery-track::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-pill);
}

@media (min-width: 1024px) {
    /* 桌面同样横向滚动：鼠标用户没有横向滚轮，配左右按钮与拖拽；
       首尾卡与正文内容区对齐，边缘露出下一张提示可滑（交互规格 §4） */
    .gallery-track {
        grid-auto-columns: clamp(300px, 26vw, 348px);
        gap: 24px;
        padding-block-end: 16px;
        scroll-padding-inline: max(var(--page-pad), calc((100vw - var(--content-max)) / 2 + var(--page-pad)));
        cursor: grab;
    }

    .gallery-track:active {
        cursor: grabbing;
    }

    /* 拖拽进行中先关掉吸附，松手后再吸回整卡，避免拖动过程被拽偏 */
    .gallery.is-dragging .gallery-track {
        scroll-snap-type: none;
        cursor: grabbing;
    }

    .gallery.is-dragging .shot {
        transform: none;
        box-shadow: var(--shadow-paper);
        user-select: none;
    }

    /* 统一截图区高度：竖版截图正好铺满，宽幅（家长周报）等比居中留白，卡片底边齐平 */
    .gallery-track .shot img {
        aspect-ratio: 720 / 1558;
        object-fit: contain;
    }
}

.shot {
    display: block;
    width: 100%;
    padding: 12px 12px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-paper);
    text-align: start;
    cursor: zoom-in;
    scroll-snap-align: start;
    transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out);
}

.shot:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.shot img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    /* 禁掉图片原生拖拽：按住卡片拖动时若起点落在 img 上，
       Chrome 会启动图片拖拽并派发 pointercancel，横滑拖拽会被中断 */
    -webkit-user-drag: none;
}

.shot figcaption, .shot .shot-cap {
    display: block;
    padding-block: 12px 14px;
}

.shot-label {
    display: inline-block;
    margin-block-end: 4px;
    padding: 3px 10px;
    background: var(--brand-mint);
    border-radius: var(--radius-pill);
    font-size: .8125rem;
    font-weight: 700;
    color: #3f6f4a;
}

.shot-cap {
    color: var(--text-secondary);
    font-size: .9375rem;
    line-height: 1.6;
}

/* 控制条：桌面出现左右按钮，dots 居中；移动端仍只有 dots（纯滑动为主）
   （选择器带 .gallery-ui 前缀：.icon-btn 自带 display:inline-grid 且定义在后，
   同特异性下会覆盖 .gallery-btn 的隐藏，必须提级才能压住） */
.gallery-ui {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-block-start: 16px;
}

.gallery-ui .gallery-btn {
    display: none;
    flex: none;
}

@media (min-width: 1024px) {
    .gallery-ui .gallery-btn {
        display: inline-grid;
        border-radius: 50%;
    }

    .gallery-btn[disabled] {
        opacity: .4;
        cursor: default;
    }

    .gallery-btn[disabled]:hover {
        background: var(--surface-white);
    }
}

.dots {
    display: flex;
    gap: 8px;
}

.dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: background-color .2s var(--ease-out), transform .2s var(--ease-out);
}

.dots i.is-active {
    background: var(--brand-primary);
    transform: scale(1.3);
}

/* 图片预览对话框：焦点进入/返回、键盘左右切换（交互规格 §6） */
.preview {
    width: min(92vw, 520px);
    max-block-size: 92vh;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: #fff;
    color: var(--forest);
    overflow: visible;
}

.preview::backdrop {
    background: rgb(46 58 47 / 78%);
    backdrop-filter: blur(2px);
}

.preview img {
  width: 100%;
  max-block-size: 62vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-block-end: 14px;
}

.preview-cap {
    margin-block-start: 14px;
    color: var(--text-secondary);
    font-size: .9375rem;
}

.preview-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-block-start: 16px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    background: var(--surface-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 700;
}

.icon-btn:hover {
    background: var(--brand-mint);
}

/* ---------------------------------------------------------- 14. 清单 */

.list {
    display: grid;
    gap: 14px;
}

.list li {
    position: relative;
    padding-inline-start: 34px;
    color: var(--text-secondary);
}

/* 绿色对勾表达「我们坚持」，不用红色叉：儿童错误语义不进品牌色（视觉规范 §2） */
.list li::before {
    content: "";
    position: absolute;
    inset-block-start: .55em;
    inset-inline-start: 0;
    inline-size: 20px;
    block-size: 20px;
    border-radius: 50%;
    background: var(--brand-pale);
}

.list li::after {
    content: "";
    position: absolute;
    inset-block-start: calc(.55em + 5px);
    inset-inline-start: 5px;
    inline-size: 10px;
    block-size: 6px;
    border-inline-start: 2px solid #2f4230;
    border-block-start: 2px solid #2f4230;
    transform: rotate(-45deg);
}

.list-plain li {
    padding-inline-start: 0;
}

.list-plain li::before,
.list-plain li::after {
    display: none;
}

.split {
    display: grid;
    gap: 32px;
}

/* 单张产品图 + 说明：与画廊卡片同一套纸感，但不可点，不给 zoom-in 光标 */
.frame {
    padding: 12px 12px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-paper);
}

.frame img {
    inline-size: 100%;
    block-size: auto;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.frame figcaption {
    padding-block: 12px 14px;
    color: var(--text-secondary);
    font-size: .9375rem;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .split {
        grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
        align-items: center;
        gap: 56px;
    }

    .split-reverse > :first-child {
        order: 2;
    }
}

/* ---------------------------------------------------------- 15. 安全区块（深森林绿） */

.band-dark {
    position: relative;
    background: var(--forest);
    color: var(--ivory);
    padding-block: var(--section-gap);
    overflow: clip;
}

/* 装饰叶片：纯 CSS，不引额外图，也不往 IP 上叠文字（视觉规范 §6） */
.band-dark::before,
.band-dark::after {
    content: "";
    position: absolute;
    inline-size: 340px;
    block-size: 340px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgb(140 198 141 / 26%), rgb(140 198 141 / 0%) 68%);
    pointer-events: none;
}

.band-dark::before {
    inset-block: -140px auto;
    inset-inline: -120px auto;
}

.band-dark::after {
    inset-block: auto -160px;
    inset-inline: auto -110px;
}

.band-dark > .wrap {
    position: relative;
    z-index: 1;
}

.band-dark h2 {
    color: #fff;
}

.band-dark .lead,
.band-dark .muted {
    color: #d9e4da;
}

.band-dark .eyebrow {
    background: rgb(255 255 255 / 12%);
    border-color: rgb(255 255 255 / 22%);
    color: var(--ivory);
}

.band-dark .list li {
    color: #e6eee6;
}

.band-dark .list li::before {
    background: rgb(140 198 141 / 34%);
}

.band-dark .list li::after {
    border-color: var(--ivory);
}

/* 深色底上的小知：放进米白圆盘，保证对比度也不改 IP 颜色 */
.mascot-plate {
    display: grid;
    place-items: center;
    inline-size: clamp(140px, 34vw, 200px);
    aspect-ratio: 1;
    margin-inline: auto;
    padding: 12px;
    background: var(--ivory);
    border-radius: 50%;
}

.mascot-plate img {
    inline-size: 88%;
    block-size: auto;
}

/* 品牌色收尾区：浅绿底 + 中号小知 */
.band-soft {
    background: var(--brand-mint);
    border-block: 1px solid var(--brand-pale);
    padding-block: calc(var(--section-gap) * .8);
}

.band-soft .cta-card {
    display: grid;
    gap: 24px;
    align-items: center;
}

@media (min-width: 768px) {
    .band-soft .cta-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

.cta-card h2 {
    margin-block-end: 10px;
}

.cta-card .mascot-plate {
    background: #fff;
    margin-inline: 0;
}

/* 单个小知装饰（非首屏）统一尺寸，同一屏最多 2 个（视觉规范 §6） */
.mascot-inline {
    inline-size: clamp(96px, 22vw, 132px);
    block-size: auto;
}

/* ---------------------------------------------------------- 16. 页脚 */

.site-footer {
    background: var(--forest);
    color: #cfdacf;
    padding-block: 56px 40px;
    font-size: .9375rem;
}

.footer-top {
    display: grid;
    gap: 32px;
    padding-block-end: 32px;
    border-block-end: 1px solid rgb(255 255 255 / 14%);
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
        gap: 40px;
    }
}

.site-footer .brand img {
    height: 38px;
}

/* 页脚用 symbol 而不是反白全称 Logo：后者展开后 120 KB，不适合出现在九个页面上 */
.footer-logo {
    block-size: 44px;
    inline-size: auto;
}

.footer-claim {
    margin-block-start: 14px;
    color: var(--ivory);
    font-size: 1.0625rem;
    font-weight: 600;
}

/* 页脚链接组标题：段落而不是 <h3>，不进文档标题大纲（见布局注释） */
.footer-title {
    margin-block: 0 14px;
    font-size: .875rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-light);
}

.footer-col ul {
    display: grid;
    gap: 10px;
}

.footer-col a {
    color: #d9e4da;
    text-decoration: none;
}

.footer-col a:hover {
    color: #fff;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
    margin-block-start: 24px;
    color: #a9b8aa;
}

.footer-legal a {
    color: #cfdacf;
}

/* 未配置项显示占位提示而不是假信息（README：不得使用假备案与假链接） */
.footer-pending {
    color: #93a394;
    font-style: normal;
}

.footer-note {
    margin-block-start: 16px;
    color: #93a394;
    font-size: .875rem;
}

/* ---------------------------------------------------------- 17. 表单 */

.form-card {
    padding: clamp(24px, 5vw, 36px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-paper);
}

.form-grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.field label,
.field legend {
    display: block;
    margin-block-end: 8px;
    font-weight: 650;
    /* 标签始终可见，不用 placeholder 代替（交互规格 §6） */
    color: var(--forest);
}

/* 联系方式既可能是手机号也可能是邮箱，只能用 type=text：
   按类型写选择器会让输入框退成浏览器默认样式，这里按元素统一收。 */
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
    inline-size: 100%;
    min-block-size: 52px;
    padding: 12px 16px;
    background: var(--surface-white);
    color: var(--forest);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font: inherit;
}

.field input:focus,
.field select:focus {
    outline: 3px solid var(--brand-primary);
    outline-offset: 2px;
    border-color: var(--brand-primary);
}

.field .hint {
    display: block;
    margin-block-start: 8px;
    color: var(--text-muted);
    font-size: .875rem;
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-block-size: 44px;
    padding: 10px 16px;
    background: var(--surface-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 600;
}

.choice:has(input:checked) {
    background: var(--brand-pale);
    border-color: var(--brand-primary);
    color: #2f4230;
}

.choice input {
    accent-color: var(--brand-primary);
    inline-size: 18px;
    block-size: 18px;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--brand-mint);
    border-radius: var(--radius-md);
    font-size: .9375rem;
}

.consent input {
    flex-shrink: 0;
    inline-size: 22px;
    block-size: 22px;
    margin-block-start: 2px;
    accent-color: var(--brand-primary);
}

.field-error {
    display: block;
    margin-block-start: 8px;
    color: #a8362c;
    font-size: .875rem;
    font-weight: 600;
}

.field.is-invalid input,
.field.is-invalid select {
    border-color: var(--error);
}

.form-status {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.form-status.is-success {
    background: var(--brand-pale);
    color: #2f4230;
}

.form-status.is-error {
    background: #fdecea;
    color: #8c2f26;
    border: 1px solid var(--error);
}

/* 限流、重复提交这类「不是谁的错」的提示：用暖黄，不套错误语义 */
.form-status.is-warn {
    background: var(--cream);
    color: var(--forest);
}

/* 蜜罐：不能用 display:none（部分管理工具会目视检查），移出视口且不入焦点序 */
.hp-field {
    position: absolute !important;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------------------------------------------------------- 18. 法务长文 */

.article {
    padding-block: clamp(40px, 7vw, 72px) clamp(64px, 9vw, 96px);
}

.article-body {
    max-width: var(--reading-max);
    margin-inline: auto;
}

.article-body h1 {
    margin-block-end: 12px;
}

/* 长文里小节数量多，标题只比正文大一档：层级清楚但不抢正文 */
.article-body h2 {
    font-size: clamp(1.3125rem, 1.15rem + .7vw, 1.5rem);
    margin-block: 44px 12px;
}

.article-body h3 {
    font-size: 1.125rem;
    margin-block: 28px 8px;
}

.article-body p,
.article-body li {
    color: #3b4a3d;
}

.article-body p + p,
.article-body p + ul {
    margin-block-start: 14px;
}

/* 卡片组后面紧跟正文时补一段呼吸：卡片自带内边距，不隔开会粘在下一段上 */
.article-body .grid + p {
    margin-block-start: 20px;
}

.article-body ul {
    display: grid;
    gap: 8px;
    margin-block-start: 12px;
}

.article-body ul li {
    position: relative;
    padding-inline-start: 22px;
}

.article-body ul li::before {
    content: "";
    position: absolute;
    inset-block-start: .72em;
    inset-inline-start: 4px;
    inline-size: 7px;
    block-size: 7px;
    border-radius: 50%;
    background: var(--brand-light);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    margin-block-end: 28px;
    color: var(--text-muted);
    font-size: .9375rem;
}

.note {
    margin-block-start: 28px;
    padding: 18px 20px;
    background: var(--cream);
    border: 1px solid var(--warm-yellow);
    border-radius: var(--radius-lg);
    color: #6b5320;
    font-size: .9375rem;
}

.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-block-start: 40px;
    padding-block-start: 22px;
    border-block-start: 1px solid var(--border);
}

/* ---------------------------------------------------------- 19. 状态页 */

.state-page {
    display: grid;
    place-items: center;
    min-block-size: calc(100svh - var(--header-h) - 180px);
    padding-block: 64px;
    text-align: center;
}

.state-page .mascot-plate {
    margin-block-end: 26px;
}

.state-page h1 {
    font-size: clamp(1.875rem, 1.5rem + 1.8vw, 2.75rem);
    margin-block-end: 12px;
}

.state-page .lead {
    margin-inline: auto;
    margin-block-end: 28px;
}

.state-code {
    font-family: var(--font-latin);
    color: var(--text-muted);
    letter-spacing: .12em;
}

/* ---------------------------------------------------------- 20. 滚动进入动画 */

/* 只表达「呈现与发现」：260ms 淡入 + 小位移，幅度克制（交互规格 §5） */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .26s var(--ease-out), transform .26s var(--ease-out);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
}

/* 无 JS 时必须直接可见：动画只能锦上添花，不能掌握内容可见性 */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .breathe {
        animation: none;
    }
}

/* 浏览器高对比模式：保留边框与可读性，不依赖背景色传达结构（无障碍 §06-2） */
@media (forced-colors: active) {
    .card,
    .shot,
    .btn,
    .tag,
    .form-card,
    .note {
        border: 1px solid CanvasText;
    }

    .site-nav a[aria-current="page"] {
        border: 2px solid CanvasText;
    }
}

/* 文字缩放兼容：不靠固定高度约束内容，标题与按钮均随字号自然撑开（无障碍 §06-2） */
h1, h2, h3 {
    overflow-wrap: break-word;
}

@media print {
    .site-header,
    .site-footer,
    .gallery-track,
    .actions {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}


