/* ================================================================
   THE SALARY CALCULATOR — main.css  v1.0
   Mobile-first · Clean · Professional · AdSense-friendly
   ================================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    --tsc-primary:      #1a4a8a;
    --tsc-primary-dk:   #163d73;
    --tsc-primary-lt:   #eef3fb;
    --tsc-secondary:    #e84118;
    --tsc-accent:       #00b894;
    --tsc-green:        #1e8a4a;
    --tsc-amber:        #c47a00;
    --tsc-white:        #ffffff;
    --tsc-off-white:    #f7f9fc;
    --tsc-bg:           #f4f7fb;
    --tsc-border:       #d8e0ec;
    --tsc-text:         #1a1f2e;
    --tsc-muted:        #4b5563;
    --tsc-radius:       12px;
    --tsc-radius-lg:    20px;
    --tsc-shadow:       0 2px 24px rgba(26,74,138,.10);
    --tsc-shadow-lg:    0 8px 48px rgba(26,74,138,.15);
    --tsc-transition:   0.2s ease;
    --tsc-container:    1200px;
    --tsc-gap:          24px;
    --header-h:         64px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem; line-height: 1.6; color: var(--tsc-text);
    background: var(--tsc-bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--tsc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ── Utility ────────────────────────────────────────────────── */
.tsc-container { max-width: var(--tsc-container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px)  { .tsc-container { padding: 0 24px; } }
@media (min-width: 1024px) { .tsc-container { padding: 0 32px; } }

.tsc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Buttons ────────────────────────────────────────────────── */
.tsc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 0.9375rem;
    cursor: pointer; transition: background var(--tsc-transition), transform var(--tsc-transition), box-shadow var(--tsc-transition);
    border: 2px solid transparent; text-decoration: none; white-space: nowrap;
    min-height: 44px;
}
.tsc-btn--primary { background: var(--tsc-primary); color: #fff; }
.tsc-btn--primary:hover { background: var(--tsc-primary-dk); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,74,138,.3); text-decoration: none; color: #fff; }
.tsc-btn--outline { background: transparent; color: var(--tsc-primary); border-color: var(--tsc-primary); }
.tsc-btn--outline:hover { background: var(--tsc-primary-lt); }
.tsc-btn--sm { padding: 7px 14px; font-size: 0.875rem; min-height: 36px; }
.tsc-btn--lg { padding: 14px 28px; font-size: 1rem; }

/* ── Alerts ─────────────────────────────────────────────────── */
.tsc-alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.tsc-alert--success { background: #d1fae5; border-left: 4px solid var(--tsc-green); color: #065f46; }
.tsc-alert--error   { background: #fee2e2; border-left: 4px solid #dc2626; color: #991b1b; }
.tsc-alert ul { margin: 8px 0 0 18px; list-style: disc; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.tsc-header {
    background: var(--tsc-white);
    border-bottom: 1px solid var(--tsc-border);
    box-shadow: 0 1px 8px rgba(26,74,138,.08);
    z-index: 1000;
    position: relative;
}
.tsc-header--sticky { position: sticky; top: 0; }
.tsc-header__inner {
    max-width: var(--tsc-container); margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 16px; height: var(--header-h);
}
@media (min-width: 640px)  { .tsc-header__inner { padding: 0 24px; } }
@media (min-width: 1024px) { .tsc-header__inner { padding: 0 32px; } }

/* Logo */
.tsc-header__brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tsc-header__logo-link { display: flex; align-items: center; text-decoration: none; }
.tsc-header__logo-img { height: 44px; width: auto; }
.tsc-logo-svg { height: 44px; width: auto; display: block; }
.tsc-header__tagline {
    display: none; font-size: 0.75rem; color: var(--tsc-muted); font-weight: 500;
    border-left: 1px solid var(--tsc-border); padding-left: 10px; line-height: 1.3;
}
@media (min-width: 768px) { .tsc-header__tagline { display: block; } }

/* Search in header */
.tsc-header__search { flex: 1; max-width: 400px; margin-left: auto; margin-right: 8px; }
.tsc-search-form { display: flex; border: 1.5px solid var(--tsc-border); border-radius: 8px; overflow: hidden; background: var(--tsc-off-white); }
.tsc-search-input {
    flex: 1; padding: 8px 12px; border: none; background: transparent;
    font-size: 0.875rem; color: var(--tsc-text); outline: none;
}
.tsc-search-input::placeholder { color: var(--tsc-muted); }
.tsc-search-btn {
    padding: 8px 12px; background: var(--tsc-primary); border: none; color: #fff; cursor: pointer;
    display: flex; align-items: center;
}
.tsc-search-btn:hover { background: var(--tsc-primary-dk); }

/* Hamburger */
.tsc-hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--tsc-white);
    border: 1.5px solid var(--tsc-border);
    border-radius: 8px;
    cursor: pointer;
    color: var(--tsc-primary);
    flex-shrink: 0;
    margin-left: auto;
    transition: border-color var(--tsc-transition), background var(--tsc-transition);
    padding: 0;
}
.tsc-hamburger:hover { border-color: var(--tsc-primary); background: var(--tsc-primary-lt); }
.tsc-hamburger .tsc-ham-icon { display: block; }
.tsc-hamburger.is-open .tsc-ham-icon--grid { display: none !important; }
.tsc-hamburger.is-open .tsc-ham-icon--close { display: block !important; }
@media (min-width: 1024px) { .tsc-hamburger { display: none; } } } }

/* Navigation */
.tsc-nav {
    background: var(--tsc-primary);
    display: none;
}
.tsc-nav.is-open { display: block; }
@media (min-width: 1024px) {
    .tsc-nav {
        display: block !important;
        background: var(--tsc-primary) !important;
    }
}
.tsc-nav__inner { max-width: var(--tsc-container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px)  { .tsc-nav__inner { padding: 0 24px; } }
@media (min-width: 1024px) { .tsc-nav__inner { padding: 0 32px; } }

.tsc-nav__list { display: flex; flex-direction: column; }
@media (min-width: 1024px) { .tsc-nav__list { flex-direction: row; align-items: center; flex-wrap: wrap; } }

.tsc-nav__list li { position: relative; }
.tsc-nav__list li a {
    display: block; padding: 10px 14px; color: rgba(255,255,255,.92); font-size: 0.9rem;
    font-weight: 600; transition: color var(--tsc-transition), background var(--tsc-transition);
    text-decoration: none; white-space: nowrap;
}
.tsc-nav__list li a:hover, .tsc-nav__list li.current-menu-item > a {
    color: #fff; background: rgba(255,255,255,.15);
}
@media (min-width: 1024px) {
    .tsc-nav__list li a { padding: 12px 16px; border-radius: 0; }
    .tsc-nav__list li:first-child a { padding-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */
.tsc-main { min-height: calc(100vh - var(--header-h) - 400px); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.tsc-breadcrumb { background: var(--tsc-white); border-bottom: 1px solid var(--tsc-border); overflow: hidden; }
.tsc-breadcrumb__list {
    display: flex; align-items: center; flex-wrap: wrap; gap: 0;
    max-width: var(--tsc-container); margin: 0 auto;
    padding: 10px 16px; font-size: 0.8125rem;
    list-style: none !important; counter-reset: none !important;
}
.tsc-breadcrumb__list li { list-style: none !important; counter-increment: none !important; }
.tsc-breadcrumb__list li::before { content: none !important; display: none !important; }
@media (min-width: 640px)  { .tsc-breadcrumb__list { padding: 10px 24px; } }
@media (min-width: 1024px) { .tsc-breadcrumb__list { padding: 10px 32px; } }
.tsc-breadcrumb__item { display: flex; align-items: center; white-space: nowrap; }
.tsc-breadcrumb__item a { color: var(--tsc-primary); }
.tsc-breadcrumb__item a:hover { text-decoration: underline; }
.tsc-breadcrumb__item--current { color: var(--tsc-muted); overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.tsc-breadcrumb__sep { margin: 0 6px; color: var(--tsc-muted); user-select: none; }

/* Container in main */
.tsc-container.tsc-container--page { padding-top: 24px; padding-bottom: 48px; }

/* ── Page Header ────────────────────────────────────────────── */
.tsc-page-header { padding: 24px 0 16px; }
.tsc-page-title { font-size: 1.75rem; font-weight: 800; color: var(--tsc-primary); line-height: 1.25; margin: 0; }
.tsc-calc-page-title { font-size: 1.5rem; font-weight: 700; color: var(--tsc-primary); }
@media (min-width: 768px) { .tsc-page-title { font-size: 2.25rem; } }

/* Cat badge */
.tsc-cat-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px; border-radius: 20px; font-size: 0.8125rem; font-weight: 600; margin-bottom: 8px;
    background: var(--tsc-primary-lt); color: var(--tsc-primary);
}

/* ── Page Content ───────────────────────────────────────────── */
.tsc-page-content { padding: 24px 0; }
.tsc-page-content p { color: var(--tsc-muted); line-height: 1.7; margin-bottom: 16px; max-width: 72ch; }
.tsc-page-content h2 { font-size: 1.375rem; color: var(--tsc-primary); margin: 28px 0 12px; font-weight: 700; }
.tsc-page-content h3 { font-size: 1.125rem; color: var(--tsc-text); margin: 20px 0 8px; font-weight: 600; }
.tsc-page-content ul, .tsc-page-content ol { margin: 12px 0 16px 20px; color: var(--tsc-muted); }
.tsc-page-content ul { list-style: disc; }
.tsc-page-content ol { list-style: decimal; }
.tsc-page-content li { margin-bottom: 6px; }
.tsc-page-content table { width: 100%; border-collapse: collapse; margin: 16px 0; overflow-x: auto; display: block; }
.tsc-page-content table th, .tsc-page-content table td { padding: 10px 12px; border: 1px solid var(--tsc-border); text-align: left; font-size: 0.9rem; }
.tsc-page-content table th { background: var(--tsc-primary-lt); color: var(--tsc-primary); font-weight: 700; }
.tsc-page-content a { color: var(--tsc-primary); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
.tsc-hero {
    background: linear-gradient(135deg, #1a4a8a 0%, #1d3557 60%, #0f2744 100%);
    color: #fff; overflow: hidden; position: relative;
}
.tsc-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,.06) 0%, transparent 70%);
    pointer-events: none;
}
.tsc-hero__inner {
    max-width: var(--tsc-container); margin: 0 auto; padding: 48px 16px;
    display: flex; flex-direction: column; gap: 40px;
}
@media (min-width: 640px)  { .tsc-hero__inner { padding: 64px 24px; } }
@media (min-width: 1024px) {
    .tsc-hero__inner { flex-direction: row; align-items: center; padding: 80px 32px; gap: 60px; }
    .tsc-hero__text  { flex: 1; max-width: 560px; }
    .tsc-hero__visual{ flex: 1; }
}

.tsc-hero__badge {
    display: inline-block; background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.25); border-radius: 20px;
    padding: 5px 14px; font-size: 0.8125rem; font-weight: 600; color: rgba(255,255,255,.95);
    margin-bottom: 18px;
}
.tsc-hero__title { font-size: 2rem; font-weight: 900; line-height: 1.15; margin-bottom: 16px; color: #fff; }
@media (min-width: 640px) { .tsc-hero__title { font-size: 2.75rem; } }
@media (min-width: 1024px){ .tsc-hero__title { font-size: 3.25rem; } }

.tsc-hero__subtitle { font-size: 1.0625rem; color: rgba(255,255,255,.8); line-height: 1.6; margin-bottom: 28px; max-width: 50ch; }

.tsc-hero__search { max-width: 480px; margin-bottom: 32px; }
.tsc-hero-search-form { display: flex; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,.2); }
.tsc-hero-search-input {
    flex: 1; padding: 14px 16px; border: none; font-size: 1rem; color: var(--tsc-text);
    outline: none; background: transparent;
    /* 16px minimum prevents iOS Safari auto-zoom on focus */
}
.tsc-hero-search-input::placeholder { color: var(--tsc-muted); }
.tsc-hero-search-form .tsc-btn { border-radius: 0; margin: 4px; border-radius: 7px; }

.tsc-hero__stats { display: flex; gap: 24px; flex-wrap: wrap; }
.tsc-hero__stat { text-align: left; }
.tsc-hero__stat-num { display: block; font-size: 1.625rem; font-weight: 900; color: #fff; line-height: 1.1; }
.tsc-hero__stat-label { font-size: 0.8125rem; color: rgba(255,255,255,.7); font-weight: 500; }

.tsc-hero__calc-preview { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--tsc-radius-lg); padding: 4px; overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════ */
.tsc-section { padding: 56px 0; }
.tsc-section--bg { background: var(--tsc-white); }
.tsc-section--bg-dark { background: linear-gradient(135deg, var(--tsc-primary) 0%, #1d3557 100%); color: #fff; }

.tsc-section-header { text-align: center; margin-bottom: 40px; }
.tsc-section-header h2 { font-size: 1.75rem; font-weight: 800; color: var(--tsc-primary); margin-bottom: 10px; }
.tsc-section--bg-dark .tsc-section-header h2 { color: #fff; }
.tsc-section-header p { font-size: 1.0625rem; color: var(--tsc-muted); max-width: 56ch; margin: 0 auto; }
.tsc-section--bg-dark .tsc-section-header p { color: rgba(255,255,255,.75); }

/* ── Category tiles ─────────────────────────────────────────── */
.tsc-cat-grid {
    display: grid; gap: 16px;
    grid-template-columns: 1fr;
    align-items: stretch;
}
@media (min-width: 480px) { .tsc-cat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .tsc-cat-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 1024px){ .tsc-cat-grid { grid-template-columns: repeat(6, 1fr); } }

.tsc-cat-tile {
    display: flex; flex-direction: column; align-items: flex-start;
    height: 100%; box-sizing: border-box; align-self: stretch;
    padding: 24px 20px; border-radius: var(--tsc-radius); text-decoration: none;
    background: var(--tsc-white); border: 1.5px solid var(--tsc-border);
    box-shadow: var(--tsc-shadow); transition: transform var(--tsc-transition), box-shadow var(--tsc-transition), border-color var(--tsc-transition);
    position: relative;
}
.tsc-cat-tile:hover { transform: translateY(-4px); box-shadow: var(--tsc-shadow-lg); border-color: var(--tsc-primary); text-decoration: none; }
.tsc-cat-tile__icon { font-size: 2rem; margin-bottom: 12px; flex-shrink: 0; }
.tsc-cat-tile__title { font-size: 1rem; font-weight: 700; color: var(--tsc-primary); margin-bottom: 6px; line-height: 1.3; flex-shrink: 0; }
.tsc-cat-tile__body { flex: 1 1 auto; min-height: 0; }
.tsc-cat-tile__desc { font-size: 0.8125rem; color: var(--tsc-muted); line-height: 1.5; margin: 0; }
.tsc-cat-tile__count { font-size: 0.8125rem; font-weight: 700; color: var(--tsc-primary); display: block; padding-top: 14px; flex-shrink: 0; }

/* Colour accents */
.tsc-cat-tile--blue  .tsc-cat-tile__icon { filter: none; }
.tsc-cat-tile::after {
    content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
    background: var(--tsc-primary); opacity: 0; transition: opacity var(--tsc-transition);
}
.tsc-cat-tile:hover::after { opacity: 1; }

/* ── Popular grid ───────────────────────────────────────────── */
.tsc-popular-grid {
    display: grid; gap: 12px;
    grid-template-columns: 1fr;
    overflow: hidden;
}
@media (min-width: 640px) { .tsc-popular-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .tsc-popular-grid { grid-template-columns: 1fr 1fr 1fr; } }

.tsc-popular-card { overflow: hidden; min-width: 0;
    display: flex; align-items: center; gap: 14px; padding: 16px 18px;
    background: var(--tsc-off-white); border: 1.5px solid var(--tsc-border);
    border-radius: var(--tsc-radius); text-decoration: none;
    transition: all var(--tsc-transition);
}
.tsc-popular-card:hover { background: var(--tsc-white); border-color: var(--tsc-primary); transform: translateX(4px); box-shadow: var(--tsc-shadow); text-decoration: none; }
.tsc-popular-card__icon { font-size: 1.5rem; flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--tsc-white); border-radius: 10px; border: 1px solid var(--tsc-border); }
.tsc-popular-card__body { flex: 1; min-width: 0; }
.tsc-popular-card__title { display: block; font-weight: 700; font-size: 0.9375rem; color: var(--tsc-text); line-height: 1.3; }
.tsc-popular-card__desc  { display: block; font-size: 0.8125rem; color: var(--tsc-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsc-popular-card__arrow { color: var(--tsc-primary); font-weight: 700; flex-shrink: 0; font-size: 1.1rem; }

/* ── Calc grid (category page) ──────────────────────────────── */
.tsc-calc-grid {
    display: grid; gap: 12px;
    grid-template-columns: 1fr;
}
@media (min-width: 560px) { .tsc-calc-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .tsc-calc-grid { grid-template-columns: 1fr 1fr 1fr; } }

.tsc-calc-card {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: var(--tsc-white); border: 1.5px solid var(--tsc-border);
    border-radius: var(--tsc-radius); text-decoration: none;
    transition: all var(--tsc-transition);
}
.tsc-calc-card:hover { border-color: var(--tsc-primary); box-shadow: var(--tsc-shadow); text-decoration: none; }
.tsc-calc-card__icon { font-size: 1.375rem; flex-shrink: 0; }
.tsc-calc-card__body { flex: 1; min-width: 0; }
.tsc-calc-card__title { display: block; font-weight: 600; font-size: 0.9rem; color: var(--tsc-text); }
.tsc-calc-card__desc  { display: block; font-size: 0.8125rem; color: var(--tsc-muted); margin-top: 2px; }
.tsc-calc-card__arrow { color: var(--tsc-muted); }

/* ── Category page hero ─────────────────────────────────────── */
.tsc-category-hero {
    text-align: center; padding: 40px 0 32px; background: var(--tsc-primary-lt);
    border-radius: var(--tsc-radius-lg); margin-bottom: 32px;
}
.tsc-category-hero__icon { font-size: 3rem; margin-bottom: 12px; }
.tsc-category-hero h1  { font-size: 1.75rem; font-weight: 800; color: var(--tsc-primary); margin-bottom: 10px; }
.tsc-category-hero p   { color: var(--tsc-muted); max-width: 64ch; margin: 0 auto; font-size: 1.0625rem; }
@media (min-width: 768px) { .tsc-category-hero h1 { font-size: 2.25rem; } }

/* ── Features ───────────────────────────────────────────────── */
.tsc-features-grid {
    display: grid; gap: 24px; grid-template-columns: 1fr;
}
@media (min-width: 560px) { .tsc-features-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .tsc-features-grid { grid-template-columns: repeat(3, 1fr); } }

.tsc-feature { padding: 28px 24px; background: var(--tsc-white); border-radius: var(--tsc-radius); border: 1.5px solid var(--tsc-border); }
.tsc-feature__icon { font-size: 2rem; display: block; margin-bottom: 14px; }
.tsc-feature h3    { font-size: 1.0625rem; font-weight: 700; color: var(--tsc-primary); margin-bottom: 8px; }
.tsc-feature p     { font-size: 0.9rem; color: var(--tsc-muted); line-height: 1.6; }

/* ── App promo ──────────────────────────────────────────────── */
.tsc-app-promo { display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center; }
@media (min-width: 1024px) { .tsc-app-promo { flex-direction: row; text-align: left; gap: 80px; } }
.tsc-app-promo__text { flex: 1; }
.tsc-app-promo h2  { color: #fff; font-size: 2rem; margin-bottom: 14px; }
.tsc-app-promo p   { color: rgba(255,255,255,.8); font-size: 1.0625rem; margin-bottom: 24px; }
.tsc-app-promo__badges { display: flex; gap: 14px; flex-wrap: wrap; }
.tsc-app-badge-link { opacity: .9; transition: opacity var(--tsc-transition); }
.tsc-app-badge-link:hover { opacity: 1; }
.tsc-badge-svg { display: block; }
.tsc-phone-mockup {
    width: 200px; border: 8px solid rgba(255,255,255,.2); border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3); background: #fff; overflow: hidden;
}
.tsc-phone-mockup__screen { background: #f0f4fb; }

/* ── Related calculators ────────────────────────────────────── */
.tsc-related { margin-top: 48px; padding-top: 36px; border-top: 2px solid var(--tsc-border); }
.tsc-related__title { font-size: 1.25rem; font-weight: 700; color: var(--tsc-primary); margin-bottom: 20px; }
.tsc-related__grid  { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .tsc-related__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .tsc-related__grid { grid-template-columns: repeat(3, 1fr); } }
.tsc-related__card {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: var(--tsc-white); border: 1px solid var(--tsc-border); border-radius: 8px;
    text-decoration: none; transition: all var(--tsc-transition); font-size: 0.875rem;
}
.tsc-related__card:hover { border-color: var(--tsc-primary); background: var(--tsc-primary-lt); text-decoration: none; }
.tsc-related__icon  { flex-shrink: 0; }
.tsc-related__title { flex: 1; font-weight: 600; color: var(--tsc-text); }
.tsc-related__arrow { color: var(--tsc-primary); font-size: 0.75rem; }

/* ═══════════════════════════════════════════════════════════════
   AD ZONES
   ═══════════════════════════════════════════════════════════════ */
.tsc-ad { width: 100%; margin: 24px 0; }
.tsc-ad--placeholder { /* hidden unless populated */ }
.tsc-ad ins.adsbygoogle { display: block; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.tsc-footer {
    background: #1a1f2e; color: rgba(255,255,255,.85);
    margin-top: 64px;
}
.tsc-footer__ad { max-width: var(--tsc-container); margin: 0 auto; padding: 24px 16px 0; }
.tsc-footer__grid {
    max-width: var(--tsc-container); margin: 0 auto; padding: 48px 16px 40px;
    display: grid; gap: 36px; grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .tsc-footer__grid { grid-template-columns: 1fr 1fr; padding: 48px 24px 40px; } }
@media (min-width: 1024px) { .tsc-footer__grid { grid-template-columns: 1.8fr 1fr 1fr 1fr; padding: 48px 32px 40px; } }

.tsc-footer__logo { margin-bottom: 14px; }
.tsc-footer__about { font-size: 0.875rem; color: rgba(255,255,255,.65); line-height: 1.7; margin-bottom: 20px; }
.tsc-footer__badges { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.tsc-footer__badges .tsc-app-badge { opacity: 1; transition: opacity var(--tsc-transition), transform var(--tsc-transition); display: inline-block; }
.tsc-footer__badges .tsc-app-badge:hover { opacity: 0.9; transform: translateY(-2px); }
.tsc-footer__badges .tsc-badge-svg { width: 160px; height: 48px; display: block; }
@media (min-width: 420px) { .tsc-footer__badges { flex-direction: row; flex-wrap: wrap; } }

.tsc-footer__heading { font-size: 0.875rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.tsc-footer__links { display: flex; flex-direction: column; gap: 8px; }
.tsc-footer__links a { font-size: 0.875rem; color: rgba(255,255,255,.65); text-decoration: none; transition: color var(--tsc-transition); }
.tsc-footer__links a:hover { color: #fff; }

.tsc-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 16px;
    max-width: var(--tsc-container); margin: 0 auto;
}
@media (min-width: 640px)  { .tsc-footer__bottom { padding: 20px 24px; } }
@media (min-width: 1024px) { .tsc-footer__bottom { padding: 20px 32px; } }
.tsc-footer__bottom-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-bottom: 12px; }
.tsc-footer__copyright { font-size: 0.8125rem; color: rgba(255,255,255,.55); }
.tsc-footer__legal-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.tsc-footer__legal-nav a { font-size: 0.8125rem; color: rgba(255,255,255,.55); text-decoration: none; }
.tsc-footer__legal-nav a:hover { color: #fff; }
.tsc-footer__disclaimer { font-size: 0.75rem; color: rgba(255,255,255,.4); line-height: 1.6; border-top: 1px solid rgba(255,255,255,.06); padding-top: 12px; }

/* ═══════════════════════════════════════════════════════════════
   COOKIE BANNER
   ═══════════════════════════════════════════════════════════════ */
.tsc-cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: #1a1f2e; border-top: 3px solid var(--tsc-primary);
    box-shadow: 0 -4px 24px rgba(0,0,0,.3);
    display: none; /* shown by JS if no consent */
}
.tsc-cookie-banner.is-visible { display: block; }
.tsc-cookie-banner__inner {
    max-width: var(--tsc-container); margin: 0 auto; padding: 16px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.tsc-cookie-banner p { color: rgba(255,255,255,.85); font-size: 0.875rem; flex: 1; margin: 0; }
.tsc-cookie-banner a { color: var(--tsc-accent); }
.tsc-cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   CONTACT FORM
   ═══════════════════════════════════════════════════════════════ */
.tsc-contact-wrap { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .tsc-contact-wrap { grid-template-columns: 1fr 1.6fr; } }
.tsc-contact-info h2 { font-size: 1.5rem; color: var(--tsc-primary); margin-bottom: 12px; }
.tsc-contact-info p  { color: var(--tsc-muted); line-height: 1.7; margin-bottom: 24px; }
.tsc-contact-details { display: flex; flex-direction: column; gap: 16px; }
.tsc-contact-detail  { display: flex; align-items: flex-start; gap: 14px; }
.tsc-contact-detail__icon { font-size: 1.5rem; flex-shrink: 0; width: 44px; height: 44px; background: var(--tsc-primary-lt); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.tsc-contact-detail strong { display: block; font-weight: 700; color: var(--tsc-text); margin-bottom: 2px; }
.tsc-contact-detail a, .tsc-contact-detail span { color: var(--tsc-muted); font-size: 0.9rem; }

.tsc-form-row { margin-bottom: 20px; }
.tsc-form-row label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--tsc-text); }
.tsc-required { color: var(--tsc-secondary); }
.tsc-form-row input[type="text"],
.tsc-form-row input[type="email"],
.tsc-form-row select,
.tsc-form-row textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--tsc-border);
    border-radius: 8px; font-size: 0.9375rem; font-family: inherit;
    background: var(--tsc-white); color: var(--tsc-text);
    transition: border-color var(--tsc-transition), box-shadow var(--tsc-transition);
}
.tsc-form-row input:focus, .tsc-form-row select:focus, .tsc-form-row textarea:focus {
    outline: none; border-color: var(--tsc-primary); box-shadow: 0 0 0 3px rgba(26,74,138,.12);
}
.tsc-form-row textarea { resize: vertical; min-height: 140px; }
.tsc-form-row--submit { margin-top: 28px; }

/* ═══════════════════════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════════════════════ */
.tsc-about__hero { background: var(--tsc-primary-lt); padding: 40px; border-radius: var(--tsc-radius-lg); margin-bottom: 36px; }
.tsc-about__hero h1 { color: var(--tsc-primary); font-size: 2rem; margin-bottom: 12px; }
.tsc-about__lead    { font-size: 1.125rem; color: var(--tsc-muted); max-width: 64ch; }

/* ═══════════════════════════════════════════════════════════════
   SITEMAP
   ═══════════════════════════════════════════════════════════════ */
.tsc-sitemap { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tsc-sitemap { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px){ .tsc-sitemap { grid-template-columns: repeat(3, 1fr); } }
.tsc-sitemap__heading { font-size: 1rem; font-weight: 700; color: var(--tsc-primary); margin-bottom: 10px; border-bottom: 2px solid var(--tsc-primary-lt); padding-bottom: 6px; }
.tsc-sitemap__heading a { color: var(--tsc-primary); text-decoration: none; }
.tsc-sitemap__list { display: flex; flex-direction: column; gap: 6px; }
.tsc-sitemap__list a { font-size: 0.875rem; color: var(--tsc-muted); text-decoration: none; }
.tsc-sitemap__list a:hover { color: var(--tsc-primary); text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   SEARCH RESULTS
   ═══════════════════════════════════════════════════════════════ */
.tsc-search-results > p { color: var(--tsc-muted); margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN STYLES (loaded only in admin)
   ═══════════════════════════════════════════════════════════════ */
.tsc-admin-wrap .tsc-admin-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1200px) { .tsc-admin-wrap .tsc-admin-grid { grid-template-columns: 1fr 1fr; } }
.tsc-admin-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 24px; margin-bottom: 24px; }
.tsc-admin-card h2 { font-size: 1.1rem; margin: 0 0 16px; color: #1a4a8a; }
.tsc-admin-card h3 { font-size: 0.95rem; margin: 16px 0 8px; color: #1a1f2e; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE QUICK-MENU
   ═══════════════════════════════════════════════════════════════ */


/* tsc-quick-menu CSS removed */
/* ═══════════════════════════════════════════════════════════════
   GENERAL OVERFLOW / CONTAINER FIXES
   ═══════════════════════════════════════════════════════════════ */
html, body { overflow-x: hidden; max-width: 100vw; }
.tsc-header { overflow: visible; position: relative; }
.tsc-main { overflow-x: hidden; }

/* Page content tables — mobile scroll */
.tsc-page-content table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Calc embed container */
.tsc-calc-wrap { width: 100%; overflow-x: hidden; }

/* ═══════════════════════════════════════════════════════════════
   FAVICON
   ═══════════════════════════════════════════════════════════════ */
/* Favicon is injected via PHP in header */

/* ═══════════════════════════════════════════════════════════════
   CATEGORY LANDING PAGES
   ═══════════════════════════════════════════════════════════════ */
.tsc-cat-page { padding: 8px 0 32px; }

.tsc-cat-page__hero {
    display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px;
    padding: 24px; background: var(--tsc-primary-lt); border-radius: var(--tsc-radius);
    border-left: 4px solid var(--tsc-primary);
}
.tsc-cat-page__hero-icon { font-size: 2.5rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.tsc-cat-page__title { font-size: 1.75rem; font-weight: 800; color: var(--tsc-primary); margin: 0 0 6px; line-height: 1.2; }
@media (min-width: 768px) { .tsc-cat-page__title { font-size: 2.25rem; } }
.tsc-cat-page__desc { color: var(--tsc-muted); font-size: 1rem; margin: 0; line-height: 1.5; }
.tsc-cat-page__intro { color: var(--tsc-text); line-height: 1.7; margin: 0 0 28px; font-size: 1rem; }

.tsc-cat-calc-grid {
    display: grid; grid-template-columns: 1fr; gap: 14px;
}
@media (min-width: 480px) { .tsc-cat-calc-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .tsc-cat-calc-grid { grid-template-columns: 1fr 1fr 1fr; } }

.tsc-cat-calc-card {
    display: flex; text-decoration: none; color: inherit;
    border: 1.5px solid var(--tsc-border); border-radius: var(--tsc-radius);
    background: var(--tsc-white); transition: border-color var(--tsc-transition), box-shadow var(--tsc-transition), transform var(--tsc-transition);
    overflow: hidden;
}
.tsc-cat-calc-card:hover {
    border-color: var(--tsc-primary); box-shadow: var(--tsc-shadow);
    transform: translateY(-2px); text-decoration: none;
}
.tsc-cat-calc-card__inner { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tsc-cat-calc-card__title { font-size: 1rem; font-weight: 700; color: var(--tsc-primary); margin: 0; line-height: 1.3; }
.tsc-cat-calc-card__desc { font-size: 0.8125rem; color: var(--tsc-muted); line-height: 1.5; margin: 0; flex: 1; }
.tsc-cat-calc-card__cta { font-size: 0.8125rem; font-weight: 600; color: var(--tsc-primary); margin-top: 8px; }

/* Color variants */
.tsc-cat-page--green  .tsc-cat-page__hero { border-left-color: var(--tsc-green); background: #f0fdf4; }
.tsc-cat-page--green  .tsc-cat-page__title { color: var(--tsc-green); }
.tsc-cat-page--purple .tsc-cat-page__hero { border-left-color: #7c3aed; background: #f5f3ff; }
.tsc-cat-page--purple .tsc-cat-page__title { color: #7c3aed; }
.tsc-cat-page--orange .tsc-cat-page__hero { border-left-color: #ea580c; background: #fff7ed; }
.tsc-cat-page--orange .tsc-cat-page__title { color: #ea580c; }
.tsc-cat-page--teal   .tsc-cat-page__hero { border-left-color: #0891b2; background: #f0f9ff; }
.tsc-cat-page--teal   .tsc-cat-page__title { color: #0891b2; }
.tsc-cat-page--red    .tsc-cat-page__hero { border-left-color: #dc2626; background: #fef2f2; }
.tsc-cat-page--red    .tsc-cat-page__title { color: #dc2626; }

.tsc-badge-img { display: block; width: 155px; height: auto; border-radius: 8px; }


/* ══════════════════════════════════════════════════════
   MOBILE CATEGORY GRID MENU
   ══════════════════════════════════════════════════════ */
.tsc-mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-h, 64px);
    left: 0; right: 0;
    background: var(--tsc-white);
    border-bottom: 2px solid var(--tsc-border);
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 9999;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-h, 64px));
}
.tsc-mobile-menu.is-open { display: block; }
@media (min-width: 1024px) { .tsc-mobile-menu { display: none !important; } }

.tsc-mobile-menu__inner {
    max-width: var(--tsc-container);
    margin: 0 auto;
    padding: 16px;
}
.tsc-mobile-menu__header {
    margin-bottom: 12px;
}
.tsc-mobile-menu__label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--tsc-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tsc-mobile-menu__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.tsc-mobile-menu__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    background: var(--tsc-off-white);
    border: 1.5px solid var(--tsc-border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color var(--tsc-transition), background var(--tsc-transition);
    gap: 8px;
}
.tsc-mobile-menu__item:hover {
    border-color: var(--tsc-primary);
    background: var(--tsc-primary-lt);
    text-decoration: none;
}
.tsc-mobile-menu__icon {
    font-size: 1.75rem;
    line-height: 1;
    display: block;
}
.tsc-mobile-menu__text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tsc-text);
    text-align: center;
    line-height: 1.2;
}



/* ── Responsive (combined) ── */
/* ================================================================
   THE TAX CALCULATOR — responsive.css  v2.0
   Full mobile-first responsive — no horizontal overflow
   ================================================================ */

/* ── Base overflow prevention ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100vw; }
img, svg, video { max-width: 100%; height: auto; }

/* ── Header — mobile ──────────────────────────────────────────── */
@media (max-width: 1023px) {
    .tsc-header__search { display: none; }
    .tsc-nav {
        position: absolute; top: 100%; left: 0; right: 0; width: 100%;
        z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.2);
        overflow: hidden;
    }
    .tsc-nav__list { overflow: hidden; }
    .tsc-nav__list li a { padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ── Hero section — tablet/mobile ────────────────────────────── */
@media (max-width: 767px) {
    .tsc-hero { overflow: hidden; }
    .tsc-hero__inner { flex-direction: column; padding: 24px 16px; gap: 20px; }
    .tsc-hero__title { font-size: 1.875rem; }
    .tsc-hero__stats { gap: 16px; flex-wrap: wrap; }
    .tsc-hero__calc-preview { display: none; } /* hide desktop preview widget */
    .tsc-section { padding: 32px 0; }
}

/* ── Category grid — tablet ───────────────────────────────────── */
@media (max-width: 767px) {
    .tsc-footer__grid { gap: 28px; padding: 36px 16px 28px; }
    .tsc-cat-grid { grid-template-columns: 1fr; gap: 10px; }
    .tsc-cat-tile { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 0 12px; padding: 14px 16px; height: auto; min-height: 56px; }
    .tsc-cat-tile__icon { font-size: 1.5rem; grid-column: 1; grid-row: 1 / 3; align-self: center; margin: 0; }
    .tsc-cat-tile__body { grid-column: 2; grid-row: 1; }
    .tsc-cat-tile__title { font-size: 0.9rem; margin-bottom: 2px; line-height: 1.2; }
    .tsc-cat-tile__desc { display: none; }
    .tsc-cat-tile__count { grid-column: 2; grid-row: 2; font-size: 0.75rem; padding-top: 0; }
}
@media (min-width: 480px) and (max-width: 767px) {
    .tsc-cat-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Popular calcs grid — mobile ──────────────────────────────── */
@media (max-width: 639px) {
    .tsc-popular-grid { grid-template-columns: 1fr; }
}

/* ── Small mobile ─────────────────────────────────────────────── */
@media (max-width: 479px) {
    .tsc-hero__title { font-size: 1.5rem; }
    .tsc-hero__stats { gap: 12px; }
    .tsc-hero__stat-num { font-size: 1.25rem; }
    .tsc-page-title { font-size: 1.375rem; }
    .tsc-footer__bottom-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tsc-footer__legal-nav { gap: 10px; flex-wrap: wrap; }
    .tsc-cookie-banner__inner { flex-direction: column; gap: 12px; }
    .tsc-container { padding: 0 12px; }
    /* Nav list full width on tiny screens */
    .tsc-nav__list li a { font-size: 0.875rem; padding: 12px 16px; }
}

/* ── Footer responsive ────────────────────────────────────────── */
@media (max-width: 767px) {
    .tsc-footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 479px) {
    .tsc-footer__cols { grid-template-columns: 1fr; gap: 20px; }
}

/* ── Breadcrumb — mobile ──────────────────────────────────────── */
@media (max-width: 479px) {
    .tsc-breadcrumb__list { font-size: 0.75rem; }
    .tsc-breadcrumb__item--current { max-width: 160px; }
}

/* ── Page layout — mobile ─────────────────────────────────────── */
@media (max-width: 767px) {
    .tsc-page-layout { flex-direction: column; }
    .tsc-page-sidebar { width: 100%; order: 2; }
    .tsc-page-main { width: 100%; }
    .tsc-ad--sidebar { display: none; } /* hide sidebar ads on mobile */
}

/* ── Calculator card — mobile fix ─────────────────────────────── */
@media (max-width: 479px) {
    .ukcalc-card { padding: 14px 12px; border-radius: 8px; overflow: hidden; }
    .ukcalc-title { font-size: 1rem; }
}

/* ── Print ────────────────────────────────────────────────────── */
@media print {
    .tsc-header, .tsc-footer, .tsc-cookie-banner, .tsc-ad,
    .tsc-quick-menu, .tsc-quick-btn, .tsc-hamburger { display: none !important; }
    .tsc-main { padding: 0; }
    body { background: #fff; }
}

/* ── High-DPI ─────────────────────────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tsc-header { border-bottom-width: 0.5px; }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}


/* ── Cat-tile equal height count alignment ─────────────────── */
.tsc-cat-grid { align-items: stretch; }
.tsc-cat-tile { height: 100%; box-sizing: border-box; }
.tsc-cat-tile__desc { flex: 1; }
.tsc-cat-tile__count { margin-top: 14px; }

/* ── Mobile nav: hamburger opens tsc-nav ───────────────────── */
@media (max-width: 1023px) {
    .tsc-hamburger { display: flex !important; }
    .tsc-nav { display: none; }
    .tsc-nav.is-open { display: block; }
}
@media (min-width: 1024px) {
    .tsc-nav { display: block !important; }
    .tsc-hamburger { display: none !important; }
}

/* ── App store badges ─────────────────────────────────────── */
.tsc-footer__badges { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tsc-footer__badges .tsc-badge-svg { width: 130px; height: 40px; }
@media (max-width: 479px) {
    .tsc-footer__badges .tsc-badge-svg { width: 115px; height: 36px; }
}

/* ── Popular grid mobile overflow fix ─────────────────────── */
.tsc-popular-grid { overflow: hidden; }
.tsc-popular-card { min-width: 0; overflow: hidden; }
.tsc-popular-card__desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Hamburger right-aligned in header ─────────────────── */
@media (max-width: 1023px) {
    .tsc-hamburger { margin-left: auto; }
    .tsc-header__search { margin-right: 8px; }
}

/* ── Badge sizing responsive ────────────────────────────── */
.tsc-footer__badges .tsc-badge-svg { width: 160px; height: 48px; }
@media (max-width: 360px) {
    .tsc-footer__badges .tsc-badge-svg { width: 140px; height: 42px; }
}

/* Prevent iOS Safari zoom on input focus (requires font-size >= 16px) */
@media (max-width: 1023px) {
    input[type="search"],
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ── Category card SVG icons ─────────────────────────────── */
.tsc-cat-icon { display:inline-flex; align-items:center; justify-content:center; }
.tsc-cat-icon svg { width:36px; height:36px; stroke:currentColor; }
.tsc-mobile-menu__icon svg { display:block; }
