/* TechFinity Tools v7 production compatibility + responsive layer. */

.tf-theme-toggle{display:flex;align-items:center;gap:6px;min-height:38px;padding:7px 9px;border:1px solid rgba(255,255,255,.25);border-radius:7px;color:#e8f4f8;background:rgba(255,255,255,.09);font:inherit;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap}.tf-theme-toggle:hover{background:rgba(255,255,255,.15)}.tf-theme-toggle:focus-visible{outline:2px solid #67e8f9;outline-offset:2px}

/* Shared TechFinity identity. "Tools" stays live text so it remains crisp and theme-aware. */
.tf-brand{gap:7px}.tf-brand-logo-shell{display:flex;align-items:center;padding:2px 5px 2px 3px;border-radius:6px;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.16)}body.tf-has-v7-nav .tf-brand-logo{display:block;width:auto;height:28px}.tf-brand-product{color:#67e8f9;font-weight:800;letter-spacing:.01em}.tf-footer-brand{align-items:center;flex-wrap:wrap}body.tf-has-v7-nav .tf-footer-brand img{display:block;width:auto;height:28px;padding:2px 5px;border-radius:6px;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.16)}.tf-footer-brand strong{color:var(--tf-navy)}html[data-theme="dark"] .tf-footer-brand strong{color:var(--text,#f8fbff)}

/* Keep category navigation visually balanced: one row on desktop, one scrollable row below it. */
.tf-category-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;max-width:100%;overflow:visible}.tf-category-chip{min-width:0;justify-content:center;gap:5px;padding:8px clamp(6px,.7vw,11px);font-size:clamp(10px,.82vw,12px);white-space:nowrap}

/* Informational acknowledgment bar. This is a notice, not an opt-in control. */
.tf-privacy-notice[hidden]{display:none!important}.tf-privacy-notice{position:fixed;right:18px;bottom:18px;left:18px;z-index:1200;display:flex;align-items:center;justify-content:space-between;gap:18px;width:min(1180px,calc(100% - 36px));margin:auto;padding:14px 16px;border:1px solid var(--tf-line);border-left:5px solid var(--tf-cyan);border-radius:10px;background:var(--tf-surface);color:var(--tf-ink);box-shadow:0 18px 55px rgba(3,27,43,.24)}.tf-privacy-notice-copy{display:grid;gap:2px;min-width:0}.tf-privacy-notice-copy strong{color:var(--tf-navy);font-size:14px}.tf-privacy-notice-copy span{color:var(--tf-muted);font-size:13px;line-height:1.45}.tf-privacy-notice-actions{display:flex;align-items:center;flex:none;gap:12px}.tf-privacy-notice-actions a{font-size:13px;font-weight:750;white-space:nowrap}.tf-privacy-notice-actions .tf-btn{min-width:58px}
html[data-theme="dark"] .tf-privacy-notice{border-color:var(--border,rgba(255,255,255,.18));border-left-color:#22d3ee;background:var(--surface,#111b2e);color:var(--text,#f8fbff)}html[data-theme="dark"] .tf-privacy-notice-copy strong{color:var(--text,#f8fbff)}html[data-theme="dark"] .tf-privacy-notice-copy span{color:var(--muted,#bfd0df)}html[data-theme="dark"] .tf-privacy-notice-actions a{color:#67e8f9}

/* Legacy compatibility surfaces: keep light-era panels readable in the shared dark theme. */
html[data-theme="dark"] body.tf-has-v7-nav .tf-tabpanel,
html[data-theme="dark"] body.tf-has-v7-nav .pw-check,
html[data-theme="dark"] body.tf-has-v7-nav .mac-bit,
html[data-theme="dark"] body.tf-has-v7-nav .stats-box,
html[data-theme="dark"] body.tf-has-v7-nav .live-box,
html[data-theme="dark"] body.tf-has-v7-nav .fa-drop,
html[data-theme="dark"] body.tf-has-v7-nav .tf-check{background:#172438!important;color:#f8fbff!important;border-color:#475569!important}
.tf-nav-mega .tf-nav-category-links a[aria-current="page"]{background:#dbeafe!important;color:#075985!important}
body.tf-has-v7-nav>footer:not(.tf-footer) a{color:#fff!important;text-decoration-color:rgba(255,255,255,.72)}
.tf-weather-root.tf-dark .tf-top-card-title{color:#e8eef7!important}

/* Normalize legacy pages that still use the original two-column shell. */
body>.container-group{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;width:min(1280px,calc(100% - 32px))!important;max-width:1280px!important;margin:16px auto!important;padding:0!important;align-items:start!important}.container-group>.container-half{float:none!important;width:auto!important;max-width:none!important;min-width:0!important;margin:0!important;padding:18px!important;box-sizing:border-box!important}.container-half>*{max-width:100%}.container-half .notepad,.container-half textarea{width:100%;box-sizing:border-box}.container-half pre,.container-half code{max-width:100%;overflow-wrap:anywhere}.container-half table{max-width:100%}

/* Original site banners are redundant when the shared v7 navbar exists. */
body.tf-has-v7-nav>header.tf-legacy-banner{display:none!important}

/* Improve legacy cards/forms without taking ownership away from purpose-built tools. */
body.tf-has-v7-nav .container:not(.tf-container){max-width:1280px;margin-left:auto;margin-right:auto;box-sizing:border-box}.tf-has-v7-nav input[type=text],.tf-has-v7-nav input[type=password],.tf-has-v7-nav input[type=email],.tf-has-v7-nav input[type=url],.tf-has-v7-nav input[type=number],.tf-has-v7-nav input[type=search],.tf-has-v7-nav input[type=tel],.tf-has-v7-nav select,.tf-has-v7-nav textarea{max-width:100%;box-sizing:border-box}.tf-has-v7-nav img{max-width:100%;height:auto}.tf-has-v7-nav pre{overflow:auto;max-width:100%}.tf-has-v7-nav table{border-collapse:collapse}.tf-has-v7-nav .table-responsive,.tf-has-v7-nav .tf-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}.tf-has-v7-nav button,.tf-has-v7-nav input,.tf-has-v7-nav select,.tf-has-v7-nav textarea{font:inherit}

/* Prevent stale Popular Tools blocks from flashing before JS removes them. */
.tf-popular-tools-removed{display:none!important}

/* Consistent status alerts across old/new class names. */
.tf-alert.bad{border-color:#efb0b0;background:#fff2f2;color:#8e1d1d}.tf-alert.warn{border-color:#f1d28d;background:#fff9e9;color:#745318}.tf-alert.good{border-color:#a5d9c3;background:#edf9f3;color:#245e47}

/* Better touch targets and wrapping. */
@media (pointer:coarse){.tf-btn,.tf-nav-links>a,.tf-nav-links summary,.tf-theme-toggle{min-height:42px}.tf-actions{gap:8px}}

@media(max-width:1180px){.tf-nav-weather{display:none!important}.tf-command-trigger kbd{display:none}.tf-nav-links>a,.tf-nav-group>summary{padding-inline:7px}.tf-category-strip{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:thin;padding-bottom:12px}.tf-category-chip{flex:0 0 auto;font-size:12px;scroll-snap-align:start}}

@media(max-width:900px){body>.container-group{grid-template-columns:1fr!important;width:min(100% - 22px,760px)!important}.container-group>.container-half{padding:15px!important}.tf-nav-links .tf-theme-toggle{width:100%;justify-content:flex-start}.tf-nav-mega{left:0!important;right:0!important;max-height:none!important}.tf-nav-mega-grid{grid-template-columns:1fr!important}.tf-nav-category-links{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){body>.container-group{width:calc(100% - 16px)!important;gap:10px!important}.container-group>.container-half{padding:12px!important;border-radius:9px!important}.tf-page{padding-left:8px!important;padding-right:8px!important}.tf-card{padding:14px!important}.tf-form-grid,.tf-grid{min-width:0}.tf-actions{flex-wrap:wrap}.tf-actions>.tf-btn,.tf-actions>button,.tf-actions>a.tf-btn{max-width:100%}.tf-nav-category-links{grid-template-columns:1fr!important}.tf-title{font-size:clamp(1.65rem,9vw,2.2rem)!important}pre{font-size:12px}.tf-command{padding:3vh 8px 8px!important}.tf-command-panel{padding:13px!important}.tf-command-meta span:last-child{display:none}body.tf-has-v7-nav .tf-brand-logo{height:26px}.tf-brand-product{font-size:14px}body.tf-has-v7-nav .tf-footer-brand img{height:26px}}
@media(max-width:680px){.tf-privacy-notice{right:10px;bottom:10px;left:10px;display:grid;width:auto;max-width:calc(100vw - 20px);gap:11px;padding:13px 14px}.tf-privacy-notice-copy,.tf-privacy-notice-actions{min-width:0;max-width:100%}.tf-privacy-notice-copy span{overflow-wrap:anywhere}.tf-privacy-notice-actions{justify-content:space-between;flex-wrap:wrap}.tf-privacy-notice-actions .tf-btn{min-height:42px;min-width:72px}}

/* Dark-theme compatibility for legacy wrappers. */
html[data-theme="dark"] body>.container-group>.container-half{background:var(--surface,#111b2e)!important;color:var(--text,#f8fbff)!important;border-color:var(--border,rgba(255,255,255,.16))!important}html[data-theme="dark"] .tf-has-v7-nav .notepad{background:var(--surface,#111b2e)!important}html[data-theme="dark"] .tf-has-v7-nav a:not(.tf-btn):not(.tf-brand):not(.tf-command-item){text-underline-offset:2px}

/* Final shared contrast contract. Kept last so legacy inline-era styles cannot
   silently restore light-palette text on dark shared cards. */
html[data-theme="dark"] body.tf-has-v7-nav .tf-section-title h2,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card h1,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card h2,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card h3,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card h4{color:#f8fbff!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-card p,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card .muted,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card .tf-muted,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card small,
html[data-theme="dark"] body.tf-has-v7-nav .tf-card dt,
html[data-theme="dark"] body.tf-has-v7-nav .cidr-binary-label{color:#cbd5e1!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-tool-category{color:#5eead4!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-card code:not(pre code),
html[data-theme="dark"] body.tf-has-v7-nav output{color:#bfdbfe!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-card a:not(.tf-btn):not(.btn){color:#67e8f9}
html[data-theme="dark"] body.tf-has-v7-nav .tab-btn,
html[data-theme="dark"] body.tf-has-v7-nav .tab-button{background:#075985!important;border-color:#0e7490!important;color:#fff!important}
html[data-theme="dark"] body.tf-has-v7-nav .tab-btn.active,
html[data-theme="dark"] body.tf-has-v7-nav .tab-button.active{background:#0369a1!important;color:#fff!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-btn:not(.tf-btn-quiet):not(.tf-btn-danger),
html[data-theme="dark"] body.tf-has-v7-nav .btn-primary,
html[data-theme="dark"] body.tf-has-v7-nav .btn-success{background:#0369a1!important;border-color:#0369a1!important;color:#fff!important}
html[data-theme="dark"] body.tf-has-v7-nav .small-note,
html[data-theme="dark"] body.tf-has-v7-nav .small-note em{color:#e2e8f0!important}
html[data-theme="dark"] body.tf-has-v7-nav .btn-outline-danger{color:#fecdd3!important;border-color:#fb7185!important}
html[data-theme="dark"] body.tf-has-v7-nav .cidr-kpi span{color:#cbd5e1!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-card kbd{background:#0e1728!important;color:#e2e8f0!important;border-color:#475569!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-privacy-notice a{color:#67e8f9!important}
html[data-theme="dark"] body.tf-has-v7-nav .btn-outline-danger{color:#ffe4e6!important}
html[data-theme="light"] body.tf-has-v7-nav .tab-btn,
html[data-theme="light"] body.tf-has-v7-nav .tab-button{background:#075985!important;border-color:#075985!important;color:#fff!important}
html[data-theme="light"] body.tf-has-v7-nav .tool-card label{color:#e5e7eb!important}
html[data-theme="light"] body[data-game] button.primary{background:#0f766e!important;color:#fff!important}
html[data-theme="dark"] body.tf-has-v7-nav .regex-token{background:#0e1728!important;border-color:#475569!important}
html[data-theme="dark"] body.tf-has-v7-nav .regex-token code{color:#bfdbfe!important}
html[data-theme="dark"] body.tf-has-v7-nav .editor-surface,
html[data-theme="dark"] body.tf-has-v7-nav .editor-surface p{background:#fff!important;color:#111!important;color-scheme:light}
html[data-theme="dark"] body.tf-has-v7-nav .editor-surface h1,
html[data-theme="dark"] body.tf-has-v7-nav .editor-surface h2,
html[data-theme="dark"] body.tf-has-v7-nav .editor-surface h3{color:#163447!important}
html[data-theme="dark"] body.tf-has-v7-nav .regex-token span,
html[data-theme="dark"] body.tf-has-v7-nav .editor-status,
html[data-theme="dark"] body.tf-has-v7-nav .ipsub-ip span,
html[data-theme="dark"] body.tf-has-v7-nav .meta-drop span,
html[data-theme="dark"] body.tf-has-v7-nav .pw-check span{color:#cbd5e1!important}
body.tf-has-v7-nav label.tf-btn{color:#fff!important}
body.tf-has-v7-nav .btn.secondary,
body.tf-has-v7-nav .enigma-btn.secondary{background:#0f766e!important;border-color:#0f766e!important;color:#fff!important}
body.tf-has-v7-nav button.good{background:#167a4e!important;color:#fff!important}
body.tf-has-v7-nav .btn-start{background:#075985!important;color:#fff!important}
body.tf-has-v7-nav .btn-stop{background:#b42318!important;color:#fff!important}
body.tf-has-v7-nav .timestamp-actions button{background:#005fae!important;color:#fff!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-tab.active{background:#075985!important;color:#fff!important}
html[data-theme="dark"] body.tf-has-v7-nav .tf-privacy-notice a:not(.tf-btn){color:#67e8f9!important}
html[data-theme="dark"] body.tf-has-v7-nav a.nav-link{color:#67e8f9!important}
html[data-theme="dark"] body.tf-has-v7-nav .nav-primary,
html[data-theme="dark"] body.tf-has-v7-nav .eyebrow,
html[data-theme="dark"] body.tf-has-v7-nav .link-btn{color:#a5b4fc!important}
html[data-theme="light"] body[data-game] .content button.primary{background:#0f766e!important;color:#fff!important}
.tf-privacy-notice .tf-btn{background:#0369a1!important;border-color:#0369a1!important;color:#fff!important}
html[data-theme="dark"] body.tf-has-v7-nav .playground .note{color:#cbd5e1!important}
body.tf-has-v7-nav .playground .btn-success{background:#167a4e!important;border-color:#167a4e!important;color:#fff!important}
body.tf-has-v7-nav .editor p[style*="color"]{color:#1f6f35!important}
html[data-theme="dark"] .pw-metric span{color:#cbd5e1!important}
#liveTimestamp+button{background:#005fae!important;color:#fff!important}
html[data-theme="dark"] .playground-wrap .note{color:#cbd5e1!important}
.playground-wrap .btn-success{background:#167a4e!important;border-color:#167a4e!important;color:#fff!important}
.playground-wrap .wysiwyg p[style*="color"]{color:#1f6f35!important}
.nav-tabs .nav-link.active{color:#075985!important}
html[data-theme="dark"] body.tf-has-v7-nav .nav-tabs .nav-link.active{color:#075985!important}
html[data-theme="dark"] body.tf-has-v7-nav .hint,
html[data-theme="dark"] body.tf-has-v7-nav #hint,
html[data-theme="dark"] body.tf-has-v7-nav .card li,
html[data-theme="dark"] body.tf-has-v7-nav .card li b{color:#e2e8f0!important}
html[data-theme="dark"] body.tf-has-v7-nav .tool-card a{color:#67e8f9!important}
