/* record-generator.css — record generator pages (/spf-generator/, /dmarc-generator/,
   /bimi-generator/). 2026-11-21. Loaded after record-types.css and record-lookup.css
   (text styling from .record-content; notes, pills, FAQ and "next" links from the rl- classes).
   Theme: the site toggles body.light-mode (never [data-theme]).
   search.min.css styles every bare <button>, <label> and form control, so everything here is
   scoped under .gen-form / .gen-out and resets what it needs. */

.gen-form {
  margin: 20px 0 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  text-align: left;
}
/* search.min.css: label{display:block;text-transform:uppercase;letter-spacing:.8px;opacity:.9;margin-bottom:14px} */
.gen-form label { text-transform: none; letter-spacing: normal; opacity: 1; }
.gen-form fieldset.gen-set { margin: 18px 0 0; padding: 14px 16px 6px; min-width: 0; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; }
.gen-form legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: #e5e7eb; }
.gen-form small { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 500; color: #7dd3fc; }
.gen-form .gen-field { margin: 0 0 14px; min-width: 0; }
.gen-form .gen-field > label, .gen-form .gen-label {
  display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; line-height: 1.4; color: #cbd5e1;
}
.gen-form .gen-opt { margin-left: 4px; font-size: 12px; font-weight: 400; color: #94a3b8; }
.gen-form input[type="text"], .gen-form input[type="url"], .gen-form input[type="number"], .gen-form select, .gen-form textarea {
  display: block; width: 100%; max-width: 100%; margin: 0; padding: 10px 12px; box-sizing: border-box;
  font-size: 16px; line-height: 1.4; color: #fff; background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; outline: none; box-shadow: none;
}
.gen-form input[type="text"], .gen-form input[type="url"], .gen-form input[type="number"], .gen-form select { height: 44px; }
.gen-form textarea { min-height: 44px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.gen-form input[type="number"] { max-width: 160px; }
.gen-form input:focus, .gen-form select:focus, .gen-form textarea:focus { border-color: #26c4ff; box-shadow: 0 0 0 3px rgba(38, 196, 255, 0.2); }
.gen-form input:disabled, .gen-form textarea:disabled { opacity: 0.5; cursor: not-allowed; }
.record-content .gen-form .gen-help, .record-content .gen-out .gen-help { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #94a3b8; }

.gen-form label.gen-check {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; font-size: 14px; font-weight: 400; line-height: 1.45; color: #e5e7eb; cursor: pointer;
}
.gen-form label.gen-check input { flex: 0 0 auto; width: 16px; height: 16px; margin: 3px 0 0; padding: 0; accent-color: #26c4ff; }
.gen-form label.gen-check span { min-width: 0; }
.gen-form label.gen-check-solo { margin: 4px 0 0; }
.gen-form .gen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0 0 6px; }
.gen-form .gen-grid small { display: block; overflow-wrap: anywhere; }
.gen-form .gen-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: end; }
.gen-form .gen-off { opacity: 0.45; }
.gen-form details.gen-adv { margin: 18px 0 0; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; }
.gen-form details.gen-adv > summary { padding: 12px 0; font-size: 13px; font-weight: 700; color: #e5e7eb; cursor: pointer; }
.gen-form details.gen-adv[open] > summary { margin-bottom: 6px; }

/* ---------------- output ---------------- */
.gen-out { margin: 16px 0 8px; padding: 20px; background: rgba(38, 196, 255, 0.06); border: 1px solid rgba(38, 196, 255, 0.3); border-radius: 12px; }
.record-content .gen-out h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 18px; }
.record-content .gen-record { margin: 0; }
.gen-record > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.gen-record > div:first-child { border-top: 0; padding-top: 0; }
.gen-record dt { margin: 0; padding-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #94a3b8; }
.gen-record dd { margin: 0; min-width: 0; font-size: 14px; line-height: 1.5; color: #cbd5e1; }
.record-content .gen-record code, .record-content .gen-split code {
  padding: 2px 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; color: #fff;
  background: #0b1220; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 6px;
}
.record-content .gen-record code.gen-value { display: block; padding: 12px 14px; line-height: 1.55; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; user-select: all; }
.gen-out .gen-dim { font-size: 12px; color: #94a3b8; }
.record-content .gen-out .gen-split { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #94a3b8; }
.record-content .gen-split code { font-size: 12px; overflow-wrap: anywhere; word-break: break-word; }

.gen-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.gen-out button.gen-btn {
  position: static; overflow: visible; width: auto; height: 40px; margin: 0; padding: 0 18px; box-sizing: border-box;
  font-size: 14px; font-weight: 700; letter-spacing: 0; color: #fff;
  background: linear-gradient(90deg, #26c4ff 0%, #0054ff 100%); border: 0; border-radius: 8px; box-shadow: none; transform: none; cursor: pointer;
}
.gen-out button.gen-btn::before { content: none; }
.gen-out button.gen-btn:hover { background: linear-gradient(90deg, #0048d4 0%, #007aff 100%); box-shadow: none; transform: none; }
.gen-out button.gen-btn.gen-btn-ghost { color: #cbd5e1; background: transparent !important; border: 1px solid rgba(255, 255, 255, 0.25); }
.gen-out button.gen-btn.gen-btn-ghost:hover { color: #26c4ff; border-color: #26c4ff; }
.gen-copied { font-size: 13px; color: #34d399; }

.gen-meter { margin: 18px 0 0; padding: 14px 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; }
.gen-meter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; color: #f1f5f9; }
.gen-meter-bar { height: 8px; margin: 10px 0 0; overflow: hidden; background: rgba(148, 163, 184, 0.25); border-radius: 999px; }
.gen-meter-bar span { display: block; height: 100%; border-radius: 999px; background: #10b981; transition: width 0.2s ease; }
.gen-meter-bar span.warn { background: #f59e0b; }
.gen-meter-bar span.bad { background: #ef4444; }
.record-content .gen-meter-list { margin: 10px 0 0; padding: 0; list-style: none; }
.record-content .gen-meter-list li { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 5px 0; font-size: 13px; color: #cbd5e1; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.record-content .gen-meter-list li code { padding: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: #e5e7eb; background: none; border: 0; overflow-wrap: anywhere; }
.gen-meter-list li span { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.gen-out .rl-notes:empty, .gen-out .rl-next:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .gen-meter-bar span { transition: none; } }

/* tag reference tables in the page copy */
.record-content .gen-table-wrap { overflow-x: auto; }
.record-content .gen-table-wrap table { min-width: 520px; }

@media (max-width: 600px) {
  .gen-form, .gen-out { padding: 16px; }
  .gen-form .gen-grid, .gen-form .gen-cols { grid-template-columns: minmax(0, 1fr); }
  .gen-record > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .gen-form input[type="number"] { max-width: 100%; }
}

/* ---------------- light mode ---------------- */
body.light-mode .gen-form { background: #f8fafc; border-color: #d7dee8; }
body.light-mode .gen-form fieldset.gen-set, body.light-mode .gen-form details.gen-adv { border-color: #d7dee8; }
body.light-mode .gen-form legend, body.light-mode .gen-form details.gen-adv > summary { color: #0f172a; }
body.light-mode .gen-form small { color: #0369a1; }
body.light-mode .gen-form .gen-field > label, body.light-mode .gen-form .gen-label { color: #334155; }
body.light-mode .gen-form .gen-opt { color: #64748b; }
body.light-mode .gen-form input[type="text"], body.light-mode .gen-form input[type="url"], body.light-mode .gen-form input[type="number"],
body.light-mode .gen-form select, body.light-mode .gen-form textarea { color: #0f172a; background: #fff; border-color: #cbd5e1; }
body.light-mode .record-content .gen-form .gen-help, body.light-mode .record-content .gen-out .gen-help { color: #64748b; }
body.light-mode .gen-form label.gen-check { color: #1e293b; }
body.light-mode .gen-out { background: #eff9ff; border-color: #bae6fd; }
body.light-mode .gen-record > div { border-top-color: #cfe8f7; }
body.light-mode .gen-record dt, body.light-mode .gen-out .gen-dim, body.light-mode .record-content .gen-out .gen-split { color: #64748b; }
body.light-mode .gen-record dd { color: #334155; }
body.light-mode .record-content .gen-record code, body.light-mode .record-content .gen-split code { color: #0f172a; background: #fff; border-color: #cbd5e1; }
body.light-mode .gen-out button.gen-btn { color: #fff !important; background: linear-gradient(90deg, #0054ff 0%, #0048d4 100%) !important; }
body.light-mode .gen-out button.gen-btn.gen-btn-ghost { color: #334155 !important; background: transparent !important; border-color: #cbd5e1; }
body.light-mode .gen-out button.gen-btn.gen-btn-ghost:hover { color: #0054ff !important; border-color: #0054ff; }
body.light-mode .gen-copied { color: #047857; }
body.light-mode .gen-meter { background: #fff; border-color: #d7dee8; }
body.light-mode .gen-meter-head { color: #0f172a; }
body.light-mode .gen-meter-bar { background: #e2e8f0; }
body.light-mode .record-content .gen-meter-list li { color: #334155; border-top-color: #e5e9f0; }
body.light-mode .record-content .gen-meter-list li code { color: #0f172a; }
