:root{
  --bg0:#f6f7fb; --bg1:#eef2f8;
  --text:#0f172a; --muted:#55657a;
  --border:#d6dee9;
  --accent:#0f6fff; --accentAlt:#11b3a6; --accentSoft:rgba(15,111,255,.14);
  --card:#ffffff;
  --shadow:0 18px 44px rgba(15,23,42,.12);
  --r:18px; --r2:24px;
  --max:1120px;
  --navh:72px;
  --nav-offset: 108px;
}

*{ box-sizing:border-box; }

/* Safety net: no horizontal scrollbars */
html, body { overflow-x: hidden; }
html { scroll-behavior:smooth; scroll-padding-top: var(--nav-offset); }

body{
  margin:0;
  padding-top: var(--nav-offset);
  min-height:100vh;
  color:var(--text);
  font-family:"Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 520px at 12% 20%, rgba(15,111,255,.10), transparent 60%),
    radial-gradient(900px 520px at 88% 78%, rgba(17,179,166,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a{ color:inherit; text-decoration:none; }

a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 3px solid rgba(15,111,255,.45);
  outline-offset: 3px;
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ transition:none !important; animation:none !important; }
}

.layout{
  max-width:var(--max);
  margin:0 auto;
  padding:0 20px;
}

.page-shell{
  min-height:100vh;
  position:relative;
}

/* ---------------------------
   Decorative orbs (never affect layout width)
---------------------------- */
.orb, .orb2, .orb3{
  position:absolute;
  border-radius:999px;
  pointer-events:none;
}

.orb{
  left:0; bottom:0;
  width:520px; height:520px;
  transform: translate(-45%, 45%);
  background:radial-gradient(circle at 30% 30%, rgba(15,111,255,.18), rgba(15,111,255,.05) 55%, transparent 72%);
  opacity:.9;
}

.orb2{
  right:0; top:0;
  width:560px; height:560px;
  transform: translate(45%, -45%);
  background:radial-gradient(circle at 40% 40%, rgba(17,179,166,.20), rgba(17,179,166,.05) 55%, transparent 74%);
  opacity:.9;
}

.orb3{
  left:55%; top:42%;
  width:420px; height:420px;
  transform: translate(-50%, -50%);
  background:radial-gradient(circle at 40% 35%, rgba(14,116,144,.12), rgba(14,116,144,.04) 55%, transparent 74%);
  opacity:.55;
}

/* ---------------------------
   Nav
---------------------------- */
.nav{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:90;
  width:100%;
  padding: 6px 0;
}

.nav-inner{
  /* Default height, but allow wrap on smaller screens */
  min-height:var(--navh);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap: wrap; /* KEY: prevents overflow */
  padding: 10px 40px;
  margin:0 auto;
  width:100%;
  max-width: calc(var(--max) - 40px);
  border-radius: var(--r2);
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(255,255,255,.95), rgba(255,255,255,.86));
  border: 1px solid rgba(214,222,233,.8);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;

  /* KEY: allow shrinking so it doesn't force overflow */
  min-width: 0;
  flex: 1 1 auto;
}

.logo-mark{
  width:36px;
  height:36px;
  border-radius:12px;
  background:linear-gradient(135deg, rgba(15,111,255,.18), rgba(17,179,166,.14));
  border:1px solid rgba(15,23,42,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex: 0 0 auto;
}

.logo-mark img{
  width:24px;
  height:24px;
  display:block;
  filter: drop-shadow(0 6px 12px rgba(15,23,42,.18));
}

.logo-text-main{
  font-weight:800;
  letter-spacing:.2px;
}

.logo-text-sub{
  font-size:.82rem;
  color:rgba(85,101,122,.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(52vw, 420px);
}

.nav-links{
  display:flex;
  align-items:center;
  gap:18px;
  color:rgba(15,23,42,.68);
  font-size:.92rem;
  flex: 0 0 auto;
}

.nav-links a:hover{ color:rgba(15,23,42,.92); }

.nav-cta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap; /* KEY: prevents overflow */
  justify-content:flex-end;
  flex: 0 0 auto;
}

.nav-badge{
  display:flex;
  align-items:center;
  flex: 0 0 auto;
}

.nav-badge img{
  height:36px;
  width:auto;
  display:block;
}

/* Pills / buttons */
.pill{
  border-radius:999px;
  border:1px solid rgba(214,222,233,.9);
  background: rgba(248,250,252,.9);
  padding:6px 10px;
  color:rgba(15,23,42,.72);
  font-size:.78rem;
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  max-width: 100%;
}

.dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:rgba(15,111,255,.9);
  box-shadow:0 0 0 4px rgba(15,111,255,.16);
  flex: 0 0 auto;
}

.btn{
  min-height:44px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid rgba(214,222,233,.9);
  background: rgba(255,255,255,.92);
  color:rgba(15,23,42,.92);
  font-weight:700;
  font-size:.92rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  transition: transform .10s ease, background .15s ease, border-color .15s ease;
  white-space:nowrap;
  max-width: 100%;
}

.btn:hover{
  background: rgba(245,247,251,.98);
  transform: translateY(-1px);
}

.btn.primary{
  border-color: rgba(15,111,255,.55);
  background: linear-gradient(135deg, rgba(15,111,255,.95), rgba(17,179,166,.95));
  color: #fff;
}

.btn.primary:hover{
  background: linear-gradient(135deg, rgba(15,111,255,1), rgba(17,179,166,1));
}

.btn.linklike{
  border-color: transparent;
  background: transparent;
  color: rgba(15,111,255,.95);
  padding: 10px 8px;
  min-height: 38px;
  white-space: normal; /* allow wrap on narrow screens */
}

.btn.linklike:hover{
  background: rgba(15,111,255,.08);
  transform:none;
}

/* ---------------------------
   Hero / Cards / Typography
---------------------------- */
.hero{ padding: 82px 0 54px; }

.hero-inner{
  display:grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 22px;
  align-items: stretch;
}

@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; gap:16px; }
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  min-width: 0; /* KEY: prevents grid overflow */
}

.hero-left,
.hero-right{
  padding: 26px;
  height:100%;
}

.hero-right{
  padding: 16px;
  display:flex;
  flex-direction:column;
  border: 1px solid rgba(15,111,255,.22);
  box-shadow: 0 22px 50px rgba(15,111,255,.12);
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(214,222,233,.8);
  background: rgba(248,250,252,.9);
  color: rgba(15,23,42,.72);
  font-size: .82rem;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.badge{
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(15,111,255,.10);
  border: 1px solid rgba(15,111,255,.35);
  color: rgba(15,111,255,.95);
  font-size: .72rem;
  font-weight:700;
  letter-spacing:.02em;
}

h1{
  margin: 0 0 12px;
  font-size: clamp(2.2rem, 3vw + 1.1rem, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-family: "Source Serif 4", "Times New Roman", serif;
}

.grad{
  background: linear-gradient(135deg, rgba(15,111,255,.98), rgba(17,179,166,.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead{
  margin:0 0 18px;
  color: rgba(85,101,122,.9);
  line-height:1.75;
  max-width:66ch;
}

.cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:6px;
}

.secondary-inline{
  color: rgba(85,101,122,.85);
  font-size:.92rem;
}

.tiny-link{
  color: rgba(15,111,255,.95);
}

.tiny-link:hover{
  text-decoration: underline;
}

.meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  color: rgba(85,101,122,.82);
  font-size: .86rem;
  margin-top: 14px;
}

.meta-row span{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.m-dot{
  width:6px;
  height:6px;
  border-radius:999px;
  background: rgba(15,111,255,.9);
  flex: 0 0 auto;
}

/* ---------------------------
   Panel / Forms
---------------------------- */
.auth-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 10px 12px 6px;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-title{
  font-weight:800;
  letter-spacing:.2px;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.auth-sub{
  font-size:.82rem;
  color: rgba(85,101,122,.8);
}

.auth-body{ padding: 12px; }

.auth-step{
  font-size:.78rem;
  color: rgba(85,101,122,.85);
  letter-spacing:.04em;
  text-transform: uppercase;
  margin: 4px 0 10px;
}

.field{ margin: 0 0 12px; }

label{
  display:block;
  font-size:13px;
  color: rgba(85,101,122,.9);
  margin:0 0 6px;
}

select,
.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(214,222,233,.9);
  background: rgba(248,250,252,.95);
  color: var(--text);
  outline: none;
  min-width: 0;
  font: inherit;
}

input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(214,222,233,.9);
  background: rgba(248,250,252,.95);
  color: var(--text);
  outline: none;
  min-width: 0;
}

input:focus{
  border-color: rgba(15,111,255,.55);
  box-shadow: 0 0 0 4px rgba(15,111,255,.14);
}

select:focus,
.input:focus{
  border-color: rgba(15,111,255,.55);
  box-shadow: 0 0 0 4px rgba(15,111,255,.14);
}

.hint{
  margin-top: 8px;
  color: rgba(85,101,122,.75);
  font-size:.84rem;
  line-height:1.45;
}

.auth-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin-top: 6px;
}

.status{
  margin-top: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(214,222,233,.9);
  background: rgba(248,250,252,.98);
  color: rgba(85,101,122,.9);
  display:none;
}

.status.show{ display:block; }

.status.error{
  border-color: rgba(248,113,113,.45);
  background: rgba(254,242,242,.95);
  color: #991b1b;
}

.fineprint{
  margin-top: 12px;
  color: rgba(85,101,122,.75);
  font-size:.82rem;
  line-height:1.5;
}

.fine{
  margin-top: 12px;
  color: rgba(85,101,122,.75);
  font-size:.82rem;
  line-height:1.5;
}

/* ---------------------------
   Sections
---------------------------- */
section{ padding: 54px 0; }

.section-header{
  max-width: 760px;
  margin-bottom: 24px;
}

.kicker{
  font-size:.85rem;
  letter-spacing:.16em;
  text-transform: uppercase;
  color: rgba(15,111,255,.95);
  margin-bottom:8px;
}

h2{
  margin:0 0 8px;
  font-size: 1.9rem;
  letter-spacing:-.02em;
  font-family: "Source Serif 4", "Times New Roman", serif;
}

.sub{
  margin:0;
  color: rgba(85,101,122,.9);
  line-height:1.75;
}

.muted{
  color: var(--muted);
}

.grid3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

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

.mini{
  padding: 16px;
  border-radius: var(--r);
  border: 1px solid rgba(214,222,233,.9);
  background: rgba(248,250,252,.9);
  min-width: 0;
}

.mini .t{
  font-weight:800;
  margin-bottom:6px;
}

.mini .b{
  color: rgba(85,101,122,.9);
  line-height:1.7;
  font-size:.92rem;
}

.ai-block{ padding-top:0; }

/* ---------------------------
   Footer
---------------------------- */
.footer{
  border-top: 1px solid rgba(214,222,233,.9);
  padding: 26px 0 34px;
  color: rgba(85,101,122,.75);
  font-size: .85rem;
}

.footer-inner{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.footer-links a:hover{ color: rgba(15,23,42,.9); }

/* ---------------------------
   Responsive adjustments (prevents header overflow)
---------------------------- */
@media (max-width: 860px){
  .nav-links{ display:none; }

  .logo{ flex: 1 1 100%; }
  .logo-text-sub{ max-width: 100%; }

  .nav-cta{
    width:100%;
    justify-content:flex-start;
  }

  /* allow pills/btns to wrap naturally */
  .btn, .pill{ max-width: 100%; }
  .btn{ white-space: normal; }
}
