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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f4f8;
    color: #1a2e44;
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}
.header-content { max-width: 700px; margin: 0 auto; }
.logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.logo-icon { font-size: 2rem; }
.logo-text { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
.tagline { font-size: 1.2rem; opacity: 0.9; font-weight: 300; }

.ad-space { max-width: 800px; margin: 24px auto; padding: 0 20px; min-height: 90px; }

.main { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }

.section-title { font-size: 1.8rem; font-weight: 700; color: #1a2e44; text-align: center; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: #607d8b; font-size: 1rem; margin-bottom: 36px; }
.tools-section { margin-bottom: 40px; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #e0e6ed;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26,58,92,0.15);
    border-color: #2d6a9f;
}
.tool-icon { font-size: 2.2rem; }
.tool-name { font-size: 1.1rem; font-weight: 700; color: #1a2e44; }
.tool-description { font-size: 0.92rem; color: #607d8b; flex-grow: 1; line-height: 1.5; }
.tool-link { font-size: 0.9rem; font-weight: 600; color: #2d6a9f; margin-top: 4px; }

/* ── Calculator pages ── */
.container { max-width: 860px; margin: 0 auto; padding: 32px 20px 60px; }
.card { background: white; border-radius: 12px; padding: 32px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); border: 1px solid #e0e6ed; margin-bottom: 24px; }
.subtitle { font-size: 1rem; opacity: 0.85; margin-top: 6px; }

.tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.tab-btn { padding: 10px 22px; border: 2px solid #2d6a9f; background: white; color: #2d6a9f; border-radius: 8px; cursor: pointer; font-size: 0.95rem; font-weight: 600; transition: all 0.2s; }
.tab-btn.active, .tab-btn:hover { background: #2d6a9f; color: white; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.875rem; font-weight: 600; color: #1a2e44; }
.input-group input, .input-group select {
    padding: 11px 14px; border: 1.5px solid #cfd8dc; border-radius: 8px;
    font-size: 0.95rem; background: white; color: #1a2e44; transition: border-color 0.2s;
}
.input-group input:focus, .input-group select:focus { outline: none; border-color: #2d6a9f; }

.input-prefix { display: flex; align-items: center; border: 1.5px solid #cfd8dc; border-radius: 8px; overflow: hidden; }
.input-prefix span { padding: 11px 12px; background: #f0f4f8; font-size: 0.9rem; font-weight: 600; color: #607d8b; border-right: 1px solid #cfd8dc; }
.input-prefix input { border: none; flex: 1; padding: 11px 12px; font-size: 0.95rem; width: 100%; }
.input-prefix input:focus { outline: none; }

.calc-btn {
    width: 100%; padding: 14px; background: linear-gradient(135deg, #1a3a5c, #2d6a9f);
    color: white; border: none; border-radius: 10px; font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: opacity 0.2s;
}
.calc-btn:hover { opacity: 0.9; }
.reset-btn {
    margin-top: 20px; padding: 10px 24px; background: #f0f4f8; color: #1a2e44;
    border: 1.5px solid #cfd8dc; border-radius: 8px; font-size: 0.9rem; cursor: pointer;
}

.results { display: none; }
.results.show { display: block; }

.result-highlight { text-align: center; padding: 24px 0 20px; }
.big-number { font-size: 2.6rem; font-weight: 800; color: #1a3a5c; }
.big-label { font-size: 0.95rem; color: #607d8b; margin-top: 4px; }

.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
@media (max-width: 500px) { .result-grid { grid-template-columns: 1fr 1fr; } }
.result-box { background: #f0f4f8; border-radius: 10px; padding: 16px; text-align: center; }
.result-box .val { font-size: 1.25rem; font-weight: 700; color: #1a3a5c; }
.result-box .lbl { font-size: 0.78rem; color: #607d8b; margin-top: 4px; }

.breakdown-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.9rem; }
.breakdown-table th { text-align: left; padding: 10px 12px; background: #f0f4f8; color: #1a2e44; font-weight: 700; }
.breakdown-table td { padding: 10px 12px; border-bottom: 1px solid #e0e6ed; color: #444; }
.breakdown-table tr:last-child td { border-bottom: none; }
.breakdown-table .total td { font-weight: 700; color: #1a3a5c; background: #e8f4fd; }

.info-section { background: white; border-radius: 12px; padding: 36px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid #e0e6ed; margin-bottom: 24px; }
.info-section h2 { font-size: 1.35rem; font-weight: 700; color: #1a2e44; margin-bottom: 14px; margin-top: 24px; }
.info-section h2:first-child { margin-top: 0; }
.info-section h3 { font-size: 1.05rem; font-weight: 700; color: #1a3a5c; margin: 20px 0 8px; }
.info-section p { color: #555; line-height: 1.75; margin-bottom: 10px; font-size: 0.95rem; }

.disclaimer-box { margin: 0 auto 24px; max-width: 860px; padding: 14px 18px; background: #fff8e1; border-left: 4px solid #f59e0b; border-radius: 8px; font-size: 0.85rem; color: #555; }

.footer { background: #1a2e44; color: white; padding: 32px 20px; text-align: center; }
.footer a { color: #90caf9; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; margin-left: 8px; }
.badge-uk { background: #e3f2fd; color: #1565c0; }
.badge-us { background: #e8f5e9; color: #2e7d32; }
