/* =========================================
   WAR TAX CALCULATOR — STYLES
   ========================================= */

:root {
    --blue-900: #1e3a8a;
    --blue-800: #1e40af;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-200: #bfdbfe;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-500: #ef4444;
    --red-100: #fee2e2;
    --red-50: #fef2f2;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-logo: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.12);
    --shadow-blue: 0 4px 24px rgba(30, 58, 138, 0.20);
    --shadow-red: 0 4px 24px rgba(220, 38, 38, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--slate-50);
    color: var(--slate-700);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, var(--slate-300) 0.5px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* =========================================
   HEADER
   ========================================= */
.header {
    background: var(--blue-900);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 101;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--red-600), var(--red-500));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.3);
    position: relative;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: white;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logo-text {
    font-family: var(--font-logo);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--red-500);
    font-style: italic;
}

/* Desktop Nav */
.header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.header-nav a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue-200);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red-500);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.header-nav a:hover { color: var(--white); }
.header-nav a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.77, 0, 0.175, 1);
    position: relative;
}

.hamburger-line:nth-child(1) { margin-bottom: 6px; }
.hamburger-line:nth-child(3) { margin-top: 6px; }

.hamburger.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5.5px, 5.5px);
}

.hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5.5px, -5.5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue-900);
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    max-height: 320px;
    padding: 12px 0;
}

.mobile-menu a {
    display: block;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--blue-100);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.mobile-menu a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
    border-left-color: var(--red-500);
}

/* =========================================
   HERO
   ========================================= */
.hero {
    background: linear-gradient(180deg, var(--blue-900) 0%, var(--blue-800) 100%);
    padding: 56px 24px 72px;
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 48px;
    background: var(--blue-800);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero h1 em {
    font-style: italic;
    color: var(--red-500);
}

.hero p {
    font-size: 1.05rem;
    color: var(--blue-100);
    max-width: 520px;
    margin: 0 auto;
    opacity: 0.85;
    font-weight: 400;
}

/* =========================================
   MAIN CALCULATOR
   ========================================= */
.main {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    position: relative;
    z-index: 1;
}

.calc-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    border: 1px solid var(--slate-200);
    position: relative;
}

.section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blue-900);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--blue-900);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Country Radio Cards */
.country-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}

.country-card { position: relative; cursor: pointer; }

.country-card input[type="radio"] {
    position: absolute; opacity: 0; width: 0; height: 0;
}

.country-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 8px 16px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.country-card label::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--blue-50), transparent);
    opacity: 0;
    transition: var(--transition);
}

.country-card input:checked + label {
    border-color: var(--blue-900);
    background: var(--blue-50);
    box-shadow: var(--shadow-blue);
}

.country-card input:checked + label::before { opacity: 1; }

.country-card input:checked + label .country-check {
    transform: scale(1);
    opacity: 1;
}

.country-card label:hover {
    border-color: var(--blue-500);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.country-flag { font-size: 2rem; line-height: 1; position: relative; z-index: 1; }

.country-name {
    font-size: 0.75rem; font-weight: 700; color: var(--slate-700);
    text-align: center; line-height: 1.2; position: relative; z-index: 1;
}

.country-check {
    position: absolute; top: 6px; right: 6px;
    width: 18px; height: 18px;
    background: var(--blue-900); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transform: scale(0); opacity: 0; transition: var(--transition);
}

.country-check svg {
    width: 10px; height: 10px;
    fill: none; stroke: white; stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round;
}

/* Input Styles */
.input-section { margin-bottom: 28px; }

.input-label {
    display: block; font-size: 0.85rem; font-weight: 700;
    color: var(--slate-900); margin-bottom: 8px;
}

.input-sublabel { font-weight: 400; color: var(--slate-400); font-size: 0.8rem; }

.input-wrapper { position: relative; }

.input-wrapper .currency-symbol {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    font-size: 0.9rem; font-weight: 700; color: var(--slate-400);
    pointer-events: none; z-index: 2;
}

.input-field {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--slate-900);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.input-field::placeholder { color: var(--slate-300); font-weight: 400; }

.input-field:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-field.error {
    border-color: var(--red-600);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.error-msg {
    font-size: 0.78rem; color: var(--red-600);
    margin-top: 6px; display: none; font-weight: 600;
}

.error-msg.visible { display: block; animation: fadeSlideIn 0.25s ease; }

/* Custom Expenses Toggle */
.toggle-section { margin-bottom: 28px; }

.toggle-btn {
    display: flex; align-items: center; gap: 12px;
    cursor: pointer; padding: 14px 18px;
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    width: 100%; text-align: left;
}

.toggle-btn:hover { background: var(--blue-50); border-color: var(--blue-200); }

.toggle-switch {
    width: 40px; height: 22px;
    background: var(--slate-300);
    border-radius: 100px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; background: white;
    border-radius: 50%; transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-btn.active .toggle-switch { background: var(--blue-600); }
.toggle-btn.active .toggle-switch::after { left: 21px; }

.toggle-label-text { font-size: 0.85rem; font-weight: 600; color: var(--slate-700); }
.toggle-sublabel { font-size: 0.75rem; color: var(--slate-400); font-weight: 400; }

.custom-fields {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.custom-fields.open { max-height: 300px; opacity: 1; }

.custom-fields-inner {
    padding-top: 20px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

/* Calculate Button */
.calc-btn {
    width: 100%; padding: 18px 32px;
    background: linear-gradient(135deg, var(--red-600), var(--red-700));
    color: var(--white); border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1.05rem; font-weight: 700;
    letter-spacing: 0.02em; cursor: pointer;
    transition: var(--transition);
    position: relative; overflow: hidden; margin-top: 8px;
}

.calc-btn::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0; transition: var(--transition);
}

.calc-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-red); }
.calc-btn:hover::before { opacity: 1; }
.calc-btn:active { transform: translateY(0); }

.calc-btn-content {
    display: flex; align-items: center; justify-content: center; gap: 10px;
}

.calc-btn svg {
    width: 20px; height: 20px; fill: none; stroke: currentColor;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

.divider { height: 1px; background: var(--slate-200); margin: 32px 0; }

/* =========================================
   RESULTS
   ========================================= */
.results-section { display: none; margin-top: 48px; }

.results-section.visible {
    display: block;
    animation: fadeSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--slate-200);
    overflow: hidden;
}

.results-header {
    background: linear-gradient(135deg, var(--blue-900), var(--blue-800));
    padding: 32px 40px;
    text-align: center;
    position: relative; overflow: hidden;
}

.results-header::before {
    content: ''; position: absolute; top: -50%; left: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
}

.results-header-label {
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.15em; color: var(--blue-100);
    margin-bottom: 12px; position: relative;
}

.results-big-number {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 8vw, 4rem);
    color: var(--white); line-height: 1;
    margin-bottom: 8px; position: relative;
}

.results-big-number .currency {
    font-family: var(--font-body);
    font-size: 0.4em; font-weight: 700;
    vertical-align: super; opacity: 0.7; margin-left: 4px;
}

.results-subtitle {
    font-size: 0.9rem; color: var(--blue-100); opacity: 0.7; position: relative;
}

.stats-row {
    display: grid; grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--slate-100);
}

.stat-box { padding: 24px; text-align: center; position: relative; }

.stat-box:first-child::after {
    content: ''; position: absolute; right: 0; top: 20%; height: 60%;
    width: 1px; background: var(--slate-200);
}

.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--red-600); margin-bottom: 2px; }

.stat-label {
    font-size: 0.75rem; color: var(--slate-400); font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
}

/* Charts */
.charts-section { padding: 32px 40px; }

.charts-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: start;
}

.chart-box { position: relative; }

.chart-title {
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--slate-400); margin-bottom: 16px;
}

.chart-canvas-wrap { position: relative; height: 200px; }

.donut-wrap {
    height: 180px;
    display: flex; align-items: center; justify-content: center;
}

/* Explanation */
.explanation-section { padding: 0 40px 32px; }

.explanation-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 14px 18px;
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-sm);
    cursor: pointer; font-family: var(--font-body);
    font-size: 0.85rem; font-weight: 700;
    color: var(--slate-700); transition: var(--transition);
}

.explanation-toggle:hover { background: var(--blue-50); border-color: var(--blue-200); }

.explanation-toggle svg {
    width: 16px; height: 16px; stroke: var(--slate-400);
    fill: none; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.3s ease;
}

.explanation-toggle.open svg { transform: rotate(180deg); }

.explanation-body { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.explanation-body.open { max-height: 600px; }

.explanation-content {
    padding: 20px 18px; background: var(--slate-50);
    border: 1.5px solid var(--slate-200); border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 0.85rem; line-height: 1.7; color: var(--slate-700);
}

.explanation-content strong { color: var(--slate-900); }

.explanation-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; border-bottom: 1px dashed var(--slate-200);
}

.explanation-row:last-child { border-bottom: none; font-weight: 700; color: var(--red-600); }

/* Data Notice */
.data-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 40px 24px;
    padding: 12px 16px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    color: #92400e;
    line-height: 1.55;
}

.data-notice svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
    stroke: #b45309;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.data-notice strong { color: #78350f; }

/* Results Footer */
.results-footer {
    padding: 24px 40px 32px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; border-top: 1px solid var(--slate-100);
}

.source-text { font-size: 0.75rem; color: var(--slate-400); line-height: 1.5; flex: 1; }

.share-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; background: var(--blue-900);
    color: white; border: none; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: 0.85rem;
    font-weight: 700; cursor: pointer; transition: var(--transition);
    white-space: nowrap;
}

.share-btn:hover { background: var(--blue-800); transform: translateY(-1px); box-shadow: var(--shadow-blue); }

.share-btn svg {
    width: 16px; height: 16px; fill: none; stroke: currentColor;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */
.content-section {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
}

.content-section.alt-bg {
    background: var(--white);
    border-top: 1px solid var(--slate-200);
    border-bottom: 1px solid var(--slate-200);
}

.content-section.blue-bg {
    background: linear-gradient(135deg, var(--blue-900), var(--blue-800));
    color: var(--white);
}

.wide-width {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-eyebrow {
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.15em; color: var(--red-600);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 10px;
}

.section-eyebrow::before {
    content: ''; width: 24px; height: 2px;
    background: var(--red-600); border-radius: 2px;
}

.blue-bg .section-eyebrow { color: var(--red-500); }
.blue-bg .section-eyebrow::before { background: var(--red-500); }

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: var(--slate-900);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.blue-bg .section-heading { color: var(--white); }

.section-body {
    font-size: 0.95rem; line-height: 1.8; color: var(--slate-500); max-width: 640px;
}

.blue-bg .section-body { color: var(--blue-100); opacity: 0.85; }
.section-body p + p { margin-top: 16px; }

/* Context Cards */
.context-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.context-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
}

.context-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--red-600);
}

.context-card-icon {
    width: 44px; height: 44px;
    background: var(--red-50); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}

.context-card-icon svg {
    width: 22px; height: 22px;
    stroke: var(--red-600); fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

.context-card h3 {
    font-family: var(--font-body);
    font-size: 0.9rem; font-weight: 800;
    color: var(--slate-900); margin-bottom: 8px;
}

.context-card p {
    font-size: 0.82rem; color: var(--slate-500); line-height: 1.6;
}

/* Methodology Steps */
.method-steps { margin-top: 40px; }

.method-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.method-step:last-child { border-bottom: none; }

.method-step-num {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 1.2rem; color: var(--red-500);
}

.method-step h3 {
    font-family: var(--font-body);
    font-size: 0.95rem; font-weight: 700;
    color: var(--white); margin-bottom: 6px;
}

.method-step p {
    font-size: 0.85rem; color: var(--blue-100); opacity: 0.8; line-height: 1.6;
}

.method-sources {
    margin-top: 32px; padding: 20px 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
}

.method-sources h4 {
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--blue-200); margin-bottom: 8px;
}

.method-sources p {
    font-size: 0.82rem; color: var(--blue-100); opacity: 0.7; line-height: 1.6;
}

/* FAQ */
.faq-list {
    margin-top: 40px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.faq-item { border-bottom: 1px solid var(--slate-200); }

.faq-question {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 20px 0;
    background: none; border: none; cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem; font-weight: 700;
    color: var(--slate-900); text-align: left;
    gap: 16px; transition: var(--transition);
}

.faq-question:hover { color: var(--blue-700); }

.faq-question svg {
    width: 18px; height: 18px; flex-shrink: 0;
    stroke: var(--slate-400); fill: none;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
    transition: transform 0.3s ease;
}

.faq-question.open svg { transform: rotate(180deg); }
.faq-question.open { color: var(--blue-700); }

.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer.open { max-height: 300px; }

.faq-answer-inner {
    padding: 0 0 20px;
    font-size: 0.88rem; line-height: 1.7; color: var(--slate-500);text-align: left;
}

/* Center FAQ heading */
.faq-centered { text-align: center; }
.faq-centered .section-eyebrow { justify-content: center; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--slate-900);
    padding: 56px 24px 32px;
    position: relative;
    z-index: 1;
}

.footer-inner { max-width: 960px; margin: 0 auto; }

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo { margin-bottom: 16px; }

.footer-brand p {
    font-size: 0.82rem; color: var(--slate-400);
    line-height: 1.6; max-width: 280px;
}

.footer-col h4 {
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--slate-400); margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }

.footer-col a {
    font-size: 0.82rem; color: var(--slate-400);
    text-decoration: none; transition: var(--transition);
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 24px; flex-wrap: wrap; gap: 12px;
}

.footer-copy { font-size: 0.75rem; color: var(--slate-500); }

.footer-disclaimer {
    font-size: 0.72rem; color: var(--slate-500);
    max-width: 480px; text-align: right; line-height: 1.5;
}

/* =========================================
   TOAST
   ========================================= */
.toast {
    position: fixed; bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--slate-900); color: white;
    padding: 14px 28px; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 600;
    font-family: var(--font-body);
    box-shadow: var(--shadow-xl); z-index: 1000;
    opacity: 0; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* =========================================
   LEGAL PAGES
   ========================================= */
.back-link {
    font-size: 0.8rem; font-weight: 600; color: var(--blue-200);
    text-decoration: none; transition: var(--transition);
}

.back-link:hover { color: var(--white); }

.page-hero {
    background: linear-gradient(180deg, var(--blue-900), var(--blue-800));
    padding: 48px 24px 56px; text-align: center;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--white); margin-bottom: 8px;
}

.page-hero p { font-size: 0.9rem; color: var(--blue-100); opacity: 0.7; }

.legal-content {
    max-width: 720px; margin: 0 auto; padding: 48px 24px 80px;
    position: relative; z-index: 1;
}

.legal-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(15,23,42,0.10);
    border: 1px solid var(--slate-200);
    padding: 48px;
}

.legal-card h2 {
    font-family: var(--font-display);
    font-size: 1.4rem; color: var(--slate-900);
    margin: 36px 0 12px;
}

.legal-card h2:first-child { margin-top: 0; }

.legal-card p {
    font-size: 0.88rem; line-height: 1.8;
    color: var(--slate-500); margin-bottom: 12px;
}

.legal-card ul {
    margin: 8px 0 16px 20px;
    font-size: 0.88rem; line-height: 1.8; color: var(--slate-500);
}

.legal-card li { margin-bottom: 4px; }
.legal-card strong { color: var(--slate-700); }
.legal-card a { color: var(--blue-600); }

.legal-updated {
    font-size: 0.78rem; color: var(--slate-400);
    padding-top: 32px; margin-top: 32px;
    border-top: 1px solid var(--slate-200);
}

/* Legal page footer */
.legal-footer {
    background: var(--slate-900); padding: 32px 24px;
    text-align: center; position: relative; z-index: 1;
}

.legal-footer p { font-size: 0.75rem; color: var(--slate-500); }
.legal-footer a { color: var(--slate-400); text-decoration: none; }
.legal-footer a:hover { color: var(--white); }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .header-nav { display: none; }
    .hamburger { display: flex; }
    .mobile-menu { display: block; }

    .context-grid { grid-template-columns: 1fr; gap: 16px; }

    .footer-top { grid-template-columns: 1fr; gap: 32px; }

    .footer-bottom {
        flex-direction: column; text-align: center;
    }

    .footer-disclaimer { text-align: center; max-width: none; }

    .method-step { grid-template-columns: 44px 1fr; gap: 16px; }

    .content-section { padding: 56px 24px; }
}

@media (max-width: 640px) {
    .header-inner { padding: 14px 20px; }

    .hero { padding: 36px 20px 52px; }

    .main { padding: 36px 16px 64px; }

    .calc-card { padding: 28px 20px; }

    .country-grid { grid-template-columns: repeat(2, 1fr); }

    .custom-fields-inner { grid-template-columns: 1fr; }

    .results-header { padding: 28px 24px; }

    .charts-section { padding: 24px 16px; }

    .charts-grid { grid-template-columns: 1fr; gap: 28px; }

    .chart-canvas-wrap { height: 180px; max-width: 100%; }

    .donut-wrap { height: 200px; max-width: 220px; margin: 0 auto; }

    .explanation-section { padding: 0 16px 24px; }

    .data-notice { margin: 0 16px 20px; }

    .results-footer {
        flex-direction: column; padding: 20px 20px 28px; text-align: center;
    }

    .share-btn { width: 100%; justify-content: center; }

    .stat-value { font-size: 1.2rem; }

    .content-section { padding: 48px 20px; }

    .legal-card { padding: 28px 20px; }
    .page-hero { padding: 36px 20px 44px; }
}

@media (max-width: 380px) {
    .country-card label { padding: 14px 4px 12px; }
    .country-flag { font-size: 1.6rem; }
    .country-name { font-size: 0.68rem; }
}
