/* Public form. Theme values arrive as --f-* variables set inline by the page. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--f-bg); color: #18181b; font: 16px/1.5 var(--f-font); }
body.is-embed { background: transparent; }
[hidden] { display: none !important; }

.pf { min-height: 100vh; padding: 40px 16px 24px; display: flex; flex-direction: column; align-items: center; }
.is-embed .pf { min-height: 0; padding: 8px 8px 12px; }
.pf-card {
  width: 100%; max-width: 640px; background: #fff;
  border-radius: calc(var(--f-radius) + 4px); padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
}
@media (max-width: 520px) {
  .pf { padding: 16px 12px; }
  .pf-card { padding: 22px 18px; }
}
.pf-logo { display: block; max-height: 48px; max-width: 200px; margin-bottom: 16px; }
.pf-title { font-size: 26px; line-height: 1.25; margin: 0 0 20px; }
.pf-step-title { font-size: 18px; margin: 0 0 16px; }

.pf-progress { height: 6px; background: #f1f1f3; border-radius: 99px; overflow: hidden; }
.pf-progress-bar { height: 100%; background: var(--f-primary); border-radius: 99px; transition: width .35s cubic-bezier(.2,0,0,1); }
.pf-step-count { font-size: 13px; color: #71717a; margin: 8px 0 20px; }

.pf-step { animation: pf-in .3s ease-out; }
@keyframes pf-in { from { opacity: 0; transform: translateY(6px); } }

.pf-field { margin-bottom: 22px; }
.pf-text { margin-bottom: 22px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.6; }
.pf-label { display: block; font-weight: 600; margin-bottom: 6px; }
.pf-req { color: var(--f-primary); margin-left: 2px; }
.pf-help { font-size: 14px; color: #71717a; margin: -2px 0 8px; white-space: pre-line; }

.pf-input {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid #d4d4d8; border-radius: var(--f-radius); padding: 10px 12px; min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.pf-input { resize: vertical; }
select.pf-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #71717a 50%), linear-gradient(135deg, #71717a 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.pf-input:focus { outline: none; border-color: var(--f-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--f-primary) 20%, transparent); }

.pf-options { display: flex; flex-direction: column; gap: 8px; }
.pf-option {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid #e4e4e7; border-radius: var(--f-radius); padding: 10px 12px; min-height: 44px;
  transition: border-color .15s, background .15s;
}
.pf-option:hover { border-color: color-mix(in srgb, var(--f-primary) 50%, #e4e4e7); }
.pf-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--f-primary); flex: none; }
.pf-option:has(input:checked) { border-color: var(--f-primary); background: color-mix(in srgb, var(--f-primary) 6%, #fff); }
.pf-option:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--f-primary) 20%, transparent); }
/* Quick choice: the options as a wrapping row of pills. The radio stays in place for keyboards and screen readers. */
.pf-chips { flex-direction: row; flex-wrap: wrap; }
.pf-chips .pf-option { position: relative; border-radius: 999px; padding: 8px 20px; border-width: 1.5px; font-weight: 500; }
.pf-chips .pf-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-chips .pf-option:has(input:checked) { color: color-mix(in srgb, var(--f-primary) 85%, #000); font-weight: 600; }

.pf-rating { display: flex; flex-wrap: wrap; gap: 2px; }
.pf-star { cursor: pointer; font-size: 32px; line-height: 1; color: #d4d4d8; padding: 2px; transition: color .1s, transform .1s; }
.pf-star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-star.on { color: var(--f-primary); }
/* 8–10 stars: shrink to fit one row on a phone instead of wrapping. */
.pf-rating-long { container-type: inline-size; flex-wrap: nowrap; gap: 0; }
.pf-rating-long .pf-star { font-size: min(32px, 8.4cqi); padding: 1px; }
.pf-star:hover { transform: scale(1.12); }
.pf-star:has(input:focus-visible) { outline: 2px solid var(--f-primary); border-radius: 4px; }

.pf-file {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer;
  border: 1.5px dashed #d4d4d8; border-radius: var(--f-radius); padding: 20px 16px;
  transition: border-color .15s, background .15s;
}
.pf-file:hover, .pf-file.dragover { border-color: var(--f-primary); background: color-mix(in srgb, var(--f-primary) 4%, #fff); }
.pf-file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-file:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--f-primary) 20%, transparent); }
.pf-file-cta { font-weight: 600; color: var(--f-primary); }
.pf-file-hint { font-size: 13px; color: #71717a; }
.pf-file-names { font-size: 14px; word-break: break-all; }

.pf-error { color: #dc2626; font-size: 14px; margin-top: 6px; min-height: 0; }
.pf-error:empty { display: none; }
.pf-field.invalid .pf-input, .pf-field.invalid .pf-option, .pf-field.invalid .pf-file { border-color: #dc2626; }
.pf-form-error { margin-top: 16px; padding: 10px 12px; border-radius: var(--f-radius); background: #fef2f2; color: #dc2626; font-size: 14px; }

.pf-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.pf-btn {
  font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; padding: 10px 24px;
  border-radius: var(--f-radius); border: 2px solid var(--f-primary); transition: filter .15s, transform .05s;
}
.pf-btn:active { transform: translateY(1px); }
.pf-btn:disabled { opacity: .6; cursor: progress; }
.pf-btn-main.filled { background: var(--f-primary); color: var(--f-on-primary); }
.pf-btn-main.outline { background: transparent; color: var(--f-primary); }
.pf-btn-main:hover:not(:disabled) { filter: brightness(.95); }
.pf-btn-back { background: transparent; color: #52525b; border-color: transparent; }
.pf-btn-back:hover { background: #f4f4f5; }
@media (max-width: 520px) { .pf-btn-main { flex: 1; } }

.pf-message { text-align: center; padding: 48px 32px; }
.pf-message p { white-space: pre-line; margin: 0; font-size: 17px; }
.pf-check {
  width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--f-primary); color: var(--f-on-primary); font-size: 26px; animation: pf-pop .4s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pf-pop { from { transform: scale(.4); opacity: 0; } }
.pf-done { animation: pf-in .35s ease-out; }

.pf-badge { margin-top: 16px; font-size: 12px; color: #71717a; text-decoration: none; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.7); }
.pf-badge:hover { color: #18181b; }

.pf-preview-bar { position: sticky; top: 0; z-index: 5; background: #18181b; color: #fff; text-align: center; font: 13px/1.4 system-ui, sans-serif; padding: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.pf-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-top: 8px; }
.pf-footer { width: 100%; max-width: 640px; margin-top: 16px; padding: 0 8px; text-align: center; font-size: 13px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
