/*
Theme Name: ToolSite Base
Theme URI: https://victorforge.dev/toolsite-base
Author: Victor Forge
Author URI: https://victorforge.dev
Description: Structured WordPress theme for M3U8/HLS public SEO pages and a dedicated browser workspace. Built for static HTML export to Cloudflare Pages.
Version: 6.1.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: toolsite-base
*/

/* Critical layout guard is included below. Production styles are split into assets/css modules and enqueued in inc/enqueue.php. */


/* V6.1 STRUCTURED LAYOUT GUARD
   Purpose: prevent WordPress content constraints, plugin CSS, cached legacy rules or admin-bar context
   from squeezing the theme into a narrow column or exposing default UL navigation. */
:root{
  --ts-ink:#07111f;--ts-text:#172337;--ts-muted:#5c6b82;--ts-line:rgba(15,23,42,.10);
  --ts-bg:#f5f8fc;--ts-panel:#ffffff;--ts-panel-soft:#f8fbff;--ts-green:#12a66b;--ts-green-dark:#0d7f55;--ts-blue:#2463eb;--ts-danger:#dc3f5b;--ts-warn:#f59e0b;
  --ts-radius-sm:12px;--ts-radius:22px;--ts-radius-lg:32px;--ts-shadow:0 18px 58px rgba(15,23,42,.08);--ts-shadow-soft:0 10px 28px rgba(15,23,42,.055);
  --ts-text-width:860px;
}
html{width:100%;max-width:none;overflow-x:hidden;}
body.toolsite-theme{width:100%;max-width:none!important;margin:0!important;overflow-x:hidden!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial,sans-serif;background:radial-gradient(circle at 8% 0%,rgba(18,166,107,.12),transparent 28%),radial-gradient(circle at 96% 2%,rgba(36,99,235,.10),transparent 30%),linear-gradient(180deg,#f9fbff 0%,#eef5fb 48%,#f8fbff 100%);color:var(--ts-text);}
body.toolsite-theme *{box-sizing:border-box;}
body.toolsite-theme img,body.toolsite-theme svg,body.toolsite-theme video{max-width:100%;height:auto;}
body.toolsite-theme .ts-main,body.toolsite-theme #main{display:block;width:100%;max-width:none!important;min-height:60vh;overflow:visible;}
body.toolsite-theme .ts-wide{--ts-current-wide:min(1480px,calc(100vw - 48px));width:var(--ts-current-wide)!important;max-width:none!important;margin-left:calc(50% - (var(--ts-current-wide) / 2))!important;margin-right:calc(50% - (var(--ts-current-wide) / 2))!important;}
body.toolsite-theme .ts-text-wide{max-width:var(--ts-text-width);}
body.toolsite-theme .ts-header{position:sticky;top:0;left:0;right:0;z-index:50;width:100%;max-width:none!important;background:rgba(255,255,255,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(15,23,42,.08);box-shadow:0 10px 28px rgba(15,23,42,.045);}
body.admin-bar.toolsite-theme .ts-header{top:32px;}
body.toolsite-theme .ts-header-inner{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:18px;min-height:76px;}
body.toolsite-theme .ts-brand{display:inline-flex!important;align-items:center;gap:10px;text-decoration:none;min-width:0;white-space:nowrap;}
body.toolsite-theme .ts-brand-mark{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:14px;background:linear-gradient(145deg,#07111f,#12a66b 62%,#7de6b4);color:#fff;font-weight:950;box-shadow:0 15px 34px rgba(18,166,107,.24);flex:0 0 auto;}
body.toolsite-theme .ts-brand-text{font-size:1.12rem;font-weight:950;letter-spacing:-.045em;color:var(--ts-ink);}
body.toolsite-theme .ts-nav{min-width:0;max-width:100%;overflow:hidden;}
body.toolsite-theme .ts-nav-list,body.toolsite-theme .ts-nav ul{display:flex!important;align-items:center;justify-content:flex-end;gap:6px;margin:0!important;padding:0!important;list-style:none!important;max-width:100%;overflow-x:auto;scrollbar-width:none;}
body.toolsite-theme .ts-nav-list::-webkit-scrollbar{display:none;}
body.toolsite-theme .ts-nav-list li,body.toolsite-theme .ts-nav li{display:block;margin:0!important;padding:0!important;list-style:none!important;}
body.toolsite-theme .ts-nav-list li::marker,body.toolsite-theme .ts-nav li::marker{content:"";}
body.toolsite-theme .ts-nav-list a,body.toolsite-theme .ts-nav a{display:inline-flex;align-items:center;min-height:42px;padding:0 12px;border-radius:999px;text-decoration:none!important;font-weight:850;font-size:.92rem;color:#465976;white-space:nowrap;}
body.toolsite-theme .ts-nav-list a:hover,body.toolsite-theme .ts-nav-list .current-menu-item>a,body.toolsite-theme .ts-nav a[aria-current="page"]{background:#ecf7f2;color:#0d7f55;}
body.toolsite-theme .ts-header-cta,body.toolsite-theme .ts-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:999px;border:1px solid rgba(15,23,42,.10);text-decoration:none!important;font-weight:900;color:#122033;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.04);cursor:pointer;white-space:nowrap;}
body.toolsite-theme .ts-header-cta,body.toolsite-theme .ts-button-primary{background:linear-gradient(135deg,var(--ts-green),var(--ts-blue));color:#fff;border:0;box-shadow:0 16px 34px rgba(35,103,244,.20);}
body.toolsite-theme .ts-nav-toggle{display:none;background:#fff;border:1px solid var(--ts-line);border-radius:999px;padding:9px 14px;font-weight:900;color:var(--ts-ink);}
body.toolsite-theme .ts-breadcrumbs{display:block;margin-top:18px;margin-bottom:18px;color:#59708b;font-weight:750;font-size:.92rem;}
body.toolsite-theme .ts-breadcrumbs a{text-decoration:none;color:#2563eb;}
body.toolsite-theme .ts-page-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,380px);gap:24px;align-items:end;padding:34px 0 18px;max-width:none!important;}
body.toolsite-theme .ts-page-hero h1,body.toolsite-theme .ts-workspace-topbar h1,body.toolsite-theme .ts-section-head h2{max-width:100%;overflow-wrap:normal;text-wrap:balance;}
body.toolsite-theme .ts-page-hero h1{font-size:clamp(2.6rem,4.9vw,5.8rem);line-height:.96;letter-spacing:-.08em;color:var(--ts-ink);margin:.16em 0;}
body.toolsite-theme .ts-page-hero p{color:var(--ts-muted);line-height:1.72;font-size:1.06rem;max-width:920px;}
body.toolsite-theme .ts-page-promise{padding:22px;border-radius:28px;background:#fff;border:1px solid var(--ts-line);box-shadow:var(--ts-shadow-soft);}
body.toolsite-theme .ts-section{margin-block:28px;}
body.toolsite-theme .ts-panel,body.toolsite-theme .ts-content-card{background:rgba(255,255,255,.94);border:1px solid var(--ts-line);border-radius:var(--ts-radius-lg);box-shadow:var(--ts-shadow);padding:clamp(22px,3vw,44px);}
body.toolsite-theme .ts-tool-layout{display:grid;grid-template-columns:minmax(250px,330px) minmax(0,1fr);gap:24px;align-items:start;}
body.toolsite-theme .ts-tool-layout>*{min-width:0;}
body.toolsite-theme .ts-tool-context{position:sticky;top:100px;padding:22px;border-radius:28px;background:#07111f;color:#eff6ff;}
body.toolsite-theme .ts-tool-context h2{margin-top:0;color:#fff;}
body.toolsite-theme .ts-tool-context li,body.toolsite-theme .ts-tool-context p{color:#bdd0e4;}
body.toolsite-theme .ts-tool-shell{min-width:0;overflow:hidden;padding:clamp(14px,2vw,26px);border-radius:30px;background:#fff;border:1px solid var(--ts-line);box-shadow:var(--ts-shadow-soft);}
body.toolsite-theme .ts-tool-shell .ts-wide,body.toolsite-theme .ts-rich-content .ts-wide{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;}
body.toolsite-theme .ts-diagnostic-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-block:18px;}
body.toolsite-theme .ts-diagnostic-strip div{padding:16px;border-radius:20px;background:#fff;border:1px solid var(--ts-line);box-shadow:var(--ts-shadow-soft);}
body.toolsite-theme .ts-diagnostic-strip strong,body.toolsite-theme .ts-diagnostic-strip span{display:block;}
body.toolsite-theme .ts-diagnostic-strip span{margin-top:5px;color:var(--ts-muted);font-size:.9rem;line-height:1.45;}
body.toolsite-theme .ts-workspace-shell{padding:22px 0 64px;}
body.toolsite-theme .ts-workspace-topbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,360px);gap:22px;align-items:end;position:relative;overflow:hidden;padding:28px;border-radius:34px;background:linear-gradient(135deg,#07111f 0%,#10233f 58%,#0b3328 100%);color:#eff6ff;box-shadow:0 34px 105px rgba(7,17,31,.26);}
body.toolsite-theme .ts-workspace-topbar h1{font-size:clamp(2.7rem,5vw,6.3rem);line-height:.92;letter-spacing:-.085em;margin:.10em 0;color:#fff;}
body.toolsite-theme .ts-workspace-topbar p{max-width:960px;color:#c6d6e8;line-height:1.65;}
body.toolsite-theme .ts-workspace-topbar aside{padding:18px;border-radius:24px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.13);}
body.toolsite-theme .ts-workspace-topbar aside span{display:block;margin:8px 0 12px;color:#c6d6e8;line-height:1.5;}
body.toolsite-theme .ts-workspace-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0;}
body.toolsite-theme .ts-workspace-metrics div{border-radius:24px;padding:18px;background:#fff;border:1px solid var(--ts-line);box-shadow:var(--ts-shadow-soft);}
body.toolsite-theme .ts-workspace-metrics b,body.toolsite-theme .ts-workspace-metrics span{display:block;}
body.toolsite-theme .ts-workspace-metrics span{margin-top:6px;color:var(--ts-muted);line-height:1.45;}
body.toolsite-theme .ts-workspace-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,370px);gap:18px;align-items:start;}
body.toolsite-theme .ts-workspace-primary,body.toolsite-theme .ts-workspace-primary *{min-width:0;}
body.toolsite-theme .ts-workspace-guidance{position:sticky;top:98px;display:grid;gap:14px;}
body.toolsite-theme .ts-workspace-guidance>div{border-radius:26px;padding:20px;background:#fff;border:1px solid var(--ts-line);box-shadow:var(--ts-shadow-soft);}
body.toolsite-theme .ts-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
body.toolsite-theme .ts-card,body.toolsite-theme .ts-serp-card{min-width:0;}
body.toolsite-theme .ts-footer{width:100%;margin-top:54px;background:#07111f;color:#dbeafe;}
body.toolsite-theme .ts-footer-inner{display:flex;justify-content:space-between;gap:40px;padding:38px 0;}
body.toolsite-theme .ts-footer-links{display:flex;gap:16px;list-style:none!important;margin:0!important;padding:0!important;flex-wrap:wrap;}
body.toolsite-theme .ts-footer-links li{list-style:none!important;margin:0!important;padding:0!important;}
body.toolsite-theme .ts-footer-links a{color:#dbeafe;text-decoration:none;font-weight:800;}
body.toolsite-theme .ez-toc-container,body.toolsite-theme #ez-toc-container{max-width:100%;}
body.toolsite-theme.is-workspace-template .ez-toc-container,body.toolsite-theme.is-workspace-template #ez-toc-container,body.toolsite-theme.is-workspace-template .lwptoc,body.toolsite-theme.is-workspace-template .toc,body.toolsite-theme.is-workspace-template .wp-block-rank-math-toc-block{display:none!important;}
body.toolsite-theme .m3u8tk,body.toolsite-theme .m3u8tk *{max-width:100%;}
body.toolsite-theme .m3u8tk{min-width:0;overflow:hidden;}
body.toolsite-theme .m3u8tk-video-wrap,body.toolsite-theme .m3u8tk-report-block,body.toolsite-theme .m3u8tk-panel{min-width:0;}
body.toolsite-theme .m3u8tk input,body.toolsite-theme .m3u8tk textarea{max-width:100%;}
@media (min-width:1800px){body.toolsite-theme .ts-wide{--ts-current-wide:min(1760px,calc(100vw - 72px));}body.toolsite-theme .ts-workspace-layout{grid-template-columns:minmax(0,1fr) 420px;}body.toolsite-theme .m3u8tk-video-wrap,body.toolsite-theme .m3u8tk-video{min-height:560px;}}
@media (min-width:2400px){body.toolsite-theme .ts-wide{--ts-current-wide:min(2240px,calc(100vw - 112px));}body.toolsite-theme .ts-workspace-layout{grid-template-columns:minmax(0,1fr) 480px;}}
@media (max-width:1180px){body.toolsite-theme .ts-header-inner{grid-template-columns:auto auto auto;justify-content:space-between;}body.toolsite-theme .ts-nav-toggle{display:inline-flex;}body.toolsite-theme .ts-nav{display:none;position:absolute;left:24px;right:24px;top:calc(100% + 8px);z-index:60;padding:12px;border-radius:22px;background:#fff;border:1px solid var(--ts-line);box-shadow:0 18px 55px rgba(15,23,42,.16);overflow:visible;}body.toolsite-theme .ts-nav.is-open{display:block;}body.toolsite-theme .ts-nav-list,body.toolsite-theme .ts-nav ul{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible;}body.toolsite-theme .ts-nav-list a,body.toolsite-theme .ts-nav a{width:100%;justify-content:center;background:#f8fbff;}body.toolsite-theme .ts-page-hero,body.toolsite-theme .ts-tool-layout,body.toolsite-theme .ts-workspace-topbar,body.toolsite-theme .ts-workspace-layout{grid-template-columns:1fr;}body.toolsite-theme .ts-tool-context,body.toolsite-theme .ts-workspace-guidance{position:static;}body.toolsite-theme .ts-workspace-metrics,body.toolsite-theme .ts-diagnostic-strip{grid-template-columns:repeat(2,minmax(0,1fr));}body.toolsite-theme .ts-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:760px){body.admin-bar.toolsite-theme .ts-header{top:46px;}body.toolsite-theme .ts-wide{--ts-current-wide:calc(100vw - 24px);}body.toolsite-theme .ts-header-inner{min-height:66px;gap:10px;}body.toolsite-theme .ts-brand-mark{width:38px;height:38px;border-radius:13px;}body.toolsite-theme .ts-brand-text{font-size:1rem;}body.toolsite-theme .ts-header-cta{display:none;}body.toolsite-theme .ts-nav{left:12px;right:12px;}body.toolsite-theme .ts-nav-list,body.toolsite-theme .ts-nav ul{grid-template-columns:1fr;}body.toolsite-theme .ts-page-hero{padding-top:22px;}body.toolsite-theme .ts-page-hero h1,body.toolsite-theme .ts-workspace-topbar h1{font-size:clamp(2.25rem,12vw,3.6rem);letter-spacing:-.065em;line-height:.98;}body.toolsite-theme .ts-panel,body.toolsite-theme .ts-content-card,body.toolsite-theme .ts-tool-shell{padding:18px;border-radius:24px;}body.toolsite-theme .ts-workspace-topbar{padding:20px;border-radius:26px;}body.toolsite-theme .ts-workspace-metrics,body.toolsite-theme .ts-diagnostic-strip,body.toolsite-theme .ts-card-grid{grid-template-columns:1fr;}body.toolsite-theme .ts-footer-inner{display:grid;gap:22px;}body.toolsite-theme .m3u8tk-video-wrap,body.toolsite-theme .m3u8tk-video{min-height:240px;}body.toolsite-theme .ts-sticky-public-cta{display:flex;}}
