.ths-template-dev-badge{position:fixed;left:12px;bottom:12px;z-index:999999;background:#12324d;color:#fff;border-radius:999px;padding:7px 12px;font:600 12px/1.2 system-ui,Arial,sans-serif;box-shadow:0 8px 24px rgba(0,0,0,.18);opacity:.86}.ths-template-forensic{max-width:1180px;margin:48px auto;padding:24px;background:#fff;border:1px solid #e8dccb;border-radius:16px;box-shadow:0 16px 42px rgba(23,50,77,.10);color:#17324d}.ths-template-forensic h2{margin:0 0 12px;font-size:24px}.ths-template-forensic table{width:100%;border-collapse:collapse;margin-top:16px;font-size:13px}.ths-template-forensic th,.ths-template-forensic td{border:1px solid #eee1d2;padding:10px;text-align:left;vertical-align:top}.ths-template-forensic th{background:#fbf6ef;color:#17324d}.ths-template-forensic code{white-space:normal;color:#6f6258}
.ths-template-render-warning{max-width:1180px;margin:24px auto;padding:14px 18px;border-radius:12px;background:#fff3cd;color:#664d03;border:1px solid #ffecb5;font:600 13px/1.4 system-ui,Arial,sans-serif}

/* v3.3 Branches locked stable full layout: mirror UX Builder 9/3 structure without UX Builder shortcodes. */
.ths-template-branches-layout{width:100%;padding:48px 16px 56px;background:transparent}.ths-template-branches-layout__inner{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:minmax(0,9fr) minmax(260px,3fr);gap:28px;align-items:start}.ths-template-branches-layout__main,.ths-template-branches-layout__sidebar{min-width:0}.ths-template-branches-layout__sidebar{position:relative;z-index:2}.ths-template-branches-page__voucher{margin-top:0}@media (max-width:849px){.ths-template-branches-layout{padding:32px 14px 42px}.ths-template-branches-layout__inner{display:block}.ths-template-branches-layout__sidebar{margin-top:24px}}

/* v4.0 Price engine init panel: admin/dev only, does not replace visual Price UI yet. */
.ths-template-price-engine-init{max-width:1180px;margin:36px auto 48px;padding:0 16px}.ths-template-price-engine-init__inner{background:#fff;border:1px solid #e8dccb;border-radius:18px;box-shadow:0 16px 42px rgba(23,50,77,.10);padding:22px;color:#17324d}.ths-template-price-engine-init h2{margin:0 0 8px;font-size:24px;line-height:1.2}.ths-template-price-engine-init p{margin:0 0 18px;color:#6f6258}.ths-template-price-engine-init__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ths-template-price-engine-init__grid>div{background:#fbf6ef;border:1px solid #eee1d2;border-radius:12px;padding:12px}.ths-template-price-engine-init__grid strong{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#b78645;margin-bottom:6px}.ths-template-price-engine-init__grid span{display:block;font-weight:700}.ths-template-price-engine-init__groups{margin-top:16px}.ths-template-price-engine-init__groups summary{cursor:pointer;font-weight:700}.ths-template-price-engine-init__groups ul{margin:10px 0 0;padding-left:18px;color:#6f6258}.ths-template-price-engine-init__groups code{color:#17324d}@media(max-width:849px){.ths-template-price-engine-init__grid{grid-template-columns:1fr}}

/* v4.1 Price render engine read-only: parallel data renderer, not replacing live UI yet. */
.ths-template-price-engine-render{max-width:1180px;margin:36px auto 54px;padding:0 16px}.ths-template-price-engine-render__inner{background:#fff;border:1px solid #e8dccb;border-radius:18px;box-shadow:0 16px 42px rgba(23,50,77,.10);padding:22px;color:#17324d}.ths-template-price-engine-render__head{margin-bottom:18px}.ths-template-price-engine-render__head span{display:inline-flex;padding:5px 9px;border-radius:999px;background:#fff4e4;border:1px solid #ead3ae;color:#b78645;font-size:11px;font-weight:800;letter-spacing:.08em}.ths-template-price-engine-render__head h2{margin:10px 0 8px;font-size:26px;line-height:1.2}.ths-template-price-engine-render__head p{margin:0 0 8px;color:#6f6258}.ths-template-price-engine-render__stats{color:#6f6258}.ths-template-price-engine-render__stats b{color:#17324d}.ths-template-price-engine-render__empty{padding:16px;border-radius:12px;background:#fff3cd;border:1px solid #ffecb5;color:#664d03}.ths-template-price-engine-render__groups{display:grid;gap:18px}.ths-template-price-engine-group{border-top:1px solid #eee1d2;padding-top:18px}.ths-template-price-engine-group header{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:12px}.ths-template-price-engine-group header small{font-size:12px;color:#b78645;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.ths-template-price-engine-group header h3{margin:0;font-size:22px}.ths-template-price-engine-group header em{font-style:normal;color:#9b8a7c;font-size:12px}.ths-template-price-engine-services{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.ths-template-price-engine-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.9fr);gap:14px;padding:14px;border:1px solid #eee1d2;border-radius:16px;background:#fffaf4}.ths-template-price-engine-card__label{display:inline-flex;padding:4px 8px;border-radius:999px;background:#17324d;color:#fff;font-size:11px;font-weight:700;margin-bottom:8px}.ths-template-price-engine-card h4{margin:0 0 8px;font-size:18px;line-height:1.25}.ths-template-price-engine-card p{margin:0 0 10px;color:#6f6258}.ths-template-price-engine-card code{display:inline-flex;white-space:normal;border:1px dashed #ead3ae;border-radius:8px;background:#fff;color:#b78645;padding:5px 8px}.ths-template-price-engine-card__prices{display:grid;align-content:start;gap:8px}.ths-template-price-engine-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border-radius:10px;background:#fff;border:1px solid #f0e4d5}.ths-template-price-engine-row strong{white-space:nowrap}.ths-template-price-engine-row span{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.ths-template-price-engine-row del{color:#b9aaa0;font-size:12px}.ths-template-price-engine-row b{color:#098646}.ths-template-price-engine-row i{font-style:normal;background:#df7f68;color:#fff;border-radius:999px;font-size:11px;font-weight:800;padding:3px 6px}.ths-template-price-engine-row.is-empty{color:#9b8a7c}@media(max-width:849px){.ths-template-price-engine-services,.ths-template-price-engine-card{grid-template-columns:1fr}.ths-template-price-engine-render__inner{padding:18px}.ths-template-price-engine-row{align-items:flex-start}}

/* v4.2 Price pure replacement: banner + engine main + sidebar + voucher, no UX Builder wrapper. */
.ths-template-price-layout{width:100%;padding:44px 16px 56px;background:transparent}.ths-template-price-layout__inner{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:minmax(0,9fr) minmax(260px,3fr);gap:28px;align-items:start}.ths-template-price-layout__main,.ths-template-price-layout__sidebar{min-width:0}.ths-template-price-layout__sidebar{position:relative;z-index:2}.ths-template-price-page__voucher{margin-top:0}.ths-template-price-layout .ths-template-price-engine-render{max-width:none;margin:0;padding:0}.ths-template-price-layout .ths-template-price-engine-render__inner{padding:24px 28px}.ths-template-price-engine-render--main .ths-template-price-engine-render__head{text-align:center}.ths-template-price-engine-render--main .ths-template-price-engine-render__head h2{font-size:34px;color:#17324d}.ths-template-price-engine-render--main .ths-template-price-engine-render__head p{font-size:15px}.ths-template-price-engine-render--main .ths-template-price-engine-services{grid-template-columns:1fr}.ths-template-price-engine-render--main .ths-template-price-engine-group header{justify-content:center;text-align:center;border-top:1px solid #eee1d2;padding-top:18px}.ths-template-price-engine-render--main .ths-template-price-engine-group:first-child header{border-top:0;padding-top:0}.ths-template-price-engine-render--main .ths-template-price-engine-group header h3{font-size:28px;width:100%;color:#17324d}.ths-template-price-engine-card__meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}.ths-template-price-engine-card__meta a{font-weight:800;color:#6f6258;text-decoration:none}.ths-template-price-engine-card__actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.ths-template-price-engine-btn{display:inline-flex;align-items:center;justify-content:center;min-height:42px;border-radius:999px;font-weight:800;text-decoration:none}.ths-template-price-engine-btn--video{background:#e58b75;color:#fff}.ths-template-price-engine-btn--book{background:#e5c66f;color:#17324d}@media(max-width:849px){.ths-template-price-layout{padding:32px 14px 42px}.ths-template-price-layout__inner{display:block}.ths-template-price-layout__sidebar{margin-top:24px}.ths-template-price-engine-render--main .ths-template-price-engine-render__head h2{font-size:28px}}


/* V9.3 Unified Subpage Layout
   One container/grid/sidebar contract for locked subpages:
   Price, Category Archive, Branches, and future template-system pages. */
:root{
  --ths-subpage-container:1180px;
  --ths-subpage-sidebar:300px;
  --ths-subpage-gap:24px;
  --ths-subpage-pad-x:16px;
  --ths-subpage-pad-y:40px;
}

/* Template baseline wrapper should never make each route invent its own width. */
.ths-template-baseline{
  --ths-subpage-container:1180px;
  --ths-subpage-sidebar:300px;
  --ths-subpage-gap:24px;
}

/* Branches locked layout */
.ths-template-branches-layout{
  padding:var(--ths-subpage-pad-y) var(--ths-subpage-pad-x) 56px !important;
}
.ths-template-branches-layout__inner{
  width:min(var(--ths-subpage-container),100%) !important;
  max-width:var(--ths-subpage-container) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) var(--ths-subpage-sidebar) !important;
  gap:var(--ths-subpage-gap) !important;
  align-items:start !important;
}
.ths-template-branches-layout__main,
.ths-template-branches-layout__sidebar{
  min-width:0 !important;
}
.ths-template-branches-layout__sidebar{
  width:100% !important;
  max-width:var(--ths-subpage-sidebar) !important;
}

/* Category archive locked layout */
.ths-category-archive-shell{
  padding:var(--ths-subpage-pad-y) var(--ths-subpage-pad-x) 56px !important;
}
.ths-category-archive-shell__inner{
  width:min(var(--ths-subpage-container),100%) !important;
  max-width:var(--ths-subpage-container) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) var(--ths-subpage-sidebar) !important;
  gap:var(--ths-subpage-gap) !important;
  align-items:start !important;
}
.ths-category-archive-shell__main,
.ths-category-archive-shell__sidebar{
  min-width:0 !important;
}
.ths-category-archive-shell__sidebar{
  width:100% !important;
  max-width:var(--ths-subpage-sidebar) !important;
}

/* Price renderer common shells found in the V7/V8/V9 price flow. */
.ths-v71-price-lock .ths-services-price-page,
.ths-v71-price-lock .ths-price-page,
.ths-v71-price-lock .ths-price-layout,
.ths-v71-price-lock .ths-price-menu-layout{
  width:min(var(--ths-subpage-container),100%) !important;
  max-width:var(--ths-subpage-container) !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.ths-v71-price-lock .ths-services-price-page__inner,
.ths-v71-price-lock .ths-price-page__inner,
.ths-v71-price-lock .ths-price-layout__inner,
.ths-v71-price-lock .ths-price-menu-layout__inner{
  width:100% !important;
  max-width:var(--ths-subpage-container) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) var(--ths-subpage-sidebar) !important;
  gap:var(--ths-subpage-gap) !important;
  align-items:start !important;
}

/* Sidebar widgets follow the same width in all locked contexts. */
.ths-template-baseline .ths-sidebar-right,
.ths-category-archive-lock .ths-sidebar-right,
.ths-v71-price-lock .ths-sidebar-right,
.ths-template-branches-layout .ths-sidebar-right{
  width:100% !important;
  max-width:var(--ths-subpage-sidebar) !important;
}

/* Avoid giant empty states stretching the visual rhythm. */
.ths-category-archive-lock .ths-bag,
.ths-category-archive-lock .ths-bag__empty,
.ths-category-archive-lock .ths-blog-archive-grid__empty{
  max-width:100% !important;
}

/* Mobile/tablet: all locked subpages become one column. */
@media (max-width:900px){
  :root{
    --ths-subpage-sidebar:100%;
    --ths-subpage-gap:18px;
    --ths-subpage-pad-x:12px;
    --ths-subpage-pad-y:26px;
  }

  .ths-template-branches-layout__inner,
  .ths-category-archive-shell__inner,
  .ths-v71-price-lock .ths-services-price-page__inner,
  .ths-v71-price-lock .ths-price-page__inner,
  .ths-v71-price-lock .ths-price-layout__inner,
  .ths-v71-price-lock .ths-price-menu-layout__inner{
    grid-template-columns:1fr !important;
  }

  .ths-template-branches-layout__sidebar,
  .ths-category-archive-shell__sidebar,
  .ths-v71-price-lock .ths-sidebar-right{
    max-width:100% !important;
  }
}


/* V9.3.1 Unified Layout Hotfix
   Correct split:
   - Branches is full-width / no-sidebar.
   - Category/Blog archive is content + right sidebar.
   - Do not force branches into the sidebar grid contract. */

/* Branches: restore full-width centered module layout. */
.ths-template-branches-layout,
.ths-template-route-branches .ths-template-branches-layout,
body .ths-template-branches-layout{
  padding:40px 16px 56px !important;
  background:transparent !important;
}
.ths-template-branches-layout__inner,
.ths-template-route-branches .ths-template-branches-layout__inner,
body .ths-template-branches-layout__inner{
  width:min(1180px,100%) !important;
  max-width:1180px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  display:block !important;
}
.ths-template-branches-layout__main,
.ths-template-route-branches .ths-template-branches-layout__main,
body .ths-template-branches-layout__main{
  width:100% !important;
  max-width:100% !important;
  margin:0 auto !important;
}
.ths-template-branches-layout__sidebar,
.ths-template-route-branches .ths-template-branches-layout__sidebar,
body .ths-template-branches-layout__sidebar{
  display:none !important;
}

/* Branches content/card grids should stay centered and not collapse left. */
.ths-template-route-branches .ths-branches,
.ths-template-branches-layout .ths-branches{
  width:100% !important;
  max-width:980px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
@media (min-width:1024px){
  .ths-template-route-branches .ths-branches,
  .ths-template-branches-layout .ths-branches{
    max-width:980px !important;
  }
}

/* Category archive: stable content + right sidebar contract. */
.ths-category-archive-lock{
  --ths-archive-container:1180px;
  --ths-archive-sidebar:300px;
  --ths-archive-gap:24px;
}
.ths-category-archive-shell{
  width:100% !important;
  padding:36px 16px 56px !important;
}
.ths-category-archive-shell__inner{
  width:min(var(--ths-archive-container),100%) !important;
  max-width:var(--ths-archive-container) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  display:grid !important;
  grid-template-columns:minmax(0, calc(100% - var(--ths-archive-sidebar) - var(--ths-archive-gap))) var(--ths-archive-sidebar) !important;
  gap:var(--ths-archive-gap) !important;
  align-items:start !important;
}
.ths-category-archive-shell__main{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}
.ths-category-archive-shell__sidebar{
  min-width:0 !important;
  width:var(--ths-archive-sidebar) !important;
  max-width:var(--ths-archive-sidebar) !important;
}
.ths-category-archive-shell__sidebar .ths-sidebar-right,
.ths-category-archive-shell__sidebar .ths-sidebar,
.ths-category-archive-shell__sidebar .ths-widget,
.ths-category-archive-shell__sidebar > *{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}

/* Keep archive content card visually aligned with Price/Article shell, not oversized. */
.ths-category-archive-lock .ths-category-archive-head,
.ths-category-archive-lock .ths-bag,
.ths-category-archive-lock .ths-bag__empty,
.ths-category-archive-lock .ths-blog-archive-grid__empty,
.ths-category-archive-lock .ths-archive-empty{
  width:100% !important;
  max-width:100% !important;
}

/* Price: only normalize sidebar width, do not force unknown shell classes too aggressively. */
.ths-v71-price-lock .ths-sidebar-right,
.ths-v71-price-lock .ths-sidebar,
.ths-v71-price-lock aside{
  max-width:300px;
}

/* Mobile */
@media (max-width:900px){
  .ths-category-archive-shell{
    padding:24px 12px 42px !important;
  }
  .ths-category-archive-shell__inner{
    display:block !important;
  }
  .ths-category-archive-shell__sidebar{
    width:100% !important;
    max-width:100% !important;
    margin-top:20px !important;
  }
  .ths-template-branches-layout,
  .ths-template-route-branches .ths-template-branches-layout{
    padding:28px 12px 44px !important;
  }
  .ths-template-route-branches .ths-branches,
  .ths-template-branches-layout .ths-branches{
    max-width:100% !important;
  }
}


/* V9.4.1 Generic Page Renderer */
.ths-generic-page-lock{
  --ths-generic-container:1180px;
  --ths-generic-sidebar:300px;
  --ths-generic-gap:24px;
  background:#fbf5ec;
}
.ths-generic-page-shell{
  padding:40px 16px 56px;
}
.ths-generic-page-shell__inner{
  width:min(var(--ths-generic-container),100%);
  max-width:var(--ths-generic-container);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) var(--ths-generic-sidebar);
  gap:var(--ths-generic-gap);
  align-items:start;
}
.ths-generic-page-shell__main,
.ths-generic-page-shell__sidebar{
  min-width:0;
}
.ths-generic-page-shell__sidebar .ths-sidebar-right,
.ths-generic-page-shell__sidebar .ths-sidebar,
.ths-generic-page-shell__sidebar > *{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.ths-generic-page-content{
  background:rgba(255,255,255,.84);
  border:1px solid rgba(183,134,69,.20);
  border-radius:22px;
  box-shadow:0 14px 36px rgba(23,50,77,.06);
  overflow:hidden;
}
.ths-generic-page-content__head{
  padding:28px 28px 18px;
  text-align:center;
  border-bottom:1px solid rgba(183,134,69,.12);
}
.ths-generic-page-content__eyebrow{
  display:inline-block;
  margin:0 0 8px;
  color:#b78645;
  font-size:12px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.ths-generic-page-content__head h1{
  margin:0;
  color:#17324d;
  font-size:clamp(30px,4vw,46px);
  line-height:1.12;
  font-weight:800;
}
.ths-generic-page-content__body{
  padding:26px 30px 34px;
  color:#6f6258;
  font-size:16px;
  line-height:1.85;
}
.ths-generic-page-content__body h2,
.ths-generic-page-content__body h3{
  color:#17324d;
  line-height:1.25;
}
.ths-generic-page-content__empty{
  padding:34px 30px;
  text-align:center;
  color:#6f6258;
}
@media (max-width:900px){
  .ths-generic-page-shell{
    padding:26px 12px 42px;
  }
  .ths-generic-page-shell__inner{
    display:block;
  }
  .ths-generic-page-shell__sidebar{
    margin-top:20px;
  }
  .ths-generic-page-content__head{
    padding:22px 18px 14px;
  }
  .ths-generic-page-content__body{
    padding:20px 18px 26px;
  }
}

/* ===== V10.7 — Unified Mobile Sidebar Width (built from V10.6) =====
   Goal: make legacy-clean pages (Price/Favorites/V7.1) use the same mobile sidebar
   width contract as the generic no-shortcode page renderer. CSS-only; no renderer change. */
@media (max-width: 849px){
  body .ths-services-price-layout,
  body .ths-template-price-layout,
  body .ths-generic-page-shell,
  body .ths-category-archive-shell{
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box !important;
  }

  body .ths-services-price-layout__inner,
  body .ths-template-price-layout__inner,
  body .ths-generic-page-shell__inner,
  body .ths-category-archive-shell__inner{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }

  body .ths-services-price-layout__sidebar,
  body .ths-template-price-layout__sidebar,
  body .ths-generic-page-shell__sidebar,
  body .ths-category-archive-shell__sidebar,
  body.ths-v71-price-locked .ths-services-price-layout__sidebar,
  body.ths-v71-price-locked .ths-template-price-layout__sidebar,
  body.ths-v71-price-locked .ths-v71-price-lock aside,
  body .ths-v71-price-lock .ths-services-price-layout__sidebar,
  body .ths-v71-price-lock aside{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:22px auto 0 !important;
    padding:0 !important;
    box-sizing:border-box !important;
  }

  body .ths-services-price-layout__sidebar .ths-sidebar-right,
  body .ths-template-price-layout__sidebar .ths-sidebar-right,
  body .ths-generic-page-shell__sidebar .ths-sidebar-right,
  body .ths-category-archive-shell__sidebar .ths-sidebar-right,
  body.ths-v71-price-locked .ths-sidebar-right,
  body .ths-v71-price-lock .ths-sidebar-right,
  body .ths-services-price-layout__sidebar .ths-sidebar,
  body .ths-template-price-layout__sidebar .ths-sidebar,
  body .ths-generic-page-shell__sidebar .ths-sidebar,
  body .ths-category-archive-shell__sidebar .ths-sidebar{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding:0 !important;
    box-sizing:border-box !important;
    float:none !important;
  }

  body .ths-services-price-layout__sidebar .ths-widget,
  body .ths-template-price-layout__sidebar .ths-widget,
  body .ths-generic-page-shell__sidebar .ths-widget,
  body .ths-category-archive-shell__sidebar .ths-widget,
  body .ths-v71-price-lock .ths-sidebar-right .ths-widget{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
  }
}
