/* ============================================================
   Core Design System & Variables — UKSalaryCalculator
   ============================================================ */

:root {
    --bg-main:         #f8fafc;
    --bg-card:         #ffffff;
    --bg-highlight:    #eff6ff;
    --text-main:       #0f172a;
    --text-muted:      #475569;
    --primary:         #C8102E;
    --primary-hover:   #a60c24;
    --border-color:    #e2e8f0;
    --shadow-sm:       0 1px 3px 0 rgb(0 0 0 / 0.07);
    --shadow-md:       0 4px 12px -2px rgb(0 0 0 / 0.08);
    --shadow-lg:       0 8px 24px -4px rgb(0 0 0 / 0.1);
    --radius:          0.75rem;
    --radius-sm:       0.5rem;
    --font-main:       "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --brand-red:       #012169;
    --brand-red-hover: #001850;
    --sidebar-width:   260px;
    --content-max:     1100px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 17px;
    font-weight: 300;
    line-height: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 600;
    line-height: 1.3;
    color: #012169;
    margin-bottom: 0.85rem;
}

h1, .hero-title, .page-title {
    font-size: 30px;
    line-height: 40px;
}

h2 {
    font-size: 24px;
    line-height: 34px;
}

h3 {
    font-size: 20px;
    line-height: 28px;
}

h4 {
    font-size: 17px;
    line-height: 24px;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

ul, ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
}

.lead-text, .hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    line-height: 1.6;
    font-weight: 300;
}

/* ============================================================
   Global Layout: Sidebar + Main
   ============================================================ */
.global-layout-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

@media (min-width: 993px) {
    .global-layout-wrapper {
        display: grid;
        grid-template-columns: var(--sidebar-width) 1fr;
        grid-template-rows: 1fr auto;
        min-height: 100vh;
        align-items: start;
    }

    .site-main {
        grid-column: 2;
    }
}

/* Main content area */
.site-main {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Inner centering wrapper — constrains content to max-width */
.content-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 2.5rem 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .content-inner {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .content-inner {
        padding: 1.25rem 1rem;
    }
}

/* ============================================================
   Site Header (mobile only; hidden on desktop)
   ============================================================ */
.site-header {
    background-color: var(--brand-red);
    border-bottom: 1px solid rgba(0,0,0,0.15);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 200;
    width: 100%;
}

.header-container {
    max-width: 100%;
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.9rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.9rem 1rem;
    }
}

.site-logo a {
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.logo-highlight {
    color: var(--primary);
}

.site-navigation {
    display: none;
}

/* Desktop: hide header entirely — sidebar takes over */
@media (min-width: 993px) {
    .site-header {
        display: none;
    }
}

/* ============================================================
   Custom Sidebar
   ============================================================ */
.custom-sidebar {
    background-color: var(--brand-red);
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    flex-shrink: 0;
    width: var(--sidebar-width);
}

@media (max-width: 992px) {
    .custom-sidebar {
        display: none;
    }
}

.sidebar-logo-block {
    text-align: center;
    padding: 2rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.sidebar-logo-block a {
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    line-height: 1.2;
}

.sidebar-logo-small {
    font-size: 0.65rem;
    letter-spacing: 2.5px;
    font-weight: 400;
    display: block;
    text-transform: uppercase;
    opacity: 0.75;
}

.sidebar-logo-large {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
    margin-top: 0.3rem;
}

.sidebar-scroll-area {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0.5rem 0;
}

.sidebar-scroll-area::-webkit-scrollbar { width: 4px; }
.sidebar-scroll-area::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.sidebar-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu li {
    margin: 0;
}

.menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.95rem 1.25rem;
    text-decoration: none;
    color: rgba(255,255,255,0.88);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    transition: background-color 0.18s ease, color 0.18s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-link:hover,
.menu-link.active {
    background-color: var(--brand-red-hover);
    color: #ffffff;
}

.menu-arrow {
    opacity: 0;
    font-size: 1rem;
    transition: opacity 0.18s ease;
    flex-shrink: 0;
}

.menu-link:hover .menu-arrow,
.menu-link.active .menu-arrow {
    opacity: 1;
}

/* ============================================================
   Hamburger Button
   ============================================================ */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
    flex-shrink: 0;
}

.hamburger-bar {
    width: 100%;
    height: 2.5px;
    background-color: #ffffff;
    border-radius: 4px;
    transition: all 0.3s ease;
}

@media (max-width: 992px) {
    .hamburger-menu {
        display: flex;
    }
}

/* ============================================================
   Mobile Drawer
   ============================================================ */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100dvh;
    background-color: #ffffff;
    box-shadow: -4px 0 24px rgb(0 0 0 / 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1.5rem 1.25rem;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.drawer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-red);
}

.drawer-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-close:hover { color: #ef4444; }

.drawer-navigation {
    overflow-y: auto;
    flex-grow: 1;
}

.drawer-navigation::-webkit-scrollbar { width: 3px; }
.drawer-navigation::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

.drawer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.drawer-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed var(--border-color);
}

.drawer-list li a {
    display: block;
    padding: 0.7rem 1rem;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.drawer-list li a:hover {
    background-color: #f8fafc;
    color: var(--brand-red);
}

.drawer-list li a.active-drawer-item {
    background-color: #fdf2f8;
    color: var(--brand-red);
    font-weight: 600;
}

/* ============================================================
   Home Page: Hero + Calculator Section
   ============================================================ */
.home-main-content {
    display: flex;
    flex-direction: column;
}

.main-calculator-card {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 2rem;
}

.main-calculator-card .hero-title {
    font-size: 38px;
    font-weight: 800;
    text-align: center;
    background: linear-gradient(135deg, #012169 0%, #C8102E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.main-calculator-card .hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    color: #475569;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

/* Calculator two-column layout */
.calc-dashboard {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .calc-dashboard {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Large salary input */
.input-group-large {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-group-large label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.input-group-large .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-large .currency-symbol {
    position: absolute;
    left: 1.1rem;
    font-size: clamp(1.25rem, 5.5vw, 1.6rem);
    font-weight: 700;
    color: var(--text-main);
    pointer-events: none;
    z-index: 1;
}

.input-group-large input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.1rem 1.1rem 1.1rem 2.6rem;
    font-size: clamp(1.25rem, 5.5vw, 1.6rem);
    font-weight: 700;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: var(--font-main);
}

.input-group-large input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

/* Segmented tabs */
.segmented-tabs-wrapper {
    margin-bottom: 1.25rem;
}

.segmented-tabs-wrapper > label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.segmented-tabs {
    display: flex;
    background: #f1f5f9;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.2rem;
    gap: 0.2rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.segmented-tabs::-webkit-scrollbar {
    display: none;
}

.segmented-tab {
    flex: 1;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 0.8rem;
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: calc(var(--radius) - 0.2rem);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: var(--font-main);
    white-space: nowrap;
}

.segmented-tab.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.segmented-tab:hover:not(.active) {
    background: rgba(255,255,255,0.6);
    color: var(--text-main);
}

/* Grid inputs */
.grid-2-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 480px) {
    .grid-2-inputs {
        grid-template-columns: 1fr;
    }
}

.small-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.small-input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.small-input-group input,
.small-input-group select {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    font-family: var(--font-main);
}

.small-input-group input:focus,
.small-input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(34,197,94,0.1);
}

/* Adjustments panel */
.adjustments-panel {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1.5px solid var(--border-color);
}

.adjustments-panel h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.adjustment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.adjustment-row:last-child { border-bottom: none; }

.adjustment-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.adjustment-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.adjustment-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider-toggle {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #e2e8f0;
    transition: 0.3s;
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #94a3b8;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider-toggle {
    background-color: var(--primary);
    border-color: var(--primary);
}

.switch input:checked + .slider-toggle:before {
    transform: translateX(20px);
    background-color: #ffffff;
}

/* ============================================================
   Result Panel (right column of calculator)
   ============================================================ */
.result-panel {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

@media (min-width: 1025px) {
    .result-panel {
        position: sticky;
        top: 1.5rem;
    }
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
}

.result-badge-dot {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--primary);
    flex-shrink: 0;
}

.result-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}

.result-amount-huge {
    font-size: clamp(1.8rem, 7vw, 3rem);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    word-break: break-all;
}

.result-amount-huge span.decimals {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
}

.result-narrative {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.result-summary-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.9rem;
    gap: 0.75rem;
}

.result-item-label { font-weight: 600; color: var(--text-main); }

.result-item-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.1rem;
}

.result-item-value {
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
    flex-shrink: 0;
}

.result-item-value.keep  { color: var(--primary); }
.result-item-value.deduct { color: #ef4444; }

/* ============================================================
   Net Pay Ribbon — 5 time-period cards
   ============================================================ */
.net-pay-ribbon {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 900px) { .net-pay-ribbon { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .net-pay-ribbon { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .net-pay-ribbon { grid-template-columns: 1fr; } }

.net-pay-strip-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.1rem 1rem;
    text-align: left;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}

.net-pay-strip-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.net-pay-strip-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.net-pay-strip-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.net-pay-strip-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ============================================================
   Tax Gauge Section
   ============================================================ */
.tax-bands-gauge-section {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.gauge-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gauge-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #012169;
}

.gauge-subtitle { font-size: 0.82rem; color: var(--text-muted); }

.gauge-container {
    position: relative;
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    margin: 3.25rem 0 3.75rem;
}

.gauge-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    width: 0%;
    transition: width 0.35s ease;
}

.gauge-pointer {
    position: absolute;
    top: -42px;
    transform: translateX(-50%);
    background: var(--primary);
    color: #ffffff;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 150px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: left 0.35s ease;
}

.gauge-pointer:after {
    content: "";
    position: absolute;
    bottom: -5px; left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: var(--primary) transparent;
    display: block;
    width: 0;
}

.gauge-marker {
    position: absolute;
    top: 18px;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

.gauge-marker-label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #94a3b8;
    margin-top: 0.1rem;
}

@media (max-width: 480px) {
    .gauge-marker-label {
        display: none;
    }
}

.gauge-marker[style*="left: 0%"] {
    transform: translateX(0);
    text-align: left;
}

/* Tax band cards */
.tax-band-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1rem;
}

@media (max-width: 700px) {
    .tax-band-cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .tax-band-cards-grid { grid-template-columns: 1fr; }
}

.tax-band-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.band-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    letter-spacing: 0.05em;
}

.band-square-indicator {
    width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0;
}

.band-square-indicator.pa     { background: #94a3b8; }
.band-square-indicator.basic  { background: var(--primary); }
.band-square-indicator.higher { background: #3b82f6; }

.band-amount {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.band-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ============================================================
   Quick Links / Tools Grid
   ============================================================ */
.useful-steps-section {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.useful-steps-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #012169;
    margin-bottom: 1.25rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 800px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps-grid { grid-template-columns: 1fr; } }

.step-flat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.step-flat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.step-category {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.07em;
    margin-bottom: 0.4rem;
}

.step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #012169;
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.step-body {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.step-action-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.step-action-link:hover { color: var(--primary); }

/* ============================================================
   Tables
   ============================================================ */
.responsive-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    margin: 1.75rem 0;
    box-shadow: var(--shadow-sm);
}

.responsive-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 500px;
}

.responsive-table-wrapper th,
.responsive-table-wrapper td {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    vertical-align: middle;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.responsive-table-wrapper th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.responsive-table-wrapper tr:last-child td { border-bottom: none; }
.responsive-table-wrapper tr.row-net { background: var(--bg-highlight); }
.responsive-table-wrapper tr.row-net td { color: var(--primary); font-weight: 600; }

/* ============================================================
   Content Sections & Cards
   ============================================================ */
.content-section-card {
    background: transparent;
    border: none;
    padding: 1.75rem 0;
    margin-bottom: 0.5rem;
}

.content-section-card h2 {
    font-size: 22px;
    color: #012169;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.85rem;
    line-height: 1.3;
}

.content-section-card p {
    font-size: 17px;
    color: rgb(72, 72, 72);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-weight: 300;
}

/* Info subcards */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.25rem;
}

@media (max-width: 700px) {
    .grid-2 { grid-template-columns: 1fr; gap: 1rem; }
}

.info-subcard {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.info-subcard h3 {
    font-size: 1rem;
    color: #012169;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Allowance table */
.allowance-table-container {
    margin: 1.25rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    max-width: 100%;
}

.allowance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 400px;
}

.allowance-table th,
.allowance-table td {
    padding: 0.8rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.allowance-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.allowance-table tr:last-child td { border-bottom: none; }
.allowance-table tr:hover td { background-color: #f8fafc; }

/* Badges */
.allowance-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-nil        { background-color: #f1f5f9; color: #475569; }
.badge-basic      { background-color: #dcfce7; color: #166534; }
.badge-higher     { background-color: #eff6ff; color: #1d4ed8; }
.badge-additional { background-color: #fdf2f8; color: #be185d; }

/* Callout warning box */
.callout-box-warning {
    background: linear-gradient(to right, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-left: 5px solid #d97706;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.callout-box-warning h3 {
    color: #78350f;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.callout-box-warning p {
    color: #92400e;
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.callout-box-warning ul {
    margin-left: 1.25rem;
    color: #92400e;
    font-size: 0.9rem;
}

.callout-box-warning li { margin-bottom: 0.4rem; }

/* ============================================================
   FAQ Accordion
   ============================================================ */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--bg-card);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover { border-color: #cbd5e1; }

.faq-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.25rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.97rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: var(--font-main);
    gap: 0.75rem;
}

.faq-trigger:hover { background-color: #f8fafc; }

.faq-chevron {
    transition: transform 0.25s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content-inner {
    padding: 0 1.25rem 1.25rem;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.65;
}

.faq-item.active { border-color: var(--primary); }
.faq-item.active .faq-trigger { background-color: var(--bg-highlight); color: var(--primary); }
.faq-item.active .faq-chevron { transform: rotate(180deg); color: var(--primary); }
.faq-item.active .faq-content { max-height: 800px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: linear-gradient(180deg, #012169 0%, #010e40 100%);
    color: #e8eef8;
    padding: 5.5rem 0 3rem;
    margin-top: auto;
    width: 100%;
    border-top: 5px solid #C8102E;
}

/* Footer spans full width under the sidebar+content area */
@media (min-width: 993px) {
    .site-footer {
        padding-left: var(--sidebar-width);
    }
}

.footer-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(200, 16, 46, 0.6);
}

.footer-about-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.footer-logo {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-about-heading {
    margin-top: 0 !important;
    margin-bottom: 0.6rem !important;
}

.footer-about-text {
    margin-bottom: 0.85rem;
}

.footer-about-verified {
    font-size: 0.82rem;
    color: #94a3b8;
}

.footer-text {
    color: rgba(232, 238, 248, 0.75);
    font-size: 0.87rem;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-links a {
    color: rgba(232, 238, 248, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    margin-top: 1rem;
    text-align: center;
    color: rgba(232, 238, 248, 0.5);
    font-size: 0.8rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .footer-container { padding: 0 1.25rem; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

@media (max-width: 400px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Buttons & Links
   ============================================================ */
.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    font-family: var(--font-main);
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.inline-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.inline-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================================
   Calculator Specific (tax_calculator.php include)
   ============================================================ */
.table-wrapper {
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.75rem 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.tax-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    min-width: 580px;
}

.tax-breakdown-table th,
.tax-breakdown-table td {
    padding: 0.9rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}

.tax-breakdown-table th {
    background-color: #f1f5f9;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tax-breakdown-table tr.row-net td {
    background-color: var(--bg-highlight);
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
}

.reviewer-badge {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.badge-avatar img {
    border-radius: 50%;
    object-fit: cover;
}

.badge-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.06em;
}

.badge-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.2rem 0;
    color: #012169;
}

.badge-role {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.badge-bio {
    font-size: 0.88rem;
    margin-top: 0.4rem;
    line-height: 1.6;
}

.financial-disclaimer {
    display: flex;
    gap: 1rem;
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.disclaimer-icon {
    font-size: 1.35rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.disclaimer-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.disclaimer-text {
    font-size: 0.88rem;
    color: #b45309;
    line-height: 1.6;
}

/* Nearby Salaries */
.nearby-salaries-widget { margin: 2.5rem 0; }

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.nearby-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nearby-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.nearby-amount {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
}

.nearby-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    display: block;
}

/* Grid-4 card links */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin: 1.75rem 0;
}

.card-link {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    box-shadow: none;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
    font-size: 0.92rem;
}

.card-link:hover {
    border-color: var(--primary);
    background-color: #f8fafc;
    color: var(--primary);
}

/* ============================================================
   Popular Salaries Custom Grid
   ============================================================ */
.popular-salaries-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

@media (max-width: 900px) {
    .popular-salaries-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .popular-salaries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 400px) {
    .popular-salaries-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

.popular-salary-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.popular-salary-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.popular-salary-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-highlight);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    border: 1px solid rgba(200, 16, 46, 0.15);
}

.popular-salary-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.pop-salary-amount {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.pop-salary-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}


/* ============================================================
   Miscellaneous Utility
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
}

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Visible focus ring for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ============================================================
   Extra Mobile Responsiveness Safety Overrides
   ============================================================ */
@media (max-width: 480px) {
    .result-panel {
        padding: 1.25rem;
    }
    
    .gauge-container {
        margin: 3.25rem 1rem 3.75rem;
    }

    .footer-container {
        padding: 0 1rem;
    }
}

@media (max-width: 360px) {
    .site-logo a {
        font-size: 1.15rem;
    }
}

/* ============================================================
   Advanced Inputs Accordions (Left Column)
   ============================================================ */
.advanced-accordions-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.accordion-item {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.accordion-item:hover {
    border-color: #cbd5e1;
}

.accordion-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
    transition: background-color 0.2s;
}

.accordion-trigger:hover {
    background-color: #f8fafc;
}

.accordion-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.accordion-icon-bullet {
    font-size: 1.1rem;
}

.accordion-chevron {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.accordion-item.active .accordion-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
}

.accordion-content-inner {
    padding: 0.25rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

/* ============================================================
   Results Tabbed Dashboard Card
   ============================================================ */
.results-dashboard-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.results-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none; /* Hide standard scrollbar on Firefox */
    -ms-overflow-style: none;  /* Hide standard scrollbar on IE/Edge */
    -webkit-overflow-scrolling: touch; /* Smooth inertia scroll on iOS */
}

.results-tabs::-webkit-scrollbar {
    display: none; /* Hide standard scrollbar on Chrome/Safari */
}

.tab-btn {
    flex: 1;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-family: var(--font-main);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.tab-btn.tab-btn-action {
    background-color: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary-hover);
}

.tab-btn.tab-btn-action:hover {
    background-color: var(--primary-hover);
}

@media (max-width: 480px) {
    .results-tabs {
        padding: 0.4rem;
        gap: 0.25rem;
    }
    .tab-btn {
        padding: 0.55rem 0.45rem;
        font-size: 0.78rem;
        gap: 0.25rem;
    }
}

.tab-btn:hover:not(.active) {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.tab-btn.active {
    background-color: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tab-content-wrapper {
    padding: 1.25rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInTab 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Custom styles for tables inside results card */
#dynamic-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

#dynamic-breakdown-table th,
#dynamic-breakdown-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.88rem;
}

#dynamic-breakdown-table th {
    font-weight: 700;
    text-align: right;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

#dynamic-breakdown-table th:first-child,
#dynamic-breakdown-table td:first-child {
    text-align: left;
}

#dynamic-breakdown-table td {
    text-align: right;
    border-bottom: 1px solid #f1f5f9;
}

#dynamic-breakdown-table tr.row-net td {
    background-color: var(--bg-highlight);
    color: var(--primary);
    font-weight: 700;
    border-bottom: none;
}

/* ============================================================
   Mobile Sticky Bottom Net Pay Dock
   ============================================================ */
.mobile-sticky-net-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 -8px 32px 0 rgba(15, 23, 42, 0.08);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) 1.25rem;
}

.mobile-sticky-net-dock.slide-up {
    transform: translateY(0);
}

.dock-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.dock-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dock-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: pulseDockDot 2s infinite;
}

@keyframes pulseDockDot {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 8px var(--primary); }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.dock-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dock-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.dock-period {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.dock-scroll-btn {
    background-color: var(--brand-red);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-main);
}

.dock-scroll-btn:hover {
    background-color: var(--brand-red-hover);
}

.dock-scroll-btn:active {
    transform: scale(0.95);
}

/* Hide dock on desktop and wider viewports */
@media (min-width: 1025px) {
    .mobile-sticky-net-dock {
        display: none !important;
    }
}

/* ============================================================
   Lucide Icons Styles & Animations
   ============================================================ */
.lucide {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
    vertical-align: middle;
}
.menu-arrow .lucide {
    width: 14px;
    height: 14px;
    stroke-width: 2.5px;
    transition: transform 0.25s ease;
}
.menu-link:hover .menu-arrow .lucide {
    transform: translateX(3px);
}
.accordion-lucide-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    stroke-width: 2px;
}
.accordion-lucide-chevron {
    width: 16px;
    height: 16px;
    stroke-width: 2.5px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.accordion-item.active .accordion-lucide-chevron {
    transform: rotate(180deg);
}
.disclaimer-lucide-icon {
    width: 20px;
    height: 20px;
    color: #eab308;
    stroke-width: 2.2px;
}
.badge-lucide-check {
    width: 16px;
    height: 16px;
    color: var(--brand-red);
    stroke-width: 2.5px;
    display: inline-block;
    margin-right: 4px;
}
.dock-lucide-arrow {
    width: 14px;
    height: 14px;
    stroke-width: 3px;
    margin-left: 2px;
}
.tab-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.2px;
}
.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* ============================================================
   HOMEPAGE MOBILE & TABLET UX OPTIMIZATIONS
   ============================================================ */
@media (max-width: 768px) {
    /* Center align headings and descriptions of all homepage sections */
    .popular-salaries-section h2.gauge-title,
    .useful-steps-section h3,
    .tax-bands-gauge-section h2.gauge-title {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        font-size: clamp(1.25rem, 5vw, 1.6rem) !important;
    }

    /* Popular salaries grid modifications */
    .popular-salaries-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.85rem !important;
    }
    
    .popular-salary-card {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.1rem 0.85rem !important;
    }

    .popular-salary-info {
        align-items: center !important;
        text-align: center !important;
    }

    /* Useful steps section modifications */
    .steps-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .step-flat-card {
        text-align: center !important;
        align-items: center !important;
        padding: 1.5rem 1.25rem !important;
    }

    .step-action-link {
        justify-content: center !important;
        width: 100% !important;
        margin-top: 0.75rem !important;
    }

    /* AEO Content block mobile adjustments */
    .aeo-content-block {
        padding: 1.5rem 1.25rem !important;
        text-align: center !important;
        margin-bottom: 2.5rem !important;
    }

    .aeo-content-block h2 {
        text-align: center !important;
        font-size: clamp(1.2rem, 5vw, 1.45rem) !important;
    }

    .aeo-content-block h3 {
        text-align: center !important;
        font-size: clamp(1.05rem, 4vw, 1.2rem) !important;
    }

    .aeo-content-block p {
        text-align: center !important;
        font-size: 0.92rem !important;
    }

    /* Reviewer Badge and Disclaimer mobile centering */
    .reviewer-badge {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.5rem 1.25rem !important;
        gap: 1rem !important;
        margin: 2.5rem 0 !important;
    }

    .badge-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .financial-disclaimer {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 1.5rem 1.25rem !important;
        gap: 0.85rem !important;
        margin: 2.5rem 0 !important;
        border-left: none !important;
        border-top: 4px solid #f59e0b !important;
    }

    .disclaimer-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Net pay strip cards centering */
    .net-pay-strip-card {
        text-align: center !important;
        padding: 1rem 0.85rem !important;
    }

    /* Footer mobile alignment */
    .footer-grid {
        text-align: center !important;
    }
    
    .footer-links {
        align-items: center !important;
    }

    /* Result panel padding reduction */
    .result-panel {
        padding: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    /* Extreme mobile widths (e.g. 320px to 400px) */
    .popular-salaries-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Adjust page titles and descriptions to fit 320px screens perfectly */
    .hero-title, .page-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
        padding: 0 0.25rem !important;
    }

    .hero-subtitle, .lead-text {
        font-size: 0.95rem !important;
        padding: 0 0.5rem !important;
    }

    /* Button and input padding optimization */
    .btn-primary, .btn-secondary, input[type="number"], input[type="text"], select {
        padding: 0.85rem 1rem !important;
        font-size: 0.95rem !important;
        min-height: 48px; /* touch friendly size */
    }

    /* Ensure results section table is readable on tiny displays */
    #dynamic-breakdown-table th, 
    #dynamic-breakdown-table td {
        font-size: 0.76rem !important;
        padding: 0.6rem 0.4rem !important;
    }

    /* Result header layout on small screens */
    .result-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.85rem !important;
    }
    .result-header > div {
        justify-content: center !important;
    }
    #btn-download-pdf {
        justify-content: center !important;
        padding: 0.65rem 1rem !important;
        font-size: 0.85rem !important;
        width: 100% !important;
    }

    /* FAQ accordion triggers */
    .faq-trigger {
        padding: 0.95rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Mobile sticky bottom net pay dock optimizations for narrow screens */
    @media (max-width: 360px) {
        .dock-label {
            display: none !important;
        }
        .dock-value {
            font-size: 1.05rem !important;
        }
        .dock-scroll-btn {
            padding: 0.45rem 0.75rem !important;
            font-size: 0.75rem !important;
        }
    }
}

