:root{
    --navy-950:#f4ead6;
    --navy-900:#e9dcc0;
    --navy-800:#3d4250;
    --navy-700:#4d5568;
    --teal-400:#d9558a;
    --blue-400:#5a90ba;
    --blue-500:#3d6d94;
    --ink:#2a2018;
    --ink-dim:#6b5f52;
    --ink-faint:#948a7c;
    --line:rgba(60,45,25,0.15);
  }
  *{box-sizing:border-box;margin:0;padding:0;}
  html{background:var(--navy-950);}
  html,body{min-height:100%;}
  body{
    font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    background:
      radial-gradient(1100px 750px at 90% -5%, rgba(120,170,205,0.22), transparent 60%),
      radial-gradient(1000px 800px at 10% 105%, rgba(242,140,80,0.24), transparent 58%),
      radial-gradient(700px 600px at 50% 50%, rgba(230,140,180,0.14), transparent 70%),
      var(--navy-950);
    color:var(--ink);
    min-height:100vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:32px 24px;
    position:relative;
    overflow-x:hidden;
  }

  /* aged paper grain */
  body::before{
    content:"";
    position:fixed;
    inset:0;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.22  0 0 0 0 0.16  0 0 0 0 0.09  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size:300px 300px;
    opacity:0.4;
    mix-blend-mode:multiply;
    pointer-events:none;
    z-index:0;
  }

  .wrap{
    position:relative;
    z-index:1;
    width:100%;
    max-width:640px;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
  }

  .mark{
    width:64px;
    height:64px;
    margin-bottom:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:16px;
    background:linear-gradient(135deg, var(--navy-800), var(--navy-700));
    border:1px solid var(--line);
    box-shadow:0 8px 30px rgba(61,109,148,0.25);
  }

  .badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:7px 16px;
    border-radius:999px;
    background:rgba(217,85,138,0.1);
    border:1px solid rgba(217,85,138,0.3);
    color:var(--teal-400);
    font-size:12.5px;
    font-weight:600;
    letter-spacing:0.06em;
    text-transform:uppercase;
    margin-bottom:24px;
  }
  .badge .dot{
    width:6px;
    height:6px;
    border-radius:50%;
    background:var(--teal-400);
    box-shadow:0 0 0 3px rgba(217,85,138,0.25);
  }

  h1{
    font-size:clamp(2rem, 5vw, 2.75rem);
    font-weight:800;
    letter-spacing:-0.02em;
    line-height:1.15;
    margin-bottom:14px;
  }
  h1 span{
    background:linear-gradient(90deg, var(--blue-400), var(--teal-400));
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
  }

  .tagline{
    font-size:clamp(1.05rem, 2.4vw, 1.25rem);
    font-weight:500;
    color:var(--ink-dim);
    margin-bottom:22px;
  }

  p.desc{
    font-size:15.5px;
    line-height:1.7;
    color:var(--ink-dim);
    max-width:480px;
    margin-bottom:40px;
  }
  p.desc strong{
    color:var(--ink);
    font-weight:600;
  }

  .features{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:12px;
    width:100%;
    max-width:520px;
    margin-bottom:44px;
  }
  .feature{
    padding:18px 12px;
    border-radius:14px;
    background:rgba(60,40,15,0.05);
    border:1px solid var(--line);
  }
  .feature svg{
    width:20px;
    height:20px;
    color:var(--teal-400);
    margin-bottom:10px;
  }
  .feature p{
    font-size:12.5px;
    font-weight:600;
    color:var(--ink);
    line-height:1.4;
  }

  footer{
    position:relative;
    z-index:1;
    margin-top:12px;
    padding-top:24px;
    border-top:1px solid var(--line);
    width:100%;
    max-width:520px;
    text-align:center;
  }
  footer p{
    font-size:12.5px;
    color:var(--ink-faint);
    letter-spacing:0.01em;
  }
  footer p.name{
    font-weight:600;
    color:var(--ink-dim);
    margin-bottom:4px;
  }
  footer p.legal-links{
    margin-top:8px;
  }
  footer p.legal-links a{
    color:var(--ink-faint);
    text-decoration:underline;
  }

  @media (max-width:480px){
    .features{grid-template-columns:1fr;}
  }


/* ===== Floating side navigation ===== */
@media (min-width:769px){
  body{padding-left:200px;}
}
@media (max-width:768px){
  body{padding-top:104px;}
}

.side-nav{
  position:fixed;
  top:50%;
  left:24px;
  transform:translateY(-50%);
  z-index:50;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:10px;
  border-radius:16px;
  background:rgba(60,40,15,0.06);
  border:1px solid var(--line);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 12px 30px rgba(80,55,25,0.25);
}
.side-nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:10px;
  color:var(--ink-dim);
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  transition:background .15s ease, color .15s ease;
}
.side-nav a svg{width:18px;height:18px;flex-shrink:0;}
.side-nav a:hover{background:rgba(60,40,15,0.10);color:var(--ink);}
.side-nav a.active{background:rgba(217,85,138,0.14);color:var(--teal-400);}

@media (max-width:768px){
  .side-nav{
    top:16px;
    left:50%;
    transform:translateX(-50%);
    flex-direction:row;
    gap:6px;
  }
  .side-nav a span{display:none;}
  .side-nav a{padding:10px 12px;}
}

/* ===== Profile page ===== */
.wrap--wide{max-width:720px;}

.profile-card{
  width:100%;
  text-align:left;
  padding:28px;
  border-radius:18px;
  background:rgba(60,40,15,0.05);
  border:1px solid var(--line);
  margin-bottom:24px;
}
.profile-head{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:22px;
  flex-wrap:wrap;
}
.profile-info{
  flex:1;
  min-width:0;
}
.avatar{
  width:56px;
  height:56px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--blue-500), var(--teal-400));
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:18px;
  color:var(--navy-950);
  flex-shrink:0;
}
.profile-head h2{
  font-size:18px;
  font-weight:700;
  color:var(--ink);
  margin-bottom:4px;
}
.profile-head p{
  font-size:13px;
  color:var(--ink-dim);
}

.stat-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:22px;
}
.stat{
  padding:16px;
  border-radius:12px;
  background:rgba(60,40,15,0.045);
  border:1px solid var(--line);
}
.stat .label{
  font-size:11.5px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--ink-faint);
  margin-bottom:8px;
}
.stat .value{
  font-size:20px;
  font-weight:700;
  color:var(--ink);
}
.stat .value-sub{
  font-size:11.5px;
  font-weight:600;
  color:var(--ink-faint);
  margin-top:5px;
}

/* ===== Add CPE button (replaces the old Renewal Due stat cell) ===== */
.stat--action{
  display:flex;
  align-items:center;
  justify-content:center;
}
.add-cpe-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:9px 16px;
  border-radius:10px;
  border:1px solid var(--brand);
  background:color-mix(in srgb, var(--brand) 12%, transparent);
  color:var(--brand);
  font-size:13px;
  font-weight:700;
  font-family:inherit;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s ease, filter .15s ease;
}
.add-cpe-btn:hover{
  background:color-mix(in srgb, var(--brand) 22%, transparent);
}
.add-cpe-btn:focus-visible{
  outline:2px solid var(--brand);
  outline-offset:2px;
}

.progress-track{
  width:100%;
  height:8px;
  border-radius:999px;
  background:rgba(60,40,15,0.12);
  overflow:hidden;
  margin-bottom:8px;
}
.progress-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--blue-400), var(--teal-400));
}
.progress-label{
  font-size:12px;
  color:var(--ink-dim);
}

.note-banner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-radius:12px;
  background:rgba(90,144,186,0.08);
  border:1px solid rgba(90,144,186,0.25);
  font-size:12.5px;
  color:var(--ink-dim);
  max-width:720px;
  width:100%;
}
.note-banner svg{width:16px;height:16px;color:var(--blue-400);flex-shrink:0;}

@media (max-width:600px){
  .stat-grid{grid-template-columns:1fr;}
}


/* ===== Profile: per-body certification sections ===== */
.group-label{
  align-self:flex-start;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--ink-faint);
  margin:8px 0 14px;
}

.cert-header{
  margin-bottom:20px;
}
.cert-body-badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(217,85,138,0.12);
  border:1px solid rgba(217,85,138,0.3);
  color:var(--teal-400);
  font-size:11px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-bottom:10px;
}
.cert-header h2{
  font-size:16px;
  font-weight:700;
  color:var(--ink);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* ===== Profile: one cert card per row ===== */
.cert-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  width:100%;
  margin-bottom:24px;
}
.cert-grid .profile-card{
  margin-bottom:0;
}

/* ===== Profile: 4 stats per card (Awarded, Credits, Cycle, Renewal) ===== */
.stat-grid{
  grid-template-columns:repeat(2, 1fr);
}

/* ===== Stat label/value: match font size ===== */
.stat .label{
  font-size:13px;
}
.stat .value{
  font-size:13px;
}

/* ===== Mobile hardening ===== */
h1{
  overflow-wrap:anywhere;
  word-break:break-word;
  hyphens:auto;
}

@media (max-width:380px){
  h1{font-size:1.9rem;}
}

/* Ensure stat grid actually collapses to one column on small/mobile card widths
   (overrides the 2-column rule above at narrower widths) */
@media (max-width:700px){
  .stat-grid{grid-template-columns:1fr;}
}

/* Slightly earlier collapse for the 3-up feature row on smaller phones/phablets */
@media (max-width:560px){
  .features{grid-template-columns:1fr;}
}


/* ===== Per-body login button ===== */
.cert-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.cert-title-group{
  display:flex;
  flex-direction:column;
  flex:1;
  min-width:0;
}
.cert-login-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  border-radius:10px;
  background:rgba(60,40,15,0.06);
  border:1px solid var(--line);
  color:var(--ink-dim);
  font-size:12.5px;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
  flex-shrink:0;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.cert-login-btn svg{width:14px;height:14px;flex-shrink:0;}
.cert-login-btn:hover{
  background:rgba(217,85,138,0.12);
  color:var(--teal-400);
  border-color:rgba(217,85,138,0.35);
}

/* ===== Per-body brand accent (title / badge / progress take the org's own logo color) ===== */
.cert-section{
  --brand: var(--teal-400);
}
.cert-header h2{
  color:var(--brand);
}
.cert-section .cert-body-badge{
  background:color-mix(in srgb, var(--brand) 16%, transparent);
  border-color:color-mix(in srgb, var(--brand) 45%, transparent);
  color:var(--brand);
}
.cert-section .progress-fill{
  background:linear-gradient(90deg, color-mix(in srgb, var(--brand) 70%, white 10%), var(--brand));
}
.cert-section .cert-login-btn:hover{
  background:color-mix(in srgb, var(--brand) 14%, transparent);
  border-color:color-mix(in srgb, var(--brand) 40%, transparent);
  color:var(--brand);
}

/* ===== Email login button + modal ===== */
.email-login-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 14px;
  border-radius:10px;
  background:rgba(60,40,15,0.06);
  border:1px solid var(--line);
  color:var(--ink-dim);
  font-size:12.5px;
  font-weight:600;
  font-family:inherit;
  cursor:pointer;
  white-space:nowrap;
  flex-shrink:0;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.email-login-btn svg{width:15px;height:15px;flex-shrink:0;}
.email-login-btn:hover{
  background:color-mix(in srgb, var(--teal-400) 14%, transparent);
  color:var(--teal-400);
  border-color:color-mix(in srgb, var(--teal-400) 40%, transparent);
}

.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(40,25,10,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:100;
}
.modal-overlay[hidden]{display:none;}

.modal-box{
  width:100%;
  max-width:360px;
  background:var(--navy-950);
  border:1px solid var(--line);
  border-radius:16px;
  padding:24px;
  box-shadow:0 20px 50px rgba(40,25,10,0.3);
  text-align:left;
}
.modal-box h3{
  font-size:16px;
  font-weight:700;
  color:var(--ink);
  margin-bottom:6px;
}
.modal-desc{
  font-size:12.5px;
  color:var(--ink-faint);
  line-height:1.5;
  margin-bottom:18px;
}
.modal-box label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:var(--ink-dim);
  margin-bottom:14px;
}
.modal-box input{
  display:block;
  width:100%;
  margin-top:6px;
  padding:9px 12px;
  border-radius:9px;
  border:1px solid var(--line);
  background:rgba(60,40,15,0.04);
  color:var(--ink);
  font-size:13.5px;
  font-family:inherit;
}
.modal-box input:focus{
  outline:none;
  border-color:var(--teal-400);
}
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:8px;
}
.modal-cancel,
.modal-submit{
  padding:8px 16px;
  border-radius:9px;
  font-size:13px;
  font-weight:600;
  font-family:inherit;
  cursor:pointer;
  border:1px solid var(--line);
}
.modal-cancel{
  background:transparent;
  color:var(--ink-dim);
}
.modal-cancel:hover{background:rgba(60,40,15,0.06);}
.modal-submit{
  background:var(--teal-400);
  color:var(--navy-950);
  border-color:var(--teal-400);
}
.modal-submit:hover{filter:brightness(1.08);}

/* CorporateCloudOnline logo (cloud + Japanese castle) - theme-adaptive fills */
.mark-cloud{fill:var(--teal-400);}
.mark-castle{fill:var(--navy-950);}

/* ===== Per-body brand color classes (replaces inline style="--brand:..."
   so no inline style attributes are needed - keeps the page's CSP strict) ===== */
.cert-section--isaca{--brand:#1d2d5c;}
.cert-section--isc2{--brand:#468145;}
.cert-section--cwnp{--brand:#f97316;}
.cert-section--comptia{--brand:#7c3aed;}

/* ===== Fixed progress percentages (replaces inline style="width:...%") ===== */
.pct-70{width:70%;}
.pct-75{width:75%;}
.pct-76{width:76%;}
.pct-80{width:80%;}

/* ===== Sign-in area: email button + Google button stacked, or a single Sign out button ===== */
.profile-auth{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  flex-shrink:0;
}
.google-signin-slot{
  min-height:40px;
  min-width:180px;
}
#signout-btn{
  flex-shrink:0;
}

/* ===== Legal pages (Privacy Policy / Terms of Service) ===== */
.legal-content{
  text-align:left;
  width:100%;
  max-width:640px;
  margin:8px auto 32px;
}
.legal-content h2{
  font-size:1.05rem;
  font-weight:700;
  color:var(--ink);
  margin:28px 0 10px;
}
.legal-content h2:first-of-type{
  margin-top:8px;
}
.legal-content p{
  font-size:15px;
  line-height:1.7;
  color:var(--ink-dim);
  margin-bottom:14px;
}
.legal-content ul{
  margin:0 0 14px 20px;
  padding:0;
}
.legal-content li{
  font-size:15px;
  line-height:1.7;
  color:var(--ink-dim);
  margin-bottom:8px;
}
.legal-content a{
  color:var(--blue-500);
  text-decoration:underline;
}
.legal-content strong{
  color:var(--ink);
}
