/**
 * SEO landing layout — horizontal padding (overrides global .container padding:0 in functions.php).
 * Mirrors scholarships-seo.css .sch-seo-page__inner rhythm.
 */
.aff-hub,
.aff-country,
.aff-city,
.aff-seo-page {
    background: #f5f7f8;
    padding-bottom: 3rem;
}

.aff-hub .container,
.aff-country .container,
.aff-city .container {
    box-sizing: border-box !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

@media (min-width: 768px) {
    .aff-hub .container,
    .aff-country .container,
    .aff-city .container {
        padding-left: 1.75rem !important;
        padding-right: 1.75rem !important;
    }
}

@media (min-width: 1024px) {
    .aff-hub .container,
    .aff-country .container,
    .aff-city .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Affordability country/city — compact hero; hub uses full-size hero (production parity) */
.aff-country .hero-section,
.aff-city .hero-section {
    background: linear-gradient(135deg, #4a7c7c 0%, #2c5f5f 50%, #1a4a4a 100%) !important;
    color: #fff;
    padding: 1.15rem 20px 1.35rem !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    position: relative;
    text-align: center;
}

.aff-country .hero-section::before,
.aff-city .hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.18);
    z-index: 1;
    pointer-events: none;
}

.aff-country .hero-section .container,
.aff-city .hero-section .container {
    position: relative;
    z-index: 2;
}

.aff-country .hero-section .hero-title,
.aff-country .hero-section h1.hero-title,
.aff-city .hero-section .hero-title,
.aff-city .hero-section h1.hero-title {
    font-size: clamp(1.35rem, 3.2vw, 1.7rem) !important;
    font-weight: 700 !important;
    margin: 0 0 0.4rem !important;
    line-height: 1.25 !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 1px 1px 3px rgba(0, 0, 0, 0.65) !important;
}

.aff-country .hero-section .lead,
.aff-city .hero-section .lead {
    font-size: 0.9375rem;
    line-height: 1.45;
    margin: 0 auto 0.45rem;
    max-width: 42rem;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
}

.aff-country .hero-section .container > p,
.aff-city .hero-section .container > p {
    margin: 0.3rem 0;
}

.aff-country .hero-section .container > p:first-child,
.aff-city .hero-section .container > p:first-child {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.aff-country .hero-section .text-muted,
.aff-city .hero-section .text-muted {
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 0.9rem;
}

.aff-hub .hero-section {
    background: linear-gradient(135deg, #4a7c7c 0%, #2c5f5f 50%, #1a4a4a 100%) !important;
    color: #fff;
    padding: calc(3rem * 0.7) 20px !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    position: relative;
    text-align: center;
}

.aff-hub .hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
    pointer-events: none;
}

.aff-hub .hero-section .container {
    position: relative;
    z-index: 2;
}

.aff-hub .hero-section .hero-title,
.aff-hub .hero-section h1.hero-title {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    margin: 0 0 0.5rem !important;
    line-height: 1.2 !important;
    color: #fff !important;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 20px rgba(0, 0, 0, 0.8),
        2px 2px 4px rgba(0, 0, 0, 0.9) !important;
}

.aff-hub .hero-section .lead {
    font-size: 1.1rem;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 44rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .aff-country .hero-section,
    .aff-city .hero-section {
        padding: 1rem 16px 1.15rem !important;
    }

    .aff-country .hero-section .hero-title,
    .aff-country .hero-section h1.hero-title,
    .aff-city .hero-section .hero-title,
    .aff-city .hero-section h1.hero-title {
        font-size: 1.3rem !important;
    }

    .aff-hub .hero-section {
        padding: 2rem 16px !important;
    }

    .aff-hub .hero-section .hero-title,
    .aff-hub .hero-section h1.hero-title {
        font-size: 1.75rem !important;
    }

    .aff-hub .hero-section .lead {
        font-size: 1rem;
    }
}

.aff-city .hero-section .hero-title {
    margin-bottom: 0;
}

.aff-hero-band {
    margin-top: 1.25rem;
    padding-top: 0.35rem;
}

.aff-hero-band__badge-row {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
}

.aff-hero-band__score {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
}

.aff-hero-band__explainer {
    margin: 0.85rem auto 0;
    max-width: 40rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.aff-city-institutes {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .aff-city-institutes {
        padding: 1.5rem 1.75rem;
    }
}

.aff-city-institutes__lead {
    margin: 0 0 1rem;
    color: #4b5563;
    line-height: 1.55;
}

.aff-city-institutes__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aff-city-institutes__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.aff-city-institutes__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.aff-city-institutes__link {
    flex: 1 1 14rem;
    font-weight: 600;
    color: #2a9d8f;
    text-decoration: none;
}

.aff-city-institutes__link:hover {
    color: #264653;
    text-decoration: underline;
}

.aff-city-institutes__grant {
    font-size: 0.9rem;
    color: #4b5563;
    white-space: nowrap;
}

.aff-city-institutes__item .aff-band {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}

/* Breadcrumbs */
.aff-seo-breadcrumbs {
    padding: 1rem 0 0.5rem;
}

.aff-seo-breadcrumbs .breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .aff-seo-breadcrumbs .breadcrumb-list {
        font-size: 1rem;
    }
}

.aff-seo-breadcrumbs .breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: #6b7280;
}

.aff-seo-breadcrumbs a {
    color: #2a9d8f;
    text-decoration: none;
}

.aff-seo-breadcrumbs a:hover {
    text-decoration: underline;
}

.aff-seo-breadcrumbs [aria-current="page"] {
    color: #374151;
}

.aff-seo-section {
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .aff-seo-section {
        margin-bottom: 2.5rem;
    }
}

.aff-seo-page h2 {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    color: #264653;
    margin: 0 0 1rem;
}

.aff-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.aff-country > .container > .aff-lead:first-child,
.aff-city > .container > .aff-lead:first-child {
    margin-top: 1.25rem;
}

.aff-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    color: #111827;
}

.aff-stat > span:first-child {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.aff-stat small {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.35rem;
    line-height: 1.35;
}

a.aff-stat--link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}

a.aff-stat--link:hover {
    background: #fff;
    border-color: #2a9d8f;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

a.aff-stat--link strong {
    color: #2a9d8f;
}

.aff-stat strong {
    display: block;
    font-size: 1.25rem;
}

.aff-band {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Colour-blind–friendly band palette (blue / amber / green — not red→green only) */
.aff-band--difficult {
    background: #fff4e6;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.aff-band--manageable {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.aff-band--comfortable {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.aff-band--quite-comfortable {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.aff-band--very-comfortable {
    background: #14532d;
    color: #f0fdf4;
    border: 1px solid #14532d;
}

.aff-band--unknown {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.aff-faq dt { font-weight: 600; margin-top: 1rem; }
.aff-faq dd { margin: 0.35rem 0 0; color: #444; }

/* FAQ accordion (matches scholarships-seo) */
.aff-seo-faq {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .aff-seo-faq {
        padding: 1.5rem 1.75rem;
    }
}

.aff-seo-faq__title {
    margin: 0 0 1rem;
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    color: #264653;
}

.aff-seo-faq__item {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}

.aff-seo-faq__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.aff-seo-faq__item summary {
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.45;
    list-style: none;
}

.aff-seo-faq__item summary::-webkit-details-marker {
    display: none;
}

.aff-seo-faq__item summary::before {
    content: "+";
    display: inline-block;
    width: 1.25rem;
    margin-right: 0.35rem;
    color: #2a9d8f;
    font-weight: 700;
}

.aff-seo-faq__item[open] summary::before {
    content: "−";
}

.aff-seo-faq__item p {
    margin: 0.65rem 0 0 1.6rem;
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.aff-calc {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.aff-calc-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
}

.aff-calc-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.aff-calc-form input[type="number"] {
    width: 100%;
    max-width: 160px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.aff-calc-form .button {
    margin: 0;
    white-space: nowrap;
    padding: 0.65rem 1.25rem;
    background: #2a9d8f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.aff-calc-form .button:hover {
    background: #264653;
}

.aff-calc-note {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #4b5563;
}

.aff-disclaimer {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 2rem;
    line-height: 1.55;
}

.aff-lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 1.25rem;
}

/* Related links (matches scholarships-seo) */
.aff-seo-related {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .aff-seo-related {
        padding: 1.5rem 1.75rem;
    }
}

.aff-seo-related ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    .aff-seo-related ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.aff-seo-related li {
    margin: 0;
}

.aff-seo-related a {
    display: block;
    padding: 0.65rem 0.85rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.4;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.aff-seo-related a:hover {
    background: #ecfdf5;
    border-color: #2a9d8f;
    color: #264653;
}

.aff-seo-page a:not(.button):not(.aff-band):not(.aff-stat--link) {
    color: #2a9d8f;
}

.aff-seo-page a:not(.button):not(.aff-band):not(.aff-stat--link):hover {
    color: #264653;
}

.aff-inline-card {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.aff-inline-card--with-widget .aff-inline-card__layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 1.5rem;
}

.aff-inline-card__main {
    flex: 1 1 220px;
    min-width: 0;
}

.aff-inline-card__grant {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #334155;
}

/* —— Score widget (institute card) —— */
.aff-score-widget-wrap {
    flex: 0 0 auto;
    margin-left: auto;
}

.aff-score-widget__frame {
    position: relative;
    padding: 2px;
    border-radius: 14px;
    background: #cbd5e1;
    box-shadow:
        0 0 0 1px #94a3b8,
        0 1px 4px rgba(15, 23, 42, 0.03);
    transition:
        background 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s ease;
}

.aff-score-widget__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 10.5rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.aff-score-widget__frame:has(.aff-score-widget__score-block:hover),
.aff-score-widget__frame:has(.aff-score-widget__score-block:focus-visible) {
    background: linear-gradient(135deg, #93c5fd 0%, #1d4ed8 100%);
    box-shadow:
        0 0 0 1px #3b82f6,
        0 0 0 2px rgba(59, 130, 246, 0.09),
        0 4px 10px rgba(29, 78, 216, 0.07);
    transform: translateY(-1px);
}

.aff-score-widget__frame:has(.aff-score-widget__band-block:hover .aff-band--difficult),
.aff-score-widget__frame:has(.aff-score-widget__band-block:focus-visible .aff-band--difficult) {
    background: linear-gradient(135deg, #fdba74 0%, #9a3412 100%);
    box-shadow:
        0 0 0 1px #ea580c,
        0 0 0 2px rgba(234, 88, 12, 0.08),
        0 4px 10px rgba(154, 52, 18, 0.06);
    transform: translateY(-1px);
}

.aff-score-widget__frame:has(.aff-score-widget__band-block:hover .aff-band--manageable),
.aff-score-widget__frame:has(.aff-score-widget__band-block:focus-visible .aff-band--manageable) {
    background: linear-gradient(135deg, #cbd5e1 0%, #475569 100%);
    box-shadow:
        0 0 0 1px #64748b,
        0 0 0 2px rgba(100, 116, 139, 0.08),
        0 4px 10px rgba(71, 85, 105, 0.06);
    transform: translateY(-1px);
}

.aff-score-widget__frame:has(.aff-score-widget__band-block:hover .aff-band--comfortable),
.aff-score-widget__frame:has(.aff-score-widget__band-block:focus-visible .aff-band--comfortable) {
    background: linear-gradient(135deg, #93c5fd 0%, #1e40af 100%);
    box-shadow:
        0 0 0 1px #2563eb,
        0 0 0 2px rgba(37, 99, 235, 0.08),
        0 4px 10px rgba(30, 64, 175, 0.06);
    transform: translateY(-1px);
}

.aff-score-widget__frame:has(.aff-score-widget__band-block:hover .aff-band--quite-comfortable),
.aff-score-widget__frame:has(.aff-score-widget__band-block:focus-visible .aff-band--quite-comfortable) {
    background: linear-gradient(135deg, #86efac 0%, #166534 100%);
    box-shadow:
        0 0 0 1px #22c55e,
        0 0 0 2px rgba(34, 197, 94, 0.08),
        0 4px 10px rgba(22, 101, 52, 0.06);
    transform: translateY(-1px);
}

.aff-score-widget__frame:has(.aff-score-widget__band-block:hover .aff-band--very-comfortable),
.aff-score-widget__frame:has(.aff-score-widget__band-block:focus-visible .aff-band--very-comfortable) {
    background: linear-gradient(135deg, #4ade80 0%, #14532d 100%);
    box-shadow:
        0 0 0 1px #15803d,
        0 0 0 2px rgba(21, 128, 61, 0.09),
        0 4px 10px rgba(20, 83, 45, 0.07);
    transform: translateY(-1px);
}

.aff-score-widget__frame:has(.aff-score-widget__band-block:hover .aff-band--unknown),
.aff-score-widget__frame:has(.aff-score-widget__band-block:focus-visible .aff-band--unknown) {
    background: linear-gradient(135deg, #e5e7eb 0%, #6b7280 100%);
    box-shadow:
        0 0 0 1px #9ca3af,
        0 0 0 2px rgba(107, 114, 128, 0.07),
        0 4px 10px rgba(75, 85, 99, 0.05);
    transform: translateY(-1px);
}

.aff-score-widget__score-block,
.aff-score-widget__band-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 8px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.aff-score-widget__score-block {
    padding: 0.35rem 0.5rem;
    cursor: default;
}

.aff-score-widget__band-block {
    padding: 0.15rem 0.25rem;
    cursor: default;
}

.aff-score-widget__score {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease, transform 0.2s ease;
}

.aff-score-widget__caption {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
    transition: color 0.2s ease;
}

.aff-score-widget__band {
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aff-score-widget__score-block:hover,
.aff-score-widget__score-block:focus-visible {
    background: #f8fafc;
}

.aff-score-widget__score-block:hover .aff-score-widget__score,
.aff-score-widget__score-block:focus-visible .aff-score-widget__score {
    color: #1d4ed8;
    transform: scale(1.03);
}

.aff-score-widget__score-block:hover .aff-score-widget__caption,
.aff-score-widget__score-block:focus-visible .aff-score-widget__caption {
    color: #475569;
}

.aff-score-widget__band-block:hover .aff-score-widget__band,
.aff-score-widget__band-block:focus-visible .aff-score-widget__band {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.aff-score-widget__score-block:focus-visible,
.aff-score-widget__band-block:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .aff-score-widget__frame {
        transition: box-shadow 0.2s ease;
    }

    .aff-score-widget__frame:has(.aff-score-widget__score-block:hover),
    .aff-score-widget__frame:has(.aff-score-widget__score-block:focus-visible),
    .aff-score-widget__frame:has(.aff-score-widget__band-block:hover),
    .aff-score-widget__frame:has(.aff-score-widget__band-block:focus-visible) {
        transform: none;
    }

    .aff-score-widget__score-block,
    .aff-score-widget__band-block,
    .aff-score-widget__score,
    .aff-score-widget__caption,
    .aff-score-widget__band {
        transition: none;
    }

    .aff-score-widget__score-block:hover .aff-score-widget__score,
    .aff-score-widget__score-block:focus-visible .aff-score-widget__score,
    .aff-score-widget__band-block:hover .aff-score-widget__band,
    .aff-score-widget__band-block:focus-visible .aff-score-widget__band {
        transform: none;
    }
}

@media (max-width: 640px) {
    .aff-inline-card--with-widget .aff-inline-card__layout {
        flex-direction: column;
        align-items: stretch;
    }

    .aff-score-widget-wrap {
        margin-left: 0;
        display: flex;
        justify-content: center;
    }
}

.aff-inline-card__links {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.aff-inline-card__meta {
    color: #64748b;
    font-size: 0.9rem;
    margin-left: 0.35rem;
}

.aff-hub-table-wrap {
    overflow-x: auto;
    margin: 1rem 0 2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.aff-hub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.aff-hub-table th,
.aff-hub-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.aff-hub-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #264653;
}

.aff-hub-table tbody tr:last-child td {
    border-bottom: none;
}

.aff-hub-table a {
    color: #2a9d8f;
    font-weight: 600;
    text-decoration: none;
}

.aff-hub-table a:hover {
    color: #264653;
    text-decoration: underline;
}

.aff-hub-table__factor,
.aff-hub-table__score {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.aff-hub-legend {
    margin: 0 0 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.aff-hub-legend__title {
    margin: 0 0 0.75rem;
    text-align: center;
}

.aff-hub-legend__bands {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: space-between;
    align-items: stretch;
}

.aff-hub-legend__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    padding: 0.35rem 0.25rem;
}

.aff-hub-legend__item .aff-band {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aff-hub-legend__range {
    font-size: 0.75rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .aff-hub-legend__bands {
        flex-wrap: wrap;
        justify-content: center;
    }

    .aff-hub-legend__item {
        flex: 1 1 calc(33.333% - 0.5rem);
        min-width: 7rem;
    }
}

@media (max-width: 520px) {
    .aff-hub-legend__item {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

.aff-hub-cities {
    margin: 2rem 0;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.aff-hub-cities__lead {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0.35rem 0 1rem;
}

.aff-hub-cities__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.65rem;
}

.aff-hub-cities__list li {
    margin: 0;
}

.aff-hub-cities__list a {
    display: block;
    padding: 0.65rem 0.85rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.aff-hub-cities__list a:hover {
    background: #ecfdf5;
    border-color: #2a9d8f;
    color: #264653;
}

.aff-hub-cities__country,
.aff-hub-cities__factor {
    color: #64748b;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

.aff-category-banner {
    margin: 1.25rem auto 1.25rem;
    max-width: 1200px;
    padding: 0 1rem;
    box-sizing: border-box;
}

.aff-category-banner__panel {
    padding: 0.85rem 1.1rem 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.aff-category-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.1rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.aff-category-banner--open-positions .aff-category-banner__panel {
    background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
    border-color: #fed7aa;
}

.aff-category-banner--open-positions .aff-category-banner__inner {
    background: transparent;
    border: 0;
}

.aff-category-banner__headline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.aff-category-banner--open-positions .aff-category-banner__inner {
    align-items: flex-start;
}

.aff-category-banner__kicker {
    margin: 0;
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0369a1;
    font-weight: 700;
    background: rgba(3, 105, 161, 0.08);
    border-radius: 4px;
    white-space: nowrap;
}

.aff-category-banner__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    color: #0f172a;
}

.aff-category-banner__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    flex-shrink: 0;
}

.aff-category-banner__stats .aff-band {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
}

.aff-category-banner__stat {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    white-space: nowrap;
}

.aff-category-banner__stat--score {
    color: #1e40af;
    border-color: #bfdbfe;
    background: #eff6ff;
    font-variant-numeric: tabular-nums;
}

.aff-category-banner__actions {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    flex-shrink: 0;
}

.aff-category-banner__cta.button {
    margin: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: nowrap;
    background: #fff;
    color: var(--primary-dark-green, #2c5f5f) !important;
    border: 2px solid var(--accent-green, #3a7a7a);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.aff-category-banner__cta.button:hover,
.aff-category-banner__cta.button:focus-visible {
    background: var(--accent-green, #3a7a7a);
    color: #fff !important;
    border-color: var(--accent-green, #3a7a7a);
    transform: translateY(-1px);
}

.aff-category-banner__cta--secondary.button,
.aff-category-banner__link.aff-category-banner__cta--secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: nowrap;
    background: #fff;
    color: var(--primary-dark-green, #2c5f5f) !important;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.aff-category-banner__cta--secondary.button:hover,
.aff-category-banner__cta--secondary.button:focus-visible,
.aff-category-banner__link.aff-category-banner__cta--secondary:hover,
.aff-category-banner__link.aff-category-banner__cta--secondary:focus-visible {
    background: #f0f9ff;
    color: var(--primary-dark-green, #2c5f5f) !important;
    border-color: var(--primary-dark-green, #2c5f5f);
    transform: translateY(-1px);
}

.aff-category-banner__link:not(.aff-category-banner__cta--secondary) {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.aff-category-banner--open-positions .aff-category-banner__kicker {
    color: #c2410c;
    background: rgba(194, 65, 12, 0.08);
}

.aff-category-banner__subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: #64748b;
    max-width: 36rem;
}

.aff-category-banner__subtitle--compact {
    margin: 0.4rem 0 0;
    padding: 0 0.15rem;
    font-size: 0.82rem;
    line-height: 1.35;
    max-width: none;
}

@media (max-width: 768px) {
    .aff-category-banner__inner {
        gap: 0.55rem 0.75rem;
        padding: 0.65rem 0.85rem;
    }

    .aff-category-banner__headline {
        flex: 1 1 100%;
    }

    .aff-category-banner__stats {
        flex: 1 1 auto;
    }

    .aff-category-banner__actions {
        flex: 1 1 100%;
    }

    .aff-category-banner__title {
        font-size: 0.92rem;
    }
}

.aff-op-banner__chips-label {
    margin: 0.75rem 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.aff-op-banner__chips {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.aff-op-banner__chips li {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    font-size: 0.85rem;
}

.aff-op-banner__chips li > a:first-child {
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}

.aff-op-banner__chips li > a:first-child:hover {
    background: #f1f5f9;
}

.aff-op-banner__chip-filter {
    padding: 0.35rem 0.5rem;
    border-left: 1px solid #e5e7eb;
    color: #64748b;
    text-decoration: none;
    line-height: 1;
}

.aff-op-banner__chip-filter:hover {
    background: #fff7ed;
    color: #c2410c;
}

@media (max-width: 600px) {
    .aff-calc-form {
        flex-direction: column;
        align-items: stretch;
    }

    .aff-calc-form input[type="number"] {
        max-width: 100%;
    }
}
