/* ============================================================
   Synergy Nexuz articles: cards, podcast band and reader
   Shared by the Media page, the Restricted page and the Home summary.
   ============================================================ */
.report-block {
    padding: 10px 28px;
    margin-bottom: 6px;
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    font-family: 'Montserrat', Arial, sans-serif;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.3s ease;
}

.report-block:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.report-block .report-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: 0.2px;
    line-height: 1.3 !important;
    color: #242524 !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    align-self: flex-start;
    border: none !important;
    font-family: 'Montserrat', Arial, sans-serif;
}

.report-block .report-date {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    margin-bottom: 10px;
    display: block;
}

.report-block .report-summary {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 0 0 8px 0;
}

.report-takeaways {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    margin: 0 0 8px 0;
    width: 100%;
}

.report-takeaways summary {
    cursor: pointer;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 600;
    color: #1f3a93;
    padding: 2px 0;
}

.report-takeaways ul {
    margin: 6px 0 4px 0;
    padding-left: 20px;
    line-height: 1.55;
}

.report-takeaways li {
    margin-bottom: 4px;
    font-size: 14px !important;
    line-height: 1.55 !important;
}

.report-block .report-closing {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    font-style: italic;
    color: #555;
    margin: 0 0 12px 0;
}

.report-block .copy-btn {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #1f3a93 !important;
    border-color: #d0d0d0;
}

.report-block .copy-btn:hover {
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
}

.report-block {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    margin-bottom: 14px !important;
}

/* ---- Card layout with cover thumbnail ---- */
.report-block {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 24px;
    border-top: 3px solid #fcc00f !important;
}
.report-cover {
    flex: 0 0 140px;
    display: block;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(31, 58, 147, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    line-height: 0;
}
.report-cover:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(31, 58, 147, 0.2);
}
.report-cover img {
    width: 140px;
    height: auto;
    display: block;
}
.report-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.report-block .report-title {
    color: #1f3a93 !important;
}
.report-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.report-tag {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
}
.tag-tech { background: #e6ebf7; color: #1f3a93; }
.tag-finance { background: #fff3c4; color: #7a5800; }
.tag-mining { background: #d6f6f5; color: #005f5c; }
.tag-strategy { background: #ececec; color: #3d3d3d; }
.tag-health { background: #e2f4e6; color: #1d6b3a; }

/* ---- Podcast band ---- */
#podcast-band {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z M28 64 L28 97' fill='none' stroke='%23ffffff' stroke-opacity='.06'/%3E%3C/svg%3E"),
        radial-gradient(120% 140% at 85% 20%, rgba(0, 215, 210, 0.14) 0, rgba(0, 215, 210, 0) 45%),
        linear-gradient(135deg, #2a4bbd 0%, #1f3a93 100%);
    color: #ffffff;
    padding: 28px 0;
    margin: 10px 0 18px 0;
}
.podcast-band-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}
.podcast-band-icon {
    flex: 0 0 84px;
}
#podcast-band h2 {
    color: #ffffff !important;
    font-size: 20px;
    margin: 0 0 6px 0;
    padding: 0;
    border: none;
}
#podcast-band p {
    color: #ffffff;
    margin: 0 0 12px 0;
    text-align: left;
    line-height: 1.6;
}
.podcast-band-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.podcast-link, .podcast-link:visited {
    display: inline-block;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border: 1.5px solid #ffffff;
    border-radius: 6px;
    padding: 7px 16px;
}
.podcast-link:hover {
    background: #ffffff;
    color: #1f3a93;
}

@media (max-width: 700px) {
    .report-block {
        gap: 14px;
    }
    .report-cover {
        flex-basis: 78px;
    }
    .report-cover img {
        width: 78px;
    }
    /* Phone: icon and title side by side, text and links below */
    .podcast-band-inner {
        display: grid;
        grid-template-columns: 56px 1fr;
        grid-template-areas: "icon title" "text text" "links links";
        align-items: center;
        column-gap: 14px;
        row-gap: 12px;
    }
    .podcast-band-text {
        display: contents;
    }
    .podcast-band-icon {
        grid-area: icon;
        width: 56px;
        height: 56px;
    }
    #podcast-band h2 {
        grid-area: title;
        margin: 0;
        font-size: 18px;
        line-height: 1.3;
    }
    #podcast-band p {
        grid-area: text;
        margin: 0;
    }
    .podcast-band-links {
        grid-area: links;
        gap: 8px;
    }
    .podcast-link, .podcast-link:visited {
        font-size: 13px;
        padding: 6px 11px;
    }
}

.report-block, .report-block p, .report-block li, .report-block .report-title {
    text-align: left !important;
    hyphens: none;
}

.report-block .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    align-self: flex-start;
}

.report-block .btn {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    height: 38px;
    line-height: 38px;
    border-radius: 6px;
    border: 1px solid #ccc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    text-decoration: none;
    box-sizing: border-box;
    align-self: center;
    font-family: 'Open Sans', Arial, sans-serif;
    min-height: 38px;
}

.report-block .read-btn {
    background: linear-gradient(to bottom, #1a70ff, #0960fa);
    color: white !important;
    border-color: #0958e6;
}

.report-block .read-btn:hover {
    background: linear-gradient(to bottom, #0960fa, #084fd4);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(9, 96, 250, 0.3);
}

.report-block .listen-btn {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #111;
    border-color: #d0d0d0;
}

.report-block .listen-btn:hover {
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
}

.report-block .media-wrapper {
    display: none;
    margin-left: 0;
    background: #f8f8fa;
    border-radius: 8px;
    padding: 0 10px;
    height: 38px;
    box-sizing: border-box;
    align-self: center;
    position: relative;
    border: 2px solid #999595;
    box-shadow: 0 2px 10px rgba(153, 149, 149, 0.15);
    transition: all 0.35s ease;
    opacity: 0;
}

.report-block .media-wrapper.visible {
    display: inline-flex;
    opacity: 1;
}

.report-block .custom-player {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-grow: 1;
}

.report-block .js-audio-play-pause-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #0960fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 22px;
    font-weight: 700;
    padding: 0;
    line-height: 0.8;
    box-sizing: border-box;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
}

.report-block .js-audio-play-pause-btn:hover {
    background: rgba(9, 96, 250, 0.08);
    transform: scale(1.05);
}

.report-block .js-audio-play-pause-btn:active {
    transform: scale(0.92);
}

.report-block .js-audio-play-pause-btn.playing {
    color: #0960fa;
    background: transparent !important;
}

.report-block .js-audio-play-pause-btn.playing:hover {
    background: rgba(9, 96, 250, 0.12);
}

.report-block .js-audio-progress {
    width: 100px;
    height: 6px;
    background: #e0e2e6;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    flex-grow: 1;
    min-width: 60px;
}

.report-block .js-audio-progress-bar {
    height: 100%;
    background: #1f3a93;
    width: 0%;
    border-radius: 3px;
    position: relative;
    transition: width 0.1s linear;
}

.report-block .js-audio-progress-bar.playing {
    background: linear-gradient(90deg, #1f3a93, #daa106);
}

.report-block .js-audio-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 14px;
    height: 14px;
    background: #1f3a93;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(31, 58, 147, 0.3);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.report-block .js-audio-progress:hover .js-audio-progress-bar::after {
    opacity: 1;
}

.report-block .js-audio-progress-bar.playing::after {
    background: #daa106;
    box-shadow: 0 0 12px rgba(218, 161, 6, 0.35);
}

.report-block .js-audio-time-display {
    font-family: 'Montserrat', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    min-width: 90px;
    text-align: center;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.report-block .js-audio-speed-select {
    background: transparent;
    border: 1px solid #d0d2d6;
    border-radius: 4px;
    color: #555;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 4px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.25s ease;
    flex-shrink: 0;
}

.report-block .js-audio-speed-select:hover {
    border-color: #1f3a93;
}

.report-block .js-audio-speed-select:focus {
    border-color: #1f3a93;
    box-shadow: 0 0 0 2px rgba(31, 58, 147, 0.15);
}

.report-block .js-audio-speed-select option {
    background: #ffffff;
    color: #333;
}

#media-intro h1,
#media-intro h2 {
    font-size: 24px;
    font-weight: 800;
    margin-top: 0;
    padding-top: 0;
}

@media (max-width: 768px) {
    .report-block {
        padding: 18px 20px;
    }
    .report-block .report-title {
        font-size: 16px !important;
    }
    .report-block .btn {
        font-size: 13px;
        padding: 6px 14px;
        height: 34px;
        line-height: 34px;
        min-height: 34px;
    }
    .report-block .button-row {
        gap: 6px;
    }
    .report-block .media-wrapper {
        height: 34px;
        padding: 0 8px;
        border: 2px solid #999595;
        box-shadow: 0 2px 8px rgba(153, 149, 149, 0.12);
    }
    .report-block .js-audio-play-pause-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
        border: none;
        color: #0960fa;
        background: transparent !important;
        -webkit-appearance: none;
        appearance: none;
    }
    .report-block .js-audio-progress {
        width: 70px;
        height: 5px;
    }
    .report-block .js-audio-time-display {
        min-width: 75px;
        font-size: 12px;
    }
    .report-block .js-audio-speed-select {
        font-size: 10px;
        padding: 1px 3px;
    }
    .report-block .custom-player {
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .report-block {
        padding: 14px 16px;
    }
    .report-block .report-title {
        font-size: 15px !important;
    }
    .report-block .btn {
        font-size: 12px;
        padding: 5px 12px;
        height: 32px;
        line-height: 32px;
        min-height: 32px;
    }
    .report-block .media-wrapper {
        height: 32px;
        padding: 0 6px;
        margin-left: 0;
        border: 2px solid #999595;
        box-shadow: 0 1px 6px rgba(153, 149, 149, 0.1);
    }
    .report-block .js-audio-play-pause-btn {
        width: 28px;
        height: 28px;
        font-size: 15px;
        border: none;
        color: #0960fa;
        background: transparent !important;
        -webkit-appearance: none;
        appearance: none;
    }
    .report-block .js-audio-progress {
        width: 50px;
        height: 4px;
    }
    .report-block .js-audio-time-display {
        min-width: 60px;
        font-size: 10px;
        letter-spacing: 0.3px;
    }
    .report-block .js-audio-speed-select {
        font-size: 9px;
        padding: 1px 2px;
    }
    .report-block .custom-player {
        gap: 4px;
    }
}

/* ---- Article reader (PDF) ---- */
#snReader {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.sn-reader-panel {
    position: relative;
    animation: modalFadeIn 0.3s ease;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    /* Shrinks with the page on shorter screens, so the frame stays narrow */
    max-width: min(772px, calc((94vh - 48px) * 1.105 + 52px));
    height: 94vh;
    max-height: 1100px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sn-reader-pages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    background: #f4f5f8;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
/* A clear edge between the light frame and the scroll bar */
.sn-reader-pages::-webkit-scrollbar { width: 12px; }
.sn-reader-pages::-webkit-scrollbar-track { background: #e9ecf3; border-left: 1px solid #c3cbdd; }
.sn-reader-pages::-webkit-scrollbar-thumb { background: #a9b3c9; border-radius: 6px; border: 3px solid #e9ecf3; }
.sn-reader-pages::-webkit-scrollbar-thumb:hover { background: #8a96b1; }

.sn-reader-page {
    width: 100%;
    /* Never wider than 720px; on shorter screens narrow enough that the whole
       blue cover band (190 of 297 mm) fits in the reader without scrolling */
    max-width: min(720px, calc((94vh - 48px) * 1.105));
    margin: 0 auto 16px auto;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.sn-reader-page canvas {
    display: block;
    width: 100%;
    height: auto;
}
.sn-reader-status {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    color: #555;
    text-align: center;
    margin-top: 40px;
}
.sn-reader-close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 2;
    background: #ffffff;
    border: 1px solid #c8c8c8;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #767171;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 0;
}
.sn-reader-close:hover,
.sn-reader-close:focus {
    color: #0960fa;
    border-color: #999595;
}
/* Phones: one page at a time, below the site header (logo and menu stay
   visible and usable). The reader fills the space under the 62px header,
   sized so exactly one A4 page fits, and each page snaps into place. */
@media (max-width: 700px) {
    #snReader {
        z-index: 999;                 /* just under the sticky header (1000) */
        padding-top: 62px;            /* header height on phones */
    }
    .sn-reader-panel {
        --pad: 8px;
        /* Page width: the full width, or less on short screens so one whole
           A4 page (1 : 1.414) fits in the height under the header */
        --pw: min(calc(100vw - 24px - 2 * var(--pad)),
                  calc((100vh - 62px - 24px - 2 * var(--pad)) / 1.4142));
        width: calc(var(--pw) + 2 * var(--pad));
        max-width: none;
        height: calc(var(--pw) * 1.4142 + 2 * var(--pad));
        max-height: none;
        border-radius: 8px;
    }
    @supports (height: 100dvh) {
        .sn-reader-panel {
            --pw: min(calc(100vw - 24px - 2 * var(--pad)),
                      calc((100dvh - 62px - 24px - 2 * var(--pad)) / 1.4142));
        }
    }
    .sn-reader-pages {
        padding: var(--pad);
        scroll-snap-type: y mandatory;
        scroll-padding: var(--pad);
        overscroll-behavior: contain;
    }
    .sn-reader-page {
        width: var(--pw);
        max-width: var(--pw);
        margin: 0 auto calc(2 * var(--pad)) auto;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

/* ---- Compact cards on phones ---- */
.report-block .lbl-short { display: none; }
.report-block .btn { gap: 6px; }
@media (max-width: 700px) {
    .report-block .lbl-long { display: none; }
    .report-block .lbl-short { display: inline; }
    .report-block {
        display: grid !important;
        grid-template-columns: 64px 1fr;
        column-gap: 14px !important;
        row-gap: 0;
        align-items: start !important;
        padding: 16px !important;
    }
    .report-body { display: contents; }
    .report-cover { grid-column: 1; grid-row: 1 / span 3; flex: none; align-self: start; }
    .report-cover img { width: 64px; }
    .report-tags { grid-column: 2; grid-row: 1; margin-bottom: 4px; }
    .report-block .report-title { grid-column: 2; grid-row: 2; font-size: 15px !important; }
    .report-block .report-date { grid-column: 2; grid-row: 3; font-size: 12px; margin-bottom: 8px; }
    .report-takeaways,
    .report-block .report-closing,
    .report-block .button-row { grid-column: 1 / -1; }
    .report-block .report-closing { margin: 4px 0 10px 0; font-size: 13px; }
    .report-takeaways { margin-top: 8px; }
    .report-takeaways .report-summary { margin: 8px 0 6px 0; font-size: 14px; }
    .report-tag { font-size: 10px; padding: 2px 8px; }
    .report-block .button-row { flex-wrap: nowrap; gap: 6px; width: 100%; }
    .report-block .btn { padding: 6px 8px; flex: 1 1 0; min-width: 0; gap: 4px; white-space: nowrap; }
    .report-block .button-row:has(.js-audio-wrapper.visible) { flex-wrap: wrap; }
}

/* ---- Teal accents (logo colour) ---- */
.podcast-link:hover,
.podcast-link:focus {
    background: #00d7d2;
    border-color: #00d7d2;
    color: #1f3a93;
}
.report-block .js-audio-progress-bar,
.report-block .js-audio-progress-bar.playing {
    background: linear-gradient(90deg, #00a19c, #00d7d2);
}
