.amp-table-posts {
    display: grid;
    gap: 0.25rem;
    margin: 10px auto;
    max-width: 768px !important;
}

.amp-table-post {
    display: flex;
    align-items: center;
    padding: 7px 12px; 
    border-radius: 16px;
    justify-content: space-between;
}

.amp-table-post.amp_banner img {
    width: 100%;
}

.amp-table-post-logo {
    flex: 0 0 25%;
    align-self: center;
}

.amp-table-post-logo a {
    display: flex;
}

.amp-table-post-logo img {
    width: 100%;
    height: inherit;
    object-fit: contain;
}

.amp-table-post-ratings {
    word-wrap: break-word;
    flex: 0 0 17%;
    text-align: center;
    margin: 0 10px;
}

.amp-table-post-ratings p {
    margin: 0 auto;
    text-align: center;
}

.amp-table-post-content .amp-table-post-heading,
.amp-table-post-content .amp-table-post-subheading {
    margin: 0 auto;
    text-align: center;
    padding: 0 6px;
    display: block;
}

.amp-table-post-button a {
    border-radius: 99px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    text-decoration: none;
}

.amp-table-posts.modern .amp-table-post-button a {
    border-radius: 5px;
}

/* App Downloads: one button per platform.
   Everything here is scoped under .amp_app_download (or the app-buttons
   wrapper, which only App Downloads emit) so regular Table Post buttons are
   untouched. */
/* App Download images use layout="responsive" on AMP, so they size from the
   container instead of needing a fixed, positioned parent. Repeated here for
   AMP setups that serve this stylesheet rather than the inline AMP CSS. */
.amp-table-post.amp_app_download .amp-table-post-logo amp-img,
.amp-table-post.amp_app_download .amp-table-post-banner amp-img {
    /* position: relative, never static. A layout="responsive" amp-img holds an
       absolutely positioned sizer and the real <img>; both need this element as
       their containing block. Made static, they escape to an outer ancestor and
       the image collapses to nothing. */
    position: relative;
    width: 100%;
    height: auto;
    margin: 0;
}

/* The generic mobile rule pins every logo to 75x40 with !important, which
   overrides the aspect ratio AMP derives from the width/height attributes and
   squeezes App Download logos. Same weight, higher specificity, so this wins. */
.amp-table-post.amp_app_download .amp-table-post-logo amp-img,
.amp-table-post.amp_app_download .amp-table-post-logo img {
    width: 100% !important;
    height: auto !important;
}

.amp-table-post-app-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    /* stretch, not center: when a label wraps on a narrow screen the two
       buttons stay the same height instead of sitting at different offsets. */
    align-items: stretch;
}

.amp-table-post-app-buttons .amp-table-post-button a {
    white-space: nowrap;
    box-sizing: border-box;
    width: 100%;
}

/* Logo layout: the buttons sit in the row beside the logo and heading, so a
   pair stacks vertically -- first button on top, second beneath it -- rather
   than competing with the text for horizontal space.
   align-items: stretch keeps both the same width as the wider label. */
.amp-table-post.amp_app_download.is-logo .amp-table-post-app-buttons {
    flex: 0 0 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
}

/* Banner layout: image on top, buttons centred beneath it.
   No background, padding or rounded corners here -- those belong to the boxed
   logo row, and applying them to a banner puts a visible panel behind an image
   that is meant to sit flush on the page. */
.amp-table-post.amp_app_download.is-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* A definite width, not shrink-to-fit. Everything inside is sized in
       percentages, and <amp-img> has no intrinsic size to anchor them the way a
       plain <img> does, so without this the whole banner resolves to zero width
       on AMP. */
    width: 100%;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
    background: none;
    padding: 0;
    border-radius: 0;
}

.amp-table-post.amp_app_download.is-banner .amp-table-post-banner a {
    display: block;
    width: 100%;
}

.amp-table-post.amp_app_download.is-banner .amp-table-post-banner {
    width: 100%;
}

.amp-table-post.amp_app_download.is-banner img {
    width: 100%;
}

.amp-table-post.amp_app_download.is-banner .amp-table-post-app-buttons {
    width: 100%;
    margin-top: 10px;
}

/* Two buttons share the banner width exactly, minus the gap between them.
   No min-width:0 here on purpose: a flex item may otherwise shrink below its
   own label, and with nowrap the text then spills outside the pill. Keeping the
   default min-width:auto means a narrow banner wraps the buttons onto two rows
   instead of overflowing them. */
.amp-table-post.amp_app_download.is-banner .amp-table-post-button {
    flex: 1 1 0;
}

/* A lone button takes half the banner width and stays centred, but grows when
   the label needs more room -- a 300px banner cannot fit "Download for Android"
   in 150px. */
.amp-table-post.amp_app_download.is-banner .amp-table-post-button:only-child {
    flex: 0 1 auto;
    min-width: 50%;
}

@media only screen and (max-width: 882px) {
    .amp-table-post {
        padding: 5px 8px; 
        border-radius: 12px;
    }

    .amp-table-post-button a {
        padding: 8px 10px;
    }

    .amp-table-posts.modern .amp-table-post-button a {
    border-radius: 12px;
}

    .amp-table-post-app-buttons {
        gap: 6px;
    }
}

@media only screen and (max-width: 767px) {
    .amp_pb .ap_r_1.ap-fl .col {
        max-width: 98%;
    }

    .amp-table-post-app-buttons .amp-table-post-button a {
        white-space: normal;
        text-align: center;
    }
}
/* Pagination. Anchors only -- no JS, so this renders identically on AMP. */
.amp-table-pagination {
    max-width: 768px;
    margin: 14px auto 0;
    text-align: center;
}

.amp-table-pagination-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.amp-table-pagination-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.amp-table-pagination-list a,
.amp-table-pagination-list span {
    display: block;
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
}

.amp-table-pagination-list a {
    background: #f0f3f7;
    color: #111;
    border: 1px solid #dfe4ea;
}

.amp-table-pagination-list a:hover,
.amp-table-pagination-list a:focus {
    background: #e2e8f0;
}

.amp-table-pagination-list .current span {
    background: #17d15f;
    color: #fff;
    border: 1px solid #17d15f;
    font-weight: 700;
}

.amp-table-pagination-list .gap {
    padding: 8px 4px;
    color: #777;
}

.amp-table-pagination-status {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
}

.amp-table-posts.modern + .amp-table-pagination .amp-table-pagination-list a,
.amp-table-posts.modern + .amp-table-pagination .amp-table-pagination-list span {
    border-radius: 5px;
}

@media only screen and (max-width: 528px) {
    .amp-table-pagination-list a,
    .amp-table-pagination-list span {
        min-width: 32px;
        padding: 7px 9px;
        font-size: 14px;
    }
}

/* amp_banner on AMP uses layout="responsive" with the image's real dimensions,
   so it must not be pinned to the fixed 768x90 (or mobile 360x45) box -- that
   is what squashed square and portrait banners. */
.amp-table-post.amp_banner .amp-table-post-banner {
    width: 100%;
}

.amp-table-post.amp_banner .amp-table-post-banner amp-img {
    position: relative;
    width: 100% !important;
    height: auto !important;
    margin: 0;
}
