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

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #fafafa;
  --card-bg: #fff;
  --border: #e5e7eb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.nav {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.site-type {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nav-btn {
  margin-left: auto;
  padding: 0.4rem 0.9rem;
  background: var(--primary);
  color: #fff !important;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.85rem;
}

.nav-btn:hover {
  background: var(--primary-hover);
}

.main {
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

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

.hero h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.desc-secondary {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.cta-btn:hover {
  background: var(--primary-hover);
}

.cta-btn.cta-below {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
}

/* Links */
.links {
  margin-top: 1.5rem;
}

.links h2,
.blog h2,
.calculator h2 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.link-card {
  padding: 0.6rem 0.9rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  text-align: center;
}

.link-card:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Blog / 经验分享 */
.blog {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.blog-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-post {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.blog-post summary {
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  background: var(--bg);
}

.blog-post summary::-webkit-details-marker {
  display: none;
}

.blog-post summary::after {
  content: "▼";
  float: right;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.blog-post[open] summary::after {
  content: "▲";
}

.blog-body {
  padding: 0 0.9rem 0.9rem;
}

.blog-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* 房租计算器 */
.calculator {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.calculator .section-desc {
  margin-bottom: 1rem;
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.calc-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text);
}

.calc-form label span {
  color: var(--text-muted);
}

.calc-form input {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.calc-btn {
  padding: 0.55rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  align-self: flex-start;
}

.calc-btn:hover {
  background: var(--primary-hover);
}

.calc-result {
  padding: 0.9rem;
  background: #eff6ff;
  border-radius: 6px;
  font-size: 0.85rem;
}

.calc-line {
  margin: 0 0 0.35rem 0;
  color: var(--text);
}

.calc-line:last-child {
  margin-bottom: 0;
}

.calc-line span {
  color: var(--primary);
  font-weight: 600;
}

/* Intro */
.intro {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #eff6ff;
  border-radius: 8px;
}

.intro p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 2rem;
}

.footer p {
  margin-bottom: 0.15rem;
}

.footer .icp {
  color: var(--text-muted);
}

.footer .site-name {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.35rem;
  }
  .site-type {
    display: none;
  }
}
