@font-face {
  font-family: "pplxSans";
  src: url("https://frontend-cdn.perplexity.ai/_agi_assets/fonts/PPLX-Sans-Beta-v2-VF.woff2") format("woff2-variations"),
       url("https://frontend-cdn.perplexity.ai/_agi_assets/fonts/FKGroteskNeue.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fcfcf9;
  --sidebar: rgba(39, 26, 0, 0.035);
  --sidebar-border: rgba(39, 26, 0, 0.07);
  --raised: #ffffff;
  --quiet: rgba(39, 26, 0, 0.07);
  --ink: #27251e;
  --ink-soft: rgba(39, 37, 30, 0.65);
  --ink-quiet: rgba(39, 37, 30, 0.4);
  --border: rgba(39, 26, 0, 0.14);
  --teal: #016a71;
  --teal-soft: rgba(1, 106, 113, 0.15);
  --sans: "pplxSans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 10px 12px;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  min-height: 100vh;
  min-height: 100dvh;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 10px;
}
.logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.logo img { display: block; width: 22px; height: 22px; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: rgba(39, 26, 0, 0.06); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}
.side-item svg { width: 18px; height: 18px; color: var(--ink-soft); flex: 0 0 auto; }
.side-item:hover { background: rgba(39, 26, 0, 0.06); }

.side-section {
  padding: 6px 4px 8px;
}
.section-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 0 8px;
  color: var(--ink-soft);
  font-size: 12px;
}
.section-head svg { width: 16px; height: 16px; }
.section-empty {
  padding: 8px 10px 4px;
  color: var(--ink-quiet);
  font-size: 13px;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 8px;
}
.side-login {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 14px;
}
.side-login:hover { background: rgba(39, 26, 0, 0.06); }
.side-login .avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8eb8bd, #d7c4a8);
  flex: 0 0 auto;
}
.side-login svg { width: 16px; height: 16px; margin-left: auto; color: var(--ink-quiet); }

.stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
}
.stage-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 10px 14px;
  min-height: 52px;
  flex: 0 0 auto;
}
.stage-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.mobile-login {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.main {
  flex: 1;
  width: min(640px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 10vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
.hero {
  margin-bottom: 20px;
}
.eyebrow {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 6px;
  font-weight: 480;
}
.hero h1 {
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
  letter-spacing: 0;
}

.composer {
  width: 100%;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: none;
  padding: 14px 14px 10px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.composer-field input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  min-height: 28px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.composer-field input::placeholder { color: var(--ink-quiet); }

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.tools-left, .tools-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
}
.tool-icon:hover { background: rgba(39, 26, 0, 0.06); color: var(--ink); }
.tool-icon svg { width: 18px; height: 18px; }

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  height: 32px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  background: transparent;
}
.tool-pill svg { width: 15px; height: 15px; color: var(--ink-soft); }
.tool-pill .chev { width: 14px; height: 14px; }
.tool-pill:hover { background: rgba(39, 26, 0, 0.06); }
.tool-pill.active {
  background: var(--quiet);
  border-color: transparent;
}
.tool-pill:not(.active):not(.ghost) {
  background: rgba(39, 26, 0, 0.035);
}
.tool-pill.ghost {
  color: var(--ink-soft);
  font-weight: 480;
  padding: 0 12px;
}

.voice-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--raised);
  display: grid;
  place-items: center;
}
.voice-btn svg { width: 16px; height: 16px; }
.voice-btn:hover { opacity: 0.92; }

.work-in-project {
  align-self: flex-start;
  margin-top: 5px;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 480;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
}
.work-in-project:hover { color: var(--ink); background: rgba(39, 26, 0, 0.04); }

.feature-cards {
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  text-align: left;
  min-height: 72px;
  height: 72px;
  padding: 16px;
  border-radius: 11px;
  border: 0;
  background: rgba(39, 26, 0, 0.035);
}
.feature-card:hover { background: rgba(39, 26, 0, 0.055); }
.feature-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  min-width: 0;
}
.feature-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--ink);
}
.feature-icon svg { width: 18px; height: 18px; display: block; }
.feature-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.feature-title {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink);
  font-weight: 480;
  white-space: nowrap;
}
.feature-desc {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge-new {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 17px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.wa-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.wa-modal[hidden] { display: none !important; }
.wa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(39, 37, 30, 0.35);
}
.wa-modal-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  height: min(640px, calc(100vh - 40px));
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.wa-modal-panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.wa-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #f4f4f4;
  color: #111;
  font-size: 22px;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stage-top { justify-content: space-between; }
  .mobile-bar { display: flex; }
  .stage-actions { display: none; }
  .main {
    width: min(640px, calc(100% - 32px));
    padding: 24px 0 48px;
    justify-content: flex-start;
  }
  .feature-cards { grid-template-columns: 1fr; }
  .feature-card { height: auto; min-height: 72px; }
  .feature-desc { white-space: normal; }
}
