:root {
  --bg: #ffffff;
  --soft: #f3f3f2;
  --border: #e6e6e4;
  --text: #1b1b1b;
  --muted: #777774;
  --font: "Google Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- home ---------- */

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 20vh;
}

.greeting {
  font-weight: 400;
  font-size: clamp(30px, 6vw, 42px);
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.composer {
  background: var(--soft);
  border-radius: 24px;
  padding: 16px 16px 10px 20px;
}

.composer textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  min-height: 48px;
}
.composer textarea::placeholder { color: var(--muted); }

.composer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model { font-size: 14px; font-weight: 500; }

.send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.2;
  transition: opacity 0.15s;
}
.send.ready { opacity: 1; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  font-size: 14px;
  text-decoration: none;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.15s;
}
.chip:hover { background: var(--soft); }

/* conversation */

.thread { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.thread:empty { display: none; }

.msg-user {
  align-self: flex-end;
  background: var(--soft);
  padding: 10px 16px;
  border-radius: 18px;
  max-width: 80%;
}

.msg-bot { align-self: flex-start; }
.msg-bot p { margin: 0; }
.msg-bot a { text-underline-offset: 3px; }

.home.chatting { padding-top: 8vh; }
.home.chatting .greeting { font-size: 26px; }

/* recent */

.recent { margin-top: 72px; padding-bottom: 64px; }

.section-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 4px;
}
.section-head a { text-decoration: none; }
.section-head a:hover { color: var(--text); }

/* ---------- inner pages ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  font-size: 15px;
}
.topbar a { text-decoration: none; color: var(--muted); }
.topbar a:hover, .topbar a[aria-current] { color: var(--text); }
.topbar nav { display: flex; gap: 18px; }
.home-link { color: var(--text) !important; font-weight: 500; }

.page { padding: 40px 0 96px; }
.page h1 {
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.page .lede { color: var(--muted); margin: 0 0 36px; }
.lede a { text-underline-offset: 3px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li + li { border-top: 1px solid var(--border); }
.list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  text-decoration: none;
}
.list a:hover .title { text-decoration: underline; text-underline-offset: 3px; }
.list .title { font-size: 17px; }
.list .desc { color: var(--muted); font-size: 14px; margin-top: 2px; }
.list .date { color: var(--muted); font-size: 14px; flex-shrink: 0; padding-top: 2px; }

.prose { font-size: 17px; line-height: 1.7; }
.prose p { margin: 0 0 1.1em; }
.prose a { text-underline-offset: 3px; }

@media (max-width: 520px) {
  .list a { flex-direction: column; gap: 2px; }
  .list .date { order: -1; padding-top: 0; font-size: 13px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}
