/* Apple 官网数值对齐层（桌面；手机已有独立版式）
   数值来源：apple.com globalnav 与页面 CSS 实测
   版心 1024 / 导航 44px / 字号阶 48-40-32-28-24-19-17-14 / 主色 #0071e3 */

:root {
  --apple-blue: #0071e3;
  --apple-ink: #1d1d1f;
  --apple-gray: #86868b;
  --apple-surface: #f5f5f7;
  --apple-content: 1024px;
  --apple-gutter: 22px;
  --apple-type-48: 48px;
  --apple-type-40: 40px;
  --apple-type-32: 32px;
  --apple-type-28: 28px;
  --apple-type-24: 24px;
  --apple-type-19: 19px;
  --apple-type-17: 17px;
  --apple-type-14: 14px;
}

@media (min-width: 641px) {
  /* 1) 导航：44px 高、1024 版心、22px 侧距 */
  .site-header.edition-header .edition-nav-inner {
    max-width: var(--apple-content);
    margin-inline: auto;
    min-height: 44px;
    padding-inline: max(var(--apple-gutter), env(safe-area-inset-left)) max(var(--apple-gutter), env(safe-area-inset-right));
  }
  .site-header .edition-links a { font-size: var(--apple-type-17); }

  /* 2) 内容版心 */
  main.wrap,
  main.discovery-main > .wrap,
  main .wrap {
    max-width: 980px;
    margin-inline: auto;
    padding-inline: var(--apple-gutter);
  }

  /* 3) 文本默认值：正文 17 / 小字 14 */
  body { font-size: var(--apple-type-17); line-height: 1.47; letter-spacing: -.01em; }
  body small, .text-caption, .fmc-caption { font-size: var(--apple-type-14); }
}

/* 4) 主按钮：苹果蓝胶囊（仅真实主操作） */
.fmc-ticket-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 980px;
  background: var(--apple-blue);
  color: #fff !important;
  font-size: var(--apple-type-17);
  font-weight: 400;
  letter-spacing: -.01em;
  transition: background-color var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.fmc-ticket-trigger:hover { background: #0077ed; }
.fmc-ticket-trigger:active { transform: scale(.98); }
.fmc-ticket-trigger:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 3px; }

/* 5) 页面主标题收敛到 Apple 字号阶（桌面）；创刊词页面不动 */
@media (min-width: 641px) {
  html body:not(.fmc-manifesto-page) main h1 {
    font-size: var(--apple-type-48, 48px) !important;
    line-height: 1.07 !important;
    letter-spacing: -.015em;
    text-wrap: balance;
  }
}
/* 6) 电视报工具栏输入控件：统一为 Apple 圆角控件（12px 圆角 / 44px 高 / 浅灰底 / 蓝色焦点环） */
.discovery-tv .tool input[type="search"],
.discovery-tv .tool input[type="date"],
.discovery-tv .tool input[type="text"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--apple-ink, #1d1d1f) 12%, transparent);
  border-radius: 12px;
  background: var(--apple-surface, #f5f5f7);
  color: var(--apple-ink, #1d1d1f);
  font-size: var(--apple-type-17, 17px);
  letter-spacing: -.01em;
  transition: border-color var(--dur-2, .2s) var(--ease-out, ease-out),
              box-shadow var(--dur-2, .2s) var(--ease-out, ease-out),
              background-color var(--dur-2, .2s) var(--ease-out, ease-out);
}
.discovery-tv .tool input[type="search"]::placeholder { color: var(--apple-gray, #86868b); }
.discovery-tv .tool input[type="search"]:hover,
.discovery-tv .tool input[type="date"]:hover {
  border-color: color-mix(in srgb, var(--apple-ink, #1d1d1f) 22%, transparent);
}
.discovery-tv .tool input[type="search"]:focus,
.discovery-tv .tool input[type="date"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--apple-blue, #0071e3);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--apple-blue, #0071e3) 18%, transparent);
}
.discovery-tv .tool input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
/* 7) 页面内二级标题按语义收敛到 Apple 字号阶（桌面）
   片页 h2 = 视频卡片标题 → 17；历史页 h2 = 影片名 → 19；电视报 h2 = 日期分组 → 19 */
@media (min-width: 641px) {
  body.record-simple main h2 { font-size: var(--apple-type-17, 17px) !important; line-height: 1.35 !important; }
  body.fmc-separators-directory main h2,
  body.fmc-separators-tv main h2 { font-size: var(--apple-type-19, 19px) !important; line-height: 1.3 !important; }
}

/* 8) 主按钮：蓝底白字、无下划线（Apple 按钮规范） */
.fmc-ticket-trigger,
.fmc-ticket-trigger:hover,
.fmc-ticket-trigger:focus,
.fmc-ticket-trigger:active {
  text-decoration: none !important;
  border-bottom: 0 !important;
  color: #fff !important;
}
/* 9) 其余页面的章节标题：h2/h3 统一到 Apple 32 档（不代表片页的卡片标题与电视报日期） */
@media (min-width: 641px) {
  body:not(.record-simple):not(.fmc-separators-directory):not(.fmc-separators-tv):not(.fmc-manifesto-page) main h2,
  body:not(.record-simple):not(.fmc-separators-directory):not(.fmc-separators-tv):not(.fmc-manifesto-page) main h3 {
    font-size: var(--apple-type-32, 32px) !important;
    line-height: 1.12 !important;
    letter-spacing: -.012em;
  }
}
/* 站内 32×32 位置的字标：用 contain 保持原始比例，不拉伸 */
img[src*="club-mark/fmc-mark"] {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
