/* Toolxora Enterprise Design System v30 */
:root{
 --tx-bg:#f8fafc;--tx-surface:#fff;--tx-surface-2:#f1f5f9;--tx-text:#0b1530;--tx-muted:#5d6f8b;--tx-border:#dce5f0;
 --tx-primary:#315efb;--tx-primary-2:#7c3aed;--tx-success:#0f9f6e;--tx-warning:#f59e0b;--tx-danger:#e54848;
 --tx-radius-sm:12px;--tx-radius:20px;--tx-radius-lg:30px;--tx-shadow-sm:0 8px 24px rgba(22,39,77,.07);--tx-shadow:0 24px 70px rgba(22,39,77,.12);
 --tx-header-h:82px;--tx-container:1240px;--tx-transition:180ms ease;
}
html[data-theme=dark],body.tx-dark-mode{--tx-bg:#030918;--tx-surface:#0e1830;--tx-surface-2:#111e39;--tx-text:#f7f9ff;--tx-muted:#aab7ce;--tx-border:#263653;--tx-shadow-sm:0 8px 24px rgba(0,0,0,.2);--tx-shadow:0 24px 70px rgba(0,0,0,.34)}
html{scroll-behavior:smooth;background:var(--tx-bg)}body{background:var(--tx-bg);color:var(--tx-text);transition:background var(--tx-transition),color var(--tx-transition)}
.tx-container{width:min(var(--tx-container),calc(100% - 40px));margin-inline:auto}.tx-skip-link{position:fixed;left:16px;top:-80px;z-index:10000;background:var(--tx-primary);color:#fff;padding:12px 16px;border-radius:10px}.tx-skip-link:focus{top:16px}
.tx-header{height:var(--tx-header-h);background:color-mix(in srgb,var(--tx-surface) 92%,transparent);border-bottom:1px solid var(--tx-border);backdrop-filter:blur(18px);position:sticky;top:0;z-index:999;transition:box-shadow var(--tx-transition),background var(--tx-transition)}.tx-header.is-scrolled{box-shadow:var(--tx-shadow-sm)}
.tx-nav{height:100%;display:flex;align-items:center;gap:32px}.tx-logo{flex:none}.tx-menu{margin-inline:auto}.tx-actions{gap:10px}.tx-icon-button{width:46px;height:46px;border:1px solid var(--tx-border);border-radius:15px;background:var(--tx-surface-2);color:var(--tx-text);display:grid;place-items:center;cursor:pointer;transition:transform var(--tx-transition),border-color var(--tx-transition),background var(--tx-transition)}.tx-icon-button:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--tx-primary) 45%,var(--tx-border))}.tx-icon-button svg,.tx-global-search svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.tx-header-cta{box-shadow:0 12px 30px rgba(79,70,229,.25)}
.tx-search-overlay{position:fixed;inset:0;z-index:5000;background:rgba(2,6,23,.68);backdrop-filter:blur(12px);display:grid;place-items:start center;padding:12vh 20px 30px;opacity:0;visibility:hidden;transition:.2s}.tx-search-overlay.is-open{opacity:1;visibility:visible}.tx-search-dialog{position:relative;width:min(760px,100%);background:var(--tx-surface);color:var(--tx-text);border:1px solid var(--tx-border);border-radius:30px;padding:40px;box-shadow:0 40px 120px rgba(0,0,0,.35);transform:translateY(-16px) scale(.98);transition:.22s}.tx-search-overlay.is-open .tx-search-dialog{transform:none}.tx-search-close{position:absolute;right:18px;top:18px;width:42px;height:42px;border:1px solid var(--tx-border);border-radius:13px;background:var(--tx-surface-2);color:var(--tx-text);font-size:28px;cursor:pointer}.tx-search-dialog h2{font-size:clamp(30px,5vw,52px);letter-spacing:-.05em;margin:12px 0}.tx-search-dialog>p{color:var(--tx-muted);font-size:18px}.tx-eyebrow{display:inline-flex;padding:7px 11px;border-radius:999px;background:color-mix(in srgb,var(--tx-primary) 11%,var(--tx-surface));color:var(--tx-primary);font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.tx-global-search{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;border:1px solid var(--tx-border);border-radius:18px;padding:7px 7px 7px 16px;background:var(--tx-surface-2);margin-top:24px}.tx-global-search input{min-width:0;border:0!important;background:transparent!important;color:var(--tx-text)!important;padding:13px 0!important;outline:0;box-shadow:none!important}.tx-global-search button{border:0;border-radius:13px;padding:13px 19px;background:linear-gradient(135deg,var(--tx-primary),var(--tx-primary-2));color:#fff;font-weight:850;cursor:pointer}.tx-search-quick{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:18px;color:var(--tx-muted);font-size:13px}.tx-search-quick a{padding:7px 10px;border:1px solid var(--tx-border);border-radius:999px;color:var(--tx-text);background:var(--tx-surface-2)}body.tx-search-open{overflow:hidden}
/* Shared components */
.tx-btn{border-radius:15px;min-height:50px;display:inline-flex;align-items:center;justify-content:center;font-weight:850;transition:transform var(--tx-transition),box-shadow var(--tx-transition),border-color var(--tx-transition)}.tx-btn:hover{transform:translateY(-2px)}.tx-btn-primary{background:linear-gradient(135deg,var(--tx-primary),var(--tx-primary-2));box-shadow:0 14px 35px rgba(79,70,229,.22)}.tx-btn-light{background:var(--tx-surface);border:1px solid var(--tx-border);color:var(--tx-text)}
:is(.tx-tool-card,.tx-why-card,.tx-step,.tx-testimonial,.tx-blog-card,.tx-conv-card,.tx-result-card){background:var(--tx-surface);border-color:var(--tx-border);color:var(--tx-text);box-shadow:var(--tx-shadow-sm);transition:transform var(--tx-transition),box-shadow var(--tx-transition),border-color var(--tx-transition)}:is(.tx-tool-card,.tx-why-card,.tx-step,.tx-testimonial,.tx-blog-card,.tx-conv-card,.tx-result-card):hover{transform:translateY(-5px);box-shadow:var(--tx-shadow);border-color:color-mix(in srgb,var(--tx-primary) 35%,var(--tx-border))}:is(.tx-tool-card,.tx-why-card,.tx-step,.tx-testimonial,.tx-blog-card,.tx-conv-card,.tx-result-card) :is(h2,h3,h4,strong){color:var(--tx-text)}:is(.tx-tool-card,.tx-why-card,.tx-step,.tx-testimonial,.tx-blog-card,.tx-conv-card,.tx-result-card) p{color:var(--tx-muted)}
.tx-soft,.tx-section{color:var(--tx-text)}.tx-soft{background:var(--tx-surface-2)}.tx-section-head h2,.tx-page-heading h1{letter-spacing:-.045em;color:var(--tx-text)}.tx-section-head p,.tx-page-heading p{color:var(--tx-muted)}
/* Plugin dark-mode bridge: builder chrome follows theme, documents/previews stay print-safe */
html[data-theme=dark] :is(.txcareer-panel,.txcareer-preview-panel,.txcore-panel,.txcore-preview,.txbt-panel,.txbt-preview-panel,.txdoc-panel,.txdoc-preview-panel),body.tx-dark-mode :is(.txcareer-panel,.txcareer-preview-panel,.txcore-panel,.txcore-preview,.txbt-panel,.txbt-preview-panel,.txdoc-panel,.txdoc-preview-panel){background:var(--tx-surface)!important;border-color:var(--tx-border)!important;color:var(--tx-text)!important}
html[data-theme=dark] :is(.txcareer-head h2,.txcareer-preview-title strong,.txcore-head h2,.txcore-preview-title strong,.txbt-section-title,.txdoc-section-title),body.tx-dark-mode :is(.txcareer-head h2,.txcareer-preview-title strong,.txcore-head h2,.txcore-preview-title strong,.txbt-section-title,.txdoc-section-title){color:var(--tx-text)!important}
html[data-theme=dark] :is(.txcareer-badge,.txcore-badge,.txbt-badge,.txdoc-badge,[class*="status-badge"],[class*="preview-badge"]),body.tx-dark-mode :is(.txcareer-badge,.txcore-badge,.txbt-badge,.txdoc-badge,[class*="status-badge"],[class*="preview-badge"]){background:#e8eeff!important;color:#2847c7!important;border-color:#cbd7ff!important;opacity:1!important;text-shadow:none!important}
html[data-theme=dark] :is(.txcareer-template,.txcore-btn.secondary,.txbt-template-card,.txdoc-template-card),body.tx-dark-mode :is(.txcareer-template,.txcore-btn.secondary,.txbt-template-card,.txdoc-template-card){color:var(--tx-text)!important;background:var(--tx-surface-2)!important;border-color:var(--tx-border)!important}
html[data-theme=dark] :is(.txcareer-template.is-active,.txbt-template-card.is-active,.txdoc-template-card.is-active),body.tx-dark-mode :is(.txcareer-template.is-active,.txbt-template-card.is-active,.txdoc-template-card.is-active){background:linear-gradient(135deg,var(--tx-primary),var(--tx-primary-2))!important;color:#fff!important;border-color:transparent!important}
html[data-theme=dark] :is(.txcareer-field label,.txcore-field label,.txbt-field label,.txdoc-field label),body.tx-dark-mode :is(.txcareer-field label,.txcore-field label,.txbt-field label,.txdoc-field label){color:#dce5f5!important}
html[data-theme=dark] :is(.txcareer-field input,.txcareer-field textarea,.txcareer-field select,.txcore-field input,.txcore-field textarea,.txcore-field select,.txbt-field input,.txbt-field textarea,.txbt-field select,.txdoc-field input,.txdoc-field textarea,.txdoc-field select),body.tx-dark-mode :is(.txcareer-field input,.txcareer-field textarea,.txcareer-field select,.txcore-field input,.txcore-field textarea,.txcore-field select,.txbt-field input,.txbt-field textarea,.txbt-field select,.txdoc-field input,.txdoc-field textarea,.txdoc-field select){background:#101c35!important;color:#f8fafc!important;border-color:#314362!important}
:is(.txcareer-paper,.txcore-preview-canvas .txpdf-html-preview,.txbt-invoice-paper,.txdoc-paper,.txpdf-html-preview,[data-career-preview]){color-scheme:light!important}
html[data-theme=dark] :is(.txcareer-paper,.txbt-invoice-paper,.txdoc-paper,.txpdf-html-preview,[data-career-preview]),body.tx-dark-mode :is(.txcareer-paper,.txbt-invoice-paper,.txdoc-paper,.txpdf-html-preview,[data-career-preview]){background:#fff!important;color:#111827!important}
html[data-theme=dark] :is(.txcareer-paper,.txbt-invoice-paper,.txdoc-paper,.txpdf-html-preview,[data-career-preview]) :is(h1,h2,h3,h4,h5,h6,p,span,div,td,th,strong,small,label),body.tx-dark-mode :is(.txcareer-paper,.txbt-invoice-paper,.txdoc-paper,.txpdf-html-preview,[data-career-preview]) :is(h1,h2,h3,h4,h5,h6,p,span,div,td,th,strong,small,label){opacity:1}
/* Preserve intentional document colors instead of forcing white or black globally */
html[data-theme=dark] [data-career-preview] .txcover p,body.tx-dark-mode [data-career-preview] .txcover p{color:#334155!important}html[data-theme=dark] [data-career-preview] .txcover h1,body.tx-dark-mode [data-career-preview] .txcover h1{color:#111827!important}
/* Footer */
.tx-footer{position:relative;overflow:hidden;background:#071126;color:#dbe5f7;padding:78px 0 22px;border-top:1px solid #1c2c49}.tx-footer-glow{position:absolute;width:600px;height:600px;border-radius:50%;background:rgba(94,67,255,.18);filter:blur(100px);right:-220px;top:-300px}.tx-footer .tx-logo{color:#fff}.tx-footer-top{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:90px;padding-bottom:52px;border-bottom:1px solid #21314e}.tx-footer-brand>p{max-width:480px;color:#9fb0ca;font-size:17px;line-height:1.7}.tx-footer-trust{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.tx-footer-trust span{padding:8px 11px;border-radius:999px;background:#111e38;border:1px solid #263a5d;font-size:12px;font-weight:750;color:#cdd9ec}.tx-footer-newsletter h3{color:#fff;font-size:30px;margin:12px 0}.tx-footer-newsletter p{color:#9fb0ca}.tx-newsletter{display:grid;grid-template-columns:1fr auto;background:#0f1c35;border:1px solid #2b3d5f;padding:6px;border-radius:15px;margin-top:18px}.tx-newsletter input{background:transparent!important;border:0!important;color:#fff!important;padding:13px!important;box-shadow:none!important}.tx-newsletter button{border:0;border-radius:11px;padding:12px 16px;background:linear-gradient(135deg,var(--tx-primary),var(--tx-primary-2));color:#fff;font-weight:850}.tx-footer-links{position:relative;grid-template-columns:repeat(4,1fr);gap:46px;padding:45px 0}.tx-footer-links h4{color:#fff;margin-bottom:16px}.tx-footer-links a{color:#aebdd3!important;margin:9px 0;display:block}.tx-footer-links a:hover{color:#fff!important}.tx-footer-bottom{border-top:1px solid #21314e;padding-top:22px;display:flex;justify-content:space-between;gap:20px;color:#8798b4;font-size:13px}.tx-footer-bottom div{display:flex;gap:18px}.tx-footer-bottom a{color:#aebdd3}
/* System/search pages */
.tx-system-page,.tx-search-page{padding:100px 0;min-height:65vh}.tx-system-card{position:relative;overflow:hidden;text-align:center;background:var(--tx-surface);border:1px solid var(--tx-border);border-radius:36px;padding:80px 30px;box-shadow:var(--tx-shadow)}.tx-system-code{position:absolute;inset:auto 0 50%;transform:translateY(50%);font-size:min(32vw,360px);font-weight:950;color:color-mix(in srgb,var(--tx-primary) 7%,transparent);line-height:.8}.tx-system-card>*:not(.tx-system-code){position:relative}.tx-system-card h1{font-size:clamp(42px,7vw,78px);letter-spacing:-.06em;margin:15px 0}.tx-system-card p{font-size:18px;color:var(--tx-muted)}.tx-system-actions{display:flex;justify-content:center;gap:12px;margin-top:28px}.tx-page-heading{margin-bottom:35px}.tx-search-results{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.tx-result-card{border:1px solid var(--tx-border);border-radius:22px;padding:25px}.tx-result-card>span{font-size:11px;font-weight:900;text-transform:uppercase;color:var(--tx-primary)}.tx-result-card h2{font-size:21px;margin:10px 0}.tx-text-link{font-weight:850;color:var(--tx-primary)}.tx-empty-state{grid-column:1/-1;text-align:center;background:var(--tx-surface);border:1px solid var(--tx-border);border-radius:26px;padding:55px}
@media(max-width:1024px){.tx-header-cta,.tx-search-toggle{display:none}.tx-menu{background:var(--tx-surface)!important;color:var(--tx-text)!important}.tx-footer-top{grid-template-columns:1fr;gap:38px}.tx-footer-links{grid-template-columns:repeat(2,1fr)}.tx-search-results{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){.tx-container{width:min(100% - 28px,var(--tx-container))}.tx-search-dialog{padding:32px 20px}.tx-global-search{grid-template-columns:auto 1fr}.tx-global-search button{grid-column:1/-1;width:100%}.tx-footer-links{grid-template-columns:1fr 1fr;gap:28px}.tx-footer-bottom{flex-direction:column}.tx-search-results{grid-template-columns:1fr}.tx-system-actions{flex-direction:column}.tx-system-actions .tx-btn{width:100%}}


/* Toolxora Enterprise v31 — Phase 3–5 */
.tx-live-search-status{min-height:22px;margin:16px 2px 8px;color:var(--tx-muted);font-size:13px;font-weight:750}
.tx-live-search-results{display:grid;gap:8px;max-height:350px;overflow:auto;padding-right:4px}
.tx-live-result{display:grid;grid-template-columns:1fr auto;align-items:center;border:1px solid var(--tx-border);border-radius:15px;background:var(--tx-surface-2);transition:.16s}
.tx-live-result:hover,.tx-live-result.is-active{border-color:color-mix(in srgb,var(--tx-primary) 55%,var(--tx-border));background:color-mix(in srgb,var(--tx-primary) 7%,var(--tx-surface))}
.tx-live-result>a{display:grid;grid-template-columns:42px 1fr;gap:12px;align-items:center;padding:12px;color:var(--tx-text)}
.tx-result-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--tx-primary) 12%,var(--tx-surface));font-size:18px}
.tx-live-result b{display:block;color:var(--tx-text);font-size:14px}.tx-live-result small{display:block;color:var(--tx-muted);font-size:11px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:520px}
.tx-favorite-button{width:42px;height:42px;border:0;background:transparent;color:var(--tx-muted);font-size:22px;cursor:pointer;margin-right:5px}.tx-favorite-button.is-favorite{color:#f59e0b}
.tx-search-memory{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px;padding-top:16px;border-top:1px solid var(--tx-border)}
.tx-search-memory strong{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px;color:var(--tx-muted)}
.tx-memory-list{display:flex;flex-wrap:wrap;gap:7px}.tx-memory-list a{display:inline-flex;gap:6px;align-items:center;padding:7px 9px;border-radius:999px;border:1px solid var(--tx-border);background:var(--tx-surface-2);font-size:11px;color:var(--tx-text)}.tx-memory-list small{color:var(--tx-muted)}
.tx-command-launcher{position:fixed;right:22px;bottom:22px;z-index:1200;border:1px solid var(--tx-border);border-radius:16px;background:var(--tx-surface);color:var(--tx-text);box-shadow:var(--tx-shadow);display:flex;align-items:center;gap:9px;padding:10px 12px;cursor:pointer}.tx-command-launcher span{width:32px;height:32px;border-radius:10px;background:linear-gradient(135deg,var(--tx-primary),var(--tx-primary-2));color:#fff;display:grid;place-items:center;font-size:20px}.tx-command-launcher em{font-style:normal;font-weight:850}.tx-command-launcher kbd{border:1px solid var(--tx-border);border-bottom-width:2px;border-radius:7px;padding:3px 6px;background:var(--tx-surface-2);font-size:10px;color:var(--tx-muted)}
/* Strong plugin preview isolation in dark mode */
html[data-theme=dark] :is(.txcareer-paper,.txcover,.txresume,.txsig-card,.txbt-invoice-paper,.txdoc-paper,.txpdf-html-preview,[data-career-preview]),body.tx-dark-mode :is(.txcareer-paper,.txcover,.txresume,.txsig-card,.txbt-invoice-paper,.txdoc-paper,.txpdf-html-preview,[data-career-preview]){background-color:#fff!important;color:#111827!important;color-scheme:light!important}
html[data-theme=dark] :is(.txcover,.txresume,.txsig-card) :is(p,span,div,td,th,small),body.tx-dark-mode :is(.txcover,.txresume,.txsig-card) :is(p,span,div,td,th,small){opacity:1}
html[data-theme=dark] .txcover :is(.date,p,.company-block,.sign),body.tx-dark-mode .txcover :is(.date,p,.company-block,.sign){color:#334155!important}
html[data-theme=dark] .txcover :is(h1,strong),body.tx-dark-mode .txcover :is(h1,strong){color:#111827!important}
/* WCAG focus visibility */
:focus-visible{outline:3px solid color-mix(in srgb,var(--tx-primary) 75%,#fff);outline-offset:3px}
.tx-live-result:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--tx-primary) 18%,transparent)}
@media(max-width:680px){.tx-search-memory{grid-template-columns:1fr}.tx-command-launcher{right:14px;bottom:14px}.tx-command-launcher em,.tx-command-launcher kbd{display:none}.tx-live-result small{max-width:230px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}


/* Toolxora Enterprise v31.1 — Generator mobile template grid and spacing */
@media (max-width: 767px) {
  /* Global generator panels: reclaim horizontal space on phones */
  :is(
    .txbt-panel,
    .txbt-preview-panel,
    .txcareer-panel,
    .txcareer-preview-panel,
    .txdoc-panel,
    .txdoc-preview-panel,
    .txpdf-panel,
    .txpdf-preview-panel,
    .txcore-panel,
    .txcore-preview-panel
  ) {
    padding-left: 12px !important;
    padding-right: 12px !important;
    border-radius: 18px !important;
  }

  /* Reduce outer grid/gutter spacing across generators */
  :is(
    .txbt-layout,
    .txbt-shell,
    .txcareer-shell,
    .txdoc-layout,
    .txdoc-shell,
    .txpdf-layout,
    .txpdf-shell,
    .txcore-layout,
    .txcore-shell
  ) {
    gap: 12px !important;
  }

  /* Two cards per row for every Choose Template component */
  :is(
    .txbt-template-cards,
    .txbt-template-grid,
    .txcareer-template-grid,
    .txdoc-template-cards,
    .txdoc-template-grid,
    .txpdf-template-cards,
    .txpdf-template-grid,
    .txcore-template-cards,
    .txcore-template-grid
  ) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  /* Keep every card compact, equal-height and touch friendly */
  :is(
    .txbt-template-card,
    .txbt-template,
    .txcareer-template,
    .txdoc-template-card,
    .txdoc-template,
    .txpdf-template-card,
    .txpdf-template,
    .txcore-template-card,
    .txcore-template
  ) {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 142px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    touch-action: manipulation;
  }

  /* Prevent thumbnails/previews from forcing horizontal overflow */
  :is(
    .txbt-template-card,
    .txbt-template,
    .txcareer-template,
    .txdoc-template-card,
    .txdoc-template,
    .txpdf-template-card,
    .txpdf-template,
    .txcore-template-card,
    .txcore-template
  ) :is(img, svg, canvas, .txbt-template-preview, .tx-template-preview) {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Compact template labels so two-column layout remains readable */
  :is(
    .txbt-template-card,
    .txbt-template,
    .txcareer-template,
    .txdoc-template-card,
    .txdoc-template,
    .txpdf-template-card,
    .txpdf-template,
    .txcore-template-card,
    .txcore-template
  ) :is(h3, h4, strong, .title, .tx-template-title) {
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  :is(
    .txbt-template-card,
    .txbt-template,
    .txcareer-template,
    .txdoc-template-card,
    .txdoc-template,
    .txpdf-template-card,
    .txpdf-template,
    .txcore-template-card,
    .txcore-template
  ) :is(p, small, .description, .tx-template-description) {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  /* Give live preview the maximum available width */
  :is(
    .txbt-preview-panel,
    .txcareer-preview-panel,
    .txdoc-preview-panel,
    .txpdf-preview-panel,
    .txcore-preview-panel
  ) {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  :is(
    .txbt-preview,
    .txcareer-paper,
    .txdoc-preview,
    .txpdf-preview,
    .txcore-preview
  ) {
    max-width: 100% !important;
  }
}

/* Very small phones: retain 2 columns but tighten spacing further */
@media (max-width: 380px) {
  :is(
    .txbt-template-cards,
    .txbt-template-grid,
    .txcareer-template-grid,
    .txdoc-template-cards,
    .txdoc-template-grid,
    .txpdf-template-cards,
    .txpdf-template-grid,
    .txcore-template-cards,
    .txcore-template-grid
  ) {
    gap: 8px !important;
  }

  :is(
    .txbt-template-card,
    .txbt-template,
    .txcareer-template,
    .txdoc-template-card,
    .txdoc-template,
    .txpdf-template-card,
    .txpdf-template,
    .txcore-template-card,
    .txcore-template
  ) {
    min-height: 128px !important;
    padding: 8px !important;
  }
}


/* Toolxora Enterprise v31.2 — Business generator mobile grid and compact search */
@media (max-width: 767px) {
  html,body{max-width:100%;overflow-x:hidden}
  :is(.txbt-app,.txbt-tool,.txbt-generator,.txbt-shell,.txbt-layout,.txbt-panel,.txbt-preview-panel){
    min-width:0!important;max-width:100%!important;width:100%!important;box-sizing:border-box!important
  }
  :is(.txbt-template-cards,.txbt-template-grid,.txbt-template-options,.txbt-template-list,.txbt-templates,.txbt-choose-template-grid,.tx-template-cards,.tx-template-grid){
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%!important;max-width:100%!important;overflow:visible!important;align-items:stretch!important
  }
  :is(.txbt-template-card,.txbt-template-option,.txbt-template-item,.txbt-template,.tx-template-card,.tx-template-option){
    grid-column:auto!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;left:auto!important;right:auto!important;transform:none!important;translate:none!important;box-sizing:border-box!important
  }
  :is(.txbt-template-card,.txbt-template-option,.txbt-template-item,.txbt-template,.tx-template-card,.tx-template-option):is(.is-active,.active,.selected,[aria-pressed="true"],[aria-selected="true"]){
    transform:none!important;translate:none!important;left:auto!important;right:auto!important;outline-offset:-3px!important;box-shadow:inset 0 0 0 3px #2f6df6,0 8px 20px rgba(47,109,246,.12)!important
  }
  :is(.txbt-template-card,.txbt-template-option,.txbt-template-item,.txbt-template,.tx-template-card,.tx-template-option)>*{
    max-width:100%!important;min-width:0!important
  }
  :is(.txbt-template-preview,.txbt-template-thumb,.txbt-template-thumbnail,.tx-template-preview,.tx-template-thumb){
    width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important
  }
  .txbt-panel,.txbt-preview-panel{padding-left:8px!important;padding-right:8px!important}
}
.tx-search-dialog,.tx-search-panel,.tx-search-modal,.tx-search-card{
  max-height:min(88dvh,820px)!important;overflow:hidden!important
}
.tx-search-dialog-inner,.tx-search-content,.tx-search-modal-inner{
  max-height:inherit!important;min-height:0!important;display:flex!important;flex-direction:column!important
}
.tx-search-dialog h2,.tx-search-panel h2,.tx-search-modal h2,.tx-search-card h2{
  font-size:clamp(30px,4.4vw,58px)!important;line-height:1.03!important;margin-bottom:16px!important
}
.tx-search-dialog p,.tx-search-panel>p,.tx-search-modal p,.tx-search-card p{margin-bottom:18px!important}
.tx-live-search-results{
  min-height:0!important;max-height:min(38dvh,360px)!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable
}
.tx-search-memory{flex:0 0 auto}
@media (max-width:680px){
  .tx-search-overlay{align-items:flex-start!important;overflow-y:auto!important;padding:16px 12px!important}
  .tx-search-dialog,.tx-search-panel,.tx-search-modal,.tx-search-card{
    width:100%!important;max-height:calc(100dvh - 32px)!important;padding:22px 18px!important;border-radius:22px!important;margin:0!important
  }
  .tx-search-dialog h2,.tx-search-panel h2,.tx-search-modal h2,.tx-search-card h2{
    font-size:clamp(30px,10vw,42px)!important;line-height:1.05!important;margin:10px 0 12px!important
  }
  .tx-search-dialog p,.tx-search-panel>p,.tx-search-modal p,.tx-search-card p{
    font-size:16px!important;line-height:1.4!important;margin-bottom:14px!important
  }
  .tx-search-form{padding:10px!important;border-radius:16px!important}
  .tx-search-form input{min-height:46px!important;font-size:16px!important}
  .tx-search-form button{min-height:46px!important;padding:10px 18px!important}
  .tx-search-quick{margin-top:12px!important;gap:7px!important}
  .tx-live-search-status{margin-top:12px!important}
  .tx-live-search-results{max-height:42dvh!important;padding-bottom:6px!important}
  .tx-search-memory{margin-top:12px!important;padding-top:12px!important}
}
@media (max-width:390px){
  .tx-search-dialog,.tx-search-panel,.tx-search-modal,.tx-search-card{padding:18px 14px!important}
  .tx-search-dialog h2,.tx-search-panel h2,.tx-search-modal h2,.tx-search-card h2{font-size:30px!important}
}


/* Toolxora Theme v31.3 — compact desktop live-search layout */
@media (min-width: 681px) {
  .tx-search-dialog,
  .tx-search-panel,
  .tx-search-modal,
  .tx-search-card {
    width: min(940px, calc(100vw - 64px)) !important;
    max-height: min(86dvh, 760px) !important;
    padding: 30px 34px !important;
  }

  .tx-search-dialog h2,
  .tx-search-panel h2,
  .tx-search-modal h2,
  .tx-search-card h2 {
    font-size: clamp(34px, 3.3vw, 48px) !important;
    line-height: 1.02 !important;
    margin: 12px 0 12px !important;
  }

  .tx-search-dialog p,
  .tx-search-panel > p,
  .tx-search-modal p,
  .tx-search-card p {
    font-size: 18px !important;
    margin-bottom: 14px !important;
  }

  .tx-search-form {
    padding: 8px 10px !important;
    border-radius: 16px !important;
  }

  .tx-search-form input,
  .tx-search-form button {
    min-height: 48px !important;
  }

  .tx-search-quick {
    margin-top: 12px !important;
  }

  .tx-live-search-status {
    margin-top: 10px !important;
  }

  .tx-live-search-results {
    max-height: min(40dvh, 320px) !important;
    overflow-y: auto !important;
  }
}
