/* Dedicated home layout. Keep this file small so production cache/debug is straightforward. */
body.chat-page{
  margin:0;
  min-height:100vh;
  overflow:hidden;
  background:#0b1220;
}
body.chat-page .hacker-nav,
body.chat-page .footer-tech{
  display:none !important;
}
body.chat-page main{
  min-height:100vh;
}
.chatgpt-shell{
  --chat-sidebar:280px;
  min-height:100vh;
  display:grid;
  grid-template-columns:var(--chat-sidebar) minmax(0, 1fr);
  color:#dbe7f7;
  background:#0b1220;
  font-family:"Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.chatgpt-shell.is-sidebar-collapsed{
  grid-template-columns:0 minmax(0, 1fr);
}
.chat-sidebar{
  position:relative;
  z-index:3;
  min-width:0;
  overflow:hidden;
  background:#080f1d;
  border-right:1px solid rgba(148,163,184,.16);
}
.chatgpt-shell.is-sidebar-collapsed .chat-sidebar{
  opacity:0;
  pointer-events:none;
}
.chat-sidebar__brand{
  display:flex;
  flex-direction:column;
  gap:.15rem;
  padding:1.15rem;
  border-bottom:1px solid rgba(148,163,184,.12);
}
.chat-sidebar__brand span{
  color:#f8fafc;
  font-family:"JetBrains Mono", ui-monospace, monospace;
  font-weight:800;
  letter-spacing:0;
}
.chat-sidebar__brand small{ color:#8ea1ba; }
.chat-sidebar__nav{
  display:flex;
  flex-direction:column;
  gap:.25rem;
  padding:.8rem;
}
.chat-sidebar__nav a{
  display:flex;
  align-items:center;
  gap:.7rem;
  padding:.72rem .82rem;
  border-radius:10px;
  color:#cbd5e1;
  text-decoration:none;
  font-weight:650;
}
.chat-sidebar__nav a:hover{
  color:#f8fafc;
  background:rgba(148,163,184,.11);
}
.chat-sidebar__nav i{
  width:1.1rem;
  color:#93c5fd;
}
.chat-lock-form,
.chat-knowledge-form{
  margin:.25rem .8rem 5.5rem;
  padding:.8rem;
  border-radius:14px;
  background:rgba(15,23,42,.78);
  border:1px solid rgba(148,163,184,.14);
}
.chat-lock-form{ margin-bottom:.8rem; }
.chat-lock-form label,
.chat-knowledge-form label{
  display:flex;
  align-items:center;
  gap:.45rem;
  margin-bottom:.5rem;
  color:#f8fafc;
  font-size:.82rem;
  font-weight:850;
}
.chat-lock-form input,
.chat-knowledge-form input,
.chat-knowledge-form textarea{
  width:100%;
  margin-bottom:.5rem;
  padding:.58rem .65rem;
  border:1px solid rgba(148,163,184,.18);
  border-radius:10px;
  outline:0;
  color:#dbe7f7;
  background:#0b1220;
  font:600 .86rem/1.45 "Inter", system-ui, sans-serif;
}
.chat-knowledge-form textarea{
  min-height:112px;
  resize:vertical;
}
.chat-lock-form input::placeholder,
.chat-knowledge-form input::placeholder,
.chat-knowledge-form textarea::placeholder{ color:#71839c; }
.chat-lock-form button,
.chat-knowledge-form button{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:.45rem;
  padding:.58rem .75rem;
  border:0;
  border-radius:10px;
  color:#07111f;
  background:linear-gradient(135deg, #67e8f9, #60a5fa);
  font-size:.86rem;
  font-weight:850;
}
.chat-knowledge-form .chat-lock-action{
  margin-top:.5rem;
  color:#cbd5e1;
  background:rgba(15,23,42,.92);
  border:1px solid rgba(148,163,184,.18);
}
.chat-knowledge-status{
  min-height:1.1rem;
  margin-top:.45rem;
  color:#9fb0c8;
  font-size:.75rem;
  overflow-wrap:anywhere;
}
.chat-sidebar__footer{
  position:absolute;
  left:.95rem;
  right:.95rem;
  bottom:1rem;
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.72rem .8rem;
  border:1px solid rgba(148,163,184,.14);
  border-radius:12px;
  color:#aebdd0;
  background:rgba(15,23,42,.72);
  font-size:.84rem;
  font-weight:700;
}
.ai-dot{
  width:9px;
  height:9px;
  flex:0 0 auto;
  border-radius:999px;
  background:#22c55e;
  box-shadow:0 0 18px rgba(34,197,94,.85);
}
.chat-sidebar-toggle{
  position:fixed;
  z-index:5;
  top:14px;
  left:calc(var(--chat-sidebar) + 14px);
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  padding:0;
  border-radius:10px;
  color:#e2e8f0;
  background:rgba(15,23,42,.9);
  border:1px solid rgba(148,163,184,.22);
  box-shadow:0 12px 36px rgba(0,0,0,.22);
  transition:left .2s ease, background .18s ease;
}
.chatgpt-shell.is-sidebar-collapsed .chat-sidebar-toggle{ left:14px; }
.chat-main{
  min-width:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 12%, rgba(59,130,246,.18), transparent 34%),
    #0b1220;
}
.chat-stage{
  width:min(1080px, 100%);
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  margin:0 auto;
  padding:4rem 1.5rem 2rem;
}
.chat-intro{
  width:min(820px, 100%);
  margin:0 auto;
  text-align:center;
}
.chat-logo{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  margin:0 auto 1rem;
  border-radius:16px;
  color:#07111f;
  background:linear-gradient(135deg, #67e8f9, #60a5fa 58%, #34d399);
  box-shadow:0 18px 54px rgba(96,165,250,.28);
}
.chat-logo i{ font-size:1.55rem; }
.chat-intro h1{
  margin-bottom:.65rem;
  color:#f8fafc;
  font-size:clamp(2rem, 4vw, 3.15rem);
  font-weight:800;
  letter-spacing:0;
}
.chat-intro p{
  max-width:620px;
  margin:0 auto;
  color:#9fb0c8;
  font-size:1rem;
}
.chat-thread{
  width:min(820px, 100%);
  max-height:calc(100vh - 255px);
  margin:1.25rem auto 0;
  overflow:auto;
  padding:0 .25rem;
}
.chat-bubble{
  margin-bottom:1rem;
  line-height:1.62;
}
.chat-bubble p{ margin:0 0 .75rem; }
.chat-bubble p:last-child{ margin-bottom:0; }
.chat-bubble--user{
  max-width:78%;
  margin-left:auto;
  padding:.85rem 1rem;
  border-radius:18px 18px 4px 18px;
  color:#f8fafc;
  background:#2563eb;
}
.chat-bubble--assistant{
  max-width:100%;
  color:#dbe7f7;
}
.chat-result-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.75rem;
  margin-top:.8rem;
}
.chat-result-card{
  padding:1rem;
  border-radius:14px;
  color:#dbe7f7;
  background:rgba(15,23,42,.86);
  border:1px solid rgba(148,163,184,.18);
}
.chat-result-card span{
  color:#93c5fd;
  font-size:.74rem;
  font-weight:800;
  text-transform:uppercase;
}
.chat-result-card h2{
  margin:.35rem 0 .45rem;
  color:#f8fafc;
  font-size:1rem;
  letter-spacing:0;
}
.chat-result-card p{
  color:#aebdd0;
  font-size:.9rem;
}
.chat-result-card a,
.chat-result-link{
  color:#7dd3fc;
  font-weight:800;
  text-decoration:none;
}
.chat-result-muted{
  color:#9fb0c8;
  font-weight:800;
}
.chat-suggestions{
  width:min(820px, 100%);
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:.65rem;
  margin:1rem auto 0;
}
.chat-suggestions button{
  min-height:50px;
  padding:.7rem .85rem;
  border:1px solid rgba(148,163,184,.18);
  border-radius:13px;
  color:#dbe7f7;
  background:rgba(15,23,42,.74);
  font-size:.88rem;
  font-weight:750;
  text-align:left;
}
.chat-composer{
  width:min(820px, calc(100vw - 2rem));
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:end;
  gap:.75rem;
  margin:1.7rem auto 0;
  padding:.75rem;
  border-radius:24px;
  background:#f8fafc;
  border:1px solid rgba(203,213,225,.9);
  box-shadow:0 24px 70px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.05);
}
.chat-composer textarea{
  width:100%;
  max-height:160px;
  min-height:42px;
  resize:none;
  border:0;
  outline:0;
  background:transparent;
  color:#0f172a;
  padding:.58rem .35rem .35rem;
  font:600 1rem/1.45 "Inter", system-ui, sans-serif;
}
.chat-composer textarea::placeholder{
  color:#64748b;
  font-weight:550;
}
.chat-composer button{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:999px;
  color:#fff;
  background:#0f172a;
}
.chat-note{
  width:min(820px, calc(100vw - 2rem));
  margin:.15rem auto 0;
  color:#8293aa;
  text-align:center;
  font-size:.78rem;
}

@media (max-width:991.98px){
  body.chat-page{ overflow:auto; }
  .chatgpt-shell{ grid-template-columns:0 minmax(0, 1fr); }
  .chatgpt-shell:not(.is-sidebar-collapsed){
    grid-template-columns:minmax(260px, 78vw) minmax(0, 1fr);
  }
  .chat-sidebar{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    width:min(300px, 82vw);
    box-shadow:24px 0 60px rgba(0,0,0,.28);
  }
  .chatgpt-shell.is-sidebar-collapsed .chat-sidebar{
    transform:translateX(-100%);
  }
  .chat-main{ grid-column:1 / -1; }
  .chat-suggestions{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:575.98px){
  .chatgpt-shell,
  .chat-main{ min-height:100vh; }
  .chat-sidebar-toggle{
    top:10px;
    width:38px;
    height:38px;
  }
  .chatgpt-shell:not(.is-sidebar-collapsed) .chat-sidebar-toggle{
    left:calc(min(300px, 82vw) + 10px);
  }
  .chatgpt-shell.is-sidebar-collapsed .chat-sidebar-toggle{ left:10px; }
  .chat-stage{
    width:calc(100vw - 1rem);
    padding:3.75rem 0 1.25rem;
  }
  .chat-thread{
    max-height:calc(100vh - 330px);
    margin-top:1rem;
  }
  .chat-bubble--user{ max-width:88%; }
  .chat-result-grid{ grid-template-columns:1fr; }
  .chat-suggestions{
    grid-template-columns:1fr;
    gap:.45rem;
    margin-top:1rem;
  }
  .chat-suggestions button{
    min-height:44px;
    text-align:center;
  }
  .chat-composer{
    width:calc(100vw - 1rem);
    border-radius:18px;
    padding:.55rem;
    margin-top:1.2rem;
  }
  .chat-note{ width:calc(100vw - 1rem); }
}
