@charset "utf-8";
/* ==========================================================================
   ToolsHub4u — Family sheet: SEO & Web tools (22 pages)
   Hue: --cat-seo (indigo).  Chrome (.wb-*) comes from tools.css; this sheet
   dresses what the SEO engine renders into `.calc-out`:

     1  SERP preview          .seo-serp (the one familiar shape on the page)
     2  Score gauge           .seo-gauge  (banded, always labelled)
     3  Checklist             .seo-checks / .seo-check__*
     4  Bars                  .res-bars / .res-bar (keyword density)
     5  Code + text output    .txt-output-wrap / .txt-output
     6  Result lists          .txt-items / .txt-item
     7  Form extras   chips, range pairs, check grid, live counter, toast
     8  Result messages       .res-warning / .res-note / .res-empty
   ========================================================================== */

/* ---------- 1. SERP preview: a paper object on the instrument panel ------
   Kept deliberately recognisable as a search result; the resting surface is
   --ink-600 so the card sits apart from --ink-700 panel material. */
.seo-serp {
  margin: 16px 16px 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--ink-600);
  font-family: var(--font-text);
  box-shadow: var(--shadow-1);
}
.seo-serp__top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-300);
}
.seo-serp__favicon {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--cat-seo) 0 22%, transparent 24%),
    color-mix(in srgb, var(--cat-seo) 14%, var(--ink-500));
}
.seo-serp__site {
  flex: none;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550;
  color: var(--text-200);
}
.seo-serp__url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-300);
}
.seo-serp__title {
  margin-top: 7px;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.004em;
  color: var(--cat-seo);
  overflow-wrap: anywhere;
}
.seo-serp__desc {
  margin-top: 5px;
  font-size: 0.875rem;
  line-height: 1.52;
  color: var(--text-200);
  overflow-wrap: anywhere;
}
/* empty fields say so in words, not in a blank gap */
.seo-serp__title:empty::before,
.seo-serp__desc:empty::before {
  content: "Nothing entered";
  color: var(--text-300);
  font-style: italic;
  font-size: 0.875rem;
}
.seo-serp[data-device="mobile"] {
  max-width: 380px;
  padding: 14px;
}
.seo-serp[data-device="mobile"] .seo-serp__title { font-size: 1.0625rem; }
.seo-serp[data-device="mobile"] .seo-serp__desc { font-size: 0.8125rem; }

/* ---------- 2. Score gauge: hairline ring, mono readout, named band ------- */
.seo-gauge {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  background: var(--ink-800);
}
.seo-gauge__dial {
  --ring: var(--cat-seo);
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--pct, 0) * 1%), var(--line-1) 0);
}
.seo-gauge__dial::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--ink-800);
}
.seo-gauge__dial > * { position: relative; z-index: 1; }
.seo-gauge__dial span {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text-100);
}
.seo-gauge__dial small {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--text-300);
}
.seo-gauge__copy { display: grid; gap: 3px; min-width: 0; }
/* the band name is the primary signal; the hue only reinforces it */
.seo-gauge__label {
  font-weight: 620;
  font-size: 0.9375rem;
  color: var(--text-100);
}
/* band caption is a mono caps sentence fragment, never a coloured-only cue */
.seo-gauge__caption {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-300);
}
.seo-gauge[data-band="good"] .seo-gauge__dial { --ring: var(--cat-games); }
.seo-gauge[data-band="warn"] .seo-gauge__dial { --ring: var(--cat-calculators); }
.seo-gauge[data-band="bad"]  .seo-gauge__dial { --ring: var(--cat-pdf); }
.seo-gauge[data-band="good"] .seo-gauge__label { color: var(--cat-games); }
.seo-gauge[data-band="warn"] .seo-gauge__label { color: color-mix(in srgb, var(--cat-calculators) 82%, var(--text-100)); }
.seo-gauge[data-band="bad"]  .seo-gauge__label { color: color-mix(in srgb, var(--cat-pdf) 82%, var(--text-100)); }

/* ---------- 3. Checklist: hairline rows, icon shape carries the state ---- */
.seo-checks {
  display: grid;
  margin: 16px 16px 0;
  padding: 0;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.seo-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-1);
  background: var(--ink-800);
}
.seo-checks li:last-child { border-bottom: 0; }
.seo-check__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}
/* shape differs per state so a colourblind reader still gets the answer */
.seo-checks li[data-state="pass"] .seo-check__icon { color: var(--cat-games); }
.seo-checks li[data-state="warn"] .seo-check__icon { color: var(--cat-calculators); border-radius: 4px; }
.seo-checks li[data-state="fail"] .seo-check__icon { color: var(--cat-pdf); border-radius: 4px; transform: rotate(45deg); }
.seo-checks li[data-state="info"] .seo-check__icon { color: var(--cat-seo); border-radius: 50%; }
.seo-checks li[data-state="pass"] .seo-check__icon::after { content: ""; width: 7px; height: 4px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg) translateY(-1px); }
.seo-checks li[data-state="warn"] .seo-check__icon::after { content: "!"; }
.seo-checks li[data-state="fail"] .seo-check__icon::after { content: "×"; transform: rotate(-45deg); font-size: 0.75rem; }
.seo-checks li[data-state="info"] .seo-check__icon::after { content: "i"; font-style: italic; }
.seo-check__text { display: grid; gap: 2px; min-width: 0; font-size: 0.875rem; line-height: 1.5; color: var(--text-100); }
.seo-check__text strong { font-weight: 600; overflow-wrap: anywhere; }
.seo-check__body { font-size: 0.8125rem; color: var(--text-300); overflow-wrap: anywhere; }

/* ---------- 4. Bars: density rows with a hairline track ------------------ */
.res-bars { display: grid; margin: 16px 16px 0; }
.res-bars__title {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-300);
}
.res-bar {
  display: grid;
  grid-template-columns: minmax(64px, 12ch) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-1);
}
.res-bar:last-child { border-bottom: 0; }
.res-bar__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--text-200);
}
.res-bar__track {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-400);
  overflow: hidden;
}
.res-bar__fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--bar-color, var(--cat-seo));
}
.res-bar__value {
  min-width: 5ch;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-100);
}

/* ---------- 5. Code / text output pane ----------------------------------- */
.txt-output-wrap { display: grid; gap: 7px; margin: 16px 16px 0; }
.txt-output-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-300);
}
.txt-output {
  display: block;
  width: 100%;
  min-height: 130px;
  max-height: 340px;
  padding: 12px 14px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  background: var(--ink-800);
  color: var(--text-200);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transition: border-color 150ms;
}
.txt-output:hover { border-color: var(--line-2); }
.txt-output:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--line-3); }

/* ---------- 6. Result item list ------------------------------------------ */
.txt-items {
  display: grid;
  margin: 16px 16px 0;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.txt-item {
  display: grid;
  gap: 4px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-1);
  background: var(--ink-800);
}
.txt-item:last-child { border-bottom: 0; }
.txt-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-100);
}
.txt-item__head strong { font-weight: 600; overflow-wrap: anywhere; }
.txt-item__meta {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-300);
}
.txt-item__body { font-size: 0.8125rem; line-height: 1.55; color: var(--text-300); overflow-wrap: anywhere; }
.txt-item__text {
  display: block;
  padding: 6px 8px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-xs);
  background: var(--ink-700);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--phosphor-text);
  overflow-wrap: anywhere;
}

/* ---------- 7. Form extras the SEO engine adds --------------------------- */
.wb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  color: var(--text-200);
  cursor: pointer;
  transition: border-color 150ms, background-color 150ms, color 150ms;
}
.wb-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wb-chip:hover { border-color: var(--line-3); color: var(--text-100); }
.wb-chip:has(input:checked) {
  border-color: color-mix(in srgb, var(--cat-seo) 70%, transparent);
  background: color-mix(in srgb, var(--cat-seo) 12%, transparent);
  color: var(--text-100);
  font-weight: 600;
}
/* checked chips also carry a leading rule so the state is not colour alone */
.wb-chip:has(input:checked)::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--cat-seo);
}
.wb-chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.wb-range { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 12px; }
.wb-range input[type="range"] {
  width: 100%;
  height: 4px;
  appearance: none;
  border-radius: 2px;
  background: var(--ink-400);
  cursor: pointer;
}
.wb-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ink-800);
  border-radius: 50%;
  background: var(--cat-seo);
  box-shadow: 0 0 0 1px var(--line-3);
  cursor: grab;
}
.wb-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink-800);
  border-radius: 50%;
  background: var(--cat-seo);
}
.wb-range input[type="range"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.wb-range .wb-input-wrap input[type="number"] { text-align: right; }

.txt-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 16px; }

/* live counter in the form foot: mono caps, tabular */
.txt-live-count {
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--text-300);
  white-space: nowrap;
}
/* transient confirmation toast */
.txt-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 260;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--ink-600);
  box-shadow: var(--shadow-2);
  font-size: 0.8125rem;
  color: var(--text-100);
}
.txt-toast[hidden] { display: none; }
.txt-toast[data-tone="ok"] { border-color: color-mix(in srgb, var(--phosphor) 45%, transparent); }
.txt-toast[data-tone="warn"] { border-color: color-mix(in srgb, var(--cat-calculators) 55%, transparent); }

/* ---------- 8. Result messages ------------------------------------------- */
.calc-out > :first-child { margin-top: 16px; }
.res-empty {
  margin: 16px;
  padding: 26px 8px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-300);
}
.res-warning {
  margin: 14px 16px 16px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--cat-calculators) 34%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--cat-calculators) 8%, transparent);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-200);
}
.res-note { margin: 12px 16px 16px; font-size: 0.75rem; line-height: 1.6; color: var(--text-300); }
.res-status { margin: 0 16px 14px; }
.res-primary { margin: 0 16px; }
.res-stats { margin: 16px 16px 0; }

/* ---------- responsive --------------------------------------------------- */
@media (max-width: 640px) {
  .seo-serp,
  .seo-gauge,
  .seo-checks,
  .res-bars,
  .txt-output-wrap,
  .txt-items,
  .res-empty,
  .res-warning,
  .res-note,
  .res-status,
  .res-primary,
  .res-stats { margin-inline: 12px; }
  .seo-gauge { gap: 12px; padding: 12px; }
  .seo-gauge__dial { width: 68px; height: 68px; }
  .seo-gauge__dial span { font-size: 1.25rem; }
  .res-bar { grid-template-columns: minmax(50px, 9ch) minmax(0, 1fr) auto; gap: 9px; }
  .wb-range { grid-template-columns: minmax(0, 1fr) 78px; }
  .txt-check-grid { grid-template-columns: 1fr; gap: 9px; }
  .txt-toast { left: 12px; right: 12px; transform: none; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .wb-chip,
  .txt-output { transition: none; }
}
