/*
 * Dispense Times editorial redesign layer.
 * Visual system only: no template, grid-column, vendor width, or integration changes.
 */

:root {
    --dt-r-ink: #091827;
    --dt-r-navy: #102b49;
    --dt-r-navy-2: #16395f;
    --dt-r-red: #c92f43;
    --dt-r-red-bright: #ee5668;
    --dt-r-paper: #f4f1eb;
    --dt-r-paper-2: #ebe6dd;
    --dt-r-white: #ffffff;
    --dt-r-copy: #253342;
    --dt-r-muted: #596675;
    --dt-r-line: rgba(9, 24, 39, 0.14);
    --dt-r-line-light: rgba(255, 255, 255, 0.16);
    --dt-r-radius-sm: 8px;
    --dt-r-radius: 16px;
    --dt-r-radius-lg: 24px;
    --dt-r-shadow-sm: 0 8px 22px rgba(9, 24, 39, 0.08);
    --dt-r-shadow: 0 18px 48px rgba(9, 24, 39, 0.13);
    --dt-r-shadow-deep: 0 30px 80px rgba(3, 14, 25, 0.32);
    --dt-r-serif: Georgia, "Times New Roman", serif;
    --dt-r-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Base publication canvas */
body {
    background: var(--dt-r-paper);
    color: var(--dt-r-copy);
    font-family: var(--dt-r-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--dt-r-red);
    color: var(--dt-r-white);
}

a {
    text-underline-offset: 0.2em;
}

/* Masthead: stronger identity and clearer navigation */
.dt-masthead,
.dt-shell-header {
    background:
        radial-gradient(circle at 82% -40%, rgba(92, 169, 218, 0.18), transparent 42%),
        linear-gradient(135deg, #0b1d31 0%, #122f50 100%);
    border-bottom: 1px solid var(--dt-r-line-light);
    box-shadow: 0 14px 44px rgba(3, 14, 25, 0.2);
}

.dt-brand__name {
    color: var(--dt-r-white);
    font-family: var(--dt-r-serif);
    font-weight: 700;
    letter-spacing: -0.025em;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.dt-brand__tagline {
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.18em;
}

.dt-shell-header__utility a,
.dt-shell-header nav a,
.dt-masthead nav a {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 650;
    letter-spacing: 0.035em;
    text-decoration: none;
}

.dt-shell-header__utility a:hover,
.dt-shell-header nav a:hover,
.dt-masthead nav a:hover {
    color: #ffffff;
    text-decoration-color: var(--dt-r-red-bright);
}

/* Hero system */
.dt-home .dt-hero,
.dt-article-hero,
.dt-advertise-hero,
.dt-about-hero,
.dt-archive-hero,
.dt-magazine-hero,
.dt-vendor-hero,
.dt-category-hero,
.dt-podcast-hero,
.dt-partner-hero {
    background:
        radial-gradient(circle at 82% 8%, rgba(94, 180, 230, 0.16), transparent 34%),
        linear-gradient(135deg, #0b1e33 0%, #112f50 58%, #0a1b2e 100%);
    color: var(--dt-r-white);
    border-bottom: 1px solid rgba(238, 86, 104, 0.22);
}

.dt-home .dt-hero h1,
.dt-article-hero h1,
.dt-advertise-hero h1,
.dt-about-hero h1,
.dt-archive-hero h1,
.dt-magazine-hero h1,
.dt-vendor-hero h1,
.dt-category-hero h1,
.dt-podcast-hero h1,
.dt-partner-hero h1 {
    color: var(--dt-r-white);
    font-family: var(--dt-r-serif);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 0.98;
    text-wrap: balance;
    text-shadow: 0 16px 44px rgba(2, 11, 20, 0.32);
}

.dt-home .dt-hero .dt-kicker,
.dt-home .dt-hero .dt-hero__category,
.dt-article-hero .dt-kicker,
.dt-advertise-hero .dt-kicker,
.dt-about-hero .dt-kicker,
.dt-archive-hero .dt-kicker,
.dt-magazine-hero .dt-kicker,
.dt-vendor-hero .dt-kicker,
.dt-category-hero .dt-kicker {
    color: #ff7180;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.dt-home .dt-hero-image,
.dt-article-featured-media,
.dt-magazine-hero__cover,
.dt-issue-hero-cover,
.dt-vendor-hero__card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--dt-r-radius);
    box-shadow: var(--dt-r-shadow-deep);
}

.dt-home .dt-hero-image img,
.dt-article-featured-media img,
.dt-magazine-hero__cover img,
.dt-issue-hero-cover img {
    filter: saturate(1.05) contrast(1.035);
}

/* Section hierarchy */
.dt-section,
.dt-section--compact,
.dt-section-front,
.dt-partner-section,
.dt-intel-section,
.dt-team-section {
    border-color: var(--dt-r-line);
}

.dt-section-head,
.dt-about-section-head,
.dt-advertise-section-head,
.dt-intel-section-head,
.dt-team-section__head,
.dt-issue-archive__head,
.dt-section-latest__head {
    border-bottom-color: var(--dt-r-line);
}

.dt-section-head h2,
.dt-about-section-head h2,
.dt-advertise-section-head h2,
.dt-intel-section-head h2,
.dt-team-section__head h2,
.dt-issue-archive__head h2,
.dt-section-latest__head h2,
.dt-magazine h2,
.dt-partner h2,
.dt-newsletter h2 {
    color: var(--dt-r-ink);
    font-family: var(--dt-r-serif);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.05;
    text-wrap: balance;
}

.dt-editorial-section-label,
.dt-about-section-label,
.dt-section-head > p:first-child,
.dt-section-head > span:first-child {
    color: var(--dt-r-red);
    font-weight: 850;
    letter-spacing: 0.16em;
}

/* Editorial cards */
.dt-feature-grid .dt-story,
.dt-feature-grid .dt-list-media,
.dt-article-card,
.dt-related-stories article,
.dt-magazine .dt-issue-card,
.dt-issue-grid .dt-issue-card,
.dt-advertise-option,
.dt-advertise-pathways article,
.dt-about-coverage article,
.dt-partner-resource-grid article,
.dt-podcast-hero__card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(9, 24, 39, 0.11);
    border-radius: var(--dt-r-radius);
    box-shadow: var(--dt-r-shadow-sm);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.dt-feature-grid .dt-story:hover,
.dt-feature-grid .dt-list-media:hover,
.dt-article-card:hover,
.dt-related-stories article:hover,
.dt-magazine .dt-issue-card:hover,
.dt-issue-grid .dt-issue-card:hover,
.dt-advertise-option:hover,
.dt-advertise-pathways article:hover,
.dt-about-coverage article:hover,
.dt-partner-resource-grid article:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 47, 67, 0.34);
    box-shadow: var(--dt-r-shadow);
}

.dt-feature-grid .dt-story h2,
.dt-feature-grid .dt-story h3,
.dt-feature-grid .dt-list-media h2,
.dt-feature-grid .dt-list-media h3,
.dt-article-card h2,
.dt-article-card h3,
.dt-related-stories h2,
.dt-related-stories h3,
.dt-issue-card h2,
.dt-issue-card h3 {
    color: var(--dt-r-ink);
    font-family: var(--dt-r-serif);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.dt-story-media,
.dt-article-card__media,
.dt-issue-card__cover {
    overflow: hidden;
    border-radius: calc(var(--dt-r-radius) - 5px);
}

.dt-feature-grid img,
.dt-article-card__media img,
.dt-issue-card__cover img {
    transition: transform 320ms ease, filter 320ms ease;
}

.dt-feature-grid a:hover img,
.dt-article-card:hover img,
.dt-issue-card:hover img {
    transform: scale(1.025);
    filter: saturate(1.06) contrast(1.02);
}

/* Signals and promotional bands */
.dt-signals,
.dt-signal-board,
.dt-insiders-promo,
.dt-partner,
.dt-site-newsletter,
.dt-newsletter-shell,
.dt-magazine-advertise,
.dt-partner-cta {
    background:
        radial-gradient(circle at 85% 0%, rgba(94, 180, 230, 0.12), transparent 38%),
        var(--dt-r-navy);
    color: var(--dt-r-white);
    border-color: var(--dt-r-line-light);
}

.dt-signals h2,
.dt-signal-board h2,
.dt-insiders-promo h2,
.dt-partner h2,
.dt-site-newsletter h2,
.dt-newsletter-shell h2,
.dt-magazine-advertise h2,
.dt-partner-cta h2 {
    color: var(--dt-r-white);
}

.dt-signal-row,
.dt-signal-strip {
    border-color: rgba(255, 255, 255, 0.14);
}

.dt-home-inline-sponsor,
.dt-article-sponsor,
.dt-article-rail,
.dt-archive-sponsor,
.dt-magazine-sponsor-note,
.dt-marketplace-sponsor-zone {
    border: 1px solid rgba(201, 47, 67, 0.24);
    border-left: 4px solid var(--dt-r-red);
    border-radius: var(--dt-r-radius-sm);
    box-shadow: var(--dt-r-shadow-sm);
}

/* Buttons and text links */
.dt-button,
.wp-block-button .wp-block-button__link,
.dt-rx-button,
.dt-resource-action-card__button,
button[type="submit"],
input[type="submit"] {
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--dt-r-radius-sm);
    background: linear-gradient(135deg, #b92237 0%, #df4053 100%);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.045em;
    box-shadow: 0 12px 30px rgba(169, 26, 48, 0.27);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.dt-button:hover,
.wp-block-button .wp-block-button__link:hover,
.dt-rx-button:hover,
.dt-resource-action-card__button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ca2d42 0%, #ed5567 100%);
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(169, 26, 48, 0.34);
}

.dt-button--ghost,
.dt-button--ghost-light,
.dt-button--ink,
.dt-button--secondary,
.dt-button-secondary,
.dt-rx-button--ghost,
.dt-rx-button--text {
    background: transparent;
    box-shadow: none;
}

.dt-read-link {
    color: var(--dt-r-red);
    font-weight: 800;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(201, 47, 67, 0.42);
}

/* Article reading experience */
.dt-article-content,
.dt-page-body,
.dt-page-article {
    color: var(--dt-r-copy);
}

.dt-article-content h2,
.dt-article-content h3,
.dt-page-body h2,
.dt-page-body h3,
.dt-page-article h2,
.dt-page-article h3 {
    color: var(--dt-r-ink);
    font-family: var(--dt-r-serif);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
}

.dt-article-content p,
.dt-page-body p,
.dt-page-article p {
    line-height: 1.76;
}

.dt-article-content blockquote,
.dt-page-body blockquote,
.dt-page-article blockquote {
    margin-inline: 0;
    padding: 1.25em 1.4em;
    border-left: 5px solid var(--dt-r-red);
    background: rgba(255, 255, 255, 0.72);
    color: var(--dt-r-ink);
    font-family: var(--dt-r-serif);
    font-size: 1.12em;
    box-shadow: var(--dt-r-shadow-sm);
}

.dt-article-topics a,
.dt-share a,
.dt-share button {
    min-height: 44px;
    border-radius: 999px;
}

/* Marketplace styling without changing any grid or card geometry */
.dt-vendor-card,
.dt-vendor-profile-main,
.dt-vendor-profile-rail {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(9, 24, 39, 0.12);
    border-radius: var(--dt-r-radius);
    box-shadow: var(--dt-r-shadow-sm);
}

.dt-vendor-card:hover {
    border-color: rgba(201, 47, 67, 0.3);
    box-shadow: var(--dt-r-shadow);
}

.dt-vendor-logo,
.dt-vendor-logo--home {
    background: #ffffff;
    border-color: rgba(9, 24, 39, 0.1);
    border-radius: 12px;
}

.dt-vendor-card h2,
.dt-vendor-card h3,
.dt-vendor-profile h1,
.dt-vendor-profile h2 {
    color: var(--dt-r-ink);
    font-family: var(--dt-r-serif);
}

/* Forms */
.dt-conversion-form,
.dt-newsletter-form,
.dt-rx-form,
.fluentform {
    --dt-form-border: rgba(9, 24, 39, 0.22);
}

.dt-conversion-form input:not([type="checkbox"]):not([type="radio"]),
.dt-conversion-form select,
.dt-conversion-form textarea,
.dt-newsletter-form input:not([type="checkbox"]):not([type="radio"]),
.dt-rx-form input:not([type="checkbox"]):not([type="radio"]),
.dt-rx-form select,
.dt-rx-form textarea,
.fluentform input:not([type="checkbox"]):not([type="radio"]),
.fluentform select,
.fluentform textarea {
    min-height: 48px;
    border: 1px solid var(--dt-form-border);
    border-radius: var(--dt-r-radius-sm);
    background: #ffffff;
    color: var(--dt-r-ink);
    box-shadow: inset 0 1px 2px rgba(9, 24, 39, 0.04);
}

.dt-conversion-form input:focus,
.dt-conversion-form select:focus,
.dt-conversion-form textarea:focus,
.dt-newsletter-form input:focus,
.dt-rx-form input:focus,
.dt-rx-form select:focus,
.dt-rx-form textarea:focus,
.fluentform input:focus,
.fluentform select:focus,
.fluentform textarea:focus {
    border-color: #22679e;
    outline: 3px solid rgba(34, 103, 158, 0.22);
    outline-offset: 1px;
}

/* Footer */
.dt-shell-footer {
    background:
        radial-gradient(circle at 10% 0%, rgba(94, 180, 230, 0.11), transparent 30%),
        #07131f;
    color: rgba(255, 255, 255, 0.78);
    border-top: 4px solid var(--dt-r-red);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dt-shell-footer h2,
.dt-shell-footer h3,
.dt-shell-footer__brand {
    color: #ffffff;
    font-family: var(--dt-r-serif);
}

.dt-shell-footer a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration-color: rgba(238, 86, 104, 0.42);
}

.dt-shell-footer a:hover {
    color: #ffffff;
    text-decoration-color: var(--dt-r-red-bright);
}

/* WCAG-visible focus */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #67b8ec;
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(9, 24, 39, 0.72);
}

@media (max-width: 768px) {
    .dt-home .dt-hero__content h1 {
        max-width: 100% !important;
        font-size: clamp(2.15rem, 10vw, 2.7rem) !important;
        line-height: 1 !important;
    }

    .dt-home .dt-hero__content h1,
    .dt-home .dt-hero h1,
    .dt-article-hero h1,
    .dt-advertise-hero h1,
    .dt-about-hero h1,
    .dt-archive-hero h1,
    .dt-magazine-hero h1,
    .dt-vendor-hero h1,
    .dt-category-hero h1,
    .dt-podcast-hero h1,
    .dt-partner-hero h1 {
        font-size: clamp(2.15rem, 10vw, 2.7rem);
        line-height: 1.02;
    }

    .dt-feature-grid .dt-story,
    .dt-feature-grid .dt-list-media,
    .dt-article-card,
    .dt-related-stories article,
    .dt-magazine .dt-issue-card,
    .dt-issue-grid .dt-issue-card,
    .dt-advertise-option,
    .dt-advertise-pathways article,
    .dt-about-coverage article,
    .dt-vendor-card {
        border-radius: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dt-button,
    .wp-block-button .wp-block-button__link,
    .dt-rx-button,
    .dt-resource-action-card__button,
    .dt-feature-grid .dt-story,
    .dt-feature-grid .dt-list-media,
    .dt-article-card,
    .dt-related-stories article,
    .dt-issue-card,
    .dt-advertise-option,
    .dt-advertise-pathways article,
    .dt-about-coverage article,
    .dt-feature-grid img,
    .dt-article-card__media img,
    .dt-issue-card__cover img {
        transition: none;
        transform: none;
    }
}
