/* Email signature generator (/tools/email-signature-generator). Builds on .tool in /docs.css. */
.sig form { display: grid; gap: 18px; }
.sig .t-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.sig .t-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.sig .sig-wide { grid-column: span 2; }
.sig .hint { line-height: 1.45; }
.sig fieldset { border: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.sig legend { width: 100%; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sig .sig-choices { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px 24px; align-items: start; }

/* layouts: three small drawn cards */
.sig .sig-layouts { flex-wrap: nowrap; }
.sig-layout { position: relative; flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 7px; padding: 10px 6px 9px; border-radius: 12px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 13px; color: var(--ink-2); text-align: center; }
.sig-layout input { position: absolute; opacity: 0; pointer-events: none; }
.sig-layout:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); font-weight: 600; }
.sig-layout:has(input:focus-visible) { outline: 2px solid var(--cr-blue); outline-offset: 2px; }
.sig-thumb { display: grid; gap: 3px; width: 64px; height: 38px; align-content: center; }
.sig-thumb i { display: block; height: 4px; border-radius: 2px; background: var(--ink-4); }
.sig-thumb i.nm { width: 30px; background: var(--ink-2); }
.sig-thumb i.ln { width: 40px; }
.sig-thumb i.sh { width: 22px; }
.sig-thumb .pic { width: 14px; height: 14px; border-radius: 50%; background: var(--ink-3); }
.sig-thumb.side { grid-template-columns: 14px 2px 1fr; grid-template-rows: repeat(3, 4px); column-gap: 6px; }
.sig-thumb.side .pic { grid-row: 1 / 4; align-self: start; }
.sig-thumb.side .rule { grid-row: 1 / 4; width: 2px; height: 100%; background: var(--cr-blue); border-radius: 1px; }
.sig-thumb.side i.nm, .sig-thumb.side i.ln, .sig-thumb.side i.sh { grid-column: 3; }
.sig-thumb.above { justify-items: start; padding-left: 12px; }
.sig-thumb.above .pic { width: 12px; height: 12px; margin-bottom: 2px; }
.sig-thumb.words { justify-items: start; padding-left: 12px; }

/* accent swatches */
.swatch { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--cr-blue); outline-offset: 4px; }
.swatch span, .sig .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sig input[type="color"] { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: conic-gradient(#e5463a, #e09a00, #0fa47f, #3f7fe0, #6b4cf0, #e5463a); cursor: pointer; -webkit-appearance: none; appearance: none; }
.sig input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
.sig input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sig input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.sig-accents:not(:has(input[name="accent"]:checked)) input[type="color"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.sig .sig-fontrow { display: grid; gap: 6px; }

/* preview: the signature on white paper, as it arrives */
.sig-stage { display: grid; gap: 8px; }
.sig-label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sig-paper { position: relative; min-height: 96px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(14,20,48,.09), 0 10px 24px -16px rgba(14,20,48,.35); overflow: hidden; }
.sig-paper iframe { display: block; width: 100%; height: 96px; border: 0; background: #fff; color-scheme: light; }
.sig-empty { display: grid; place-items: center; min-height: 96px; padding: 20px; font-size: 14.5px; color: #69707d; text-align: center; }
.sig-empty[hidden], .sig-paper iframe[hidden] { display: none; }
.prose ul.sig-notes { margin: 0; padding-left: 1.15em; list-style: disc; }
.prose ul.sig-notes li { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.prose ul.sig-notes li::marker { color: var(--cr-amber); }

.sig-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sig-actions .sig-spacer { flex: 1 1 0; }
.sig-actions .b { height: 38px; }
.sig-actions .b:disabled { opacity: .45; cursor: default; transform: none; }
.sig-status { margin-top: -8px; min-height: 1.4em; font-size: 14px; color: var(--cr-green); }
.sig-src { background: none; border-radius: 0; }
.sig-src summary { display: inline-flex; gap: 8px; padding: 2px 0; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sig-src summary::after { content: "+"; font-weight: 400; color: var(--ink-4); }
.sig-src[open] summary::after { content: "–"; }
.sig-src textarea { margin-top: 8px; min-height: 150px; }

@media (max-width: 640px) {
  .sig .sig-choices { grid-template-columns: minmax(0, 1fr); }
  .sig .sig-wide { grid-column: 1 / -1; }
  .sig-actions .sig-spacer { display: none; }
}
@media (prefers-color-scheme: dark) {
  .swatch::before { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
  .sig-paper { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 14px 30px -18px rgba(0,0,0,.8); }
}

/* style.css's landing .note (a taped paper card, 330 px) leaks into .prose .note; keep the blog's plain note here. */
.dk-prose .note { width: auto; box-shadow: none; }
.dk-prose .note::before { content: none; }
