/* thisai-readability-css */
/* ================= 1. Phones: one per row ================= */
@media (max-width: 689.98px) {
  :root { --thisai-list-thumb: clamp(128px, 40vw, 176px); }

  html body .thisai-day-grid,
  html body .thisai-shows-grid,
  html body.single-post .thisai-more-grid,
  html body .modern-cards .ct-query-template-grid,
  html body:is(.archive, .search) .entries[data-layout="grid"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  /* Day tabs + All Shows tiles */
  html body :is(.thisai-day-grid, .thisai-shows-grid) > a.thisai-row-card {
    display: grid !important;
    grid-template-columns: var(--thisai-list-thumb) minmax(0, 1fr);
    grid-auto-rows: min-content;
    column-gap: 12px;
    align-content: start;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(20,20,24,.1);
    border-radius: 12px;
  }
  html body :is(.thisai-day-grid, .thisai-shows-grid) > a.thisai-row-card > .thisai-row-thumb { grid-column: 1; grid-row: 1 / span 4; border-radius: 8px; }
  html body :is(.thisai-day-grid, .thisai-shows-grid) > a.thisai-row-card > :not(.thisai-row-thumb) { grid-column: 2; }
  html body :is(.thisai-day-grid, .thisai-shows-grid) > a.thisai-row-card > .thisai-row-title { margin-top: 2px; font-size: 16.5px; font-weight: 800; -webkit-line-clamp: 3; }

  /* "More episodes" on episode pages */
  html body.single-post .thisai-more-grid > a.thisai-more-card {
    display: grid !important;
    grid-template-columns: var(--thisai-list-thumb) minmax(0, 1fr);
    grid-auto-rows: min-content;
    column-gap: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(20,20,24,.1);
    border-radius: 12px;
  }
  html body.single-post .thisai-more-grid > a.thisai-more-card > .thisai-more-thumb { grid-column: 1; grid-row: 1 / span 3; border-radius: 8px; }
  html body.single-post .thisai-more-grid > a.thisai-more-card > :not(.thisai-more-thumb) { grid-column: 2; }
  html body.single-post .thisai-more-grid .thisai-more-title { margin-top: 2px; font-size: 16.5px !important; font-weight: 800 !important; }

  /* Older-episode pages (homepage page 2+): Blocksy cover cards */
  html body .modern-cards article.wp-block-post {
    display: grid !important;
    grid-template-columns: var(--thisai-list-thumb) minmax(0, 1fr);
    grid-auto-rows: min-content;
    column-gap: 12px;
    padding: 10px !important;
    background: #fff !important;
    border: 1px solid rgba(20,20,24,.1) !important;
    border-radius: 12px !important;
  }
  html body .modern-cards .wp-block-cover.ct-dynamic-cover { display: contents !important; }
  html body .modern-cards .wp-block-cover__image-background { grid-column: 1; grid-row: 1 / span 3; border-radius: 8px !important; }
  html body .modern-cards .wp-block-cover__inner-container { grid-column: 2; grid-row: 1; padding: 2px 0 0 !important; }
  html body .modern-cards h2.ct-dynamic-data { font-size: 16.5px !important; font-weight: 800 !important; }
  html body .modern-cards article.wp-block-post[data-channel]::after { grid-column: 2; grid-row: 2; margin-top: 4px; }
  html body .modern-cards article.wp-block-post::before { top: 16px !important; left: 16px !important; padding: 4px 8px !important; font-size: 9px !important; }

  /* Category, show and search pages */
  html body:is(.archive, .search) .entries > article.entry-card {
    display: grid !important;
    grid-template-columns: var(--thisai-list-thumb) minmax(0, 1fr);
    grid-auto-rows: min-content;
    column-gap: 12px;
    padding: 10px !important;
    background: #fff !important;
    border: 1px solid rgba(20,20,24,.1) !important;
    border-radius: 12px !important;
  }
  html body:is(.archive, .search) .entry-card > :is(.ct-media-container, .ct-image-container) { grid-column: 1; grid-row: 1 / span 3; margin: 0 !important; border-radius: 8px !important; overflow: hidden; }
  html body:is(.archive, .search) .entry-card > .entry-title { grid-column: 2; margin: 2px 0 0 !important; font-size: 16.5px !important; font-weight: 800 !important; }
  html body:is(.archive, .search) .entry-card > .entry-meta { grid-column: 2; }
}

/* ================= 2. "A+" text size ================= */
button.thisai-textsize {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  margin: 0 6px 0 0;
  padding: 0 10px;
  border: 1.5px solid rgba(20,20,24,.2);
  border-radius: 10px;
  background: #fff;
  color: #141418;
  font: 800 17px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
}
button.thisai-textsize[aria-pressed="true"] { background: #141418; border-color: #141418; color: #fff; }
button.thisai-textsize:focus-visible { outline: 2px solid var(--thisai-accent, #FF6B3D); outline-offset: 2px; }

/* Bigger text when switched on */
html.thisai-big body :is(.thisai-row-title, .thisai-more-title, .thisai-recent-title) { font-size: 19px !important; }
html.thisai-big body .modern-cards h2.ct-dynamic-data,
html.thisai-big body:is(.archive, .search) .entry-card .entry-title { font-size: 19px !important; }
html.thisai-big body :is(.thisai-row-date, .thisai-day-date, .thisai-more-date, .thisai-card-meta, .thisai-show-latest, .thisai-show-count),
html.thisai-big body .modern-cards .ct-dynamic-data:not(h2),
html.thisai-big body .modern-cards .ct-dynamic-data:not(h2) time,
html.thisai-big body:is(.archive, .search) .entry-card .meta-date,
html.thisai-big body:is(.archive, .search) .entry-card .meta-date * { font-size: 16px !important; }
html.thisai-big body .modern-cards article.wp-block-post[data-channel]::after { font-size: 13px !important; }
html.thisai-big body .thisai-days-label { font-size: 22px !important; }
html.thisai-big body .thisai-days-date { font-size: 14px !important; }
html.thisai-big body .thisai-older-en { font-size: 24px !important; }
html.thisai-big body a.thisai-chip { font-size: 17px !important; }
html.thisai-big body :is(.thisai-row-heading, .thisai-more-heading, .thisai-shows-heading) { font-size: 26px !important; }
html.thisai-big body :is(#header, #offcanvas) .ct-menu-link { font-size: 19px !important; }
html.thisai-big body.single-post :is(.entry-content p, .seo-content-block p, .seo-info-box p, .seo-info-box li) { font-size: 19px !important; line-height: 1.7 !important; }
html.thisai-big body.single-post .thisai-epnav-title { font-size: 17px !important; }
html.thisai-big body .rank-math-breadcrumb, html.thisai-big body .rank-math-breadcrumb * { font-size: 15px !important; }
html.thisai-big body :is(.thisai-follow, .thisai-watch-latest) { font-size: 17px !important; }
html.thisai-big body .page-content p, html.thisai-big body.page .entry-content p { font-size: 19px !important; }

/* ================= Footer links ================= */
html body #footer .thisai-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin: 0 !important;
  font-size: 0 !important;
}
html body #footer .thisai-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font: 600 14px/1 'Plus Jakarta Sans', system-ui, sans-serif !important;
  text-decoration: none !important;
}
html.thisai-big body #footer .thisai-footer-links a { font-size: 16px !important; }
@media (max-width: 689.98px) {
  html body #footer [data-column="widget-area-4"],
  html body #footer [data-column="widget-area-4"] .ct-widget { width: 100% !important; max-width: none !important; }
  html body #footer .thisai-footer-links {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
    width: 100%;
  }
  html body #footer .thisai-footer-links a {
    justify-content: center;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 12px;
    text-align: center;
    white-space: normal;
    font-size: 13.5px !important;
    line-height: 1.2 !important;
  }
  /* Odd number of links: the last one spans the full width */
  html body #footer .thisai-footer-links a:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
