:root {
    color-scheme: light;
    --bg: #f3f4f7;
    --bg-soft: #ffffff;
    --fg: #10223b;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --border: rgba(15, 23, 42, 0.14);
    --card-bg: #ffffff;
    --card-border: rgba(15, 23, 42, 0.08);
    --ad-card-default-bg: #2563eb;
    --ad-card-default-fg: #ffffff;
    --ad-card-min: 220px;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #f9fbff 0%, #f1f5f9 55%, #e2e8f0 100%);
    color: var(--fg);
    overflow-x: hidden;
}

main.container {
    flex: 1 0 auto;
    padding-bottom: 4rem;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
    box-sizing: border-box;
}

.site-header {
    background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    color: #f8fafc;
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.22);
}

.site-header h1 {
    margin: 0 0 0.25rem;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: 0.01em;
}

.tagline {
    margin: 0;
    color: rgba(241, 245, 249, 0.85);
}

.main {
    padding: 2.5rem 0 2rem;
}


.feed-list {
    display: grid;
    gap: 1.5rem;
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.feed-list.feed-list--active {
    opacity: 1;
    transform: translateY(0);
}

.feed-item,
.ad-preferences {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(6px);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.feed-item:hover,
.ad-preferences:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 55px rgba(15, 23, 42, 0.18);
}

.feed-item {
    background: rgba(255, 255, 255, 0.98);
}

.feed-item__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted);
}

.source-pill {
    background: rgba(37, 99, 235, 0.12);
    color: var(--accent-strong);
    padding: 0.35rem 0.95rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.feed-item__title {
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    margin: 0.4rem 0 0.15rem;
}

.feed-item__title a {
    color: inherit;
    text-decoration: none;
}

.feed-item__title a:hover,
.feed-item__title a:focus {
    text-decoration: underline;
}

.feed-item__summary {
    margin: 0.25rem 0 0.85rem;
    line-height: 1.5;
    color: #475569;
}

.feed-item__image {
    margin: 0.75rem 0;
}

.feed-item__image img {
    max-width: 100%;
    border-radius: 12px;
}

.feed-item__actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(79, 70, 229, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover,
.button:focus {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 24px 42px rgba(79, 70, 229, 0.4);
}

.button:active {
    transform: translateY(1px) scale(0.99);
    filter: saturate(1.1);
}

.button:disabled {
    cursor: wait;
    opacity: 0.9;
}

.button--loading {
    gap: 0.55rem;
    pointer-events: none;
}

.button__spinner {
    width: 1em;
    height: 1em;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    animation: spinner 0.7s linear infinite;
    flex: 0 0 auto;
}

.button__label {
    display: inline-flex;
    align-items: center;
}


.ad-controls {
    margin: 0;
    padding-top: 0.75rem;
    border-top: 1px solid transparent;
    display: grid;
    gap: 1.8rem;
    width: 100%;
}

.ad-controls__header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
}

.ad-controls__inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    width: 100%;
}

.ad-controls label {
    display: flex;
    flex-direction: column;
    font-size: 0.94rem;
    color: rgba(15, 23, 42, 0.78);
    gap: 0.55rem;
    flex: 1 1 280px;
}

.ad-controls__button-wrap {
    display: flex;
    align-items: flex-end;
    flex: 0 0 auto;
}

.ad-controls__button-wrap .button {
    white-space: nowrap;
}

.ads-container {
    background: rgba(37, 99, 235, 0.12);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    color: var(--fg);
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.ads-grid--active .ads-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ads-card {
    position: relative;
    background: var(--card-bg-dynamic, var(--ad-card-default-bg));
    color: var(--card-fg-dynamic, var(--ad-card-default-fg));
    border-radius: 18px;
    border: 0;
    box-shadow: 0 6px 24px rgba(12, 20, 38, 0.42);
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    text-align: left;
    gap: 1.25rem;
    padding: 2.4rem 1.8rem;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    animation: cardRise 0.65s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 60ms);
}

.ads-card p {
    margin: 0;
    white-space: pre-line;
}

.ads-card__headline {
    font-size: clamp(0.75rem, 1.4vw, 0.95rem);
    color: inherit;
    opacity: 0.8;
}

.ads-card__body {
    font-size: clamp(1.2rem, 3.2vw, 1.9rem);
    font-weight: 600;
    line-height: 1.35;
}

.ads-card__body .ads-card__brand {
    display: inline-block;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    font-weight: 600;
    color: inherit;
}

.ads-card__body .ads-card__brand-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.ads-card__body .ads-card__brand-logo {
    width: 1.45em;
    height: 1.45em;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.12em;
    flex: 0 0 auto;
}

.ads-card::before,
.ads-card::after {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--card-fg-dynamic, var(--ad-card-default-fg));
    opacity: 0.6;
}

.ads-card::before {
    content: '“';
    top: 0.6rem;
    left: 1rem;
}

.ads-card::after {
    content: '”';
    bottom: 0.4rem;
    right: 1rem;
}

.ads-card__download-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.25);
    color: rgba(248, 250, 252, 0.96);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
    z-index: 2;
}

.ads-card__download-btn:hover,
.ads-card__download-btn:focus {
    background: rgba(15, 23, 42, 0.38);
    transform: translateY(-1px);
}

.ads-card__download-btn:disabled {
    opacity: 0.85;
    cursor: wait;
}

.ads-card__download-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.ads-card__download-icon svg {
    width: 100%;
    height: 100%;
}

.ads-card__download-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(248, 250, 252, 0.35);
    border-top-color: rgba(248, 250, 252, 1);
    animation: spinner 0.7s linear infinite;
}

.ads-card__download-btn.is-loading .ads-card__download-icon {
    display: none;
}

.ads-card__download-btn.is-loading .ads-card__download-spinner {
    display: inline-block;
}

.ads-card__download-menu {
    position: absolute;
    top: 3.1rem;
    right: 0.75rem;
    display: none;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.45rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
    z-index: 3;
    min-width: 150px;
}

.ads-card__download-menu.is-open {
    display: grid;
}

.ads-card__download-option {
    border: 0;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    text-align: left;
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.12);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

.ads-card__download-option:hover,
.ads-card__download-option:focus {
    background: rgba(99, 102, 241, 0.42);
    outline: none;
}

.ads-error {
    color: #b91c1c;
    font-weight: 600;
}

.ads-loading {
    color: var(--muted);
    font-style: italic;
}

.ad-preferences {
    margin-bottom: 2rem;
    gap: 1.5rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5ff 100%);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1.75rem 2rem;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.12);
}

.ad-preferences h3 {
    margin: 0;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.ad-preferences p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.alerts {
    margin: 2rem 0;
    display: grid;
    gap: 1rem;
}

.alert {
    background: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: #9a3412;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.alert-detail {
    font-size: 0.8rem;
    color: #7c2d12;
}

.fineprint {
    font-size: 0.8rem;
    color: var(--muted);
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 3rem 0;
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    background: rgba(15, 23, 42, 0.05);
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .feed-item {
        padding: 1rem;
    }

    .site-header {
        text-align: center;
    }

    .ads-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@keyframes cardRise {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.is-hidden {
    display: none !important;
}

/* Intro card redesign overrides */
.ad-preferences {
    margin: 2.5rem 0 2.75rem;
    display: grid;
    gap: 2rem;
    padding: 2.75rem 3rem;
    border-radius: 32px;
    position: relative;
}

.ad-preferences::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(155deg, rgba(99, 102, 241, 0.4), rgba(59, 130, 246, 0.25));
    opacity: 0.45;
}

.ad-preferences::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: calc(32px - 6px);
    background: linear-gradient(140deg, #ffffff 0%, #f5f8ff 40%, #eef4ff 100%);
    box-shadow: 0 38px 90px rgba(15, 23, 42, 0.18);
    z-index: 0;
}

.ad-preferences>* {
    position: relative;
    z-index: 1;
}

.ad-preferences h3 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    color: rgba(15, 23, 42, 0.92);
}

.ad-preferences p {
    margin: 0;
    color: rgba(51, 65, 85, 0.8);
    line-height: 1.7;
}

.ad-preferences .step-label + h3,
.ad-preferences .step-label + .ad-preferences__lead {
    margin-top: -1.25rem;
}

.ad-preferences__lead {
    margin-top: -0.35rem;
}

.ad-controls {
    margin: 0;
    display: grid;
    gap: 2rem;
    padding: 0;
}

.ad-controls__inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    width: 100%;
}

.ad-controls label {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.94rem;
    color: rgba(15, 23, 42, 0.78);
    flex: 1 1 280px;
}

.ad-controls input,
.ad-controls select {
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 20px;
    padding: 1rem 1.15rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 2px 10px rgba(15, 23, 42, 0.08), 0 26px 42px rgba(15, 23, 42, 0.12);
    transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ad-controls input::placeholder {
    color: rgba(99, 115, 134, 0.85);
}

.ad-controls input:focus,
.ad-controls select:focus {
    outline: none;
    transform: translateY(-2px) scale(1.01);
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: inset 0 2px 10px rgba(15, 23, 42, 0.08), 0 30px 52px rgba(37, 99, 235, 0.24);
}

.ad-controls__button-wrap {
    display: flex;
    align-items: flex-end;
    flex: 0 0 auto;
}

@media (max-width: 640px) {
    .ad-preferences {
        padding: 2rem 1.5rem;
        border-radius: 26px;
    }

    .ad-controls__inputs {
        gap: 1.1rem;
    }
}

/* Modern input/select styling */
.ad-controls input.ad-input,
.ad-controls select.ad-input {
    display: block;
    width: 100%;
    border: 1px solid rgba(120, 144, 180, 0.45);
    border-radius: 26px;
    padding: 1.05rem 1.5rem;
    font-size: 1.02rem;
    color: #0f172a;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 248, 255, 0.92));
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.18), inset 0 4px 10px rgba(255, 255, 255, 0.85);
    transition: border 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.ad-controls input.ad-input:focus,
.ad-controls select.ad-input:focus {
    outline: none;
    border-color: rgba(79, 70, 229, 0.7);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 32px 60px rgba(79, 70, 229, 0.26), inset 0 0 0 2px rgba(79, 70, 229, 0.37);
}

.ad-controls input.ad-input::placeholder {
    color: rgba(100, 116, 139, 0.8);
    font-size: 0.98rem;
}

.ad-controls select.ad-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-left: 3rem;
    padding-right: 3.5rem;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
        radial-gradient(circle, #16a34a 0, #16a34a 5px, transparent 6px),
        linear-gradient(45deg, transparent 50%, rgba(15, 23, 42, 0.55) 50%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.55) 50%, transparent 50%);
    background-repeat: no-repeat;
    background-size: 16px 12px, 12px 12px, 10px 8px, 10px 8px;
    background-position: right 1.4rem calc(50% - 4px), 1.8rem center, right 1.15rem calc(50% - 3px), right 1.15rem calc(50% + 3px);
}

.ad-controls select.ad-input::-ms-expand {
    display: none;
}

/* Feed item headline spacing overrides */
.feed-item__header {
    margin-bottom: 0.3rem;
}

.feed-item__title {
    margin: 0.35rem 0 0.1rem;
}

.feed-item__summary {
    margin: 0.15rem 0 0.8rem;
    line-height: 1.48;
}

.feed-item__actions {
    margin-top: 0.75rem;
}

select.ad-input option {
    padding: 0.65rem 1rem;
}

select.ad-input option:hover,
select.ad-input option:focus {
    background: rgba(59, 130, 246, 0.12);
}

.feed-filters {
    margin: 1.5rem 0 2.5rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    padding: 1.5rem 2rem;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
    position: sticky;
    top: 1rem;
    z-index: 20;
}

.feed-filters h4 {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    color: rgba(15, 23, 42, 0.82);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 255, 0.9);
    font-size: 0.92rem;
    color: rgba(15, 23, 42, 0.72);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-chip input {
    accent-color: #4f46e5;
}

.filter-chip:hover {
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.18);
}

.feed-item--filtered {
    display: none !important;
}

@media (max-width: 640px) {
    .feed-filters {
        padding: 1.25rem;
        top: 0.5rem;
    }
}

.filter-chip input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 6px;
    position: relative;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease;
}

.filter-chip input[type="checkbox"]:checked {
    border-color: rgba(220, 38, 38, 0.75);
    background: rgba(248, 113, 113, 0.15);
}

.filter-chip input[type="checkbox"]:checked::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    font-size: 12px;
    color: rgba(220, 38, 38, 0.9);
    font-weight: 600;
}

.filter-chip:first-child input[type="checkbox"]:checked {
    border-color: rgba(79, 70, 229, 0.55);
    background: rgba(99, 102, 241, 0.1);
}

.filter-chip:first-child input[type="checkbox"]:checked::after {
    content: '✓';
    color: rgba(79, 70, 229, 0.9);
}

.filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: rgba(15, 23, 42, 0.85);
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-toggle:hover {
    border-color: rgba(79, 70, 229, 0.38);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.filter-toggle__icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.filter-toggle.filter-toggle--collapsed .filter-toggle__icon {
    transform: rotate(-90deg);
}

.filter-controls.is-hidden {
    display: none;
}

@media (max-width: 640px) {
    .filter-controls {
        margin-top: 0.75rem;
    }
}

.feed-filters {
    margin: 2rem 0 2.5rem;
}

.filter-controls {
    margin-top: 1.25rem;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.4s ease;
}

.loading-overlay--hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 5px solid rgba(148, 163, 184, 0.35);
    border-top-color: rgba(79, 70, 229, 0.85);
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.feed-filters.is-hidden {
    display: none;
}

/* Reference-style top form controls */
.ad-preferences .ad-controls__inputs {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 1.2rem;
}

.ad-preferences .ad-controls__inputs label {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(71, 85, 105, 0.82);
    min-width: 0;
}

.ad-preferences .ad-controls__inputs input.ad-input,
.ad-preferences .ad-controls__inputs select.ad-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    min-height: 50px;
    border-radius: 999px;
    border: 2px solid #b9c7df;
    padding: 0.5rem 1rem;
    background: #d7deea;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1;
}

.ad-preferences .ad-controls__inputs input.ad-input::placeholder {
    color: rgba(15, 23, 42, 0.5);
}

.ad-preferences .ad-controls__inputs input.ad-input {
    background: #ffffff;
}

.ad-preferences .ad-controls__inputs select.ad-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    color: #0f172a;
    border-color: #8fa8d4;
    background-color: #ffffff;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M2 2l5 5 5-5' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
        linear-gradient(to right, rgba(79, 102, 244, 0.28), rgba(79, 102, 244, 0.28)),
        linear-gradient(180deg, #ffffff, #f7f9ff);
    background-repeat: no-repeat, no-repeat;
    background-size: 14px 9px, 1px 22px, 100% 100%;
    background-position:
        right 1.2rem center,
        right 2.5rem center,
        left top;
    box-shadow: 0 10px 24px rgba(79, 102, 244, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ad-preferences .ad-controls__inputs select.ad-input:hover {
    border-color: #6378ef;
    box-shadow: 0 14px 30px rgba(79, 102, 244, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.ad-preferences .ad-controls__inputs select.ad-input:disabled,
.ad-preferences .ad-controls__inputs input.ad-input:disabled {
    opacity: 1;
    color: rgba(15, 23, 42, 0.72);
    cursor: not-allowed;
}

.ad-preferences .ad-controls__inputs select.ad-input:disabled {
    background-color: #d7deea;
    color: rgba(100, 116, 139, 0.9);
}

.ad-preferences .ad-controls__inputs input.ad-input:focus,
.ad-preferences .ad-controls__inputs select.ad-input:focus {
    transform: none;
    border-color: #4f66f4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 0 4px rgba(79, 70, 229, 0.16), 0 16px 34px rgba(79, 102, 244, 0.18);
}

.ad-preferences .ad-controls__button-wrap {
    align-self: end;
}

.ad-preferences .ad-controls__button-wrap .button[data-get-headlines] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 50px;
    min-height: 50px;
    padding: 0 1.75rem;
    border-radius: 999px;
    border: 1px solid rgba(77, 100, 222, 0.35);
    background: linear-gradient(90deg, #4f66f4 0%, #6c84f2 100%);
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(79, 102, 244, 0.24);
    white-space: nowrap;
}

.ad-preferences .ad-controls__button-wrap .button[data-get-headlines]:hover,
.ad-preferences .ad-controls__button-wrap .button[data-get-headlines]:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(79, 102, 244, 0.3);
}

@media (max-width: 900px) {
    .ad-preferences .ad-controls__inputs {
        grid-template-columns: 1fr;
    }

    .ad-preferences .ad-controls__inputs label {
        width: 100%;
    }

    .ad-preferences .ad-controls__button-wrap {
        width: 100%;
    }

    .ad-preferences .ad-controls__button-wrap .button[data-get-headlines] {
        display: inline-flex;
        width: 100%;
        height: 50px;
        min-height: 50px;
    }

    .ad-preferences .ad-controls__inputs input.ad-input,
    .ad-preferences .ad-controls__inputs select.ad-input {
        height: 50px;
        min-height: 50px;
        font-size: 0.84rem;
    }
}

.ads-card.ads-card--exporting {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}
