:root {
    --primary: #003366; /* HealthCore Navy */
    --primary-hover: #001f3f;
    --accent: #00A9CE; 
    --accent-bright: #00C4EE;
    --accent-light: #E0F4FA;
    --success: #00823B; /* NHS Green */
    --success-bright: #00A854;
    --warning: #D97706; 
    --cta: #00823B;
    --cta-hover: #006830;
    --bg-color: #F4F7F9; 
    --surface: #FFFFFF;
    --text-dark: #111827;
    --text-muted: #4B5563;
    --border: #D1D5DB;
    --header-bg: #768692; /* NHS Mid Grey */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --radius: 12px;
}

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

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, #E0F2FE 0%, transparent 40%), 
                      radial-gradient(circle at bottom left, #E0F2FE 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Master Width Container */
.container { 
    width: 100%;
    max-width: 1080px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* Solid Navy Sticky Navbar */
.navbar {
    background-color: var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}
.nav-content { display: flex; align-items: center; justify-content: center; }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo {
    height: 50px;
    width: auto;
    display: block;
    object-fit: contain;
}

.page-wrapper { padding: 40px 0; flex-grow: 1; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.ml-auto { margin-left: auto; }

/* Headers & Breadcrumbs */
.page-header { margin-bottom: 25px; }
.page-header h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--primary); }
.subtitle { font-size: 1.05rem; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }

.breadcrumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    flex-wrap: wrap;
}
.breadcrumbs a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--accent); }

.breadcrumb-icon {
    vertical-align: -2px;
    margin-right: 4px;
    opacity: 0.7;
}

/* SEO Text Blocks */
.seo-intro {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}
.seo-intro p { color: var(--text-dark); font-size: 1.05rem; line-height: 1.7; margin-bottom: 0; }
.seo-intro h2 { display: none; }

/* Content guide sections (SEO) */
.content-guide {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 30px;
    margin-top: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.content-guide-compact {
    margin-top: 16px;
    padding: 22px 24px;
}
.content-guide h2 {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.content-guide p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}
.content-guide p:last-child { margin-bottom: 0; }

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 8px;
}
.guide-item h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}
.guide-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}
.guide-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.guide-icon-primary { background: var(--accent-light); color: var(--primary); }
.guide-icon-accent { background: rgba(0, 169, 206, 0.15); color: var(--accent); }
.guide-icon-success { background: rgba(0, 130, 59, 0.12); color: var(--success); }

/* Page sections (heading + content, no wrapper box) */
.page-section {
    margin-top: 40px;
    margin-bottom: 8px;
}
.page-section-title {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.link-card-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Homepage Region Link Cards */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.region-link-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
    position: relative;
}
.region-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.region-card-content { flex-grow: 1; min-width: 0; }
.region-card-content h2 { color: var(--primary); font-size: 1.4rem; margin-bottom: 4px; font-weight: 700; letter-spacing: -0.02em; }
.region-card-content p { font-size: 0.95rem; margin: 0; line-height: 1.5; color: var(--text-muted); }
.region-link-card .chevron { color: var(--primary); opacity: 0.35; transition: opacity 0.2s, transform 0.2s; flex-shrink: 0; }
.region-link-card:hover .chevron { opacity: 1; transform: translateX(3px); }

/* SVG Flag and Icon Styling */
.region-flag {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.08);
    flex-shrink: 0;
    border: 2px solid white;
}

.tool-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
    flex-shrink: 0;
    border: 2px solid white;
}
.tool-icon-success { background: linear-gradient(135deg, var(--success-bright), var(--success)); }
.tool-icon-accent { background: linear-gradient(135deg, var(--accent-bright), var(--accent)); }
.tool-icon-primary { background: linear-gradient(135deg, var(--primary), #004080); }

/* FAQ Accordion Section */
.faq-section { margin-top: 10px; }
.faq-section h2 { color: var(--primary); font-size: 1.4rem; margin-bottom: 15px; font-weight: 700; letter-spacing: -0.02em; }
.page-section .app-card.faq-section { margin-top: 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-item summary { 
    font-weight: 600; 
    font-size: 1.05rem; 
    cursor: pointer; 
    color: var(--text-dark); 
    list-style: none; 
    outline: none; 
    position: relative; 
    padding-right: 25px;
    transition: color 0.2s;
}
.faq-item summary:hover { color: var(--primary); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { 
    content: '+'; 
    position: absolute; 
    right: 0; 
    font-size: 1.4rem; 
    color: var(--primary);
    line-height: 1;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin-top: 12px; color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; margin-bottom: 0; }

/* Cards General */
.app-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    padding: 28px;
    margin-bottom: 24px;
}
.card-header { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.card-header h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 51, 102, 0.25);
    white-space: nowrap;
    border: none;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 51, 102, 0.35);
}

.btn-calculate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--success-bright) 0%, var(--success) 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 130, 59, 0.4);
    white-space: nowrap;
    border: 2px solid rgba(255, 255, 255, 0.2);
}
.btn-calculate:hover {
    background: linear-gradient(135deg, #00c060 0%, var(--cta-hover) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 130, 59, 0.5);
    color: #ffffff;
}
.btn-calculate svg {
    flex-shrink: 0;
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.88rem;
    box-shadow: 0 2px 8px rgba(0, 130, 59, 0.35);
}

.band-mobile-header .btn-calculate {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-outline-white {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Pay summary bar (below payslip) */
.pay-summary {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.pay-summary-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 16px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}
.pay-summary-item:nth-child(1) { background: #f0f9ff; }
.pay-summary-item:nth-child(2) { background: #ecfdf5; }
.pay-summary-item:nth-child(3) { background: #f0fdf4; }

.pay-summary-item:last-child {
    border-right: none;
}

.icon-primary { color: var(--primary); }
.icon-accent { color: var(--accent); }
.icon-success { color: var(--success); }
.icon-warning { color: var(--warning); }

.pay-summary-icon {
    margin-bottom: 10px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-sm);
}

.pay-summary-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.pay-summary-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--primary);
    letter-spacing: -0.02em;
}

/* Share box */
.share-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.share-box-prominent {
    background: var(--primary);
    border: none;
    padding: 28px 28px;
    box-shadow: 0 8px 24px rgba(0, 51, 102, 0.25);
    margin-top: 8px;
}

.share-box-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-box-prominent .share-box-icon {
    color: #ffffff;
}

.share-box-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.share-box-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.share-box-text strong {
    font-size: 1.05rem;
    color: var(--primary);
}

.share-box-prominent .share-box-text strong {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 800;
}

.share-box-prominent .share-box-text span {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
}

.share-box-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: var(--primary);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-share:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

.share-box-prominent .btn-share {
    background: var(--success-bright);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.share-box-prominent .btn-share:hover {
    background: var(--success);
    color: #ffffff;
}

.label-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.field-icon {
    flex-shrink: 0;
}
.field-icon-accent { color: var(--accent); }
.field-icon-success { color: var(--success); }
.field-icon-primary { color: var(--primary); }
.field-icon-sun { color: var(--warning); }
.field-icon-danger { color: #dc2626; }

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
}
.section-icon svg { display: block; }
.section-icon-primary { background: rgba(0, 51, 102, 0.1); color: var(--primary); }
.section-icon-accent { background: rgba(0, 169, 206, 0.15); color: var(--accent); }
.section-icon-success { background: rgba(0, 130, 59, 0.12); color: var(--success); }
.section-icon-warning { background: rgba(217, 119, 6, 0.12); color: var(--warning); }

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}
.toggle-icon-primary { background: rgba(0, 51, 102, 0.1); color: var(--primary); }
.toggle-icon-accent { background: rgba(0, 169, 206, 0.15); color: var(--accent); }
.toggle-icon-success { background: rgba(0, 130, 59, 0.12); color: var(--success); }
.toggle-icon-warning { background: rgba(217, 119, 6, 0.12); color: var(--warning); }

.card-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 10px;
    vertical-align: middle;
    background: rgba(0, 169, 206, 0.15);
    color: var(--accent);
}

/* Plain English summary */
.simple-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.simple-summary h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.simple-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 169, 206, 0.15);
    color: var(--accent);
    flex-shrink: 0;
}
.simple-summary p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-dark);
    margin: 0;
}
.simple-summary p strong {
    font-weight: 700;
    color: var(--primary);
}

.table-subtotal {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.85;
    margin-top: 2px;
}

/* Form section labels */
.form-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-light);
}

/* Layouts */
.app-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    align-items: start;
}

/* Sticky Sidebar for Desktop */
@media (min-width: 861px) {
    .sidebar {
        position: sticky;
        top: 90px;
    }
}

/* Sticky Sidebar for Desktop */
@media (max-width: 861px) {
    .sidebar {
        margin-bottom: 1px !important;
    }
}

/* Split Form Inputs side-by-side */
.form-row.split-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
    align-items: start;
}
.form-row.split-2 .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}
.form-row.split-2 .form-group label {
    min-height: 2.75rem;
    margin-bottom: 8px;
}
.form-row.split-2 .form-group .hint {
    min-height: 1.25rem;
}

/* Forms */
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; }
.hint { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }
.sidebar-note { font-size: 0.82rem; color: var(--text-muted); margin: -4px 0 12px; line-height: 1.45; }

.toggle-group + .toggle-group,
.toggle-panel-body + .toggle-group { margin-top: 20px; }
.toggle-panel-body {
    margin: 16px 0 4px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafbfc;
}
.toggle-panel-body[hidden] { display: none; }
.toggle-panel-body .form-group:last-child { margin-bottom: 0; }
.toggle-panel-body .sidebar-note { margin-top: 0; }
.range-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}
.range-row input[type="range"] { flex-grow: 1; }
.range-value {
    font-weight: 700;
    color: var(--primary);
    min-width: 45px;
    text-align: right;
}

input[type="number"], input[type="text"], select {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 1rem; font-family: inherit; background-color: #F9FAFB; transition: all 0.2s; outline: none;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus { 
    border-color: var(--primary); background-color: var(--surface); box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15); 
}

/* Tax Code Specific Styling */
#tax_code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
    background-color: var(--accent-light);
    border-color: #bae6fd;
    text-transform: uppercase;
}

.select-wrapper { position: relative; }
.select-wrapper::after { content: "▼"; font-size: 0.8rem; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); }
select { appearance: none; padding-right: 40px; }

/* Custom Toggle */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.toggle-group { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toggle-text { display: flex; flex-direction: row; align-items: center; gap: 12px; min-width: 0; }
.toggle-text-copy { display: flex; flex-direction: column; min-width: 0; }
.toggle-text strong { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); }
.toggle-text span { font-size: 0.85rem; color: var(--text-muted); }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ef4444; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 3px; background-color: white; transition: .3s; }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(22px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Ensures the layout doesn't blow out the viewport on mobile */
.results-area { min-width: 0; }

/* Standard Table styling for Regions and Annual Leave */
.table-card { 
    padding: 0; 
    overflow: hidden; 
    margin-bottom: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.table-responsive { 
    width: 100%;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
}

.modern-table { 
    width: 100%; 
    border-collapse: collapse; 
}
.modern-table th { 
    background-color: var(--primary); 
    color: #ffffff; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    font-weight: 700; 
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid var(--primary-hover);
}

.modern-table td { 
    padding: 16px 20px; 
    border-bottom: 1px solid var(--border); 
    vertical-align: middle; 
    color: var(--text-dark);
}
.modern-table tbody tr { transition: background-color 0.2s ease; }
.modern-table tbody tr:nth-child(even) { background-color: #fbfcfd; }
.modern-table tbody tr:hover { background-color: #f0f7ff; }

/* Authentic Edge-to-Edge Payslip Layout Styling */
.payslip-wrapper {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}
.payslip-header span {
    display: inline-flex;
    align-items: center;
}
.payslip-header .card-title-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.payslip-header {
    background: linear-gradient(135deg, var(--primary) 0%, #004080 100%);
    padding: 16px 20px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.payslip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.payslip-col {
    padding: 20px;
}
.payslip-col:first-child {
    border-right: 1px solid var(--border);
}
.payslip-inner-table {
    width: 100%;
    border-collapse: collapse;
}
.payslip-inner-table th {
    text-align: left;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.payslip-inner-table th.text-right {
    text-align: right;
}
.payslip-inner-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-dark);
    vertical-align: top;
}
.payslip-inner-table td.text-right {
    vertical-align: top;
    padding-top: 14px;
}
.payslip-detail {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 4px;
    line-height: 1.4;
}
.payslip-inner-table tr:last-child td {
    border-bottom: none;
}
.payslip-footer {
    background-color: var(--primary);
    color: #ffffff;
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.net-pay-label {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.net-pay-amount {
    font-weight: 800;
    font-size: 1.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Results card (annual leave) */
.results-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}
.results-card-header {
    background-color: var(--primary);
    padding: 16px 20px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
}
.results-card-body {
    padding: 20px;
}
.results-card-footer {
    background-color: var(--primary);
    color: #ffffff;
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Summary Statement Area (legacy) */
.summary-statement {
    display: none;
}

.text-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.font-bold { font-weight: 700; }
.text-success { color: var(--success) !important; font-weight: 700; }
.text-danger { color: #d32f2f !important; font-weight: 700; }

.deduction-label { font-weight: 600; color: var(--text-dark); }
.tier-badge { display: inline-block; background: var(--accent-light); padding: 3px 8px; border-radius: 6px; font-size: 0.75rem; color: var(--primary); font-weight: 600; margin-left: 8px; vertical-align: middle; }
.role-example { font-size: 0.85rem; color: var(--text-muted); font-weight: 400; display: block; margin-top: 6px; line-height: 1.5;}

/* Band cards (region pages) */
.bands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.band-mobile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}
.band-mobile-header {
    background: linear-gradient(135deg, var(--primary) 0%, #004080 100%);
    color: #ffffff;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.band-mobile-header strong {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.band-retired .band-mobile-header {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}
.band-retired-row {
    color: var(--text-muted);
    font-style: italic;
}
.band-retired-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
    font-style: normal;
}
.band-mobile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}
.band-mobile-roles {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 10px 16px 0;
    line-height: 1.45;
    margin: 0;
}
.band-mobile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.band-mobile-row:last-of-type {
    border-bottom: none;
}

/* Scale Breakdown Specifics */
.modern-table tbody tr:last-child td { border-bottom: none; }

.net-row { background-color: var(--primary) !important; border-top: none; }
.net-row td { font-weight: 800; font-size: 1.25rem; color: #ffffff; padding: 24px 20px; }

/* Last Updated & Disclaimer Text */
.last-updated-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 16px;
    margin-bottom: 8px;
}
.results-disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
    margin-bottom: 24px;
    line-height: 1.5;
    padding: 0 20px;
}

/* Footer - White Background with Mid Grey Text */
.footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-top: 1px solid var(--border);
    margin-top: 40px;
    color: var(--header-bg);
}
.footer p { font-weight: 500; color: var(--header-bg); }
.footer-link { color: var(--primary); font-weight: 700; text-decoration: none; transition: opacity 0.2s; }
.footer-link:hover { opacity: 0.8; text-decoration: underline; }

/* Mobile Responsiveness Rules */
@media (max-width: 860px) { 
    .app-layout { grid-template-columns: 1fr; } 
    .pay-summary { flex-direction: column; }
    .pay-summary-item:nth-child(1),
    .pay-summary-item:nth-child(2),
    .pay-summary-item:nth-child(3) { background: var(--surface); }
    .pay-summary-item { border-right: none; border-bottom: 1px solid var(--border); padding: 18px 16px; }
    .pay-summary-item:last-child { border-bottom: none; }
    .guide-grid { grid-template-columns: 1fr; }
    .share-box-prominent {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .share-box-prominent .btn-share {
        width: 100%;
        margin-top: 4px;
    }
    .ml-auto { margin-left: 0; text-align: left !important; }
}

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

@media (max-width: 600px) {
    .page-wrapper { padding: 20px 15px; } 
    .seo-intro { padding: 20px; }
    .app-card { padding: 20px; }
    
    .region-grid { grid-template-columns: 1fr; }
    .region-link-card { padding: 20px; }
    .region-link-card .chevron { display: none; }
    
    .modern-table th, .modern-table td { padding: 12px 10px; font-size: 0.85rem; }
    .deduction-label { font-size: 0.85rem; white-space: normal; }
    .text-mono { font-size: 0.85rem; white-space: nowrap; }
    
    .bands-grid { grid-template-columns: 1fr; }
    
    .results-card-footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .page-header h1 { font-size: 1.8rem; }
    
    /* MOBILE PAYSLIP GRID FIXES */
    .payslip-grid {
        grid-template-columns: 1fr;
    }
    .payslip-col:first-child {
        border-right: none;
        border-bottom: 1px dashed var(--border);
    }
    .payslip-footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .summary-statement { font-size: 1.15rem; }
}

/* Job comparison page */
.compare-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
    align-items: start;
}
.compare-role-card {
    padding: 0;
    overflow: hidden;
}
.compare-role-header {
    padding: 16px 20px;
    color: #ffffff;
}
.compare-role-header-current {
    background: linear-gradient(135deg, var(--primary) 0%, #004080 100%);
}
.compare-role-header-new {
    background: linear-gradient(135deg, var(--success) 0%, #006830 100%);
}
.compare-role-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.compare-role-body {
    padding: 22px 24px 24px;
}
.compare-results-title {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.compare-verdict {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-dark);
    margin-bottom: 24px;
}
.compare-verdict strong {
    color: var(--primary);
}
.compare-verdict-sub {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 8px;
}
.compare-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.compare-summary-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.compare-summary-card-up {
    background: #ecfdf5;
    border-color: rgba(0, 130, 59, 0.22);
}
.compare-summary-card-down {
    background: #fef2f2;
    border-color: rgba(220, 38, 38, 0.18);
}
.compare-summary-card-neutral {
    background: #f8fafc;
    border-color: var(--border);
}
.compare-summary-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.compare-summary-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}
.compare-summary-sub {
    display: block;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 600;
}
.compare-summary-sub span {
    font-weight: 700;
}
.compare-delta-value {
    font-weight: 800;
}
.compare-delta-up {
    color: var(--success) !important;
}
.compare-delta-down {
    color: #dc2626 !important;
}
.compare-delta-neutral {
    color: var(--text-muted) !important;
}
.compare-table-wrap {
    margin-bottom: 16px;
}
.compare-table th:last-child,
.compare-table td:last-child {
    min-width: 110px;
}
.compare-row-net td {
    font-weight: 800;
    background: #f0f9ff;
    color: var(--primary);
}
.compare-delta-cell {
    font-weight: 700;
}

@media (max-width: 960px) {
    .compare-layout {
        grid-template-columns: 1fr;
    }
    .compare-summary-grid {
        grid-template-columns: 1fr;
    }
}

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

.band-neighbor-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border, #e2e8f0);
}

.band-neighbor-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.band-neighbor-link:hover {
    text-decoration: underline;
}

.band-neighbor-all {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.band-neighbor-all:hover {
    color: var(--primary);
}

.band-neighbor-spacer {
    flex: 1;
    min-width: 80px;
}

.guides-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.guides-list .guide-card {
    text-decoration: none;
    color: inherit;
}

.guides-list .guide-card h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--primary);
}

.guide-status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: 4px;
    margin: 0 0 4px;
}

.guide-outline-label {
    font-weight: 600;
    margin: 12px 0 6px;
    font-size: 0.9rem;
}

.guide-outline-list {
    margin: 0 0 16px;
    padding-left: 1.25rem;
    color: var(--text-dark);
}

.guide-outline-list li {
    margin-bottom: 6px;
}

.guide-draft-notice {
    margin-bottom: 24px;
}