/* Editorial Paper Atelier — LibreOffice 中文站 */
:root {
  --paper: #f7f3ea;
  --paper-dark: #ebe5d8;
  --ink: #2c2825;
  --ink-muted: #5c5650;
  --teal: #0d6e6e;
  --teal-light: #e8f2f2;
  --teal-dark: #095555;
  --rule: #d4cdc0;
  --rail-width: 220px;
  --content-max: 720px;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --mono: "Courier New", "Consolas", "Lucida Console", monospace;
  --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(180, 170, 155, 0.08) 27px,
      rgba(180, 170, 155, 0.08) 28px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(200, 190, 175, 0.04) 3px,
      rgba(200, 190, 175, 0.04) 4px
    ),
    radial-gradient(ellipse at 20% 0%, rgba(255, 252, 245, 0.9) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(235, 228, 215, 0.5) 0%, transparent 50%);
  min-height: 100vh;
  line-height: 1.7;
}

/* ── Left Rail Navigation ── */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-width);
  height: 100vh;
  background: var(--paper-dark);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem;
  z-index: 100;
  overflow-y: auto;
}

.rail-logo {
  display: block;
  margin-bottom: 2rem;
  text-decoration: none;
}

.rail-logo img {
  width: 48px;
  height: 48px;
  display: block;
}

.rail-logo span {
  display: block;
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--teal);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}

.rail-nav {
  list-style: none;
  flex: 1;
}

.rail-nav li { margin-bottom: 0.25rem; }

.rail-nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.rail-nav a:hover,
.rail-nav a.active {
  color: var(--teal);
  border-left-color: var(--teal);
  background: rgba(13, 110, 110, 0.06);
}

.rail-meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
  line-height: 1.9;
}

/* ── Main Layout ── */
.shell {
  margin-left: var(--rail-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrap {
  flex: 1;
  padding: 2.5rem 3rem 3rem;
  max-width: calc(var(--content-max) + var(--rail-width) + 6rem);
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--teal);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb span { color: var(--ink-muted); }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: normal;
  color: var(--ink);
  line-height: 1.3;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.55rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  color: var(--teal-dark);
}

h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.6rem;
}

p { margin-bottom: 1.1rem; }

.lead {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.meta-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  display: block;
  margin-bottom: 0.35rem;
}

.meta-value {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* ── Hero ── */
.hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--teal);
}

.hero-figure {
  margin: 1.5rem 0;
  text-align: center;
}

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

.hero-figure figcaption {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
  margin-top: 0.5rem;
  letter-spacing: 0.08em;
}

/* ── Download CTA ── */
.download-banner {
  background: var(--teal-light);
  border: 1px solid var(--teal);
  border-left: 5px solid var(--teal);
  padding: 1.75rem 2rem;
  margin: 2rem 0;
}

.download-banner h2 {
  border: none;
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.btn-download {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.85rem 2rem;
  margin-top: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-download:hover {
  background: var(--teal-dark);
}

.btn-download-secondary {
  display: inline-block;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  margin-left: 1.25rem;
  border-bottom: 1px solid var(--teal);
}

.btn-download-secondary:hover {
  color: var(--teal-dark);
}

/* ── Feature Grid (editorial, not bento) ── */
.feature-list {
  list-style: none;
  margin: 1.5rem 0;
}

.feature-list li {
  padding: 1rem 0;
  border-bottom: 1px dashed var(--rule);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: start;
}

.feature-list .feat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}

/* ── News Cards ── */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

.news-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.news-card:hover {
  background: rgba(13, 110, 110, 0.04);
}

.news-card img {
  width: 160px;
  height: 120px;
  object-fit: contain;
  border: 1px solid var(--rule);
  background: #fff;
}

.news-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  color: var(--teal-dark);
}

.news-card .card-date {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

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

/* ── Article ── */
.article-header {
  margin-bottom: 2rem;
}

.article-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.article-body img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1.1rem 1.5rem;
}

.article-body li { margin-bottom: 0.4rem; }

.article-body code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--paper-dark);
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--rule);
}

.article-body pre {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--paper-dark);
  border: 1px solid var(--rule);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  line-height: 1.5;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--rule);
  padding: 0.6rem 0.85rem;
  text-align: left;
}

.spec-table th {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--teal-light);
  color: var(--teal-dark);
}

/* ── Footer ── */
.site-footer {
  margin-left: var(--rail-width);
  background: var(--paper-dark);
  border-top: 1px solid var(--rule);
  padding: 2rem 3rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: var(--content-max);
}

.site-footer h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
}

.footer-links li { margin-bottom: 0.35rem; }

.footer-links a {
  color: var(--ink-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.footer-copy {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

/* ── Utility ── */
.text-teal { color: var(--teal); }

.version-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  background: var(--teal);
  color: #fff;
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.06em;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root { --rail-width: 0px; }

  .rail {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 1rem;
    gap: 0.5rem;
  }

  .rail-logo { margin-bottom: 0; margin-right: auto; }

  .rail-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    width: 100%;
  }

  .rail-nav a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
  }

  .rail-nav a.active,
  .rail-nav a:hover {
    border-left: none;
    border-bottom-color: var(--teal);
  }

  .rail-meta { display: none; }

  .shell,
  .site-footer { margin-left: 0; }

  .content-wrap { padding: 1.5rem; }

  .news-card { grid-template-columns: 1fr; }

  .news-card img { width: 100%; height: auto; }

  .feature-list li { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  h1 { font-size: 1.8rem; }
}
