/* Certified-PEP — Total Research Gate (White/Teal) */

:root{
  --cptrg-ink:#152A4D;
  --cptrg-muted:#4B637C;
  --cptrg-teal:#155E75;
  --cptrg-teal-soft:#18A7AE;
  --cptrg-line:rgba(21,42,77,.14);
  --cptrg-card:#ffffff;
  --cptrg-soft:#f6f8fb;
  --cptrg-shadow:0 22px 70px rgba(12,31,55,.12);
}

.cptrg-body{
  margin:0;
  padding:0;
  background:#0b1324;
  color:var(--cptrg-ink);
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Inter,Arial,sans-serif;
}

.cptrg{
  min-height:100vh;
  display:flex;
}

.cptrg-hero{
  position:relative;
  width:100%;
  min-height:100vh;
  background:
    radial-gradient(1000px 640px at 80% 40%, rgba(24,167,174,.18), transparent 60%),
    radial-gradient(900px 520px at 20% 20%, rgba(21,94,117,.16), transparent 55%),
    linear-gradient(180deg, #0b1324, #0a2233);
}

.cptrg-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:var(--cptrg-hero);
  background-size:cover;
  background-position:center;
  opacity:.28;
  pointer-events:none;
}

.cptrg-hero__overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(11,19,36,.62), rgba(11,19,36,.78));
  pointer-events:none;
}

.cptrg-shell{
  position:relative;
  z-index:2;
  width:min(1240px, 100%);
  margin:0 auto;
  padding:clamp(18px,4vw,44px) clamp(14px,4vw,28px);
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:center;
  justify-content:flex-start;
}

/* Regulatory notice placement: mobile stays in-card; desktop moves below and spans */
.cptrg-regulatory--below{ display:none; }
.cptrg-regulatory--mobile-top{ display:none; }

.cptrg-brand{
  text-align:center;
  margin-top:6px;
}
.cptrg-brand__title{
  font-weight:900;
  letter-spacing:-.02em;
  font-size:clamp(22px,3.2vw,34px);
  color:#ffffff;
}
.cptrg-brand__sub{
  margin-top:4px;
  color:rgba(255,255,255,.86);
  font-size:14px;
}

.cptrg-google{
  width:min(760px, 100%);
  display:flex;
  justify-content:center;
}
.cptrg-google__media{
  width:100%;
  position:relative;
}
.cptrg-google img{
  width:100%;
  height:auto;
  display:block;
  border-radius:14px;
  box-shadow:0 18px 46px rgba(0,0,0,.28);
}

/* Review links row (in-content by default) */
.cptrg-reviewlinks{
  position:static;
  display:flex;
  gap:12px;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
}

/* If review links are ever placed inside the hero media again, allow an overlay variant */
.cptrg-google__media > .cptrg-reviewlinks{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
}

.cptrg-reviewpill{
  flex:1;
  min-width: 210px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(21,42,77,.16);
  color:var(--cptrg-ink);
  text-decoration:none !important;
  font-weight:900;
  line-height:1;
  box-shadow:0 10px 22px rgba(0,0,0,.14);
  backdrop-filter:saturate(1.1) blur(6px);
  -webkit-backdrop-filter:saturate(1.1) blur(6px);
}

.cptrg-reviewpill__stars{
  font-weight:900;
  letter-spacing:1.2px;
  font-size:18px;
  color:var(--cptrg-teal-soft);
}

.cptrg-reviewpill__label{
  font-size:14px;
  font-weight:900;
  letter-spacing:.1px;
}

@media (max-width: 560px){
  .cptrg-reviewlinks{ gap:10px; 
  .cptrg-reviewpill{
    padding:8px 12px;
  }
}
  .cptrg-google__media > .cptrg-reviewlinks{
    left:10px;
    right:10px;
    bottom:10px;
  }
  .cptrg-reviewpill{
    width:100%;
    min-width:0;
    padding:12px 14px;
  }
  .cptrg-reviewpill__stars{ font-size:20px; }
  .cptrg-reviewpill__label{ font-size:15px; }
}

.cptrg-card{
  width:min(720px, 100%);
  background:var(--cptrg-card);
  border:1px solid var(--cptrg-line);
  border-radius:22px;
  box-shadow:var(--cptrg-shadow);
  padding:16px;
}

.cptrg-alert{
  background:rgba(220,38,38,.08);
  border:1px solid rgba(220,38,38,.18);
  color:#7f1d1d;
  padding:10px 12px;
  border-radius:14px;
  font-weight:700;
  margin-bottom:10px;
}

.cptrg-alert--ok{
  background:rgba(24,167,174,.10);
  border:1px solid rgba(24,167,174,.22);
  color:var(--cptrg-teal);
}

.cptrg-forgot-title{
  font-weight:900;
  color:var(--cptrg-ink);
  font-size:18px;
  text-align:center;
  margin:2px 0 0;
}
.cptrg-forgot-sub{
  text-align:center;
  color:var(--cptrg-muted);
  font-size:13px;
  margin:-4px 0 6px;
  line-height:1.4;
}


.cptrg-tabs{
  display:flex;
  gap:10px;
  width:100%;
  background:var(--cptrg-soft);
  border:1px solid var(--cptrg-line);
  border-radius:999px;
  padding:6px;
}

.cptrg-tab{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--cptrg-teal) !important;
  font-weight:900;
  padding:10px 14px;
  border-radius:999px;
  cursor:pointer;
  min-height:40px;
  flex:1;
  text-align:center;
  font-size:14px;
}
.cptrg-tab.is-active{
  background:#ffffff;
  color:var(--cptrg-teal) !important;
  border:1px solid rgba(21,94,117,.25);
  box-shadow:0 12px 26px rgba(12,31,55,.08);
}

.cptrg-panels{ margin-top:12px; }
.cptrg-panel{ display:none; }
.cptrg-panel.is-active{ display:block; }

.cptrg-form{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.cptrg-field span{
  display:block;
  font-size:13px;
  font-weight:900;
  color:rgba(21,42,77,.86);
  margin:0 0 6px;
}

.cptrg-field input{
  width:100%;
  padding:14px 14px;
  border-radius:16px;
  border:1px solid rgba(21,42,77,.18);
  background:#ffffff;
  font-size:16px;
  color:var(--cptrg-ink);
  outline:none;
}
.cptrg-field input:focus{
  border-color:rgba(24,167,174,.55);
  box-shadow:0 0 0 4px rgba(24,167,174,.18);
}

.cptrg-terms{
  border:1px solid rgba(21,42,77,.14);
  border-radius:18px;
  padding:12px 12px 10px;
  background:#ffffff;
}
.cptrg-terms__head{
  font-weight:900;
  color:var(--cptrg-teal);
  margin-bottom:6px;
}
.cptrg-terms__body{
  color:rgba(21,42,77,.92);
  line-height:1.6;
  font-size:14px;
}
.cptrg-check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:10px;
  font-weight:800;
  color:rgba(21,42,77,.90);
  line-height:1.35;
}
.cptrg-check input{ margin-top:3px; }

.cptrg-btn,
button.cptrg-btn,
.cptrg-card button.cptrg-btn{
  -webkit-appearance:none;
  appearance:none;
  border:0 !important;
  border-radius:999px !important;
  padding:12px 18px !important;
  font-weight:900 !important;
  cursor:pointer;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:52px !important;

  /* Force contrast even if theme tries to override */
  background:linear-gradient(135deg,var(--cptrg-teal),var(--cptrg-teal-soft)) !important;
  color:#ffffff !important;
  text-decoration:none !important;
  box-shadow:0 16px 36px rgba(12,31,55,.18) !important;
  transition:transform .12s ease, filter .14s ease;
}
.cptrg-btn:hover{ filter:brightness(1.03); transform:translateY(-1px); }
.cptrg-btn:disabled,
.cptrg-btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  filter:none;
}



.cptrg-small{
  text-align:center;
  font-size:13px;
  color:var(--cptrg-muted);
}
.cptrg-small a{
  color:var(--cptrg-teal);
  font-weight:900;
  text-decoration:none;
}
.cptrg-small a:hover{ text-decoration:underline; }

@media (max-width:640px){
  /* Mobile-only overflow fixes */
  .cptrg-body{ overflow-x:hidden; }
  .cptrg, .cptrg-hero{ overflow-x:hidden; max-width:100vw; }

  /* Ensure width + padding never exceeds viewport */
  .cptrg *{ box-sizing:border-box; }
  .cptrg *::before, .cptrg *::after{ box-sizing:border-box; }

  .cptrg-shell{
    width:100%;
    max-width:100%;
    padding:18px 14px;
  }

  .cptrg-card{
    width:100%;
    max-width:100%;
    padding:14px;
    border-radius:20px;
  }

  .cptrg-google{ width:100%; max-width:100%; }
  .cptrg-google img{ max-width:100%; height:auto; }

  .cptrg-tabs{ gap:8px; }
  .cptrg-tab{ padding:10px 10px; }

  .cptrg-btn{ width:100%; max-width:100%; }

  /* If any long URLs/messages exist, prevent sideways scroll */
  .cptrg-card, .cptrg-terms__body, .cptrg-small{ overflow-wrap:anywhere; word-break:break-word; }
}



/* ===== Desktop Side-by-Side Layout Only ===== */
@media (min-width:1024px){
  .cptrg-shell{
    display:grid !important;
    grid-template-columns:1fr 1fr;
    gap:48px;
    align-items:start;
  }

  .cptrg-google{
    grid-column:1;
    width:100% !important;
  }

  .cptrg-card{
    grid-column:2;
    width:100% !important;
  }

  .cptrg-regulatory--in-card{
    display:none;
  }

  .cptrg-regulatory--below{
    display:block;
    grid-column:1 / -1;
    width:100%;
  }
}

/* CPTRG MOBILE EDGE-TO-EDGE OVERRIDES */
@media (max-width: 640px){
  body.cptrg-body{ background:#ffffff !important; }

  .cptrg-hero{ background:none !important; }
  .cptrg-hero::before,
  .cptrg-hero__overlay{ display:none !important; }

  /* Force vertical stacking order on mobile */
  .cptrg-shell{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    padding:0 !important;
    max-width:100% !important;
    width:100% !important;
    margin:0 !important;
    gap:0 !important;
  }

  .cptrg-google{ width:100% !important; max-width:100% !important; margin:0 !important; padding:0 !important; }
  .cptrg-google img{ width:100% !important; height:auto !important; display:block !important; border-radius:0 !important; box-shadow:none !important; }

  .cptrg-card{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    border-left:0 !important;
    border-right:0 !important;
  }

  .cptrg-welcome{
    margin-top:0 !important;
    border-radius:0 !important;
    border-left:0 !important;
    border-right:0 !important;
  }

  .cptrg-welcome--desktop{ display:none !important; }
  .cptrg-welcome--mobile{ display:block !important; }

  html, body{ overflow-x:hidden !important; max-width:100vw !important; }

  /* Move regulatory notice above card on mobile */
  .cptrg-regulatory--mobile-top{ display:block !important; }
  .cptrg-regulatory--in-card,
  .cptrg-regulatory--below{ display:none !important; }
}
@media (min-width: 641px){
  .cptrg-welcome--mobile{ display:none !important; }
  .cptrg-welcome--desktop{ display:block !important; }
}
