:root {
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --fg: #27272a;
  --muted: #71717a;
  --faint: #a1a1aa;
  --border: #e4e4e7;
  --hover: #f4f4f5;
  --primary: oklch(0.488 0.217 264);
  --primary-hover: oklch(0.44 0.217 264);
  --blue: #4285f4;
  --link: #1a5fd6;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--fg);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  flex: none;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

/* Top bar */

.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 166px;
  justify-content: space-between;
  padding: 5px 10px;
  border: 1px solid #c4c4c4;
  border-radius: 4px;
  color: #202124;
  font-size: 15px;
}

.topbar-link:hover {
  background: var(--hover);
  text-decoration: none;
}

.topbar-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

/* Agent carousel, after the search engine strip */

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.carousel::before {
  content: "";
  position: absolute;
  inset: -40px 8%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.05), transparent);
}

.tiles {
  display: flex;
  min-width: 0;
  max-width: 942px;
  scroll-padding-inline: 4px;
  gap: 11px;
  padding: 4px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.tiles::-webkit-scrollbar {
  display: none;
}

.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 178px;
  height: 158px;
  padding: 12px;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  background: #fff;
  scroll-snap-align: center;
  transition:
    border-color 120ms,
    box-shadow 120ms;
}

.tile:hover {
  border-color: #9aa0a6;
}

.tile[aria-checked="true"] {
  border-color: #8fb3f8;
  box-shadow: 0 0 0 1px #8fb3f8;
}

.arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.arrow:hover {
  background: var(--hover);
}

.arrow svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #111;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.logo-default {
  flex-direction: column;
  gap: 6px;
}

.logo-default .lockup {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #0a0a0a;
}

.logo-default .mark {
  width: 84px;
  height: 51px;
  align-self: center;
}

.logo-caption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.logo-codex {
  font-size: 31px;
  letter-spacing: -0.02em;
  color: #0d0d0d;
}

.logo-codex .mark {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.logo-claude {
  gap: 7px;
  font-family: "Tiempos Headline", Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #141413;
}

.logo-claude .mark {
  width: 34px;
  height: 34px;
}

.logo-cursor {
  font-size: 22px;
  letter-spacing: 0.18em;
  color: #26251e;
}

.logo-cursor .mark {
  width: 32px;
  height: 36px;
  fill: currentColor;
}

.logo-opencode {
  gap: 7px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0a0a0a;
}

.logo-opencode .mark {
  width: 22px;
  height: 28px;
}

.logo-grok {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f0f0f;
}

.logo-grok .mark {
  width: 34px;
  height: 34px;
}

.logo-antigravity {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #1f1f1f;
}

.logo-antigravity .mark {
  width: 30px;
  height: 30px;
}

.logo-muse {
  gap: 7px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1c2b33;
}

.logo-muse .mark {
  width: 32px;
  height: 22px;
}

.logo-pi {
  gap: 10px;
  font-size: 34px;
  font-weight: 700;
  color: #0f0f0f;
}

.logo-pi .mark {
  width: 32px;
  height: 32px;
}

/* Link type, after "Search type" */

.modes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 30px 0 30px;
}

.modes-label {
  margin-right: 10px;
  color: #4d5156;
  font-size: 22px;
  font-weight: 600;
}

.mode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: #4d5156;
  font-size: 15px;
}

.mode svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode:hover {
  color: #202124;
}

.mode[aria-pressed="true"] {
  border-bottom-color: var(--link);
  color: var(--link);
}

/* Composer, after the T3 Code chat composer */

.composer-wrap {
  position: relative;
  max-width: 712px;
  margin: 0 auto;
}

.composer {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.04),
    0 8px 24px -6px rgb(0 0 0 / 0.08);
  transition:
    border-color 150ms,
    box-shadow 150ms;
}

.composer:focus-within {
  border-color: #d4d4d8;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.05),
    0 12px 32px -8px rgb(0 0 0 / 0.14);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  max-height: 320px;
  padding: 16px 18px 4px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.55;
  field-sizing: content;
}

.composer textarea::placeholder {
  color: var(--faint);
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px 10px 10px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.control {
  position: relative;
  min-width: 0;
}

.divider {
  width: 1px;
  height: 16px;
  margin: 0 4px;
  background: var(--border);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.pill > span:not(.pill-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill:hover,
.pill[aria-expanded="true"] {
  background: var(--hover);
  color: var(--fg);
}

.pill[data-set="true"] {
  color: var(--fg);
}

.pill:disabled {
  cursor: default;
  opacity: 0.5;
  background: transparent;
}

.pill-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
}

.pill-icon svg {
  width: 16px;
  height: 16px;
  color: var(--fg);
}

.pill-glyph {
  width: 15px;
  height: 15px;
}

.chev {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.send-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.count {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.count[data-near="true"] {
  color: #c2410c;
}

.send {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  transition:
    background 120ms,
    transform 120ms;
}

.send:hover {
  background: var(--primary-hover);
}

.send:active,
.send[data-pressed="true"] {
  transform: scale(0.9);
}

.send svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Popovers */

.popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: 290px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.04),
    0 16px 40px -8px rgb(0 0 0 / 0.18);
  animation: pop 120ms ease-out;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

.popover-title {
  margin: 4px 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 14px;
}

.option:hover {
  background: var(--hover);
}

.option span {
  display: grid;
  gap: 1px;
}

.option b {
  font-weight: 500;
}

.option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.option svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}

.option[aria-pressed="true"] svg {
  visibility: visible;
}

.popover-field {
  display: grid;
  gap: 5px;
  margin: 6px 8px 4px;
  font-size: 12px;
  color: var(--muted);
}

.popover-field input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  font-size: 14px;
  color: var(--fg);
}

.popover-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(0.488 0.217 264 / 0.15);
}

.popover-field input:disabled {
  background: var(--hover);
}

.popover-note {
  margin: 4px 8px 6px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
}

/* Buttons, after the search page */

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.button {
  height: 40px;
  padding: 0 18px;
  border: 1px solid #f1f3f4;
  border-radius: 4px;
  background: #f1f3f4;
  color: #3c4043;
  font-size: 15px;
}

.button:hover {
  border-color: #dadce0;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.1);
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.primary:hover {
  border-color: #3477e5;
  background: #3477e5;
}

.error {
  margin: 14px 0 0;
  color: #c5221f;
  text-align: center;
  font-size: 14px;
}

/* Result */

.result {
  max-width: 560px;
  margin: 26px auto 0;
  animation: pop 160ms ease-out;
}

.result-label {
  display: block;
  margin-bottom: 8px;
  text-align: center;
  font-size: 14px;
  color: #3c4043;
}

.result-row {
  display: flex;
  gap: 8px;
}

.result-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #c8c8c8;
  border-radius: 4px;
  background: #fafafa;
  font-size: 14px;
  outline: 0;
}

.result-row input:focus {
  border-color: var(--blue);
}

.copy-status {
  min-height: 20px;
  margin: 6px 0 0;
  color: #188038;
  text-align: center;
  font-size: 13px;
}

.cursor {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  pointer-events: none;
  transition: transform 900ms cubic-bezier(0.45, 0, 0.2, 1);
}

.cursor svg {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  translate: -2px -2px;
  fill: #fff;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.05));
}

.cursor-ping {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: oklch(0.488 0.217 264 / 0.25);
  opacity: 0;
}

.cursor[data-click] .cursor-ping {
  animation: status-ping 2s 1;
}

@keyframes status-ping {
  0% {
    opacity: 0.9;
    scale: 0.75;
    animation-timing-function: steps(8);
  }
  40%,
  100% {
    opacity: 0;
    scale: 2;
  }
}

body[data-playing="true"] .carousel,
body[data-playing="true"] .modes,
body[data-playing="true"] .actions {
  pointer-events: none;
}

/* Explanation, after the about block */

hr {
  max-width: 764px;
  margin: 56px auto 0;
  border: 0;
  border-top: 1px solid #dadce0;
}

.about {
  max-width: 712px;
  margin: 0 auto;
  text-align: center;
}

.about h2 {
  margin: 34px 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

.about h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.about p {
  margin: 0 0 14px;
  color: #4d5156;
  font-size: 15px;
  line-height: 1.6;
}

.footer {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #3c4043;
}

.footer nav {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.footer nav a {
  color: #3c4043;
}

@media (max-width: 720px) {
  main {
    padding-top: 12px;
  }
  .arrow {
    display: none;
  }
  .tiles {
    padding-inline: 16px;
    margin-inline: -16px;
  }
  .tile {
    width: 150px;
    height: 120px;
  }
  .logo {
    transform: scale(0.85);
  }
  .modes-label {
    display: none;
  }
  .modes {
    margin: 18px 0 30px;
  }
  .actions {
    flex-wrap: wrap;
  }
  .count {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.carousel[data-disabled="true"] .tiles {
  opacity: 0.4;
  pointer-events: none;
}
