:root {
    --tax-bg: #fffaf3;
    --tax-surface: #ffffff;
    --tax-surface-2: #fff3e2;
    --tax-text: #1f2937;
    --tax-muted: #6b7280;
    --tax-border: #eadfce;
    --tax-primary: #ff7a00;
    --tax-primary-dark: #d85f00;
    --tax-success: #0f766e;
    --tax-danger: #b42318;
    --tax-shadow: 0 22px 70px rgba(31, 41, 55, 0.10);
    --tax-radius: 24px;
    --tax-radius-sm: 14px;
    --tax-max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 122, 0, 0.13), transparent 34rem),
        linear-gradient(180deg, #fffaf3 0%, #fff 50%, #fffaf3 100%);
    color: var(--tax-text);
    line-height: 1.6;
}

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

.tax-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 2.5rem);
    border-bottom: 1px solid rgba(234, 223, 206, 0.85);
    background: rgba(255, 250, 243, 0.92);
    backdrop-filter: blur(16px);
}

.tax-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.tax-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--tax-primary);
    color: #fff;
    box-shadow: 0 12px 30px rgba(255, 122, 0, 0.28);
}

.tax-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.tax-nav a {
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    color: var(--tax-muted);
    font-size: 0.93rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.tax-nav a:hover,
.tax-nav a.active {
    color: var(--tax-primary-dark);
    background: rgba(255, 122, 0, 0.11);
}

.tax-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--tax-border);
    border-radius: 999px;
    background: #fff;
}

.tax-language-switch a {
    padding: 0.48rem 0.75rem;
    border-radius: 999px;
    color: var(--tax-muted);
    font-size: 0.88rem;
    font-weight: 900;
}

.tax-language-switch a.active {
    color: #fff;
    background: var(--tax-primary);
}

.tax-lang-am body,
.tax-lang-am input,
.tax-lang-am select,
.tax-lang-am button {
    font-family: "Noto Sans Ethiopic", "Nyala", "Segoe UI", Arial, sans-serif;
}

.tax-lang-am h1,
.tax-lang-am h2,
.tax-lang-am h3 {
    letter-spacing: 0;
    line-height: 1.25;
}

.tax-lang-am .eyebrow {
    letter-spacing: 0.02em;
}

.tax-page {
    width: min(var(--tax-max), calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    margin-bottom: 2.5rem;
}

.hero-card {
    background: var(--tax-surface);
    border: 1px solid var(--tax-border);
    border-radius: var(--tax-radius);
    padding: clamp(1.4rem, 3vw, 2.4rem);
    box-shadow: var(--tax-shadow);
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: var(--tax-primary-dark);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.045em;
}

h1 {
    font-size: clamp(2.3rem, 6vw, 4.7rem);
}

h2 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
}

h3 {
    font-size: 1.2rem;
}

.hero p,
.tax-section-head p,
.subtext {
    color: var(--tax-muted);
}

.hero p {
    font-size: 1.08rem;
    max-width: 68ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.9rem 1.2rem;
    font-weight: 900;
    font-size: 0.98rem;
    transition: 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--tax-primary), var(--tax-primary-dark));
    box-shadow: 0 16px 36px rgba(255, 122, 0, 0.28);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 45px rgba(255, 122, 0, 0.34);
}

.btn-soft {
    color: var(--tax-primary-dark);
    background: rgba(255, 122, 0, 0.10);
}

.stat-list {
    display: grid;
    gap: 0.8rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 18px;
    background: var(--tax-surface-2);
    border: 1px solid var(--tax-border);
}

.stat-item span {
    color: var(--tax-muted);
    font-weight: 700;
}

.stat-item b {
    color: var(--tax-text);
}

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

.panel {
    background: var(--tax-surface);
    border: 1px solid var(--tax-border);
    border-radius: var(--tax-radius);
    padding: clamp(1.2rem, 3vw, 2rem);
    box-shadow: var(--tax-shadow);
}

.result-panel {
    position: sticky;
    top: 6rem;
}

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

.field {
    display: grid;
    gap: 0.45rem;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    color: #374151;
    font-weight: 850;
    font-size: 0.92rem;
}

input,
select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--tax-border);
    border-radius: var(--tax-radius-sm);
    padding: 0.75rem 0.9rem;
    font: inherit;
    color: var(--tax-text);
    background: #fff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus {
    border-color: rgba(255, 122, 0, 0.78);
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.14);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--tax-border);
    border-radius: var(--tax-radius-sm);
    background: #fffaf3;
}

.checkbox-line input {
    width: auto;
    min-height: auto;
}

.help {
    color: var(--tax-muted);
    font-size: 0.86rem;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}

.result-card {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.2rem;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(234, 223, 206, 0.85);
}

.result-row span {
    color: var(--tax-muted);
    font-weight: 700;
}

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

.result-row.strong {
    padding: 1rem;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 122, 0, 0.16), rgba(255, 122, 0, 0.06));
}

.result-row.strong b {
    color: var(--tax-primary-dark);
    font-size: 1.18rem;
}

.alert {
    padding: 1rem;
    border-radius: 16px;
    margin: 1rem 0;
    font-weight: 800;
}

.alert.error {
    color: var(--tax-danger);
    background: #fff1f0;
    border: 1px solid #ffd4cf;
}

.tax-section {
    margin-top: 2rem;
    background: var(--tax-surface);
    border: 1px solid var(--tax-border);
    border-radius: var(--tax-radius);
    padding: clamp(1.2rem, 3vw, 2rem);
    box-shadow: 0 14px 45px rgba(31, 41, 55, 0.07);
}

.tax-section-head {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--tax-border);
    border-radius: 18px;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.tax-table th,
.tax-table td {
    text-align: left;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--tax-border);
}

.tax-table th {
    color: #3b3026;
    background: #fff3e2;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tax-table tr:last-child td {
    border-bottom: 0;
}

.note-card {
    margin-top: 1rem;
    border-radius: 18px;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #475569;
}

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

details {
    background: #fffaf3;
    border: 1px solid var(--tax-border);
    border-radius: 18px;
    padding: 1rem 1.1rem;
}

summary {
    cursor: pointer;
    font-weight: 900;
}

details p {
    color: var(--tax-muted);
    margin-bottom: 0;
}

.tax-footer {
    width: min(var(--tax-max), calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
    color: var(--tax-muted);
    font-size: 0.92rem;
}

.tax-footer a {
    color: var(--tax-primary-dark);
    font-weight: 900;
}

@media print {
    .tax-topbar,
    .hero-actions,
    .form-actions,
    .tax-footer,
    .faq-grid,
    .tax-section-head .eyebrow {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .tax-page {
        width: 100%;
        padding: 0;
    }

    .panel,
    .tax-section,
    .hero-card {
        box-shadow: none;
    }

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

@media (max-width: 980px) {
    .hero,
    .calculator-grid {
        grid-template-columns: 1fr;
    }

    .result-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .tax-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .tax-language-switch {
        width: 100%;
    }

    .tax-language-switch a {
        flex: 1;
        text-align: center;
    }

    .tax-nav {
        justify-content: flex-start;
        overflow-x: auto;
        width: 100%;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
    }

    .tax-nav a {
        white-space: nowrap;
    }

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

    .hero-card,
    .panel,
    .tax-section {
        border-radius: 20px;
    }

    h1 {
        font-size: 2.45rem;
    }
}
