/* Free Tools page (/tools/). Approved 2026-10-26 from _mockups/tools-page. Hero styles come from /css/client-hub.css. */

/* Hero search */
.tl-search { display: flex; align-items: center; gap: 10px; max-width: 520px; min-height: 56px; padding: 0 8px 0 18px; border-radius: 16px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 18px 40px -24px rgba(0,0,0,0.6); }
.tl-search:focus-within { border-color: var(--cta); box-shadow: 0 0 0 4px rgba(221,98,38,0.25); }
.tl-search .material-icons { color: var(--cta); }
.tl-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 1.02rem; padding: 14px 0; }
.tl-search input::placeholder { color: #a7abb2; }
.tl-search kbd { font: 600 0.75rem ui-monospace, monospace; color: #c9cbce; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; padding: 2px 8px; }
:root:not([data-theme="dark"]) .tl-search { background: #fff; border-color: #dcdee1; box-shadow: 0 18px 40px -26px rgba(29,31,34,0.35); }
:root:not([data-theme="dark"]) .tl-search input { color: #1d1f22; }
:root:not([data-theme="dark"]) .tl-search input::placeholder { color: #646A73; }
:root:not([data-theme="dark"]) .tl-search kbd { color: #4a4f57; border-color: #c9cbce; }

/* "Is it just you?" panel in the hero */
.tl-panel .ch-desk__list li { justify-content: flex-start; gap: 14px; }
.tl-step { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 0.85rem var(--font-display); background: var(--cta); color: #fff; }
.tl-panel .ch-desk__list a { color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--cta); text-underline-offset: 3px; }
.tl-panel .ch-desk__list a:hover { color: var(--cta); }

/* Filter chips */
.tl-tools { padding: 64px 0 40px; }
.tl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.tl-filters button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 0.92rem var(--font-display); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.tl-filters button .material-icons { font-size: 18px; color: var(--cta); }
.tl-filters button:hover { border-color: var(--cta); }
.tl-filters button[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); color: #fff; }
.tl-filters button[aria-pressed="true"] .material-icons { color: #fff; }
.tl-count { margin-left: auto; align-self: center; color: var(--ink-2); font-size: 0.88rem; }

/* Grid */
.tl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tl-grid > li { display: flex; }
.tl-grid > li.tl-feature { grid-column: span 2; grid-row: span 2; }
.tl-card { position: relative; overflow: hidden; isolation: isolate; flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: 0 18px 40px -28px rgba(55,59,64,0.4); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tl-card::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(221,98,38,0.12), transparent 45%); opacity: 0; transition: opacity .25s; }
.tl-card:hover, .tl-card:focus-visible { transform: translateY(-4px); border-color: var(--cta); box-shadow: 0 0 0 1px var(--cta), 0 28px 60px -30px rgba(221,98,38,0.55); color: var(--ink); }
.tl-card:hover::after, .tl-card:focus-visible::after { opacity: 1; }
.tl-card__top { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.tl-card__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); color: var(--cta); box-shadow: inset 0 0 0 1px var(--line); transition: transform .25s; }
.tl-card:hover .tl-card__icon { transform: rotate(-6deg) scale(1.06); }
.tl-card__icon .material-icons { font-size: 28px; }
.tl-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.tl-card h3 { margin: 0 0 8px; }
.tl-card p { color: var(--accent); margin: 0 0 22px; }
.tl-go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.92rem; color: var(--cta-deep, #b84f1c); }
.tl-go .material-icons { font-size: 18px; transition: transform .2s; }
.tl-card:hover .tl-go .material-icons { transform: translate(3px, -3px); }
.tl-go small { font-weight: 600; color: var(--ink-2); font-size: 0.8rem; margin-left: 4px; }
:root[data-theme="dark"] .tl-go { color: #f3915f; }

/* Featured speed test */
.tl-feature .tl-card { padding: 36px; background: #141518; border-color: #141518; color: #EFF0F1; }
.tl-feature .tl-card h3 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.tl-feature .tl-card p { color: #c9cbce; max-width: 46ch; }
.tl-feature .tl-card__icon { background: var(--cta); color: #fff; box-shadow: none; }
.tl-feature .tl-tag { color: #fff; border-color: rgba(255,255,255,0.3); }
.tl-feature .tl-go { color: #f3915f; }
.tl-feature .tl-go small { color: #a7abb2; }
.tl-gauge { position: relative; width: min(100%, 360px); margin: 0 auto 24px; }
.tl-gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.tl-gauge__track { fill: none; stroke: rgba(255,255,255,0.10); stroke-width: 16; stroke-linecap: round; }
.tl-gauge__fill { fill: none; stroke: var(--cta); stroke-width: 16; stroke-linecap: round; stroke-dasharray: 377; stroke-dashoffset: 377; animation: tl-fill 2.6s cubic-bezier(.2,.8,.2,1) .4s forwards; }
.tl-gauge__ticks line { stroke: rgba(255,255,255,0.25); stroke-width: 2; }
.tl-gauge__needle { transform-origin: 150px 150px; transform: rotate(-90deg); animation: tl-needle 2.6s cubic-bezier(.2,.8,.2,1) .4s forwards; }
.tl-gauge__needle line { stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.tl-gauge__needle circle { fill: var(--cta); }
.tl-gauge__label { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font: 700 0.78rem var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; color: #a7abb2; }
.tl-feature .tl-card:hover .tl-gauge__needle { animation: tl-needle 2.6s cubic-bezier(.2,.8,.2,1) forwards, tl-jitter .35s ease-in-out 2.6s infinite alternate; }
:root:not([data-theme="dark"]) .tl-feature .tl-card { background: var(--surface); border-color: var(--line); color: var(--ink); }
:root:not([data-theme="dark"]) .tl-feature .tl-card h3 { color: #1d1f22; }
:root:not([data-theme="dark"]) .tl-feature .tl-card p { color: #4a4f57; }
:root:not([data-theme="dark"]) .tl-feature .tl-tag { color: var(--cta-deep); border-color: var(--line); background: var(--surface); }
:root:not([data-theme="dark"]) .tl-feature .tl-go { color: var(--cta-deep, #b84f1c); }
:root:not([data-theme="dark"]) .tl-feature .tl-go small { color: #646A73; }
:root:not([data-theme="dark"]) .tl-gauge__track { stroke: #e7e8ea; }
:root:not([data-theme="dark"]) .tl-gauge__ticks line { stroke: #c9cbce; }
:root:not([data-theme="dark"]) .tl-gauge__needle line { stroke: #1d1f22; }
:root:not([data-theme="dark"]) .tl-gauge__label { color: #646A73; }
:root[data-theme="dark"] .tl-feature .tl-card { background: #0c0d0f; border-color: #34363b; }

.tl-empty { padding: 32px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; color: var(--ink-2); }

/* When to call us */
.tl-tips { padding: 16px 0 80px; }
.tl-tips__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tl-tip { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.tl-tip .material-icons { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--cta); color: #fff; font-size: 22px; }
.tl-tip h3 { margin: 0 0 4px; font-size: 1.02rem; }
.tl-tip p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
.tl-tip a { font-weight: 700; color: var(--cta-deep, #b84f1c); }
:root[data-theme="dark"] .tl-tip a { color: #f3915f; }

@keyframes tl-fill { to { stroke-dashoffset: 75; } }
@keyframes tl-needle { to { transform: rotate(54deg); } }
@keyframes tl-jitter { from { transform: rotate(50deg); } to { transform: rotate(58deg); } }

@media (max-width: 1000px) {
  .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-grid > li.tl-feature { grid-column: 1 / -1; grid-row: auto; }
  .tl-tips__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tl-grid { grid-template-columns: 1fr; }
  .tl-count { margin-left: 0; width: 100%; }
  .tl-search kbd { display: none; }
  .tl-feature .tl-card { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .tl-gauge__fill { animation: none; stroke-dashoffset: 75; }
  .tl-gauge__needle, .tl-feature .tl-card:hover .tl-gauge__needle { animation: none; transform: rotate(54deg); }
  .tl-card, .tl-card__icon, .tl-go .material-icons { transition: none; }
}

/* Fixes after first look */
.tl-gauge__label { position: static; display: block; margin-top: 10px; }
.tl-go small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
