/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Enhanced GeneratePress child theme — PSTET v6.5 — Flat UI + Speed + Engagement + Trending Tags
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      6.5.2
*/

/* ===== CSS VARIABLES — PSTET v6.4 (App UI + Dynamic) ===== */
:root {
    /* Colors — synced via pstet_dynamic_css_vars() in functions.php */
    --hdr: #1e3769;
    --hdr-d: #162b52;
    --primary: #1e73be;
    --primary-d: #1a5fa0;
    --link: #1e73be;
    --gold: #f0ad4e;
    --green: #28a745;
    --green-s: #e8f5e9;
    --red: #dc3545;
    --red-s: #fde8ea;
    --purple: #6f42c1;
    --cyan: #17a2b8;
    --orange: #fd7e14;
    --txt: #222;
    --txt2: #555;
    --txt3: #888;
    --meta: #999;
    --bg: #f0f2f5;
    --card: #fff;
    --bdr: #e0e0e0;
    --bdr-l: #f0f0f0;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Border radii — flat/sharp design */
    --r: 0;
    --r-sm: 0;
    --r-lg: 0;
    --r-xl: 0;
    --r-full: 0;

    /* Layout */
    --max: 1000px;
    --art-max: 1000px;
    --content-w: 7fr;
    --sidebar-w: 3fr;
    --hdr-h: 48px;
    --bnav-h: 56px;

    /* Elevation shadows (Material-style) */
    --sh-1: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --sh-2: 0 2px 6px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
    --sh-3: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.04);
    --sh-4: 0 8px 24px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.04);

    /* Timing */
    --ease: cubic-bezier(.25, .46, .45, .94);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ===== GLOBAL RESETS ===== */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--hdr-h) + 8px);
    touch-action: manipulation;
}

body {
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

body.has-bnav {
    padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom));
}

::selection {
    background: var(--primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 0;
}

/* ===== ANIMATIONS (GPU-optimized) ===== */
@keyframes shimmer {
    0% { background-position: -500px 0; }
    100% { background-position: 500px 0; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

@keyframes tick {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes bellRing {
    0% { transform: rotate(0); }
    15% { transform: rotate(12deg); }
    30% { transform: rotate(-10deg); }
    45% { transform: rotate(6deg); }
    60% { transform: rotate(-3deg); }
    100% { transform: rotate(0); }
}

/* Skeleton Loading */
.sk {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 37%, #e8e8e8 63%);
    background-size: 1000px 100%;
    animation: shimmer 2s ease-in-out infinite;
    border-radius: var(--r-sm);
}

.sk-line {
    height: 11px;
    margin-bottom: 4px;
    border-radius: 0;
}

.sk-title {
    height: 15px;
    margin-bottom: 6px;
    border-radius: 0;
}

.has-sk {
    position: relative;
    background: #eee;
    border-radius: var(--r);
    overflow: hidden;
}

.has-sk::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 37%, #e8e8e8 63%);
    background-size: 1000px 100%;
    animation: shimmer 2s ease-in-out infinite;
}

.has-sk img {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity .3s var(--ease);
}

.has-sk img.loaded,
.has-sk.loaded img {
    opacity: 1;
}

.anim {
    animation: fadeUp .3s var(--ease-out) both;
}

.anim:nth-child(2) { animation-delay: .04s; }
.anim:nth-child(3) { animation-delay: .08s; }
.anim:nth-child(4) { animation-delay: .12s; }

/* ===== AD SLOTS ===== */
.pstet-ad {
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #ccc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    overflow: hidden;
    contain: layout size style;
    content-visibility: auto;
    width: 100%;
    max-width: 360px;
    height: 300px;
    margin: 6px auto;
    border-radius: var(--r);
    box-shadow: var(--sh-1);
}

.pstet-ad-below-hdr {
    max-width: 100%;
    height: 100px;
    background: var(--hdr-d);
    border: none;
    color: rgba(255, 255, 255, .2);
    margin: 0;
    border-radius: 0;
}

.pstet-ad-after-h1 {
    height: 300px;
    margin: 6px auto;
}

.pstet-ad-in-content {
    height: 300px;
    margin: 8px auto;
}

.pstet-ad-sidebar {
    height: 300px;
    border-radius: var(--r);
}

/* ===== TICKER / BREAKING NEWS ===== */
.pstet-ticker {
    background: var(--hdr);
    padding: 4px 0;
    overflow: hidden;
}

.pstet-ticker-in {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pstet-ticker-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--red);
    color: #fff;
    padding: 2px 8px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    border-radius: var(--r-full);
}

.pstet-ticker-dot {
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 0;
    animation: blink 1.4s ease infinite;
}

.pstet-ticker-scroll {
    flex: 1;
    overflow: hidden;
    height: 18px;
    position: relative;
}

.pstet-ticker-track {
    display: flex;
    gap: 30px;
    position: absolute;
    white-space: nowrap;
    animation: tick 30s linear infinite;
}

.pstet-ticker-track a {
    color: rgba(255, 255, 255, .7);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.pstet-ticker-track a:hover {
    color: var(--gold);
}

.pstet-ticker-track strong {
    color: var(--gold);
    font-weight: 700;
}

/* ===== FOLLOW BAR (Desktop only) ===== */
.pstet-fbar {
    background: #fff;
    box-shadow: var(--sh-1);
    padding: 4px 0;
    display: none;
}

/* Follow bar inside articles — visible on all screens */
.pstet-fbar-article {
    display: block;
    margin: 12px 0;
    padding: 10px 0;
    background: rgba(30, 115, 190, .04);
    box-shadow: var(--sh-2);
}

.pstet-fbar-in {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pstet-fb {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-decoration: none;
    border-radius: var(--r-full);
    transition: transform .15s var(--ease), box-shadow .15s;
}

.pstet-fb:hover {
    transform: translateY(-1px);
}

.pstet-fb-wa { background: #25d366; }
.pstet-fb-gn { background: #fff; color: var(--txt); box-shadow: var(--sh-1); }
.pstet-fb-tg { background: #0088cc; }

.pstet-fb .fc {
    font-size: 8px;
    opacity: .8;
}

/* ===== CATEGORY TABS (Desktop only) ===== */
.pstet-ctabs {
    background: #fff;
    box-shadow: var(--sh-1);
    position: sticky;
    top: var(--hdr-h);
    z-index: 50;
    display: block;
}

.pstet-ctabs-in {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 6px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.pstet-ctabs-in::-webkit-scrollbar {
    display: none;
}

.pstet-ct {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--txt3);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    text-decoration: none;
    border-radius: var(--r-full);
    margin: 3px 0;
    transition: all .15s;
}

.pstet-ct:hover { color: var(--txt2); background: #f5f5f5; }
.pstet-ct.on {
    color: var(--primary);
    background: rgba(30, 115, 190, .08);
    font-weight: 700;
}

/* ===== SEARCH OVERLAY ===== */
.pstet-sov {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(22, 43, 82, .97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all .25s var(--ease-out);
    transform: translateY(-10px);
}

.pstet-sov.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pstet-sov-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.pstet-sov-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
    padding: 0 12px;
    height: 44px;
    border-radius: var(--r);
    transition: box-shadow .2s;
}

.pstet-sov-wrap:focus-within {
    box-shadow: 0 0 0 2px var(--gold);
}

.pstet-sov-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 15px;
    color: #fff;
    font-family: var(--font);
}

.pstet-sov-input::placeholder {
    color: rgba(255, 255, 255, .35);
}

.pstet-sov-close {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .5);
    font-size: 18px;
    background: rgba(255,255,255,.1);
    border: none;
    cursor: pointer;
    border-radius: 0;
    transition: background .15s;
}

.pstet-sov-close:hover {
    background: rgba(255,255,255,.2);
}

.pstet-sov-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: rgba(255, 255, 255, .3);
    margin-bottom: 10px;
}

.pstet-sov-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.pstet-sov-tag {
    padding: 6px 14px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--r-full);
    transition: all .15s;
}

.pstet-sov-tag:hover {
    background: var(--primary);
    color: #fff;
}

.pstet-sov-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 6px;
    color: rgba(255, 255, 255, .65);
    font-size: 13px;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: background .15s;
}

.pstet-sov-row:hover {
    background: rgba(255,255,255,.06);
}

/* ===== HERO SECTION ===== */
.pstet-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hdr), var(--hdr-d));
    margin: 4px;
    box-shadow: var(--sh-3);
    display: block;
    text-decoration: none;
    border-radius: var(--r-lg);
    transition: transform .2s var(--ease), box-shadow .2s;
}

.pstet-hero:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-4);
}

.pstet-hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(240, 173, 78, .1), transparent 60%);
    z-index: 0;
}

.pstet-hero-c {
    position: relative;
    z-index: 1;
    padding: 14px 12px;
}

.pstet-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green);
    color: #fff;
    padding: 3px 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
    border-radius: var(--r-full);
}

.pstet-hero-h {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 6px;
}

.pstet-hero-p {
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pstet-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, .65);
    font-weight: 500;
    flex-wrap: wrap;
}

.pstet-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--gold);
    color: var(--hdr);
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    border-radius: var(--r-full);
    transition: transform .15s, box-shadow .15s;
}

.pstet-hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 173, 78, .3);
}

/* ===== POST CARDS (App-style) ===== */
.pstet-pc {
    background: var(--card);
    box-shadow: var(--sh-2);
    overflow: hidden;
    margin-bottom: 8px;
    border-radius: var(--r);
    contain: content;
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
    transition: transform .2s var(--ease), box-shadow .2s;
}

.pstet-pc:hover {
    transform: translateY(-1px);
    box-shadow: var(--sh-3);
}

.pstet-pc:active {
    transform: scale(.98);
}

.pstet-pc-in {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pstet-pc-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    border-radius: var(--r) var(--r) 0 0;
}

.pstet-pc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s var(--ease);
}

.pstet-pc:hover .pstet-pc-thumb img {
    transform: scale(1.04);
}

.pstet-pc-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 2px 8px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    border-radius: var(--r-full);
}

.tg-r { background: var(--green); }
.tg-a { background: var(--purple); }
.tg-h { background: var(--cyan); }
.tg-n { background: var(--primary); }

.pstet-pc-body {
    padding: 10px 12px;
}

.pstet-pc-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.pstet-pc-t {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--txt);
    margin-bottom: 3px;
}

.pstet-pc-t a {
    color: inherit;
    text-decoration: none;
}

.pstet-pc:hover .pstet-pc-t,
.pstet-pc:hover .pstet-pc-t a {
    color: var(--primary);
}

.pstet-pc-meta {
    font-size: 13px;
    color: var(--meta);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pstet-pc-meta .d {
    width: 3px;
    height: 3px;
    background: #ccc;
    border-radius: 0;
}

.pstet-pc-exc {
    font-size: 15px;
    color: var(--txt2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pstet-pc-ft {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--bdr-l);
}

.pstet-pc-more {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.pstet-pc-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    color: var(--meta);
}

.pstet-pc-stats span {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Related Links (App chip style) */
.pstet-rl {
    background: rgba(30, 115, 190, .06);
    box-shadow: var(--sh-1);
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: var(--r);
}

.pstet-rl-t {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: 4px;
}

.pstet-rl-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pstet-rl-a {
    padding: 4px 10px;
    background: #fff;
    box-shadow: var(--sh-1);
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    border-radius: var(--r-full);
    transition: all .15s;
}

.pstet-rl-a:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 115, 190, .25);
    transform: translateY(-1px);
}

/* Pagination (App-style pills) */
.pstet-pgn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 10px 0 4px;
    padding: 8px 0;
}

.pstet-pg {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--sh-1);
    background: #fff;
    color: var(--txt2);
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: all .15s;
}

.pstet-pg:hover {
    box-shadow: var(--sh-2);
    color: var(--primary);
    transform: translateY(-1px);
}

.pstet-pg.on {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 115, 190, .3);
}

.pstet-pg.nx {
    padding: 0 14px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 115, 190, .3);
    border-radius: var(--r-full);
}

/* ===== ARTICLE PAGE STYLES ===== */
.pstet-art-upd {
    padding: 2px 8px;
    background: var(--green-s);
    color: var(--green);
    font-size: 9px;
    font-weight: 700;
    border-radius: var(--r-full);
}

/* Inline social share */
.pstet-art-social {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.pstet-art-social a,
.pstet-art-social button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    transition: all .15s;
    border: none;
    cursor: pointer;
    border-radius: 0;
}

.pstet-art-social a:hover,
.pstet-art-social button:hover {
    transform: scale(1.12);
}

.as-wa { background: #25d366; }
.as-fb { background: #1877f2; }
.as-tw { background: #1da1f2; }
.as-tg { background: #0088cc; }
.as-cp { background: #666; }

/* Mobile floating social */
.pstet-mfloat {
    position: fixed;
    right: 6px;
    bottom: calc(var(--bnav-h) + 16px + env(safe-area-inset-bottom));
    z-index: 95;
    display: flex;
    flex-direction: column;
    gap: 3px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .18));
}

.pstet-mfloat a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: transform .15s var(--ease-spring);
    text-decoration: none;
    border-radius: 0;
}

.pstet-mfloat a:active {
    transform: scale(.88);
}

.mf-wa { background: #25d366; }
.mf-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.mf-fb { background: #1877f2; }

/* Floating share (desktop) */
.pstet-sfloat {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    right: max(8px, calc((100vw - var(--max)) / 2 - 52px));
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    background: #fff;
    box-shadow: var(--sh-3);
    width: 38px;
    z-index: 10;
    border-radius: var(--r);
}

.pstet-sf {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--txt3);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 0;
    transition: all .15s;
}

.pstet-sf:hover {
    transform: scale(1.1);
}

.pstet-sf.wa:hover { background: #25d366; color: #fff; }
.pstet-sf.fb:hover { background: #1877f2; color: #fff; }
.pstet-sf.tw:hover { background: #1da1f2; color: #fff; }
.pstet-sf.tg:hover { background: #0088cc; color: #fff; }
.pstet-sf.cp:hover { background: #333; color: #fff; }

.pstet-sf-d {
    height: 1px;
    background: var(--bdr-l);
    margin: 2px 0;
}

/* Share bar */
.pstet-sbar {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.pstet-sbar-l {
    font-size: 11px;
    font-weight: 700;
    color: var(--txt3);
    margin-right: 2px;
}

.pstet-sb {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-full);
    transition: transform .15s, filter .15s;
}

.pstet-sb:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.sb-wa { background: #25d366; }
.sb-fb { background: #1877f2; }
.sb-tw { background: #1da1f2; }
.sb-tg { background: #0088cc; }
.sb-cp { background: #666; }

/* ===== FOLLOW POPUP CTA (App-style modal) ===== */
.pstet-pfc-popup {
    position: relative;
    background: #fff;
    margin: 8px 0;
    overflow: hidden;
    box-shadow: var(--sh-4);
    animation: popIn .35s var(--ease-out) both;
    border-radius: var(--r-xl);
}

.pstet-pfc-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--green));
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.pstet-pfc-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--txt3);
    cursor: pointer;
    background: rgba(0, 0, 0, .05);
    border: none;
    z-index: 2;
    border-radius: 0;
    transition: all .15s;
}

.pstet-pfc-popup-close:hover {
    background: var(--red);
    color: #fff;
}

.pstet-pfc-popup-body {
    padding: 16px 14px 12px;
    text-align: center;
}

.pstet-pfc-popup-icon {
    font-size: 32px;
    margin-bottom: 4px;
    animation: bellRing .8s ease .8s both;
}

.pstet-pfc-popup .pstet-pfc-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--txt);
    margin-bottom: 3px;
}

.pstet-pfc-popup .pstet-pfc-sub {
    font-size: 13px;
    color: var(--txt2);
    margin-bottom: 10px;
    line-height: 1.45;
}

.pstet-pfc-popup .pstet-pfc-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.pstet-pfc-popup .pstet-pfc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--sh-2);
    border-radius: var(--r-full);
    transition: transform .15s, filter .15s, box-shadow .15s;
}

.pstet-pfc-popup .pstet-pfc-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: var(--sh-3);
}

.pstet-pfc-popup .pfc-wa {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.pstet-pfc-popup .pfc-gn {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
}

.pstet-pfc-popup .pstet-pfc-btn .pfc-count {
    font-size: 9px;
    opacity: .85;
}

.pstet-pfc-popup .pstet-pfc-later {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--txt3);
    cursor: pointer;
    background: none;
    border: none;
    border-radius: var(--r-full);
    padding: 4px 12px;
    transition: all .15s;
}

.pstet-pfc-popup .pstet-pfc-later:hover {
    color: var(--primary);
    background: rgba(30, 115, 190, .06);
}

/* ===== ARTICLE BODY — 17px ===== */
.entry-content,
.pstet-abody {
    font-size: 17px;
    line-height: 1.6;
    color: var(--txt);
}

.entry-content h2,
.pstet-abody h2 {
    font-size: 25px;
    font-weight: 700;
    margin: 24px 0 12px;
    padding: 8px 0 8px 12px;
    border-left: 4px solid var(--primary);
    color: var(--txt);
}

.entry-content h3,
.pstet-abody h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 18px 0 8px;
}

.entry-content p,
.pstet-abody p {
    margin-bottom: 1.5em;
}

.entry-content ul,
.entry-content ol,
.pstet-abody ul,
.pstet-abody ol {
    margin: 10px 0 1.5em 20px;
}

.entry-content li,
.pstet-abody li {
    margin-bottom: 5px;
    list-style: disc;
    font-size: 17px;
}

.entry-content ol li,
.pstet-abody ol li {
    list-style: decimal;
}

.entry-content a,
.pstet-abody a {
    color: var(--link);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(30, 115, 190, .25);
    text-underline-offset: 2px;
}

.entry-content table,
.pstet-abody table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 15px;
    border-radius: var(--r-sm);
    overflow: hidden;
    box-shadow: var(--sh-1);
}

.entry-content table th,
.pstet-abody table th {
    background: var(--hdr);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
}

.entry-content table td,
.pstet-abody table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--bdr-l);
}

.entry-content table tr:nth-child(even) td,
.pstet-abody table tr:nth-child(even) td {
    background: #f9f9f9;
}

.entry-content blockquote,
.pstet-abody blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 16px;
    margin: 12px 0;
    background: #f9f9f9;
    font-style: italic;
    color: var(--txt2);
    font-size: 17px;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ===== TABLE OF CONTENTS (App-aligned) ===== */
.table-of-contents {
    box-shadow: var(--sh-2);
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f0f4f7;
    width: 100%;
    border-radius: var(--r);
    box-sizing: border-box;
}

.toc-header {
    font-size: 18px;
    color: #000;
    text-align: center;
    margin-bottom: 6px;
}

.table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 6px;
}

.toc-item.hidden {
    display: none;
}

.toc-item a {
    text-decoration: none;
    color: var(--link);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    transition: background .15s;
}

.toc-item a:hover {
    background: rgba(30, 115, 190, .08);
    color: var(--primary-d);
}

.toggle-title,
.toc-toggle-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    background: linear-gradient(to right, #3f1bfd1a 1%, transparent 40%, transparent 60%, #e8f8ff 100%);
    box-shadow: var(--sh-1);
    color: #171819;
    cursor: pointer;
    width: auto;
    max-width: 130px;
    margin: 4px auto 0;
    font-size: 13px;
    border-radius: var(--r-full);
    padding: 4px 12px;
    transition: all .15s;
}

.toggle-title:hover,
.toc-toggle-bar:hover {
    transform: translateY(-1px);
    box-shadow: var(--sh-2);
}

/* ===== KEY POINTS (App card) ===== */
.pstet-kp {
    background: rgba(30, 115, 190, .06);
    box-shadow: var(--sh-2);
    padding: 12px;
    margin: 8px 0;
    border-radius: var(--r);
    border-left: 4px solid var(--primary);
}

.pstet-kp-t {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.pstet-kp li {
    list-style: none;
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 14px;
    color: var(--txt2);
}

.pstet-kp li:last-child {
    padding-bottom: 0;
}

.pstet-kp li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
    font-size: 11px;
}

/* ===== AUTHOR BOX (App-style card) ===== */
.pstet-au {
    background: #fff;
    box-shadow: var(--sh-2);
    padding: 14px 12px;
    margin: 10px 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
}

.pstet-au-av {
    width: 64px;
    height: 64px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--sh-2);
    border: 3px solid var(--card);
    outline: 2px solid var(--primary);
}

.pstet-au-av img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pstet-au-i {
    flex: 1;
    min-width: 0;
}

.pstet-au-lb {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--txt3);
}

.pstet-au-nm {
    font-size: 17px;
    font-weight: 800;
    color: var(--txt);
    line-height: 1.2;
    margin: 2px 0;
}

.pstet-au-nm a {
    color: inherit;
    text-decoration: none;
}

.pstet-au-rl {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 3px;
}

.pstet-au-st {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
    justify-content: flex-start;
}

.pstet-au-sn {
    font-size: 15px;
    font-weight: 800;
    color: var(--txt);
}

.pstet-au-sl {
    font-size: 9px;
    color: var(--txt3);
    font-weight: 600;
    text-transform: uppercase;
}

.pstet-au-bio {
    font-size: 13px;
    color: var(--txt2);
    line-height: 1.45;
    margin-bottom: 4px;
    text-align: left;
}

.pstet-au-bio-short {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pstet-au-bio-full {
    display: none;
}

.pstet-au-bio-full.show {
    display: block;
}

.pstet-au-bio-short.hide {
    display: none;
}

.pstet-au-readmore {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    display: inline-block;
    background: none;
    border: none;
    border-radius: var(--r-full);
    padding: 2px 8px;
    transition: background .15s;
}

.pstet-au-readmore:hover {
    background: rgba(30, 115, 190, .08);
}

.pstet-au-lk {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
    justify-content: flex-start;
}

.pstet-au-a {
    padding: 3px 8px;
    box-shadow: var(--sh-1);
    font-size: 9px;
    font-weight: 600;
    color: var(--txt2);
    text-decoration: none;
    border-radius: var(--r-full);
    transition: all .15s;
}

.pstet-au-a:hover {
    color: var(--primary);
    background: rgba(30, 115, 190, .06);
    box-shadow: var(--sh-2);
}

/* ===== RELATED ARTICLES GRID (App cards) ===== */
.pstet-ra-g {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0;
}

.pstet-ra {
    background: #fff;
    box-shadow: var(--sh-2);
    overflow: hidden;
    text-decoration: none;
    border-radius: var(--r);
    transition: transform .2s var(--ease), box-shadow .2s;
}

.pstet-ra:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-3);
}

.pstet-ra:active {
    transform: scale(.97);
}

.pstet-ra-img {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.pstet-ra-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s var(--ease);
}

.pstet-ra:hover .pstet-ra-img img {
    transform: scale(1.05);
}

.pstet-ra-b {
    padding: 6px 8px;
}

.pstet-ra-t {
    font-size: 12px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pstet-ra:hover .pstet-ra-t {
    color: var(--primary);
}

.pstet-ra-d {
    font-size: 10px;
    color: var(--txt3);
    margin-top: 2px;
}

/* Previous/Next Navigation (App cards) */
.pstet-pnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0;
}

.pstet-pnc {
    background: #fff;
    box-shadow: var(--sh-2);
    padding: 10px 10px;
    text-decoration: none;
    border-radius: var(--r);
    transition: transform .15s, box-shadow .15s;
}

.pstet-pnc:hover {
    box-shadow: var(--sh-3);
    transform: translateY(-1px);
}

.pstet-pnc-l {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--txt3);
    margin-bottom: 2px;
}

.pstet-pnc-t {
    font-size: 13px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pstet-pnc:hover .pstet-pnc-t {
    color: var(--primary);
}

.pstet-pnc.nx {
    text-align: right;
}

/* ===== SIDEBAR WIDGETS (App cards) ===== */
.pstet-side {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.pstet-w {
    background: #fff;
    box-shadow: var(--sh-2);
    overflow: hidden;
    border-radius: var(--r);
}

.pstet-wh {
    padding: 8px 12px;
    background: var(--hdr);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: var(--r) var(--r) 0 0;
}

.pstet-wb {
    padding: 10px 12px;
}

/* Follow widget */
.pstet-fwg {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pstet-fw {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: transform .15s, box-shadow .15s;
}

.pstet-fw:hover {
    transform: translateY(-1px);
    box-shadow: var(--sh-2);
}

.fw-wa { background: #25d366; }
.fw-gn { background: #fff; color: var(--txt); box-shadow: var(--sh-1); }
.fw-tg { background: #0088cc; }

.pstet-fw-c {
    margin-left: auto;
    font-size: 9px;
    opacity: .8;
}

/* Quick Tools (App grid) */
.pstet-qtg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.pstet-qti {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 6px;
    background: #fafafa;
    box-shadow: var(--sh-1);
    text-align: center;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
}

.pstet-qti:hover {
    background: rgba(30, 115, 190, .06);
    box-shadow: var(--sh-2);
    transform: translateY(-1px);
}

.pstet-qti:active {
    transform: scale(.95);
}

.pstet-qti-i {
    font-size: 22px;
}

.pstet-qti-l {
    font-size: 11px;
    font-weight: 600;
    color: var(--txt2);
    line-height: 1.2;
}

/* Trending */
.pstet-tri {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    align-items: flex-start;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: background .15s;
}

.pstet-tri:last-child { padding-bottom: 0; }
.pstet-tri:first-child { padding-top: 0; }

.pstet-tri:hover {
    background: rgba(0,0,0,.02);
}

.pstet-tri:hover .pstet-tr-t {
    color: var(--primary);
}

.pstet-tr-rk {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
    background: #eee;
    color: var(--txt3);
    border-radius: 0;
}

.pstet-tr-rk.r1 { background: var(--gold); color: #fff; }
.pstet-tr-rk.r2 { background: var(--txt); color: #fff; }
.pstet-tr-rk.r3 { background: var(--txt2); color: #fff; }

.pstet-tr-t {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--txt);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pstet-tr-m {
    font-size: 10px;
    color: var(--txt3);
    margin-top: 2px;
}

/* Categories widget */
.pstet-chi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: background .15s;
}

.pstet-chi:last-child { padding-bottom: 0; }

.pstet-chi:hover {
    background: rgba(30, 115, 190, .04);
}

.pstet-chi-l {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--txt);
}

.pstet-chi-l .dot {
    width: 7px;
    height: 7px;
    border-radius: 0;
}

.pstet-chi:hover .pstet-chi-l {
    color: var(--primary);
}

.pstet-chi-c {
    font-size: 11px;
    color: var(--txt3);
    background: #f0f0f0;
    padding: 2px 8px;
    font-weight: 700;
    border-radius: var(--r-full);
}

/* ===== BOTTOM NAVIGATION (Mobile — App style) ===== */
.pstet-bnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    height: var(--bnav-h);
    display: block;
    box-shadow: 0 -1px 0 rgba(0,0,0,.06), 0 -4px 12px rgba(0,0,0,.08);
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.pstet-bnav-in {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 4px;
}

.pstet-bni {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 8px;
    color: var(--txt3);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 48px;
    min-height: 44px;
    justify-content: center;
    transition: color .15s;
}

.pstet-bni.on {
    color: var(--primary);
}

.pstet-bni.on::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 16px;
    height: 3px;
    background: var(--primary);
    border-radius: 0;
}

.pstet-bni-i {
    font-size: 18px;
    line-height: 1;
}

.pstet-bni-l {
    font-size: 9px;
    font-weight: 600;
}

.pstet-bni:active {
    transform: scale(.88);
    transition: transform .1s;
}

.pstet-bni-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 0;
    background: var(--red);
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Back to Top (App FAB) */
.pstet-btt {
    position: fixed;
    bottom: calc(var(--bnav-h) + 12px + env(safe-area-inset-bottom));
    right: 10px;
    z-index: 90;
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--sh-3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(.9);
    transition: all .25s var(--ease-spring);
    border: none;
    cursor: pointer;
}

.pstet-btt.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.pstet-btt:active {
    transform: scale(.9);
}

/* ===== FOOTER ===== */
.pstet-ft {
    background: var(--hdr);
    color: rgba(255, 255, 255, .55);
    margin-top: 8px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}

.pstet-ft-top {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 10px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pstet-ft-desc {
    font-size: 10px;
    line-height: 1.45;
    margin-top: 4px;
}

.pstet-ft-social {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.pstet-ft-social a {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, .07);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .4);
    font-size: 12px;
    text-decoration: none;
    border-radius: 0;
    transition: all .15s;
}

.pstet-ft-social a:hover {
    background: var(--primary);
    color: #fff;
}

.pstet-ft-ct {
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
    padding-bottom: 3px;
    display: inline-block;
}

.pstet-ft-li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pstet-ft-li li {
    margin-bottom: 3px;
}

.pstet-ft-li a {
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    transition: color .15s;
}

.pstet-ft-li a:hover {
    color: var(--gold);
}

.pstet-ft-seo {
    padding: 10px;
    max-width: var(--max);
    margin: 0 auto;
}

.pstet-ft-seo-t {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: rgba(255, 255, 255, .25);
    margin-bottom: 6px;
}

.pstet-ft-seo-lk {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pstet-ft-seo-lk a {
    padding: 3px 8px;
    background: rgba(255, 255, 255, .04);
    font-size: 9px;
    color: rgba(255, 255, 255, .35);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--r-full);
    transition: all .15s;
}

.pstet-ft-seo-lk a:hover {
    background: rgba(240, 173, 78, .15);
    color: var(--gold);
}

.pstet-ft-bot {
    padding: 8px;
    text-align: center;
    font-size: 9px;
    max-width: var(--max);
    margin: 0 auto;
}

.pstet-ft-bot a {
    color: rgba(255, 255, 255, .35);
    margin: 0 3px;
    text-decoration: none;
}

.pstet-ft-bot a:hover {
    color: var(--gold);
}

/* ===== MOBILE INLINE WIDGETS ===== */
.pstet-mw {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
}

/* ===== DESKTOP RESPONSIVE ===== */
@media (min-width: 769px) {
    :root {
        --hdr-h: 50px;
        --bnav-h: 56px;
    }

    body {
        padding-bottom: 0;
        line-height: 1.5;
        font-size: 15px;
    }

    body.has-bnav {
        padding-bottom: 0;
    }

    .pstet-bnav {
        display: none;
    }

    .pstet-btt {
        bottom: 20px;
        right: 20px;
    }

    .pstet-ctabs {
        display: block;
    }

    .pstet-side {
        display: flex;
    }

    .pstet-sfloat {
        display: flex;
    }

    .pstet-mw {
        display: none;
    }

    .pstet-mfloat {
        display: none;
    }

    .pstet-hero {
        margin: 6px;
    }

    .pstet-hero-c {
        padding: 20px;
    }

    .pstet-hero-h {
        font-size: 30px;
    }

    .pstet-hero-p {
        -webkit-line-clamp: 3;
        font-size: 15px;
    }

    .pstet-pc-in {
        flex-direction: row;
        gap: 12px;
        padding: 10px;
    }

    .pstet-pc-thumb {
        width: 150px;
        aspect-ratio: 16/10;
        border-radius: var(--r-sm);
    }

    .pstet-pc-body {
        padding: 0;
    }

    .pstet-pc-t {
        font-size: 18px;
    }

    .pstet-pc-exc {
        font-size: 15px;
        -webkit-line-clamp: 4;
    }

    .pstet-ra-g {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Author box — desktop: side-by-side */
    .pstet-au {
        padding: 16px;
        gap: 14px;
    }

    .pstet-au-av {
        width: 72px;
        height: 72px;
    }

    /* Article desktop overrides */
    .entry-content h2,
    .pstet-abody h2 {
        font-size: 30px;
    }

    .entry-content h3,
    .pstet-abody h3 {
        font-size: 24px;
    }

    .entry-content,
    .pstet-abody {
        font-size: 17px;
    }

    .pstet-ft {
        border-radius: 0;
    }

    .pstet-ft-top {
        grid-template-columns: 1.6fr 1fr 1fr 1fr;
        gap: 16px;
        padding: 24px 12px 16px;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    .pstet-pfc-popup .pstet-pfc-btns {
        flex-direction: column;
        gap: 6px;
    }

    .pstet-pfc-popup .pstet-pfc-btn {
        justify-content: center;
    }
}

/* ===== PERFORMANCE — CWV Optimized ===== */
/* content-visibility for below-fold elements */
.pstet-ft,
.pstet-ra-g,
.pstet-pnav,
.pstet-mw {
    content-visibility: auto;
    contain-intrinsic-size: auto 300px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ===== READING PROGRESS BAR ===== */
.pstet-rpb {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    z-index: 9999;
    transition: width .1s linear;
    pointer-events: none;
}

/* ===== READING TIME BADGE ===== */
.pstet-rt {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    background: rgba(30, 115, 190, .08);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

/* ===== TOAST NOTIFICATION ===== */
.pstet-toast {
    position: fixed;
    bottom: calc(var(--bnav-h) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--hdr);
    color: #fff;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--sh-4);
    z-index: 9999;
    opacity: 0;
    transition: all .3s var(--ease-out);
    pointer-events: none;
    white-space: nowrap;
}
.pstet-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
@media (min-width: 769px) {
    .pstet-toast {
        bottom: 24px;
    }
}

/* ===== READ NEXT STICKY BAR ===== */
.pstet-readnext {
    position: fixed;
    bottom: var(--bnav-h);
    left: 0;
    right: 0;
    background: var(--card);
    box-shadow: 0 -2px 10px rgba(0,0,0,.12);
    padding: 8px 12px;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100%);
    transition: transform .3s var(--ease-out);
}
.pstet-readnext.show {
    transform: translateY(0);
}
.pstet-readnext-img {
    width: 48px;
    height: 48px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}
.pstet-readnext-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pstet-readnext-info {
    flex: 1;
    min-width: 0;
}
.pstet-readnext-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: 1px;
}
.pstet-readnext-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--txt);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pstet-readnext-title a {
    color: inherit;
    text-decoration: none;
}
.pstet-readnext-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.05);
    border: none;
    color: var(--txt3);
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}
@media (min-width: 769px) {
    .pstet-readnext {
        bottom: 0;
        max-width: 420px;
        right: 20px;
        left: auto;
    }
}

/* ===== ENGAGEMENT: Hover card lift ===== */
.pstet-pc:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-3);
}

/* ===== BACK BUTTON (Article pages) ===== */
.pstet-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(30, 115, 190, .08);
    text-decoration: none;
    margin: 6px 6px 0;
    transition: all .15s;
}

.pstet-back:hover {
    background: rgba(30, 115, 190, .15);
    color: var(--primary-d);
}

@media (min-width: 769px) {
    .pstet-back {
        margin: 8px 12px 0;
    }
}


/* ===== EXISTING CHILD THEME STYLES (PRESERVED) ===== */
.whatsapp-float {
    position: fixed;
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    border-radius: 0;
    text-align: center;
    box-shadow: var(--sh-3);
    z-index: 100;
}

.whatsapp-float img {
    width: 32px;
    margin-top: 12px;
}

.most-searched-for {
    padding: 10px;
    border-top: 1px solid #1753cf;
    text-align: left;
    font-size: 10px;
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.most-searched-for h3 {
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    color: #fff;
}

.most-searched-for ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.most-searched-for li {
    flex: 1 0 auto;
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.most-searched-for strong {
    color: #cec3c3;
    font-weight: bold;
}

.most-searched-for a {
    color: #cec3c3;
    text-decoration: none;
}

.most-searched-for a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .most-searched-for ul {
        flex-direction: column;
    }

    .most-searched-for li {
        width: 100%;
    }
}

/* Breadcrumb styling */
.pstet-bc {
    max-width: var(--max);
    margin: 0 auto;
    padding: 4px 10px 0;
    font-size: 13px;
    color: var(--txt3);
}

.pstet-bc a {
    color: var(--txt3);
    text-decoration: none;
}

.pstet-bc a:hover {
    color: var(--primary);
}

.pstet-bc .sep {
    margin: 0 3px;
    opacity: .4;
}

/* ===== LAYOUT WRAPPERS (Dynamic — respects GP Customizer) ===== */
.pstet-wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 4px 6px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
}

@media (min-width: 769px) {
    .pstet-wrap {
        grid-template-columns: var(--content-w) var(--sidebar-w);
        gap: 14px;
        padding: 10px 12px;
    }
}

/* Article wrapper */
.pstet-art-wrap {
    max-width: var(--art-max);
    margin: 0 auto;
    padding: 4px 6px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
}

@media (min-width: 769px) {
    .pstet-art-wrap {
        padding: 10px 12px;
    }

    .pstet-bc {
        padding: 6px 12px 0;
        font-size: 11px;
    }
}
