/* ===== SAIClaws CPA — Design System ===== */
:root {
  --navy: #0a1628;
  --navy-light: #111d35;
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --blue-dim: rgba(37,99,235,0.12);
  --gold: #f59e0b;
  --gold-dim: rgba(245,158,11,0.12);
  --teal: #0891b2;
  --teal-dim: rgba(8,145,178,0.1);
  --text: #e2e8f0;
  --text-heading: #f8fafc;
  --muted: #94a3b8;
  --muted-dark: #64748b;
  --bg: #0a1628;
  --bg-card: #111d35;
  --bg-card-hover: #162240;
  --border: rgba(148,163,184,0.1);
  --border-light: rgba(148,163,184,0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --font: 'PingFang SC','Hiragino Sans GB','Microsoft YaHei','Noto Sans SC','Segoe UI','Inter',system-ui,-apple-system,sans-serif;
  --max-w: 1200px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ===== NAVIGATION ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,22,40,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-in {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 800;
  color: var(--blue-bright);
  display: flex; align-items: center; gap: .5rem;
  letter-spacing: -0.02em;
}
.nav-logo .dot { color: var(--gold); }
.nav-logo span { color: var(--muted); font-weight: 400; font-size: .85rem; }
.nav-links { display: flex; gap: .25rem; list-style: none; flex-wrap: wrap; }
.nav-links a {
  padding: .4rem .8rem; border-radius: 6px;
  font-size: .85rem; color: var(--muted);
  transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: rgba(255,255,255,0.05);
}

/* ===== CONTAINER ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== HERO ===== */
.hero {
  text-align: center; padding: 5rem 1.5rem 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(37,99,235,0.15), transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: var(--blue); color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: .3rem 1rem; border-radius: 20px;
  letter-spacing: .05em; margin-bottom: 1.2rem;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2rem,5vw,3.2rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 1rem; letter-spacing: -0.03em;
  color: var(--text-heading);
}
.hero h1 .highlight { color: var(--gold); }
.hero p {
  color: var(--muted); font-size: 1.1rem;
  max-width: 650px; margin: 0 auto 2rem;
}
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  padding: .75rem 2rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9rem;
  transition: transform .15s, box-shadow .15s, background .15s;
  cursor: pointer; border: none; display: inline-block;
}
.btn-primary {
  background: var(--blue); color: #fff;
}
.btn-primary:hover {
  background: var(--blue-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #1a1a2e;
  font-weight: 700;
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,158,11,0.35);
}

/* ===== SECTION ===== */
section { padding: 4rem 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.section-head h2 {
  font-size: 1.6rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--text-heading);
}
.section-head .more {
  color: var(--blue-bright); font-size: .85rem; font-weight: 600;
}
.section-head .more:hover { text-decoration: underline; }

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.8rem;
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s, background .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}
.card-icon { font-size: 2rem; margin-bottom: .8rem; }
.card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; color: var(--text-heading); }
.card p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.card .tag {
  display: inline-block;
  padding: .15rem .6rem; border-radius: 4px;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em;
}
.tag-blue { background: var(--blue-dim); color: var(--blue-bright); }
.tag-gold { background: var(--gold-dim); color: var(--gold); }
.tag-teal { background: var(--teal-dim); color: var(--teal); }

/* ===== CONTENT PAGES ===== */
.content-header {
  text-align: center; padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, rgba(37,99,235,0.06), transparent);
}
.content-header h1 {
  font-size: clamp(1.8rem,4vw,2.5rem);
  font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-heading);
  margin-bottom: .75rem;
}
.content-header p {
  color: var(--muted); font-size: 1.05rem;
  max-width: 650px; margin: 0 auto;
}
.content-body {
  padding: 2rem 0 4rem;
  font-size: .95rem;
  line-height: 1.8;
}
.content-body h2 {
  font-size: 1.4rem; font-weight: 700;
  color: var(--text-heading);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.content-body h3 {
  font-size: 1.15rem; font-weight: 600;
  color: var(--text-heading);
  margin: 1.8rem 0 .6rem;
}
.content-body p { color: var(--muted); margin-bottom: 1rem; }
.content-body ul, .content-body ol {
  color: var(--muted); margin: 0 0 1.5rem 1.5rem;
}
.content-body li { margin-bottom: .4rem; }
.content-body strong { color: var(--text); }
.content-body a { color: var(--blue-bright); }
.content-body a:hover { text-decoration: underline; }

/* Feature boxes */
.feat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.feat-box h4 { color: var(--text-heading); margin-bottom: .5rem; }
.feat-box p { color: var(--muted); font-size: .9rem; margin: 0; }

/* Highlight box */
.highlight-box {
  background: var(--blue-dim);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.highlight-box h3 { color: var(--blue-bright); margin-top: 0; }
.highlight-box p { margin-bottom: 0; }
.highlight-box ul { margin-bottom: 0; }

/* Warning box */
.warn-box {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.warn-box h4 { color: #ef4444; margin-bottom: .25rem; }

/* ===== TABLES ===== */
.compare-table {
  width: 100%; border-collapse: collapse;
  margin: 1.5rem 0; font-size: .88rem;
}
.compare-table th {
  text-align: left; padding: .75rem 1rem;
  background: var(--bg-card); color: var(--text-heading);
  font-weight: 600; border-bottom: 2px solid var(--border);
}
.compare-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== STATS ROW ===== */
.stats-row {
  display: flex; justify-content: center; gap: 3rem;
  flex-wrap: wrap; margin: 2rem 0;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 2.2rem; font-weight: 800;
  color: var(--blue-bright); line-height: 1.2;
}
.stat-label { color: var(--muted); font-size: .85rem; margin-top: .25rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 1rem 0;
  font-size: .82rem; color: var(--muted-dark);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue-bright); }

/* ===== NEWSLETTER ===== */
.newsletter {
  background: linear-gradient(135deg, var(--bg-card), rgba(37,99,235,0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem; text-align: center; margin: 3rem 0;
}
.newsletter h3 { font-size: 1.4rem; color: var(--text-heading); margin-bottom: .5rem; }
.newsletter p { color: var(--muted); margin-bottom: 1.5rem; font-size: .92rem; }
.newsletter form { display: flex; gap: .5rem; max-width: 450px; margin: 0 auto; }
.newsletter input {
  flex: 1; padding: .7rem 1rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: .9rem;
}
.newsletter input:focus {
  outline: 2px solid var(--blue); outline-offset: -1px;
}
.newsletter button {
  padding: .7rem 1.5rem; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.newsletter button:hover { background: var(--blue-bright); }

/* ===== BLOG CARDS ===== */
.blog-list { display: flex; flex-direction: column; gap: 1rem; }
.blog-item {
  display: flex; gap: 1.5rem; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s;
}
.blog-item:hover { border-color: var(--border-light); }
.blog-item .date {
  font-size: .78rem; color: var(--muted-dark);
  white-space: nowrap; min-width: 90px;
  padding-top: .2rem;
}
.blog-item h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .3rem; color: var(--text-heading); }
.blog-item p { color: var(--muted); font-size: .85rem; margin: 0; }
.blog-item .category {
  display: inline-block;
  font-size: .68rem; background: var(--blue-dim);
  color: var(--blue-bright); padding: .1rem .5rem;
  border-radius: 3px; margin-bottom: .4rem;
}

/* ===== GUIDE LIST ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
}
.guide-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  display: flex; gap: 1rem; align-items: flex-start;
  transition: border-color .2s;
}
.guide-item:hover { border-color: rgba(37,99,235,0.3); }
.guide-item .num {
  font-size: 1.8rem; font-weight: 800;
  color: var(--blue); line-height: 1; min-width: 45px;
}
.guide-item h4 { font-weight: 600; margin-bottom: .25rem; color: var(--text-heading); }
.guide-item .gmeta { font-size: .78rem; color: var(--muted); }

/* ===== FOOTER ===== */
footer {
  text-align: center; padding: 3rem 1.5rem;
  color: var(--muted-dark); font-size: .82rem;
  border-top: 1px solid var(--border); margin-top: 3rem;
}
footer .footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-bottom: 1rem; flex-wrap: wrap;
}
footer a:hover { color: var(--blue-bright); }

/* ===== TOC (Table of Contents) ===== */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
}
.toc h4 { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .3rem; font-size: .9rem; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--blue-bright); text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links a { font-size: .78rem; padding: .3rem .5rem; }
  .hero { padding: 3rem 1rem 2rem; }
  .guide-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .blog-item { flex-direction: column; gap: .5rem; }
  .stats-row { gap: 1.5rem; }
  .compare-table { font-size: .78rem; }
  .compare-table th, .compare-table td { padding: .5rem .6rem; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .card:hover, .btn:hover { transform: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.25); }
