.ofm { --ofm-color: #185a79; --ofm-line: #d9e1e6; --ofm-input-bg: #fff; --ofm-input-color: #202d36; --ofm-input-border: #aebac3; --ofm-radius: 4px; --ofm-help-color: #53616a; --ofm-focus: #2688b5; --ofm-button-text: #fff; max-width: 920px; margin: 1.5em auto; color: inherit; font-size: 1rem; line-height: 1.8; }
.ofm *, .ofm *::before, .ofm *::after { box-sizing: border-box; }
.ofm [hidden] { display: none !important; }
.ofm .item { padding: 1.4em 0; border-bottom: 1px solid var(--ofm-line); }
.ofm fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ofm .name { display: block; margin: 0 0 .65em; padding: 0; font-size: 1em; font-weight: 700; }
.ofm .required { display: inline-block; margin-left: .8em; padding: .05em .45em; border-radius: 3px; color: var(--ofm-required-text, #fff) !important; background: var(--ofm-required-color, #a52a32); font-size: .75em; font-weight: 500; vertical-align: middle; }
.ofm input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .ofm select, .ofm textarea { width: 100%; max-width: 100%; min-height: 46px; padding: .65em .8em; border: 1px solid var(--ofm-input-border); border-radius: var(--ofm-radius); background: var(--ofm-input-bg); color: var(--ofm-input-color); font: inherit; line-height: 1.5; }
.ofm input::placeholder, .ofm textarea::placeholder { color: var(--ofm-help-color); opacity: .85; }
.ofm h3 { color: inherit; }
.ofm textarea { resize: vertical; }
.ofm input[type=checkbox], .ofm input[type=radio] { width: 1.15em; height: 1.15em; margin: .2em .35em .2em 0; accent-color: var(--ofm-color); vertical-align: middle; }
.ofm :is(input,select,textarea,button,a):focus-visible { outline: 3px solid var(--ofm-focus); outline-offset: 3px; }
.ofm .ofm-choices { display: flex; flex-wrap: wrap; gap: .6em 1.5em; }
.ofm .ofm-choices label { cursor: pointer; }
.ofm .ofm-inline { display: flex; align-items: center; flex-wrap: wrap; gap: .5em; }
.ofm .ofm-inline label { display: flex; align-items: center; gap: .35em; }
.ofm .ofm-inline input { width: 5em !important; }
.ofm .ofm-inline label:first-child input { width: 6em !important; }
.ofm .ofm-birthday { display: grid; grid-template-columns: 1.25fr 1fr 1fr; max-width: 430px; }
.ofm .ofm-inline.ofm-birthday label input, .ofm .ofm-inline.ofm-birthday label:first-child input { width: 100% !important; min-width: 0; }
.ofm .ofm-zip { margin-bottom: .8em; }
.ofm .ofm-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 1em; margin: 2em 0 1em; }
.ofm button, .ofm a.ofm-button { display: inline-block; min-height: 46px; padding: .7em 1.7em; border: 1px solid var(--ofm-color); border-radius: var(--ofm-radius); background: var(--ofm-input-bg); color: var(--ofm-color); font: inherit; text-align: center; text-decoration: none; cursor: pointer; }
.ofm a.ofm-button { background: var(--ofm-color); color: var(--ofm-button-text); }
.ofm button.ofm-primary { background: var(--ofm-primary-bg, var(--ofm-color)); border-color: var(--ofm-primary-bg, var(--ofm-color)); color: var(--ofm-primary-text, var(--ofm-button-text)); }
.ofm button:hover, .ofm a.ofm-button:hover { filter: brightness(.93); }
.ofm button:disabled { opacity: .6; cursor: wait; }
.ofm .ofm-help, .ofm .ofm-privacy { margin: .5em 0 0; font-size: .88em; color: var(--ofm-help-color); }
.ofm .ofm-errors, .ofm .ofm-message { padding: 1em 1.3em; border: 1px solid #cf9696; background: #fff4f4; color: #8c1e24; }
.ofm .ofm-errors p { margin: 0; font-weight: 700; }
.ofm .ofm-errors ul { margin-bottom: 0; }
.ofm .ofm-field-error, .ofm .ofm-js-error { color: #a32028; }
.ofm .ofm-confirm { margin: 1.5em 0; }
.ofm .ofm-confirm .item { display: grid; grid-template-columns: minmax(120px, 28%) minmax(0, 1fr); gap: 1.2em; }
.ofm .ofm-confirm dt { font-weight: 700; }
.ofm .ofm-confirm dd { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.ofm .ofm-sr-only, .ofm .ofm-honeypot { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Minimal: quiet typography, open spacing and underlined controls. */
.ofm.ofm-template-minimal { --ofm-color: #262b30; --ofm-line: #e4e6e8; --ofm-input-border: #9ba2a8; --ofm-radius: 0; --ofm-focus: #3f657d; padding: clamp(16px, 3vw, 32px); color: #262b30; background: #fff; }
.ofm-template-minimal .item { padding: 1.65em 0; border-bottom: 0; }
.ofm-template-minimal .name { font-weight: 500; letter-spacing: .035em; }
.ofm-template-minimal input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .ofm-template-minimal select, .ofm-template-minimal textarea { border: 0; border-bottom: 1px solid var(--ofm-input-border); padding-right: .25em; padding-left: .25em; }
.ofm-template-minimal .ofm-actions { justify-content: flex-end; }
.ofm-template-minimal .ofm-confirm .item { border-bottom: 1px solid var(--ofm-line); }

/* Business: aligned labels, table rules and restrained navy. */
.ofm.ofm-template-business { --ofm-color: #243c59; --ofm-line: #cfd8e2; --ofm-input-border: #a5b4c3; --ofm-radius: 3px; --ofm-focus: #3f6e9e; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--ofm-line); border-top: 4px solid var(--ofm-color); color: #26384a; background: #fff; }
.ofm-template-business .mailform-layout, .ofm-template-business .ofm-confirm { overflow: hidden; border: 1px solid var(--ofm-line); border-radius: 3px; }
.ofm-template-business .ofm-field { display: grid; grid-template-columns: minmax(0, 29%) minmax(0, 1fr); padding: 0; gap: 0; background: linear-gradient(to right, #eef2f6 29%, #fff 29%); }
.ofm-template-business .ofm-field:last-child { border-bottom: 0; }
.ofm-template-business .ofm-field > .name { margin: 0; padding: 1.15em; overflow-wrap: anywhere; }
.ofm-template-business .ofm-field > .answer { min-width: 0; padding: 1.15em; border-left: 1px solid var(--ofm-line); }
.ofm-template-business .ofm-field-group { display: block; }
.ofm-template-business .ofm-field-group fieldset::after { display: block; clear: both; content: ''; }
.ofm-template-business .ofm-field-group legend { float: left; width: 29%; margin: 0; padding: 1.15em; overflow-wrap: anywhere; }
.ofm-template-business .ofm-field-group .answer { min-width: 0; margin-left: 29%; padding: 1.15em; border-left: 1px solid var(--ofm-line); }
.ofm-template-business .ofm-confirm .item { grid-template-columns: minmax(0, 29%) minmax(0, 1fr); gap: 0; padding: 0; }
.ofm-template-business .ofm-confirm dt { padding: 1.15em; background: #eef2f6; overflow-wrap: anywhere; }
.ofm-template-business .ofm-confirm dd { padding: 1.15em; border-left: 1px solid var(--ofm-line); }

/* Soft: a botanical palette and rounded controls. */
.ofm.ofm-template-soft { --ofm-color: #34634d; --ofm-line: #ccdbcd; --ofm-input-border: #a4b9aa; --ofm-radius: 12px; --ofm-help-color: #526b59; --ofm-focus: #4b7a59; padding: clamp(18px, 4vw, 36px); border: 1px solid #dce6db; border-radius: 22px; color: #2d4436; background: #f3f7f2; }
.ofm-template-soft .item { border-bottom-style: dashed; }
.ofm-template-soft .name { font-weight: 600; }
.ofm-template-soft .ofm-choices label { padding: .4em .85em; border-radius: 8px; background: #e3ede1; }
.ofm-template-soft button, .ofm-template-soft a.ofm-button { border-radius: 999px; padding-right: 2em; padding-left: 2em; }

/* Card: independent white surfaces on a cool canvas. */
.ofm.ofm-template-card { --ofm-color: #375bd2; --ofm-line: #dbe1eb; --ofm-input-bg: #f9fafc; --ofm-input-border: #b6c1d3; --ofm-radius: 6px; --ofm-focus: #5276e8; padding: clamp(14px, 3vw, 28px); border-radius: 14px; color: #273450; background: #f1f3f7; }
.ofm-template-card .item { margin: 0 0 14px; padding: 1.25em; border: 1px solid #dde3ed; border-radius: 10px; background: #fff; box-shadow: 0 2px 4px rgb(28 43 70 / 4%); }
.ofm-template-card .ofm-actions { margin-top: 1.5em; }
.ofm-template-card .ofm-actions .ofm-primary { width: 100%; }

/* Dark: controlled contrast for dark websites. */
.ofm.ofm-template-dark { --ofm-color: #88d9d0; --ofm-line: #405365; --ofm-input-bg: #203341; --ofm-input-color: #f2f6fa; --ofm-input-border: #647d90; --ofm-radius: 6px; --ofm-help-color: #bdcbd6; --ofm-focus: #a4e5ff; --ofm-button-text: #142a2e; padding: clamp(18px, 4vw, 36px); border: 1px solid #405365; border-radius: 14px; color: #f2f6fa; background: #14232f; color-scheme: dark; }
.ofm-template-dark .ofm-privacy a { color: #a4e5ff; }
.ofm-template-dark .ofm-field-error, .ofm-template-dark .ofm-js-error { color: #ffb4b9; }
.ofm-template-dark .ofm-errors, .ofm-template-dark .ofm-message { color: #ffd6d9; background: #412a33; border-color: #ae6f7c; }

@media (max-width: 600px) { .ofm .ofm-confirm .item { grid-template-columns: 1fr; gap: .4em; } .ofm .ofm-actions button { width: 100%; } .ofm .ofm-inline { gap: .4em; } }
@media (max-width: 640px) {
  .ofm-template-business .ofm-field { display: block; background: #fff; }
  .ofm-template-business .ofm-field > .name, .ofm-template-business .ofm-field-group legend { float: none; width: 100%; padding: .8em 1em; background: #eef2f6; }
  .ofm-template-business .ofm-field > .answer, .ofm-template-business .ofm-field-group .answer { margin-left: 0; padding: 1em; border-left: 0; }
  .ofm-template-business .ofm-confirm .item { grid-template-columns: 1fr; gap: 0; }
  .ofm-template-business .ofm-confirm dd { border-left: 0; }
}
