:root {
  --indigo: #3a389e;
  --violet: #7b5cd6;
  --gold: #f0a500;
  --ink: #1f2330;
  --muted: #6b7280;
  --line: #e7e7ef;
  --bg: #f6f7fb;
  --card: #ffffff;
  --shadow: 0 6px 24px rgba(40, 40, 90, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-left { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.brand-mini { font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: .5px; }
.brand-mini:hover { text-decoration: none; }
.nav-left a:not(.brand-mini) { color: var(--muted); font-size: 15px; }
.nav-left a.active { color: var(--indigo); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 14px; }
.company-block { display: flex; align-items: center; gap: 10px; }
.company-name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.logo { width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow); }
.auth-area { display: flex; align-items: center; gap: 10px; }
.auth-area .btn-link { font-size: 14px; color: var(--indigo); }
.auth-area .user-greet { font-size: 14px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 9px 18px; border-radius: 10px; transition: .15s ease; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--indigo); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--violet); text-decoration: none; }
.btn-block { width: 100%; }

/* ---------- layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 48px; }
.section-title { font-size: 22px; font-weight: 800; margin: 8px 0 18px; }
.muted { color: var(--muted); }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, #2c2b73 0%, #5b46c9 55%, #7b5cd6 100%);
  border-radius: 20px; color: #fff; padding: 46px 40px; margin-bottom: 34px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,209,102,.35), transparent 70%); border-radius: 50%;
}
.hero h1 { font-size: 34px; margin: 0 0 12px; font-weight: 800; }
.hero p { font-size: 16px; opacity: .92; max-width: 620px; margin: 0 0 22px; }
.hero .btn-primary { background: #fff; color: var(--indigo); }

/* ---------- work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.work-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); transition: .18s ease; display: flex; flex-direction: column;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(40,40,90,.14); }
.work-card .cover { aspect-ratio: 3/4; background: #eef; overflow: hidden; }
.work-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.work-card .body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.work-card h3 { margin: 0; font-size: 18px; }
.work-card .meta { font-size: 13px; color: var(--muted); }
.work-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; background: #f1eefb; color: var(--violet); padding: 2px 9px; border-radius: 999px; }
.work-card .summary { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }
.price { color: var(--gold); font-weight: 800; font-size: 17px; }
.price small { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- reader ---------- */
.reader-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 20px;
  position: sticky; top: 70px; z-index: 20; box-shadow: var(--shadow);
}
.reader-top .title { font-size: 19px; font-weight: 800; }
.reader-top .sub { font-size: 13px; color: var(--muted); }
.reader-wrap { max-width: 760px; margin: 0 auto; }
.page-img { width: 100%; border-radius: 12px; margin-bottom: 14px; box-shadow: var(--shadow); background: #fff; }
.lock-tile {
  width: 100%; aspect-ratio: 3/4; border-radius: 12px; margin-bottom: 14px;
  background: linear-gradient(135deg, #2c2b73, #7b5cd6);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #fff; text-align: center; padding: 20px;
}
.lock-tile .lock-icon { font-size: 34px; }
.lock-tile .lt-title { font-size: 17px; font-weight: 700; }
.lock-tile .lt-sub { font-size: 13px; opacity: .85; }
.unlock-banner {
  max-width: 760px; margin: 0 auto 18px; background: #fff7e6; border: 1px solid #ffe0a3;
  color: #8a5b00; border-radius: 12px; padding: 12px 16px; font-size: 14px; text-align: center;
}

/* ---------- forms ---------- */
.auth-wrap { max-width: 420px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.auth-wrap h2 { margin: 0 0 6px; font-size: 24px; }
.auth-wrap .hint { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=password] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-family: inherit;
}
.field input:focus { outline: none; border-color: var(--violet); }
.agree-row { font-size: 13.5px; color: var(--muted); margin: 6px 0 18px; }
.agree-row input { margin-right: 7px; vertical-align: middle; }
.form-error { color: #d93025; font-size: 13.5px; min-height: 18px; margin-bottom: 10px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 16px; }

/* ---------- article (privacy/terms/about) ---------- */
.article { max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 36px 40px; box-shadow: var(--shadow); }
.article h1 { font-size: 26px; margin-top: 0; }
.article h2 { font-size: 19px; margin-top: 28px; }
.article p, .article li { color: #2c303a; font-size: 15px; }
.article .updated { color: var(--muted); font-size: 13px; }

/* ---------- footer ---------- */
.site-footer { background: #1f2330; color: #c9ccd6; margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 26px 20px; font-size: 13px; text-align: center; }
.footer-links { margin-bottom: 10px; }
.footer-links a { color: #c9ccd6; }
.footer-links .sep { margin: 0 10px; color: #555; }
.footer-copy { color: #e7e7ef; margin-bottom: 8px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; color: #9aa0ad; }

/* ---------- toast & modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: #1f2330; color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.modal-mask { position: fixed; inset: 0; background: rgba(20,20,40,.5); display: flex; align-items: center; justify-content: center; z-index: 300; }
.modal { background: #fff; border-radius: 16px; padding: 28px; width: 360px; max-width: 92vw; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 6px; font-size: 20px; }
.modal .pay-row { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0; padding: 14px; background: var(--bg); border-radius: 10px; }
.modal .pay-price { color: var(--gold); font-size: 26px; font-weight: 800; }
.modal .pay-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.modal .modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal .btn-ghost { flex: 1; }
.modal .btn-primary { flex: 1; }

/* ---------- business page ---------- */
.section-sub { font-size: 14px; margin: -10px 0 18px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0 42px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 14px; text-align: center; box-shadow: var(--shadow); }
.stat .num { font-size: 28px; font-weight: 800; color: var(--indigo); line-height: 1.2; }
.stat .num small { font-size: 14px; color: var(--muted); font-weight: 600; }
.stat .label { font-size: 13px; color: var(--muted); margin-top: 6px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 42px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.step .step-no { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; }
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-bottom: 30px; }
.feature { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.feature .fi { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #eef0ff, #f3ecff); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature h3 { margin: 0 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 38px; }
.biz-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px;
  box-shadow: var(--shadow); transition: .18s ease;
}
.biz-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(40,40,90,.14); }
.biz-icon {
  width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef0ff, #f3ecff); margin-bottom: 14px;
}
.biz-card h3 { margin: 0 0 8px; font-size: 17px; }
.biz-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }

.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 38px; }
.mode-card { border-radius: 16px; padding: 24px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.mode-card.free { background: linear-gradient(135deg, #eef7ff, #f3f0ff); }
.mode-card.pay { background: linear-gradient(135deg, #fff6e6, #f3ecff); }
.mode-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.mode-card.free .mode-tag { background: #dbeafe; color: #1d4ed8; }
.mode-card.pay .mode-tag { background: #ffe9bf; color: #9a6200; }
.mode-card h3 { margin: 0 0 8px; font-size: 18px; }
.mode-card p { margin: 0; font-size: 14px; color: #4a4f5c; line-height: 1.7; }

@media (max-width: 640px) {
  .company-name { display: none; }
  .hero { padding: 32px 22px; }
  .hero h1 { font-size: 26px; }
  .article { padding: 24px 20px; }
  .biz-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}
