/*! RP Theme — forms
    Built on the approved design tokens. Square corners, red only on the
    focus ring, the rule and the submit surface — never on label text.
    Mobile: every field is 16px text (so iOS never zooms on focus), 44px or taller,
    free of native iOS styling, and scrolls clear of the sticky header when focused. */

.rp-form{display:grid;gap:22px}
.rp-form__row{display:grid;gap:18px}
/* a field may shrink with its column, so the row never holds a phone-width page open */
.rp-form>*,.rp-form__row>*,.rp-input{min-width:0}
.rp-form__row--2{grid-template-columns:1fr 1fr}
.rp-form__row--3{grid-template-columns:repeat(3,1fr)}

.rp-field-l{display:block;font-family:"Instrument Sans",-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:12.5px;font-weight:600;letter-spacing:.11em;text-transform:uppercase;
  color:var(--muted);margin-bottom:9px}
.rp-field-l .req{color:var(--ink)}

.rp-input,.rp-select,.rp-textarea{
  width:100%;display:block;background:var(--white);color:var(--ink);
  font-family:"Instrument Sans",-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:16px;line-height:1.5;padding:14px 16px;border:1px solid var(--line);
  border-radius:0;transition:border-color .18s ease,box-shadow .18s ease;-webkit-appearance:none;appearance:none;
  background-clip:padding-box;-webkit-tap-highlight-color:transparent}
.rp-textarea{min-height:160px;resize:vertical}
.rp-input::placeholder,.rp-textarea::placeholder{color:var(--muted);opacity:1}
@media(hover:hover){.rp-input:hover,.rp-select:hover,.rp-textarea:hover{border-color:var(--muted)}}
.rp-input:focus,.rp-select:focus,.rp-textarea:focus{
  outline:none;border-color:var(--red);box-shadow:0 0 0 3px var(--red-tint)}
/* browser autofill keeps the field white and the text ink, focus ring included */
.rp-input:-webkit-autofill{-webkit-text-fill-color:var(--ink);box-shadow:0 0 0 1000px var(--white) inset}
.rp-input:-webkit-autofill:focus{box-shadow:0 0 0 1000px var(--white) inset,0 0 0 3px var(--red-tint)}
/* the search field keeps its native clear button but drops the magnifier inset */
.rp-input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}

.rp-select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231F2429' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:46px}

/* choices — the whole label is the target, not just the box */
.rp-check{display:flex;align-items:flex-start;gap:11px;font-size:15.5px;line-height:1.6;color:var(--body);cursor:pointer}
.rp-check input{flex:none;width:19px;height:19px;margin-top:2px;accent-color:var(--red);border-radius:0}
.rp-check a{color:var(--ink);border-bottom:1px solid var(--red)}

/* file */
.rp-file{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;border:1px dashed var(--line);
  background:var(--gray-soft);padding:16px}
.rp-file input{font-size:14px;color:var(--body);max-width:100%;min-width:0}
.rp-file input::file-selector-button{margin-right:14px;min-height:44px;padding:10px 18px;border:1px solid var(--line);
  border-radius:0;background:var(--white);color:var(--ink);font:600 14px "Instrument Sans",-apple-system,"Segoe UI",Arial,sans-serif;cursor:pointer}
.rp-file input::-webkit-file-upload-button{margin-right:14px;min-height:44px;padding:10px 18px;border:1px solid var(--line);
  border-radius:0;background:var(--white);color:var(--ink);font:600 14px "Instrument Sans",-apple-system,"Segoe UI",Arial,sans-serif;cursor:pointer}
.rp-file__hint{font-size:13px;color:var(--muted)}

/* messages */
.rp-note{display:flex;gap:13px;align-items:flex-start;padding:16px 18px;border:1px solid var(--line);
  background:var(--white);font-size:15px;line-height:1.6}
.rp-note:focus{outline:none}
.rp-note--ok{border-left:3px solid var(--red)}
.rp-note--err{border-left:3px solid var(--red-deep);background:var(--red-tint)}
.rp-note b{color:var(--ink);font-weight:600}
.rp-field-err{display:block;margin-top:7px;font-size:13.5px;color:var(--ink);font-weight:600}
.rp-input[aria-invalid="true"],.rp-textarea[aria-invalid="true"],.rp-select[aria-invalid="true"]{
  border-color:var(--red-deep);box-shadow:0 0 0 3px var(--red-tint)}

/* a honeypot, kept out of sight of people and assistive tech alike */
.rp-hp{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* the form block as it sits in a page */
.rp-form-card{background:var(--white);border:1px solid var(--line-soft);padding:40px}
.rp-form-card .rp-form__actions{display:flex;align-items:center;gap:20px;flex-wrap:wrap;margin-top:4px}
.rp-form-card .rp-form__actions p{font-size:14px;color:var(--muted);margin:0}

/* search */
.rp-search{display:flex;gap:0;max-width:520px}
.rp-search .rp-input{border-right:none;min-width:0}
.rp-search button{flex:none;min-width:56px;background:var(--red);color:var(--white);border:none;
  padding:0 22px;cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background-color .18s ease;-webkit-tap-highlight-color:transparent}
.rp-search button:active{background:var(--red-dark)}
@media(hover:hover){.rp-search button:hover{background:var(--red-dark)}}
.rp-search button svg{transition:transform .24s cubic-bezier(.22,.61,.36,1)}
@media(hover:hover){.rp-search button:hover svg{transform:scale(1.08)}}

/* touch: a larger tick box */
@media(pointer:coarse){
  .rp-check input{width:22px;height:22px;margin-top:1px}
}

@media(max-width:1200px){
  /* the header is sticky here: a focused field or a returned notice never hides beneath it */
  .rp-input,.rp-select,.rp-textarea,.rp-note,.rp-file{scroll-margin-top:112px}
}
@media(max-width:900px){
  .rp-form__row--2,.rp-form__row--3{grid-template-columns:1fr}
  .rp-form-card{padding:28px}
}
@media(max-width:640px){
  .rp-form-card{padding:22px}
  .rp-input,.rp-select,.rp-textarea{padding:13px 14px}
  /* keep clear of the select's arrow, which the padding reset above would otherwise cover */
  .rp-select{padding-right:44px;background-position:right 12px center}
  /* a full-width send button, where a thumb expects it */
  .rp-form-card .rp-form__actions .btn{width:100%;justify-content:center}
}
