/* ============================================================
   SiteManagement — blog theme (GeneratePress-style)
   White, serif headlines, narrow reading column, flat cards
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-2: #fafafa;
  --bg-3: #f2f2f2;
  --card: #ffffff;
  --border: #e5e5e5;
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-2: #059669;
  --buy: #16a34a;
  --sell: #dc2626;
  --radius: 4px;
  --shadow: 0 4px 18px rgba(0, 0, 0, .08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.3;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(960px, 92%); margin: 0 auto; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--border); background: #fff; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 700; font-family: Georgia, serif; }
.logo img { height: 30px; width: 30px; }
.logo span { color: var(--text); }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--muted); padding: 8px 12px; border-radius: 4px;
  font-size: 14px;
}
.nav a:hover { color: var(--accent); background: var(--bg-2); text-decoration: none; }
.nav a.active { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 24px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 64px 0 48px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.hero h1 { font-size: clamp(30px, 5vw, 46px); }
.hero p { color: var(--muted); max-width: 620px; margin: 14px auto 0; font-size: 16.5px; }
.hero-badges { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ---------- buttons / tags ---------- */
.btn {
  display: inline-block; background: var(--accent); color: #fff !important;
  font-weight: 600; padding: 9px 20px; border-radius: var(--radius); font-size: 14.5px;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn-outline { background: transparent; color: var(--accent) !important; border: 1px solid var(--accent); }
.btn-outline:hover { background: rgba(37, 99, 235, .06); }

.tag {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; letter-spacing: .3px;
}
.tag-amber { background: rgba(245, 185, 66, .18); color: #92600a; }
.tag-red { background: rgba(220, 38, 38, .10); color: var(--sell); }
.tag-green { background: rgba(22, 163, 74, .12); color: var(--buy); }
.tag-blue { background: rgba(37, 99, 235, .10); color: var(--accent); }
.tag-gray { background: var(--bg-3); color: var(--muted); }

/* ---------- sections & cards ---------- */
.section { padding: 44px 0; }
.section-alt { background: var(--bg-2); }
.section-title { font-size: 26px; margin-bottom: 6px; }
.section-sub { color: var(--muted); margin-bottom: 26px; font-size: 15px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); }
.card-img { height: 140px; background: var(--bg-3); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); }
.card-img img { max-height: 100px; max-width: 80%; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 18px; }
.card-body p { color: var(--muted); font-size: 14px; flex: 1; }
.card-link { font-weight: 600; font-size: 14px; }

/* ---------- article ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article h2 { font-size: 25px; margin: 36px 0 12px; }
.article h3 { font-size: 19px; margin: 26px 0 10px; color: var(--text); }
.article p, .article li { color: #333; font-size: 16px; }
.article ul, .article ol { padding-left: 22px; margin: 12px 0; }
.article li { margin: 7px 0; }
.article blockquote {
  border-left: 4px solid var(--accent); background: var(--bg-2);
  padding: 14px 18px; border-radius: 0 4px 4px 0; margin: 18px 0; color: var(--muted);
}
.article table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.article th, .article td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article th { background: var(--bg-2); }
.article code { background: var(--bg-3); border-radius: 4px; padding: 2px 6px; font-size: 13.5px; }
.article pre { background: #fafafa; border: 1px solid var(--border); border-radius: 4px; padding: 14px 16px; overflow-x: auto; margin: 18px 0; }
.article pre code { background: none; padding: 0; }
.article img { max-width: 100%; border-radius: 4px; }
.article-cover { width: 100%; border-radius: 4px; margin-bottom: 20px; }
.article-sub { color: var(--muted); font-size: 16.5px; font-style: italic; }

.ad-slot {
  border: 1px dashed var(--border); border-radius: 4px;
  padding: 14px; margin: 24px 0; overflow: hidden; text-align: center; background: var(--bg-2);
}
.ad-slot-bottom { margin-bottom: 0; }

.page-sub { color: var(--muted); margin-top: 8px; max-width: 640px; }

/* ---------- footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; gap: 14px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); font-size: 13.5px; margin-left: 18px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .copy { color: var(--muted); font-size: 13.5px; }

/* ---------- misc ---------- */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: 34px; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 640px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.mt-16 { margin-top: 16px; }
.hint { color: var(--muted); font-size: 13.5px; }
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 42px; height: 42px;
  background: var(--accent); color: #fff; border: 0; border-radius: 4px;
  font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .2s; z-index: 60;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; text-align: center; }
  .nav-toggle { display: block; }
  .hero { padding: 44px 0 36px; }
}
