/*
Theme Name: Sogou IME Landing
Theme URI: https://pinyin.sogou2.com.cn/
Description: 搜狗输入法介绍与下载导航主题，目录结构遵循 WordPress 约定（wp-content/themes）。
Version: 1.0.0
Text Domain: zhidian-ime
*/

/* Theme: zhidian-ime — 搜狗输入法落地页样式 */
:root {
  --ink: #0c1a18;
  --muted: #3f534f;
  --paper: #ffffff;
  --paper-2: #f4f4f5;
  --line: #e4e4e7;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --mint: #5eead4;
  --accent: #c2410c;
  --orange-deep: #c2410c;
  --orange-mid: #ea580c;
  --orange-bright: #f97316;
  --orange-soft: #fb923c;
  --radius: 12px;
  --shadow: 0 18px 40px rgba(12, 26, 24, 0.12);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
}

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

a {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-serif);
}

.site-title a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--teal-dark);
}

.brand-mark {
  display: inline-flex;
  flex-shrink: 0;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  align-items: center;
}

.main-nav a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--teal-dark);
  text-decoration: underline;
  text-decoration-color: var(--mint);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper-2);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1rem;
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 首屏：左文案 + 右拼音/候选/键盘示意（橙底） */
.hero-ime {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--orange-deep) 0%, var(--orange-mid) 45%, var(--orange-bright) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-ime__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.35rem 1.25rem 2.85rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-ime__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, 400px);
    gap: 2.25rem;
    padding: 2.85rem 1.25rem 3.25rem;
  }
}

.hero-badge {
  display: inline-block;
  font-weight: 700;
}

.hero-badge--hot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: #fff7ed;
  text-shadow: 0 1px 2px rgba(124, 45, 18, 0.35);
}

.hero-ime__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.2vw, 3.15rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 1rem;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(124, 45, 18, 0.25);
}

.hero-ime__title-line {
  display: block;
}

.hero-ime__title-line--accent {
  color: #ffedd5;
  margin-top: 0.12em;
}

.hero-ime__lead {
  font-size: 1.06rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
  max-width: 36rem;
  margin: 0 0 1.4rem;
}

.hero-ime__lead strong {
  color: #ffffff;
}

.hero-ime__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  align-items: stretch;
  margin-bottom: 1.35rem;
}

.btn-hero-primary {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 11.5rem;
  padding: 0.95rem 1.75rem 0.85rem;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  font-family: inherit;
  color: #9a3412 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
  border: 3px solid #ffffff;
  box-shadow: 0 10px 36px rgba(124, 45, 18, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-hero-primary__text {
  font-size: 1.2rem;
  line-height: 1.15;
  letter-spacing: 0.06em;
}

.btn-hero-primary__hint {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.btn-hero-primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #ffedd5 100%);
  border-color: #ffedd5;
  color: #7c2d12 !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(124, 45, 18, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.45) inset;
}

.btn-hero-primary:focus-visible {
  outline: 3px solid #fff7ed;
  outline-offset: 3px;
}

.btn-hero-secondary {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 10.5rem;
  padding: 0.9rem 1.5rem 0.8rem;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  font-family: inherit;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.14);
  border: 3px solid rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-hero-secondary__text {
  font-size: 1.08rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.btn-hero-secondary__hint {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: #ffffff;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.btn-hero-secondary:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}

@media (max-width: 420px) {
  .hero-ime__cta {
    flex-direction: column;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 20rem;
    min-width: 0;
  }
}

.hero-ime__version {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.hero-ime__version strong {
  color: #ffffff;
  font-weight: 700;
}

.hero-ime__ver-sep {
  margin: 0 0.45rem;
  opacity: 0.55;
}

.hero-ime__visual {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .hero-ime__visual {
    margin: 0;
    margin-left: auto;
    max-width: none;
  }
}

.ime-panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 0.85rem 1.1rem;
  box-shadow: var(--shadow);
}

.hero-ime .ime-panel {
  box-shadow: 0 16px 48px rgba(124, 45, 18, 0.32);
}

.ime-compose {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.55rem;
}

.ime-compose-label {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.ime-pinyin {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #a16207;
}

.ime-candidates {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0.4rem 0.35rem 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.65rem;
  font-size: 0.8rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.ime-candidates li {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.ime-num {
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.72rem;
  min-width: 1em;
}

.ime-keyboard {
  padding-top: 0.15rem;
}

.ime-row {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.26rem;
  margin-bottom: 0.32rem;
}

.ime-row--indent {
  padding-left: 1.1rem;
}

.ime-row--indent2 {
  padding-left: 2.2rem;
}

.ime-row span {
  min-width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.2);
}

@media (max-width: 420px) {
  .ime-row {
    gap: 0.18rem;
  }

  .ime-row span {
    min-width: 1.45rem;
    height: 1.45rem;
    font-size: 0.6rem;
  }

  .ime-row--indent {
    padding-left: 0.65rem;
  }

  .ime-row--indent2 {
    padding-left: 1.35rem;
  }
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.meta-row strong {
  color: var(--ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--teal-dark);
  color: #f0fdfa;
}

.btn-primary:hover {
  background: var(--teal);
  color: #042f2e;
}

.btn-secondary {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}

.btn-secondary:hover {
  background: var(--paper-2);
}

section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.section-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 40rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-family: var(--font-serif);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.platform {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #ffffff;
}

.platform h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.platform p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 860px) {
  .split-section {
    grid-template-columns: 1fr 1fr;
  }
}

.note-box {
  background: var(--paper-2);
  border-left: 4px solid var(--teal);
  padding: 1rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  text-align: center;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  padding: 1rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--teal-dark);
}

.stat span {
  font-size: 0.85rem;
  color: var(--muted);
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.news-list time {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.news-list h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-serif);
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  background: #fff;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.faq .answer {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, var(--orange-bright) 0%, var(--orange-mid) 55%, var(--orange-deep) 100%);
}

.site-footer p {
  margin: 0 auto 0.5rem;
  max-width: var(--max);
  padding: 0 1.25rem;
}

.site-footer a {
  color: #ffffff;
  font-weight: 600;
}

.site-footer a:hover {
  color: #ffedd5;
}

.cta-band {
  max-width: none;
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 2.5rem 1.25rem;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cta-band h2 {
  font-family: var(--font-serif);
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: var(--ink);
}

.cta-band p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.cta-band .btn-primary {
  background: var(--teal-dark);
  color: #f0fdfa;
}

.cta-band .btn-primary:hover {
  background: var(--teal);
  color: #042f2e;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
}

.cta-band .btn-secondary--on-dark {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}

.cta-band .btn-secondary--on-dark:hover {
  background: var(--paper-2);
  border-color: var(--teal);
  color: var(--teal);
}

/* Download page */
.download-hero {
  padding-top: 1.5rem;
}

.dl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.dl-table th,
.dl-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.dl-table th {
  background: var(--paper-2);
  font-family: var(--font-serif);
}

.dl-table tr:last-child td {
  border-bottom: none;
}

/* Download page — 醒目下载按钮 */
.page-download .dl-quick-lead {
  margin-top: -0.35rem;
  margin-bottom: 1.15rem;
}

.page-download .dl-mega-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.35rem;
}

.page-download .dl-btn {
  box-sizing: border-box;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.page-download .dl-btn:focus-visible {
  outline: 3px solid rgba(234, 88, 12, 0.5);
  outline-offset: 3px;
}

.page-download .dl-btn--mega {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  padding: 1.15rem 1.5rem 1rem;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff !important;
  text-align: center;
  background: linear-gradient(165deg, #fb923c 0%, #ea580c 48%, #c2410c 100%);
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(194, 65, 12, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.page-download .dl-btn--mega:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(194, 65, 12, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff !important;
}

.page-download .dl-btn__sub {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  opacity: 0.93;
}

.page-download .dl-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 0.85rem;
}

.page-download .dl-btn--tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 5.5rem;
  padding: 0.8rem 0.6rem;
  font-size: 1rem;
  font-weight: 800;
  color: #9a3412 !important;
  text-align: center;
  background: linear-gradient(180deg, #fffbeb 0%, #ffedd5 100%);
  border: 2px solid #ea580c;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(234, 88, 12, 0.2);
}

.page-download .dl-btn--tile:hover {
  background: #ffffff;
  border-color: #c2410c;
  color: #7c2d12 !important;
  transform: translateY(-2px);
  box-shadow: 0 9px 28px rgba(234, 88, 12, 0.3);
}

.page-download .dl-btn__icon {
  font-size: 1.7rem;
  line-height: 1;
}

.page-download .dl-quick-fallback {
  margin: 1.45rem 0 0.6rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.page-download .dl-anchor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.page-download .dl-btn--ghost {
  padding: 0.55rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--teal-dark) !important;
  background: #ffffff;
  border: 2px dashed #d4d4d8;
  border-radius: 999px;
}

.page-download .dl-btn--ghost:hover {
  border-color: var(--teal);
  background: var(--paper-2);
  color: var(--teal) !important;
}

.page-download .dl-table td:last-child {
  vertical-align: middle;
}

.page-download .dl-btn--table {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.75rem;
  min-height: 2.65rem;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff !important;
  text-decoration: none !important;
  background: linear-gradient(180deg, #f97316 0%, #ea580c 100%);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.38);
}

.page-download .dl-btn--table:hover {
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.48);
  color: #fff !important;
  transform: scale(1.04);
}

@media (max-width: 520px) {
  .page-download .dl-btn--mega {
    max-width: none;
    font-size: 1.1rem;
    padding: 1rem 1.25rem 0.9rem;
  }

  .page-download .dl-table td:last-child {
    text-align: center;
  }

  .page-download .dl-btn--table {
    width: 100%;
    max-width: 220px;
  }
}

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  word-break: break-all;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #ccfbf1;
  color: var(--teal-dark);
  vertical-align: middle;
}
