/* Helen Chen CPA — design C "简约现代 Clean modern" */
:root {
  --bg: #ffffff; --soft: #f9fafb; --surface: #ffffff; --surface-alt: #f3f4f6;
  --ink: #111827; --text: #111827; --body: #374151; --muted: #6b7280; --faint: #9ca3af;
  --line: #e5e7eb; --line-strong: #111827; --border: #e5e7eb;
  --accent: #0f5e9c; --accent-dark: #0a4573; --accent-soft: #eaf2fa;
  --link: #0f5e9c; --notice: #fff8e6; --notice-border: #f2d38a; --notice-ink: #6b4a12;
  --radius: 8px;
  --tint: #eef3f8; --tint-line: #dce4ee;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --soft: #111827; --surface: #111827; --surface-alt: #1f2937;
    --ink: #f3f4f6; --text: #f3f4f6; --body: #d1d5db; --muted: #9ca3af; --faint: #6b7280;
    --line: #1f2937; --line-strong: #e5e7eb; --border: #374151;
    --accent: #6cb4f0; --accent-dark: #9fd0f7; --accent-soft: #10273d; --link: #8cc6f5;
    --notice: #2a2312; --notice-border: #6b5428; --notice-ink: #f3dca8;
    --tint: #121b27; --tint-line: #1f2a38;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --soft: #111827; --surface: #111827; --surface-alt: #1f2937;
  --ink: #f3f4f6; --text: #f3f4f6; --body: #d1d5db; --muted: #9ca3af; --faint: #6b7280;
  --line: #1f2937; --line-strong: #e5e7eb; --border: #374151;
  --accent: #6cb4f0; --accent-dark: #9fd0f7; --accent-soft: #10273d; --link: #8cc6f5;
  --notice: #2a2312; --notice-border: #6b5428; --notice-ink: #f3dca8;
  --tint: #121b27; --tint-line: #1f2a38;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.7; padding-bottom: 72px; }
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.25rem); letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
.icon { flex: none; vertical-align: -3px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 821px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: .88rem; }
.kicker { margin: 0 0 10px; font-size: .9rem; color: var(--accent); font-weight: 500; }

/* header */
.site-header { background: var(--tint); border-bottom: 1px solid var(--tint-line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); margin-right: auto; line-height: 1; padding: 6px 0; }
.brand:hover { color: var(--ink); }
/* Logo from the old site: tall Oswald capitals, blue bar, CPA 注册会计师事务所 */
.brand-name { font-family: Oswald, "Arial Narrow", Impact, sans-serif; font-weight: 500; font-size: 34px; letter-spacing: .01em; color: var(--ink); line-height: 1.05; white-space: nowrap; }
.brand-bar { display: block; align-self: stretch; height: 4px; background: #2672ec; margin: 5px 4% 6px; }
.brand-sub { font-size: 14px; color: var(--ink); letter-spacing: .08em; white-space: nowrap; }
.site-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--ink); font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); }
.lang-toggle { font-size: 14px; color: var(--muted); text-decoration: none; }
.lang-toggle:hover { color: var(--ink); }
@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; padding-bottom: 4px; min-height: 0; }
  .brand-name { font-size: 27px; }
  .brand-bar { height: 3px; margin: 4px 4% 5px; }
  .brand-sub { font-size: 12px; }
  .site-header .header-cta { display: none; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .site-nav ul { gap: 18px; padding-right: 24px; }
  .site-nav a { white-space: nowrap; font-size: 15px; display: inline-block; padding: 8px 0; }
}

/* buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); padding: 13px 20px; font: inherit; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer; border: 1px solid transparent; min-height: 48px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: #d1d5db; }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--bg); padding: 10px 18px; min-height: 44px; font-size: 15px; }
.btn-dark:hover { opacity: .88; color: var(--bg); }
.btn-light { background: #fff; color: #111827; }
.btn-light:hover { background: #f3f4f6; color: #111827; }
.btn-ghost-light { background: #fff; color: #111827; border-color: #fff; }
.btn-ghost-light:hover { background: #e5e7eb; color: #111827; }

/* sections */
.section { padding-block: 88px; }
.section.alt { background: var(--soft); }
.section.bordered { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split-side { flex: 1 1 280px; min-width: 0; }
.split-main { flex: 2 1 600px; min-width: 0; }
.page-head { padding-block: 56px 16px; }
.page-head > p { color: var(--body); max-width: 46em; }
.notice { background: var(--notice); border: 1px solid var(--notice-border); color: var(--notice-ink); border-radius: var(--radius); padding: 10px 14px; }
.lead { font-size: 1.12rem; color: var(--body); max-width: 40em; }
@media (max-width: 820px) { .section { padding-block: 56px; } }

/* hero */
.hero { background: var(--tint); padding-block: 88px 150px; }
.hero .btn-secondary { background: var(--surface); border-color: #c9d3df; }
.hero-top { display: flex; flex-wrap: wrap; gap: 48px; align-items: end; }
.hero-photo { margin-top: -100px; }
.hero-head { flex: 3 1 540px; min-width: 0; }
.hero-head h1 { margin: 0; }
.hero-side { flex: 2 1 340px; min-width: 0; }
.hero-side .lead { margin: 0; }
.hero-img { display: block; width: 100%; height: 320px; object-fit: cover; object-position: left 45%; border-radius: 8px; box-shadow: 0 12px 30px rgba(17,24,39,.12); }
@media (max-width: 820px) { .hero { padding-block: 40px 90px; } .hero-top { gap: 20px; } .hero-photo { margin-top: -60px; } .hero-img { height: 180px; } }
.credentials { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.credentials figure { margin: 0; display: flex; align-items: center; gap: 12px; }
.credentials img { height: 48px; width: auto; background: #fff; border-radius: 4px; }
.credentials figcaption { font-size: .9rem; color: var(--muted); max-width: 14em; line-height: 1.4; }

/* home services rows */
.svc-list-rows { border-top: 1px solid var(--line-strong); }
.svc-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.svc-row:hover { color: var(--ink); background: linear-gradient(90deg, var(--soft), transparent); }
.svc-num { flex: none; width: 32px; font-size: .88rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.svc-row strong { flex: 1 1 220px; font-size: 1.2rem; font-weight: 500; }
.svc-text { flex: 2 1 260px; color: var(--muted); font-size: .95rem; }
.svc-row .icon { color: var(--accent); align-self: center; }
@media (max-width: 640px) { .svc-text { flex-basis: 100%; padding-left: 56px; } .svc-row .icon { display: none; } }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 32px; }
.feature-card { display: flex; flex-direction: column; gap: 12px; padding: 32px; min-height: 240px; text-decoration: none; color: var(--ink); }
.feature-card:hover { border-color: var(--ink); color: var(--ink); }
.feature-card strong { font-size: 1.5rem; letter-spacing: -0.01em; }
.feature-card > span:not(.meta):not(.more) { color: var(--body); font-size: .97rem; }
.feature-card .more { margin-top: auto; color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-top: 24px; }
.why-grid h3 { font-size: 1.25rem; margin-bottom: 8px; }
.why-grid p { color: var(--muted); margin: 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.post { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--line-strong); text-decoration: none; color: var(--ink); }
.post:hover { color: var(--ink); }
.post strong { font-size: 1.15rem; font-weight: 500; line-height: 1.45; }
.post > span:last-child { color: var(--muted); font-size: .95rem; }
.article-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-strong); }
.article-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.article-list a { font-weight: 500; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.article-list a:hover { color: var(--accent); }
.article-list p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

/* dark contact band */
.cta-band { background: #111827; color: #fff; padding-block: 80px; }
.cta-band h2 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; }
.cta-band p { color: #9ca3af; margin: 0; }
.cta-band .btn-secondary, .cta-band .btn-primary { background: #fff; color: #111827; border-color: #fff; }
.cta-band .btn-secondary:hover, .cta-band .btn-primary:hover { background: #e5e7eb; color: #111827; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: space-between; }
.cta-qr { display: flex; align-items: center; gap: 16px; color: #d1d5db; font-size: .9rem; }
.cta-qr img { width: 120px; border-radius: 6px; background: #fff; }
.cta-qr strong { display: block; color: #fff; font-size: 1rem; }

/* services page */
.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .9rem; color: var(--ink); }
.toc a:hover { border-color: var(--ink); }
.quick-links { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.quick-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }
.svc-group { scroll-margin-top: 110px; padding: 40px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 48px; }
.svc-group:first-of-type { border-top: 1px solid var(--line-strong); }
.svc-group > h2 { font-size: 1.6rem; grid-column: 1; }
.svc-group > p, .svc-group > .svc-list { grid-column: 2; }
.svc-group > p { margin: 0; color: var(--body); }
@media (max-width: 820px) { .svc-group { grid-template-columns: 1fr; } .svc-group > * { grid-column: 1 !important; } }
.svc-num-lg { display: block; font-size: .9rem; color: var(--faint); font-weight: 400; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.svc-list { list-style: none; padding: 0; margin: 0; }
.svc-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.svc-list strong { display: block; font-weight: 500; }
.svc-list span { color: var(--muted); font-size: .95rem; }
.badge { display: inline-block; background: var(--notice); border: 1px solid var(--notice-border); color: var(--notice-ink); border-radius: 999px; font-size: .78rem; padding: 1px 10px; vertical-align: middle; font-weight: 500; }

/* prose pages (articles, about, privacy, rebate, restaurants) */
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.8em; font-size: 1.45rem; }
.prose p, .prose li { color: var(--body); }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { color: var(--ink); border-bottom-color: var(--line-strong); }
.disclaimer-box { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; font-size: .92rem; color: var(--muted); margin: 24px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: .95rem; }
.sources { font-size: .9rem; }
.sources a { overflow-wrap: anywhere; }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; }
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-strong); }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.qr { max-width: 220px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
form.stack { display: grid; gap: 14px; }
form.stack label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
input, textarea, select { font: inherit; padding: 11px 12px; border-radius: var(--radius); border: 1px solid #d1d5db; background: var(--surface); color: var(--text); width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
textarea { min-height: 130px; resize: vertical; }
form.stack button[type=submit] { justify-self: start; min-width: 160px; }
.form-status { min-height: 1.5em; margin: 0; }
.form-status.error { color: #b42318; }
.form-status.ok { color: #067647; }

/* footer */
.site-footer { background: #111827; color: #9ca3af; padding-block: 40px 32px; font-size: .92rem; border-top: 1px solid #1f2937; }
.site-footer a { color: #d1d5db; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 48px; }
.footer-logo { display: inline-flex; flex-direction: column; margin-bottom: 12px; }
.footer-logo .brand-name { color: #fff; font-size: 26px; }
.footer-logo .brand-bar { margin: 4px 0 0; }
.footer-links { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.fine { color: #9ca3af; font-size: .85rem; }

/* mobile contact bar */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.mobile-bar a, .mobile-bar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; min-height: 56px; font: inherit; font-size: .82rem; color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; }
.mobile-bar .icon { color: var(--accent); }
@media (min-width: 821px) { .mobile-bar { display: none; } body { padding-bottom: 0; } }

/* dialog */
.modal { border: 0; border-radius: var(--radius); padding: 28px; text-align: center; background: var(--surface); color: var(--text); max-width: 92vw; }
.modal::backdrop { background: rgba(10,15,25,.6); }
.modal button { font: inherit; padding: 8px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); color: var(--text); cursor: pointer; }

/* upload page */
.upload-page h1 small { display: block; font-size: 1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.upload-page label.btn { cursor: pointer; }
.upload-list { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 16px; }
.upload-list li { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; overflow-wrap: anywhere; }
.upload-list li.ok { border-color: #8bc79a; }
.upload-list .state { display: block; font-size: .9rem; color: var(--muted); }
.upload-list button { margin-left: 8px; font: inherit; font-size: .85rem; }

/* checklists */
.checklist-items { list-style: none; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.checklist-items li { padding: 14px 12px 14px 44px; position: relative; border-bottom: 1px solid var(--line); }
.checklist-items li::before { content: ""; position: absolute; left: 12px; top: 18px; width: 18px; height: 18px; border: 2px solid var(--muted); border-radius: 4px; }

@media print {
  .site-header, .site-footer, .mobile-bar, .chat-fab, .chat-panel, .no-print, .skip { display: none !important; }
  body { background: #fff; color: #000; padding: 0; font-size: 12pt; }
  .checklist-items li { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* English pages: Latin fonts first so punctuation isn't rendered by a CJK font */
.lang-en, [lang="en"] { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
