/* PennTrail forms (Nov 12): the early-access page and the "Talk to a person" dialog.
   Only the site's own tokens (base3.css :root), fonts, buttons and the hero landscape. No new colours. */

/* ---------- fields (shared) ---------- */
.pf-card { position: relative; background: var(--card); color: var(--text); border-radius: var(--r); box-shadow: var(--shadow); padding: 32px; }
.pf-card h1, .pf-card h2 { font: var(--h-w) clamp(28px, 3.2vw, 36px)/1.08 var(--font-d); letter-spacing: -0.03em; color: var(--ink); }
.pf-lede { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.pf-form { margin-top: 22px; display: grid; gap: 14px; }
.pf-field { display: grid; gap: 6px; }
.pf-field label { font: 600 14px/1.3 var(--font-b); color: var(--ink); }
.pf-field input, .pf-field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  font: 400 16px/1.4 var(--font-b); color: var(--ink); transition: border-color .2s, background .2s, box-shadow .2s; }
.pf-field textarea { resize: vertical; min-height: 110px; }
.pf-field input::placeholder, .pf-field textarea::placeholder { color: #8a948f; }
/* focus (Nov 12, Patrick: no green ring): the field turns white with a fine ink border and a barely-there halo */
.pf-field input:hover, .pf-field textarea:hover { border-color: #c9cfc5; }
.pf-field input:focus, .pf-field input:focus-visible, .pf-field textarea:focus, .pf-field textarea:focus-visible { outline: none; border-color: var(--ink); background: #fff;
  box-shadow: 0 0 0 4px rgba(12, 22, 17, .06), 0 1px 2px rgba(12, 22, 17, .06); }
.pf-card :focus-visible { outline-color: var(--ink); }
.pf-field.bad input:focus, .pf-field.bad textarea:focus { border-color: #b23a27; box-shadow: 0 0 0 4px rgba(178, 58, 39, .08); }
.pf-field.bad input, .pf-field.bad textarea { border-color: #c2412d; background: #fff; }
.pf-err { font-size: 13.5px; line-height: 1.4; color: #b23a27; min-height: 0; }
.pf-err:empty { display: none; }
.pf-form-err { margin: 0; }
.pf-go { margin-top: 6px; }
.pf-go[disabled] { opacity: .65; pointer-events: none; }
.pf-fine { font-size: 13px; line-height: 1.45; color: var(--muted); text-align: center; }
.pf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pf-ok { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%; background: var(--lime); color: var(--brand); }
.pf-ok .ic { width: 24px; height: 24px; }
.ea-done p, .ct-done p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.ea-done .btn, .ct-done .btn { margin-top: 22px; }
.ea-done:focus, .ct-done:focus { outline: none; }

/* ---------- early access page ---------- */
body.ea-page { background: var(--sky); }
.ea-scene { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; background: #6d8aa3; }
.ea-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 74%; z-index: 0; opacity: 0; transition: opacity .6s ease; }
.ea-bg.in { opacity: 1; }
.ea-scene .h4-shade { z-index: 1; }
/* Nov 12 (Patrick): one centred column. Penn stands on top of the card, small enough that it all fits one screen. */
.ea-main { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center;
  padding: 104px max(20px, env(safe-area-inset-right, 0px)) 28px max(20px, env(safe-area-inset-left, 0px)); }
.ea-penn { position: relative; z-index: 3; display: flex; align-items: flex-end; gap: 12px; margin: 0 0 -10px 18px; }
.ea-bubble { position: relative; flex: 1; padding: 11px 14px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: var(--shadow);
  font: 500 14.5px/1.4 var(--font-b); margin-bottom: 30px; }
.ea-bubble::after { content: ''; position: absolute; left: -6px; bottom: 16px; width: 14px; height: 14px; background: #fff; border-radius: 3px; transform: rotate(45deg); }
.ea-fig { order: -1; position: relative; flex: none; width: clamp(72px, 8.5vh, 92px); }
.ea-fig .pn { position: relative; z-index: 1; width: 100%; height: auto; }
.ea-shadow { display: none; }
.ea-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 0 24px max(22px, env(safe-area-inset-bottom, 0px));
  color: #fff; font-size: 13.5px; text-shadow: 0 1px 2px rgba(0, 30, 15, .45); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .ea-card, .ea-penn { animation: rise .9s cubic-bezier(.16, 1, .3, 1) both; }
  .ea-card { animation-delay: .08s; }
}
/* phones and small tablets: Penn small above the card, everything in the page flow so the keyboard never covers a field */
@media (max-width: 640px) {
  .ea-main { justify-content: flex-start; padding-top: 96px; }
  .pf-card { padding: 24px 20px; }
  .ea-bg { object-position: 50% 62%; }
}
@media (max-height: 760px) and (min-width: 641px) { .ea-main { padding-top: 92px; } .pf-card { padding: 26px 28px; } .pf-form { margin-top: 18px; gap: 12px; } }

/* ---------- "Talk to a person" dialog ---------- */
.pf-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; border-radius: var(--r); background: transparent; overflow: auto; }
.pf-dialog::backdrop { background: rgba(8, 20, 14, .55); backdrop-filter: blur(3px); }
.pf-dialog .pf-card { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55); }
.pf-dialog h2 { padding-right: 40px; }
.pf-x { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.pf-x:hover { background: var(--paper-2); }
.pf-x .ic { width: 20px; height: 20px; }
html.pf-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { .pf-dialog[open] .pf-card { animation: rise .35s cubic-bezier(.16, 1, .3, 1) both; } }
