/* Hazırlıklı V3.0.5 — P0 Contrast Hardening
   Last-in-cascade safety net for readable charcoal surfaces and Mineral Cyan actions. */

html,body{
  background:var(--background)!important;
  color:var(--text-primary)!important;
  color-scheme:dark!important;
}
body{opacity:1!important;filter:none!important}

/* Absolute readability floor. */
body :is(h1,h2,h3,h4,h5,h6,strong,b,label,legend,button,a){color:var(--text-primary)}
body :is(p,small,.muted,.help,.subtitle,.description){color:var(--text-secondary)}
body :is(input,textarea,select){color:var(--text-primary)!important;-webkit-text-fill-color:var(--text-primary)!important}
body :is(input,textarea)::placeholder{color:var(--text-tertiary)!important;-webkit-text-fill-color:var(--text-tertiary)!important;opacity:1!important}

/* Charcoal body / separated surfaces. */
.hzv3-app,.hzv3-main{background:var(--background)!important;color:var(--text-primary)!important}
.hzv3-header,.hzv3-tabbar{
  background:var(--surface)!important;
  border-color:var(--border)!important;
  color:var(--text-primary)!important;
}
.hzv3-card,.hzv3-memory,.hzv3-problem,.hzv3-solution,.hzv3-history-item,.hzv3-setting-row,
.hzv3-plan-card,.hzv3-expert-item,.hzv3-create-tile,.hzv3-create-lead,.hzv3-input-card,
.hzv3-memory-row,.hzv3-summary-chip,.hzv3-ready,.hzv3-accordion details,.hzv3-asset,
.hzv3-experts-door,.hzv3-magic-card,.hzv3-toast{
  background:var(--surface-elevated)!important;
  border-color:var(--border)!important;
  color:var(--text-primary)!important;
  box-shadow:var(--shadow-soft)!important;
}

/* Headings and primary copy must never inherit a dark utility color. */
.hzv3-header-title,.hzv3-hero h2,.hzv3-section-title h2,.hzv3-card-head h3,.hzv3-problem h3,
.hzv3-memory-title,.hzv3-solution strong,.hzv3-create-tile strong,.hzv3-history-item strong,
.hzv3-setting-row strong,.hzv3-plan-top h3,.hzv3-expert-item strong,.hzv3-result-head h2,
.hzv3-acc-title strong,.hzv3-empty strong,.hzv3-profile-card strong{
  color:var(--text-primary)!important;
  -webkit-text-fill-color:var(--text-primary)!important;
}
.hzv3-hero p,.hzv3-section-title p,.hzv3-card-head p,.hzv3-problem p,.hzv3-memory-sub,
.hzv3-solution small,.hzv3-create-tile small,.hzv3-history-item small,.hzv3-setting-row small,
.hzv3-plan-desc,.hzv3-plan-feature,.hzv3-expert-item small,.hzv3-result-head p,.hzv3-acc-title small{
  color:var(--text-secondary)!important;
  -webkit-text-fill-color:var(--text-secondary)!important;
}

/* Inputs: readable even under browser/theme transformations. */
.hzv3-textarea,.hzv3-search,.hzv3-create-lead input,
input,textarea,select,.input,.field,.title-input,.project-select,.editor-area{
  background:var(--input-bg)!important;
  color:var(--text-primary)!important;
  -webkit-text-fill-color:var(--text-primary)!important;
  border-color:var(--border-strong)!important;
}
.hzv3-textarea:focus,.hzv3-search:focus,.hzv3-create-lead input:focus,
input:focus,textarea:focus,select:focus,.input:focus,.field:focus,.title-input:focus,.editor-area:focus{
  border-color:var(--accent-border)!important;
  box-shadow:var(--focus-ring)!important;
  outline:none!important;
}

/* Mineral Cyan = action/focus/signature only. */
.hzv3-kicker,.hzv3-header-eyebrow,.hzv3-card-link,.hzv3-create-lead label,
.hzv3-chevron,.hzv3-plan-price,.hzv3-progress-row span,.hzv3-tab.is-active,
.hzv3-tab-create,.hzv3-tab.is-active .hzv3-tab-icon,.hzv3-setting-row .ico,
.hzv3-history-item .icon,.hzv3-expert-item .icon,.hzv3-solution-icon,.hzv3-acc-icon{
  color:var(--accent-strong)!important;
  -webkit-text-fill-color:var(--accent-strong)!important;
}

.hzv3-lang,.hz-language-toggle,.hzv3-plan-tabs{
  background:var(--surface-elevated)!important;
  border-color:var(--border-strong)!important;
}
.hzv3-lang button,.hz-language-toggle button,.hzv3-plan-tab{
  color:var(--text-secondary)!important;
  -webkit-text-fill-color:var(--text-secondary)!important;
  background:transparent!important;
}
.hzv3-lang button.is-active,.hz-language-toggle button.is-active,.hzv3-plan-tab.is-active,
.hzv3-choice.is-active,.hzv3-approach-tab.is-active{
  color:var(--accent-strong)!important;
  -webkit-text-fill-color:var(--accent-strong)!important;
  background:var(--accent-10)!important;
  border-color:var(--accent-border)!important;
  box-shadow:inset 0 0 0 1px var(--accent-16)!important;
}

/* Primary actions are visually undeniable. */
.hzv3-primary,.hzv3-action.primary,.hzv3-create-orb,
.btn-primary,.primary-btn,.button.primary,.bg-cyan-400,.bg-cyan-500{
  background:var(--accent-gradient)!important;
  color:var(--on-accent)!important;
  -webkit-text-fill-color:var(--on-accent)!important;
  border-color:transparent!important;
  opacity:1!important;
  box-shadow:0 10px 26px var(--accent-16),inset 0 1px 0 var(--accent-28)!important;
}
.hzv3-primary[disabled],.btn-primary:disabled,.primary-btn:disabled,.button.primary:disabled{
  opacity:.72!important;
}
.hzv3-create-orb{
  width:60px!important;
  height:60px!important;
  border-radius:20px!important;
  font-size:35px!important;
  font-weight:650!important;
  border:1px solid var(--accent-border)!important;
}

/* Secondary actions remain visible, never black holes. */
.hzv3-secondary,.hzv3-ghost,.hzv3-experts-door,.hzv3-action:not(.primary),
.btn-secondary,.secondary-btn,.button:not(.primary),.hzv3-profile-signout{
  background:var(--surface-elevated)!important;
  color:var(--text-primary)!important;
  -webkit-text-fill-color:var(--text-primary)!important;
  border-color:var(--border-strong)!important;
}

/* Bottom nav: clear hierarchy and bright create affordance. */
.hzv3-tab{
  color:var(--text-tertiary)!important;
  -webkit-text-fill-color:var(--text-tertiary)!important;
}
.hzv3-tab.is-active{
  color:var(--accent-strong)!important;
  -webkit-text-fill-color:var(--accent-strong)!important;
}
.hzv3-tab.is-active:not(.hzv3-tab-create)::before{
  background:var(--accent-08)!important;
  border-color:var(--accent-border)!important;
}

/* Cards never merge into the page background. */
.hzv3-memory,.hzv3-problem,.hzv3-solution,.hzv3-history-item,.hzv3-setting-row,
.hzv3-plan-card,.hzv3-experts-door,.hzv3-create-tile,.hzv3-input-card{
  outline:1px solid transparent;
}
.hzv3-progress{background:var(--surface-soft)!important}
.hzv3-progress i{background:var(--accent-gradient)!important}
.hzv3-memory::after{background:var(--accent-06)!important}

/* Pro is prestigious, not promo-blue. */
.hzv3-plan-card.is-featured,#card-pro,.hz-mobile-plan-card-pro{
  background:var(--surface-elevated)!important;
  border-color:var(--accent-border)!important;
  box-shadow:0 18px 46px var(--overlay)!important;
}

/* Legacy mobile surfaces get the same contrast floor. */
.card,.glass,.setting-card,.price-card,.notice,.panel,.top-shell,.topbar,.hz-native-header,.hz-app-tabbar,.mobile-tabs{
  background:var(--surface)!important;
  color:var(--text-primary)!important;
  border-color:var(--border)!important;
}
.text-slate-950,.text-slate-900,.text-slate-800,.text-gray-950,.text-gray-900,.text-gray-800,
.text-black,.text-zinc-950,.text-zinc-900{
  color:var(--text-primary)!important;
  -webkit-text-fill-color:var(--text-primary)!important;
}
.text-slate-400,.text-slate-500,.text-gray-400,.text-gray-500,.text-zinc-400,.text-zinc-500{
  color:var(--text-secondary)!important;
  -webkit-text-fill-color:var(--text-secondary)!important;
}
.text-cyan-300,.text-cyan-400,.text-cyan-500,.hover\:text-cyan-300:hover,.hover\:text-cyan-400:hover{
  color:var(--accent-strong)!important;
  -webkit-text-fill-color:var(--accent-strong)!important;
}

/* Never let a stale native-shell boot shield cover the V3 app after render. */
html.hz-native-shell-boot body:has(.hzv3-app)::before{display:none!important}

/* =====================================================================
   V3.0.5 R2 — MOBILE ALIGNMENT / AUTH / TABBAR CONTRACT
   One mobile gutter, keyboard-safe auth flow, deterministic bottom nav.
===================================================================== */
@media (max-width:767px){
  :root{
    --hz-mobile-gutter:16px;
    --hz-mobile-content-max:620px;
  }

  /* 1) ONE CONTENT EDGE — all native product screens share the same gutter. */
  body.hz-native-shell > .hz-native-header{
    padding-left:max(var(--hz-mobile-gutter),var(--hz-safe-left))!important;
    padding-right:max(var(--hz-mobile-gutter),var(--hz-safe-right))!important;
  }

  body.hz-native-shell.hz-page-dashboard main#home,
  body.hz-native-shell.hz-page-history > main.hz-native-content-root,
  body.hz-native-shell.hz-page-settings main.hz-app-shell-scroll,
  body.hz-native-shell.hz-page-tool main.hz-app-shell-scroll,
  body.hz-native-shell.hz-page-premium > main.hz-native-content-root,
  body.hz-native-shell.hz-page-billing > main.hz-native-content-root,
  body.hz-native-shell.hz-page-brand-profiles > main.hz-native-content-root{
    width:100%!important;
    max-width:var(--hz-mobile-content-max)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:var(--hz-mobile-gutter)!important;
    padding-right:var(--hz-mobile-gutter)!important;
  }

  body.hz-native-shell.hz-page-dashboard[data-hz-dashboard-view="solutions"] main#home>#solutions,
  body.hz-native-shell.hz-page-dashboard[data-hz-dashboard-view="home"] main#home>#solutions{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* 2) AUTH — safe centering without negative top overflow on tall forms. */
  body.hz-auth-page,
  body.hz-page-login,
  body.hz-page-signup,
  body.hz-page-forgot-password{
    min-height:100dvh!important;
    height:auto!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    padding:0!important;
    scroll-padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
  }
  body.hz-auth-page > .relative.z-10,
  body.hz-page-login > .relative.z-10,
  body.hz-page-signup > .relative.z-10,
  body.hz-page-forgot-password > .relative.z-10{
    min-height:100dvh!important;
    height:auto!important;
    max-height:none!important;
    display:block!important;
  }
  body.hz-auth-page > .relative.z-10 > section.hz-auth-flow,
  body.hz-page-login > .relative.z-10 > section.hz-auth-flow,
  body.hz-page-signup > .relative.z-10 > section.hz-auth-flow,
  body.hz-page-forgot-password > .relative.z-10 > section.hz-auth-flow{
    width:100%!important;
    min-height:100dvh!important;
    height:auto!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    padding-top:max(16px,env(safe-area-inset-top,0px))!important;
    padding-right:var(--hz-mobile-gutter)!important;
    padding-bottom:calc(32px + env(safe-area-inset-bottom,0px))!important;
    padding-left:var(--hz-mobile-gutter)!important;
  }
  body.hz-auth-page > .relative.z-10 > section.hz-auth-flow > .w-full.max-w-lg,
  body.hz-page-login > .relative.z-10 > section.hz-auth-flow > .w-full.max-w-lg,
  body.hz-page-signup > .relative.z-10 > section.hz-auth-flow > .w-full.max-w-lg,
  body.hz-page-forgot-password > .relative.z-10 > section.hz-auth-flow > .w-full.max-w-lg{
    width:100%!important;
    max-width:520px!important;
    min-width:0!important;
    margin-top:0!important;
    margin-bottom:0!important;
  }
  body.hz-auth-page [data-language-switcher],
  body.hz-auth-page .hz-language-toggle,
  body.hz-page-login [data-language-switcher],body.hz-page-login .hz-language-toggle,
  body.hz-page-signup [data-language-switcher],body.hz-page-signup .hz-language-toggle,
  body.hz-page-forgot-password [data-language-switcher],body.hz-page-forgot-password .hz-language-toggle{
    max-width:100%!important;
  }
  body.hz-auth-page form,body.hz-auth-page form > *,
  body.hz-page-login form,body.hz-page-login form > *,
  body.hz-page-signup form,body.hz-page-signup form > *,
  body.hz-page-forgot-password form,body.hz-page-forgot-password form > *{
    min-width:0!important;
    max-width:100%!important;
  }
  body.hz-auth-page form button[type="submit"],
  body.hz-page-login form button[type="submit"],
  body.hz-page-signup form button[type="submit"],
  body.hz-page-forgot-password form button[type="submit"]{
    position:static!important;
    inset:auto!important;
    width:100%!important;
    min-height:54px!important;
    margin-top:14px!important;
    transform:none!important;
  }
  body.hz-auth-page.hz-keyboard-open > .relative.z-10 > section.hz-auth-flow > .w-full.max-w-lg{
    margin-top:0!important;
    margin-bottom:0!important;
  }
  body.hz-auth-page.hz-keyboard-open > .relative.z-10 > section.hz-auth-flow{
    padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
  }

  /* 3) TABBAR — icon/label paint is owned here, never by page-local CSS. */
  body.hz-native-shell .hz-app-tabbar{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:500!important;
    width:100%!important;
    min-width:0!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    overflow:visible!important;
    isolation:isolate!important;
  }
  body.hz-native-shell .hz-app-tab{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    min-width:0!important;
    color:var(--text-tertiary)!important;
    -webkit-text-fill-color:var(--text-tertiary)!important;
  }
  body.hz-native-shell .hz-app-tab .hz-app-tab-icon,
  body.hz-native-shell .hz-app-tab .hz-app-tab-label{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    color:inherit!important;
    -webkit-text-fill-color:currentColor!important;
    fill:currentColor!important;
    stroke:currentColor!important;
  }
  body.hz-native-shell .hz-app-tab.is-active{
    color:var(--accent-strong)!important;
    -webkit-text-fill-color:var(--accent-strong)!important;
    background:var(--accent-08)!important;
    border:1px solid var(--accent-border)!important;
    box-shadow:inset 0 0 0 1px var(--accent-10)!important;
  }
  body.hz-native-shell .hz-app-tab-create{
    background:transparent!important;
    border-color:transparent!important;
    box-shadow:none!important;
  }
  body.hz-native-shell .hz-app-tab-create .hz-app-tab-icon{
    display:grid!important;
    place-items:center!important;
    background:var(--accent-gradient)!important;
    color:var(--on-accent)!important;
    -webkit-text-fill-color:var(--on-accent)!important;
    border:1px solid var(--accent-border)!important;
    box-shadow:0 10px 24px var(--accent-16),inset 0 1px 0 var(--accent-28)!important;
  }
  body.hz-native-shell .hz-app-tab-create .hz-app-tab-label{
    color:var(--accent-strong)!important;
    -webkit-text-fill-color:var(--accent-strong)!important;
  }
}

@media (max-width:360px){
  :root{--hz-mobile-gutter:14px}
}


/* ============================================================
   V3.0.5 R4.1.1 — LAUNCH-CRITICAL MOBILE AUTH POLISH
   Account creation must expose CTA + login return in the first
   closed-keyboard viewport; Settings recovery never shows a
   public "login" dead-end. Loaded last to win old auth cascades.
============================================================ */
@media (max-width:767px){
  .hz-turnstile-disabled{display:none!important;min-height:0!important;margin:0!important;padding:0!important}
  body.hz-settings-recovery .hz-public-auth-return,
  body.hz-settings-recovery #publicAuthReturn{display:none!important}
  body.hz-settings-recovery .hz-settings-recovery-back.hidden{display:inline-flex!important}

  body.hz-page-signup > .relative.z-10 > section.hz-auth-flow{
    min-height:100dvh!important;
    justify-content:flex-start!important;
    padding:8px 18px max(12px,env(safe-area-inset-bottom,0px))!important;
  }
  body.hz-page-signup > .relative.z-10 > section.hz-auth-flow > .w-full.max-w-lg{
    margin:0 auto!important;
    padding:0!important;
  }
  body.hz-page-signup [data-language-switcher]{margin:0 0 2px!important}
  body.hz-page-signup a.lg\:hidden.flex.items-center{margin:0 0 8px!important}
  body.hz-page-signup a.lg\:hidden .w-11{width:36px!important;height:36px!important}
  body.hz-page-signup h2{font-size:1.78rem!important;line-height:1.02!important;margin-top:4px!important}
  body.hz-page-signup h2 + p{margin-top:5px!important;font-size:.8rem!important;line-height:1.26!important}
  body.hz-page-signup form{margin-top:7px!important}
  body.hz-page-signup form.space-y-5 > :not([hidden]) ~ :not([hidden]){margin-top:6px!important}
  body.hz-page-signup label{margin-bottom:4px!important}
  body.hz-page-signup .input{min-height:45px!important;padding:9px 12px!important}
  body.hz-page-signup #password + p{display:none!important}
  body.hz-page-signup label.flex.items-start{gap:7px!important;font-size:.72rem!important;line-height:1.2!important}
  body.hz-page-signup label.flex.items-start .block.text-xs{margin-top:2px!important;font-size:.68rem!important}
  body.hz-page-signup form button[type="submit"]{min-height:48px!important;margin-top:7px!important;padding-top:10px!important;padding-bottom:10px!important}
  body.hz-page-signup form + .h-px{margin:7px 0!important}
  body.hz-page-signup form + .h-px + p{font-size:.78rem!important;line-height:1.2!important;padding-bottom:max(2px,env(safe-area-inset-bottom,0px))!important}
}
@media (max-width:767px) and (max-height:720px){
  body.hz-page-signup h2 + p{display:none!important}
  body.hz-page-signup a.lg\:hidden.flex.items-center{margin-bottom:6px!important}
  body.hz-page-signup form{margin-top:6px!important}
  body.hz-page-signup .input{min-height:43px!important}
  body.hz-page-signup label.flex.items-start{font-size:.69rem!important}
}
