/*
Theme Name: Fleury Template
Theme URI: https://worththelook.com
Author: FCF Ventures
Description: Tema WordPress classico, leve e mobile-first para sites de conteudo e publisher. Grid de destaques, secoes por categoria, slots de anuncio com reserva de espaco (CLS-safe), integracao com Google Ad Manager e Google Tag Manager, contador de views e posts relacionados. Sem jQuery, um unico arquivo CSS.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fleury-template
Tags: blog, news, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root{
  --ft-max: 1200px;
  --ft-gap: 20px;
  --ft-radius: 14px;
  --ft-radius-sm: 8px;

  --ft-bg: #ffffff;
  --ft-surface: #f5f6f8;
  --ft-border: #e4e6eb;
  --ft-text: #16181d;
  --ft-muted: #626878;
  --ft-accent: #1a56db;
  --ft-accent-ink: #ffffff;
  --ft-header-bg: #ffffff;
  --ft-header-ink: #16181d;
  --ft-footer-bg: #14161a;
  --ft-footer-ink: #c9ccd4;

  --ft-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ft-shadow: 0 1px 2px rgba(16,18,24,.06), 0 4px 16px rgba(16,18,24,.06);
}

/* ==========================================================================
   2. Reset
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--ft-font);font-size:16px;line-height:1.65;color:var(--ft-text);background:var(--ft-bg);-webkit-font-smoothing:antialiased}
img,svg,video{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{margin:0;line-height:1.25;font-weight:700;letter-spacing:-.015em}
p{margin:0 0 1.15em}
ul,ol{margin:0 0 1.15em;padding-left:1.35em}
button{font:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--ft-accent);outline-offset:2px}

.ft-container{width:100%;max-width:var(--ft-max);margin:0 auto;padding:0 16px}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link{position:absolute;left:-9999px;top:0;background:#fff;padding:10px 16px;z-index:9999}
.skip-link:focus{left:8px;top:8px}

/* ==========================================================================
   3. Header
   ========================================================================== */
.ft-header{position:sticky;top:0;z-index:120;background:var(--ft-header-bg);color:var(--ft-header-ink);border-bottom:1px solid var(--ft-border)}
.ft-header-inner{display:flex;align-items:center;gap:14px;min-height:60px}
.ft-brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:19px;letter-spacing:-.02em;flex:0 0 auto}
.ft-brand img{max-height:38px;width:auto}
.ft-nav{margin-left:auto}
.ft-nav ul{display:flex;gap:6px;list-style:none;margin:0;padding:0}
.ft-nav a{display:block;padding:8px 11px;border-radius:999px;font-size:14.5px;font-weight:600;color:var(--ft-header-ink);opacity:.85}
.ft-nav a:hover,.ft-nav .current-menu-item>a{opacity:1;background:var(--ft-surface)}
.ft-head-actions{display:flex;align-items:center;gap:4px;margin-left:auto}
.ft-nav+.ft-head-actions{margin-left:6px}
.ft-icon-btn{display:grid;place-items:center;width:38px;height:38px;border:0;background:transparent;border-radius:999px;color:inherit}
.ft-icon-btn:hover{background:var(--ft-surface)}
.ft-burst{display:none}

.ft-searchbar{display:none;border-top:1px solid var(--ft-border);background:var(--ft-bg)}
.ft-searchbar.is-open{display:block}
.ft-searchbar form{display:flex;gap:8px;padding:12px 0}
.ft-searchbar input[type=search]{flex:1;padding:11px 14px;border:1px solid var(--ft-border);border-radius:999px;font-size:16px;background:var(--ft-surface)}
.ft-searchbar button{padding:11px 20px;border:0;border-radius:999px;background:var(--ft-accent);color:var(--ft-accent-ink);font-weight:600}

@media(max-width:900px){
  .ft-burst{display:grid}
  .ft-nav{position:fixed;inset:60px 0 auto 0;background:var(--ft-bg);border-bottom:1px solid var(--ft-border);max-height:0;overflow:hidden;transition:max-height .25s ease;margin:0}
  .ft-nav.is-open{max-height:80vh;overflow:auto;box-shadow:var(--ft-shadow)}
  .ft-nav ul{flex-direction:column;gap:0;padding:6px 16px 14px}
  .ft-nav a{padding:12px 4px;border-radius:0;border-bottom:1px solid var(--ft-border);font-size:16px}
  .ft-head-actions{margin-left:auto}
}

/* ==========================================================================
   4. Cards
   ========================================================================== */
.ft-tag{display:inline-block;padding:4px 10px;border-radius:999px;background:var(--ft-accent);color:var(--ft-accent-ink);font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;line-height:1.5}
.ft-tag--soft{background:var(--ft-surface);color:var(--ft-accent)}

.ft-card{display:flex;flex-direction:column;background:var(--ft-bg);border:1px solid var(--ft-border);border-radius:var(--ft-radius);overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}
.ft-card:hover{transform:translateY(-2px);box-shadow:var(--ft-shadow)}
.ft-card-media{position:relative}
.ft-card-thumb{position:relative;display:block;aspect-ratio:16/9;background:var(--ft-surface);overflow:hidden}
.ft-card-thumb img{width:100%;height:100%;object-fit:cover}
.ft-card-media>.ft-tag{position:absolute;left:10px;top:10px;z-index:2}
.ft-card-body{padding:14px 15px 16px;display:flex;flex-direction:column;gap:7px;flex:1}
.ft-card-title{font-size:16.5px;line-height:1.35}
.ft-card-title a:hover{color:var(--ft-accent)}
.ft-card-title a::after{content:"";position:absolute;inset:0;z-index:1}
.ft-card{position:relative}
.ft-card-media>.ft-tag{z-index:3}
.ft-card-excerpt{margin:0;font-size:14px;color:var(--ft-muted);line-height:1.55}
.ft-card-meta{margin-top:auto;font-size:12.5px;color:var(--ft-muted);display:flex;gap:8px;align-items:center}

/* ==========================================================================
   5. Home - hero
   ========================================================================== */
.ft-section{margin:26px 0 34px}
.ft-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}
.ft-section-title{font-size:15px;letter-spacing:.09em;text-transform:uppercase;font-weight:800;position:relative;padding-left:13px}
.ft-section-title::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:4px;height:17px;border-radius:2px;background:var(--ft-accent)}
.ft-more{font-size:13.5px;font-weight:700;color:var(--ft-accent);white-space:nowrap}
.ft-more:hover{text-decoration:underline}

.ft-home-h1{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.ft-hero{display:grid;gap:14px;grid-template-columns:1fr}
.ft-hero-main{position:relative;border-radius:var(--ft-radius);overflow:hidden;min-height:260px;display:flex;align-items:flex-end;background:var(--ft-surface)}
.ft-hero-main img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ft-hero-main::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(8,9,12,.90) 0%,rgba(8,9,12,.55) 45%,rgba(8,9,12,.05) 100%)}
.ft-hero-hit{position:absolute;inset:0;z-index:1}
.ft-hero-body{position:relative;z-index:2;padding:18px 18px 20px;color:#fff;display:flex;flex-direction:column;align-items:flex-start;gap:9px}
.ft-hero-title{font-size:23px;line-height:1.24;color:#fff}
.ft-hero-meta{font-size:12.5px;opacity:.85;display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.ft-hero-side{display:grid;gap:12px}
.ft-hero-mini{display:grid;grid-template-columns:104px 1fr;gap:12px;align-items:center}
.ft-hero-mini .ft-card-thumb{aspect-ratio:1/1;border-radius:10px}
.ft-hero-mini h3{font-size:15px;line-height:1.35}
.ft-hero-mini{position:relative}
.ft-hero-mini h3 a::after{content:"";position:absolute;inset:0;z-index:1}
.ft-hero-mini h3 a:hover{color:var(--ft-accent)}
.ft-hero-mini .ft-card-meta{font-size:12px;margin-top:5px}

@media(min-width:760px){
  .ft-hero{grid-template-columns:1.45fr 1fr;gap:16px}
  .ft-hero-main{min-height:400px}
  .ft-hero-title{font-size:29px}
}

/* ==========================================================================
   6. Grids
   ========================================================================== */
.ft-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.ft-grid--2{grid-template-columns:1fr}
@media(min-width:620px){.ft-grid--2{grid-template-columns:1fr 1fr}}

.ft-rail{display:grid;grid-auto-flow:column;grid-auto-columns:78%;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;margin:0 -16px;padding-left:16px;padding-right:16px;scrollbar-width:thin}
.ft-rail>*{scroll-snap-align:start}
@media(min-width:620px){.ft-rail{grid-auto-columns:minmax(0,1fr);grid-auto-flow:row;grid-template-columns:repeat(4,1fr);overflow:visible;margin:0;padding-left:0;padding-right:0}}

/* ==========================================================================
   7. Layout with sidebar
   ========================================================================== */
.ft-layout{display:grid;gap:26px;grid-template-columns:1fr;align-items:start}
@media(min-width:1000px){.ft-layout{grid-template-columns:minmax(0,1fr) 320px;gap:32px}}
.ft-sidebar{display:flex;flex-direction:column;gap:22px}
@media(min-width:1000px){.ft-sidebar{position:sticky;top:76px}}
.ft-widget{background:var(--ft-surface);border:1px solid var(--ft-border);border-radius:var(--ft-radius);padding:16px}
.ft-widget .ft-section-title{margin-bottom:12px}
.ft-poplist{list-style:none;margin:0;padding:0;counter-reset:pop}
.ft-poplist li{counter-increment:pop;display:grid;grid-template-columns:28px 1fr;gap:11px;padding:11px 0;border-bottom:1px solid var(--ft-border)}
.ft-poplist li:last-child{border-bottom:0;padding-bottom:0}
.ft-poplist li::before{content:counter(pop);font-size:17px;font-weight:800;color:var(--ft-accent);opacity:.45;line-height:1.3}
.ft-poplist a{font-size:14.5px;font-weight:600;line-height:1.4}
.ft-poplist a:hover{color:var(--ft-accent)}

/* ==========================================================================
   8. Single post
   ========================================================================== */
.ft-crumbs{font-size:13px;color:var(--ft-muted);margin:16px 0 12px;display:flex;flex-wrap:wrap;gap:6px}
.ft-crumbs a:hover{color:var(--ft-accent);text-decoration:underline}
.ft-crumbs span[aria-hidden]{opacity:.5}

.ft-article{max-width:760px}
.ft-layout .ft-article{max-width:none}
.ft-article>header .ft-tag{margin-bottom:11px}
.ft-entry-title{font-size:27px;line-height:1.22;margin:0 0 12px}
@media(min-width:760px){.ft-entry-title{font-size:36px}}
.ft-entry-meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:13.5px;color:var(--ft-muted);margin-bottom:18px}
.ft-entry-thumb{border-radius:var(--ft-radius);overflow:hidden;margin-bottom:22px;background:var(--ft-surface)}
.ft-entry-thumb img{width:100%}

.ft-content{font-size:17.5px;line-height:1.75}
.ft-content>h2{font-size:23px;margin:1.7em 0 .55em}
.ft-content>h3{font-size:19.5px;margin:1.5em 0 .5em}
.ft-content img{border-radius:var(--ft-radius-sm);margin:1.2em 0}
.ft-content a{color:var(--ft-accent);text-decoration:underline;text-underline-offset:2px}
.ft-content ul,.ft-content ol{padding-left:1.3em}
.ft-content li{margin-bottom:.5em}
.ft-content blockquote{margin:1.5em 0;padding:4px 0 4px 18px;border-left:4px solid var(--ft-accent);color:var(--ft-muted);font-style:italic}
.ft-content table{width:100%;border-collapse:collapse;margin:1.4em 0;font-size:15.5px}
.ft-content th,.ft-content td{border:1px solid var(--ft-border);padding:9px 11px;text-align:left}
.ft-content th{background:var(--ft-surface)}

.ft-toc{background:var(--ft-surface);border:1px solid var(--ft-border);border-radius:var(--ft-radius);padding:14px 16px;margin:0 0 24px;font-size:15px}
.ft-toc strong{display:block;font-size:13px;letter-spacing:.07em;text-transform:uppercase;margin-bottom:8px;color:var(--ft-muted)}
.ft-toc ol{margin:0;padding-left:1.15em}
.ft-toc li{margin:5px 0}
.ft-toc a{color:inherit;text-decoration:none}
.ft-toc a:hover{color:var(--ft-accent);text-decoration:underline}

.ft-tags{display:flex;flex-wrap:wrap;gap:7px;margin:26px 0}
.ft-tags a{padding:5px 11px;border-radius:999px;background:var(--ft-surface);border:1px solid var(--ft-border);font-size:13px;color:var(--ft-muted)}
.ft-tags a:hover{color:var(--ft-accent);border-color:var(--ft-accent)}

.ft-share{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:24px 0;padding:15px 0;border-top:1px solid var(--ft-border);border-bottom:1px solid var(--ft-border)}
.ft-share strong{font-size:13.5px}
.ft-share a{display:grid;place-items:center;width:38px;height:38px;border-radius:999px;background:var(--ft-surface);color:var(--ft-muted);transition:background .15s,color .15s}
.ft-share a:hover{background:var(--ft-accent);color:#fff}

.ft-author{display:grid;grid-template-columns:62px 1fr;gap:15px;align-items:start;background:var(--ft-surface);border:1px solid var(--ft-border);border-radius:var(--ft-radius);padding:17px;margin:26px 0}
.ft-author img{width:62px;height:62px;border-radius:999px;object-fit:cover}
.ft-author h3{font-size:16px;margin-bottom:5px}
.ft-author p{margin:0;font-size:14.5px;color:var(--ft-muted)}

/* ==========================================================================
   9. Ads
   ========================================================================== */
.ft-ad{display:block;margin:26px auto;text-align:center;overflow:hidden}
.ft-ad::before{content:attr(data-label);display:block;font-size:10.5px;letter-spacing:.11em;text-transform:uppercase;color:#9aa0ae;margin-bottom:5px}
.ft-ad-inner{margin:0 auto;display:flex;align-items:center;justify-content:center}
.ft-ad--leader .ft-ad-inner{min-height:100px}
@media(min-width:760px){.ft-ad--leader .ft-ad-inner{min-height:90px}}
.ft-ad--incontent .ft-ad-inner{min-height:280px}
.ft-ad--sidebar .ft-ad-inner{min-height:250px}
.ft-ad--footer .ft-ad-inner{min-height:250px}

.ft-sticky-ad{position:fixed;left:0;right:0;bottom:0;z-index:200;background:rgba(255,255,255,.97);border-top:1px solid var(--ft-border);padding:4px 0 2px;display:flex;justify-content:center;align-items:center;box-shadow:0 -2px 12px rgba(0,0,0,.08)}
.ft-sticky-ad .ft-ad{margin:0}
.ft-sticky-ad-close{position:absolute;right:6px;top:-25px;width:26px;height:26px;border-radius:999px 999px 0 0;border:1px solid var(--ft-border);border-bottom:0;background:rgba(255,255,255,.97);display:grid;place-items:center;font-size:15px;line-height:1;color:var(--ft-muted)}
@media(min-width:900px){.ft-sticky-ad{display:none}}
body.ft-has-sticky-ad{padding-bottom:110px}

/* ==========================================================================
   10. Pagination / load more
   ========================================================================== */
.ft-loadmore{display:block;width:100%;max-width:280px;margin:26px auto 0;padding:13px 20px;border:1px solid var(--ft-border);border-radius:999px;background:var(--ft-bg);font-weight:700;font-size:15px;color:var(--ft-text);text-align:center;transition:background .15s,border-color .15s}
.ft-loadmore:hover{background:var(--ft-accent);border-color:var(--ft-accent);color:#fff}
.ft-loadmore[disabled]{opacity:.5;pointer-events:none}
.ft-pagination{margin:30px 0;display:flex;justify-content:center}
.ft-pagination .nav-links{display:flex;gap:6px;flex-wrap:wrap}
.ft-pagination .page-numbers{display:grid;place-items:center;min-width:40px;height:40px;padding:0 12px;border:1px solid var(--ft-border);border-radius:var(--ft-radius-sm);font-size:14.5px;font-weight:600}
.ft-pagination .page-numbers.current{background:var(--ft-accent);border-color:var(--ft-accent);color:#fff}

/* ==========================================================================
   11. Archive header / 404 / search
   ========================================================================== */
.ft-page-head{margin:20px 0 22px}
.ft-page-head h1{font-size:26px;margin-bottom:8px}
@media(min-width:760px){.ft-page-head h1{font-size:33px}}
.ft-page-head p{color:var(--ft-muted);max-width:720px;margin:0;font-size:15.5px}
.ft-empty{background:var(--ft-surface);border:1px solid var(--ft-border);border-radius:var(--ft-radius);padding:34px 20px;text-align:center;color:var(--ft-muted)}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.ft-footer{background:var(--ft-footer-bg);color:var(--ft-footer-ink);margin-top:44px;padding:36px 0 26px;font-size:14.5px}
.ft-footer-top{display:grid;gap:26px;grid-template-columns:1fr;margin-bottom:26px}
@media(min-width:760px){.ft-footer-top{grid-template-columns:1.4fr 1fr 1fr}}
.ft-footer h4{font-size:12.5px;letter-spacing:.1em;text-transform:uppercase;color:#fff;margin-bottom:12px}
.ft-footer p{color:var(--ft-footer-ink);opacity:.8;margin:0 0 .8em}
.ft-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.ft-footer a{opacity:.82}
.ft-footer a:hover{opacity:1;color:#fff;text-decoration:underline}
.ft-footer-brand{font-size:19px;font-weight:800;color:#fff;margin-bottom:10px;display:inline-block}
.ft-footer-brand img{max-height:38px;filter:brightness(0) invert(1)}
.ft-footer-bottom{border-top:1px solid rgba(255,255,255,.12);padding-top:18px;display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;font-size:13px;opacity:.75}
.ft-legal{display:flex;flex-wrap:wrap;gap:6px 16px}

/* ==========================================================================
   13. Utilities
   ========================================================================== */
.ft-hidden{display:none!important}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ==========================================================================
   14. Mobile-first pass
   The audience here is overwhelmingly on phones. Everything below either
   buys back vertical space, reduces taps, or protects the layout from
   shifting while ads load.
   ========================================================================== */

body{-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth;scroll-padding-top:120px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Tap targets: 44px is the minimum a thumb hits reliably. */
.ft-icon-btn{width:44px;height:44px}
.ft-nav a,.ft-poplist a,.ft-footer a{min-height:44px;display:flex;align-items:center}
.ft-footer ul a{min-height:38px}

/* --- Category strip: every section one tap away, no menu to open --- */
.ft-catbar{display:flex;gap:7px;overflow-x:auto;padding:9px 16px;border-bottom:1px solid var(--ft-border);background:var(--ft-bg);scrollbar-width:none;-webkit-overflow-scrolling:touch}
.ft-catbar::-webkit-scrollbar{display:none}
.ft-catbar a{flex:0 0 auto;padding:8px 14px;border-radius:999px;background:var(--ft-surface);font-size:13.5px;font-weight:600;white-space:nowrap;color:var(--ft-text)}
.ft-catbar a.is-current{background:var(--ft-accent);color:#fff}
@media(min-width:901px){.ft-catbar{display:none}}

/* The full nav is desktop-only now; the strip replaces it on mobile. */
@media(max-width:900px){
  .ft-nav{display:none}
  .ft-burst{display:none}
  .ft-header-inner{min-height:56px}
  .ft-brand{font-size:18px}
  .ft-brand img{max-height:34px}
}

/* --- Reading progress: cheap signal that the article has an end --- */
.ft-progress{position:sticky;top:56px;z-index:119;height:3px;background:transparent;pointer-events:none}
.ft-progress span{display:block;height:100%;width:0;background:var(--ft-accent);transition:width .1s linear}
body:not(.single) .ft-progress{display:none}
@media(min-width:901px){.ft-progress{top:60px}}

/* --- Hero: 4/3 on a phone shows the headline without burning the fold --- */
@media(max-width:759px){
  .ft-hero-main{aspect-ratio:4/3;min-height:0}
  .ft-hero-title{font-size:21px}
  .ft-hero-body{padding:16px}
  .ft-hero-mini{grid-template-columns:96px 1fr;gap:11px}
  .ft-hero-mini h3{font-size:14.5px}
  .ft-section{margin:20px 0 28px}
}

/* --- Typography tuned for a phone screen --- */
@media(max-width:759px){
  .ft-entry-title{font-size:25px;letter-spacing:-.02em}
  .ft-content{font-size:17px;line-height:1.72}
  .ft-content>h2{font-size:20.5px;margin:1.5em 0 .5em}
  .ft-content>h3{font-size:18px}
  .ft-card-title{font-size:16px}
  .ft-card-excerpt{display:none}
  .ft-card-body{padding:12px 13px 14px;gap:6px}
}

/* --- Related posts become a compact list on mobile: more links, less scroll --- */
@media(max-width:619px){
  .ft-related .ft-grid{display:block}
  .ft-related .ft-card{flex-direction:row;align-items:center;gap:12px;border:0;border-bottom:1px solid var(--ft-border);border-radius:0;padding:11px 0}
  .ft-related .ft-card:hover{transform:none;box-shadow:none}
  .ft-related .ft-card-media{flex:0 0 96px;width:96px}
  .ft-related .ft-card-thumb{aspect-ratio:1/1;border-radius:10px}
  .ft-related .ft-card-media>.ft-tag{display:none}
  .ft-related .ft-card-body{padding:0;gap:5px}
  .ft-related .ft-card-title{font-size:15px}
}

/* --- Deferred rendering, limited to the footer ---
   content-visibility:auto was tempting for every section, but any container
   that can hold an ad must render predictably: ad scripts measure the slot,
   and a skipped container reports the wrong size or never fires the
   impression. The footer holds no ads, so it is the only safe place. --- */
.ft-footer{content-visibility:auto;contain-intrinsic-size:auto 420px}

/* --- Sticky ad: respect the iPhone home indicator, never cover content --- */
.ft-sticky-ad{padding-bottom:calc(2px + env(safe-area-inset-bottom))}
body.ft-has-sticky-ad{padding-bottom:calc(110px + env(safe-area-inset-bottom))}

/* --- Ads on mobile: full width, fixed reserved height, no surprise shifts --- */
@media(max-width:759px){
  .ft-ad{margin:22px auto}
  .ft-ad--leader .ft-ad-inner{min-height:100px}
  .ft-ad--incontent .ft-ad-inner{min-height:280px}
  .ft-ad--afterpost .ft-ad-inner,.ft-ad--sidebar .ft-ad-inner{min-height:280px}
}

/* --- Sidebar on mobile reads as a "keep going" block after the article --- */
@media(max-width:999px){
  .ft-sidebar{margin-top:8px}
  .ft-widget{border-radius:var(--ft-radius);padding:14px}
  .ft-poplist a{font-size:15px}
}

/* --- Table of contents: collapsed by default on a phone --- */
@media(max-width:759px){
  .ft-toc{padding:12px 14px}
  .ft-toc ol{max-height:none}
}

/* --- Horizontal overflow guard: one wide table should not break the page --- */
.ft-content table{display:block;overflow-x:auto;white-space:nowrap}
@media(min-width:760px){.ft-content table{display:table;white-space:normal}}
.ft-content pre{overflow-x:auto}
body{overflow-x:hidden}

/* --- Latest-articles list: density beats decoration on a phone ---
   Full-width 16:9 cards look good but show roughly two headlines per screen.
   The compact row shows five or six. On a content site the headline is the
   product, so more headlines in the thumb's reach is more sessions per visit.
   The hero stays large - it still has to sell the first click. --- */
@media(max-width:619px){
  #ft-latest{display:block}
  #ft-latest .ft-card{flex-direction:row;align-items:center;gap:12px;border:0;border-bottom:1px solid var(--ft-border);border-radius:0;padding:12px 0}
  #ft-latest .ft-card:hover{transform:none;box-shadow:none}
  #ft-latest .ft-card:first-child{padding-top:0}
  #ft-latest .ft-card-media{flex:0 0 108px;width:108px}
  #ft-latest .ft-card-thumb{aspect-ratio:4/3;border-radius:10px}
  #ft-latest .ft-card-media>.ft-tag{display:none}
  #ft-latest .ft-card-body{padding:0;gap:5px}
  #ft-latest .ft-card-title{font-size:15.5px;line-height:1.33}
  #ft-latest .ft-card-meta{font-size:12px}
}
