/* Learn CRM — formularios públicos (/f/:slug). El color de la unidad llega en /f/:slug/theme.css */
:root {
  --accent: #3550dc;
  --bg: #eef1f0; --surface: #ffffff; --line: #d6dcd9; --line-2: #b9c2bd; --text: #18202f; --muted: #5a6373; --bad: #c8333b;
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --accent-soft: color-mix(in oklab, var(--accent) 10%, var(--surface));
  --accent-strong: color-mix(in oklab, var(--accent) 80%, var(--text));
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f141d; --surface: #161d29; --line: #283247; --line-2: #3a4763; --text: #e7ebf2; --muted: #a3acbd; --bad: #ff7a83;
    --accent-soft: color-mix(in oklab, var(--accent) 20%, var(--surface)); --accent-strong: color-mix(in oklab, var(--accent) 65%, white); }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
body.embed { background: transparent; }
a { color: var(--accent-strong); }
h1, h2, p { margin: 0; }
.fp { max-width: 680px; margin: 0 auto; padding: 28px 16px 40px; }
.embed .fp { padding: 8px 4px 16px; }
.fp-brand { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--muted); margin-bottom: 14px; text-transform: uppercase; }
.fp-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.fp-head { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: 14px; padding: 24px 22px 18px; }
.fp-head h1 { font-size: clamp(22px, 5vw, 28px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.fp-head p { color: var(--muted); margin-top: 8px; }
.fp-head .fp-legend { font-size: 13px; margin-top: 14px; }
.fp-req { color: var(--bad); margin-left: 3px; }
.fp-form { display: grid; gap: 12px; margin-top: 12px; }
.fp-q, .fp-section, .fp-consent { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 0; min-width: 0; }
.fp-q > label, .fp-q legend { display: block; font-weight: 600; margin-bottom: 8px; padding: 0; }
fieldset.fp-q legend { float: left; width: 100%; }
fieldset.fp-q legend + * { clear: both; }
fieldset.fp-q .fp-choices { clear: both; }
.fp-section { background: var(--accent-soft); border-color: transparent; }
.fp-section h2 { font-size: 18px; font-weight: 700; }
.fp-section p { color: var(--muted); margin-top: 4px; }
.fp-help { display: block; color: var(--muted); font-size: 14px; margin: -4px 0 10px; }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent); }
.fp-choices { display: grid; gap: 6px; }
.fp-choice { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-weight: 400 !important; margin: 0 !important; }
.fp-choice:hover { background: var(--accent-soft); }
.fp-choice input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.fp-consent { display: grid; gap: 4px; font-size: 14.5px; }
.has-err { border-color: var(--bad); }
.has-err input, .has-err select, .has-err textarea { border-color: var(--bad); }
.fp-err { display: block; color: var(--bad); font-size: 14px; font-weight: 600; margin-top: 8px; }
.fp-alert { margin-top: 12px; background: color-mix(in oklab, var(--bad) 12%, var(--surface)); border: 1px solid var(--bad); color: var(--text); border-radius: 12px; padding: 12px 16px; font-weight: 600; }
.fp-preview { margin-bottom: 12px; background: #fff6df; color: #5a4100; border: 1px solid #e7c470; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.fp-btn { justify-self: start; min-height: 48px; padding: 0 28px; border: 0; border-radius: 11px; background: var(--accent); color: #fff; font: 700 16px var(--font); cursor: pointer; }
.fp-btn:hover { background: color-mix(in oklab, var(--accent) 86%, black); }
.fp-btn:focus-visible { outline: 3px solid color-mix(in oklab, var(--accent) 40%, transparent); outline-offset: 2px; }
.fp-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fp-done { text-align: center; padding: 36px 22px; }
.fp-check { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-size: 28px; font-weight: 800; }
.fp-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 22px; }
@media (max-width: 520px) { .fp-q, .fp-section, .fp-consent { padding: 16px 14px; } .fp-head { padding: 20px 16px 16px; } .fp-btn { width: 100%; } }

.fp-text h2 { font-size: 16px; font-weight: 700; margin: 16px 0 4px; }
.fp-text h2:first-child { margin-top: 0; }
.fp-text p { color: var(--text); font-size: 15px; }
.fp-back { margin-top: 14px; font-size: 14.5px; }
