/* The free tools (/tools/): the site's frame, tokens, buttons, tables and code blocks, plus the few pieces a tool needs. */
.tool-hero { padding-block: clamp(48px, 7vw, 88px) clamp(32px, 5vw, 56px); }
.tool-hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); letter-spacing: -0.06em; line-height: 1; margin: 14px 0 18px; max-width: 18ch; }
.tool-hero .lede { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 40rem; margin-bottom: 28px; }
.tool-hero .crumbs a { color: inherit; }

.tool-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; max-width: 44rem; }
.tool-form input, .tool-form textarea {
  flex: 1 1 18rem; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 0.9375rem;
}
.tool-form input { height: 48px; }
.tool-form textarea { flex-basis: 100%; min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.5; }
.tool-form input::placeholder, .tool-form textarea::placeholder { color: var(--faint); }
.tool-error { color: var(--blown); margin: 16px 0 0; }

.tool-result { display: grid; gap: 20px; max-width: 52rem; }
.tool-card { padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.tool-card h2, .tool-card h3 { font-size: 1.375rem; letter-spacing: -0.035em; margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tool-result h3 { font-size: 1.125rem; letter-spacing: -0.03em; margin: 12px 0 6px; }
.tool-card p:last-child { margin-bottom: 0; }
.tool-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0 0 14px; font-size: 0.9375rem; }
.tool-facts dt { color: var(--muted); }
.tool-facts dd { margin: 0; overflow-wrap: anywhere; }
.tool-ua { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); font-size: 0.8125rem; overflow-wrap: anywhere; }

.tool-verdict { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.05em; margin: 4px 0 6px; }
.tool-probs { display: grid; gap: 8px; margin: 0 0 14px; max-width: 26rem; }
.tool-probs div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 3rem; align-items: center; gap: 10px; font-size: 0.875rem; }
.tool-probs dt { color: var(--muted); }
.tool-probs dd { margin: 0; display: contents; }
.tool-track { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.tool-track span { display: block; height: 100%; background: var(--f); }
.tool-probs output { text-align: right; font-variant-numeric: tabular-nums; }
.tool-signals { margin: 0; padding-left: 18px; font-size: 0.9375rem; line-height: 1.7; }
.tool-signals code { font-size: 0.8125rem; color: var(--muted); }

.tool-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.tool-status.is-blocked { color: var(--blown); }
.tool-status.is-allowed { color: var(--human); }
.tool-table td small { display: block; color: var(--muted); }

.tool-cta { padding-block: clamp(48px, 7vw, 80px); }
.tool-cta h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.05em; margin-bottom: 12px; }
.tool-cta p { max-width: 40rem; margin-bottom: 24px; }

/* Each tool's own colour, from the site's tokens: --t (ink) and --t-soft (fill). */
:is(.tool-tile, .tool-hero)[data-tone="accent"] { --t: var(--accent); --t-soft: var(--accent-soft); }
:is(.tool-tile, .tool-hero)[data-tone="human"] { --t: var(--human); --t-soft: var(--human-soft); }
:is(.tool-tile, .tool-hero)[data-tone="identity"] { --t: var(--identity); --t-soft: var(--identity-soft); }
:is(.tool-tile, .tool-hero)[data-tone="registry"] { --t: var(--registry); --t-soft: var(--registry-soft); }

.tool-badge { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: var(--r-md); background: var(--t-soft); color: var(--t); }

.tool-eyebrow { display: block; margin: 0 0 6px; font: 600 0.8125rem/1.3 var(--sans); color: var(--t); }

/* Hero: the tool's badge beside its name, a thin bar of its colour along the top. */
.tool-hero[data-tone] { border-top: 3px solid var(--t); background: linear-gradient(180deg, color-mix(in srgb, var(--t) 12%, transparent), transparent 75%); }
.tool-hero-head { display: flex; align-items: center; gap: 18px; margin: 14px 0 18px; }
.tool-hero-head h1 { margin: 0; }

/* Cards on /tools/ and under each tool: a tinted panel in the tool's colour (big icon + preview), then the text. */
.tool-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tool-tile > a {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid color-mix(in srgb, var(--t) 30%, var(--line));
  border-radius: 16px; background: var(--surface); color: inherit; text-decoration: none;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool-tile > a:hover { border-color: var(--t); transform: translateY(-3px); box-shadow: 0 18px 40px -24px var(--t); }
.tool-tile > a:focus-visible { outline: 2px solid var(--t); outline-offset: 3px; }
.tool-tile-panel {
  position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 230px; padding: 22px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--t) 22%, transparent) 1px, transparent 0) 0 0 / 14px 14px,
    linear-gradient(160deg, color-mix(in srgb, var(--t) 22%, var(--surface)), var(--t-soft));
  border-bottom: 1px solid color-mix(in srgb, var(--t) 30%, var(--line));
}
.tool-tile-text { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: 1; padding: 22px 22px 24px; }
.tool-tile-name { font-weight: 650; font-size: 1.625rem; letter-spacing: -0.045em; line-height: 1.05; }
.tool-tile-blurb { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.tool-badge-solid { width: 56px; height: 56px; border-radius: 14px; background: var(--t); color: var(--surface); box-shadow: 0 10px 24px -12px var(--t); }
.tool-try {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; margin-top: auto; padding: 0 20px; border-radius: var(--r-sm);
  background: var(--t); color: var(--surface); font-weight: 600; font-size: 0.9375rem; box-shadow: 0 6px 16px -10px var(--t);
}
.tool-tile-text .tool-try { margin-top: 8px; }
.tool-tile > a:hover .tool-try { filter: brightness(1.08); }
.tool-tile > a:hover .tool-try span { transform: translateX(3px); }
.tool-try span { transition: transform .15s; }

.tool-tile.is-featured { grid-column: 1 / -1; }
.tool-tile.is-featured > a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); border-width: 2px; }
.tool-tile.is-featured .tool-tile-panel { order: 2; min-height: 340px; justify-content: center; padding: clamp(24px, 4vw, 44px); border-bottom: 0; border-left: 1px solid color-mix(in srgb, var(--t) 30%, var(--line)); }
.tool-tile.is-featured .tool-tile-text { justify-content: center; gap: 14px; padding: clamp(28px, 4.5vw, 56px); }
.tool-tile.is-featured .tool-tile-name { font-size: clamp(2.25rem, 4.6vw, 3.5rem); letter-spacing: -0.06em; line-height: 0.98; }
.tool-tile.is-featured .tool-tile-blurb { font-size: 1.125rem; max-width: 34rem; }
.tool-tile.is-featured .tool-try { height: 52px; padding: 0 26px; font-size: 1.0625rem; }
.tool-tile.is-featured .tool-badge-solid { width: 68px; height: 68px; border-radius: 18px; }
.tool-tile.is-featured .tool-eyebrow { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tool-tile:not(.is-featured) .tool-eyebrow { display: none; }

/* Previews: small made-up examples of each result. */
.tool-preview { margin-top: auto; display: grid; gap: 9px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--t) 25%, var(--line)); border-radius: 12px; background: var(--surface); font-size: 0.8125rem; min-width: 0; box-shadow: 0 12px 28px -20px var(--t); }
.pv-row { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); align-items: center; gap: 10px; }
.pv-name { color: var(--muted); }
.pv-track { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.pv-fill { display: block; height: 100%; border-radius: inherit; background: var(--f); width: var(--w, 30%); }
.pv-human { --w: 78%; animation: pv-human 6s ease-in-out infinite; }
.pv-bot { --w: 14%; animation: pv-bot 6s ease-in-out infinite; }
.pv-agent { --w: 8%; animation: pv-agent 6s ease-in-out infinite; }
@keyframes pv-human { 0%, 30% { width: 78%; } 45%, 75% { width: 12%; } 90%, 100% { width: 78%; } }
@keyframes pv-bot { 0%, 30% { width: 14%; } 45%, 75% { width: 10%; } 90%, 100% { width: 14%; } }
@keyframes pv-agent { 0%, 30% { width: 8%; } 45%, 75% { width: 82%; } 90%, 100% { width: 8%; } }
.pv-ua code { display: block; font-size: 0.75rem; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.pv-ua mark { background: var(--t-soft); color: var(--t); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.pv-chip { justify-self: start; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); background: var(--t-soft); color: var(--t); font: 600 0.75rem/1 var(--sans); white-space: nowrap; }
.pv-chip.is-blocked { background: color-mix(in srgb, var(--blown) 12%, transparent); color: var(--blown); }
.pv-chip.is-allowed { background: var(--human-soft); color: var(--human); }
.pv-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.pv-line code { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-title { font: 500 0.75rem var(--sans); color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.pv-check { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; }
.pv-check i { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--faint); }
.pv-check.is-ok i { background: var(--human); }
.pv-check.is-warn i { background: var(--gold); }
.pv-check.is-info i { background: var(--t); }
.is-featured .tool-preview { margin-top: 0; padding: 20px 22px; gap: 14px; font-size: 0.9375rem; }
.is-featured .pv-check { font-size: 1rem; }

.tool-badge-solid.tool-badge-lg { width: 72px; height: 72px; border-radius: 18px; }

/* The Free tools section on the home page. */
.home-tools .row-h { margin-bottom: 10px; }
.home-tools-lede { margin-bottom: 28px; }

/* Store check results. */
.tool-checks { margin: 0; padding-left: 18px; line-height: 1.8; }
.tool-advice ol { margin: 0; padding-left: 20px; line-height: 1.6; display: grid; gap: 8px; }
.tool-script-advice { margin: 12px 0; padding-left: 20px; line-height: 1.6; display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  .pv-fill { animation: none; }
  .tool-tile > a, .tool-try span { transition: none; }
  .tool-tile > a:hover { transform: none; }
}

@media (max-width: 900px) {
  .tool-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tool-facts { grid-template-columns: 1fr; gap: 2px; }
  .tool-facts dd { margin-bottom: 8px; }
  .tool-tiles { grid-template-columns: minmax(0, 1fr); }
  .tool-tile.is-featured > a { grid-template-columns: minmax(0, 1fr); }
  .tool-tile.is-featured .tool-tile-panel { order: 0; min-height: 0; border-left: 0; border-bottom: 1px solid color-mix(in srgb, var(--t) 30%, var(--line)); }
  .tool-tile-panel { min-height: 0; }
  .tool-hero-head { gap: 14px; }
  .tool-badge-solid.tool-badge-lg { width: 56px; height: 56px; }
}

/* ---------- Ad calculators ---------- */
.pv-check .pv-value { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.calc { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc-form { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.calc-field { display: grid; gap: 4px; }
.calc-label { font-weight: 600; font-size: 0.9375rem; }
.calc-hint { font-size: 0.8125rem; color: var(--muted); }
.calc-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm, 8px); background: var(--paper); }
.calc-input:focus-within { outline: 2px solid var(--ink); outline-offset: 1px; }
.calc-input input { flex: 1; min-width: 0; height: 44px; border: 0; background: none; padding: 0 12px; font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); outline: none; }
.calc-input input::placeholder { color: var(--faint); }
.calc-affix { padding: 0 12px; color: var(--muted); }
.calc-input.has-prefix input { padding-left: 0; }
.calc-input.has-suffix input { padding-right: 0; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-result .tool-card { display: grid; gap: 16px; }
.calc-empty { padding: 22px; border: 1px dashed var(--line); border-radius: var(--r-md); margin: 0; }
.calc-stat { display: grid; gap: 2px; }
.calc-stat-label { font-size: 0.8125rem; color: var(--muted); }
.calc-stat-value { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc-stat.is-main .calc-stat-value { font-size: clamp(2.25rem, 6vw, 3rem); letter-spacing: -0.04em; }
.calc-stat-note { font-size: 0.8125rem; color: var(--muted); }
.calc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 16px; }
.calc-notes { margin: 0; padding-left: 20px; line-height: 1.6; display: grid; gap: 8px; }
.calc-verdict { margin: 0; font-weight: 500; }
.calc-verdict.is-profit { color: var(--human); }
.calc-verdict.is-loss { color: var(--blown); }
.calc-table caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
.calc-table tr.is-own td { font-weight: 600; }
.more-tools-all { margin: 16px 0 0; }
.sq-file { position: relative; cursor: pointer; }
.sq-file:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.sq-private { margin: 12px 0 0; }
.tool-table tr.is-flagged td:first-child { font-weight: 600; }
.tool-answer { max-width: 46rem; margin: 0 0 12px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 1.0625rem; line-height: 1.55; }
.tool-related { margin: 0; }
