/* ==========================================================================
   闪卡 WinkNotes — 官网首页样式（极简暖纸 × 书卷配色体系）
   注：不改动 /css/tokens.css（供 /help/docs/ 与 ?app=1 深浅色使用），首页变量独立定义于此。
   ========================================================================== */

:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  --font-script: "Noteworthy", "Bradley Hand", "Chalkboard SE", ui-rounded, sans-serif;

  --paper-bg: #FAF5EB;
  --paper-warm: #F4EFE4;
  --paper-card: #FFFFFF;
  --paper-well: #F6F1E7;
  --ink: #1E1B32;
  --ink-soft: #2B2742;
  --muted: #5E5A6D;
  --muted-light: #7B768A;

  --cobalt: #27307A;
  --cobalt-hover: #1F2666;
  --marigold: #FCB40F;
  --vermilion: #DE3C26;
  --accent-green: #16A34A;

  --hairline: rgba(30, 27, 50, 0.08);
  --hairline-strong: rgba(30, 27, 50, 0.16);
  --radius-pill: 999px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --nav-height: 66px;
  --container-max: 1120px;
  --section-py: clamp(72px, 8vw, 108px);
  --transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--paper-bg);
  background-image: url("/img/hero-layers/paper-grain.png");
  background-size: 320px 320px;
  background-repeat: repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2.5px solid rgba(39, 48, 122, 0.45);
  outline-offset: 3px;
}

::selection {
  background: rgba(252, 180, 15, 0.28);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

h1,
h2 {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.mobile-br {
  display: none;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 1000;
  padding: 8px 14px;
  background: var(--cobalt);
  color: #FFFFFF;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 48px), var(--container-max));
  margin-inline: auto;
}

/* ==========================================================================
   顶部导航栏（顶部无分割线，滚动后毛玻璃纸感底）
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(250, 245, 235, 0.78);
  border-bottom-color: rgba(30, 27, 50, 0.08);
  box-shadow: 0 4px 20px rgba(30, 27, 50, 0.04);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

main {
  padding-top: var(--nav-height);
}

.site-nav {
  width: min(calc(100% - 48px), 1140px);
  height: var(--nav-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-icon {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 5px rgba(30, 27, 50, 0.12));
  flex-shrink: 0;
}

.brand-sub {
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a {
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cobalt);
  color: #FFFFFF !important;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
  background: var(--cobalt-hover);
  transform: translateY(-1px);
}

.nav-mobile-right {
  display: none;
  align-items: center;
  gap: 10px;
}

.menu-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

.menu-button span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--transition);
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

.mobile-drawer {
  border-top: 1px solid var(--hairline);
  background: rgba(250, 245, 235, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 12px 24px 20px;
}

.mobile-drawer nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-drawer a {
  padding: 11px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer a:last-child {
  border-bottom: none;
}

.mobile-drawer a span {
  color: var(--muted-light);
}

/* ==========================================================================
   模块 1：极简暖纸首屏（[钢笔+笔迹] 记笔记，[小灯泡] 记笔记 [小日历]。 + 双端真机）
   ========================================================================== */
.hero-wrap {
  position: relative;
}

.hero-upper-grid {
  width: min(calc(100% - 48px), 980px);
  margin-inline: auto;
  padding-top: clamp(28px, 3.6vw, 48px);
  padding-bottom: clamp(18px, 2.4vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 455px);
  align-items: center;
  gap: clamp(16px, 2.2vw, 28px);
}

.hero-title {
  margin: 0 0 22px;
  font-size: clamp(34px, 3.9vw, 52px);
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.24;
  color: var(--ink);
  font-synthesis-weight: auto;
}

.title-doodle {
  display: inline-block;
  padding-top: 0.28em;
  padding-bottom: 0.16em;
}

.doodle-pen-wrap {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.doodle-pen-trail {
  position: absolute;
  left: -0.48em;
  top: -0.18em;
  width: 1.62em;
  height: 1.58em;
  overflow: visible;
  pointer-events: none;
}

.doodle-anchor {
  position: relative;
  display: inline-block;
  z-index: 2;
}

.doodle-bulb {
  position: absolute;
  left: -0.52em;
  top: -0.52em;
  width: 0.7em;
  height: 0.74em;
  transform: rotate(-8deg);
  overflow: visible;
  pointer-events: none;
}

.doodle-cal {
  position: absolute;
  right: -0.46em;
  top: -0.36em;
  width: 0.54em;
  height: 0.54em;
  transform: rotate(9deg);
  overflow: visible;
  pointer-events: none;
}

/* 英文首屏主标题与手绘涂鸦微调（Take notes. / Remember them.） */
html[lang^="en"] .hero-title {
  font-size: clamp(32px, 3.65vw, 48px);
  line-height: 1.24;
  letter-spacing: -0.025em;
}

html[lang^="en"] .doodle-pen-trail {
  left: -0.52em;
  top: -0.14em;
  width: 2.3em;
  height: 1.48em;
}

html[lang^="en"] .doodle-bulb {
  left: auto;
  right: -0.56em;
  top: -0.46em;
  width: 0.66em;
  height: 0.7em;
  transform: rotate(10deg);
}

html[lang^="en"] .doodle-cal {
  right: -0.54em;
  top: -0.34em;
  width: 0.52em;
  height: 0.52em;
}

html[lang^="en"] .demo-mask-label {
  font-size: 16.5px;
}

/* 顶栏与页脚语言切换 */
.nav-lang {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--muted) !important;
  letter-spacing: 0.01em;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-lang:hover {
  color: var(--ink) !important;
  border-color: rgba(39, 48, 122, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.footer-bottom-right {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-lang a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.footer-lang-sep {
  opacity: 0.4;
}

.hero-sub {
  margin: 0 0 28px;
  max-width: 440px;
  font-size: clamp(16px, 1.45vw, 18px);
  font-weight: 450;
  color: var(--muted);
  line-height: 1.62;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 26px;
  background: var(--cobalt);
  color: #FFFFFF;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(39, 48, 122, 0.18);
  transition: transform var(--transition), background var(--transition),
    box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--cobalt-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(39, 48, 122, 0.26);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 11px 22px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 550;
  transition: background var(--transition), transform var(--transition),
    border-color var(--transition);
}

.btn-secondary:hover {
  background: #FFFFFF;
  border-color: rgba(39, 48, 122, 0.3);
  transform: translateY(-1px);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* 扫码浮层 */
.qr-trigger-wrap {
  position: relative;
  display: inline-flex;
}

.qr-popover {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 210px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(30, 27, 50, 0.16);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 60;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.qr-popover::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.qr-trigger-wrap.is-open .qr-popover,
.qr-trigger-wrap:focus-within .qr-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .qr-trigger-wrap:hover .qr-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

.qr-popover img {
  display: block;
  width: 148px;
  height: 148px;
  margin: 0 auto 10px;
  border-radius: 6px;
}

.qr-popover strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
}

.qr-popover small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* 右侧透明人物与着地阴影 */
.hero-girl-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

.girl-figure {
  display: block;
  width: min(100%, 455px);
  height: auto;
  position: relative;
  z-index: 2;
}

.girl-ground-shadow {
  width: min(72%, 320px);
  height: 22px;
  margin-top: -12px;
  border-radius: 50%;
  background: radial-gradient(
    50% 50% at 48% 50%,
    rgba(39, 48, 122, 0.16) 0%,
    rgba(39, 48, 122, 0) 100%
  );
  pointer-events: none;
}

/* 直陈（无底框）真机双端组合 + 手写体 iPhone · iPad · Mac 标示 */
.hero-devices-section {
  padding-bottom: clamp(54px, 6vw, 84px);
}

.device-duo-wrap {
  width: min(calc(100% - 28px), 1180px);
  margin: -12px auto 0;
  overflow: visible;
}

.hero-devices-img {
  display: block;
  width: 100%;
  height: auto;
  /* 按视觉重心左移 2.2%，让 Mac 屏幕 + iPhone 机身正对页面中轴线 */
  transform: translateX(-2.2%);
}

.hero-platform-script {
  margin: -6px auto 0;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-script);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1.25;
}

.platform-sf-icon {
  display: block;
  height: 18px;
  width: auto;
  flex-shrink: 0;
}

.platform-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(30, 27, 50, 0.28);
}

/* ==========================================================================
   通用板块容器与暖纸次表面（交替韵律：#FAF5EB <-> #F4EFE4）
   ========================================================================== */
.section {
  padding: var(--section-py) 0;
}

.section-warm {
  position: relative;
  background-color: var(--paper-warm);
  border-top: 1px solid rgba(30, 27, 50, 0.07);
  border-bottom: 1px solid rgba(30, 27, 50, 0.07);
}

.section-warm::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/img/hero-layers/paper-grain.png");
  background-size: 320px 320px;
  background-repeat: repeat;
  pointer-events: none;
}

.section-warm > .container {
  position: relative;
  z-index: 1;
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 4.4vw, 52px);
  text-align: center;
}

.section-head.compact-head {
  margin-bottom: clamp(32px, 3.8vw, 44px);
}

.section-head.align-left {
  margin-inline: 0;
  text-align: left;
  max-width: 540px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3.3vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  font-synthesis-weight: auto;
}

.section-head p {
  margin: 14px 0 0;
  font-size: 16.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.65;
  text-wrap: balance;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--cobalt);
  margin-top: 22px;
  transition: color var(--transition), transform var(--transition);
}

.text-link .arrow {
  transition: transform var(--transition);
}

.text-link:hover {
  color: var(--cobalt-hover);
}

.text-link:hover .arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   模块 2：全新编辑器（无外框双栏真实试玩）
   ========================================================================== */
.section-head.editor-minimal-head {
  margin-bottom: 20px;
}

.live-editor-stage {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
}

.live-editor-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 2px 14px;
}

.live-editor-segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(30, 27, 50, 0.07);
}

.live-seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.live-seg-btn:hover {
  color: var(--ink);
}

.live-seg-btn.is-active {
  background: var(--cobalt);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(39, 48, 122, 0.22);
}

.live-editor-bar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.live-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(30, 27, 50, 0.12);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.live-tool-btn[hidden] {
  display: none;
}

.live-tool-btn:hover {
  border-color: rgba(39, 48, 122, 0.3);
  background: #FAF8FF;
}

.live-tool-btn code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(39, 48, 122, 0.1);
  color: var(--cobalt);
}

.live-tool-btn.is-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.live-tool-btn.is-ghost:hover {
  background: rgba(30, 27, 50, 0.06);
  color: var(--ink);
}

.live-editor-sheet {
  background: #FFFFFF;
  border: 1px solid rgba(30, 27, 50, 0.09);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(30, 27, 50, 0.065), 0 2px 8px rgba(30, 27, 50, 0.025);
  overflow: hidden;
}

.live-editor-iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
  background: #FFFFFF;
}

.bento-footer-link {
  text-align: center;
  margin-top: 24px;
}

.bento-footer-link .text-link {
  margin-top: 0;
}

/* ==========================================================================
   模块 2.5：不止文字，全科都能记（方案 A · 单层胶囊切换单一舞台）
   ========================================================================== */
.section-head.rich-blocks-head {
  margin-bottom: 20px;
}

.block-stage-wrap {
  max-width: 780px;
  margin-inline: auto;
}

.block-stage-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.block-tab-btn {
  border: 1px solid rgba(30, 27, 50, 0.1);
  background: rgba(255, 253, 249, 0.72);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.block-tab-btn:hover {
  color: var(--ink);
  border-color: rgba(30, 27, 50, 0.22);
  background: #FFFFFF;
}

.block-tab-btn.is-active {
  background: var(--cobalt);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(39, 48, 122, 0.2);
}

.block-stage-sheet {
  background: #FFFFFF;
  border: 1px solid rgba(30, 27, 50, 0.09);
  border-radius: 20px;
  padding: 26px 32px 28px;
  min-height: 416px;
  box-shadow: 0 18px 48px rgba(30, 27, 50, 0.065), 0 2px 8px rgba(30, 27, 50, 0.025);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.block-pane[hidden] {
  display: none !important;
}

.demo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.1);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

.demo-tag i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--cobalt));
}

.demo-meta-note {
  font-size: 12px;
  color: var(--muted-light);
}

.demo-inline-action {
  border: 1px solid rgba(30, 27, 50, 0.12);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.demo-inline-action:hover {
  border-color: rgba(39, 48, 122, 0.3);
  background: #FAF8FF;
}

.demo-doc-h1 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #1E1B32;
}

.demo-doc-p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.72;
  color: #2B283E;
}

.demo-doc-p code,
.demo-doc-list code,
.demo-table-scroll td code {
  padding: 0.1em 0.36em;
  border-radius: 5px;
  background: rgba(120, 120, 128, 0.12);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.demo-inline-cloze {
  display: inline;
  appearance: none;
  border: 0;
  font: inherit;
  line-height: inherit;
  padding: 1px 6px;
  margin: 0 1px;
  border-radius: 5px;
  background: #FFE169;
  color: transparent;
  text-shadow: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.demo-inline-cloze code {
  background: transparent !important;
  color: inherit !important;
  padding: 0;
}

.demo-inline-cloze:hover {
  background: #FAD545;
}

.demo-inline-cloze.is-revealed {
  background: rgba(255, 225, 105, 0.32);
  color: #1E1B32;
}

/* Tab 1：图片挖空 */
.demo-rich-image svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 292px;
  margin-inline: auto;
}

.demo-mask-leaders line {
  stroke: rgba(30, 27, 50, 0.38);
  stroke-width: 2;
}

.demo-mask-leaders circle {
  fill: #27307A;
  stroke: #FFFFFF;
  stroke-width: 2.5;
}

.demo-mask-plate {
  fill: rgba(255, 225, 105, 0.26);
  stroke: rgba(217, 155, 12, 0.34);
  stroke-width: 1.2;
}

.demo-mask-label {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  fill: #1E1B32;
  text-anchor: middle;
}

.demo-image-mask {
  cursor: pointer;
  fill-opacity: 1;
  transition: fill-opacity 150ms ease;
}

.demo-image-mask:hover:not(.is-revealed) {
  fill-opacity: 0.88;
}

.demo-image-mask.is-revealed {
  fill-opacity: 0.14;
}

/* Tab 2：音频播放条与实时录音条 */
.demo-audio-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.demo-audio-divider {
  height: 1px;
  width: 100%;
  background: rgba(30, 27, 50, 0.08);
  margin: 18px 0;
}

.demo-audio-bar {
  --audio-accent: #42846D;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(370px, 100%);
  height: 36px;
  padding: 0 11px 0 6px;
  border-radius: 999px;
  background: rgba(66, 132, 109, 0.09);
  box-shadow: inset 0 0 0 0.5px rgba(66, 132, 109, 0.24);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #3C3C43;
}

.demo-audio-play {
  position: relative;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  background: var(--audio-accent);
  color: #FFFFFF;
  cursor: pointer;
  flex: none;
  transition: transform 120ms ease;
}

.demo-audio-play:active {
  transform: scale(0.92);
}

.demo-audio-play::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 11px;
  transform: translateX(1px);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 11'%3E%3Cpath d='M1.6 1.25c0-.66.72-1.07 1.29-.73l6.15 3.75a.85.85 0 0 1 0 1.46L2.89 9.48c-.57.34-1.29-.07-1.29-.73V1.25Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 11'%3E%3Cpath d='M1.6 1.25c0-.66.72-1.07 1.29-.73l6.15 3.75a.85.85 0 0 1 0 1.46L2.89 9.48c-.57.34-1.29-.07-1.29-.73V1.25Z' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

.demo-audio-bar.is-playing .demo-audio-play::after {
  width: 9px;
  height: 10px;
  transform: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Crect x='1' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3Crect x='5.7' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Crect x='1' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3Crect x='5.7' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

.demo-audio-track {
  position: relative;
  flex: 1 1 auto;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.demo-audio-track::before {
  content: "";
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(60, 60, 67, 0.16);
}

.demo-audio-fill {
  position: absolute;
  left: 0;
  height: 3px;
  width: 0%;
  border-radius: 2px;
  background: var(--audio-accent);
  pointer-events: none;
}

.demo-audio-thumb {
  position: absolute;
  left: 0%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--audio-accent);
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  pointer-events: none;
}

.demo-audio-time {
  font-size: 12px;
  color: rgba(60, 60, 67, 0.72);
  white-space: nowrap;
}

.demo-audio-bar.is-recording {
  --audio-accent: #DE3C26;
  background: rgba(222, 60, 38, 0.08);
  box-shadow: inset 0 0 0 0.5px rgba(222, 60, 38, 0.24);
}

.demo-audio-bar.is-recording:not(.is-paused) .demo-audio-play::after {
  width: 9px;
  height: 10px;
  transform: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Crect x='1' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3Crect x='5.7' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 10'%3E%3Crect x='1' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3Crect x='5.7' y='1' width='2.3' height='8' rx='0.8' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

.demo-rec-wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 18px;
}

.demo-rec-wave span {
  width: 2.5px;
  height: 12px;
  border-radius: 1.5px;
  background: #DE3C26;
  animation: demoRecBar 0.9s ease-in-out infinite alternate;
}

.demo-rec-wave span:nth-child(2n) { animation-delay: -0.35s; }
.demo-rec-wave span:nth-child(3n) { animation-delay: -0.6s; }
.demo-rec-wave span:nth-child(4n) { animation-delay: -0.2s; }

.demo-audio-bar.is-paused .demo-rec-wave span {
  animation-play-state: paused;
  transform: scaleY(0.35);
}

@keyframes demoRecBar {
  0% { transform: scaleY(0.3); opacity: 0.55; }
  100% { transform: scaleY(1); opacity: 0.95; }
}

.demo-rec-status {
  flex: 1 1 auto;
  font-size: 12.5px;
  font-weight: 500;
  color: #B42318;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-typing-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  vertical-align: -0.18em;
  margin-left: 2px;
  background: var(--cobalt);
  animation: demoCaretBlink 1.05s steps(1, end) infinite;
}

@keyframes demoCaretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Tab 3：表格与 KaTeX 公式 */
.demo-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(60, 60, 67, 0.22);
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

.demo-table-scroll table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.demo-table-scroll th,
.demo-table-scroll td {
  padding: 9px 11px;
  border-right: 1px solid rgba(60, 60, 67, 0.16);
  border-bottom: 1px solid rgba(60, 60, 67, 0.16);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.demo-table-scroll th {
  font-weight: 600;
  background: rgba(120, 120, 128, 0.055);
  color: #1E1B32;
}

.demo-table-scroll tr > :last-child {
  border-right: 0;
}

.demo-table-scroll tr:last-child > td {
  border-bottom: 0;
}

.demo-math-block {
  margin-top: 16px;
  padding: 6px 12px;
  overflow-x: auto;
  color: #1E1B32;
}

.demo-math-block .katex-display {
  margin: 0.2em 0;
}

/* Tab 4：原生代码块 */
.demo-code-block {
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 8px;
  background: rgba(120, 120, 128, 0.035);
  overflow: hidden;
}

.demo-code-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 14px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.08);
  font-size: 12px;
  color: rgba(60, 60, 67, 0.65);
}

.demo-code-copy {
  border: 0;
  background: transparent;
  color: var(--cobalt);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.demo-code-copy:hover {
  background: rgba(39, 48, 122, 0.08);
}

.demo-code-block pre {
  margin: 0;
  padding: 13px 16px;
  overflow-x: auto;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.62;
  color: #1E1B32;
}

.demo-code-block .hljs-keyword { color: #cf222e; }
.demo-code-block .hljs-title.function_ { color: #8250df; }
.demo-code-block .hljs-built_in { color: #953800; }
.demo-code-block .hljs-number { color: #0550ae; }
.demo-code-block .hljs-comment { color: #6e7781; font-style: italic; }

.demo-doc-list {
  margin: 14px 0 0;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.72;
  color: #2B283E;
}

.demo-doc-list li + li {
  margin-top: 4px;
}

/* ==========================================================================
   模块 4：正反双面（翻转卡 ⇄ 左右并排动态切换舞台）
   ========================================================================== */
.section-head.dual-layout-head {
  margin-bottom: 20px;
}

.dual-stage {
  margin-inline: auto;
}

.dual-mode-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.dual-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(30, 27, 50, 0.1);
  background: rgba(255, 253, 249, 0.85);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.dual-mode-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.dual-mode-btn:hover {
  color: var(--ink);
  border-color: rgba(30, 27, 50, 0.22);
  background: #FFFFFF;
}

.dual-mode-btn.is-active {
  background: var(--cobalt);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(39, 48, 122, 0.2);
}

.dual-card-stage {
  max-width: 392px;
  margin-inline: auto;
  perspective: 1400px;
  transition: max-width 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dual-stage[data-layout-mode="split"] .dual-card-stage {
  max-width: 920px;
  perspective: none;
}

.dual-card-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  transform-style: preserve-3d;
  transition: transform 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dual-stage[data-layout-mode="flip"][data-flipped="true"] .dual-card-track {
  transform: rotateY(180deg);
}

.dual-face {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 486px;
  background: #FFFFFF;
  border: 1px solid rgba(30, 27, 50, 0.09);
  border-radius: 20px;
  padding: 28px 28px 30px;
  box-shadow: 0 18px 48px rgba(30, 27, 50, 0.065), 0 2px 8px rgba(30, 27, 50, 0.025);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dual-face-front {
  transform: rotateY(0deg) translateZ(1px);
}

.dual-face-back {
  transform: rotateY(180deg) translateZ(1px);
}

.dual-split-handle {
  display: none;
}

.dual-stage[data-layout-mode="split"] .dual-card-track {
  grid-template-columns: minmax(0, calc(var(--split-pct, 50%) - 0.5px)) 1px minmax(0, calc(100% - var(--split-pct, 50%) - 0.5px));
  gap: 0;
  background: #FFFFFF;
  border: 1px solid rgba(30, 27, 50, 0.09);
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(30, 27, 50, 0.065), 0 2px 8px rgba(30, 27, 50, 0.025);
  overflow: hidden;
  transform-style: flat;
  transform: none !important;
  transition: none;
  animation: dualFlushIn 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dualFlushIn {
  from { opacity: 0.72; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.dual-stage[data-layout-mode="split"] .dual-face {
  grid-area: auto;
  min-height: 392px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 26px 28px 28px;
  transform: none;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  cursor: default;
}

.dual-stage[data-layout-mode="split"] .dual-split-handle {
  position: relative;
  z-index: 4;
  display: block;
  width: 1px;
  align-self: stretch;
  background: #EBEBEF;
  cursor: ew-resize;
  touch-action: none;
  outline: none;
  transition: background-color 120ms ease;
}

.dual-stage[data-layout-mode="split"] .dual-split-handle::before {
  content: "";
  position: absolute;
  inset: 0 -12px;
  cursor: ew-resize;
}

.dual-split-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 56px;
  border-radius: 4px;
  background: #E2E2E8;
  border: 0.5px solid #D5D5DC;
  transform: translate(-50%, -50%);
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.dual-split-handle:hover,
.dual-split-handle:focus-visible,
.dual-split-handle.is-dragging {
  background: rgba(39, 48, 122, 0.42);
}

.dual-split-handle:hover .dual-split-pill,
.dual-split-handle:focus-visible .dual-split-pill,
.dual-split-handle.is-dragging .dual-split-pill {
  background: #FFFFFF;
  border-color: rgba(39, 48, 122, 0.58);
  box-shadow: 0 2px 8px rgba(39, 48, 122, 0.16);
}

.dual-stage.is-resizing,
.dual-stage.is-resizing * {
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize !important;
}

.dual-face-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.dual-side-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(60, 60, 67, 0.56);
  letter-spacing: 0.02em;
}

.dual-sentence {
  margin: 0;
  font-size: 18px;
  line-height: 1.66;
  font-weight: 500;
  color: #1E1B32;
}

.dual-hl {
  text-decoration: underline;
  text-decoration-color: rgba(245, 158, 11, 0.78);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.dual-divider {
  height: 1px;
  background: rgba(30, 27, 50, 0.08);
  margin: 18px 0;
}

.dual-vocab {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dual-vocab div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 13.5px;
  line-height: 1.55;
}

.dual-vocab dt {
  font-weight: 700;
  color: var(--cobalt);
}

.dual-vocab dt em {
  font-weight: 500;
  color: var(--muted);
}

.dual-vocab dd {
  margin: 0;
  color: var(--muted);
}

.dual-clauses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dual-clauses li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}

.dual-clause-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(39, 48, 122, 0.08);
  color: var(--cobalt);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.dual-clause-text strong {
  font-weight: 600;
  color: #1E1B32;
}

.dual-translation {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.68;
  color: #1E1B32;
}

.dual-flip-dock {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.dual-flip-dock[hidden] {
  display: none !important;
}

.dual-flip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(30, 27, 50, 0.11);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(30, 27, 50, 0.08);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.dual-flip-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(39, 48, 122, 0.28);
  box-shadow: 0 10px 24px rgba(30, 27, 50, 0.11);
}

.dual-flip-btn:active {
  transform: scale(0.97);
}

.dual-flip-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
}

.dual-flip-icon svg {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   模块 5：备考日常，处处顺手（开放外缘 + 细内分割线 3×2 目录网格）
   ========================================================================== */
.section-head.editorial-head {
  margin-bottom: 40px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1040px;
  margin-inline: auto;
}

.editorial-item {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
}

.editorial-item:nth-child(-n + 3) {
  padding-top: 8px;
  border-bottom: 1px solid rgba(30, 27, 50, 0.09);
}

.editorial-item:nth-child(n + 4) {
  padding-bottom: 8px;
}

.editorial-item:not(:nth-child(3n)) {
  border-right: 1px solid rgba(30, 27, 50, 0.09);
}

.editorial-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.editorial-ico {
  width: 20px;
  height: 20px;
  color: var(--cobalt);
  flex-shrink: 0;
}

.editorial-item h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.editorial-item p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.66;
}

.editorial-item p code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(252, 180, 15, 0.22);
  color: #7C4D00;
}

.editorial-links {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.editorial-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cobalt);
  transition: color var(--transition);
}

.editorial-link:hover {
  color: var(--cobalt-hover);
}

.editorial-link.is-muted {
  color: var(--muted);
  font-weight: 500;
}

.editorial-link.is-muted:hover {
  color: var(--ink);
}

.editorial-download {
  margin-top: clamp(44px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.editorial-download-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.editorial-download-meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted-light);
}

.qr-popover.is-up {
  top: auto;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(-6px);
}

.qr-popover.is-up::before {
  top: auto;
  bottom: -12px;
}

.qr-trigger-wrap.is-open .qr-popover.is-up,
.qr-trigger-wrap:focus-within .qr-popover.is-up {
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .qr-trigger-wrap:hover .qr-popover.is-up {
    transform: translateX(-50%) translateY(0);
  }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  padding: 54px 0 40px;
  background-color: var(--paper-warm);
  border-top: 1px solid rgba(30, 27, 50, 0.07);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1.25fr 0.75fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--hairline);
}

.footer-brand-desc {
  margin: 10px 0 0;
  max-width: 240px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-col h3 {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col.docs-col ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}

.footer-col a {
  font-size: 13.5px;
  color: var(--muted);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 12.5px;
  color: var(--muted-light);
}

.footer-bottom a {
  color: var(--muted-light);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--ink);
}

/* ==========================================================================
   响应式适配（平板 & 375px 移动端）
   ========================================================================== */
@media (max-width: 960px) {
  .editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .editorial-item {
    padding: 24px 22px;
    border-right: 0;
    border-bottom: 0;
  }
  .editorial-item:nth-child(-n + 3),
  .editorial-item:nth-child(n + 4) {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .editorial-item:nth-child(2n + 1) {
    border-right: 1px solid rgba(30, 27, 50, 0.09);
  }
  .editorial-item:nth-child(-n + 4) {
    border-bottom: 1px solid rgba(30, 27, 50, 0.09);
  }
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero-upper-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 12px;
  }
  .hero-copy-col {
    text-align: center;
  }
  .hero-copy-col .hero-sub {
    margin-inline: auto;
  }
  .hero-copy-col .hero-actions {
    justify-content: center;
  }
  .girl-figure {
    width: min(82vw, 350px);
  }
  .device-duo-wrap {
    margin-top: 6px;
  }
}

@media (max-width: 760px) {
  .container,
  .site-nav,
  .hero-upper-grid {
    width: calc(100% - 28px);
  }
  .device-duo-wrap {
    width: calc(100% - 14px);
  }
  .mobile-br {
    display: inline;
  }
  .nav-links,
  .brand-sub {
    display: none;
  }
  .nav-mobile-right {
    display: inline-flex;
  }
  .hero-title {
    font-size: clamp(31px, 8.6vw, 35px);
  }
  .hero-actions,
  .editorial-download-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn-primary,
  .editorial-download-actions .btn-primary,
  .qr-trigger-wrap,
  .qr-trigger-wrap .btn-secondary {
    width: 100%;
    max-width: 310px;
  }
  .qr-trigger-wrap {
    justify-content: center;
  }
  .hero-platform-script {
    margin-top: 2px;
    gap: 12px;
    font-size: 16.5px;
  }
  .platform-sf-icon {
    height: 16px;
  }
  .live-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 12px;
    gap: 6px;
  }
  .live-toolbar-spacer {
    display: none;
  }
  .live-editor-segmented {
    gap: 2px;
    padding: 2px;
    flex-shrink: 0;
  }
  .live-seg-btn {
    padding: 5px 8px;
    font-size: 12px;
  }
  .live-editor-bar-right {
    gap: 4px;
    flex-shrink: 0;
  }
  .live-tool-btn {
    padding: 5px 8px;
    font-size: 12px;
  }
  .live-tool-btn.is-ghost {
    padding: 5px 6px;
  }
  .live-tool-btn[data-demo-slash] {
    display: none;
  }
  .live-editor-iframe {
    height: 520px;
  }
  .block-stage-tabs {
    gap: 6px;
    margin-bottom: 14px;
  }
  .block-tab-btn {
    padding: 6px 11px;
    font-size: 12.5px;
  }
  .block-stage-sheet {
    padding: 18px 16px 20px;
    min-height: 360px;
  }
  .demo-doc-h1 {
    font-size: 17.5px;
  }
  .demo-code-block pre {
    padding: 11px 12px;
    font-size: 12px;
  }
  .dual-face {
    min-height: 436px;
    padding: 20px 18px 22px;
  }
  .dual-sentence {
    font-size: 16px;
  }
  .dual-stage[data-layout-mode="split"] .dual-card-track {
    border-radius: 16px;
  }
  .dual-stage[data-layout-mode="split"] .dual-face {
    min-height: 360px;
    padding: 14px 12px 15px;
    border-radius: 0;
  }
  .dual-split-pill {
    width: 5px;
    height: 44px;
  }
  .dual-stage[data-layout-mode="split"] .dual-face-head {
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .dual-stage[data-layout-mode="split"] .demo-tag,
  .dual-stage[data-layout-mode="split"] .demo-meta-note {
    font-size: 10.5px;
    height: 20px;
    padding: 0 7px;
  }
  .dual-stage[data-layout-mode="split"] .dual-sentence,
  .dual-stage[data-layout-mode="split"] .dual-translation {
    font-size: 12px;
    line-height: 1.5;
  }
  .dual-stage[data-layout-mode="split"] .dual-divider {
    margin: 10px 0;
  }
  .dual-stage[data-layout-mode="split"] .dual-vocab div,
  .dual-stage[data-layout-mode="split"] .dual-clauses li {
    font-size: 11px;
    line-height: 1.45;
  }
  .dual-stage[data-layout-mode="split"] .dual-clauses li {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .dual-stage[data-layout-mode="split"] .dual-clause-badge {
    justify-self: start;
    font-size: 10px;
    padding: 1px 6px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .section-head.editorial-head {
    margin-bottom: 24px;
  }
  .editorial-grid {
    grid-template-columns: 1fr;
  }
  .editorial-item {
    padding: 20px 2px;
    border-right: 0 !important;
    border-bottom: 0;
  }
  .editorial-item:nth-child(-n + 3),
  .editorial-item:nth-child(n + 4) {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .editorial-item:first-child {
    padding-top: 4px;
  }
  .editorial-item:last-child {
    padding-bottom: 4px;
  }
  .editorial-item:not(:last-child) {
    border-bottom: 1px solid rgba(30, 27, 50, 0.09);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .dual-card-track,
  .dual-card-stage {
    transition: none;
    animation: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
