<%

  var _s = locals.s || {};
  var _contacts = String(_s.contact || '').split(/\n+/).map(function (x) { return x.trim(); }).filter(Boolean);
%>
<div class="gpf-sec">
  <div class="gpf-h"><span class="gpf-n">1</span><div><b>The site</b><span>Where it publishes and who reads it.</span></div></div>
  <div class="gpf-grid gpf-row4">
    <% if (!locals.edit) { %><label class="gpf-f"><span>Domain</span><input name="domain" required placeholder="publisher.com"></label><% } %>
    <label class="gpf-f"><span>Niche</span><input name="niche" placeholder="Healthcare, Marketing…" value="<%= _s.niche || '' %>"></label>
    <label class="gpf-f"><span>Country</span><input name="country" placeholder="EG, US…" value="<%= _s.country || '' %>"></label>
    <label class="gpf-f"><span>Language</span><input name="language" placeholder="EN, AR…" value="<%= _s.language || '' %>"></label>
    <% if (locals.edit) { %><label class="gpf-f"><span>Status</span><select name="status"><% Object.keys(lb.SITE).forEach(function (k) { %><option value="<%= k %>"<%= _s.status === k ? ' selected' : '' %>><%= lb.SITE[k] %></option><% }) %></select></label><% } %>
  </div>
</div>
<div class="gpf-sec">
  <div class="gpf-h"><span class="gpf-n">2</span><div><b>Metrics</b><span>Estimates from third-party tools. The source is shown beside every figure.</span></div></div>
  <div class="gpf-grid">
    <label class="gpf-f"><span>DR / authority</span><span class="gpf-pair"><input name="dr" type="number" min="0" max="100" placeholder="0–100" value="<%= _s.dr != null ? _s.dr : '' %>"><select name="drSource" aria-label="DR source"><%- opts(DR_SRC, _s.drSource) %></select></span></label>
    <label class="gpf-f"><span>Organic traffic / month</span><span class="gpf-pair"><input name="traffic" type="number" min="0" placeholder="Visits" value="<%= _s.traffic != null ? _s.traffic : '' %>"><select name="trafficSource" aria-label="Traffic source"><%- opts(TR_SRC, _s.trafficSource) %></select></span></label>
  </div>
</div>
<div class="gpf-sec">
  <div class="gpf-h"><span class="gpf-n">3</span><div><b>Internal</b><span class="gpf-lock-line">Never shown to the client.</span></div></div>
  <div class="gpf-grid">
    <label class="gpf-f"><span>Price</span><span class="gpf-pair" style="grid-template-columns:minmax(0, 1fr) 90px"><input name="price" type="number" min="0" placeholder="Per post" value="<%= _s.price != null ? _s.price : '' %>"><input name="currency" maxlength="5" value="<%= _s.currency || 'USD' %>" aria-label="Currency"></span></label>
    <label class="gpf-f"><span>Outbound links</span><input name="outbound" placeholder="e.g. 3–5 per post, all editorial" value="<%= _s.outbound || '' %>"></label>
    <div class="gpf-f gpf-wide"><span>Contacts <em>(email, form or profile link)</em></span><%- include('lb-multi', { name: 'contact', values: _contacts, placeholder: 'editor@publisher.com or a contact-form link', add: '+ Add another contact' }) %></div>
    <label class="gpf-f gpf-wide"><span>Why it qualifies, or doesn't</span><input name="qualityNote" placeholder="Relevant niche, real traffic, few outbound links…" value="<%= _s.qualityNote || '' %>"></label>
  </div>
</div>
