@charset "utf-8";
/* ==========================================================================
   ToolsHub4u — Family sheet: Developer & Utility tools (20 pages)
   Hue: --cat-utility (violet).  Chrome (.wb-*) comes from tools.css and the
   SEO text blocks (.txt-*, .seo-checks) are shared; this sheet dresses the
   instrument parts that only the dev family emits:

     1  Code surface          .txt-output as an editor ground + gutter
     2  Pane copy control     hover-reveal, always on for touch
     3  Live preview frame    .dev-preview
     4  Colour swatches       .dev-swatches / .dev-swatch (+ ring)
     5  Diff table            .dev-diff (sticky head, add/del rows)
     6  Colour input pair     .wb-color
     7  Long-value readout    .res-value--long
     8  Range + checkbox grid .wb-range / .txt-check-grid
     9  Status + empty
   ========================================================================== */

/* ---------- 1. Code surface ---------------------------------------------
   The editor is the hero: ink-800 ground, 13px mono at 1.65, tabular. A
   ::before gutter carries a rule instead of numbers (the engine renders a
   plain textarea, so the counter lives in the pane footer instead). */
.txt-output-wrap {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 16px 16px 0;
}
.txt-output-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-300);
}
.txt-output-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--cat-utility);
}
.txt-output {
  display: block;
  width: 100%;
  min-height: 168px;
  max-height: 420px;
  padding: 13px 15px 13px 46px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(to right, var(--ink-700) 0 34px, transparent 34px),
    var(--ink-800);
  color: var(--text-200);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  tab-size: 2;
  resize: vertical;
  overflow: auto;
  white-space: pre;
  overflow-wrap: normal;
  transition: border-color 150ms;
}
/* the gutter rule: one hairline, never a fake line-number column */
.txt-output {
  background-image:
    linear-gradient(to right, var(--line-1) 34px, transparent 34px),
    linear-gradient(to right, var(--ink-700) 0 34px, transparent 34px);
  background-repeat: no-repeat;
  background-position: 0 0, 0 0;
  background-size: 34.5px 100%, 34px 100%;
}
.txt-output::placeholder { color: var(--text-400); }
.txt-output:hover { border-color: var(--line-2); }
.txt-output:focus { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--line-3); }

/* ---------- 2. Pane copy control ----------------------------------------
   .wb-copy already sits in the result head; inside the pane it becomes a
   floating key that appears on hover and stays visible on touch. */
.wb-result__head .wb-copy:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wb-result:focus-within .wb-copy { opacity: 1; }
.txt-output-wrap .wb-copy {
  position: absolute;
  top: -30px;
  right: 0;
  opacity: 0;
  transition: opacity 150ms var(--ease-soft);
}
.txt-output-wrap:hover .wb-copy,
.txt-output-wrap:focus-within .wb-copy { opacity: 1; }
@media (hover: none) {
  .txt-output-wrap .wb-copy { position: static; opacity: 1; justify-self: end; }
}

/* ---------- 3. Live preview frame ---------------------------------------- */
.dev-preview {
  margin: 16px 16px 0;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  background: var(--ink-800);
  overflow: hidden;
}
.dev-preview__label {
  padding: 8px 13px;
  border-bottom: 1px solid var(--line-1);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-300);
}
.dev-preview__frame {
  display: block;
  width: 100%;
  min-height: 160px;
  border: 0;
  background: var(--ink-600);
}

/* ---------- 4. Colour swatches: hairline ring keeps light chips legible --- */
.dev-swatches {
  display: grid;
  margin: 16px 16px 0;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.dev-swatch {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-1);
  background: var(--ink-800);
}
.dev-swatch:last-child { border-bottom: 0; }
.dev-swatch__chip {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-3);
  border-radius: var(--radius-xs);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink-900) 22%, transparent);
}
.dev-swatch__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-100);
}
.dev-swatch__meta strong { font-weight: 620; }
.dev-swatch__meta code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-100);
}
.dev-swatch__note { font-size: 0.75rem; color: var(--text-300); }

/* ---------- 5. Diff table ------------------------------------------------- */
.dev-diff {
  margin: 16px 16px 0;
  max-height: 460px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  background: var(--ink-800);
  overflow: auto;
}
.dev-diff__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.dev-diff__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-2);
  background: var(--ink-700);
  font-size: 0.6875rem;
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-300);
}
.dev-diff__table td { border-bottom: 1px solid var(--line-1); }
.dev-diff__num {
  width: 1%;
  padding: 0 8px;
  text-align: right;
  white-space: nowrap;
  color: var(--text-300);
  user-select: none;
}
.dev-diff__sign {
  width: 1%;
  padding: 0 6px;
  text-align: center;
  user-select: none;
  font-weight: 700;
  color: var(--text-300);
}
.dev-diff__code {
  padding: 1px 10px 1px 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-200);
}
/* rows are banded with a 1px rule and a sign character, not a fill alone */
.dev-diff__table tr[data-diff="add"] { background: color-mix(in srgb, var(--cat-games) 9%, transparent); }
.dev-diff__table tr[data-diff="del"] { background: color-mix(in srgb, var(--cat-pdf) 9%, transparent); }
.dev-diff__table tr[data-diff="skip"] { color: var(--text-400); }
.dev-diff__table tr[data-diff="add"] .dev-diff__code { border-inline-start: 1px solid color-mix(in srgb, var(--cat-games) 55%, transparent); }
.dev-diff__table tr[data-diff="del"] .dev-diff__code { border-inline-start: 1px solid color-mix(in srgb, var(--cat-pdf) 55%, transparent); }

/* ---------- 6. Colour input pair ----------------------------------------- */
.wb-color { display: flex; align-items: center; gap: 10px; }
.wb-color input[type="color"] {
  flex: none;
  width: 54px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xs);
  background: var(--ink-700);
  cursor: pointer;
  color-scheme: light;
  transition: border-color 150ms;
}
.wb-color input[type="color"]:hover { border-color: var(--line-3); }
.wb-color input[type="color"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wb-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.wb-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 2px; }
.wb-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 2px; }
.wb-color input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

/* ---------- 7. Long-value readout (digests, UUIDs, base64 blobs) ---------- */
.res-value--long {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: var(--text-100);
}

/* ---------- 8. Range pairs + checkbox grid ------------------------------- */
.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-utility);
  box-shadow: 0 0 0 1px var(--line-3);
}
.wb-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink-800);
  border-radius: 50%;
  background: var(--cat-utility);
}
.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; font-variant-numeric: tabular-nums; }
.wb-range .wb-input-wrap input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
  padding-right: 42px;
}
.wb-range .wb-input-wrap input[type="number"]::-webkit-inner-spin-button,
.wb-range .wb-input-wrap input[type="number"]::-webkit-outer-spin-button { appearance: none; margin: 0; }

.txt-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 9px 16px; }
.txt-check-grid .wb-check { min-height: 24px; }

/* live counter + status share the foot rail */
.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;
}
.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); }

/* ---------- 9. Status + empty ------------------------------------------- */
.calc-out > :first-child { margin-top: 16px; }
.res-status { margin: 0 16px 14px; }
.res-primary { margin: 0 16px; }
.res-stats { margin: 16px 16px 0; }
.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-value code, .res-value .mono { font-family: var(--font-mono); }

/* ---------- responsive --------------------------------------------------- */
@media (max-width: 640px) {
  .txt-output-wrap,
  .dev-preview,
  .dev-swatches,
  .dev-diff,
  .res-empty,
  .res-warning,
  .res-note,
  .res-status,
  .res-primary,
  .res-stats { margin-inline: 12px; }
  .wb-range { grid-template-columns: minmax(0, 1fr) 78px; }
  .txt-check-grid { grid-template-columns: 1fr; }
  .dev-swatch__chip { width: 38px; height: 38px; }
  .dev-diff__table { font-size: 0.6875rem; }
  .txt-toast { left: 12px; right: 12px; transform: none; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .txt-output,
  .wb-color input[type="color"],
  .txt-output-wrap .wb-copy { transition: none; }
}
