/* Idesuss homepage visual consolidation - package 4 */

:root{
  --home-max:1180px;
  --home-gap-1:8px;
  --home-gap-2:12px;
  --home-gap-3:16px;
  --home-gap-4:24px;
  --home-gap-5:32px;
  --home-panel:#0d1c2a;
  --home-panel-raised:#102333;
  --home-panel-soft:#13283a;
  --home-line:rgba(255,255,255,.075);
  --home-text:#f3efe7;
  --home-muted:#9eafbd;
  --home-subtle:#748897;
  --home-accent:#e0a85a;
}

body{font-size:15px!important;line-height:1.5!important}
.container{width:min(var(--home-max),calc(100% - 36px))!important}

main#top{
  display:block;
  padding-bottom:12px;
}

.dashboard-intro,
.platform-modules,
.hero,
.dashboard-info-layer{
  position:relative;
}

.dashboard-intro{padding:24px 0 10px!important}
.dashboard-intro-shell{
  padding:0 0 16px!important;
  min-height:132px;
}
.platform-kicker{
  font-size:.68rem!important;
  letter-spacing:.13em!important;
  line-height:1.2!important;
}
.dashboard-intro-copy h1{
  max-width:760px;
  margin:6px 0 8px!important;
  font-size:clamp(2.25rem,4.2vw,3.65rem)!important;
  line-height:.94!important;
  letter-spacing:-.055em!important;
}
.dashboard-intro-copy p{
  max-width:680px!important;
  font-size:.92rem!important;
  line-height:1.55!important;
}

.platform-modules{padding:8px 0 14px!important}
.platform-section-head,
.dashboard-info-head{
  margin-bottom:9px!important;
}
.platform-section-head h2,
.dashboard-info-head h2{
  font-size:1rem!important;
  line-height:1.15!important;
}
.platform-section-head p,
.dashboard-info-head p{
  font-size:.72rem!important;
  color:var(--home-subtle)!important;
}

.platform-module-grid{gap:8px!important}
.platform-module-card{
  min-height:82px!important;
  padding:11px 12px!important;
  border-radius:12px!important;
  border-color:var(--home-line)!important;
  background:linear-gradient(180deg,rgba(17,36,52,.90),rgba(11,25,37,.96))!important;
}
.platform-module-icon{
  width:36px!important;
  height:36px!important;
  border-radius:9px!important;
}
.platform-module-card strong{
  font-size:.84rem!important;
  line-height:1.2!important;
}
.platform-module-card span:not(.platform-module-icon):not(.platform-module-arrow){
  color:#8fa1af!important;
  font-size:.68rem!important;
}

.hero{padding:8px 0 14px!important}
.hero-shell{
  border-radius:16px!important;
  border-color:var(--home-line)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.20)!important;
}
.hero-grid{
  padding:16px!important;
  gap:16px!important;
  grid-template-columns:.72fr 1.28fr!important;
}
.hero-copy{gap:12px!important}
.hero-brand-logo{
  width:38px!important;
  height:38px!important;
}
.hero-brand-title{
  font-size:1.42rem!important;
  line-height:1!important;
}
.hero-brand-sub{font-size:.70rem!important}
.hero-lead{
  margin-top:12px!important;
  font-size:.92rem!important;
  line-height:1.48!important;
  color:#b8c4ce!important;
}
.hero-actions{gap:7px!important}
.hero-webapp-btn,
.hero-radio-btn{
  min-height:40px!important;
  font-size:.76rem!important;
  letter-spacing:0!important;
}

.hero-miniapp{
  padding:14px!important;
  border-radius:12px!important;
}
.miniapp-title{
  font-size:.94rem!important;
  line-height:1.2!important;
}
.miniapp-subtitle{
  font-size:.72rem!important;
  line-height:1.4!important;
}
.field label{font-size:.72rem!important}
.status-pill{
  font-size:.64rem!important;
  padding:5px 8px!important;
}
.hero-bottom{padding:0 16px 12px!important}
.hero-banner{
  min-height:42px!important;
  padding:7px 9px!important;
}
.hero-banner-text{font-size:.70rem!important}

.dashboard-info-layer{padding:6px 0 20px!important}
.dashboard-info-grid{gap:8px!important}
.dashboard-info-primary .fx-card,
.dashboard-info-secondary .online-users-card{
  border-radius:12px!important;
  box-shadow:0 8px 22px rgba(0,0,0,.13)!important;
}
.dashboard-info-primary .fx-card,
.dashboard-info-secondary .online-users-card{
  padding:12px!important;
}
.dashboard-info-primary .fx-item{
  padding:8px 9px!important;
}
.dashboard-info-primary .fx-value{
  font-size:.90rem!important;
}
.dashboard-info-primary .fx-note{
  margin-top:7px!important;
}

.footer{
  padding:8px 0 18px!important;
}
.footer-card{
  border-radius:14px!important;
  box-shadow:0 10px 26px rgba(0,0,0,.14)!important;
  padding:14px!important;
}
.footer-top{
  gap:14px!important;
}
.footer-brand h3{
  font-size:1rem!important;
  margin:0 0 4px!important;
}
.footer-brand p{
  font-size:.70rem!important;
  line-height:1.4!important;
}
.footer-links{
  gap:6px!important;
}
.footer-bottom{
  margin-top:12px!important;
  padding-top:10px!important;
  font-size:.66rem!important;
}

.info-card,
.feature-box,
.about-grid>article,
.about-story{
  border-radius:12px!important;
  border-color:var(--home-line)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.13)!important;
}
.info-card,
.about-grid>article,
.about-story{
  padding:14px!important;
}
.feature-box{padding:12px!important}

.content-section{padding:18px 0!important}
.section-head{margin-bottom:10px!important}
.section-kicker{
  margin-bottom:5px!important;
  font-size:.66rem!important;
  letter-spacing:.10em!important;
  color:var(--home-accent)!important;
}
.section-title{
  margin-bottom:6px!important;
  font-size:clamp(1.3rem,2vw,1.75rem)!important;
  line-height:1.08!important;
}
.section-desc{
  font-size:.80rem!important;
  line-height:1.5!important;
}

.counter-value{
  font-size:clamp(1.6rem,4vw,2.25rem)!important;
  font-variant-numeric:tabular-nums;
}
.counter-label,
.counter-note{
  font-size:.72rem!important;
}

@media(max-width:1020px){
  .dashboard-intro-shell{min-height:0}
  .hero-grid{grid-template-columns:.82fr 1.18fr!important}
}

@media(max-width:820px){
  .dashboard-intro{padding-top:18px!important}
  .dashboard-intro-shell{padding-bottom:14px!important}
  .dashboard-intro-copy h1{font-size:2.25rem!important}
  .hero-grid{grid-template-columns:1fr!important}
  .hero-copy{order:2}
  .hero-miniapp{order:1}
  .dashboard-info-grid{gap:8px!important}
}

@media(max-width:600px){
  .container{width:min(100% - 24px,var(--home-max))!important}
  .dashboard-intro{padding:14px 0 8px!important}
  .dashboard-intro-copy h1{
    font-size:1.9rem!important;
    margin-bottom:6px!important;
  }
  .dashboard-intro-copy p{
    font-size:.82rem!important;
    line-height:1.48!important;
  }
  .dashboard-intro-status{
    font-size:.68rem!important;
    padding:6px 8px!important;
  }
  .platform-modules{padding-top:6px!important}
  .platform-module-grid{gap:7px!important}
  .platform-module-card{min-height:74px!important;padding:9px 10px!important}
  .hero{padding-top:6px!important}
  .hero-grid{padding:10px!important;gap:10px!important}
  .hero-miniapp{padding:12px!important}
  .hero-copy{gap:10px!important}
  .hero-actions{gap:6px!important}
  .hero-bottom{padding:0 10px 10px!important}
  .dashboard-info-layer{padding-bottom:16px!important}
  .footer-card{padding:12px!important}
  .footer-top{display:grid!important;grid-template-columns:1fr!important}
}

@media(max-width:390px){
  .dashboard-intro-copy h1{font-size:1.72rem!important}
  .platform-module-grid{grid-template-columns:1fr!important}
}


/* Guards migrated from retired legacy-home.css */
.profile-eula{
  overflow:hidden;
}
.profile-eula label{
  display:grid!important;
  grid-template-columns:24px minmax(0,1fr);
  gap:10px!important;
  align-items:start!important;
  width:100%;
  min-width:0;
}
.profile-eula label span,
.profile-eula a{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:normal;
}
.profile-eula input[type="checkbox"]{
  width:22px!important;
  height:22px;
  min-width:22px;
  margin:1px 0 0!important;
  padding:0!important;
  flex:0 0 22px;
  accent-color:var(--home-cool,#5b9ed8);
}
.profile-eula a{
  display:inline-block;
  margin-top:8px;
  color:#9cc4e1;
  font-weight:800;
}

.moderation-inbox-btn{
  position:relative;
}
.moderation-inbox-btn::before{
  display:none!important;
  content:none!important;
}
.moderation-inbox-btn[hidden],
.moderation-inbox-badge[hidden]{
  display:none!important;
}
.moderation-inbox-badge{
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:22px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:var(--idesuss-danger,#d65353);
  color:#fff;
  display:grid;
  place-items:center;
  font-size:12px;
  font-weight:900;
  border:2px solid var(--home-surface,#102131);
  box-shadow:0 4px 10px rgba(0,0,0,.22);
}


/* Homepage overlay visibility and mobile overflow guards migrated from retired legacy-home.css */
html,
body{
  max-width:100%;
  overflow-x:hidden;
}

.viewer-shell,
.info-panel{
  display:none!important;
  position:fixed;
  inset:0;
  z-index:1200;
  align-items:flex-start;
  justify-content:center;
  background:rgba(3,9,14,.78);
  backdrop-filter:blur(10px);
}

.viewer-shell.show,
.info-panel.show{
  display:flex!important;
}

body.viewer-open{
  overflow:hidden!important;
  touch-action:none;
}

.viewer-shell-card,
.info-panel-card{
  width:min(920px,calc(100vw - 32px));
  max-width:100%;
  margin:auto;
}

.viewer-frame{
  display:block;
  width:100%;
  min-height:min(62vh,560px);
  border:0;
  background:#07111c;
}

.header-dropdown-menu{
  display:none;
}

.header-dropdown-menu[style*="display: flex"]{
  display:flex!important;
}

@media(max-width:600px){
  .viewer-shell,
  .info-panel{
    padding:12px!important;
  }

  .viewer-shell-card,
  .info-panel-card{
    width:100%;
    max-height:calc(100dvh - 24px);
  }

  .viewer-frame{
    min-height:52dvh;
  }
}


/* Mobile menu and idea-tooltip guards */
.header-dropdown-menu[style*="display: flex"]{
  flex-direction:column!important;
  align-items:stretch!important;
}

.menu-idea-row{
  position:relative;
}

.menu-info-tooltip{
  display:none!important;
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  width:min(260px,calc(100vw - 36px));
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:9px;
  background:#0b1724;
  color:#dce5eb;
  box-shadow:0 12px 28px rgba(0,0,0,.30);
  z-index:1300;
  font-size:.72rem;
  line-height:1.45;
}

.menu-info:hover .menu-info-tooltip,
.menu-info:focus .menu-info-tooltip,
.menu-info:focus-within .menu-info-tooltip{
  display:block!important;
}


/* Final mobile header/footer polish */
@media(max-width:760px){
  .header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    width:auto!important;
    gap:4px!important;
  }

  .header-actions > *{
    width:auto!important;
    min-width:0;
  }

  .auth-chip{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex:0 0 auto!important;
    min-width:0!important;
    width:auto!important;
    border-color:transparent!important;
    background:transparent!important;
    padding:0!important;
  }

  .lang-clock-chip{
    flex:0 0 auto!important;
    width:auto!important;
  }
}

.footer-action-btn,
.footer-action-btn:link,
.footer-action-btn:visited,
#footerOpenAppLink,
#footerOpenAppLink:link,
#footerOpenAppLink:visited,
#footerOpenAppLink:hover,
#footerOpenAppLink:active{
  color:var(--idesuss-text)!important;
}


/* Signed-in header responsive state */
.auth-chip.is-signed-in{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:4px!important;
  width:auto!important;
  min-width:0!important;
}

.auth-chip.is-signed-in .auth-link{
  display:inline-flex!important;
  align-items:center!important;
  min-width:0!important;
  white-space:nowrap!important;
}

.auth-chip.is-signed-in #loginBtn{
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.auth-chip.is-signed-in .auth-separator,
.auth-chip.is-signed-in .auth-separator[hidden]{
  display:none!important;
}

@media(max-width:1020px){
  .idesuss-signed-in .header-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex-wrap:nowrap!important;
    gap:5px!important;
  }

  .idesuss-signed-in .auth-chip{
    flex:0 1 auto!important;
  }

  .idesuss-signed-in .auth-chip #loginBtn{
    max-width:118px;
  }

  .idesuss-signed-in .auth-chip #registerBtn{
    flex:0 0 auto!important;
  }

  .idesuss-signed-in #menuToggle{
    flex:0 0 auto!important;
  }
}

@media(max-width:760px){
  .idesuss-signed-in .auth-chip #loginBtn,
  .idesuss-signed-in .auth-chip #registerBtn{
    display:none!important;
  }

  .idesuss-signed-in .auth-chip{
    background:transparent!important;
    border-color:transparent!important;
    padding:0!important;
  }
}


/* Header messages, language contrast and unified action cluster */
.header-actions{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:2px!important;
  padding:3px!important;
  border:1px solid rgba(255,255,255,.11)!important;
  border-radius:12px!important;
  background:rgba(13,29,43,.94)!important;
  box-shadow:0 10px 26px rgba(0,0,0,.16)!important;
}

.header-actions .header-chip{
  border-color:transparent!important;
  background:transparent!important;
  box-shadow:none!important;
}

.lang-clock-chip{
  padding-right:4px!important;
}

.lang-select{
  background:#f2eee5!important;
  color:#14283a!important;
  border-color:rgba(255,255,255,.28)!important;
  font-weight:900!important;
  text-shadow:none!important;
}

.lang-select option{
  background:#f7f4ee!important;
  color:#14283a!important;
}

.header-messages-btn{
  position:relative;
  display:inline-grid;
  place-items:center;
  flex:0 0 34px;
  width:34px;
  min-width:34px;
  height:34px;
  min-height:34px;
  padding:0!important;
  margin:0 2px!important;
  border:1px solid rgba(224,168,90,.22)!important;
  border-radius:9px!important;
  background:rgba(224,168,90,.08)!important;
  color:var(--idesuss-text)!important;
  box-shadow:none!important;
  font-size:1rem!important;
  line-height:1!important;
  cursor:pointer;
}

.header-messages-btn:hover,
.header-messages-btn:focus-visible{
  background:rgba(224,168,90,.15)!important;
  border-color:rgba(224,168,90,.38)!important;
  outline:none;
}

.header-messages-btn[hidden],
.header-messages-badge[hidden]{
  display:none!important;
}

.header-messages-badge{
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--idesuss-danger,#d65353);
  color:#fff;
  border:2px solid #0d1d2b;
  font-size:11px;
  font-weight:900;
  line-height:1;
}

.auth-chip{
  border-left:1px solid rgba(255,255,255,.09)!important;
  border-radius:0 9px 9px 0!important;
  padding-left:5px!important;
}

.lang-clock-chip{
  border-radius:9px 0 0 9px!important;
}

.hero-banner-link,
.hero-banner-link:link,
.hero-banner-link:visited,
.hero-banner-link:hover,
.hero-banner-link:active{
  color:#f3efe7!important;
  background:#183247!important;
  border-color:rgba(255,255,255,.12)!important;
  font-weight:850!important;
  opacity:1!important;
}

@media(max-width:760px){
  .header-actions{
    padding:2px!important;
    gap:1px!important;
  }

  .auth-chip{
    border-left:1px solid rgba(255,255,255,.08)!important;
  }

  .header-messages-btn{
    width:32px;
    min-width:32px;
    height:32px;
    min-height:32px;
  }

  .lang-select{
    min-width:64px!important;
    max-width:86px!important;
  }
}


/* Release header simplification: brand + compact actions only. */
.header-inner{
  grid-template-columns:auto 1fr!important;
}

.header-actions{
  justify-self:end!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
  gap:6px!important;
}

.header-actions .header-chip{
  border:1px solid rgba(255,255,255,.09)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.035)!important;
}

.auth-chip{
  border-left:1px solid rgba(255,255,255,.09)!important;
  border-radius:10px!important;
}

.lang-clock-chip{
  border-radius:10px!important;
}

.platform-nav{
  display:none!important;
}

/* Profile release polish */
#profilePanel{
  padding:16px!important;
}

.profile-panel-card{
  width:min(760px,calc(100vw - 24px))!important;
  max-width:100%!important;
  overflow:auto!important;
  overflow-x:hidden!important;
}

.profile-panel-card a,
.profile-panel-card .menu-profile-btn{
  color:var(--idesuss-text)!important;
}

.profile-action-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px!important;
  width:100%;
  margin-top:10px;
}

.profile-action-grid .menu-profile-btn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  padding:9px 10px!important;
  border-radius:10px!important;
  border:1px solid rgba(255,255,255,.09)!important;
  background:#12283a!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
}

.profile-action-grid .profile-delete-btn{
  background:#7f1d1d!important;
  color:#fff!important;
}

@media(max-width:600px){
  .profile-action-grid{
    grid-template-columns:1fr!important;
  }
}
