/* ==========================================================================
   South Texas Eyecare — Patient Intake Form
   Same design tokens as the main site (index.html :root), extended with a
   Typeform-style one-question-at-a-time layout.
   ========================================================================== */

:root{
  --primary:        #1aa3c0;
  --primary-dark:   #0f87a3;
  --primary-darker: #0b6177;
  --primary-tint:   #e7f7fb;
  --primary-tint-2: #c2eaf2;

  --accent:         #b8862f;
  --accent-tint:    #f7f0e1;

  --ink:            #16242b;
  --ink-soft:       #41555f;
  --muted:          #6b7c84;
  --line:           #e2e8eb;
  --bg:             #ffffff;
  --bg-soft:        #f5fafb;
  --bg-soft-2:      #e9f4f6;

  --err:            #c0392b;
  --err-tint:       #fbeceb;
  --ok:             #2f7d52;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16,40,50,.06), 0 2px 8px rgba(16,40,50,.05);
  --shadow:    0 6px 22px rgba(16,40,50,.08);
  --shadow-lg: 0 18px 50px rgba(16,40,50,.14);
  --maxw: 1140px;
  --bar-h: 4px;
  --topbar-h: 68px;
}

*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0; font-family:var(--font); color:var(--ink); background:var(--bg);
  line-height:1.6; -webkit-font-smoothing:antialiased; font-size:17px;
}
h1,h2,h3{line-height:1.2; margin:0 0 .5em; color:var(--ink); letter-spacing:-.01em;}
p{margin:0 0 1rem;}
a{color:var(--primary-dark);}
img{max-width:100%; display:block;}
button{font-family:inherit;}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible{
  outline:3px solid var(--primary); outline-offset:2px; border-radius:6px;
}

/* ---------- Top bar ---------- */
.tf-topbar{
  position:sticky; top:0; z-index:40; height:var(--topbar-h);
  background:rgba(255,255,255,.94); backdrop-filter:saturate(160%) blur(10px);
  border-bottom:1px solid var(--line);
  display:flex; align-items:center;
}
.tf-topbar-inner{
  width:100%; max-width:var(--maxw); margin:0 auto; padding:0 18px;
  display:flex; align-items:center; gap:14px;
}
.tf-logo{display:flex; align-items:center; gap:10px; flex:0 0 auto; text-decoration:none;}
.tf-logo img{height:34px; width:auto; display:block;}
.tf-logo-text{font-weight:800; font-size:.98rem; color:var(--ink); letter-spacing:-.01em; white-space:nowrap;}
.tf-logo-text small{display:block; font-weight:600; color:var(--muted); font-size:.72rem; letter-spacing:.03em;}

.tf-topbar-right{margin-left:auto; display:flex; align-items:center; gap:14px;}
.tf-lang-switch{
  font-weight:650; font-size:.86rem; color:var(--primary-dark); text-decoration:none;
  border:1.5px solid var(--primary-tint-2); border-radius:999px; padding:.35rem .8rem; white-space:nowrap;
}
.tf-lang-switch:hover{background:var(--primary-tint);}
.tf-exit{
  font-weight:650; font-size:.86rem; color:var(--muted); text-decoration:none; white-space:nowrap;
}
.tf-exit:hover{color:var(--ink);}
.tf-panel-btn{
  display:inline-flex; align-items:center; gap:7px; background:none; border:1.5px solid var(--line);
  border-radius:999px; padding:.4rem .9rem .4rem .7rem; font-family:inherit; font-weight:650;
  font-size:.86rem; color:var(--ink-soft); cursor:pointer; white-space:nowrap;
}
.tf-panel-btn:hover{border-color:var(--primary-tint-2); background:var(--bg-soft); color:var(--ink);}

.tf-panel-backdrop{
  position:fixed; inset:0; background:rgba(15,30,36,.38); z-index:60; opacity:0; pointer-events:none;
  transition:opacity .25s ease;
}
.tf-panel-backdrop.open{opacity:1; pointer-events:auto;}

.tf-panel{
  position:fixed; top:0; bottom:0; left:0; width:min(360px, 88vw); background:#fff; z-index:61;
  box-shadow:var(--shadow-lg); transform:translateX(-100%); transition:transform .3s cubic-bezier(.2,.7,.2,1);
  display:flex; flex-direction:column;
}
.tf-panel.open{transform:translateX(0);}
.tf-panel-head{
  display:flex; align-items:center; justify-content:space-between; padding:18px 18px 14px;
  border-bottom:1px solid var(--line); flex:0 0 auto;
}
.tf-panel-head h2{font-size:1.05rem; margin:0;}
.tf-panel-close{
  background:none; border:0; cursor:pointer; color:var(--muted); padding:6px; border-radius:8px; display:grid; place-items:center;
}
.tf-panel-close:hover{background:var(--bg-soft); color:var(--ink);}
.tf-panel-list{list-style:none; margin:0; padding:10px; overflow-y:auto; flex:1 1 auto;}
.tf-panel-item{margin-bottom:3px;}
.tf-panel-item button{
  width:100%; display:flex; align-items:center; gap:12px; text-align:left; background:none; border:0;
  border-radius:12px; padding:11px 12px; font-family:inherit; cursor:pointer; color:var(--ink-soft); font-weight:650; font-size:.92rem;
}
.tf-panel-item button:hover:not(:disabled){background:var(--bg-soft);}
.tf-panel-item .dot{
  flex:0 0 auto; width:26px; height:26px; border-radius:50%; border:1.5px solid var(--line);
  display:grid; place-items:center; font-size:.72rem; font-weight:700; color:var(--muted); background:#fff;
}
.tf-panel-item.done .dot{background:var(--primary); border-color:var(--primary); color:#fff;}
.tf-panel-item.current button{background:var(--primary-tint);}
.tf-panel-item.current .dot{border-color:var(--primary); color:var(--primary-dark); background:#fff;}
.tf-panel-item.current button, .tf-panel-item.done button{color:var(--ink);}
.tf-panel-item.locked button{color:var(--muted); cursor:not-allowed;}
.tf-panel-item.locked .dot{color:var(--line);}
.tf-panel-item .lbl{flex:1;}
.tf-panel-item .lbl small{display:block; font-weight:500; color:var(--muted); font-size:.78rem; margin-top:1px;}
.tf-panel-foot{
  padding:14px 18px; border-top:1px solid var(--line); font-size:.82rem; color:var(--muted); flex:0 0 auto;
}
@media (max-width:480px){
  .tf-panel-btn span.lbl-text{display:none;}
  .tf-panel-btn{padding:.4rem .55rem;}
}
.tf-step-count{
  font-size:.82rem; font-weight:650; color:var(--muted); white-space:nowrap; display:none;
}
@media (min-width:640px){ .tf-step-count{display:inline;} }

@media (max-width:480px){
  .tf-logo img{height:26px;}
  .tf-logo-text{font-size:.82rem;}
  .tf-logo-text small{display:none;}
  .tf-topbar-right{gap:8px;}
  .tf-lang-switch{padding:.3rem .6rem; font-size:.78rem;}
  .tf-exit{font-size:.78rem;}
}

/* progress bar */
.tf-progress{
  position:sticky; top:var(--topbar-h); left:0; right:0; height:var(--bar-h);
  background:var(--bg-soft-2); z-index:39;
}
.tf-progress i{
  display:block; height:100%; width:0%;
  background:linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition:width .5s cubic-bezier(.4,0,.2,1);
}

/* ---------- Stage / steps ---------- */
.tf-stage{
  position:relative;
  min-height:calc(100dvh - var(--topbar-h) - var(--bar-h));
}
.tf-stage::before{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(720px 420px at 14% -6%, var(--primary-tint) 0%, transparent 60%),
    radial-gradient(640px 420px at 100% 8%, var(--accent-tint) 0%, transparent 55%);
  opacity:.7;
}

.tf-step{
  display:none;
  min-height:calc(100dvh - var(--topbar-h) - var(--bar-h));
  padding:clamp(36px,7vw,72px) 20px clamp(90px,10vw,110px);
  align-items:center;
}
.tf-step.active{display:flex;}
.tf-step-inner{max-width:640px; margin:0 auto; width:100%;}
.tf-step-inner.wide{max-width:820px;}

.tf-step.enter{animation:tfIn .48s cubic-bezier(.2,.7,.2,1) both;}
.tf-step.leave{animation:tfOut .22s ease both;}
@keyframes tfIn{ from{opacity:0; transform:translateY(18px);} to{opacity:1; transform:none;} }
@keyframes tfOut{ from{opacity:1; transform:none;} to{opacity:0; transform:translateY(-10px);} }
@media (prefers-reduced-motion: reduce){
  .tf-step.enter, .tf-step.leave{animation:none;}
}

.tf-kicker{
  display:inline-flex; align-items:center; gap:8px; font-size:.86rem; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase; color:var(--primary-dark); margin-bottom:14px;
}
.tf-kicker .n{
  display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%;
  background:var(--primary-tint); color:var(--primary-dark); font-size:.7rem;
}
.tf-q{
  font-size:clamp(1.5rem,3.6vw,2.15rem); font-weight:800; letter-spacing:-.015em; color:var(--ink);
  margin:0 0 .35em; text-wrap:balance;
}
.tf-q .req-star{color:var(--err); font-weight:700;}
.tf-help{color:var(--ink-soft); font-size:1.02rem; max-width:56ch; margin:0 0 1.6rem;}
.tf-help.tight{margin-bottom:1rem;}

/* ---------- Big single-field (typeform underline) ---------- */
.tf-big-field{margin:1.6rem 0 1.8rem;}
.tf-big-field input, .tf-big-field select{
  width:100%; font-family:inherit; font-size:clamp(1.15rem,2.6vw,1.5rem); font-weight:600; color:var(--ink);
  padding:.5rem .1rem .7rem; border:0; border-bottom:2.5px solid var(--line); background:transparent;
  border-radius:0; transition:border-color .18s ease;
}
.tf-big-field select{ -webkit-appearance:none; appearance:none;
  background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2341555f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat:no-repeat; background-position:right 4px center; background-size:20px; padding-right:32px;
}
.tf-big-field input:focus, .tf-big-field select:focus{
  outline:none; border-color:var(--primary);
}
.tf-big-field input::placeholder{color:var(--muted); font-weight:500;}
.tf-big-field .tf-field-hint{font-size:.86rem; color:var(--muted); margin-top:8px;}

/* ---------- Standard boxed fields (grouped / grid steps) ---------- */
.tf-field{margin-bottom:18px;}
.tf-field label{display:block; font-weight:650; font-size:.92rem; margin-bottom:7px; color:var(--ink);}
.tf-field .opt{font-weight:500; color:var(--muted); font-size:.85rem;}
.tf-field input[type=text], .tf-field input[type=email], .tf-field input[type=tel],
.tf-field input[type=date], .tf-field input[type=number], .tf-field select, .tf-field textarea{
  width:100%; font-family:inherit; font-size:1rem; color:var(--ink); padding:.72rem .85rem;
  border:1.5px solid var(--line); border-radius:var(--radius-sm); background:#fff;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.tf-field textarea{min-height:90px; resize:vertical;}
.tf-field input:focus, .tf-field select:focus, .tf-field textarea:focus{
  outline:none; border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-tint);
}
.tf-row{display:grid; grid-template-columns:1fr 1fr; gap:16px;}
.tf-row.tf-row-3{grid-template-columns:1fr 1fr 1fr;}
@media (max-width:560px){ .tf-row, .tf-row.tf-row-3{grid-template-columns:1fr;} }
.tf-field.invalid input, .tf-field.invalid select, .tf-field.invalid textarea{
  border-color:var(--err); box-shadow:0 0 0 3px var(--err-tint);
}
.tf-field-error{color:var(--err); font-size:.84rem; margin-top:6px; font-weight:600; display:none;}
.tf-field.invalid .tf-field-error{display:block;}

/* ---------- Choice tiles (typeform lettered options) ---------- */
.tf-choices{display:grid; gap:10px; margin:1.4rem 0 1.6rem;}
.tf-choice{
  display:flex; align-items:center; gap:14px; width:100%; text-align:left; cursor:pointer;
  border:1.5px solid var(--line); border-radius:var(--radius-sm); background:#fff;
  padding:.85rem 1.05rem; font-family:inherit; font-size:1.02rem; font-weight:600; color:var(--ink);
  transition:border-color .15s ease, background .15s ease, transform .1s ease;
}
.tf-choice:hover{border-color:var(--primary-tint-2); background:var(--bg-soft);}
.tf-choice:active{transform:scale(.995);}
.tf-choice .letter{
  flex:0 0 auto; width:30px; height:30px; border-radius:8px; border:1.5px solid var(--line);
  display:grid; place-items:center; font-size:.85rem; font-weight:700; color:var(--muted);
  transition:.15s;
}
.tf-choice .label{flex:1;}
.tf-choice .check{
  flex:0 0 auto; width:20px; height:20px; border-radius:50%; border:1.5px solid var(--line);
  display:grid; place-items:center; color:transparent;
}
.tf-choice.selected{border-color:var(--primary); background:var(--primary-tint); color:var(--primary-darker);}
.tf-choice.selected .letter{background:var(--primary); border-color:var(--primary); color:#fff;}
.tf-choice.selected .check{background:var(--primary); border-color:var(--primary); color:#fff;}
.tf-choices.tf-choices-inline{display:flex; flex-wrap:wrap;}
.tf-choices.tf-choices-inline .tf-choice{width:auto; flex:0 0 auto; border-radius:999px; padding:.6rem 1.1rem;}
.tf-choices.tf-choices-inline .tf-choice .letter{display:none;}

/* ---------- Yes/No pill pair ---------- */
.tf-yesno{display:flex; gap:10px; margin:1.2rem 0;}
.tf-yesno .tf-choice{flex:1; justify-content:center; text-align:center;}
.tf-yesno .tf-choice .letter{display:none;}

/* ---------- Buttons / nav ---------- */
.tf-actions{display:flex; align-items:center; gap:16px; margin-top:8px; flex-wrap:wrap;}
.tf-btn{
  display:inline-flex; align-items:center; gap:.5rem; cursor:pointer; border:0;
  font-family:inherit; font-size:1rem; font-weight:700; padding:.85rem 1.7rem;
  border-radius:999px; transition:transform .15s ease, box-shadow .2s ease, background .15s ease;
  background:var(--primary); color:#fff; box-shadow:var(--shadow-sm);
}
.tf-btn:hover{background:var(--primary-dark); box-shadow:var(--shadow); transform:translateY(-1px);}
.tf-btn:disabled{opacity:.55; cursor:not-allowed; transform:none; box-shadow:none;}
.tf-btn-ghost{
  background:transparent; color:var(--ink-soft); box-shadow:none; font-weight:650; padding:.6rem .3rem;
}
.tf-btn-ghost:hover{background:transparent; color:var(--ink); box-shadow:none; transform:none;}
.tf-enter-hint{
  display:inline-flex; align-items:center; gap:6px; font-size:.83rem; color:var(--muted); font-weight:600;
}
.tf-enter-hint kbd{
  border:1.5px solid var(--line); border-bottom-width:2.5px; border-radius:5px; padding:1px 7px;
  font-family:inherit; font-size:.78rem; color:var(--ink-soft); background:#fff;
}
@media (max-width:520px){ .tf-enter-hint{display:none;} }

.tf-back-row{margin-bottom:18px;}
.tf-back{
  display:inline-flex; align-items:center; gap:6px; background:none; border:0; cursor:pointer;
  color:var(--muted); font-weight:650; font-size:.9rem; padding:.3rem 0; font-family:inherit;
}
.tf-back:hover{color:var(--primary-dark);}

/* ---------- Welcome screen ---------- */
.tf-welcome{text-align:left;}
.tf-welcome .tf-eyebrow{
  display:inline-block; font-size:.86rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--primary-dark); margin-bottom:.9rem;
}
.tf-welcome h1{font-size:clamp(2rem,5vw,2.9rem); font-weight:800; letter-spacing:-.02em;}
.tf-welcome .lead{font-size:1.12rem; color:var(--ink-soft); max-width:58ch;}
.tf-checklist{list-style:none; margin:1.6rem 0; padding:0; display:grid; gap:12px;}
.tf-checklist li{display:flex; gap:12px; align-items:flex-start; color:var(--ink-soft);}
.tf-checklist li svg{flex:0 0 auto; margin-top:3px; color:var(--primary);}
.tf-privacy-note{
  background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px; font-size:.92rem; color:var(--ink-soft); margin:1.4rem 0 1.8rem; display:flex; gap:12px;
}
.tf-privacy-note svg{flex:0 0 auto; margin-top:3px; color:var(--primary-dark);}
.tf-paper-alt{font-size:.92rem; color:var(--muted); margin-top:1.2rem;}
.tf-paper-alt a{font-weight:650;}
.tf-resume-banner{
  background:var(--accent-tint); border:1px solid #e7d4a8; border-radius:var(--radius);
  padding:14px 18px; display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between;
  margin-bottom:1.6rem; font-size:.92rem; color:#6a4e16;
}
.tf-resume-banner .row{display:flex; gap:10px;}
.tf-link-btn{background:none; border:0; font-family:inherit; font-weight:700; cursor:pointer; color:var(--primary-dark); font-size:.9rem; padding:0;}

/* ---------- Health / ocular history table ---------- */
.tf-htable{display:grid; gap:10px; margin:1.4rem 0 1.6rem;}
.tf-hrow{border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:14px 16px; background:#fff;}
.tf-hrow-top{display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;}
.tf-hrow-label{font-weight:700; color:var(--ink); font-size:1rem;}
.tf-hrow .tf-yesno{margin:0; flex:0 0 auto; width:auto;}
.tf-hrow .tf-yesno .tf-choice{padding:.4rem .95rem; font-size:.88rem;}
.tf-hrow-detail{
  display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; max-height:0; overflow:hidden;
  opacity:0; transition:max-height .3s ease, opacity .25s ease, margin .3s ease;
}
.tf-hrow-detail.open{max-height:200px; opacity:1;}
.tf-hrow-detail input, .tf-hrow-detail select{
  width:100%; font-family:inherit; font-size:.94rem; padding:.55rem .7rem; border:1.5px solid var(--line);
  border-radius:8px;
}
@media (max-width:560px){ .tf-hrow-detail{grid-template-columns:1fr;} }

/* ---------- Repeater (medications) ---------- */
.tf-rep-row{display:grid; grid-template-columns:1fr 1fr auto; gap:10px; margin-bottom:10px; align-items:center;}
@media (max-width:560px){ .tf-rep-row{grid-template-columns:1fr;} }
.tf-rep-row input{
  width:100%; font-family:inherit; font-size:.96rem; padding:.65rem .8rem; border:1.5px solid var(--line);
  border-radius:var(--radius-sm);
}
.tf-rep-remove{
  background:none; border:1.5px solid var(--line); color:var(--muted); border-radius:8px; width:38px; height:38px;
  cursor:pointer; display:grid; place-items:center; flex:0 0 auto;
}
.tf-rep-remove:hover{border-color:var(--err); color:var(--err);}
.tf-rep-add{
  background:none; border:1.5px dashed var(--primary-tint-2); color:var(--primary-dark); font-weight:650;
  border-radius:var(--radius-sm); padding:.6rem 1rem; cursor:pointer; font-family:inherit; margin-top:4px;
}
.tf-rep-add:hover{background:var(--primary-tint);}
.tf-check-inline{display:flex; align-items:center; gap:8px; margin:10px 0 0; font-size:.92rem; color:var(--ink-soft); font-weight:600;}
.tf-check-inline input{width:auto;}

/* ---------- Review of systems ---------- */
.tf-ros-grid{display:grid; gap:10px; margin:1.4rem 0 1.6rem; grid-template-columns:1fr 1fr;}
@media (max-width:640px){ .tf-ros-grid{grid-template-columns:1fr;} }
.tf-ros-item{border:1.5px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px; background:#fff;}
.tf-ros-item label{display:flex; align-items:flex-start; gap:10px; font-weight:650; font-size:.94rem; cursor:pointer;}
.tf-ros-item label small{display:block; font-weight:500; color:var(--muted); font-size:.82rem; margin-top:2px;}
.tf-ros-item input{margin-top:3px; flex:0 0 auto;}
.tf-ros-detail{margin-top:10px; display:none;}
.tf-ros-item.checked .tf-ros-detail{display:block;}
.tf-ros-detail textarea{width:100%; font-family:inherit; font-size:.9rem; padding:.55rem .7rem; border:1.5px solid var(--line); border-radius:8px; min-height:56px;}
.tf-ros-item.checked{border-color:var(--primary-tint-2); background:var(--primary-tint);}

/* ---------- Legal / consent blocks ---------- */
.tf-legal{
  background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px 20px; font-size:.92rem; color:var(--ink-soft); max-height:220px; overflow-y:auto; margin:1.2rem 0 1.4rem;
}
.tf-legal p{margin:0 0 .8rem;}
.tf-legal p:last-child{margin-bottom:0;}
.tf-sig-row{display:grid; grid-template-columns:2fr 1fr; gap:16px; margin-top:1.2rem;}
@media (max-width:560px){ .tf-sig-row{grid-template-columns:1fr;} }
.tf-sig-input{
  width:100%; font-family:"Segoe Script","Bradley Hand",cursive; font-size:1.4rem; color:var(--primary-darker);
  padding:.6rem .1rem; border:0; border-bottom:2.5px solid var(--line); background:transparent;
}
.tf-sig-input:focus{outline:none; border-color:var(--primary);}
.tf-sig-input::placeholder{font-family:inherit; font-size:1rem; color:var(--muted);}
.tf-sig-caption{font-size:.8rem; color:var(--muted); margin-top:6px;}
.tf-consent-check{display:flex; gap:12px; align-items:flex-start; margin-top:1.2rem; cursor:pointer;}
.tf-consent-check input{margin-top:4px; width:18px; height:18px; flex:0 0 auto;}
.tf-consent-check span{font-weight:600; font-size:.95rem; color:var(--ink);}

/* ---------- Benefits step (conditional insurance blocks) ---------- */
.tf-benefit-block{
  border:1.5px solid var(--line); border-radius:var(--radius); padding:20px 22px; margin-bottom:18px; background:#fff;
}
.tf-benefit-block h3{font-size:1.05rem; color:var(--primary-darker); margin-bottom:.5rem;}
.tf-benefit-block p{font-size:.9rem; color:var(--ink-soft);}

/* ---------- Review / submit ---------- */
.tf-review-list{display:grid; gap:2px; margin:1.4rem 0 1.6rem; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden;}
.tf-review-row{display:flex; justify-content:space-between; gap:14px; padding:11px 16px; background:#fff; font-size:.92rem;}
.tf-review-row:nth-child(even){background:var(--bg-soft);}
.tf-review-row .k{color:var(--muted); font-weight:600;}
.tf-review-row .v{color:var(--ink); font-weight:650; text-align:right;}
.tf-review-edit{
  text-align:center; margin:8px 0 0; font-size:.86rem; color:var(--muted);
}
.tf-cf-field{display:flex; justify-content:flex-start; margin:.4rem 0 1.2rem;}
.tf-submit-error{
  color:var(--err); background:var(--err-tint); border:1px solid #f0c6c1; border-radius:var(--radius-sm);
  padding:12px 14px; font-size:.9rem; font-weight:600; margin-bottom:1rem; display:none;
}
.tf-submit-error.show{display:block;}

/* ---------- Confirmation ---------- */
.tf-confirm{text-align:center;}
.tf-confirm .check{
  width:76px; height:76px; border-radius:50%; background:var(--primary-tint); color:var(--ok);
  display:grid; place-items:center; margin:0 auto 20px;
}
.tf-confirm h1{font-size:clamp(1.7rem,4vw,2.3rem);}
.tf-confirm .lead{max-width:52ch; margin-left:auto; margin-right:auto;}
.tf-confirm-actions{display:flex; gap:14px; justify-content:center; margin-top:1.8rem; flex-wrap:wrap;}
.tf-btn-outline{
  background:#fff; color:var(--primary-dark); border:1.5px solid var(--primary-tint-2);
  box-shadow:none;
}
.tf-btn-outline:hover{border-color:var(--primary); background:var(--primary-tint); box-shadow:none;}

/* ---------- Honeypot ---------- */
.tf-hp{position:absolute !important; left:-9999px !important; width:1px; height:1px; overflow:hidden;}

/* ---------- Toast (fallback error messaging) ---------- */
.tf-toast{
  position:fixed; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px);
  background:#0b2027; color:#fff; padding:13px 18px; border-radius:12px; box-shadow:0 12px 34px rgba(0,0,0,.28);
  font-size:.94rem; line-height:1.4; max-width:90vw; text-align:center; opacity:0; pointer-events:none;
  transition:opacity .25s ease, transform .25s ease; z-index:1000;
}
.tf-toast.show{opacity:1; transform:translateX(-50%) translateY(0);}

/* ---------- Misc ---------- */
.tf-req{color:var(--err);}
.tf-muted{color:var(--muted);}
.tf-spinner{
  width:18px; height:18px; border-radius:50%; border:2.5px solid rgba(255,255,255,.4);
  border-top-color:#fff; animation:tfSpin .7s linear infinite;
}
@keyframes tfSpin{ to{ transform:rotate(360deg); } }
