/* ── Generators — page & tool styles ───────────────────────────────
   Builds on css/shared.css design tokens (:root). Same visual family
   as the other lkforge tools (Space Grotesk + JetBrains Mono), with a
   purple accent (#9333ea). QR generation, QR scanning and password
   generation all run 100% client-side — no network calls. */

main { max-width: 860px; margin: 0 auto; padding: 20px; }

/* ── Tool hero (icon + title + subtitle) ───────────────────────── */
.tool-hero { max-width: 860px; margin: 0 auto; padding: 36px 20px 4px; }
.tool-hero .hero-head { display: flex; align-items: center; gap: 16px; }
.tool-hero .hero-icon {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
}
.tool-hero .hero-icon svg { width: 30px; height: 30px; stroke: #fff; }
.tool-hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.tool-hero .subtitle { color: var(--muted); font-size: 1.02rem; margin-top: 12px; max-width: 680px; }

/* ── Tool card ─────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; margin-top: 24px; }
.card + .card { margin-top: 16px; }

/* ── Labels / inputs ───────────────────────────────────────────── */
.field-label { display: block; font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.field-label .hint { font-weight: 500; color: var(--muted); }

.txt-area {
  width: 100%; min-height: 110px; resize: vertical;
  font-family: 'Outfit', system-ui, sans-serif; font-size: 1rem; line-height: 1.6;
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.txt-area:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--ring),.14); }
.txt-area.readonly { background: var(--surface2); }
.txt-area::placeholder { color: var(--muted); }

.net-input, .net-num {
  font-family: 'JetBrains Mono', monospace; font-size: 1rem;
  padding: 13px 16px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.net-input { flex: 1 1 200px; min-width: 0; }
.net-input:focus, .net-num:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--ring),.14); }
.net-select {
  font-family: 'Outfit', system-ui, sans-serif; font-size: .98rem;
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); outline: none; cursor: pointer;
  transition: border-color .15s;
}
.net-select:focus { border-color: var(--accent); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  font-family: inherit; font-size: .98rem; font-weight: 700;
  border: none; border-radius: var(--radius); cursor: pointer;
  background: var(--accent); color: #fff;
  transition: background .15s, transform .1s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-h); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn-ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); border-color: var(--muted); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

/* ── Action row ────────────────────────────────────────────────── */
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ── Status / error line ───────────────────────────────────────── */
.status-line { min-height: 20px; margin-top: 12px; font-size: .88rem; font-weight: 600; }
.status-line.ok { color: var(--accent-fg); }
.status-line.error { color: #b42318; }

/* ── Options grid (shared by QR + password) ────────────────────── */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.opt-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.opt-field .net-select, .opt-field .net-input { width: 100%; flex: none; }

/* color picker pair (QR fg/bg) */
.color-pick { display: flex; align-items: center; gap: 10px; }
.color-pick input[type=color] {
  width: 46px; height: 44px; padding: 2px; cursor: pointer; flex-shrink: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.color-pick .hexval { font-family: 'JetBrains Mono', monospace; font-size: .88rem; color: var(--muted); text-transform: uppercase; }

/* ── QR generator preview ──────────────────────────────────────── */
.qr-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 300px; margin-top: 20px; padding: 24px;
  background: var(--surface2); border: 1.5px dashed var(--border); border-radius: var(--radius-lg);
}
.qr-stage canvas { max-width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); }
.qr-stage .qr-empty { color: var(--muted); font-size: .95rem; text-align: center; }
.qr-stage .qr-empty svg { width: 44px; height: 44px; stroke: var(--muted); opacity: .5; margin-bottom: 10px; }

/* ── QR scanner ────────────────────────────────────────────────── */
.mode-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.mode-tab {
  flex: 1 1 0; font-family: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
  padding: 11px 16px; min-height: 44px;
  color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  transition: background .15s, border-color .15s, color .15s;
}
.mode-tab:hover { border-color: var(--accent); }
.mode-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.scan-stage {
  position: relative; width: 100%; max-width: 420px; margin: 0 auto;
  aspect-ratio: 1 / 1; background: #0f0e0d; border-radius: var(--radius-lg);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.scan-stage video, .scan-stage canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-stage .scan-frame {
  position: absolute; inset: 14%; border: 3px solid rgba(255,255,255,.85);
  border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.25); pointer-events: none;
}
.scan-stage .scan-placeholder { position: absolute; color: rgba(255,255,255,.7); font-size: .92rem; text-align: center; padding: 0 20px; }
.scan-stage.dropping { outline: 3px dashed var(--accent); outline-offset: -6px; }

.upload-drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 16px; padding: 22px; text-align: center; cursor: pointer;
  background: var(--surface2); border: 1.5px dashed var(--border); border-radius: var(--radius-lg);
  color: var(--muted); font-size: .92rem; transition: border-color .15s, background .15s;
}
.upload-drop:hover, .upload-drop.dragover { border-color: var(--accent); background: var(--accent-bg); }
.upload-drop svg { width: 34px; height: 34px; stroke: var(--accent); }
.upload-drop strong { color: var(--text); }

.scan-result { margin-top: 18px; }
.scan-result .result-box {
  font-family: 'JetBrains Mono', monospace; font-size: .92rem; line-height: 1.6;
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface2); color: var(--text); word-break: break-all; white-space: pre-wrap;
}
.scan-result .result-box a { color: var(--accent); }

/* ── Password generator ────────────────────────────────────────── */
.pw-output {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 18px 18px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface2); margin-bottom: 4px;
}
.pw-output .pw-text {
  flex: 1 1 240px; min-width: 0; font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem; font-weight: 600; color: var(--text); word-break: break-all; line-height: 1.4;
}
.pw-output .pw-text.placeholder { color: var(--muted); font-weight: 400; }
.pw-icon-btn {
  flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--accent); border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: background .15s, border-color .15s;
}
.pw-icon-btn:hover { background: var(--accent-bg); border-color: var(--accent); }
.pw-icon-btn svg { width: 18px; height: 18px; }

/* strength meter */
.pw-strength { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.pw-bars { display: flex; gap: 5px; flex: 1 1 auto; }
.pw-bars span { flex: 1 1 0; height: 7px; border-radius: 99px; background: var(--border); transition: background .2s; }
.pw-strength .pw-label { font-size: .85rem; font-weight: 700; color: var(--muted); min-width: 56px; text-align: right; }
.pw-strength[data-level="1"] .pw-bars span:nth-child(-n+1) { background: #e0483a; }
.pw-strength[data-level="2"] .pw-bars span:nth-child(-n+2) { background: #e08a2a; }
.pw-strength[data-level="3"] .pw-bars span:nth-child(-n+3) { background: #c9a90a; }
.pw-strength[data-level="4"] .pw-bars span:nth-child(-n+4) { background: #2d9a4a; }
.pw-strength[data-level="1"] .pw-label { color: #e0483a; }
.pw-strength[data-level="2"] .pw-label { color: #c4760f; }
.pw-strength[data-level="3"] .pw-label { color: #9a830a; }
.pw-strength[data-level="4"] .pw-label { color: #2d9a4a; }

/* length slider */
.pw-len { margin-top: 22px; }
.pw-len-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.pw-len-head .pw-len-val { font-family: 'JetBrains Mono', monospace; font-size: 1.25rem; font-weight: 700; color: var(--accent); }
.pw-range { -webkit-appearance: none; appearance: none; width: 100%; height: 7px; border-radius: 99px; background: var(--border); outline: none; cursor: pointer; }
.pw-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.pw-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.pw-range:focus { box-shadow: 0 0 0 3px rgba(var(--ring),.18); }

/* option toggles */
.pw-toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 22px; }
.pw-toggle {
  display: flex; align-items: center; gap: 11px; cursor: pointer; user-select: none;
  padding: 13px 15px; min-height: 44px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.pw-toggle:hover { border-color: var(--accent); }
.pw-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.pw-toggle .box {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s;
}
.pw-toggle .box svg { width: 14px; height: 14px; stroke: #fff; opacity: 0; }
.pw-toggle input:checked ~ .box { background: var(--accent); border-color: var(--accent); }
.pw-toggle input:checked ~ .box svg { opacity: 1; }
.pw-toggle input:focus-visible ~ .box { box-shadow: 0 0 0 3px rgba(var(--ring),.18); }
.pw-toggle .tg-text { display: flex; flex-direction: column; gap: 1px; }
.pw-toggle .tg-name { font-size: .92rem; font-weight: 700; color: var(--text); }
.pw-toggle .tg-ex { font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: var(--muted); }

/* ── Sample / quick chips (QR presets) ─────────────────────────── */
.try-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; margin-top: 16px; }
.try-row .try-label { font-size: .85rem; color: var(--muted); font-weight: 600; margin-right: 2px; }
.try-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  font-family: inherit; font-size: .82rem; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 7px 13px; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.try-chip:hover { border-color: var(--accent); background: var(--accent-bg); transform: translateY(-1px); }

/* ── Trust row ─────────────────────────────────────────────────── */
.trust-row { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.trust-item { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.trust-item svg { width: 16px; height: 16px; stroke: var(--accent); flex-shrink: 0; }

/* ── Tool hub grid (index) ─────────────────────────────────────── */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(264px, 1fr)); gap: 18px; margin-top: 8px; }
.hub-card {
  display: block; text-decoration: none; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 24px; box-shadow: var(--shadow);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.hub-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-lg); text-decoration: none; }
.hub-card .hub-tag { position: absolute; top: 18px; right: 18px; font-size: .72rem; font-weight: 700; color: var(--accent-fg); background: var(--accent-bg); padding: 2px 9px; border-radius: 999px; }
.hub-card .hub-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.hub-card .hub-icon svg { width: 27px; height: 27px; stroke: #fff; }
.hub-card h2 { font-size: 1.2rem; font-weight: 800; color: var(--text); margin-bottom: 7px; }
.hub-card p { font-size: .9rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.hub-card .hub-open { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700; color: var(--accent); }

/* ── Content sections (how-it-works / faq) ─────────────────────── */
.section { max-width: 860px; margin: 16px auto; padding: 24px 20px; }
.section > h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.section > .section-sub { color: var(--muted); margin-bottom: 20px; }
.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.step-num { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-fg); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.step-body p { font-size: .92rem; color: var(--muted); line-height: 1.6; }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: .98rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: '\2013'; }
.faq .faq-body { padding: 0 18px 16px; font-size: .92rem; color: var(--muted); line-height: 1.7; }
.faq .faq-body a { color: var(--accent); }

/* ── Footer ────────────────────────────────────────────────────── */
footer.page-footer { border-top: 1px solid var(--border); padding: 24px 20px; text-align: center; font-size: .82rem; color: var(--muted); margin-top: 24px; }
footer.page-footer nav { margin-bottom: 6px; }
footer.page-footer nav a { color: var(--muted); }
footer.page-footer nav a:hover { color: var(--text); }

/* ── Toast ─────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; padding: 11px 20px; border-radius: var(--radius); font-size: .88rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Per-tool accent theming ───────────────────────────────────────
   Each tool page sets <body data-tool="…"> and inherits a distinct accent
   from a cohesive family; the index hub cards use matching .t-* classes.
   --ring is the rgb triplet used for focus glows. */
:root { --ring: 147,51,234; }

body[data-tool="qr"]       { --accent:#9333ea; --accent-h:#7e22ce; --accent-bg:#f3e8ff; --accent-fg:#6b21a8; --ring:147,51,234; }
body[data-tool="scanner"]  { --accent:#2563eb; --accent-h:#1d4ed8; --accent-bg:#dbeafe; --accent-fg:#1e40af; --ring:37,99,235; }
body[data-tool="password"] { --accent:#e11d48; --accent-h:#be123c; --accent-bg:#ffe4e6; --accent-fg:#9f1239; --ring:225,29,72; }
body[data-tool="palette"]  { --accent:#c026d3; --accent-h:#a21caf; --accent-bg:#fae8ff; --accent-fg:#86198f; --ring:192,38,211; }
body[data-tool="hash"]     { --accent:#059669; --accent-h:#047857; --accent-bg:#d1fae5; --accent-fg:#065f46; --ring:5,150,105; }
body[data-tool="uuid"]     { --accent:#d97706; --accent-h:#b45309; --accent-bg:#fef3c7; --accent-fg:#78350f; --ring:217,119,6; }

.hub-card.t-qr       { --accent:#9333ea; --accent-bg:#f3e8ff; --accent-fg:#6b21a8; }
.hub-card.t-scanner  { --accent:#2563eb; --accent-bg:#dbeafe; --accent-fg:#1e40af; }
.hub-card.t-password { --accent:#e11d48; --accent-bg:#ffe4e6; --accent-fg:#9f1239; }
.hub-card.t-palette  { --accent:#c026d3; --accent-bg:#fae8ff; --accent-fg:#86198f; }
.hub-card.t-hash     { --accent:#059669; --accent-bg:#d1fae5; --accent-fg:#065f46; }
.hub-card.t-uuid     { --accent:#d97706; --accent-bg:#fef3c7; --accent-fg:#78350f; }

/* ── Nav fits 6 tools + Home + Tools — hamburger up to 900px ──────── */
@media (max-width: 899px) {
  .site-header .site-nav .nav-link { display: none; }
  .site-header .nav-hamburger { display: flex; }
}
@media (min-width: 900px) {
  .site-header .site-nav .nav-link { display: inline-flex; min-width: auto; padding: 8px 12px; }
  .site-header .nav-hamburger { display: none; }
  .nav-mobile-menu { display: none !important; }
}

/* ── Hint line + kbd ───────────────────────────────────────────── */
.hint-line { margin-top: 14px; font-size: .85rem; color: var(--muted); }
.hint-line kbd {
  font-family: 'JetBrains Mono', monospace; font-size: .78rem; font-weight: 600;
  background: var(--surface2); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 7px; color: var(--text);
}

/* ── Color Palette ─────────────────────────────────────────────── */
.palette {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; min-height: 190px;
  border-radius: var(--radius-lg); overflow: hidden;
}
.swatch {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  align-items: center; min-height: 190px; padding: 12px 8px 14px; border-radius: var(--radius);
}
.swatch-lock {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; align-self: flex-end;
  background: rgba(255,255,255,.22); border: none; color: #fff; transition: background .15s, transform .1s;
}
.swatch.light .swatch-lock { background: rgba(0,0,0,.14); color: #1a1917; }
.swatch-lock:hover { background: rgba(255,255,255,.4); }
.swatch.light .swatch-lock:hover { background: rgba(0,0,0,.24); }
/* locked = solid white on every swatch — selectors here must out-specify the
   .swatch.light .swatch-lock(:hover) rules above, hence the .light variants. */
.swatch-lock.locked,
.swatch.light .swatch-lock.locked,
.swatch.light .swatch-lock.locked:hover { background: #fff; color: #1a1917; }
.swatch-lock svg { width: 17px; height: 17px; }
.swatch-hex {
  font-family: 'JetBrains Mono', monospace; font-size: .9rem; font-weight: 600; letter-spacing: .04em;
  cursor: pointer; padding: 6px 10px; border-radius: 7px; border: none;
  background: rgba(255,255,255,.22); color: #fff; transition: background .15s;
}
.swatch.light .swatch-hex { background: rgba(0,0,0,.12); color: #1a1917; }
.swatch-hex:hover { background: rgba(255,255,255,.42); }
.swatch.light .swatch-hex:hover { background: rgba(0,0,0,.2); }
@media (max-width: 560px) {
  .palette { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .swatch { min-height: 150px; padding: 8px 4px 10px; }
  .swatch-lock { width: 30px; height: 30px; }
  .swatch-hex { font-size: .7rem; padding: 4px 5px; }
}

/* ── Base-colour picker (palette tool) ─────────────────────────── */
.cp-card .field-label { margin-bottom: 12px; }
.cp-picker { display: flex; flex-direction: column; gap: 14px; }
.cp-sv {
  position: relative; width: 100%; height: 190px; border-radius: var(--radius);
  cursor: crosshair; touch-action: none; outline: none; border: 1px solid var(--border);
  background:
    linear-gradient(to top, #000, rgba(0,0,0,0)),
    linear-gradient(to right, #fff, rgba(255,255,255,0)),
    hsl(var(--cp-h, 240), 100%, 50%);
}
.cp-sv:focus-visible { box-shadow: 0 0 0 3px rgba(var(--ring),.4); }
.cp-sv-thumb {
  position: absolute; width: 20px; height: 20px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 1px 4px rgba(0,0,0,.4); pointer-events: none;
}
.cp-hue {
  position: relative; width: 100%; height: 16px; border-radius: 99px;
  cursor: pointer; touch-action: none; outline: none; border: 1px solid var(--border);
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.cp-hue:focus-visible { box-shadow: 0 0 0 3px rgba(var(--ring),.4); }
.cp-hue-thumb {
  position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%;
  transform: translate(-50%, -50%); background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 1px 4px rgba(0,0,0,.35); pointer-events: none;
}
.cp-fields { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.cp-swatch { flex-shrink: 0; width: 46px; height: 46px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.cp-field { display: flex; flex-direction: column; gap: 5px; }
.cp-field label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-left: 2px; }
.cp-field-hex { flex: 1 1 120px; min-width: 96px; }
.cp-input {
  font-family: 'JetBrains Mono', monospace; font-size: .95rem; text-align: center;
  padding: 10px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.cp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--ring),.14); }
.cp-num { width: 64px; }
.cp-field-hex .cp-input { text-align: left; text-transform: uppercase; }
@media (max-width: 560px) {
  .cp-num { width: 100%; }
  .cp-field:not(.cp-field-hex) { flex: 1 1 0; }
}

/* ── Hash output rows ──────────────────────────────────────────── */
.algo-toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 16px; }
.algo-toggle {
  display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none;
  padding: 10px 13px; min-height: 44px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s;
}
.algo-toggle:hover { border-color: var(--accent); }
.algo-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.algo-toggle .box {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--border); background: var(--surface);
  display: flex; align-items: center; justify-content: center; transition: background .15s, border-color .15s;
}
.algo-toggle .box svg { width: 13px; height: 13px; stroke: #fff; opacity: 0; }
.algo-toggle input:checked ~ .box { background: var(--accent); border-color: var(--accent); }
.algo-toggle input:checked ~ .box svg { opacity: 1; }
.algo-toggle input:focus-visible ~ .box { box-shadow: 0 0 0 3px rgba(var(--ring),.18); }
.algo-toggle .algo-name { font-family: 'JetBrains Mono', monospace; font-size: .86rem; font-weight: 600; color: var(--text); }

.hash-out { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.hash-empty { color: var(--muted); font-size: .92rem; }
.hash-row {
  display: grid; grid-template-columns: 88px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
}
.hash-row .hash-algo { font-family: 'JetBrains Mono', monospace; font-size: .82rem; font-weight: 700; color: var(--accent-fg); }
.hash-row .hash-val { font-family: 'JetBrains Mono', monospace; font-size: .84rem; color: var(--text); word-break: break-all; line-height: 1.5; }
.hash-copy {
  flex-shrink: 0; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--accent); border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: background .15s, border-color .15s;
}
.hash-copy:hover { background: var(--accent-bg); border-color: var(--accent); }
.hash-copy svg { width: 16px; height: 16px; }

.file-info {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 11px 14px; background: var(--accent-bg); border-radius: var(--radius);
  font-size: .88rem; font-weight: 600; color: var(--accent-fg);
}
.file-info button {
  background: none; border: none; color: var(--accent-fg); cursor: pointer; font-weight: 700;
  font-size: .85rem; text-decoration: underline; font-family: inherit;
}
@media (max-width: 560px) {
  .hash-row { grid-template-columns: 1fr auto; }
  .hash-row .hash-algo { grid-column: 1 / -1; }
}

/* ── UUID output rows ──────────────────────────────────────────── */
.uuid-out { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.uuid-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
}
.uuid-row .uuid-val { flex: 1 1 auto; font-family: 'JetBrains Mono', monospace; font-size: .92rem; color: var(--text); word-break: break-all; }
.uuid-copy {
  flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--accent); border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: background .15s, border-color .15s;
}
.uuid-copy:hover { background: var(--accent-bg); border-color: var(--accent); }
.uuid-copy svg { width: 16px; height: 16px; }

/* numeric input shared by count fields */
.num-input {
  font-family: 'JetBrains Mono', monospace; font-size: 1rem;
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.num-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--ring),.14); }

@media (max-width: 560px) {
  .pw-output .pw-text { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
