/* ============================================
   PEAKPOINT SAT PREP — PeakPal
   ============================================ */

.peakpal-screen {
  background: var(--bg-primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.peakpal-main {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 6%, rgba(14, 165, 233, 0.12), transparent 30%),
    linear-gradient(180deg, #fff 0%, var(--bg-primary) 42%);
}

.peakpal-screen.sidebar-collapsed .peakpal-main {
  margin-left: 58px;
}

.peakpal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
}

.peakpal-chat-rail {
  border-right: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.74);
  padding: 28px 18px;
}

.peakpal-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
}

.peakpal-mark img {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: var(--surface-2);
  padding: 6px;
}

.new-chat-button {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--surface-2), var(--card-shadow);
}

.chat-bubble-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--accent);
  border: 1.5px solid var(--accent-soft);
  font-family: var(--font-display);
  font-weight: 800;
  flex: 0 0 22px;
}

.chat-list-block {
  margin-top: 30px;
}

.chat-list-block h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.chat-list-block p {
  color: var(--text-secondary);
  font-weight: 600;
  text-align: center;
}

.peakpal-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
}

.peakpal-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 48px 210px;
}

.peakpal-hero {
  max-width: 760px;
  margin-bottom: 26px;
}

.peakpal-hero .eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.peakpal-hero h1 {
  font-size: 2.65rem;
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--text-heading);
}

.peakpal-section {
  max-width: 980px;
  margin-bottom: 28px;
}

.peakpal-section h2 {
  font-size: 1.34rem;
  margin-bottom: 14px;
}

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 960px;
}

.prompt-card {
  position: relative;
  min-height: 214px;
  border-radius: 18px;
  border: 1px solid var(--border-soft);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.prompt-card::before {
  content: "";
  position: absolute;
  inset: -48px -38px auto auto;
  width: 170px;
  height: 170px;
  border-radius: 48%;
  border: 22px solid rgba(255, 255, 255, 0.42);
  transform: rotate(16deg);
}

.prompt-card::after {
  content: "";
  position: absolute;
  inset: auto auto -58px -42px;
  width: 145px;
  height: 145px;
  border-radius: 42%;
  border: 16px solid rgba(255, 255, 255, 0.32);
  transform: rotate(-24deg);
}

.prompt-blue { background: #edf8ff; }
.prompt-cyan { background: #dff5ff; }
.prompt-green { background: #e4fbf1; }
.prompt-sky { background: #e8f6ff; }

.prompt-icon {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid var(--border-soft);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
}

.prompt-card h3 {
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
  line-height: 1.36;
  color: var(--text-heading);
}

.prompt-card button {
  position: relative;
  z-index: 1;
  min-height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 0 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: inset 0 -4px 0 var(--accent-deep);
}

.prompt-card button span {
  font-size: 1.25rem;
  line-height: 1;
}

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  max-width: 960px;
}

.topic-cloud button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 17px;
  background: #fff;
  border: 1.5px solid var(--accent-soft);
  color: var(--text-heading);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--surface-2), var(--card-shadow);
}

.topic-cloud button:nth-child(3n + 2) {
  border-color: #cfeafd;
}

.topic-cloud button:nth-child(3n + 3) {
  border-color: #b7f0d9;
}

.conversation-panel {
  max-width: 840px;
  display: grid;
  gap: 14px;
}

.message-row {
  display: flex;
}

.message-row.user {
  justify-content: flex-end;
}

.message-bubble {
  max-width: min(720px, 88%);
  border-radius: 20px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  box-shadow: var(--card-shadow);
}

.message-row.user .message-bubble {
  background: var(--accent);
  color: #fff;
  border-color: rgba(3, 105, 161, 0.18);
}

.peakpal-composer {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--border-default);
  background: rgba(240, 249, 255, 0.94);
  padding: 0 48px 22px;
  backdrop-filter: blur(14px);
}

.composer-note {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-deep);
  font-family: var(--font-display);
}

.composer-box {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  background: #fff;
  border: 1.5px solid var(--accent-soft);
  box-shadow: var(--card-shadow);
  padding: 8px 8px 8px 16px;
}

.composer-box textarea {
  width: 100%;
  max-height: 140px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.45;
}

.composer-box textarea::placeholder {
  color: var(--text-muted);
}

.composer-box button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: inset 0 -4px 0 var(--accent-deep);
}

.peakpal-composer p {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

@media (max-width: 1180px) {
  .peakpal-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .prompt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .peakpal-shell {
    grid-template-columns: 1fr;
  }

  .peakpal-chat-rail {
    display: none;
  }

  .peakpal-workspace {
    max-height: none;
  }

  .peakpal-content {
    padding: 30px 20px 200px;
  }

  .peakpal-composer {
    padding: 0 20px 20px;
  }
}

@media (max-width: 620px) {
  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .prompt-card {
    min-height: 198px;
  }

  .peakpal-hero h1 {
    font-size: 2.1rem;
  }

  .composer-note {
    align-items: flex-start;
    padding: 14px 0;
  }
}
