/* WPS Office 传统官方产品门户 — 第 1 套 */
:root {
  --portal-red: #B71C1C;
  --portal-ink: #1A1A1A;
  --portal-paper: #F4F1EC;
  --portal-white: #FFFFFF;
  --portal-mute: #5C564E;
  --portal-line: #D8D2C8;
  --portal-max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--portal-mute);
  background: var(--portal-paper);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--portal-red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  color: var(--portal-ink);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
  margin: 0 0 0.75em;
}

h1 {
  font-size: 2.05rem;
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.portal-wrap {
  width: min(var(--portal-max), calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.portal-header {
  background: var(--portal-white);
  border-bottom: 3px solid var(--portal-red);
}

.portal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.portal-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--portal-ink);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 1.15rem;
  text-decoration: none;
}

.portal-logo:hover {
  text-decoration: none;
  color: var(--portal-red);
}

.portal-logo-mark {
  display: block;
  flex-shrink: 0;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.portal-nav a {
  color: var(--portal-ink);
  font-weight: 600;
  padding: 6px 0 4px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.portal-nav a:hover {
  color: var(--portal-red);
  text-decoration: none;
}

.portal-nav a[aria-current="page"],
.portal-nav a.is-now {
  color: var(--portal-red);
  border-bottom-color: var(--portal-red);
}

/* Buttons */
.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.portal-btn:hover {
  text-decoration: none;
}

.portal-btn:disabled {
  cursor: wait;
  opacity: 0.85;
}

.portal-btn-red {
  background: var(--portal-red);
  color: var(--portal-white);
  border-color: var(--portal-red);
}

.portal-btn-red:hover {
  background: #8E1515;
  border-color: #8E1515;
  color: var(--portal-white);
}

.portal-btn-line {
  background: transparent;
  color: var(--portal-ink);
  border-color: var(--portal-ink);
}

.portal-btn-line:hover {
  background: var(--portal-ink);
  color: var(--portal-white);
}

.portal-btn-ghost {
  background: transparent;
  color: var(--portal-white);
  border-color: rgba(255, 255, 255, 0.45);
}

.portal-btn-ghost:hover {
  background: var(--portal-white);
  color: var(--portal-ink);
  border-color: var(--portal-white);
}

.portal-btn-wide {
  width: 100%;
}

.portal-btn-xl {
  min-height: 58px;
  padding: 14px 32px;
  font-size: 17px;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* Hero */
.portal-hero {
  background: var(--portal-white);
  border-bottom: 1px solid var(--portal-line);
}

.portal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: start;
  padding: 56px 0 64px;
}

.portal-hero-copy h1 {
  margin-bottom: 18px;
}

.portal-kicker {
  margin: 0 0 10px;
  color: var(--portal-red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.portal-hero-panel {
  background: var(--portal-ink);
  color: #E8E4DC;
  padding: 28px 26px 26px;
}

.portal-hero-panel h2 {
  color: var(--portal-white);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.portal-hero-panel p {
  color: #C9C3B8;
  font-size: 14px;
}

.portal-dl-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* Sections */
.portal-section {
  padding: 56px 0;
}

.portal-section-head {
  margin-bottom: 28px;
}

.portal-lead {
  max-width: 46em;
}

/* Capability strips */
.portal-strip {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--portal-line);
}

.portal-strip:last-child {
  border-bottom: 1px solid var(--portal-line);
}

.portal-strip-num {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--portal-red);
  line-height: 1;
  padding-top: 4px;
}

/* Feature stacks */
.portal-feature {
  padding: 8px 0 32px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-feature:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Platforms 2x2 */
.portal-plat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--portal-line);
  background: var(--portal-white);
}

.portal-plat-cell {
  padding: 28px 26px 24px;
  border-right: 1px solid var(--portal-line);
  border-bottom: 1px solid var(--portal-line);
}

.portal-plat-cell:nth-child(2n) {
  border-right: 0;
}

.portal-plat-cell:nth-child(n + 3) {
  border-bottom: 0;
}

.portal-plat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.portal-plat-title h3 {
  margin: 0;
}

.portal-ico {
  flex-shrink: 0;
  color: var(--portal-red);
}

/* Stats band */
.portal-stats {
  background: var(--portal-ink);
  color: #E8E4DC;
  padding: 48px 0;
}

.portal-stats h2 {
  color: var(--portal-white);
}

.portal-stats .portal-lead {
  color: #C9C3B8;
}

.portal-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.portal-stat-item strong {
  display: block;
  font-size: 2.4rem;
  letter-spacing: -0.05em;
  color: var(--portal-white);
  line-height: 1.1;
}

.portal-stat-item span {
  display: block;
  margin-top: 8px;
  color: #C9C3B8;
  font-size: 14px;
}

/* Table */
.portal-table-wrap {
  overflow-x: auto;
  background: var(--portal-white);
  border: 1px solid var(--portal-line);
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.portal-table th,
.portal-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--portal-line);
  vertical-align: top;
}

.portal-table th {
  background: #EFEAE3;
  color: var(--portal-ink);
  font-weight: 700;
}

.portal-table tr:last-child td {
  border-bottom: 0;
}

.portal-table td:first-child {
  color: var(--portal-ink);
  font-weight: 600;
  white-space: nowrap;
}

/* Quotes */
.portal-quote {
  margin: 0 0 28px;
  padding: 8px 0 8px 20px;
  border-left: 4px solid var(--portal-red);
  background: transparent;
}

.portal-quote p {
  margin-bottom: 0.85em;
}

.portal-quote footer {
  color: var(--portal-ink);
  font-size: 14px;
  font-weight: 700;
}

.portal-quote footer span {
  display: block;
  font-weight: 400;
  color: var(--portal-mute);
}

/* FAQ */
.portal-faq dt {
  color: var(--portal-ink);
  font-weight: 700;
  margin: 22px 0 8px;
}

.portal-faq dd {
  margin: 0 0 6px;
}

/* Download page */
.portal-push {
  background: var(--portal-white);
  border-bottom: 1px solid var(--portal-line);
  padding: 52px 0 56px;
}

.portal-push-box {
  max-width: 720px;
}

.portal-steps {
  counter-reset: portal-step;
}

.portal-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--portal-line);
}

.portal-step:before {
  counter-increment: portal-step;
  content: counter(portal-step, decimal-leading-zero);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--portal-red);
  letter-spacing: -0.04em;
}

/* Timeline */
.portal-time {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--portal-red);
}

.portal-time li {
  padding: 0 0 28px 24px;
  position: relative;
}

.portal-time li:last-child {
  padding-bottom: 0;
}

.portal-time li:before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--portal-red);
}

.portal-time time {
  display: block;
  color: var(--portal-red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.portal-time h3 {
  margin-bottom: 8px;
}

/* Article page */
.portal-article {
  background: var(--portal-white);
  padding: 48px 0 64px;
}

.portal-article .portal-prose {
  max-width: 46em;
}

.portal-article h2 {
  margin-top: 2em;
}

.portal-article h3 {
  margin-top: 1.4em;
}

.portal-cta {
  margin-top: 40px;
  padding: 28px 26px;
  background: var(--portal-ink);
  color: #E8E4DC;
}

.portal-cta h2 {
  color: var(--portal-white);
  margin-top: 0;
}

.portal-cta p {
  color: #C9C3B8;
}

/* Footer */
.portal-footer {
  background: var(--portal-ink);
  color: #C9C3B8;
  padding: 36px 0 40px;
}

.portal-footer a {
  color: #E8E4DC;
}

.portal-footer-nav {
  display: flex;
  gap: 20px;
  margin: 14px 0;
}

.portal-safe {
  color: var(--portal-white);
  font-weight: 600;
}

.portal-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 880px) {
  h1 {
    font-size: 1.7rem;
  }

  .portal-header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0 12px;
    min-height: 0;
    gap: 10px;
  }

  .portal-nav {
    gap: 18px;
    flex-wrap: wrap;
  }

  .portal-hero-grid,
  .portal-plat-grid,
  .portal-stat-row,
  .portal-strip {
    grid-template-columns: 1fr;
  }

  .portal-plat-cell {
    border-right: 0;
  }

  .portal-plat-cell:nth-child(n + 3) {
    border-bottom: 1px solid var(--portal-line);
  }

  .portal-plat-cell:last-child {
    border-bottom: 0;
  }

  .portal-section,
  .portal-push,
  .portal-article {
    padding: 40px 0;
  }

  .portal-hero-grid {
    padding: 36px 0 40px;
    gap: 28px;
  }
}
