:root {
  --bg: #f6efe4;
  --paper: rgba(255, 250, 242, 0.92);
  --paper-strong: #fffaf2;
  --ink: #1e2430;
  --muted: #6a7180;
  --line: rgba(30, 36, 48, 0.1);
  --brand: #ea6a2a;
  --brand-deep: #bf4e1f;
  --accent: #136f63;
  --shadow: 0 20px 60px rgba(78, 47, 28, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Segoe UI Variable", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(234, 106, 42, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(19, 111, 99, 0.16), transparent 24%),
    linear-gradient(180deg, #fbf4e9 0%, #f6efe4 38%, #f2eadf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.24;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

pre,
code {
  font-family: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", monospace;
}

code {
  padding: 0.14rem 0.38rem;
  border-radius: 999px;
  background: rgba(30, 36, 48, 0.08);
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 20px;
  background: #1f2937;
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

pre code {
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: inherit;
}

blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--brand);
  background: rgba(255, 255, 255, 0.54);
  border-radius: 0 18px 18px 0;
  color: #38404f;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
  opacity: 0.65;
}

.ambient-one {
  width: 180px;
  height: 180px;
  top: 120px;
  left: -40px;
  background: rgba(234, 106, 42, 0.18);
}

.ambient-two {
  width: 240px;
  height: 240px;
  right: -80px;
  bottom: 120px;
  background: rgba(19, 111, 99, 0.14);
}

.app-shell {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 242, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, #f4984d 100%);
  color: #fffaf2;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(234, 106, 42, 0.3);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.82rem;
}

.install-button,
.primary-action,
.secondary-action,
.post-card-more,
.back-chip {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.install-button,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.install-button,
.primary-action {
  border: none;
  background: linear-gradient(135deg, var(--brand) 0%, #f4984d 100%);
  color: #fffaf2;
  box-shadow: 0 12px 24px rgba(234, 106, 42, 0.24);
}

.secondary-action,
.back-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.install-button:hover,
.primary-action:hover,
.secondary-action:hover,
.post-card-link:hover,
.back-chip:hover {
  transform: translateY(-1px);
}

.quick-nav {
  display: none;
  gap: 10px;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}

.quick-nav a.is-active {
  background: rgba(19, 111, 99, 0.1);
  color: var(--accent);
  font-weight: 700;
}

.main-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.hero-card,
.info-card,
.post-article,
.post-card-link {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-card,
.info-card,
.post-article {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(19, 111, 99, 0.12), transparent 28%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 236, 0.92));
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -24px;
  top: -24px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(234, 106, 42, 0.16), rgba(244, 152, 77, 0.04));
  transform: rotate(18deg);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-card h1,
.info-card h1,
.post-hero h1 {
  margin: 0;
  line-height: 1.15;
  font-size: clamp(2rem, 6vw, 3.2rem);
}

.hero-lead,
.info-card p,
.post-summary {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions,
.info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
}

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

.post-grid {
  display: grid;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.post-card-link {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  text-decoration: none;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-card h3 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.25;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.post-card-more {
  display: inline-flex;
  width: fit-content;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(19, 111, 99, 0.1);
  color: var(--accent);
  font-weight: 700;
}

.back-chip {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  text-decoration: none;
}

.post-hero {
  margin-bottom: 28px;
}

.post-kicker {
  margin: 0 0 10px;
  color: var(--brand-deep);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-summary {
  margin: 14px 0 0;
}

.post-body {
  font-size: 1.02rem;
  line-height: 1.85;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body > :last-child {
  margin-bottom: 0;
}

.post-body h2,
.post-body h3,
.post-body h4 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.site-footer {
  padding: 8px 6px 0;
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 0.94rem;
}

.site-footer p {
  margin: 0.35rem 0;
}

.site-footer a {
  text-decoration: none;
}

.footer-sep {
  margin: 0 0.35rem;
}

.mobile-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(calc(100% - 56px), 360px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(-50%) translateY(22px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.mobile-nav.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mobile-nav a {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.mobile-nav a.is-active {
  background: rgba(234, 106, 42, 0.12);
  color: var(--brand-deep);
}

[hidden] {
  display: none !important;
}

@media (min-width: 760px) {
  .app-shell {
    padding: 24px 24px 40px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .quick-nav {
    display: flex;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-nav {
    display: none;
  }
}

@media (max-width: 759px) {
  .app-shell {
    padding: 18px 18px 40px;
  }

  .main-panel {
    gap: 20px;
  }

  .topbar {
    top: 10px;
    padding: 14px;
  }

  .brand-copy small {
    max-width: 14rem;
  }

  .hero-card,
  .info-card,
  .post-article {
    padding: 22px 18px;
  }

  .post-card-link {
    padding: 20px 18px;
  }

  .site-footer {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .install-button,
  .primary-action,
  .secondary-action,
  .post-card-more,
  .back-chip,
  .post-card-link {
    transition: none;
  }

  .mobile-nav {
    transition: none;
  }
}
