/* ---------- landing ---------- */
.landing { position: relative; }
.corner-brand {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--edge);
  background: linear-gradient(180deg, rgba(5,5,8,.85), transparent);
  backdrop-filter: blur(10px) saturate(130%);
}
.brand-ident { font-weight: 700; letter-spacing: .3em; font-size: .85rem; }
.brand-ident b { color: var(--bio); font-weight: 700; }
.corner-actions { display: flex; gap: 10px; align-items: center; }

.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 110px var(--edge) 60px;
  position: relative;
}
.hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bio); animation: pulse 1.8s ease infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(85, 239, 228, .5); }
  55% { box-shadow: 0 0 0 9px rgba(85, 239, 228, 0); }
}
.hero h1 {
  font-size: clamp(2.3rem, 6.4vw, 4.6rem);
  font-weight: 650; letter-spacing: -.035em; max-width: 15ch; margin-bottom: 22px;
}
.hero-sub { max-width: 56ch; color: var(--ink-70); font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta { margin-top: 46px; display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-35); }
.scroll-cue { position: absolute; bottom: 26px; left: var(--edge); color: var(--ink-35); animation: bob 2.4s ease infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

.molecule-wrap {
  position: absolute; right: calc(var(--edge) * .6); top: 50%;
  transform: translateY(-50%);
  width: min(44vw, 560px); opacity: .9; pointer-events: none;
}
.molecule-wrap svg { width: 100%; height: auto; }
.orbit { transform-origin: center; animation: spin 40s linear infinite; }
.orbit.rev { animation-direction: reverse; animation-duration: 55s; }
@keyframes spin { to { transform: rotate(360deg); } }

.chapter { padding: clamp(60px, 10vh, 120px) var(--edge); position: relative; max-width: 1180px; margin: 0 auto; }
.chapter-no { font-family: var(--font-mono); color: var(--bio); font-size: .78rem; letter-spacing: .2em; margin-bottom: 14px; }
.chapter h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); max-width: 22ch; }
.chapter-lede { max-width: 62ch; color: var(--ink-70); }
.rule { height: 1px; background: var(--grad-rule); border: none; margin: 0 var(--edge); opacity: .5; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 34px; }
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; margin-top: 40px; }
.stat-val { font-family: var(--font-mono); font-size: clamp(1.9rem, 4vw, 2.9rem); color: var(--marker); font-weight: 600; }
.stat-label { color: var(--ink-50); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; }

.cta-final { text-align: center; padding: clamp(80px, 14vh, 150px) var(--edge); }
.cta-final h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); margin-bottom: 24px; }
.landing-footer { padding: 30px var(--edge); color: var(--ink-35); font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100svh; display: grid; place-items: center; padding: 90px var(--edge) 40px; }
.auth-card { width: min(430px, 100%); }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 20px; background: var(--surface-2); padding: 5px; border-radius: var(--radius-sm); }
.auth-tabs button {
  flex: 1; border: none; background: transparent; color: var(--text-dim);
  padding: 9px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: .85rem;
}
.auth-tabs button.active { background: var(--grad-brand); color: #050508; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100svh; }
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(11, 20, 28, .5);
  backdrop-filter: blur(18px) saturate(130%);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100svh; overflow-y: auto; z-index: 30;
}
.side-brand { font-weight: 700; letter-spacing: .22em; font-size: .8rem; padding: 6px 12px 18px; }
.side-brand b { color: var(--bio); }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer; border: none; background: none;
  text-align: left; font-size: .92rem; width: 100%;
}
.nav-item:hover { background: var(--ink-15); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--bio-soft); color: var(--bio); font-weight: 600; }
.nav-sep { margin: 12px 12px 6px; font-size: .64rem; letter-spacing: .2em; color: var(--ink-35); text-transform: uppercase; }
.side-foot { margin-top: auto; padding: 12px; font-size: .75rem; color: var(--ink-35); }

.main { padding: 26px clamp(16px, 3.5vw, 40px) 60px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.topbar h1 { font-size: 1.45rem; margin: 0; flex: 1; }
.burger { display: none; }

.page-grid { display: grid; gap: 18px; }
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }

/* ---------- ticket thread ---------- */
.thread { display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 78%; padding: 13px 16px; border-radius: var(--radius); position: relative; }
.bubble.mine { align-self: flex-end; background: linear-gradient(118deg, rgba(85,239,228,.16), rgba(155,143,255,.16)); border: 1px solid rgba(85,239,228,.25); }
.bubble.theirs { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); }
.bubble.note { align-self: flex-end; background: rgba(246, 217, 123, .1); border: 1px dashed rgba(246, 217, 123, .4); }
.bubble.system { align-self: center; background: none; border: none; color: var(--ink-35); font-size: .78rem; padding: 2px; }
.bubble-meta { font-size: .7rem; color: var(--ink-35); margin-bottom: 5px; font-family: var(--font-mono); }
.bubble-body { white-space: pre-wrap; word-break: break-word; }

/* ---------- responsive / mobile-first friendliness ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 30% 0 0; min-width: 260px; height: 100svh;
    transform: translateX(-100%); transition: transform var(--speed) ease;
    background: rgba(8, 13, 19, .96);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .burger {
    display: inline-flex; border: 1px solid var(--line); background: var(--surface);
    color: var(--text); border-radius: 9px; padding: 8px 12px; cursor: pointer;
  }
  .two-col { grid-template-columns: 1fr; }
  .molecule-wrap { position: relative; transform: none; top: auto; right: auto; width: min(78vw, 380px); margin: 34px auto 0; opacity: .65; }
  .hero { padding-top: 90px; }
  .bubble { max-width: 92%; }
  .corner-actions .btn-ghost { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 14.5px; }
  .hero-meta { gap: 12px; }
  .cards-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
