/* 小报童风格：白底 + 橙色品牌色 + 国内 SaaS 阅读习惯 */
:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f8;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #8c8c8c;
  --accent: #fa8919;
  --accent-hover: #e67a00;
  --accent-dark: #d96b00;
  --accent-soft: #fff4e8;
  --border: #ebebeb;
  --border-strong: #d9d9d9;
  --warn: #faad14;
  --input-bg: #ffffff;
  --code-bg: #f5f5f5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-segment: 0 1px 3px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html[data-text-size="md"] { font-size: 18.5px; }
html[data-text-size="lg"] { font-size: 22px; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.47059;
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: 1.75rem; margin: 0 0 0.75rem; line-height: 1.2; }
h2 { font-size: 1.25rem; margin: 1.25rem 0 0.5rem; }
h3 { font-size: 1.0625rem; margin: 1rem 0 0.5rem; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.0625rem;
}
.logo:hover { color: var(--accent); }

.nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.75rem;
}

.nav-main > a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.15rem;
  font-size: 0.9375rem;
}
.nav-main > a:hover { color: var(--accent); }
.nav-main > a.nav-register { color: var(--accent); font-weight: 600; }
.nav-main > a.nav-register:hover { color: var(--accent-hover); }

.text-size-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 9px;
  padding: 2px;
  flex-shrink: 0;
}

.text-size-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.2;
  min-width: 2.1rem;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.text-size-btn:hover { color: var(--text); }

.text-size-btn[aria-pressed="true"] {
  background: #ffffff;
  box-shadow: var(--shadow-segment);
  color: var(--text);
}

.site-main { padding: 2rem 0 4rem; min-height: 60vh; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--bg-subtle);
}

.site-footer a.footer-icp { color: var(--muted); text-decoration: none; }
.site-footer a.footer-icp:hover { color: var(--accent); text-decoration: underline; }
.footer-company { text-align: center; }
.footer-icp-line { margin: 0.5rem 0; font-size: 0.9375rem; color: var(--text); }
.footer-icp-num { font-weight: 700; color: var(--text) !important; }
.footer-operator { margin: 0 0 0.35rem; font-size: 0.95rem; color: var(--text); }
.footer-official { margin: 0.25rem 0 0.35rem; }
.footer-official a { color: var(--muted); }
.footer-official a:hover { color: var(--accent); }
.footer-contact { margin: 0.35rem 0; }
.footer-contact a { color: var(--muted); }
.footer-contact a:hover { color: var(--accent); }
.footer-note { margin-top: 0.75rem; font-size: 0.8125rem; }

.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.lead { color: var(--muted); max-width: 40em; font-size: 1.0625rem; }
.hero-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.btn {
  display: inline-block;
  padding: 0.625rem 1.125rem;
  border-radius: 980px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  min-height: 2.75rem;
  transition: opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { opacity: 0.82; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.875rem; min-height: 2.25rem; }

.form label { display: block; margin-bottom: 1rem; font-weight: 500; }

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="number"],
.form input[type="date"],
.form select,
.form textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.625rem 0.75rem;
  margin-top: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  min-height: 2.75rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(250, 137, 25, 0.15);
}

.form textarea { min-height: 8rem; max-width: 100%; }
.form textarea.code {
  max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  min-height: 11rem;
}

.alert { padding: 0.875rem 1rem; border-radius: var(--radius-md); margin: 0.75rem 0; font-size: 0.9375rem; }
.alert-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.alert-ok { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.alert-warn { background: #fffbe6; color: #ad6800; border: 1px solid #ffe58f; }

.hint { color: var(--muted); font-size: 0.9375rem; }
.field-hint { margin: -0.35rem 0 0.85rem; }
.label-optional { font-weight: normal; color: var(--muted); font-size: 0.875rem; }
.small { font-size: 0.875rem; }
.muted { color: var(--muted); }

.box-muted {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
}

.prose h2 { margin-top: 1.5rem; font-size: 1.125rem; }
.prose ul, .prose-list { padding-left: 1.25rem; }
.prose li { margin: 0.35rem 0; }
.prose a { color: var(--accent); }
.prose a:hover { color: var(--accent-hover); }

.checkbox { display: flex; gap: 0.5rem; align-items: flex-start; max-width: 480px; }
.checkbox input { margin-top: 0.35rem; width: 1.125rem; height: 1.125rem; flex-shrink: 0; accent-color: var(--accent); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  box-shadow: var(--shadow-sm);
}

.stat-label { margin: 0; color: var(--muted); font-size: 0.875rem; }
.stat-num { font-size: 1.75rem; font-weight: 700; margin: 0.25rem 0 0; color: var(--accent); letter-spacing: -0.03em; }

.table-simple { width: 100%; border-collapse: collapse; font-size: 0.9375rem; margin: 1rem 0; }
.table-simple th, .table-simple td { border: 1px solid var(--border); padding: 0.625rem 0.75rem; text-align: left; }
.table-simple th { background: var(--bg-subtle); font-weight: 600; }
.table-compact td, .table-compact th { font-size: 0.875rem; }

.tag {
  display: inline-block;
  font-size: 0.8125rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-subtle);
  color: var(--muted);
  border-radius: 980px;
}

.tag-approved { background: #f6ffed; color: #389e0d; }
.tag-pending { background: #fffbe6; color: #d48806; }
.tag-revoked { background: #fff2f0; color: #cf1322; }

.dash-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.inline-form { display: inline; }

.template-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.template-preview {
  white-space: pre-wrap;
  font-size: 0.875rem;
  background: var(--code-bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow: auto;
  border: 1px solid var(--border);
}

code { background: var(--code-bg); padding: 0.12rem 0.4rem; border-radius: 6px; font-size: 0.9em; color: #595959; }

.subscription-banner { margin: 0; border-radius: 0; }
.subscription-banner a { color: inherit; font-weight: 700; text-decoration: underline; }
.card-pricing { border-color: var(--accent); }

.plan-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 1.25rem 0;
}

.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.plan-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-card);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--card) 40%);
}

.plan-price { font-size: 1.75rem; font-weight: 700; margin: 0; color: var(--accent); letter-spacing: -0.03em; }
.plan-hint { color: var(--muted); font-size: 0.875rem; margin: 0; }
.plan-form { margin-top: auto; }
.plan-agree { font-size: 0.875rem; max-width: none; }
.btn-block { width: 100%; text-align: center; }
.billing-status p { margin: 0.35rem 0; }

.page-guide .tutorial-section { margin-top: 2rem; }
.page-guide .tutorial-section h2 { margin-bottom: 0.75rem; font-size: 1.3125rem; }
.page-guide .tutorial-section h3 { margin: 1rem 0 0.5rem; font-size: 1.0625rem; }
.tutorial-toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.tutorial-toc li { margin: 0.35rem 0; }
.tutorial-toc a { color: var(--accent); }

.tutorial-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  overflow-x: auto;
}

.tutorial-oneline { font-size: 1.0625rem; line-height: 1.6; }
.faq-list { margin: 0; }
.faq-list dt { font-weight: 700; margin-top: 1rem; }
.faq-list dt:first-child { margin-top: 0; }

.industry-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 0.75rem;
}

.industry-group h3 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--accent); }
.industry-list { margin: 0; font-size: 0.9375rem; }

.form select {
  width: 100%;
  max-width: 420px;
  padding: 0.625rem 0.75rem;
  margin-top: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
  min-height: 2.75rem;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* 注册 / 登录独立页 */
.page-register .site-main,
.page-login .site-main {
  padding-top: 1.5rem;
}

.register-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
  align-items: start;
}

.register-aside .register-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.register-aside h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.register-points {
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
  color: var(--text);
}

.register-points li {
  margin: 0.65rem 0;
  line-height: 1.55;
}

.register-aside-foot { margin-top: 1.5rem; }

.register-form-card {
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
}

.register-form-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
}

.register-form .btn-block { margin-top: 0.5rem; }

.register-login-link {
  margin: 1.25rem 0 0;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.auth-layout {
  display: flex;
  justify-content: center;
  padding: 1rem 0 2rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.auth-switch {
  margin: 1.25rem 0 0;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 820px) {
  .register-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .register-aside h1 { font-size: 1.625rem; }
}

@media (max-width: 720px) {
  .header-inner { align-items: flex-start; }
  .nav-main { width: 100%; justify-content: flex-start; }
  .text-size-switch { margin-left: auto; }
  .table-simple { font-size: 0.875rem; }
  .hero h1 { font-size: 1.625rem; }
  .plan-grid { grid-template-columns: 1fr; }
}

.billing-refund-notice { border-width: 2px; }
.billing-refund-list { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.billing-refund-list li { margin: 0.35rem 0; }

.stat-num-sm { font-size: 1.35rem; }
.stat-denom { font-size: 0.95rem; font-weight: 500; color: var(--muted); }

.hidden { display: none !important; }

.tool-panel {
  margin-top: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.file-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 1rem;
}

.file-input-native {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-drop {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.file-pick-btn {
  align-self: flex-start;
  margin-top: 0.35rem;
  cursor: pointer;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.file-drop:hover,
.file-drop-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-drop-title { font-weight: 700; font-size: 1rem; }
.file-drop-hint { color: var(--muted); font-size: 0.875rem; }
.file-drop-name {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  word-break: break-all;
  color: var(--muted);
}

.file-drop-ready { color: var(--accent-dark); font-weight: 600; }

.file-drop-done {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-drop-ok {
  font-size: 0.875rem;
  font-weight: 600;
  color: #389e0d;
}

#merge-status {
  margin: 0.5rem 0 1rem;
  color: var(--text);
  font-size: 0.9375rem;
}

.column-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 1rem 0;
}

.column-set {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.125rem;
  margin: 0;
  background: var(--card);
}

.column-set legend {
  font-weight: 700;
  padding: 0 0.35rem;
}

.column-set label {
  display: block;
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.column-set select,
.column-set input[type="number"] {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-size: 1rem;
  font-family: inherit;
  min-height: 2.75rem;
}

.tutorial-section { margin-top: 2rem; }
.tutorial-toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.steps-guide { padding-left: 1.25rem; }
.steps-guide li { margin: 0.5rem 0; }

.quota-bar {
  height: 0.5rem;
  background: var(--border);
  border-radius: 980px;
  overflow: hidden;
  margin-top: 0.5rem;
  max-width: 320px;
}
.quota-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 980px;
  transition: width 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .text-size-btn, .btn { transition: none; }
}
