:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22252f;
  --border: #2e3140;
  --text: #e1e4eb;
  --text-dim: #8b8fa3;
  --accent: #6c5ce7;
  --accent-hover: #7c6df7;
  --green: #00b894;
  --green-dim: rgba(0, 184, 148, 0.15);
  --red: #e17055;
  --yellow: #fdcb6e;
  --radius: 10px;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 5%, rgba(108, 92, 231, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  transition: 0.15s ease;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.13;
  pointer-events: none;
}

.ambient-one {
  top: -12rem;
  right: -9rem;
  background: var(--accent);
}

.ambient-two {
  bottom: -16rem;
  left: -10rem;
  background: var(--green);
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand span {
  color: var(--accent-hover);
}

.brand.compact {
  font-size: 1.05rem;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem 1.25rem;
}

.login-card {
  width: min(100%, 29rem);
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(26, 29, 39, 0.9);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  animation: fade-up 0.3s ease;
}

.eyebrow {
  margin: 2rem 0 0.7rem;
  color: var(--accent-hover);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: lowercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 7vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro {
  max-width: 23rem;
  margin-bottom: 2.25rem;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.65;
}

form {
  display: grid;
  gap: 0.6rem;
}

label {
  margin-top: 0.55rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  transition: 0.15s ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.13);
}

form button,
.talk-button {
  min-height: 3rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

form button {
  margin-top: 0.9rem;
}

form button:hover {
  background: var(--accent-hover);
}

form button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.error {
  min-height: 1rem;
  margin: 0.3rem 0 -0.45rem;
  color: var(--red);
  font-size: 0.75rem;
}

.trust-note {
  margin: 1.5rem 0 0;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-align: center;
}

.trust-dot {
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--green);
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(46, 49, 64, 0.7);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.private-badge,
.status-pill {
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
}

.private-badge {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.38rem 0.65rem;
  background: var(--green-dim);
  color: var(--green);
}

.private-badge span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--green);
}

.ghost-button {
  padding: 0.45rem 0.65rem;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
}

.ghost-button:hover {
  color: var(--text);
}

.dashboard {
  width: min(100% - 2rem, 68rem);
  margin: 0 auto;
  padding: 5.5rem 0 3rem;
}

.hero {
  max-width: 44rem;
}

.hero .eyebrow {
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.4rem);
}

.hero > p:not(.eyebrow) {
  max-width: 35rem;
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.7;
}

.talk-button {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 17rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  text-align: left;
  opacity: 0.72;
  cursor: not-allowed;
}

.talk-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 1.4rem;
}

.talk-button strong,
.talk-button small {
  display: block;
}

.talk-button small {
  margin-top: 0.18rem;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.68rem;
  font-weight: 500;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 5rem;
}

.status-card {
  position: relative;
  min-height: 20rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(26, 29, 39, 0.82);
  transition: 0.15s ease;
}

.status-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 3.6rem;
  place-items: center;
  border-radius: 12px;
  background: var(--bg);
  font-size: 1.25rem;
}

.memory-icon {
  color: var(--accent-hover);
}

.think-icon {
  color: var(--yellow);
}

.action-icon {
  color: var(--green);
}

.card-kicker {
  margin-bottom: 0.5rem;
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-card h2 {
  margin-bottom: 0.75rem;
  font-size: 1.18rem;
  letter-spacing: -0.025em;
}

.status-card p:not(.card-kicker) {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

.status-pill {
  position: absolute;
  right: 1.4rem;
  bottom: 1.4rem;
  padding: 0.35rem 0.58rem;
}

.status-pill.ready {
  background: var(--green-dim);
  color: var(--green);
}

.status-pill.building {
  background: rgba(253, 203, 110, 0.12);
  color: var(--yellow);
}

.principle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1rem;
  padding: 2rem 0;
}

.principle .eyebrow {
  margin: 0 0 0.65rem;
}

.loop {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.loop span {
  margin: 0 0.35rem;
  color: var(--accent-hover);
}

.principle-copy {
  max-width: 20rem;
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  line-height: 1.55;
  text-align: right;
}

.spinner {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.45rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  vertical-align: -0.12rem;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .login-card {
    padding: 2rem 1.4rem;
  }

  .dashboard {
    padding-top: 3.5rem;
  }

  .status-grid {
    grid-template-columns: 1fr;
    margin-top: 3.5rem;
  }

  .status-card {
    min-height: 17rem;
  }

  .card-icon {
    margin-bottom: 2.2rem;
  }

  .principle {
    align-items: flex-start;
    flex-direction: column;
  }

  .loop {
    line-height: 1.9;
  }

  .principle-copy {
    text-align: left;
  }
}

