/* ============================================
   余宙律师 — 参考 Lawyerist 风格
   浅色背景 + 白色卡片 + 金色强调 + 大留白
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1a1a2e;
    --accent: #5b8fa8;
    --accent-hover: #4a7a91;
    --text: #2d2d2d;
    --text-secondary: #6b7280;
    --bg: #d5d1cc;
    --bg-alt: #ccc7c0;
    --white: #e5e2dd;
    --border: #b8b3ab;
    --max-width: 1140px;
    --serif: 'Noto Serif SC', Georgia, serif;
    --sans: 'Noto Sans SC', -apple-system, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: color .2s; }
img { max-width: 100%; height: auto; display: block; }

/* === NAV === */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: var(--white); height: 64px;
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 32px;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo-text {
    font-family: var(--serif); font-size: 22px; font-weight: 900;
    color: var(--primary); letter-spacing: 1px;
}
.nav-right { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    padding: 4px 0; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-cta {
    display: inline-block; background: var(--accent); color: #fff;
    font-size: 13px; font-weight: 600; padding: 8px 20px;
    border-radius: 4px; transition: background .2s; cursor: pointer;
    z-index: 10; position: relative;
}
.nav-cta:hover { background: var(--accent-hover); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--primary); margin: 4px 0; }

/* === HERO === */
.hero {
    background: var(--white); padding: 80px 32px 60px;
    border-bottom: 1px solid var(--border);
}
.hero-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-content {}
.hero-avatar {
    width: 280px; height: 280px; border-radius: 50%; overflow: hidden;
    border: 4px solid var(--bg); box-shadow: 0 8px 40px rgba(0,0,0,.08);
    margin: 0 auto;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-title {
    font-family: var(--serif); font-size: 42px; font-weight: 900;
    color: var(--primary); line-height: 1.3; margin-bottom: 16px;
}
.hero-tagline {
    font-size: 18px; color: var(--accent); font-weight: 500;
    margin-bottom: 20px; line-height: 1.6;
    border-left: 3px solid var(--accent); padding-left: 16px;
}
.hero-desc {
    font-size: 15px; color: var(--text-secondary); line-height: 2;
    margin-bottom: 28px;
}
.hero-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta span { font-size: 13px; color: var(--text-secondary); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* === BUTTONS === */
.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 28px; background: var(--accent); color: var(--primary);
    font-weight: 600; font-size: 14px; border-radius: 4px;
    font-family: var(--sans); cursor: pointer; border: none; transition: background .2s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 28px; border: 1px solid var(--border); color: var(--text);
    font-size: 14px; font-weight: 500; border-radius: 4px;
    font-family: var(--sans); cursor: pointer; background: var(--white); transition: all .2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* === SECTIONS === */
.section { padding: 72px 32px; }
.section-header { margin-bottom: 40px; }
.section-header.center { text-align: center; }
.section-title {
    font-family: var(--serif); font-size: 32px; font-weight: 700;
    color: var(--primary); margin-bottom: 8px;
}
.section-line { width: 40px; height: 3px; background: var(--accent); margin-top: 12px; }
.section-header.center .section-line { margin: 12px auto 0; }

/* === TAGS === */
.tag {
    display: inline-block; font-size: 12px; color: var(--accent);
    background: rgba(91,143,168,.1); padding: 4px 12px; border-radius: 3px;
    font-weight: 500;
}

/* === ABOUT SECTION === */
.about-section {
    background: var(--white); border-bottom: 1px solid var(--border);
}
.about-inner {
    max-width: 800px; margin: 0 auto;
}
.about-inner p {
    font-size: 15px; color: var(--text-secondary); line-height: 2.2; margin-bottom: 16px;
}
.about-inner strong { color: var(--text); }

/* === PRACTICE CARDS === */
.practice-grid {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.practice-card {
    background: var(--white); border: 1px solid var(--border);
    padding: 28px; border-radius: 6px; transition: box-shadow .2s;
}
.practice-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.practice-card .emoji { font-size: 24px; margin-bottom: 12px; }
.practice-card h3 {
    font-family: var(--serif); font-size: 17px; font-weight: 600;
    color: var(--primary); margin-bottom: 10px;
}
.practice-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

/* === ARTICLES — Lawyerist卡片风格 === */
.articles-section { background: var(--bg); }
.articles-grid {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.article-card {
    background: var(--white); border: 1px solid var(--border);
    padding: 28px; border-radius: 6px;
    transition: box-shadow .2s, transform .2s; cursor: pointer;
    display: flex; flex-direction: column;
}
.article-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); transform: translateY(-2px); }
.article-date { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.article-card h3 {
    font-family: var(--serif); font-size: 18px; font-weight: 600;
    color: var(--primary); line-height: 1.5; margin-bottom: 12px;
}
.article-card p {
    font-size: 14px; color: var(--text-secondary); line-height: 1.8;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}
.article-card .read-more {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 16px; font-size: 13px; color: var(--accent); font-weight: 600;
}
.article-card:hover .read-more { color: var(--accent-hover); }

/* === FEATURED ARTICLE === */
.featured-card {
    max-width: var(--max-width); margin: 0 auto;
    background: var(--white); border: 1px solid var(--border);
    border-radius: 6px; padding: 40px;
    display: grid; grid-template-columns: 3px 1fr; gap: 28px;
}
.featured-accent { background: var(--accent); border-radius: 2px; }
.featured-card h2 {
    font-family: var(--serif); font-size: 26px; font-weight: 700;
    color: var(--primary); line-height: 1.4; margin-bottom: 12px;
}
.featured-card h2 a:hover { color: var(--accent); }
.featured-card > div:last-child p { font-size: 15px; color: var(--text-secondary); line-height: 1.9; margin-bottom: 20px; }
.featured-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.featured-meta > span { font-size: 13px; color: var(--text-secondary); }

/* === CONTACT === */
.contact-section { background: var(--white); border-top: 1px solid var(--border); }
.contact-grid {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
.contact-info h3 { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-bottom: 16px; color: var(--primary); }
.contact-info > p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.9; }
.contact-item { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: 14px; color: var(--text); }
.contact-item .icon {
    width: 40px; height: 40px; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border-radius: 6px;
}
.contact-item .icon svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; }
.contact-form { background: var(--bg); padding: 32px; border-radius: 6px; }
.contact-form h3 { font-family: var(--serif); font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--primary); }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    font-size: 14px; font-family: var(--sans); background: var(--white); color: var(--text);
    margin-bottom: 14px; border-radius: 4px; outline: none; transition: border .2s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 100px; line-height: 1.7; }
.contact-form button {
    width: 100%; padding: 12px; background: var(--accent); color: var(--primary);
    border: none; font-weight: 600; font-size: 14px; border-radius: 4px;
    cursor: pointer; font-family: var(--sans); transition: background .2s;
}
.contact-form button:hover { background: var(--accent-hover); }

/* === FOOTER === */
.footer { background: var(--primary); padding: 48px 32px 24px; color: rgba(255,255,255,.5); }
.footer-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
    padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .footer-logo { font-family: var(--serif); font-size: 20px; color: var(--accent); margin-bottom: 12px; font-weight: 700; }
.footer-brand p { font-size: 13px; line-height: 1.8; }
.footer-col h4 { font-size: 13px; color: rgba(255,255,255,.7); font-weight: 600; margin-bottom: 14px; letter-spacing: 1px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,.4); padding: 3px 0; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    max-width: var(--max-width); margin: 0 auto; padding-top: 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12px; color: rgba(255,255,255,.4); }
.footer-bottom-links a:hover { color: var(--accent); }

/* === COOKIE BANNER === */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--white); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,.2); padding: 20px 32px;
    display: none;
}
.cookie-banner.show { display: block; }
.cookie-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cookie-inner p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.cookie-inner p a { color: var(--accent); text-decoration: underline; }
.cookie-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-accept {
    padding: 8px 20px; background: var(--primary); color: var(--primary);
    border: none; border-radius: 4px; font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: var(--sans);
}
.cookie-decline {
    padding: 8px 20px; background: none; color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: 4px; font-size: 13px;
    cursor: pointer; font-family: var(--sans);
}

/* === INNER PAGES === */
.page-header {
    background: var(--white); padding: 48px 32px; border-bottom: 1px solid var(--border);
}
.page-header-inner { max-width: var(--max-width); margin: 0 auto; }
.page-header h1 { font-family: var(--serif); font-size: 36px; color: var(--primary); margin-bottom: 8px; }
.page-header p { color: var(--text-secondary); font-size: 15px; }

.about-hero { background: var(--white); padding: 48px 32px; border-bottom: 1px solid var(--border); }
.about-hero h1 { font-family: var(--serif); font-size: 36px; color: var(--primary); max-width: var(--max-width); margin: 0 auto 8px; }
.about-hero p { color: var(--text-secondary); font-size: 15px; max-width: var(--max-width); margin: 0 auto; }

.blog-header { background: var(--white); padding: 48px 32px; border-bottom: 1px solid var(--border); }
.blog-header h1 { font-family: var(--serif); font-size: 36px; color: var(--primary); max-width: var(--max-width); margin: 0 auto 8px; }
.blog-header p { color: var(--text-secondary); font-size: 15px; max-width: var(--max-width); margin: 0 auto; }

/* === ARTICLE DETAIL === */
.article-hero { background: var(--white); padding: 48px 32px; border-bottom: 1px solid var(--border); }
.article-hero-inner { max-width: 780px; margin: 0 auto; }
.article-hero h1 { font-family: var(--serif); font-size: 32px; color: var(--primary); line-height: 1.4; margin-bottom: 16px; }
.article-hero-meta { font-size: 13px; color: var(--text-secondary); display: flex; gap: 16px; flex-wrap: wrap; }

.article-reading { max-width: 780px; margin: 0 auto; padding: 48px 32px; }
.article-sidebar-layout { display: block; }
.article-sidebar { display: none; }
.article-toc-mobile { display: block; margin-bottom: 24px; }
.article-toc-mobile details { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 14px 18px; }
.article-toc-mobile summary { font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; }
.article-toc-mobile nav ul { padding-left: 0; margin: 8px 0 0; }
.article-toc-mobile nav li { list-style: none; margin-bottom: 2px; }
.article-toc-mobile nav a { font-size: 12px; color: var(--text-secondary); display: block; padding: 3px 0; }
.article-toc-mobile nav a:hover { color: var(--accent); }
.article-toc-mobile nav ul ul { padding-left: 12px; }

.article-reading .article-content p { font-size: 16px; line-height: 2.1; color: var(--text); margin-bottom: 20px; }
.article-reading .article-content h2 { font-family: var(--serif); font-size: 24px; color: var(--primary); margin: 36px 0 16px; border-left: 3px solid var(--accent); padding-left: 14px; }
.article-reading .article-content h3 { font-family: var(--serif); font-size: 19px; color: var(--primary); margin: 28px 0 12px; }
.article-reading .article-content blockquote { background: var(--white); border-left: 3px solid var(--accent); padding: 16px 20px; margin: 24px 0; font-size: 15px; color: var(--text-secondary); border-radius: 0 6px 6px 0; }
.article-reading .article-content strong { color: var(--primary); font-weight: 600; }
.article-reading .article-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.article-reading .article-content th, .article-reading .article-content td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.article-reading .article-content th { background: var(--bg); font-weight: 600; color: var(--primary); }
.article-reading .article-content ul, .article-reading .article-content ol { padding-left: 24px; margin-bottom: 20px; }
.article-reading .article-content li { font-size: 16px; line-height: 2; color: var(--text); margin-bottom: 4px; list-style: disc; }
.article-reading .article-content ol li { list-style: decimal; }
.article-reading .article-content a { color: var(--accent); }
.article-reading .article-content a:hover { color: var(--accent-hover); }
.article-reading .article-content hr { border: none; height: 1px; background: var(--border); margin: 36px 0; }

.article-disclaimer { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 16px 20px; margin-bottom: 24px; }
.article-disclaimer p { font-size: 12px !important; color: var(--text-secondary) !important; margin-bottom: 2px !important; }
.article-author-card { display: flex; gap: 16px; align-items: center; padding: 24px; background: var(--white); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 20px; }
.author-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-fallback { width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-family:var(--serif);font-size:24px;color:var(--accent);font-weight:700;background:rgba(201,168,76,.1); }
.author-info strong { font-size: 15px; color: var(--primary); display: block; margin-bottom: 4px; }
.author-info p { font-size: 13px !important; color: var(--text-secondary) !important; margin-bottom: 6px !important; line-height: 1.6 !important; }
.author-contact span { font-size: 12px; color: var(--text-secondary); margin-right: 12px; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.article-nav-section { border-top: 1px solid var(--border); }
.article-nav-inner { max-width: var(--max-width); margin: 0 auto; padding: 28px 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.nav-prev, .nav-next { display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid var(--border);border-radius:6px;background:var(--white);transition:all .2s; }
.nav-prev:hover, .nav-next:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.nav-next { text-align: right; }
.nav-label { font-size: 11px; color: var(--text-secondary); letter-spacing: 1px; }
.nav-title { font-family: var(--serif); font-size: 14px; color: var(--primary); font-weight: 600; line-height: 1.5; }

/* CTA Section */
.cta-section { background: var(--primary); padding: 48px 32px; }
.cta-card { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cta-content h2 { font-family: var(--serif); font-size: 24px; color: var(--primary); margin-bottom: 4px; }
.cta-content p { font-size: 14px; color: rgba(255,255,255,.5); }
.cta-phone { font-size: 14px; color: rgba(255,255,255,.5); }

/* === LEGAL PAGES === */
.legal-content { max-width: 780px; margin: 0 auto; padding: 48px 32px; }
.legal-content h2 { font-family: var(--serif); font-size: 22px; color: var(--primary); margin: 32px 0 12px; }
.legal-content p { font-size: 15px; color: var(--text-secondary); line-height: 2; margin-bottom: 16px; }
.legal-content ul { padding-left: 20px; margin-bottom: 16px; }
.legal-content li { font-size: 15px; color: var(--text-secondary); line-height: 2; margin-bottom: 4px; }

/* === RESPONSIVE === */
@media(max-width:1024px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 32px; }
    .hero-avatar { margin: 0 auto; }
    .hero-tagline { border-left: none; padding-left: 0; text-align: center; }
    .hero-desc { margin: 0 auto 28px; }
    .hero-meta { justify-content: center; }
    .hero-actions { justify-content: center; }
    .practice-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .cta-card { flex-direction: column; text-align: center; }
}
@media(max-width:768px) {
    .nav-right { display: flex; }
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .hero-title { font-size: 32px; }
    .hero-avatar { width: 200px; height: 200px; }
    .section { padding: 48px 20px; }
    .section-title { font-size: 26px; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .cookie-inner { flex-direction: column; }
    .article-nav-inner { grid-template-columns: 1fr; }
}

/* === DARK THEME === */
[data-theme="dark"] {
    --primary: #1a1a2e;
    --accent: #5b8fa8;
    --accent-hover: #4a7a91;
    --text: #d5d1cc;
    --text-secondary: #8a8580;
    --bg: #222225;
    --bg-alt: #1e1e21;
    --white: #2c2c30;
    --border: rgba(255,255,255,.06);
}
[data-theme="dark"] body { background: #1c1c1f; color: var(--text); }
[data-theme="dark"] .nav { background: #1e1e21; }
[data-theme="dark"] .hero { background: #1e1e21; }
[data-theme="dark"] .nav-logo-text { color: #fff; }
[data-theme="dark"] .nav-links a { color: var(--text-secondary); }
[data-theme="dark"] .nav-links a:hover, [data-theme="dark"] .nav-links a.active { color: #fff; }
[data-theme="dark"] .hero-title { color: #fff; }
[data-theme="dark"] .section-title { color: #fff; }
[data-theme="dark"] .article-card h3, [data-theme="dark"] .featured-card h2 { color: #fff; }
[data-theme="dark"] .practice-card h3 { color: var(--accent); }
[data-theme="dark"] .contact-info h3, [data-theme="dark"] .contact-form h3 { color: #fff; }
[data-theme="dark"] .cookie-banner { background: #1e1e21; }
[data-theme="dark"] .page-header, [data-theme="dark"] .about-hero, [data-theme="dark"] .blog-header, [data-theme="dark"] .article-hero { background: #1e1e21; }
[data-theme="dark"] .page-header h1, [data-theme="dark"] .about-hero h1, [data-theme="dark"] .blog-header h1, [data-theme="dark"] .article-hero h1 { color: #fff; }
[data-theme="dark"] .nav-toggle span { background: #fff; }
[data-theme="dark"] .tag { background: rgba(91,143,168,.15); }
[data-theme="dark"] .about-inner strong { color: var(--text); }
[data-theme="dark"] .contact-form input, [data-theme="dark"] .contact-form textarea { background: rgba(255,255,255,.05); color: var(--text); }

/* Theme toggle button */
.theme-toggle {
    position: fixed; bottom: 24px; right: 24px; z-index: 150;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--accent); color: #fff; border: none;
    cursor: pointer; font-size: 18px; display: flex;
    align-items: center; justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    transition: background .2s;
}
.theme-toggle:hover { background: var(--accent-hover); }
