:root {
  color-scheme: light dark;
  --ink: #1d1d1f;
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #d2d2d7;
  --muted: #6e6e73;
  --accent: #007aff;
  --good: #34c759;
  --bad: #ff3b30;
  --avatar-a: #5b5fc7;
  --avatar-j: #8a8a8a;
  --shadow: rgba(0, 0, 0, 0.08);
  --teams-icon: #616161;
  --teams-hover: #f3f2f1;
  --teams-name: #242424;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f5f7;
    --bg: #111111;
    --surface: #1c1c1e;
    --border: #424245;
    --muted: #98989d;
    --accent: #0a84ff;
    --good: #30d158;
    --bad: #ff453a;
    --avatar-a: #7b7fe0;
    --avatar-j: #6f6f6f;
    --shadow: rgba(0, 0, 0, 0.4);
    --teams-icon: #c8c6c4;
    --teams-hover: #292827;
    --teams-name: #f5f5f5;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: center;
  padding: 32px 24px;
}

main {
  max-width: 480px;
  width: 100%;
}

h1 {
  font-size: clamp(1.9rem, 5.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}

.lede {
  margin: 0 0 26px;
  font-size: 1.05rem;
  color: var(--muted);
}

.mock {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 40px -24px var(--shadow);
  font-family: "Segoe UI", -apple-system, system-ui, sans-serif;
}

.mock-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -18px -20px 16px;
  padding: 12px 20px;
  border-radius: 16px 16px 0 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.mock-chrome .chrome-entity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-chrome .chrome-avatar {
  width: 24px;
  height: 24px;
  font-size: 0.6rem;
}

.mock-chrome .chrome-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teams-name);
}

.mock-chrome .chrome-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--teams-icon);
}

.mock-chrome svg {
  width: 17px;
  height: 17px;
}

.msg {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 4px;
}

.msg:hover {
  background: var(--teams-hover);
}

.msg + .msg {
  margin-top: 10px;
}

.msg:hover .msg-reactions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.msg-reactions {
  position: absolute;
  top: -14px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 4px 12px -4px var(--shadow);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

.msg-reactions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--teams-icon);
  cursor: pointer;
}

.msg-reactions button:hover {
  background: var(--teams-hover);
  color: var(--avatar-a);
}

.msg-reactions svg {
  width: 15px;
  height: 15px;
}

.avatar {
  flex: none;
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.avatar::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  border: 2px solid var(--surface);
}

.avatar-you {
  background: var(--avatar-a);
}

.avatar-them {
  background: var(--avatar-j);
}

.msg-body {
  min-width: 0;
  flex: 1;
}

.msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teams-name);
}

.time {
  font-size: 0.7rem;
  color: var(--muted);
}

.msg p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 8px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  font-size: 0.85rem;
  line-height: 1;
}

.eyebrow-bad::before {
  content: "\2715";
  color: var(--bad);
}

.eyebrow-good::before {
  content: "\2713";
  color: var(--good);
}

.slop-clip {
  position: relative;
  max-height: 92px;
  overflow: hidden;
  margin-top: 2px;
}

.slop-clip::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42px;
  background: linear-gradient(to bottom, transparent, var(--surface));
}

.slop-clip.expanded {
  max-height: none;
}

.slop-clip.expanded::after {
  display: none;
}

.slop p {
  margin: 0 0 8px;
}

.slop strong {
  font-size: 0.8rem;
}

.slop-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.wordcount {
  font-size: 0.7rem;
  font-style: italic;
  color: var(--muted);
}

.expand-toggle {
  flex: none;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.expand-toggle:hover {
  text-decoration: underline;
}

.vs {
  text-align: center;
  margin: 14px 0 0;
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.vs::before,
.vs::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.quip {
  margin: 22px 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
}

.share {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footnote {
  font-size: 0.75rem;
  color: var(--muted);
}

.copy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.copy-link:hover {
  background: var(--border);
}

.copy-link svg {
  width: 14px;
  height: 14px;
}

.expand-toggle:focus-visible,
.copy-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.for-agents {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.agent-copy {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-align: center;
}

.prompt-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.prompt-box code {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: normal;
}

.prompt-box .copy-link {
  flex: none;
}

.agent-note {
  margin: 16px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.agent-note-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
