:root{
  --th-primary:#1267f4;
  --th-primary-hover:#0d52c9;
  --th-bg:#ffffff;
  --th-surface:#ffffff;
  --th-soft:#f6f9ff;
  --th-text:#10182b;
  --th-muted:#6f7d96;
  --th-border:#dfe7f2;
  --th-success:#167c4a;
  --th-sidebar-bg:#ffffff;
  --th-sidebar-text:#21314f;
  --th-radius:14px;
  --th-radius-sm:10px;
  --th-content-width:1240px;
  --th-reading-width:880px;
  --th-sidebar-width:250px;
  --th-base-font:16px;
  --th-shadow:0 10px 32px rgba(30,55,100,.06);
  --th-topbar-h:64px;
  --th-control-h:48px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--th-bg);color:var(--th-text);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:var(--th-base-font);line-height:1.58;-webkit-font-smoothing:antialiased}
a{color:var(--th-primary)}
img{max-width:100%;height:auto}
button,input,textarea,select{font:inherit}
.th-app{min-height:100vh}

/* Sidebar */
.th-sidebar{position:fixed;inset:0 auto 0 0;width:var(--th-sidebar-width);background:var(--th-sidebar-bg);border-right:1px solid var(--th-border);padding:18px 12px;z-index:50;overflow:hidden;display:flex;flex-direction:column}
.th-brand{display:flex;align-items:center;gap:10px;padding:6px 14px 22px;text-decoration:none;color:var(--th-text);font-size:25px;font-weight:800;letter-spacing:-.04em}
.th-brand-mark{width:34px;height:34px;border-radius:10px;background:var(--th-primary);color:#fff;display:grid;place-items:center;font-size:18px}
.th-sidebar-nav{overflow:auto;min-height:0;padding-right:2px}.th-menu{list-style:none;margin:0;padding:0}
.th-menu li{margin:3px 0}
.th-menu a{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:10px;color:var(--th-sidebar-text);text-decoration:none;font-weight:550;transition:.15s ease}
.th-menu a:hover,.th-menu .current-menu-item>a,.th-menu .current_page_item>a,.th-menu .is-active>a{background:var(--th-soft);color:var(--th-primary)}
.th-menu .children,.th-menu .sub-menu{list-style:none;padding-left:14px;margin-top:4px}
.th-menu .children a,.th-menu .sub-menu a{font-size:14px;padding:9px 12px;color:var(--th-muted)}

/* Main shell */
.th-main{margin-left:var(--th-sidebar-width);min-height:100vh;display:flex;flex-direction:column}
.th-topbar{height:var(--th-topbar-h);border-bottom:1px solid var(--th-border);display:flex;align-items:center;padding:0 30px;position:sticky;top:0;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);z-index:30}
.th-topbar-spacer{flex:1}.th-language{font-size:14px;font-weight:650;color:var(--th-muted)}
.th-menu-toggle{display:none;border:0;background:transparent;font-size:24px;color:var(--th-text);padding:8px;cursor:pointer}
.th-content{width:min(var(--th-content-width),calc(100% - 56px));margin:0 auto;padding:40px 0 72px;flex:1}
.th-breadcrumbs{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:var(--th-muted);font-size:13px;margin:0 0 22px}
.th-breadcrumbs a{color:var(--th-muted);text-decoration:none}.th-breadcrumbs a:hover{color:var(--th-primary)}

/* Generic cards / typography */
.th-card{background:var(--th-surface);border:1px solid var(--th-border);border-radius:var(--th-radius);box-shadow:var(--th-shadow)}
.th-page{padding:28px}.th-page h1{font-size:clamp(34px,4.5vw,54px);letter-spacing:-.04em;line-height:1.06;margin:0 0 16px}.th-prose{max-width:var(--th-reading-width)}
.th-prose h2{margin-top:1.8em}.th-prose h3{margin-top:1.45em}.th-prose p{margin:0 0 1em}.th-prose a{color:var(--th-primary)}

/* === Tool page HTML architecture === */
.th-tool-page{width:100%}
.th-tool-hero{margin:0 0 18px}
.th-tool-hero h1{font-size:clamp(36px,5vw,58px);letter-spacing:-.045em;line-height:1.03;margin:0 0 12px;font-weight:820}
.th-tool-intro,.th-lead{font-size:clamp(17px,1.7vw,21px);line-height:1.5;color:var(--th-muted);margin:0;max-width:900px}

.th-tool-box{margin-top:24px;background:var(--th-surface);border:1px solid var(--th-border);border-radius:var(--th-radius);padding:24px;box-shadow:var(--th-shadow)}
.th-tool-columns,.th-tool-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.th-field label{display:block;font-weight:700;font-size:14px;margin:0 0 8px;color:var(--th-text)}
.th-field small,.th-help{display:block;color:var(--th-muted);font-size:13px;margin-top:7px}
.th-tool-page textarea,.th-tool-page input[type=text],.th-tool-page input[type=number],.th-tool-page input[type=url],.th-tool-page input[type=email],.th-tool-page select,.th-tool-content textarea,.th-tool-content input,.th-tool-content select{width:100%;border:1px solid var(--th-border);border-radius:var(--th-radius-sm);padding:13px 14px;color:var(--th-text);background:#fff;outline:none;transition:.15s ease}
.th-tool-page textarea,.th-tool-content textarea{min-height:220px;resize:vertical;line-height:1.55}
.th-tool-page textarea:focus,.th-tool-page input:focus,.th-tool-page select:focus,.th-tool-content textarea:focus,.th-tool-content input:focus,.th-tool-content select:focus{border-color:var(--th-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--th-primary) 12%,transparent)}
.th-options{display:flex;gap:14px 22px;flex-wrap:wrap;align-items:center;margin-top:16px;padding-top:16px;border-top:1px solid var(--th-border);font-size:14px}
.th-options label{display:inline-flex;gap:8px;align-items:center;cursor:pointer;color:var(--th-muted)}
.th-options input[type=checkbox],.th-options input[type=radio]{accent-color:var(--th-primary)}
.th-actions,.th-tool-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:18px}
.th-btn,.th-button,.th-tool-page button,.th-tool-page input[type=submit]{min-height:var(--th-control-h);border:1px solid transparent;border-radius:var(--th-radius-sm);padding:11px 18px;font-weight:750;cursor:pointer;transition:.15s ease;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.th-btn-primary,.th-button,.th-tool-page button:not(.th-btn-secondary):not(.th-btn-outline){background:var(--th-primary);color:#fff}
.th-btn-primary:hover,.th-button:hover,.th-tool-page button:not(.th-btn-secondary):not(.th-btn-outline):hover{background:var(--th-primary-hover)}
.th-btn-secondary,.th-button-secondary{background:#fff!important;color:var(--th-text)!important;border-color:var(--th-border)!important}
.th-btn-secondary:hover,.th-button-secondary:hover{background:var(--th-soft)!important}
.th-btn-outline,.th-button-outline{background:#fff!important;color:var(--th-primary)!important;border-color:var(--th-primary)!important}
.th-btn-outline:hover,.th-button-outline:hover{background:var(--th-soft)!important}
.th-tool-stats{display:flex;gap:10px 18px;flex-wrap:wrap;margin-top:15px;color:var(--th-muted);font-size:13px}
.th-tool-stats strong{color:var(--th-text)}
.th-privacy,.th-privacy-note{margin:14px 0 0;padding:14px 16px;border-radius:var(--th-radius-sm);background:var(--th-soft);color:var(--th-muted);font-size:14px;border:1px solid color-mix(in srgb,var(--th-primary) 10%,var(--th-border))}

/* Content below tool */
.th-section{margin-top:22px;padding:26px 0 0;border-top:1px solid var(--th-border)}
.th-section:first-of-type{border-top:0}
.th-section h2{font-size:clamp(25px,3vw,32px);line-height:1.15;letter-spacing:-.025em;margin:0 0 14px}
.th-section h3{font-size:18px;margin:0 0 8px}
.th-section p{max-width:var(--th-reading-width);color:var(--th-muted);margin:0 0 12px}
.th-section-header,.th-section-heading{display:flex;gap:20px;align-items:center;justify-content:space-between;margin-bottom:14px}
.th-section-header h2,.th-section-heading h2{margin:0}
.th-section-header a{font-size:14px;text-decoration:none;white-space:nowrap}

.th-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.th-step{border:1px solid var(--th-border);border-radius:var(--th-radius);padding:18px;background:var(--th-surface)}
.th-step-number{width:30px;height:30px;border-radius:9px;background:var(--th-soft);color:var(--th-primary);display:grid;place-items:center;font-size:13px;font-weight:800;margin-bottom:12px}
.th-step p{font-size:14px;margin:0}

.th-example{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.th-example>div{min-width:0}
.th-example pre{margin:0;border:1px solid var(--th-border);border-radius:var(--th-radius-sm);background:var(--th-soft);padding:16px;white-space:pre-wrap;overflow:auto;color:var(--th-text);font:14px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.th-features{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 28px;margin:0;padding:0;list-style:none;max-width:900px}
.th-features li{position:relative;padding-left:26px;color:var(--th-muted)}
.th-features li::before{content:'✓';position:absolute;left:0;top:0;color:var(--th-success);font-weight:800}

/* FAQ */
.th-faq{border:1px solid var(--th-border);border-radius:var(--th-radius);overflow:hidden;background:var(--th-surface)}
.th-faq details{border-top:1px solid var(--th-border)}.th-faq details:first-child{border-top:0}
.th-faq summary{cursor:pointer;list-style:none;padding:17px 18px;font-weight:700}.th-faq summary::-webkit-details-marker{display:none}
.th-faq summary::after{content:'+';float:right;color:var(--th-primary);font-size:22px;line-height:1}.th-faq details[open] summary::after{content:'−'}
.th-faq details>p,.th-faq details>div{padding:0 18px 17px;color:var(--th-muted);margin:0;max-width:none}

/* Related tools */
.th-related-tools,.th-related-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.th-tool-card,.th-related-item{display:block;border:1px solid var(--th-border);border-radius:var(--th-radius);padding:16px;text-decoration:none;color:var(--th-text);background:var(--th-surface);transition:.15s ease;min-width:0}
.th-tool-card:hover,.th-related-item:hover{border-color:var(--th-primary);box-shadow:var(--th-shadow);transform:translateY(-1px)}
.th-tool-card h3{margin:0 0 6px;font-size:16px}.th-tool-card p{margin:0;font-size:13px;color:var(--th-muted)}
.th-related-item{display:flex;gap:12px;align-items:flex-start}.th-related-icon{width:34px;height:34px;border-radius:9px;background:var(--th-soft);color:var(--th-primary);display:grid;place-items:center;flex:0 0 34px}.th-related-item small{display:block;color:var(--th-muted);font-size:13px;line-height:1.35;margin-top:4px}

/* File upload / converter helpers */
.th-dropzone{border:1.5px dashed var(--th-border);border-radius:var(--th-radius);padding:42px 22px;text-align:center;background:var(--th-soft);transition:.15s ease}
.th-dropzone:hover,.th-dropzone.is-dragging{border-color:var(--th-primary);background:color-mix(in srgb,var(--th-primary) 5%,#fff)}
.th-dropzone strong{display:block;font-size:18px;margin-bottom:5px}.th-dropzone span{display:block;color:var(--th-muted);font-size:14px}
.th-file-list{display:grid;gap:8px;margin-top:14px}.th-file-row{display:flex;gap:12px;align-items:center;justify-content:space-between;border:1px solid var(--th-border);border-radius:var(--th-radius-sm);padding:12px 14px}

/* Home / archives */
.th-home-hero{padding:30px 0 28px}.th-home-hero h1{font-size:clamp(38px,5vw,60px);letter-spacing:-.045em;line-height:1.03;margin:0 0 12px}.th-home-hero p{font-size:20px;color:var(--th-muted);max-width:820px;margin:0}.th-kicker{display:inline-block;color:var(--th-primary);font-weight:750;margin-bottom:10px}
.th-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.th-list-card{padding:20px;border:1px solid var(--th-border);border-radius:var(--th-radius);text-decoration:none;color:var(--th-text);background:var(--th-surface)}.th-list-card:hover{border-color:var(--th-primary);box-shadow:var(--th-shadow)}.th-list-card h2,.th-list-card h3{margin:0 0 7px}.th-list-card p{margin:0;color:var(--th-muted)}
.search-form{display:flex;gap:10px}.search-form label{flex:1}.search-field{width:100%;min-height:var(--th-control-h);padding:12px 15px;border:1px solid var(--th-border);border-radius:var(--th-radius-sm);font:inherit}.search-submit{border:0;background:var(--th-primary);color:#fff;border-radius:var(--th-radius-sm);padding:12px 18px;font-weight:700;cursor:pointer}

/* Footer */
.th-footer{border-top:1px solid var(--th-border);padding:22px 30px;display:flex;gap:24px;align-items:center;justify-content:space-between;color:var(--th-muted);font-size:13px}.th-footer strong{color:var(--th-text);margin-right:10px}.th-footer-menu{display:flex;gap:18px;list-style:none;margin:0;padding:0}.th-footer-menu a{color:var(--th-muted);text-decoration:none}.th-sidebar-overlay{display:none}

@media(max-width:1100px){.th-related-tools,.th-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.th-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:860px){
  :root{--th-topbar-h:62px}
  .th-sidebar{transform:translateX(-100%);transition:.22s ease;width:min(86vw,320px)}
  .th-sidebar-open .th-sidebar{transform:translateX(0)}
  .th-sidebar-open .th-sidebar-overlay{display:block;position:fixed;inset:0;background:rgba(13,27,56,.32);z-index:40}
  .th-main{margin-left:0}.th-menu-toggle{display:block}.th-topbar{padding:0 16px}
  .th-content{width:min(100% - 28px,var(--th-content-width));padding-top:24px}
  .th-tool-hero h1{font-size:38px}.th-tool-box{padding:16px}.th-tool-columns,.th-tool-grid,.th-example{grid-template-columns:1fr}.th-steps{grid-template-columns:1fr}.th-features{grid-template-columns:1fr}.th-page{padding:20px}
  .th-footer{padding:20px;align-items:flex-start;flex-direction:column}.th-related-tools,.th-related-grid,.th-card-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
  .th-content{width:calc(100% - 20px)}
  .th-tool-hero h1{font-size:34px}
  .th-actions,.th-tool-actions{display:grid;grid-template-columns:1fr}.th-actions>*{width:100%}
  .th-section-header{align-items:flex-start;flex-direction:column;gap:6px}
}


/* ToolHub 1.2 home */
.th-icon{width:21px;height:21px;flex:0 0 21px}
.th-home-hero{padding:22px 0 44px;max-width:1060px}
.th-home-hero h1{font-size:clamp(42px,5.2vw,68px);letter-spacing:-.052em;line-height:1.01;margin:0 0 16px;max-width:920px}
.th-home-hero p{font-size:clamp(17px,1.7vw,21px);line-height:1.55;color:var(--th-muted);max-width:820px;margin:0}
.th-kicker,.th-section-eyebrow{display:inline-block;color:var(--th-primary);font-weight:760;font-size:14px;margin-bottom:10px}
.th-tool-search{margin-top:26px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:0;border:1px solid var(--th-border);background:#fff;border-radius:13px;padding:6px;box-shadow:0 10px 30px rgba(30,55,100,.045);max-width:980px}
.th-tool-search:focus-within{border-color:var(--th-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--th-primary) 9%,transparent)}
.th-tool-search-icon{display:grid;place-items:center;color:var(--th-muted);padding-left:10px}
.th-tool-search input{min-width:0;width:100%;height:48px;border:0!important;box-shadow:none!important;outline:0;padding:0 12px;background:transparent;font-size:16px;color:var(--th-text)}
.th-tool-search button{height:48px;border:0;border-radius:9px;background:var(--th-primary);color:#fff;padding:0 22px;font-weight:750;cursor:pointer}
.th-tool-search button:hover{background:var(--th-primary-hover)}
.th-home-section{padding:30px 0;border-top:1px solid var(--th-border)}
.th-home-section .th-section-heading{margin-bottom:18px}
.th-home-section .th-section-heading h2{font-size:31px;letter-spacing:-.035em;margin:0}
.th-home-tools-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.th-home-tool-card{min-width:0;display:flex;align-items:center;gap:12px;padding:15px;border:1px solid var(--th-border);border-radius:var(--th-radius);text-decoration:none;color:var(--th-text);background:#fff;transition:.15s ease}
.th-home-tool-card:hover{border-color:color-mix(in srgb,var(--th-primary) 55%,var(--th-border));box-shadow:var(--th-shadow);transform:translateY(-1px)}
.th-home-tool-icon{width:38px;height:38px;border-radius:10px;background:var(--th-soft);color:var(--th-primary);display:grid;place-items:center;flex:0 0 38px}
.th-home-tool-icon .th-icon{width:18px;height:18px}
.th-home-tool-copy{min-width:0;display:block;flex:1}
.th-home-tool-copy strong{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-home-tool-copy small{display:block;color:var(--th-muted);font-size:12.5px;line-height:1.4;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.th-home-tool-arrow{color:var(--th-muted);font-size:18px}
.th-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.th-category-card{min-width:0;display:flex;align-items:flex-start;gap:14px;padding:19px;border:1px solid var(--th-border);border-radius:var(--th-radius);text-decoration:none;color:var(--th-text);background:var(--th-surface);transition:.15s ease}
.th-category-card:hover{border-color:var(--th-primary);box-shadow:var(--th-shadow);transform:translateY(-1px)}
.th-category-icon{width:43px;height:43px;border-radius:11px;background:var(--th-soft);color:var(--th-primary);display:grid;place-items:center;flex:0 0 43px}
.th-category-copy{min-width:0;flex:1}.th-category-copy strong{display:block;font-size:16px;margin-bottom:4px}.th-category-copy small{display:block;color:var(--th-muted);font-size:13px;line-height:1.45}
.th-category-arrow{color:var(--th-muted);padding-top:8px}
.th-home-note{margin-top:24px;border:1px solid color-mix(in srgb,var(--th-primary) 12%,var(--th-border));background:var(--th-soft);border-radius:var(--th-radius);padding:17px 20px}
.th-home-note strong{display:block;font-size:15px}.th-home-note span{display:block;color:var(--th-muted);font-size:13px;margin-top:2px}
.th-admin-empty{border:1px dashed var(--th-border);background:var(--th-soft);border-radius:var(--th-radius);padding:20px;color:var(--th-muted)}
.th-admin-empty strong{color:var(--th-text);display:block;margin-bottom:3px}

/* Search page */
.th-search-page{max-width:980px}.th-search-page h1{font-size:clamp(34px,4vw,48px);letter-spacing:-.04em;line-height:1.08;margin:0 0 20px}.th-tool-search-small{margin:0 0 28px}
.th-search-results{display:grid;gap:10px}.th-search-result{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;border:1px solid var(--th-border);border-radius:var(--th-radius);text-decoration:none;color:var(--th-text)}.th-search-result:hover{border-color:var(--th-primary);box-shadow:var(--th-shadow)}.th-search-result strong{font-size:17px}.th-search-result p{margin:4px 0 0;color:var(--th-muted);font-size:14px}.th-empty-search{padding:26px;border:1px solid var(--th-border);border-radius:var(--th-radius);background:var(--th-soft)}.th-empty-search h2{margin:0 0 6px}.th-empty-search p{margin:0;color:var(--th-muted)}

/* Cleaner footer */
.th-footer-brand{display:flex;align-items:baseline;gap:10px;min-width:0}.th-footer-brand span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.th-footer-links{display:flex;gap:18px}.th-footer-links a{color:var(--th-muted);text-decoration:none}

@media(max-width:1180px){.th-home-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.th-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:860px){.th-home-hero{padding-top:8px}.th-home-hero h1{font-size:42px}.th-category-grid{grid-template-columns:1fr}.th-footer-brand{display:block}.th-footer-brand span{display:block;margin-top:3px;white-space:normal}}
@media(max-width:560px){.th-home-tools-grid{grid-template-columns:1fr}.th-tool-search{grid-template-columns:auto minmax(0,1fr);padding:5px}.th-tool-search button{grid-column:1/-1;width:100%;margin-top:5px}.th-home-hero h1{font-size:36px}.th-home-section .th-section-heading h2{font-size:27px}}

/* === ToolHub 1.3 UI polish === */
:root{
  --th-content-width:1280px;
  --th-control-h:48px;
}

/* Slightly roomier desktop canvas */
@media(min-width:1200px){
  .th-content{width:min(var(--th-content-width),calc(100% - 64px));padding-top:34px}
  .th-tool-page-entry{width:100%}
  .th-tool-hero h1{font-size:clamp(44px,3.7vw,58px)}
}

/* Tool work area */
.th-tool-box{padding:26px 26px 24px;margin-top:22px}
.th-tool-columns,.th-tool-grid{gap:18px}
.th-field label{font-size:15px;margin-bottom:9px}
.th-tool-page textarea,.th-tool-content textarea{min-height:190px;font-size:15px}
.th-field-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px;color:var(--th-muted);font-size:13px}
.th-field-meta strong{color:var(--th-text);font-weight:750}

/* Options are compact and readable */
.th-options{gap:12px 26px;margin-top:18px;padding-top:18px}
.th-options label,.th-check{font-size:14px;color:var(--th-muted)}
.th-options input[type=checkbox],.th-options input[type=radio]{width:17px;height:17px;flex:0 0 auto}
.th-options input:disabled+span{opacity:.62}

/* Result stats: horizontal cards instead of a vertical list */
.th-result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}
.th-stat{border:1px solid var(--th-border);background:var(--th-soft);border-radius:var(--th-radius-sm);padding:11px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.th-stat-label{font-size:13px;color:var(--th-muted);white-space:nowrap}
.th-stat strong{font-size:18px;line-height:1;color:var(--th-text)}

/* Action hierarchy */
.th-actions,.th-tool-actions{gap:10px;margin-top:18px}
.th-actions .th-btn-primary,.th-tool-actions .th-btn-primary{min-width:190px}
.th-actions .th-btn-outline:last-child,.th-tool-actions .th-btn-outline:last-child{margin-left:auto}
.th-btn,.th-button,.th-tool-page button,.th-tool-page input[type=submit]{padding-inline:20px}

/* Privacy is secondary, not a second hero */
.th-privacy,.th-privacy-note{padding:11px 14px;font-size:13px;margin-top:12px;display:flex;align-items:center;gap:8px}

/* Cleaner content rhythm */
.th-section{border-top:0;margin-top:42px;padding-top:0}
.th-section h2{font-size:clamp(27px,2.35vw,33px);margin-bottom:15px}
.th-section p{font-size:15px;line-height:1.68}
.th-steps{gap:16px}
.th-step{padding:20px}
.th-step h3{font-size:17px}
.th-step p{font-size:14px;line-height:1.55}
.th-example{gap:16px}
.th-example pre{min-height:142px;padding:17px;font-size:14px}
.th-features{max-width:none;gap:12px 34px}
.th-features li{font-size:14px;line-height:1.55}

/* FAQ refinement */
.th-faq summary{padding:16px 18px;font-size:14px}
.th-faq details>p,.th-faq details>div{font-size:14px;line-height:1.6}

/* Related tools — robust against WordPress wpautop wrappers */
.th-related-tools,.th-related-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.th-related-tools>p,.th-related-grid>p{display:contents}
.th-related-tools>p:empty,.th-related-grid>p:empty,.th-related-tools>br,.th-related-grid>br{display:none!important}
.th-related-tools .th-tool-card,.th-related-grid .th-tool-card{height:100%;padding:18px}
.th-tool-card h3{font-size:15px;line-height:1.35}
.th-tool-card p{font-size:13px;line-height:1.5}

/* Footer should feel finished but stay quiet */
.th-footer{padding:24px 32px;min-height:72px}
.th-footer-brand strong{font-size:14px}
.th-footer-brand span{font-size:12.5px}
.th-footer-links a,.th-footer-menu a{font-size:12.5px}
.th-footer-links a:hover,.th-footer-menu a:hover{color:var(--th-primary)}

/* Sidebar spacing */
.th-menu li{margin:4px 0}
.th-menu a{padding:11px 14px}

@media(max-width:1100px){
  .th-result-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:860px){
  .th-result-stats{grid-template-columns:1fr}
  .th-actions .th-btn-outline:last-child,.th-tool-actions .th-btn-outline:last-child{margin-left:0}
  .th-tool-page textarea,.th-tool-content textarea{min-height:180px}
  .th-section{margin-top:34px}
}
@media(max-width:520px){
  .th-tool-box{padding:14px}
  .th-result-stats{gap:8px}
  .th-stat{padding:10px 12px}
}


/* === ToolHub 1.3.1 final tool-page polish === */
/* More compact work area while keeping it comfortable on large screens */
.th-tool-page textarea,.th-tool-content textarea{min-height:170px}
.th-tool-box{padding:24px}
.th-result-stats{margin-top:16px}
.th-stat{padding:12px 15px}
.th-stat-label{font-size:12.5px}
.th-stat strong{font-size:21px;font-weight:800;letter-spacing:-.02em}

/* Stronger primary action, quiet utility actions */
.th-actions .th-btn-primary,.th-tool-actions .th-btn-primary{min-width:180px;padding-inline:24px}
.th-btn,.th-button,.th-tool-page button,.th-tool-page input[type=submit]{font-size:14px}

/* Softer feature bullets */
.th-features li::before{
  content:'✓';
  width:18px;height:18px;border-radius:50%;
  display:grid;place-items:center;
  background:color-mix(in srgb,var(--th-success) 10%,#fff);
  font-size:11px;line-height:1;
  top:2px;
}
.th-features li{padding-left:27px}

/* Related tools: only real tool cards should participate in the grid. */
.th-related-tools,.th-related-grid{align-items:stretch}
.th-related-tools>.th-tool-card,.th-related-grid>.th-tool-card,
.th-related-tools>.th-related-item,.th-related-grid>.th-related-item{display:block}
.th-related-tools>.th-tool-card,.th-related-grid>.th-tool-card{min-height:112px}

/* Footer polish */
.th-footer{background:#fff}
.th-footer-links,.th-footer-menu{align-items:center;flex-wrap:wrap}
.th-footer-brand{max-width:58%}

@media(max-width:860px){
  .th-tool-page textarea,.th-tool-content textarea{min-height:155px}
  .th-footer-brand{max-width:none}
}

/* =========================================================
   ToolHub 1.4 — modern product UI
   ========================================================= */
:root{
  --th-bg:#f7faff;
  --th-soft:#eef5ff;
  --th-border:#dce7f6;
  --th-radius:16px;
  --th-radius-sm:12px;
  --th-shadow:0 18px 50px rgba(24,74,150,.08);
  --th-shadow-hover:0 22px 60px rgba(24,74,150,.13);
  --th-topbar-h:70px;
}

body{
  background:
    radial-gradient(circle at 78% 5%,rgba(66,133,255,.10),transparent 27rem),
    radial-gradient(circle at 16% 42%,rgba(74,165,255,.07),transparent 26rem),
    var(--th-bg);
}

/* Sidebar */
.th-sidebar{
  background:linear-gradient(180deg,#fbfdff 0%,#f8fbff 100%);
  border-right:1px solid rgba(184,205,234,.7);
  box-shadow:8px 0 35px rgba(43,83,145,.035);
  padding:16px 12px;
}
.th-brand{padding:2px 10px 20px;font-size:24px;gap:10px}
.th-brand-mark{
  width:36px;height:36px;border-radius:11px;
  background:linear-gradient(145deg,var(--th-primary),#3d8cff);
  box-shadow:0 8px 20px color-mix(in srgb,var(--th-primary) 24%,transparent);
}
.th-menu a{border:1px solid transparent;padding:11px 13px;font-weight:600}
.th-menu a:hover,.th-menu .current-menu-item>a,.th-menu .current_page_item>a,.th-menu .is-active>a{
  background:linear-gradient(135deg,color-mix(in srgb,var(--th-primary) 10%,#fff),#f7fbff);
  border-color:color-mix(in srgb,var(--th-primary) 11%,var(--th-border));
  box-shadow:0 6px 16px rgba(44,104,198,.05);
}
.th-menu .th-icon{width:19px;height:19px}

/* Topbar */
.th-topbar{
  height:var(--th-topbar-h);
  padding:0 28px;
  background:rgba(250,252,255,.82);
  border-bottom:1px solid rgba(188,207,232,.65);
  backdrop-filter:blur(20px) saturate(140%);
  gap:18px;
}
.th-top-search{
  width:min(620px,58vw);height:42px;display:flex;align-items:center;gap:9px;
  padding:0 13px;border-radius:13px;background:rgba(238,245,255,.92);
  border:1px solid transparent;transition:.18s ease;
}
.th-top-search:focus-within{background:#fff;border-color:color-mix(in srgb,var(--th-primary) 24%,var(--th-border));box-shadow:0 0 0 4px color-mix(in srgb,var(--th-primary) 8%,transparent)}
.th-top-search-icon{display:grid;place-items:center;color:var(--th-muted)}
.th-top-search-icon .th-icon{width:18px;height:18px}
.th-top-search input{width:100%;border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;outline:none;color:var(--th-text);font-size:13px}
.th-top-search input::placeholder{color:#8a99b2}
.th-topbar-actions{margin-left:auto;display:flex;align-items:center;gap:12px}
.th-language{padding:8px 10px;border-radius:10px;color:var(--th-text);font-weight:700}

/* Canvas */
.th-content{width:min(var(--th-content-width),calc(100% - 68px));padding:28px 0 76px}
.th-breadcrumbs{margin-bottom:16px;font-size:12.5px;color:#8b9bb4}
.th-breadcrumbs a{color:#8b9bb4}

/* Tool hero */
.th-tool-page{position:relative}
.th-tool-hero{position:relative}
.th-tool-hero h1{
  font-size:clamp(38px,4.1vw,60px);font-weight:850;letter-spacing:-.052em;
  line-height:.98;margin-bottom:11px;max-width:1000px;
}
.th-tool-intro,.th-lead{font-size:18px;color:#70809b;max-width:900px}

/* Main tool card */
.th-tool-box{
  position:relative;overflow:hidden;
  margin-top:26px;padding:22px;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(252,254,255,.96));
  border:1px solid rgba(194,212,237,.82);
  border-radius:20px;
  box-shadow:0 22px 65px rgba(31,82,158,.10);
}
.th-tool-box::before{
  content:"";position:absolute;right:-100px;top:-130px;width:320px;height:320px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(60,132,255,.09),rgba(60,132,255,0) 68%);
}
.th-tool-columns,.th-tool-grid{gap:16px;position:relative;z-index:1}
.th-field{min-width:0}
.th-field label{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:800;margin-bottom:9px}
.th-field label::before{
  content:"";width:27px;height:27px;border-radius:9px;display:inline-block;flex:0 0 auto;
  background:linear-gradient(145deg,#edf5ff,#e4efff);border:1px solid #dbe9fb;
  box-shadow:inset 0 0 0 7px #f6faff;
}
.th-tool-page textarea,.th-tool-content textarea{
  min-height:190px;background:linear-gradient(180deg,#fff,#fbfdff);
  border-color:#d8e5f5;border-radius:14px;padding:15px 16px;
  box-shadow:inset 0 1px 3px rgba(39,69,112,.025);font-size:14px;
}
.th-tool-page textarea::placeholder{color:#9aa8bd}
.th-tool-page textarea:focus,.th-tool-page input:focus,.th-tool-page select:focus,
.th-tool-content textarea:focus,.th-tool-content input:focus,.th-tool-content select:focus{
  border-color:color-mix(in srgb,var(--th-primary) 55%,#c8d8ef);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--th-primary) 9%,transparent);
}
.th-field-meta{font-size:12px;color:#8797b0}.th-field-meta strong{font-size:13px}

/* Options */
.th-options{margin-top:18px;padding:16px 2px 0;border-top:1px solid #e5edf8;gap:11px 26px}
.th-options label,.th-check{font-size:13px;color:#74839c;font-weight:550}
.th-options input[type=checkbox],.th-options input[type=radio]{width:18px;height:18px}

/* Stats */
.th-result-stats{gap:12px;margin-top:17px}
.th-stat{
  min-height:66px;padding:11px 15px 11px 55px;position:relative;
  background:linear-gradient(145deg,#f8fbff,#f2f7ff);
  border:1px solid #dfeaf8;border-radius:14px;
  align-items:center;
}
.th-stat::before{
  content:"";position:absolute;left:13px;top:50%;transform:translateY(-50%);
  width:31px;height:31px;border-radius:10px;background:linear-gradient(145deg,#e6f1ff,#f5f9ff);
  border:1px solid #d7e7fb;
}
.th-stat:nth-child(2)::before{background:linear-gradient(145deg,#ece8ff,#f8f6ff);border-color:#e6defb}
.th-stat:nth-child(3)::before{background:linear-gradient(145deg,#e8f8f2,#f5fcf9);border-color:#d8efe6}
.th-stat-label{font-size:12px;color:#7e8da6}
.th-stat strong{font-size:22px}

/* Buttons */
.th-actions,.th-tool-actions{margin-top:16px}
.th-btn,.th-button,.th-tool-page button,.th-tool-page input[type=submit]{
  min-height:46px;border-radius:12px;font-size:13.5px;font-weight:800;padding:10px 20px;
  box-shadow:none;
}
.th-btn-primary,.th-button,.th-tool-page button:not(.th-btn-secondary):not(.th-btn-outline){
  background:linear-gradient(135deg,var(--th-primary),#3585ff);box-shadow:0 10px 24px color-mix(in srgb,var(--th-primary) 20%,transparent)
}
.th-btn-primary:hover,.th-button:hover,.th-tool-page button:not(.th-btn-secondary):not(.th-btn-outline):hover{transform:translateY(-1px);box-shadow:0 13px 28px color-mix(in srgb,var(--th-primary) 25%,transparent)}
.th-btn-secondary,.th-button-secondary,.th-btn-outline,.th-button-outline{box-shadow:0 4px 14px rgba(40,72,120,.035)}

/* Privacy */
.th-privacy,.th-privacy-note{
  margin-top:12px;border-radius:13px;background:linear-gradient(90deg,#f5f9ff,#f9fcff);
  border-color:#dbe8f8;color:#6f819e;padding:10px 14px;font-size:12.5px;
}

/* Content sections */
.th-section{margin-top:44px}
.th-section h2{font-size:clamp(27px,2.4vw,34px);font-weight:830;letter-spacing:-.035em;margin-bottom:15px}
.th-section h3{font-weight:800}
.th-section p{color:#667791;line-height:1.7}

/* Description block gets a subtle visual cue without new HTML */
.th-tool-hero + .th-section,
.th-tool-page > .th-section:first-of-type{
  position:relative;padding:24px 26px;border-radius:18px;
  background:linear-gradient(135deg,rgba(242,247,255,.9),rgba(255,255,255,.72));
  border:1px solid #e3edf9;
}

/* Steps */
.th-steps{gap:14px}
.th-step{
  position:relative;overflow:hidden;padding:18px 18px 19px;background:linear-gradient(180deg,#fff,#fbfdff);
  border:1px solid #dfe9f6;border-radius:16px;box-shadow:0 8px 24px rgba(38,78,137,.045)
}
.th-step::after{content:"";position:absolute;right:-35px;bottom:-45px;width:100px;height:100px;border-radius:50%;background:radial-gradient(circle,rgba(39,113,255,.07),transparent 70%)}
.th-step-number{width:32px;height:32px;border-radius:50%;background:linear-gradient(145deg,var(--th-primary),#438eff);color:#fff;box-shadow:0 7px 16px color-mix(in srgb,var(--th-primary) 18%,transparent)}

/* Example */
.th-example{gap:18px;align-items:stretch}
.th-example>div{padding:17px;border-radius:16px;border:1px solid #e0eaf6;background:#fff;box-shadow:0 8px 24px rgba(36,79,143,.04)}
.th-example pre{border:0;background:linear-gradient(135deg,#edf5ff,#f7faff);min-height:150px;padding:16px;border-radius:12px}

/* Features */
.th-features{gap:13px 36px}
.th-features li{font-size:14px;color:#6f8098;padding-left:31px}
.th-features li::before{width:21px;height:21px;background:linear-gradient(145deg,#c9f4df,#e8fff4);color:#15925d;box-shadow:0 4px 10px rgba(22,146,93,.08)}

/* FAQ */
.th-faq{border-radius:16px;border-color:#dfe9f6;box-shadow:0 8px 24px rgba(37,78,138,.035)}
.th-faq details{border-color:#e6edf7}
.th-faq summary{padding:15px 17px 15px 48px;position:relative;font-size:13.5px}
.th-faq summary::before{content:"?";position:absolute;left:16px;top:50%;transform:translateY(-50%);width:21px;height:21px;border-radius:50%;display:grid;place-items:center;color:var(--th-primary);background:#edf5ff;border:1px solid #d8e7fb;font-weight:800;font-size:12px}
.th-faq summary::after{font-size:18px}

/* Related tools */
.th-related-tools,.th-related-grid{gap:13px}
.th-tool-card,.th-related-item{
  position:relative;overflow:hidden;padding:16px 16px 16px 58px!important;min-height:104px!important;
  border-radius:16px;background:linear-gradient(180deg,#fff,#fbfdff);border-color:#dfe9f6;
  box-shadow:0 7px 22px rgba(38,77,137,.035)
}
.th-tool-card::before,.th-related-item::before{
  content:"↔";position:absolute;left:15px;top:16px;width:32px;height:32px;border-radius:10px;
  display:grid;place-items:center;font-size:15px;font-weight:900;color:#7357ee;
  background:linear-gradient(145deg,#eee9ff,#faf8ff);border:1px solid #e5ddff
}
.th-tool-card:nth-child(2)::before{content:"↕";color:#15925d;background:linear-gradient(145deg,#dcf8eb,#f2fff9);border-color:#d1f0e2}
.th-tool-card:nth-child(3)::before{content:"≡";color:#f0772a;background:linear-gradient(145deg,#fff0e7,#fff9f5);border-color:#f9dfcf}
.th-tool-card:nth-child(4)::before{content:"⇄";color:#e84478;background:linear-gradient(145deg,#ffe8f0,#fff6f9);border-color:#f9dbe6}
.th-tool-card:hover,.th-related-item:hover{transform:translateY(-3px);box-shadow:var(--th-shadow-hover);border-color:color-mix(in srgb,var(--th-primary) 26%,var(--th-border))}
.th-tool-card h3{font-size:14px;margin-bottom:5px}.th-tool-card p{font-size:12px;line-height:1.45}

/* Footer */
.th-footer{padding:20px 30px;background:rgba(255,255,255,.7);border-top:1px solid #dfe9f5;backdrop-filter:blur(10px)}
.th-footer-logo{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--th-text)}
.th-footer-logo .th-brand-mark{width:25px;height:25px;border-radius:8px;font-size:12px;box-shadow:none}
.th-footer-brand{display:flex;align-items:center;gap:12px}.th-footer-brand>span{font-size:12px}
.th-footer-links a{font-size:12px}

/* Home */
.th-home-hero{padding-top:8px}
.th-home-hero h1{font-weight:850;letter-spacing:-.05em}
.th-tool-search{border-radius:16px;box-shadow:0 14px 38px rgba(28,76,148,.07)}
.th-home-tool-card,.th-category-card{border-color:#dfe9f6;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 7px 22px rgba(38,77,137,.035)}
.th-home-tool-card:hover,.th-category-card:hover{transform:translateY(-3px);box-shadow:var(--th-shadow-hover)}

@media(max-width:1024px){
  .th-top-search{width:min(520px,55vw)}
}
@media(max-width:860px){
  .th-topbar{padding:0 16px}
  .th-top-search{width:100%;max-width:none}
  .th-topbar-actions{display:none}
  .th-content{width:min(100% - 28px,var(--th-content-width));padding-top:22px}
  .th-tool-box{border-radius:17px;padding:16px}
  .th-tool-columns,.th-tool-grid{grid-template-columns:1fr}
  .th-related-tools,.th-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .th-top-search input{font-size:12px}
  .th-tool-hero h1{font-size:36px}
  .th-result-stats{grid-template-columns:1fr}
  .th-related-tools,.th-related-grid{grid-template-columns:1fr}
  .th-example{grid-template-columns:1fr}
  .th-steps{grid-template-columns:1fr}
  .th-features{grid-template-columns:1fr}
  .th-footer{display:block}
  .th-footer-links{margin-top:12px}
}
\n\n/* === ToolHub 1.4.1 final polish === */\n/* Wider, more useful header search */\n.th-top-search{width:min(540px,48vw);min-height:42px;padding:0 14px;border-radius:13px}\n.th-top-search input{font-size:14px}\n\n/* Slightly richer tool canvas without distracting from the task */\n.toolhub-tool-template .th-content{position:relative}\n.toolhub-tool-template .th-content::before{\n  content:"";position:fixed;z-index:-1;pointer-events:none;\n  width:560px;height:560px;right:2vw;top:70px;border-radius:50%;\n  background:radial-gradient(circle,rgba(47,126,255,.08),rgba(47,126,255,0) 68%);\n}\n.th-tool-box{box-shadow:0 24px 70px rgba(31,82,158,.12)}\n\n/* Stats: stronger information hierarchy */\n.th-stat{min-height:72px;padding:12px 16px 12px 58px}\n.th-stat-label{font-size:12.5px;font-weight:650}\n.th-stat strong{font-size:25px;font-weight:850;letter-spacing:-.03em}\n.th-stat::after{content:"";position:absolute;left:23px;top:50%;width:8px;height:8px;border-radius:50%;transform:translate(-50%,-50%);background:var(--th-primary);box-shadow:0 0 0 5px rgba(18,103,244,.08)}\n.th-stat:nth-child(2)::after{background:#7c5cff;box-shadow:0 0 0 5px rgba(124,92,255,.08)}\n.th-stat:nth-child(3)::after{background:#20a66a;box-shadow:0 0 0 5px rgba(32,166,106,.08)}\n\n/* More confident actions */\n.th-actions .th-btn-primary,.th-tool-actions .th-btn-primary{min-width:210px;min-height:50px;font-size:14px;padding-inline:26px}\n.th-actions .th-btn-secondary,.th-actions .th-btn-outline,.th-tool-actions .th-btn-secondary,.th-tool-actions .th-btn-outline{min-height:50px;padding-inline:22px}\n\n/* Never render empty related cards created by editor parsing */\n.th-related-tools>.th-tool-card:empty,.th-related-grid>.th-tool-card:empty,\n.th-related-tools>.th-related-item:empty,.th-related-grid>.th-related-item:empty{display:none!important}\n.th-related-tools>.th-tool-card:not(:has(h2,h3,strong)),\n.th-related-grid>.th-tool-card:not(:has(h2,h3,strong)),\n.th-related-tools>.th-related-item:not(:has(h2,h3,strong)),\n.th-related-grid>.th-related-item:not(:has(h2,h3,strong)){display:none!important}\n\n/* More finished footer */\n.th-footer{min-height:76px;padding:20px 34px}\n.th-footer-brand{gap:14px}\n.th-footer-links,.th-footer-menu{gap:20px}\n.th-footer a:hover{color:var(--th-primary)}\n\n@media(max-width:1100px){\n  .th-top-search{width:min(460px,48vw)}\n}\n@media(max-width:860px){\n  .th-top-search{width:100%;min-height:40px}\n  .toolhub-tool-template .th-content::before{display:none}\n}\n@media(max-width:560px){\n  .th-actions .th-btn-primary,.th-tool-actions .th-btn-primary,\n  .th-actions .th-btn-secondary,.th-actions .th-btn-outline,\n  .th-tool-actions .th-btn-secondary,.th-tool-actions .th-btn-outline{width:100%;min-width:0}\n}\n
/* 1.4.4 generic text tool controls */
.th-inline-field{min-width:180px;max-width:320px;margin:0}.th-options .th-inline-field input,.th-options .th-inline-field select{min-height:42px}.th-generic-text-tool .th-field-meta{font-size:.82rem;color:var(--th-muted);margin-top:7px}.th-generic-text-tool .th-options{align-items:end}.th-generic-text-tool .th-g-output{background:#fbfdff}

/* === ToolHub 1.4.5 category catalogue polish === */
.th-category-page{width:100%}
.th-category-hero{margin:0 0 28px}
.th-category-hero h1{margin:14px 0 10px;font-size:clamp(34px,3.5vw,48px);line-height:1.05;letter-spacing:-.04em}
.th-category-intro{max-width:900px;margin:0;color:var(--th-muted);font-size:16px;line-height:1.6}
.th-category-search{margin-top:20px;width:min(760px,100%);max-width:none}
.th-category-search input{
  width:100%;min-height:50px;padding:0 16px;border:1px solid var(--th-border);border-radius:14px;
  background:#fff;color:var(--th-text);font-size:15px;outline:0;
  box-shadow:0 9px 28px rgba(38,77,137,.045);transition:.16s ease
}
.th-category-search input:focus{border-color:color-mix(in srgb,var(--th-primary) 58%,var(--th-border));box-shadow:0 0 0 4px color-mix(in srgb,var(--th-primary) 8%,transparent),0 12px 34px rgba(38,77,137,.07)}

.th-category-page>.th-section{margin:0 0 30px;padding:0;background:transparent;border:0;box-shadow:none}
.th-category-page>.th-section+.th-section{margin-top:0}
.th-category-page .th-section-header{margin:0 0 13px;align-items:end}
.th-category-page .th-section-header h2,.th-category-page>.th-section>h2{margin:0;font-size:24px;letter-spacing:-.025em}

.th-category-grid,.th-category-grid-featured{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;
  align-items:stretch
}
.th-category-grid>.th-category-card,.th-category-grid-featured>.th-category-card{
  display:flex!important;min-width:0;min-height:112px;padding:16px!important;gap:12px;align-items:flex-start;
  border:1px solid #dfe9f6;border-radius:15px;background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 7px 22px rgba(38,77,137,.035);text-decoration:none;color:var(--th-text);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease
}
.th-category-grid>.th-category-card:hover,.th-category-grid-featured>.th-category-card:hover{
  transform:translateY(-2px);border-color:color-mix(in srgb,var(--th-primary) 28%,var(--th-border));box-shadow:0 14px 34px rgba(38,77,137,.085)
}
.th-category-grid>.th-category-card h3,.th-category-grid-featured>.th-category-card h3{margin:0 0 5px;font-size:15px;line-height:1.3;letter-spacing:-.01em}
.th-category-grid>.th-category-card p,.th-category-grid-featured>.th-category-card p{margin:0;color:var(--th-muted);font-size:12.5px;line-height:1.45}
.th-category-grid>.th-category-card>div,.th-category-grid-featured>.th-category-card>div{min-width:0}
.th-category-icon{width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#edf5ff;color:var(--th-primary);font-size:12px;font-weight:850;display:grid;place-items:center}
.th-category-grid-featured>.th-category-card{min-height:126px;padding:18px!important}
.th-category-grid-featured .th-category-icon{width:40px;height:40px;flex-basis:40px}

/* Gutenberg may add p/br/div wrappers in Custom HTML. These should never occupy grid cells. */
.th-category-grid>p:empty,.th-category-grid>br,.th-category-grid>div:empty,
.th-category-grid-featured>p:empty,.th-category-grid-featured>br,.th-category-grid-featured>div:empty{display:none!important}

.th-category-seo-text{max-width:920px;margin-top:34px!important;padding:22px 24px!important;border:1px solid #dfe9f6!important;border-radius:16px!important;background:rgba(255,255,255,.58)!important}
.th-category-seo-text p{font-size:14px;line-height:1.65;color:var(--th-muted)}

@media(max-width:1080px){
  .th-category-grid,.th-category-grid-featured{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
  .th-category-grid,.th-category-grid-featured{grid-template-columns:1fr!important}
  .th-category-grid>.th-category-card,.th-category-grid-featured>.th-category-card{min-height:auto}
  .th-category-hero h1{font-size:34px}
  .th-category-intro{font-size:15px}
}

/* === ToolHub 1.4.6 category card modernization === */
.th-category-hero{margin-bottom:34px}
.th-category-search{position:relative;width:min(820px,100%);margin-top:22px}
.th-category-search::before{
  content:"⌕";position:absolute;left:17px;top:50%;transform:translateY(-52%);z-index:2;
  color:#7d8eaa;font-size:20px;font-weight:700;pointer-events:none;
}
.th-category-search input{
  min-height:52px!important;padding:0 18px 0 48px!important;border-radius:15px!important;
  background:rgba(255,255,255,.94)!important;box-shadow:0 10px 30px rgba(36,78,140,.06)!important;
}

.th-category-page>.th-section{margin-bottom:38px}
.th-category-page .th-section-header{margin-bottom:15px}
.th-category-page .th-section-header h2,.th-category-page>.th-section>h2{
  font-size:25px;line-height:1.15;font-weight:850;letter-spacing:-.035em;
}

/* Regular catalogue cards: product-like, vertical hierarchy */
.th-category-grid>.th-category-card,
.th-category-grid-featured>.th-category-card{
  position:relative!important;display:block!important;overflow:hidden!important;
  min-height:148px!important;padding:18px 46px 18px 18px!important;
  border-radius:17px!important;border:1px solid #dfe9f6!important;
  background:linear-gradient(155deg,rgba(255,255,255,.98),rgba(248,251,255,.97))!important;
  box-shadow:0 9px 28px rgba(39,77,136,.045)!important;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease!important;
}
.th-category-grid>.th-category-card::before{
  content:"✦";display:grid;place-items:center;width:38px;height:38px;margin:0 0 15px;
  border-radius:11px;background:linear-gradient(145deg,#e9f3ff,#f5f9ff);border:1px solid #d8e8fb;
  color:var(--th-primary);font-size:14px;font-weight:900;
}
.th-category-grid>.th-category-card::after,
.th-category-grid-featured>.th-category-card::after{
  content:"→";position:absolute;right:17px;bottom:16px;color:#9aabc3;font-size:19px;font-weight:800;
  transform:translateX(0);transition:transform .2s ease,color .2s ease;
}
.th-category-grid>.th-category-card:hover,
.th-category-grid-featured>.th-category-card:hover{
  transform:translateY(-4px)!important;border-color:color-mix(in srgb,var(--th-primary) 28%,#dfe9f6)!important;
  box-shadow:0 18px 42px rgba(39,86,158,.10)!important;
}
.th-category-grid>.th-category-card:hover::after,
.th-category-grid-featured>.th-category-card:hover::after{transform:translateX(3px);color:var(--th-primary)}
.th-category-grid>.th-category-card h3,
.th-category-grid-featured>.th-category-card h3{
  margin:0 0 8px!important;font-size:16px!important;line-height:1.25!important;font-weight:830!important;
  letter-spacing:-.018em!important;color:var(--th-text)!important;
}
.th-category-grid>.th-category-card p,
.th-category-grid-featured>.th-category-card p{
  margin:0!important;max-width:92%;font-size:13px!important;line-height:1.55!important;color:#72829b!important;
}

/* Featured cards are richer, with their existing icon as the visual anchor */
.th-category-grid-featured>.th-category-card{
  min-height:166px!important;padding:20px 48px 20px 20px!important;
  background:linear-gradient(145deg,#fff 0%,#f6faff 72%,#eef6ff 100%)!important;
  box-shadow:0 12px 34px rgba(39,87,160,.065)!important;
}
.th-category-grid-featured>.th-category-card:nth-child(2n){background:linear-gradient(145deg,#fff 0%,#faf8ff 72%,#f3efff 100%)!important}
.th-category-grid-featured>.th-category-card:nth-child(3n){background:linear-gradient(145deg,#fff 0%,#f7fcfa 72%,#eefaf5 100%)!important}
.th-category-grid-featured .th-category-icon{
  width:43px!important;height:43px!important;display:grid!important;place-items:center!important;margin:0 0 15px!important;
  border-radius:12px!important;background:linear-gradient(145deg,#e6f1ff,#f6faff)!important;
  border:1px solid #d6e7fb!important;box-shadow:0 5px 14px rgba(36,89,170,.06)!important;
  color:var(--th-primary)!important;font-size:13px!important;font-weight:900!important;
}
.th-category-grid-featured>.th-category-card:nth-child(2n) .th-category-icon{background:linear-gradient(145deg,#eee9ff,#faf8ff)!important;color:#7254e9!important;border-color:#e4dcfb!important}
.th-category-grid-featured>.th-category-card:nth-child(3n) .th-category-icon{background:linear-gradient(145deg,#ddf7ea,#f4fcf8)!important;color:#15925d!important;border-color:#d2edde!important}

/* Give regular cards subtle varied accents without changing HTML */
.th-category-grid>.th-category-card:nth-child(4n+2)::before{background:linear-gradient(145deg,#eeeaff,#faf8ff);border-color:#e4ddfb;color:#7254e9}
.th-category-grid>.th-category-card:nth-child(4n+3)::before{background:linear-gradient(145deg,#e1f7ec,#f5fcf8);border-color:#d3edde;color:#15925d}
.th-category-grid>.th-category-card:nth-child(4n+4)::before{background:linear-gradient(145deg,#fff0e7,#fff9f5);border-color:#f8dece;color:#e8792d}

/* Lighter SEO/info ending instead of another heavy tool card */
.th-category-seo-text{
  max-width:980px!important;margin-top:44px!important;padding:22px 4px 4px 0!important;
  border:0!important;border-top:1px solid #dfe8f4!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
}
.th-category-seo-text h2{font-size:25px!important}
.th-category-seo-text p{max-width:900px;font-size:14px!important;line-height:1.72!important;color:#75849a!important}

@media(max-width:1080px){
  .th-category-grid>.th-category-card,.th-category-grid-featured>.th-category-card{min-height:145px!important}
}
@media(max-width:640px){
  .th-category-page>.th-section{margin-bottom:31px}
  .th-category-grid>.th-category-card,.th-category-grid-featured>.th-category-card{min-height:132px!important;padding:17px 44px 17px 17px!important}
  .th-category-grid>.th-category-card::before,.th-category-grid-featured .th-category-icon{margin-bottom:12px!important}
  .th-category-search input{min-height:49px!important}
}


/* ===== ToolHub image tools ===== */
.th-file-workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr);gap:18px;align-items:stretch}
.th-upload-box{position:relative;min-height:280px;border:1.5px dashed #bcd0ef;border-radius:18px;background:linear-gradient(180deg,rgba(248,251,255,.98),rgba(241,247,255,.92));display:flex;align-items:center;justify-content:center;text-align:center;padding:26px;overflow:hidden}
.th-upload-box input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.th-upload-content{pointer-events:none}
.th-upload-icon{width:58px;height:58px;margin:0 auto 14px;border-radius:18px;display:grid;place-items:center;background:#e8f1ff;color:var(--th-primary);font-size:27px;font-weight:800}
.th-upload-title{font-weight:800;font-size:18px;margin-bottom:5px}
.th-upload-note{color:var(--th-text-muted);font-size:13px;line-height:1.5}
.th-image-preview-card{border:1px solid var(--th-border);border-radius:18px;background:#fff;padding:14px;min-height:280px;display:flex;flex-direction:column}
.th-image-preview{display:block;width:100%;height:190px;object-fit:contain;border-radius:12px;background:linear-gradient(135deg,#f6f9ff,#eef4fd)}
.th-image-preview[hidden]{display:none}
.th-file-meta{display:grid;grid-template-columns:1fr auto;gap:7px 12px;margin-top:12px;font-size:13px}
.th-file-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-file-meta span{color:var(--th-text-muted)}
.th-image-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:16px}
.th-image-setting{display:flex;flex-direction:column;gap:7px}
.th-image-setting label,.th-image-setting>span{font-size:13px;font-weight:700}
.th-image-setting input,.th-image-setting select{width:100%;min-height:44px;border:1px solid var(--th-border);border-radius:11px;background:#fff;padding:0 12px;color:var(--th-text)}
.th-image-result{margin-top:16px;padding:16px;border:1px solid #cfe0fb;background:linear-gradient(135deg,#f7fbff,#eef6ff);border-radius:16px}
.th-image-result[hidden]{display:none}
.th-image-result-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.th-image-result-meta{display:flex;gap:22px;flex-wrap:wrap}
.th-image-result-meta span{font-size:12px;color:var(--th-text-muted)}
.th-image-result-meta strong{display:block;margin-top:3px;color:var(--th-text);font-size:17px}
.th-file-downloads{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.th-file-download{display:flex;align-items:center;justify-content:center;min-height:44px;padding:9px 12px;border:1px solid #cbdcf7;border-radius:11px;background:#fff;color:var(--th-primary);font-weight:700;text-decoration:none;font-size:13px}
.th-file-download:hover{border-color:var(--th-primary);transform:translateY(-1px)}
@media(max-width:850px){.th-file-workspace{grid-template-columns:1fr}.th-image-settings{grid-template-columns:1fr 1fr}.th-file-downloads{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.th-image-settings,.th-file-downloads{grid-template-columns:1fr}.th-upload-box{min-height:220px}}


/* =========================================================
   ToolHub 1.4.9 — universal file/image workspace
   ========================================================= */

.th-tool-box:has(.th-file-workspace) {
  padding: 18px;
}

.th-file-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.th-file-workspace.is-loaded {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
}

.th-upload-box {
  position: relative;
  min-height: 300px;
  border: 1.5px dashed #b7cdf0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 20%, rgba(27,110,255,.08), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.th-upload-box:hover,
.th-upload-box.is-dragover {
  border-color: var(--th-primary);
  background:
    radial-gradient(circle at 50% 20%, rgba(27,110,255,.12), transparent 32%),
    linear-gradient(180deg, #fbfdff 0%, #edf5ff 100%);
  box-shadow: 0 14px 36px rgba(32, 99, 207, .10);
}

.th-upload-box.is-loaded {
  min-height: 360px;
  padding: 12px;
  border-style: solid;
  background: #fff;
}

.th-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.th-upload-content {
  pointer-events: none;
  max-width: 440px;
}

.th-upload-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eaf2ff, #dceaff);
  color: var(--th-primary);
  box-shadow: inset 0 0 0 1px rgba(30, 105, 235, .08);
  font-size: 30px;
  font-weight: 800;
}

.th-upload-title {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--th-text);
}

.th-upload-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--th-text-muted);
}

.th-upload-box .th-inline-file-preview {
  display: none;
}

.th-upload-box.is-loaded .th-upload-content {
  display: none;
}

.th-upload-box.is-loaded .th-inline-file-preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: contain;
  border-radius: 15px;
  background:
    linear-gradient(45deg,#f7f9fd 25%,transparent 25%),
    linear-gradient(-45deg,#f7f9fd 25%,transparent 25%),
    linear-gradient(45deg,transparent 75%,#f7f9fd 75%),
    linear-gradient(-45deg,transparent 75%,#f7f9fd 75%);
  background-size: 22px 22px;
  background-position: 0 0,0 11px,11px -11px,-11px 0px;
}

.th-image-preview-card {
  display: none;
  min-height: 360px;
  padding: 22px;
  border: 1px solid var(--th-border);
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 34px rgba(52, 82, 139, .06);
}

.th-file-workspace.is-loaded .th-image-preview-card {
  display: flex;
  flex-direction: column;
}

.th-image-preview-card > .th-image-preview {
  display: none !important;
}

.th-file-meta {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.th-file-meta span {
  color: var(--th-text-muted);
}

.th-file-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--th-text);
}

.th-file-meta::before {
  content: "Файл";
  grid-column: 1 / -1;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--th-primary);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.th-image-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.th-image-setting {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce7f7;
  border-radius: 14px;
  background: rgba(248,251,255,.84);
}

.th-image-setting label,
.th-image-setting > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--th-text);
}

.th-image-setting input:not([type="range"]),
.th-image-setting select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--th-border);
  border-radius: 11px;
  background: #fff;
  padding: 0 12px;
  color: var(--th-text);
}

.th-image-setting input[type="range"] {
  width: 100%;
  accent-color: var(--th-primary);
}

.th-file-workspace + .th-image-settings {
  margin-top: 18px;
}

.th-tool-box:has(.th-file-workspace) .th-actions {
  margin-top: 18px;
}

.th-tool-box:has(.th-file-workspace) .th-actions .th-btn-primary {
  min-width: 190px;
}

.th-image-result {
  position: relative;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #c8ddfb;
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(50,129,255,.10), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%);
  box-shadow: 0 10px 30px rgba(36, 98, 190, .06);
}

.th-image-result[hidden] {
  display: none !important;
}

.th-image-result::before {
  content: "✓ Готово";
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e5f7ee;
  color: #14834d;
  font-size: 12px;
  font-weight: 800;
}

.th-image-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.th-image-result-meta {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.th-image-result-meta > div {
  min-width: 126px;
  padding: 10px 12px;
  border: 1px solid rgba(176,201,238,.75);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

.th-image-result-meta span {
  display: block;
  font-size: 11px;
  color: var(--th-text-muted);
}

.th-image-result-meta strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  color: var(--th-text);
}

.th-image-result .th-btn-outline {
  min-width: 160px;
  min-height: 46px;
  border-color: var(--th-primary);
  background: var(--th-primary);
  color: #fff;
}

.th-image-result .th-btn-outline:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

.th-file-before-after {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--th-text);
}

.th-file-before-after .th-arrow {
  color: var(--th-primary);
}

.th-file-saved {
  margin-top: 3px;
  color: #178a52;
  font-size: 13px;
  font-weight: 700;
}

.th-file-downloads {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .th-file-workspace.is-loaded {
    grid-template-columns: 1fr;
  }

  .th-image-preview-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .th-tool-box:has(.th-file-workspace) {
    padding: 12px;
  }

  .th-upload-box {
    min-height: 240px;
    padding: 22px;
  }

  .th-image-settings {
    grid-template-columns: 1fr;
  }

  .th-image-result-row {
    align-items: stretch;
  }

  .th-image-result .th-btn-outline {
    width: 100%;
  }
}


/* =========================================================
   ToolHub 1.5.1 — visual image editors
   ========================================================= */
.th-editor-toolbox{padding:18px}
.th-editor-stage{display:grid;grid-template-columns:1fr;gap:16px}
.th-editor-stage.is-loaded{grid-template-columns:minmax(0,1.55fr) minmax(270px,.45fr)}
.th-editor-upload{position:relative;min-height:330px;border:1.5px dashed #b7cdf0;border-radius:20px;background:radial-gradient(circle at 50% 18%,rgba(27,110,255,.09),transparent 32%),linear-gradient(180deg,#fbfdff,#f2f7ff);display:grid;place-items:center;text-align:center;overflow:hidden}
.th-editor-upload input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.th-editor-stage.is-loaded .th-editor-upload{display:none}
.th-editor-canvas-wrap{display:none;min-height:420px;border:1px solid var(--th-border);border-radius:20px;background:#eaf0f8;padding:14px;align-items:center;justify-content:center;overflow:auto}
.th-editor-stage.is-loaded .th-editor-canvas-wrap{display:flex}
.th-editor-canvas{display:block;max-width:100%;height:auto;border-radius:12px;box-shadow:0 16px 38px rgba(24,48,90,.12);touch-action:none}
.th-editor-controls{display:none;padding:18px;border:1px solid var(--th-border);border-radius:20px;background:rgba(255,255,255,.97);box-shadow:0 12px 34px rgba(52,82,139,.06)}
.th-editor-stage.is-loaded .th-editor-controls{display:block}
.th-editor-controls h3{margin:0 0 14px;font-size:16px}
.th-editor-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 18px}
.th-editor-meta>div{padding:11px;border:1px solid #dfE8f5;border-radius:12px;background:#f8fbff}
.th-editor-meta span{display:block;font-size:11px;color:var(--th-text-muted)}
.th-editor-meta strong{display:block;margin-top:3px;font-size:15px}
.th-editor-ratios{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:16px}
.th-editor-chip{min-height:36px;padding:0 12px;border:1px solid #d4e1f4;border-radius:10px;background:#fff;color:var(--th-text);font-weight:700;cursor:pointer}
.th-editor-chip:hover,.th-editor-chip.is-active{border-color:var(--th-primary);background:#edf5ff;color:var(--th-primary)}
.th-editor-button-stack{display:grid;gap:9px}
.th-editor-button-stack .th-btn{width:100%;justify-content:center}
.th-editor-help{margin-top:14px;padding:11px 12px;border-radius:12px;background:#f5f9ff;color:var(--th-text-muted);font-size:12px;line-height:1.55}
.th-editor-big-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:14px}
.th-editor-action{min-height:48px;border:1px solid #d4e1f4;border-radius:12px;background:#fff;font-weight:800;color:var(--th-text);cursor:pointer}
.th-editor-action:hover{border-color:var(--th-primary);color:var(--th-primary);background:#f5f9ff}
@media(max-width:900px){.th-editor-stage.is-loaded{grid-template-columns:1fr}.th-editor-canvas-wrap{min-height:330px}}
@media(max-width:560px){.th-editor-toolbox{padding:12px}.th-editor-upload{min-height:250px}.th-editor-big-actions{grid-template-columns:1fr}}


/* =========================================================
   ToolHub 1.5.3 — Polylang language switcher
   ========================================================= */
.th-topbar-actions{
  position:relative;
  flex:0 0 auto;
}
.th-lang-switcher{
  position:relative;
  margin:0;
}
.th-lang-switcher>summary{
  list-style:none;
  min-width:68px;
  height:40px;
  padding:0 11px 0 13px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid transparent;
  border-radius:12px;
  color:var(--th-text);
  background:transparent;
  cursor:pointer;
  font-size:13px;
  font-weight:800;
  user-select:none;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.th-lang-switcher>summary::-webkit-details-marker{display:none}
.th-lang-switcher>summary::marker{display:none;content:""}
.th-lang-switcher>summary:hover,
.th-lang-switcher[open]>summary{
  background:#fff;
  border-color:var(--th-border);
  box-shadow:0 8px 24px rgba(31,70,130,.08);
}
.th-lang-chevron{
  width:11px;
  height:8px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .18s ease;
}
.th-lang-switcher[open] .th-lang-chevron{transform:rotate(180deg)}
.th-lang-menu{
  position:absolute;
  z-index:100;
  top:calc(100% + 8px);
  right:0;
  width:128px;
  padding:6px;
  border:1px solid var(--th-border);
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 45px rgba(25,54,105,.15);
}
.th-lang-option{
  min-height:40px;
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-radius:9px;
  color:var(--th-text);
  text-decoration:none;
  font-size:13px;
  font-weight:750;
}
.th-lang-option:hover{background:var(--th-soft);color:var(--th-primary)}
.th-lang-option.is-current{background:color-mix(in srgb,var(--th-primary) 8%,#fff);color:var(--th-primary)}
.th-lang-check{font-size:12px;color:var(--th-primary)}
.th-lang-fallback{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:38px;font-size:13px;font-weight:800;color:var(--th-text)}
@media(max-width:860px){
  .th-topbar-actions{display:flex!important;margin-left:8px}
  .th-lang-switcher>summary{min-width:58px;padding-inline:9px}
}
@media(max-width:560px){
  .th-topbar{gap:8px}
  .th-top-search{min-width:0;flex:1}
  .th-lang-current{font-size:12px}
  .th-lang-switcher>summary{min-width:54px;height:38px}
  .th-lang-menu{width:118px}
}


/* =========================================================
   ToolHub 1.5.4 — segmented Polylang switcher
   ========================================================= */
.th-lang-segmented{
  display:inline-flex;
  align-items:center;
  gap:3px;
  padding:4px;
  min-height:40px;
  border:1px solid var(--th-border);
  border-radius:12px;
  background:rgba(255,255,255,.92);
  box-shadow:0 6px 20px rgba(42,78,140,.06);
}
.th-lang-segment{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  height:32px;
  padding:0 12px;
  border-radius:9px;
  color:var(--th-muted);
  font-size:13px;
  line-height:1;
  font-weight:800;
  text-decoration:none;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.th-lang-segment:hover{
  color:var(--th-primary);
  background:var(--th-soft);
}
.th-lang-segment.is-active{
  color:var(--th-primary);
  background:color-mix(in srgb,var(--th-primary) 10%,#fff);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--th-primary) 12%,transparent);
}
.th-lang-segment:focus-visible{
  outline:2px solid var(--th-primary);
  outline-offset:2px;
}
@media(max-width:640px){
  .th-lang-segmented{padding:3px;border-radius:11px}
  .th-lang-segment{min-width:40px;height:30px;padding:0 9px;font-size:12px}
}
\n\n/* =========================================================\n   ToolHub 1.5.5 — compact header nav + refined language switch\n   ========================================================= */\n.th-topbar{gap:14px}\n.th-topbar-spacer{flex:1 1 auto}\n.th-header-nav{\n  display:inline-flex;\n  align-items:center;\n  gap:4px;\n  padding:3px;\n  border:1px solid transparent;\n  border-radius:11px;\n}\n.th-header-nav-link{\n  display:inline-flex;\n  align-items:center;\n  justify-content:center;\n  min-height:34px;\n  padding:0 12px;\n  border-radius:9px;\n  color:#4f5f78;\n  font-size:13px;\n  line-height:1;\n  font-weight:750;\n  text-decoration:none;\n  white-space:nowrap;\n  transition:background .18s ease,color .18s ease,box-shadow .18s ease;\n}\n.th-header-nav-link:hover{\n  color:var(--th-primary);\n  background:rgba(18,103,244,.055);\n}\n.th-header-nav-link.is-active{\n  color:var(--th-primary);\n  background:rgba(18,103,244,.085);\n}\n.th-topbar-actions{margin-left:0}\n\n/* Slightly lower and more contrasty UA/RU control */\n.th-lang-segmented{\n  gap:2px;\n  padding:3px;\n  min-height:36px;\n  border-radius:11px;\n  background:rgba(255,255,255,.94);\n  box-shadow:0 5px 16px rgba(42,78,140,.055);\n}\n.th-lang-segment{\n  min-width:42px;\n  height:30px;\n  padding:0 11px;\n  border-radius:8px;\n  color:#536078;\n  font-size:12.5px;\n}\n.th-lang-segment:hover:not(.is-active){\n  color:#24446f;\n  background:#f2f6fc;\n}\n.th-lang-segment.is-active{\n  color:#075fe4;\n  background:#e6f0ff;\n  box-shadow:inset 0 0 0 1px rgba(18,103,244,.16);\n}\n\n/* Search remains available on pages that intentionally render their own search,\n   but the global topbar search has been removed from header.php. */\n@media(max-width:780px){\n  .th-header-nav{display:none}\n  .th-topbar{gap:8px}\n  .th-topbar-actions{margin-left:auto}\n}\n@media(max-width:560px){\n  .th-lang-segmented{padding:3px;min-height:34px}\n  .th-lang-segment{min-width:38px;height:28px;padding:0 8px;font-size:12px}\n}\n

/* =========================================================
   ToolHub 1.5.6 — WordPress-managed header navigation
   ========================================================= */
.th-header-nav{
  display:flex;
  align-items:center;
  min-width:0;
  margin-left:auto;
  padding:0;
  border:0;
  border-radius:0;
}
.th-header-menu{
  display:flex;
  align-items:center;
  gap:4px;
  margin:0;
  padding:3px;
  list-style:none;
  border:1px solid rgba(202,216,238,.74);
  border-radius:12px;
  background:rgba(255,255,255,.72);
  box-shadow:0 5px 18px rgba(39,73,130,.045);
  backdrop-filter:blur(8px);
}
.th-header-menu > li{
  position:relative;
  margin:0;
  padding:0;
  list-style:none;
}
.th-header-menu > li > a{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 13px;
  border-radius:9px;
  color:#536078;
  font-size:12.5px;
  line-height:1;
  font-weight:750;
  text-decoration:none;
  white-space:nowrap;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.th-header-menu > li > a:hover{
  color:#174d9a;
  background:#f1f6fd;
}
.th-header-menu > li.current-menu-item > a,
.th-header-menu > li.current_page_item > a,
.th-header-menu > li.current-menu-ancestor > a{
  color:#075fe4;
  background:#e7f0ff;
  box-shadow:inset 0 0 0 1px rgba(18,103,244,.12);
}
.th-header-menu > li.current-menu-item > a::after,
.th-header-menu > li.current_page_item > a::after{
  content:"";
  position:absolute;
  left:12px;
  right:12px;
  bottom:3px;
  height:2px;
  border-radius:99px;
  background:var(--th-primary);
  opacity:.78;
}
.th-topbar-actions{
  position:relative;
  display:flex;
  align-items:center;
  margin-left:8px;
  padding-left:9px;
}
.th-topbar-actions::before{
  content:"";
  position:absolute;
  left:0;
  top:7px;
  bottom:7px;
  width:1px;
  background:#dce6f4;
}

@media(max-width:780px){
  .th-header-nav{display:none}
  .th-topbar-actions{margin-left:auto;padding-left:0}
  .th-topbar-actions::before{display:none}
}


/* =========================================================
   ToolHub 1.5.7 — simple top navigation + header tagline
   ========================================================= */

.th-header-tagline {
  flex: 1 1 auto;
  min-width: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th-header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0;
  margin-left: auto;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.th-header-nav .menu,
.th-header-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.th-header-nav li {
  margin: 0;
  padding: 0;
}

.th-header-nav a,
.th-header-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #344054 !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: color .18s ease;
}

.th-header-nav a:hover,
.th-header-nav a:focus,
.th-header-nav-link:hover,
.th-header-nav-link:focus,
.th-header-nav .current-menu-item > a,
.th-header-nav .current_page_item > a,
.th-header-nav .current-menu-ancestor > a,
.th-header-nav-link.is-active {
  color: var(--th-primary) !important;
  background: transparent !important;
}

.th-header-nav a::before,
.th-header-nav a::after,
.th-header-nav-link::before,
.th-header-nav-link::after {
  display: none !important;
}

.th-header-actions {
  gap: 18px;
}

@media (max-width: 900px) {
  .th-header-tagline {
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .th-header-tagline {
    display: none;
  }
}


/* =========================================================
   ToolHub 1.5.8 — transparent topbar + left tagline
   ========================================================= */
.th-topbar{
  background:transparent !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
.th-topbar-spacer{
  display:none !important;
}
.th-header-tagline{
  flex:1 1 auto;
  margin:0 auto 0 0;
  text-align:left;
}
.th-header-nav{
  margin-left:auto;
}
@media(max-width:760px){
  .th-header-tagline{display:none}
}

/* =========================================================
   ToolHub 1.5.9 — restore topbar background, plain header links
   ========================================================= */
.th-topbar{
  background:rgba(255,255,255,.94) !important;
  backdrop-filter:blur(12px) !important;
  -webkit-backdrop-filter:blur(12px) !important;
}

.th-header-menu,
.th-header-nav .th-header-menu{
  display:flex;
  align-items:center;
  gap:24px;
  margin:0;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  list-style:none;
}

.th-header-menu > li > a{
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#344054 !important;
}

.th-header-menu > li > a:hover,
.th-header-menu > li > a:focus,
.th-header-menu > li.current-menu-item > a,
.th-header-menu > li.current_page_item > a,
.th-header-menu > li.current-menu-ancestor > a{
  color:var(--th-primary) !important;
  background:transparent !important;
  box-shadow:none !important;
}

.th-header-menu > li > a::after{
  display:none !important;
  content:none !important;
}
