/*
 * Public forms: the conversation form and the download form.
 * One look in two themes. Colors come from src/styles/tokens.css where the
 * page loads it; the fallbacks match those tokens for server-rendered pages.
 */
.pf {
  --pf-ink: var(--color-dark, #0a1015);
  --pf-paper: var(--color-white, #fff);
  --pf-gold: var(--color-accent-gold, #c79f32);
  --pf-gold-hover: var(--color-accent-gold-hover, #d9b145);
  --pf-gold-text: var(--color-accent-gold-on-light, #8a6e1e);
  --pf-error: var(--color-error-on-light, #b42318);
  --pf-font: var(--font-body, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  --pf-heading-font: var(--font-heading, 'LT Remark', Georgia, serif);

  /* Light theme (default) */
  --pf-bg: var(--pf-paper);
  --pf-text: var(--pf-ink);
  --pf-muted: #555b61;
  --pf-field: #fff;
  --pf-line: var(--color-border-control-light, #7e8285);
  --pf-line-soft: var(--color-border-light, #ddd);
  --pf-kicker: var(--pf-gold-text);
  --pf-focus: var(--pf-gold-text);
  --pf-error-text: var(--pf-error);
  --pf-success: #1f7a4d;

  container-type: inline-size;
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: clamp(20px, 4vw, 32px);
  color: var(--pf-text);
  background: var(--pf-bg);
  border: 1px solid var(--pf-line-soft);
  border-radius: var(--radius-lg, 12px);
  font: 400 16px/1.5 var(--pf-font);
  text-align: left;
}

.pf[data-theme='dark'] {
  --pf-bg: rgb(10 16 21 / 72%);
  --pf-text: #f2f3f4;
  --pf-muted: #b5babf;
  --pf-field: rgb(255 255 255 / 6%);
  --pf-line: var(--color-border-control-dark, rgb(255 255 255 / 34%));
  --pf-line-soft: rgb(255 255 255 / 12%);
  --pf-kicker: var(--pf-gold);
  --pf-focus: var(--pf-gold);
  --pf-error-text: #ff9b8f;
  --pf-success: #7fd1a6;
  border-top: 2px solid var(--pf-gold);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pf .pf__head, .pf .pf__form, .pf .pf__fieldset, .pf .pf__success { display: grid; gap: 16px; min-width: 0; }
.pf .pf__head { gap: 8px; }
.pf .pf__fieldset { margin: 0; padding: 0; border: 0; }
.pf .pf__fieldset:disabled { opacity: .6; }
.pf .pf__kicker { margin: 0; color: var(--pf-kicker); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pf .pf__heading { margin: 0; font: 400 clamp(24px, 3vw, 32px)/1.2 var(--pf-heading-font); text-wrap: balance; }
.pf .pf__asset { margin: 0; font-weight: 600; }
.pf .pf__intro { margin: 0; color: var(--pf-muted); }

.pf .pf__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pf .pf__row > .pf__field:only-child,
.pf .pf__row > .pf__field:has(+ [hidden]) { grid-column: 1 / -1; }
.pf .pf__field { display: grid; gap: 6px; min-width: 0; }
.pf .pf__field[hidden] { display: none; }
.pf .pf__label { font-size: 14px; font-weight: 600; }

.pf .pf__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  color: var(--pf-text);
  background: var(--pf-field);
  border: 1px solid var(--pf-line);
  border-radius: var(--radius-sm, 6px);
  font: 400 16px/1.5 var(--pf-font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pf .pf__input::placeholder { color: var(--pf-muted); opacity: .8; }
.pf .pf__input:hover { border-color: var(--pf-text); }
.pf .pf__input:focus-visible { outline: none; border-color: var(--pf-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pf-focus) 35%, transparent); }
.pf .pf__input[aria-invalid='true'] { border-color: var(--pf-error-text); }
.pf .pf__textarea { min-height: 120px; resize: vertical; }
.pf .pf__select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.pf[data-theme='dark'] .pf__select option { color: var(--pf-ink); background: var(--pf-paper); }
.pf .pf__error { min-height: 0; margin: 0; color: var(--pf-error-text); font-size: 13px; line-height: 1.4; }
.pf .pf__error:empty { display: none; }

.pf .pf__check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; color: var(--pf-muted); font-size: 14px; line-height: 1.5; cursor: pointer; }
.pf .pf__check input { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--pf-gold); cursor: pointer; }
.pf .pf__check input:focus-visible { outline: 3px solid var(--pf-focus); outline-offset: 2px; }

.pf .pf__turnstile:empty { display: none; }

.pf .pf__submit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  color: var(--pf-button-text, var(--pf-ink));
  background: var(--pf-button-bg, var(--gradient-gold-metallic, var(--pf-gold)));
  border: 0;
  border-radius: var(--radius-sm, 6px);
  font: 600 16px/1.3 var(--pf-font);
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.pf .pf__submit:hover { filter: brightness(1.06); }
.pf .pf__submit:active { transform: translateY(1px); }
.pf .pf__submit:disabled, .pf .pf__submit[aria-busy='true'] { cursor: progress; filter: saturate(.6); }
.pf .pf__fieldset:disabled .pf__submit { cursor: default; }
.pf .pf__submit:focus-visible, .pf .pf__link:focus-visible, .pf a:focus-visible, .pf .pf__success:focus-visible { outline: 3px solid var(--pf-focus); outline-offset: 3px; }

.pf .pf__status { margin: 0; font-size: 14px; }
.pf .pf__status:empty { display: none; }
.pf .pf__status[data-state='error'] { color: var(--pf-error-text); }
.pf .pf__fine { margin: 0; color: var(--pf-muted); font-size: 13px; line-height: 1.5; }
.pf a { color: inherit; text-underline-offset: 3px; }

.pf .pf__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.pf .pf__actions .pf__submit { width: auto; }
.pf .pf__link { font-weight: 600; }
.pf .pf__success .pf__kicker { color: var(--pf-success); }

.pf .pf__sr, .pf .pf__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pf [hidden] { display: none !important; }

@container (max-width: 460px) {
  .pf .pf__row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pf .pf__input, .pf .pf__submit { transition: none; }
}
