/* WPS Office Landing Site - Set 5 Forest Green Documentation Theme */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #2E7D32;
  --primary-dark: #1B5E20;
  --accent: #827717;
  --accent-light: #C0CA33;
  --bg: #F1F8E9;
  --bg-white: #FFFFFF;
  --bg-muted: #E8F5E9;
  --text: #1B2E1B;
  --text-secondary: #33691E;
  --text-muted: #689F38;
  --border: #C8E6C9;
  --border-hairline: #DCEDC8;
  --shadow: 0 1px 3px rgba(27, 94, 32, 0.06);
  --shadow-md: 0 4px 12px rgba(27, 94, 32, 0.08);
  --radius: 4px;
  --nav-height: 56px;
  --max-width: 1080px;
  --font-body: "Lucida Grande", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "Consolas", "Courier New", monospace;
}

html {
  scroll-padding-top: calc(var(--nav-height) + 12px);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Spin animation for download loading */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== Header / Nav ===== */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-hairline);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
}

.logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-menu a.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.nav-cta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
}

.nav-cta:hover {
  background: var(--primary-dark);
}

/* ===== Hero - docs minimal left-aligned ===== */
.hero-docs {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border-hairline);
}

.hero-docs-inner {
  border-left: 3px solid var(--primary);
  padding-left: 24px;
  max-width: 720px;
}

.hero-crumb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.hero-crumb span {
  color: var(--text-muted);
}

.hero-docs h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.hero-docs .hero-lead {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary-dark);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background: var(--bg-white);
  color: var(--primary-dark);
  border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-muted);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-accent:hover:not(:disabled) {
  background: #6D6510;
}

/* ===== Section ===== */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border-hairline);
}

.section:last-of-type {
  border-bottom: none;
}

.section-head {
  margin-bottom: 36px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.section-head p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 560px;
}

/* ===== Deep feature long sections ===== */
.deep-features {
  background: var(--bg-white);
}

.deep-article {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border-hairline);
  align-items: start;
}

.deep-article:last-child {
  border-bottom: none;
}

.deep-article:nth-child(even) {
  direction: rtl;
}

.deep-article:nth-child(even) > * {
  direction: ltr;
}

.deep-body h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.deep-body p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.85;
}

.deep-body ul {
  list-style: none;
  margin-top: 16px;
}

.deep-body li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.deep-body li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 11px;
}

.deep-aside {
  background: var(--bg);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.deep-aside svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  color: var(--primary);
}

.deep-aside .aside-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}

/* ===== Icon features strip ===== */
.icon-strip {
  background: var(--bg-muted);
}

.icon-strip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border-hairline);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.icon-strip-item {
  background: var(--bg-white);
  padding: 24px 16px;
  text-align: center;
}

.icon-strip-item svg {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  color: var(--primary);
}

.icon-strip-item h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.icon-strip-item p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Platform CSS tabs ===== */
.platform-tabs-wrap {
  background: var(--bg-white);
}

.tab-radio {
  display: none;
}

.tab-labels {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 0;
}

.tab-labels label {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 24px;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-labels label:hover {
  color: var(--primary);
}

#tab-win:checked ~ .tab-labels label[for="tab-win"],
#tab-mac:checked ~ .tab-labels label[for="tab-mac"],
#tab-ios:checked ~ .tab-labels label[for="tab-ios"],
#tab-and:checked ~ .tab-labels label[for="tab-and"] {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-panels {
  border: 1px solid var(--border-hairline);
  border-top: none;
  background: var(--bg-white);
}

.tab-panel {
  display: none;
  padding: 32px;
}

#tab-win:checked ~ .tab-panels #panel-win,
#tab-mac:checked ~ .tab-panels #panel-mac,
#tab-ios:checked ~ .tab-panels #panel-ios,
#tab-and:checked ~ .tab-panels #panel-and {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 32px;
  align-items: center;
}

.tab-panel h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.tab-panel .tab-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-panel p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.75;
}

.tab-visual {
  background: var(--bg);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-visual svg {
  width: 72px;
  height: 72px;
  color: var(--primary);
}

/* ===== Changelog teaser ===== */
.changelog-teaser {
  background: var(--bg-white);
}

.changelog-list {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.changelog-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-hairline);
  align-items: baseline;
}

.changelog-entry:last-child {
  border-bottom: none;
}

.changelog-entry:nth-child(even) {
  background: var(--bg);
}

.changelog-ver {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--bg-muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: inline-block;
}

.changelog-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.changelog-entry ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
}

.changelog-entry li {
  padding: 2px 0;
}

.changelog-entry li::before {
  content: "· ";
  color: var(--accent);
  font-weight: bold;
}

.changelog-more {
  margin-top: 16px;
  font-size: 13px;
}

.changelog-more a {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Reviews ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.review-card {
  background: var(--bg-white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: 22px;
}

.review-stars {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.review-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 14px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}

.review-author strong {
  font-size: 13px;
  color: var(--text);
  display: block;
}

.review-author span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Stats ===== */
.stats-bar {
  background: var(--primary-dark);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item h4 {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

/* ===== FAQ static ===== */
.faq-list {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
}

.faq-item {
  border-bottom: 1px solid var(--border-hairline);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--accent);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== Compare table ===== */
.compare-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  background: var(--bg-white);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.compare-table th,
.compare-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border-hairline);
}

.compare-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--primary-dark);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.compare-table .yes {
  color: var(--primary);
  font-weight: 600;
}

.compare-table .no {
  color: var(--text-muted);
}

/* ===== Download page ===== */
.dl-hero {
  padding: 48px 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-hairline);
}

.dl-hero-inner {
  border-left: 3px solid var(--primary);
  padding-left: 24px;
}

.dl-hero h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.dl-hero p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 20px;
}

.dl-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dl-card {
  background: var(--bg-white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: 28px;
}

.dl-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.dl-card-head svg {
  width: 40px;
  height: 40px;
  color: var(--primary);
}

.dl-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
}

.dl-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.dl-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.steps-list {
  counter-reset: step;
  list-style: none;
}

.steps-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-hairline);
}

.steps-list li:last-child {
  border-bottom: none;
}

.steps-list li::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary-dark);
}

.step-body h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.step-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.sys-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
}

.sys-table th,
.sys-table td {
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-hairline);
  text-align: left;
}

.sys-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-muted);
  color: var(--primary-dark);
  font-weight: 600;
}

.sys-table tr:last-child td {
  border-bottom: none;
}

/* ===== zh-cn guide page ===== */
.guide-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  background: var(--bg-white);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: 16px 0;
}

.guide-sidebar h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 8px;
}

.guide-sidebar ul {
  list-style: none;
}

.guide-sidebar a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
}

.guide-sidebar a:hover {
  color: var(--primary);
  background: var(--bg);
}

.guide-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-hairline);
}

.guide-content h2:first-child {
  margin-top: 0;
}

.guide-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.85;
}

.guide-content ul,
.guide-content ol {
  margin: 0 0 16px 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.guide-content li {
  margin-bottom: 6px;
}

.guide-note {
  background: var(--bg-muted);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.guide-note strong {
  color: var(--primary-dark);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-hairline);
  padding: 32px 0;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 12px;
}

.footer-badge svg {
  width: 16px;
  height: 16px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .icon-strip-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .deep-article {
    grid-template-columns: 1fr;
  }

  .deep-article:nth-child(even) {
    direction: ltr;
  }

  #tab-win:checked ~ .tab-panels #panel-win,
  #tab-mac:checked ~ .tab-panels #panel-mac,
  #tab-ios:checked ~ .tab-panels #panel-ios,
  #tab-and:checked ~ .tab-panels #panel-and {
    grid-template-columns: 1fr;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dl-cards {
    grid-template-columns: 1fr;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav-menu {
    display: none;
  }

  .hero-docs h1 {
    font-size: 26px;
  }

  .icon-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .changelog-entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
