body {
    color: #222;
    background: white;
}

h1, h2, h3, h4, h5, h6 {
    color: #555;
}

/* --- Code, site wide ------------------------------------------------------
   Our Bootstrap build is purge-built, but `pre` and `code` survive the purge
   with defaults that are wrong here and have to be overridden:

     pre  { font-size: 13px; word-break: break-all; word-wrap: break-word; }
     code { color: #c7254e; background-color: #f9f2f4; }

   13px sits far below our 17px body copy, and `break-all` wraps commands, JSON,
   and file paths at an arbitrary character instead of scrolling, which mangles
   anything meant to be copied. The crimson is the highest-chroma color on any
   page that uses it and fights the brand orange.

   Show notes are the main consumer: ~82% of episodes use inline code and ~41%
   contain a fenced block. The docs and AI integration pages rely on this too.

   Colors mirror the home.css token values so code reads the same everywhere.
   No CodeMirror guard is needed: its own "reset styles the rest of the page
   might have set" block covers every property below at higher specificity and
   loads after this file. */

code, pre {
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

pre {
    font-size: 15px;
    line-height: 1.55;
    color: hsl(222, 25%, 14%);
    background: hsl(220, 27%, 96%);
    border: 1px solid hsla(222, 30%, 15%, 0.10);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 0 0 24px;
    /* Scroll a long line rather than breaking it mid-token. */
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
    overflow-x: auto;
}

pre code {
    font-size: inherit;
    line-height: inherit;
    white-space: inherit;
    word-break: normal;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
}

/* Inline code only. A quiet chip: this marks a value you would paste, not an
   error. `overflow-wrap` keeps long unbroken tokens (URLs, ~/Library/... paths)
   from forcing the page wider than a phone. */
:not(pre) > code {
    font-size: 0.9em;
    color: hsl(222, 25%, 14%);
    background: hsl(220, 27%, 96%);
    border: 1px solid hsla(222, 30%, 15%, 0.08);
    border-radius: 4px;
    padding: 2px 6px;
    overflow-wrap: anywhere;
}

/* Show notes routinely link a package by its name, e.g.
   [`django-debug-toolbar`](https://...), where the whole link text is code.
   Without this the chip keeps its own dark color and the link stops looking
   like a link. */
a code {
    color: inherit;
}

/* --- Syntax highlighting --------------------------------------------------
   markdown2 renders a fenced block through Pygments *only when the fence
   carries a language tag* (```python, ```json, ...). Those come out as
   <div class="codehilite"><pre><code><span class="k">..., and until now nothing
   styled the token classes, so they rendered monochrome. An untagged fence gets
   plain <pre><code> and is unaffected by anything below.

   Derived from Pygments' `xcode` style, then trimmed: tokens that resolve to
   plain black are dropped so they inherit the `pre` color above, and the
   generated `pre { line-height: 125% }`, the linenos rules, and the wrapper
   background are dropped because they would fight the site-wide code styling.
   `xcode` was chosen because every token used in the archive clears WCAG AA
   against our code surface (min 4.60:1); several better-known light themes,
   `friendly` included, drop well below 3:1.

   To regenerate:
       HtmlFormatter(style='xcode').get_style_defs('.codehilite')  */

/* Comments */
.codehilite .c,
.codehilite .ch,
.codehilite .cm,
.codehilite .cpf,
.codehilite .c1,
.codehilite .cs {
    color: #177500;
}

/* Preprocessor comments */
.codehilite .cp {
    color: #633820;
}

/* Keywords and builtins */
.codehilite .k,
.codehilite .kc,
.codehilite .kd,
.codehilite .kn,
.codehilite .kp,
.codehilite .kr,
.codehilite .kt,
.codehilite .nb {
    color: #a90d91;
}

/* Numbers */
.codehilite .l,
.codehilite .ld,
.codehilite .m,
.codehilite .mb,
.codehilite .mf,
.codehilite .mh,
.codehilite .mi,
.codehilite .mo,
.codehilite .il {
    color: #1c01ce;
}

/* Strings */
.codehilite .s,
.codehilite .sa,
.codehilite .sb,
.codehilite .dl,
.codehilite .sd,
.codehilite .s2,
.codehilite .se,
.codehilite .sh,
.codehilite .si,
.codehilite .sx,
.codehilite .sr,
.codehilite .s1,
.codehilite .ss {
    color: #c41a16;
}

/* Character literals */
.codehilite .sc {
    color: #2300ce;
}

/* Attribute names */
.codehilite .na {
    color: #836c28;
}

/* Class names */
.codehilite .nc {
    color: #3f6e75;
}

/* self / cls */
.codehilite .bp {
    color: #5b269a;
}

body.light-page {
    color: #222;
    background: #FFF;
}

.text-muted {
    color: #aaa;
}

.content-section-a,
.content-section-b {
    background: white;
    color: #222;
    /*border-top: 1px solid #DDD;*/
    border-top: none;
    border-bottom: none;
}

.content-section-b {
    background: white;
}

.content-section-a.action-links, .content-section-b.action-links {
    padding: 0;
}

footer, footer a {
    background: white;
    color: #777;
}

footer a:hover {
    color: black;
}

/*.banner .container .row {*/
/*text-align: center;*/
/*}*/

.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
    background-color: #f8f8f8;
}

table.kick td, table.kick td * {
    vertical-align: top;
}

.title-area {
    text-align: center;
}

.full-page-content {
    padding: 40px;
    margin-top: 1em;
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
    /*color: #ddd;*/
    font-size: 16px;
}

/* Wider than the 900px default so the media row (video + ad/actions) has room
   for the video to stand taller than the ad stack. */
.show-episode-page.full-page-content {
    max-width: 1170px;
}

.show-episode-page .right-bar {
    text-align: center;
}

.all-episodes-page .subscribe-buttons {
    background-color: transparent;
    border: none;
    margin-top: 30px;
    margin-bottom: 30px;
}

.all-episodes-page h1 {
    text-align: center;
}

.all-episodes-page table.episodes td {
    font-weight: 500;
}


@media (max-width: 800px) {
    .show-episode-page h1 {
        font-size: 28px;
    }

    .show-episode-page .published-date {
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .show-episode-page h1 {
        font-size: 24px;
    }

    .show-episode-page .published-date {
        font-size: 11px;
    }
}

@media (max-width: 500px) {
    .show-episode-page h1 {
        font-size: 20px;
    }

    .show-episode-page .published-date {
        font-size: 10px;
    }
}

.full-page-content .top {
    padding-left: 20px;
}

.show-side {
    text-align: center;
}

.guest {
    float: left;
    text-align: center;
    margin-right: 20px;
    margin-top: 10px;
}

.guests.singular .guest {
    padding-left: 60px;
}

.guest .guest-name {
    font-size: 18px;
    padding-top: 10px;

}

.guest .img {
    height: 150px;
}

.title {
    font-size: 24px;
}

.player {
    margin-top: 0px;
}

.home.player {
    float: left;
}

.player .btn {
    font-size: 16px;
    display: block;
    margin-top: 5px;
}

.player .btn.first {
    margin-top: 24px;
}

.host-image {
    height: 200px;
    margin-top: 40px;
    margin-bottom: 10px;
}

.host-image-area.about .host-image {
    margin-top: 0px;
}

.host-image-area.about {
    font-size: 18px;
}

.host-image-area {
    text-align: center;
    font-size: 24px;
}

/*.full-page-head {*/
/*margin-top: 51px;*/
/*background-size: cover;*/
/*height: 175px;*/
/*}*/
/*.full-page-head.contact {*/
/*background: url(/static/img/about-banner-short.png) no-repeat center center;*/
/*}*/

/*.contact .header-image {text-align: center;}*/
/*.contact .header-image img {*/
/*width: 700px;*/
/*margin-top: -10px;*/
/*}*/

.contact .contact-side img {
    width: 400px;
    margin-top: 20px;
}

.contact .main-text {
    font-size: 17px;
    text-align: left;
}

.friends h1 {
    text-align: center;
}

.friends .main-text {
    font-size: 17px;
    text-align: left;
}

.friends .twitter {
    font-size: 36px;
    margin-left: 100px;
}

.logo-image {
    height: 40px;
    margin-top: -10px;
}

/*a.light-access-link {*/
/*color: #5BC0DE;*/
/*}*/

.contact .contact-types {
    /*text-align: center;*/
    font-size: 20px;
    margin-left: 0px;
}

.contact .contact-types a {
    color: #51a2bf;
    display: inline-block;
    /*margin-right: 20px;*/
    padding: 5px;
}

.main-text {
    text-align: left;
}

.large-content-text {
    font-size: 17px;
}

.main-text,
.large-content-text {
    font-weight: 400;
}

.error-msg {
    color: #dd072c;
}

/* Login form only. The admin episode edit form (#episode-form) used to share the
   #account-login id purely to inherit these rules, and was listed here explicitly when
   it got its own id. It is styled by static/css/admin.css now - a fixed 500px/20px
   field is wrong for a HH:MM:SS box - and the id specificity here would have beaten
   every class rule in that file, so #episode-form is deliberately gone from both lists. */
#account-login input,
#account-login textarea {
    color: black;
    width: 500px;
    padding: 5px;
    font-size: 20px;
}

#account-login input,
#account-login button {
    margin-top: 10px;
}

.show-episode-page .download-coming {
    text-align: center;
}

.show-episode-page .guest-bio {
    text-align: left;
    font-weight: 300;
    padding-top: 20px;
    font-size: 15px;
}

.show-episode-page-placement.patreon-section {
    margin-top: 0px;
}

.home .player .btn {
    width: 300px;
}

.sponsor-area-show-page {
    text-align: center;
    font-size: inherit;
    margin-bottom: 10px;
    padding-right: 25px;
}

.sponsor-area-show-page.e2 {
    padding-right: 0px;
}

.error-content-section {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;

    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-top: 75px;
}

.error-content-section,
.error-content-section h1,
.error-content-section h2 {
    color: white;
}

.error-content-section img {
    height: 450px;
}

.patreon-section {
    font-weight: 300;
    line-height: 2em;
    width: 490px;
    /*text-align: center;*/
    margin: 50px auto 0px;
}

.patreon-section .text {
    margin-left: 0px;
}

.full-page-content.comments {
    padding-top: 5px;
    margin-top: 0px;
}

.transcript-main {
    line-height: 2.2em;
}

.transcript-main p {
    /*padding: 10px;*/
    /*padding-bottom: 20px;*/
    font-size: 16px;
}

.active-transcript-segment {
    background-color: lightblue;
    color: black;
}

.transcript-episode-page .filter-section {
    display: block;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
}

#transcript-player-top {
    position: fixed;
    height: 50px;
    top: 50px;
    width: 100%;
    z-index: 1000;
    padding-left: 10px;
    padding-right: 10px;
}

#transcript-player-top audio {
    width: 100%;
    height: 40px;
}

.highlight {
    background-color: #FF8;
    color: black;
}

#filter-msg {
    color: #777;
    font-size: 14px;
    padding: 20px;
    padding-bottom: 0px;
    text-align: center;
}

.fa-heart {
    color: red;
}

footer {
    font-weight: normal;
}

.copyright,
.made-with-love {
    line-height: 1.5em;
    letter-spacing: 2px;
}

.show-episode-page h1 {
    margin-bottom: 8px;
}

/* Show notes: same weight bump as the episodes list, plus breathing room
   between the markdown-generated list items. */
.show-episode-page .full_html_description {
    font-weight: 500;
    line-height: 1.65;
}

.show-episode-page .full_html_description li {
    margin-bottom: 7px;
}

.show-episode-page .full_html_description li > ul {
    margin-top: 7px;
}

/* Long unbroken code tokens in show notes used to need `overflow-wrap: anywhere`
   here, or they forced the whole page wider than small screens (breaking
   centering everywhere). That now lives in the site-wide inline-code rule at the
   top of this file, which covers show notes along with every other page. */

/* Everything below the media row (show notes, transcript, offerings) is one
   long column of prose, and the full container width is far past a comfortable
   measure. Cap it and center it; the title, player, video, and ad row above
   keep the full container width. */
.show-episode-page .show-main {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* Episode media row: video replay on the left; ad + compact action buttons on
   the right. On desktop the video sets the row height and the ad image scales
   to fill exactly the space above the buttons, so the column always matches
   the video height. Show notes go full width below. */
.episode-media-row {
    margin-bottom: 20px;
}

.episode-media-row .youtube-overlay-image,
.episode-media-row .youtube-overlay-image .youtube-image,
.episode-media-row .youtube-overlay-image .youtube-container,
.episode-media-row .youtube-overlay-image .text,
.episode-media-row .youtube-overlay-image .hover {
    width: 100%;
}

.episode-media-row .episode-buttons .btn {
    font-size: 14px;
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 8px auto 0;
    padding: 5px 10px;
}

.episode-media-row .sponsor-area-show-page {
    padding-right: 0;
    margin-bottom: 0;
}

/* Stacked (mobile/tablet): one consistent centered width for ad + buttons. */
.episode-media-row .sponsor-area-show-page img {
    width: 100%;
    max-width: 300px;
}

/* No video: one wide, short centered group - action buttons stacked on the
   left, a small ad on the right, vertically centered together. */
.episode-media-row.no-video .right-bar {
    float: none;
    width: auto;
}

.episode-media-row.no-video .show-side {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.episode-media-row.no-video .sponsor-area-show-page {
    order: 2;
    margin: 0;
    padding: 0;
}

.episode-media-row.no-video .sponsor-area-show-page img {
    max-width: 240px;
}

.episode-media-row.no-video .episode-buttons {
    order: 1;
}

.episode-media-row.no-video .episode-buttons .btn {
    display: block;
    width: 240px;
    max-width: none;
    margin: 8px 0 0;
}

@media (min-width: 992px) {
    .episode-media-row.has-video {
        display: flex;
        align-items: stretch;
    }

    .episode-media-row.has-video .right-bar .show-side {
        display: flex;
        flex-direction: column;
        height: 100%;
        /* The left column ends with the "Watch the live stream replay" caption;
           reserve that height so the buttons align with the video image bottom. */
        padding-bottom: 24px;
    }

    .episode-media-row.has-video .sponsor-area-show-page {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* The ad image is absolutely positioned inside a flex-growing box, so it
       contributes nothing to the column's intrinsic height. The video alone
       sets the row height; the ad then scales to fill the leftover space. */
    .episode-media-row.has-video #ad-first-slot,
    .episode-media-row.has-video #ad-second-slot {
        flex: 1 1 auto;
        min-height: 0;
        position: relative;
        width: 100%;
    }

    .episode-media-row.has-video #ad-first-slot a,
    .episode-media-row.has-video #ad-second-slot a {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .episode-media-row.has-video .sponsor-area-show-page img {
        max-height: 100%;
        max-width: 100%;
        width: auto;
        height: auto;
    }

    .episode-media-row.has-video .episode-buttons {
        margin-top: 4px;
    }
}

.published-date {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 20px;
}

.recorded-date {
    color: #999;
    font-weight: 200;
}

#global-livestream-message {
    display: block;
    text-align: center;
    padding: 8px;
    background-color: red;
    color: #FFFFFF;
    margin-top: 50px;
    margin-bottom: 0px;
    font-weight: normal;
    font-size: 24px;
    font-family: 'Outfit', "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: 1.2px;
}

#global-livestream-message div {
    display: inline-block;
    vertical-align: middle;
}

#global-livestream-message img {
    height: 100px;
    border-radius: 5px;
    vertical-align: middle;
}


#global-sponsor-message {
    display: block;;
    text-align: center;
    padding: 10px;
    background-color: #F2F2F2;
    /*border-top: 2px solid #CCC;*/
    color: black;
    margin-top: 50px;
    margin-bottom: -50px;
    font-weight: normal;
    font-size: 14px;
    letter-spacing: 2px;
}

#global-sponsor-message #name_text {
    color: white;
}

#global-sponsor-message .do {
    color: #026aff;
    font-weight: bold;
}

#ad-second-slot {
    margin-top: 1em;
}

.sponsor-area-show-page img {
    width: 252px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.extras-area-show-page .partner-slot img {
    border: 1px solid #333;
    border-radius: 5px;
}

.show-episode-page .partner-slot {
    margin-top: 10px;
}

.course-img {
    max-width: 350px;
    text-align: center;
    display: inline-block;
    padding: 8px;
    padding-top: 20px;
}

.course-img img {
    border-radius: 5px;
}

.course-img img.sm {
    /*width: 135px;*/
    height: 101px;
}

.episodes .date-text {
    white-space: nowrap;
}

.github-link a {
    /*color: white;*/
    font-size: 24px;
}

.well {
    background-color: #444;
    border: #353535;
}

.navbar-brand.image {
    vertical-align: middle;
}

.navbar-brand.name {
    font-size: 22px;
    font-weight: normal;
    letter-spacing: 1.1px;
}

.nav > li > a {
    font-size: 16px;
    padding-left: 10px;
    padding-right: 10px;
}

.logo-key {
    color: #f19128;
}

.logo-operator {
    color: black;
}

.logo-var {
    color: #000;
}

.navbar-default .navbar-brand {
    color: #aaa;
}

.navbar-default .navbar-brand:focus,
.navbar-default .navbar-brand:hover {
    color: black;
}

/* ************ SEARCH ************ */
.search_page input {
    display: inline-block;
    width: 350px;
    font-weight: bold;
    margin-right: 20px;
}

.search_page h1, .search_page h2 {
    text-align: center;
}

.search_page form {
    text-align: center;
    margin-top: 40px;
}

.search-results-summary {
    font-size: 14px;
    color: #8c8c8c;
}

.search-result {
    padding: 5px;
    margin: 5px;
}

/*.search-result .e_title a {*/
/*color: #fffd82;*/
/*}*/

.search-result .e_title {
    font-size: 16px;
}

.search-result .e_title i {
    color: red;
}

.search-result .e_date {
    color: gray;
    font-size: 12px;
    margin-left: 20px;
    font-weight: 400;
}

/* Search result topics list */
.search-result .e_topics {
    margin-top: 10px;
    margin-left: 20px;
}

.search-result .topics-list {
    margin: 8px 0;
    padding-left: 25px;
    list-style-type: decimal;
}

.search-result .topics-list li {
    margin: 4px 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.search-result .topics-list a {
    color: #337ab7; /* Bootstrap link color */
    text-decoration: none;
}

.search-result .topics-list a:hover {
    text-decoration: underline;
    color: #23527c;
}

/* Search term highlighting */
.search-highlight {
    background-color: #ffeb3b;
    padding: 2px 1px;
    border-radius: 2px;
}

/* Filter toggle container */
.filter-toggle-container {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* iOS-style toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 24px;
    margin: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #34c759; /* iOS green */
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px #34c759;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 14px;
    color: #666;
    user-select: none;
}

.search-result .e_desc {
    padding: 10px;
    padding-bottom: 0px;
    font-size: 16px;
    line-height: 1.5em;
    font-weight: normal;
    color: #8c8c8c;
}

@media (max-width: 600px) {
    .navbar-default .navbar-brand {
        font-size: 16px;
    }
}

#comment-button {
    width: 80%;
    background-color: #426082;
    color: white;
    cursor: pointer;
    padding: 15px;
    text-align: center;
    font-size: 20px;
    text-transform: uppercase;
}

.ethical {
    margin-top: 5px;
    font-style: italic;
    color: #999;
    font-size: 12px;
}


.patreon {
    margin-top: 10px;
}

/* The .admin-home block that used to live here styled the admin dashboard's episode
   list. That page now carries .admin-page and is styled by static/css/admin.css, which
   ships to admins only - these rules were dead weight in the public packed.css. */

/* Equal-width columns, not inline-blocks. The tiles used to size to their content, so a
   product label wider than the 200px min-width ("Cloud Server and AI Hosting") made its tile
   a few pixels wider than its neighbours, and with the whitespace between inline-block
   elements the last tile on that line missed by ~6px and dropped, leaving a hole in the grid. */
.sponsors .sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    align-items: start;
}

.friends .main-text.sponsors .sponsor {
    text-align: center;
    font-size: 14px;
}

.sponsors .sponsor {
    padding: 10px;
}

.sponsors .sponsor img {
    height: 150px;
    border: 1px solid gray;
}

.sponsor a.company {
    color: black;
    font-weight: bold;
}

.sponsor a.product {
    color: #444;
    font-weight: bold;
}


.CodeMirror, .editor-toolbar {
    margin-left: 10px;
    margin-right: -10px;
}

.editor-toolbar {
    opacity: 1.0;
    background-color: white;
}

.editor-toolbar:hover {
    opacity: 1.0;
}

.CodeMirror pre {
    font-size: 12px;
}

.CodeMirror-code {
    font-size: 12px;
}

.editor-toolbar {
    font-size: 14px;
}

.streaming-page h1 {
    text-align: center;
    margin-bottom: 20px;
}

.streaming.live {

}

.youtube-banner {
    font-size: 128px;
    display: block;
}

a.youtube-brand {
    color: #ff3737;
    font-weight: bold;
}

.streaming-page .cta-now {
    text-decoration: underline;
}

.streaming-page .active-now {
    color: #00b158;
}

.streaming-page .off-now {
    color: #ff3737;
}

.streaming-page .subtitle {
    text-align: center;

}

.streaming-page .subtitle > div {
    margin-bottom: 20px;
}

.streaming-page a.btn {
    color: white;
}

.streaming.off .subtitle {
    margin-top: 20px;
    font-size: .85em;
}

.streaming.off img {
    border-radius: 5px;
}

.live-stream-list .live-stream {
    font-family: monospace;
}

.live-stream-list .live-stream.past {
    color: #a7a7a7;
}


/* .redirect-modified-date and .redirect-count were removed with the admin redirect
   list's rewrite onto admin.css; nothing else referenced them, and site.css ships to
   every visitor in packed.css. .redirects below is still live in livestreams.pt. */

.redirects.main-text {
    font-weight: normal;
}


/* ******************* Start Youtube overlay image ******************** */
/* Main container */
.youtube-overlay-image {
    position: relative;
    width: 100%;
}

.youtube-overlay-image .youtube-container {
    text-align: center;
    width: 100%;
}

/* Original image */
.youtube-overlay-image .youtube-image {
    display: block;
    width: 560px;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.youtube-overlay-image .youtube-image,
#ad-first-slot {
    margin-top: 10px;
}

/* Original text overlay */
.youtube-overlay-image .normal .text {
    color: red;
    font-size: 48px;
}

.youtube-overlay-image .hover .text {
    color: white;
    font-size: 24px;
}

.youtube-overlay-image .text {
    color: red;
    line-height: 1.5em;
    text-shadow: 2px 2px 2px #000;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

/* New overlay on hover */
.youtube-overlay-image .hover {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    margin-top: 30px;
    transition: .5s ease;
    color: white;
}

/* New overlay appearance on hover */
.youtube-overlay-image:hover .hover {
    opacity: 1;
}

/* On screens that are 00px or less */
@media screen and (max-width: 800px) {
    .youtube-overlay-image {
        width: 400px;
    }

    .youtube-overlay-image .youtube-image {
        width: 400px;
    }

    .youtube-overlay-image .youtube-container {
        width: 400px;
    }

    .youtube-overlay-image .text {
        width: 400px;
    }

    .youtube-overlay-image .hover {
        width: 400px;
    }
}

/* On screens that are 500px or less */
@media screen and (max-width: 500px) {
    .youtube-overlay-image {
        width: 300px;
    }

    .youtube-overlay-image .youtube-image {
        width: 300px;
    }

    .youtube-overlay-image .youtube-container {
        width: 300px;
    }

    .youtube-overlay-image .text {
        width: 300px;
    }

    .youtube-overlay-image .hover {
        width: 300px;
    }
}

/* ******************* End Youtube overlay image ******************** */


.live-stream-subtitle {
    text-align: center;
    color: #555;
    font-size: .75em;
}


/* *********************** Subscribe in your player ******************* */
.subscribe-buttons {
    font-size: 10px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    color: black;
    padding-top: 0px;
    padding-bottom: 0px;
}

.subscribe-buttons a {
    display: inline-block;
    color: black;
    margin: 3px;
    text-align: center;
}

.subscribe-buttons img {
    margin-left: auto;
    margin-right: auto;
    padding-left: 2px;
    padding-right: 2px;

    width: 42px;
    display: block;
}

.subscribe-buttons .subscribe-cta {
    font-size: 1.5em;
    margin-top: 5px;
    font-weight: bold;
}


.show-episode-page .our-offerings h3 {
    font-size: 20px;
}

.full_html_description a {
    font-weight: bold;
}

.transcript-actions {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 10px;
}

.transcript-actions a {
    color: white;
}

.transcript-actions a.btn-default {
    color: black;
}


.caches-page .panel.panel-default {
    border: 1px solid #999;
    background-color: #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.caches-page .panel.panel-default .panel-body {
    padding: 25px;
}

.caches-page .panel.panel-default .panel-body .row {
    margin-bottom: 20px;
}

/* ============ EPISODE PLAYER ============ */
/* Custom audio player for episode show page (plan 016).
   Light-mode adaptation of Talk Python's .tp-player. No card surface —
   elements sit directly on the white page background. */

.pb-player {
    --pb-player-fg: #222;
    --pb-player-dim: #6e6e6e;
    --pb-player-caption: #555;
    --pb-player-track: rgba(0, 0, 0, 0.12);
    --pb-player-buffer: rgba(0, 0, 0, 0.22);
    --pb-player-fill: #f19128;
    --pb-player-thumb: #f19128;
    --pb-player-accent: #f19128;
    --pb-player-on-accent: #fff;
    --pb-player-pill-bg: rgba(0, 0, 0, 0.06);
    --pb-player-pill-bg-hover: rgba(0, 0, 0, 0.12);
    --pb-player-pill-fg: #222;
    --pb-player-skip: #6e6e6e;
    --pb-player-skip-hover: #222;
    --pb-player-focus-ring: rgba(241, 145, 40, 0.45);

    width: 100%;
    color: var(--pb-player-fg);
    margin-bottom: 32px;
}

.pb-player audio[controls] {
    display: block;
    width: 100%;
}

html.js .pb-player audio[controls] {
    display: none;
}

html:not(.js) .pb-player__ui,
html:not(.js) .pb-player__sub-row {
    display: none;
}

.pb-player__ui {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 0;
}

.pb-player__btn {
    background: transparent;
    border: 0;
    color: var(--pb-player-skip);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.pb-player__btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--pb-player-skip-hover);
}

.pb-player__btn:focus-visible {
    outline: 2px solid var(--pb-player-focus-ring);
    outline-offset: 2px;
}

.pb-player__btn--play {
    width: 72px;
    height: 72px;
    background-color: var(--pb-player-accent);
    color: var(--pb-player-on-accent);
    font-size: 1.75rem;
    flex-shrink: 0;
}

.pb-player__btn--play:hover {
    background-color: var(--pb-player-accent);
    color: var(--pb-player-on-accent);
    transform: scale(1.05);
}

.pb-player__btn--play .pb-player__icon-pause {
    display: none;
}

.pb-player.is-playing .pb-player__btn--play .pb-player__icon-play {
    display: none;
}

.pb-player.is-playing .pb-player__btn--play .pb-player__icon-pause {
    display: inline-block;
}

.pb-player__btn--back,
.pb-player__btn--fwd {
    width: 32px;
    height: 32px;
    font-size: 1.15rem;
    padding: 4px;
}

.pb-player__btn--back,
.pb-player__btn--fwd,
.pb-player__btn--speed {
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    transition: background-color 150ms ease,
                color 150ms ease,
                opacity 380ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pb-player.has-started .pb-player__btn--back,
.pb-player.has-started .pb-player__btn--fwd,
.pb-player.has-started .pb-player__btn--speed {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.pb-player.has-started .pb-player__btn--back  { transition-delay: 0ms; }
.pb-player.has-started .pb-player__btn--fwd   { transition-delay: 90ms; }
.pb-player.has-started .pb-player__btn--speed { transition-delay: 180ms; }

.pb-player__btn--speed {
    min-width: 64px;
    height: 40px;
    border-radius: 20px;
    background-color: var(--pb-player-pill-bg);
    color: var(--pb-player-pill-fg);
    font-weight: 600;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    padding: 0 14px;
    flex-shrink: 0;
}

.pb-player__btn--speed:hover {
    background-color: var(--pb-player-pill-bg-hover);
    color: var(--pb-player-pill-fg);
}

.pb-player__time {
    color: var(--pb-player-dim);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    min-width: 3.8em;
    text-align: center;
}

.pb-player__scrub {
    position: relative;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    touch-action: none;
    flex: 1;
    min-width: 0;
}

.pb-player__scrub::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background-color: var(--pb-player-track);
    border-radius: 3px;
}

.pb-player__scrub-buffer,
.pb-player__scrub-fill {
    position: absolute;
    left: 0;
    height: 6px;
    border-radius: 3px;
    pointer-events: none;
}

.pb-player__scrub-buffer {
    width: 0%;
    background-color: var(--pb-player-buffer);
}

.pb-player__scrub-fill {
    width: 0%;
    background-color: var(--pb-player-fill);
}

.pb-player__scrub-thumb {
    position: absolute;
    left: 0%;
    top: 50%;
    width: 18px;
    height: 18px;
    background-color: var(--pb-player-thumb);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 150ms ease;
    pointer-events: none;
}

.pb-player__scrub:hover .pb-player__scrub-thumb,
.pb-player__scrub:focus-visible .pb-player__scrub-thumb {
    transform: translate(-50%, -50%) scale(1);
}

.pb-player__scrub:focus-visible {
    outline: 2px solid var(--pb-player-focus-ring);
    outline-offset: 4px;
    border-radius: 2px;
}

.pb-player__sub-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    max-height: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    transition: max-height 250ms ease, min-height 250ms ease, padding 250ms ease;
}

.pb-player.has-started .pb-player__sub-row {
    max-height: 6em;
    min-height: 4.4em;
    padding: 4px 0 8px;
}

.pb-player__skip-controls {
    grid-column: 1;
    justify-self: start;
    width: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pb-player__caption {
    grid-column: 2;
    color: var(--pb-player-caption);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.45;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    opacity: 0;
    transition: opacity 200ms ease;
}

.pb-player__caption.is-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .pb-player__caption,
    .pb-player__scrub-thumb,
    .pb-player__btn,
    .pb-player__btn--play,
    .pb-player__btn--back,
    .pb-player__btn--fwd,
    .pb-player__btn--speed,
    .pb-player__sub-row {
        transition: none;
    }

    .pb-player__btn--play:hover {
        transform: none;
    }
}

@media (max-width: 600px) {
    .pb-player__ui {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "play scrub speed"
            "cur  dur   dur";
        gap: 8px 10px;
        padding: 8px 0;
    }

    .pb-player__btn--play  { grid-area: play; }
    .pb-player__scrub      { grid-area: scrub; }
    .pb-player__btn--speed { grid-area: speed; }
    .pb-player__time--cur  { grid-area: cur; text-align: left; }
    .pb-player__time--dur  { grid-area: dur; text-align: right; }

    /* Bigger touch targets on mobile so back/forward meet ~44pt HIG / 48dp Material guidance.
       Visual icon stays the same; padding expands the hit area. */
    .pb-player__btn--back,
    .pb-player__btn--fwd {
        width: 44px;
        height: 44px;
        padding: 8px;
    }

    .pb-player__skip-controls {
        width: 110px;
    }
}

/* ============ SUBSCRIBE BUTTON + DIALOG ============ */
/* Red Subscribe button in the right sidebar opens a modal containing the
   subscribe-in-players partial (Apple, Spotify, Overcast, etc.). */

.pb-subscribe-btn {
    background-color: #dd072c;
    color: #fff;
    border: 1px solid #b8061f;
    font-weight: 600;
    /* <button> with display: block (inherited from .player .btn) still keeps
       intrinsic content-width unless we force it. The sibling <a> buttons
       fill the column naturally because <a> has no intrinsic width. */
    width: 100%;
}

.pb-subscribe-btn:hover,
.pb-subscribe-btn:focus {
    background-color: #b8061f;
    color: #fff;
    border-color: #8a0418;
}

.pb-subscribe-btn:focus-visible {
    outline: 2px solid rgba(221, 7, 44, 0.45);
    outline-offset: 2px;
}

.pb-subscribe-btn .fa-podcast {
    margin-right: 4px;
}

.pb-subscribe-dialog {
    border: 0;
    border-radius: 12px;
    padding: 0;
    max-width: 920px;
    width: calc(100% - 32px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    background: #fff;
    color: #222;
}

.pb-subscribe-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.pb-subscribe-dialog__inner {
    position: relative;
    padding: 36px 40px 28px;
}

.pb-subscribe-dialog__title {
    margin: 0 0 16px;
    font-size: 2rem;
    font-weight: 600;
    color: #222;
    text-align: center;
    padding-right: 40px; /* keep title clear of the close button */
}

.pb-subscribe-dialog__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #777;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 150ms ease, color 150ms ease;
}

.pb-subscribe-dialog__close:hover,
.pb-subscribe-dialog__close:focus {
    background-color: rgba(0, 0, 0, 0.06);
    color: #222;
}

.pb-subscribe-dialog__close:focus-visible {
    outline: 2px solid rgba(241, 145, 40, 0.45);
    outline-offset: 2px;
}

/* Bump the icon size and label text inside the dialog vs the page-listing
   default so the modal feels intentional, not crammed. With max-width: 920px
   all 8 platform icons fit in a single row on desktop. */
.pb-subscribe-dialog .subscribe-buttons {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 8px;
    white-space: nowrap;
}

.pb-subscribe-dialog .subscribe-buttons a {
    margin: 4px 6px;
    vertical-align: top;
}

.pb-subscribe-dialog .subscribe-buttons img {
    width: 72px;
}

.pb-subscribe-dialog .subscribe-buttons .subscribe-cta {
    font-size: 1.4rem;
    margin-top: 16px;
    white-space: normal;
}

@media (max-width: 880px) {
    /* Below ~880px, allow icons to wrap rather than horizontally scroll. */
    .pb-subscribe-dialog .subscribe-buttons {
        white-space: normal;
    }
}