:root {
    /* 色板：偏稳重金融风格，兼顾税务站点可信度。 */
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-muted: #eef3f9;
    --text-main: #17263a;
    --text-soft: #5a6a7f;
    --text-light: #d8e2ef;
    --primary: #0f2742;
    --primary-strong: #0b1d31;
    --accent: #1d6fe3;
    --accent-soft: #dceafe;
    --success: #138a4f;
    --success-soft: #eaf8f0;
    --warning: #b46900;
    --warning-soft: #fff4dd;
    --danger: #b53333;
    --danger-soft: #ffecec;
    --border: #d7e1ec;
    --shadow: 0 18px 40px rgba(15, 39, 66, 0.08);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --container: 1160px;
}

/* 全局盒模型和基础行为。 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, #eff4fb 0%, #f8fbfe 140px, #f4f7fb 100%);
    color: var(--text-main);
    line-height: 1.65;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
}

.is-hidden {
    display: none !important;
}

/* 顶部说明条。 */
.top-strip {
    background: var(--primary-strong);
    color: var(--text-light);
    font-size: 0.9rem;
}

.top-strip p {
    width: min(var(--container), calc(100% - 2rem));
    margin: 0 auto;
    padding: 0.7rem 0;
}

/* 站点头部。 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(215, 225, 236, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--text-main);
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #1a3d63);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 1rem;
}

.brand-text small {
    color: var(--text-soft);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-nav a {
    color: var(--text-main);
    font-weight: 600;
}

/* Hero 区域。 */
.hero {
    padding: 3.25rem 0 2.25rem;
}

.hero.hero-compact {
    padding-top: 0.75rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1.5rem;
    align-items: stretch;
}

.hero-copy,
.hero-card,
.card,
.guide-card,
.content-card,
.method-card,
.faq-item,
.table-shell,
.ad-slot {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 2.4rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
}

.hero-copy h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
}

.hero-copy p {
    margin: 0;
    color: var(--text-soft);
    font-size: 1.05rem;
}

.hero-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.6rem;
}

.hero-point {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.hero-point strong,
.hero-point span {
    display: block;
}

.hero-point strong {
    margin-bottom: 0.2rem;
}

.hero-point span {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.hero-card {
    padding: 2rem;
}

.hero-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.hero-card ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-soft);
}

.hero-card li + li {
    margin-top: 0.7rem;
}

.hero-news-list {
    display: grid;
    gap: 0.9rem;
}

.hero-news-item {
    display: block;
    padding: 0.95rem 1rem;
    border: 1px solid #e3eaf3;
    border-radius: var(--radius-sm);
    background: #fbfdff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hero-news-item:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 39, 66, 0.08);
    border-color: #c9d9ee;
}

.hero-news-item strong,
.hero-news-item span {
    display: block;
}

.hero-news-item strong {
    color: var(--text-main);
}

.news-date {
    margin-top: 0.35rem;
    color: var(--text-soft);
    font-size: 0.88rem;
}

/* 通用标题。 */
.section-heading {
    margin-bottom: 1.4rem;
    text-align: center;
}

.section-heading .eyebrow {
    margin-bottom: 0.7rem;
}

.section-heading.align-left {
    text-align: left;
}

.section-heading h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.section-heading p {
    margin: 0;
    color: var(--text-soft);
}

.page-main-title {
    margin: 0 0 0.45rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
}

/* 计算器区。 */
.calculator-section {
    padding: 1rem 0 1rem;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 1.5rem;
    align-items: stretch;
}

.card {
    padding: 1.8rem;
}

.form-card,
.results-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#calculatorForm {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.mode-switch {
    display: inline-flex;
    width: 100%;
    gap: 0.5rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: #e8eef6;
    margin-bottom: 1.3rem;
}

.mode-btn {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    color: var(--text-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn.is-active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 39, 66, 0.12);
}

.panel-intro h3 {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
}

.panel-intro p {
    margin: 0 0 1.4rem;
    color: var(--text-soft);
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-soft);
    font-size: 0.86rem;
}

.input-shell {
    position: relative;
}

.input-prefix {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-soft);
    font-weight: 700;
}

input[type="number"],
select {
    width: 100%;
    min-height: 52px;
    padding: 0.85rem 1rem 0.85rem 2.1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-main);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select {
    padding-left: 1rem;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(29, 111, 227, 0.12);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.callout {
    margin-top: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.92rem;
}

.callout-warning {
    background: var(--warning-soft);
    border-color: #f4d184;
    color: #7d5600;
}

.callout-neutral {
    background: #f5f8fd;
    border-color: #dbe6f4;
    color: var(--text-soft);
}

.pre-submit-box {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #d9e5f3;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fd 100%);
}

.pre-submit-box h4 {
    margin: 0 0 0.8rem;
    font-size: 0.98rem;
    color: var(--primary);
}

.pre-submit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.pre-submit-item {
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e3ebf5;
}

.pre-submit-item strong,
.pre-submit-item span {
    display: block;
}

.pre-submit-item strong {
    margin-bottom: 0.3rem;
    font-size: 0.92rem;
    color: var(--text-main);
}

.pre-submit-item span {
    color: var(--text-soft);
    font-size: 0.85rem;
    line-height: 1.5;
}

.pre-submit-note {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed #cfdced;
    color: var(--text-soft);
    font-size: 0.84rem;
}

.primary-btn {
    width: 100%;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), #0f5cc7);
    color: #ffffff;
    font-weight: 800;
    padding: 0.95rem 1rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    margin-top: auto;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(29, 111, 227, 0.25);
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.results-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-weight: 700;
    font-size: 0.82rem;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.78rem 0;
    border-bottom: 1px solid #e8eef6;
}

.result-row span {
    color: var(--text-soft);
}

.result-row strong {
    text-align: right;
}

.result-row.total {
    margin-top: 0.7rem;
    padding: 1rem;
    border: 1px solid #cfe3d6;
    border-radius: var(--radius-sm);
    background: var(--success-soft);
}

.result-row.secondary {
    border-bottom: 0;
}

.negative {
    color: var(--danger);
}

.positive {
    color: var(--success);
}

/* Cookie 横幅。 */
.cookie-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1200;
    width: min(100%, 430px);
    padding: 1rem;
    border: 1px solid #d9e3ef;
    border-radius: 18px;
    background: rgba(11, 23, 41, 0.96);
    box-shadow: 0 18px 40px rgba(15, 31, 58, 0.26);
    color: #ffffff;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.cookie-banner.is-closing {
    opacity: 0;
    transform: translateY(8px);
}

.cookie-banner__content {
    display: grid;
    gap: 0.9rem;
}

.cookie-banner__copy strong {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.cookie-banner__copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.93rem;
    line-height: 1.55;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.cookie-banner__btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    padding: 0.72rem 1rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cookie-banner__btn--primary {
    border-color: transparent;
    background: #31c48d;
    color: #082b21;
}

.cookie-banner__btn:hover {
    opacity: 0.92;
}

.data-source-box {
    margin-top: 1.3rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    background: #edf5ff;
    border: 1px solid #cddff7;
}

.data-source-box h4 {
    margin: 0 0 0.5rem;
}

.data-source-box ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--text-soft);
}

/* 广告预留位。 */
.ad-slot {
    margin: 1.5rem auto 0;
    padding: 1.35rem;
    text-align: center;
    background: repeating-linear-gradient(
        -45deg,
        #f8fafc,
        #f8fafc 10px,
        #f1f5fa 10px,
        #f1f5fa 20px
    );
}

.ad-slot span,
.ad-slot small {
    display: block;
}

.ad-slot span {
    font-weight: 800;
}

.ad-slot small {
    color: var(--text-soft);
    margin-top: 0.35rem;
}

.ad-slot-inline {
    max-width: 820px;
    margin-top: 1rem;
}

/* 指南卡片。 */
.guides-section,
.content-section,
.methodology-section {
    padding: 2.5rem 0 0;
}

.guide-grid,
.content-grid,
.method-grid,
.faq-list {
    display: grid;
    gap: 1.2rem;
}

.guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card {
    padding: 1.45rem;
}

.guide-tag {
    display: inline-block;
    margin-bottom: 0.8rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.guide-card h3 {
    margin: 0 0 0.65rem;
    font-size: 1.1rem;
}

.guide-card p {
    color: var(--text-soft);
    margin: 0 0 1rem;
}

.guide-card a {
    font-weight: 700;
}

.articles-hub-link {
    margin: 1.25rem 0 0;
    text-align: center;
}

.articles-hub-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #cfe0f3;
    background: #f7fbff;
    font-weight: 700;
}

.articles-hub-link a:hover {
    text-decoration: none;
    background: #eef6ff;
}

/* 表格区域。 */
.table-shell {
    overflow-x: auto;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

thead th {
    background: var(--primary);
    color: #ffffff;
    text-align: left;
    font-weight: 700;
    padding: 0.95rem 1rem;
}

tbody td {
    padding: 0.88rem 1rem;
    border-top: 1px solid #e3eaf3;
    color: var(--text-main);
}

tbody tr:nth-child(even) {
    background: #fbfdff;
}

.content-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    margin-top: 1.25rem;
}

.content-card,
.method-card,
.faq-item {
    padding: 1.35rem;
}

.content-card h3,
.method-card h3,
.faq-item h3 {
    margin-top: 0;
    margin-bottom: 0.55rem;
}

.content-card p,
.method-card p,
.faq-item p,
.content-card li {
    color: var(--text-soft);
}

.content-card ul {
    margin: 0;
    padding-left: 1rem;
}

.method-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.9rem;
}

.related-card {
    padding: 1rem 1.05rem;
    border: 1px solid #deE8f3;
    border-radius: 14px;
    background: #fbfdff;
}

.related-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.02rem;
}

.related-card h3 a {
    color: var(--text-main);
}

.related-card h3 a:hover {
    color: var(--accent);
    text-decoration: none;
}

.related-card p {
    margin: 0 0 0.75rem;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.related-card-link {
    font-weight: 700;
}

/* 页脚。 */
.site-footer {
    margin-top: 3rem;
    background: var(--primary);
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 1.5rem;
    padding: 2.4rem 0 1.4rem;
}

.site-footer h2,
.site-footer h3 {
    margin-top: 0;
}

.site-footer p,
.site-footer li {
    color: rgba(255, 255, 255, 0.82);
}

.site-footer ul {
    margin: 0;
    padding-left: 1rem;
}

.site-footer a {
    color: #ffffff;
}

.footer-bottom {
    padding: 1rem 0 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

/* 内页通用样式。 */
.page-hero {
    padding: 2.8rem 0 1.5rem;
}

.page-hero-box,
.page-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.page-hero-box {
    padding: 2rem;
}

.page-hero-box h1 {
    margin: 0 0 0.7rem;
    font-size: clamp(2rem, 4vw, 2.7rem);
}

.page-hero-box p {
    margin: 0;
    color: var(--text-soft);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    color: var(--text-soft);
    font-size: 0.88rem;
}

.breadcrumb a {
    color: var(--text-soft);
}

.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: none;
}

.article-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e3eaf3;
}

.article-meta-item {
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid #e2ebf6;
}

.article-meta-item span,
.article-meta-item strong {
    display: block;
}

.article-meta-item span {
    margin-bottom: 0.2rem;
    color: var(--text-soft);
    font-size: 0.82rem;
}

.article-meta-item strong {
    color: var(--text-main);
    font-size: 0.95rem;
}

.page-content {
    padding: 2rem;
}

.page-content h2 {
    margin-top: 0;
}

.page-content h3 {
    margin-top: 1.6rem;
}

.page-content p,
.page-content li {
    color: var(--text-soft);
}

.page-content ul {
    padding-left: 1.1rem;
}

/* 响应式布局。 */
@media (max-width: 1080px) {
    .hero-grid,
    .calculator-layout,
    .guide-grid,
    .content-grid,
    .method-grid,
    .faq-list,
    .related-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-points {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        gap: 0.75rem 1rem;
    }

    .card,
    .hero-copy,
    .hero-card,
    .page-hero-box,
    .page-content {
        padding: 1.3rem;
    }

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

    .pre-submit-grid {
        grid-template-columns: 1fr;
    }

    .article-meta {
        grid-template-columns: 1fr;
    }

    .result-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-row strong {
        text-align: left;
    }

    .cookie-banner {
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
}
