/* hfhyd.com — 中小微财税助手 */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1a2332;
  --muted: #5a6a7e;
  --border: #e2e8f0;
  --primary: #1e6b4f;
  --primary-hover: #165540;
  --primary-soft: #e8f5ef;
  --accent: #c4782a;
  --accent-soft: #fef6eb;
  --danger-soft: #fef2f2;
  --danger: #b91c1c;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(26, 35, 50, 0.06), 0 4px 16px rgba(26, 35, 50, 0.04);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --max: 960px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img, svg { max-width: 100%; display: block; }

/* Header / Nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand:hover { text-decoration: none; color: var(--primary); }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--primary), #2a8f6a);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
}

.nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

.nav a.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

/* Main */
main {
  flex: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  width: 100%;
}

/* Hero */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero .lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--primary-soft);
  border-color: #c5ddd2;
  color: var(--primary);
}

.btn-block { width: 100%; }

/* Cards */
.section-title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

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

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

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  margin-bottom: 0.85rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary-soft), #eef8f3);
  border: 1px solid #c5ddd2;
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cta-band h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.cta-band p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Disclaimer / alerts */
.disclaimer,
.alert {
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.disclaimer {
  background: var(--accent-soft);
  border: 1px solid #f0d9b5;
  color: #6b4a1e;
}

.alert-warn {
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
  margin-bottom: 1.25rem;
}

.alert-ok {
  background: var(--primary-soft);
  border: 1px solid #b8dfcb;
  color: #14553e;
  margin-bottom: 1.25rem;
  display: none;
}

.alert-ok.show { display: block; }

/* Forms */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
  .form-grid.two { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.hint {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25rem;
}

input[type="text"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 107, 79, 0.15);
}

textarea { min-height: 100px; resize: vertical; }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding-top: 0.25rem;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
}

.radio-row input { width: auto; accent-color: var(--primary); }

/* Result box */
.result-box {
  background: var(--primary-soft);
  border: 1px solid #b8dfcb;
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-top: 1.25rem;
  display: none;
}

.result-box.show { display: block; }

.result-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--primary);
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed #b8dfcb;
  font-size: 0.95rem;
}

.result-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: 0.65rem;
}

.result-row .val { font-variant-numeric: tabular-nums; }

/* Table */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: #f1f5f9;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: #fafbfc; }

.month-tag {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.badge-month { background: #e0e7ff; color: #3730a3; }
.badge-quarter { background: var(--accent-soft); color: #92400e; }
.badge-year { background: #fce7f3; color: #9d174d; }

/* Contact placeholders */
.contact-card {
  background: var(--surface);
  border: 1px dashed #c5ddd2;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.contact-card h3 { margin: 0 0 0.5rem; font-size: 1rem; }

.placeholder-wechat {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  display: inline-block;
  font-size: 0.95rem;
  margin: 0.35rem 0;
  user-select: all;
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* Page intro */
.page-intro {
  margin-bottom: 1.5rem;
}

.page-intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
}

.page-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

/* Footer */
.site-footer {
  background: #1a2332;
  color: #a8b4c4;
  padding: 1.75rem 1.25rem;
  font-size: 0.85rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.footer-inner a { color: #c5ddd2; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.85rem;
}

.footer-copy { margin: 0 0 0.5rem; }

.footer-disclaimer {
  margin: 0;
  opacity: 0.85;
  line-height: 1.5;
  max-width: 42rem;
}

/* Misc */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.mt-0 { margin-top: 0; }
.mb-1 { margin-bottom: 1rem; }

ul.clean {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

ul.clean li { margin-bottom: 0.35rem; }

@media (max-width: 640px) {
  .hero { padding: 1.5rem 1.15rem; }
  .header-inner { padding: 0.65rem 1rem; }
  main { padding: 1.25rem 1rem 2.5rem; }
  th, td { padding: 0.65rem 0.75rem; }
}
