/* 计算器核心容器 */
.calc {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 1000px;
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: left;
    margin-top: 20px;
}

.calc-form {
    width: 100% !important;
}

.form-title,
.result-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-form .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #374151;
}

.field input,
.field select {
    width: 100%;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #111827;
    background-color: #f9fafb;
    transition: border-color 0.2s, background-color 0.2s;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: #2563eb;
    background-color: #ffffff;
}

.field small {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.2;
}

/* 高级高级选项折叠控件 */
.advanced-options {
    grid-column: span 2;
    margin-top: 0.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
}

.advanced-options summary {
    font-size: 0.92rem;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    user-select: none;
    outline: none;
}

.advanced-options summary:hover {
    color: #1d4ed8;
}

.advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.calc-form .btn {
    width: 100%;
    height: 48px;
    margin-top: 1.5rem;
    background-color: #4f46e5;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calc-form .btn:hover {
    background-color: #4338ca;
}

/* 计算器结果展示区域 */
.calc-result-wrapper {
    width: 100% !important;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
    width: 100%;
}

.result-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    /* margin:1.5rem; */
}

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.blue-bg {
    background-color: #e0f2fe;
}

.green-bg {
    background-color: #dcfce7;
}

.summary-list,
.quarterly-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    font-size: 0.95rem;
}

.summary-item .item-label {
    color: #4b5563;
}

.summary-item .item-value {
    font-weight: 700;
    color: #111827;
}

.summary-item.total-highlight {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    margin-top: auto;
}

.summary-item.total-highlight .item-label,
.summary-item.total-highlight .item-value {
    color: #ffffff;
    font-size: 1.05rem;
}

.quarter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    background-color: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
}

.quarter-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.q-badge {
    background-color: #dcfce7;
    color: #15803d;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}

.q-date {
    color: #4b5563;
    font-size: 0.9rem;
    white-space: nowrap;
}

.q-value {
    font-weight: 700;
    color: #111827;
    font-size: 1.05rem;
    white-space: nowrap;
}

.disclaimer-note {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
}

/* SEO 内容与文本块样式 */
.content-section {
    padding: 3rem 0;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.content-section:nth-child(even) {
    background-color: #f8fafc;
}

.content-section h2.sec {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.content-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin: 1.5rem 0 0.75rem;
}

.content-section p,
.content-section li {
    color: #374151;
    line-height: 1.7;
}

.writeoff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.writeoff-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.writeoff-card strong {
    display: block;
    color: #111827;
    margin-bottom: 0.35rem;
}

.state-table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.state-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.state-table th,
.state-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.state-table th {
    background-color: #f1f5f9;
    font-weight: 700;
    color: #111827;
}

.rate-zero {
    color: #15803d;
    font-weight: 700;
}

.rate-flat {
    color: #2563eb;
    font-weight: 600;
}

.rate-progressive {
    color: #b45309;
    font-weight: 600;
}

.deadline-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.deadline-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.deadline-item .q-name {
    font-weight: 700;
    color: #111827;
}

.deadline-item .q-date {
    font-size: 1.1rem;
    color: #2563eb;
    font-weight: 700;
    margin: 0.35rem 0;
}

.disclaimer-box {
    background: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.disclaimer-box strong {
    color: #9a3412;
}

.disclaimer-box p {
    color: #7c2d12;
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
}

/* 语言切换按钮 */
.country ul {
    grid-template-columns: repeat(3, 1fr);
}

.wrap li{
    list-style: none;
}

/* 响应式断点控制 */
@media (max-width: 900px) {
    .result-grid {
        grid-template-columns: 1fr !important;
    }

    #calculator-results{
        padding:0;
        box-shadow:none;
        background:none;
        margin-top: 2rem;
    }

    header nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .advanced-options {
        grid-column: span 1;
    }

    .advanced-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .country ul {grid-template-columns: repeat(1, 1fr);}
    .deadline-list {
        grid-template-columns: repeat(1, 1fr);
    }
    .result-grid {
        grid-template-columns: 1fr !important;
    }
    
    .calc-form .grid {
        grid-template-columns: 1fr;
    }

    .calc {
        padding: 1.25rem;
    }

    .hero h1 {
        font-size: 1.6rem;
    }
}