.grok-landing { --task-font: ui-monospace, SFMono-Regular, Consolas, monospace; }
.grok-landing .header-inner { min-height: 67px; }
.grok-landing .header nav a { min-height: 44px; }
.grok-hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(115deg, var(--paper), #e4eff4);
}
.grok-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(24px, 5vw, 74px);
  padding-block: clamp(34px, 5.6vw, 75px);
}
.grok-hero h1 { font-size: clamp(3rem, 5.85vw, 5.5rem); line-height: .96; letter-spacing: -.075em; }
.grok-hero h1 span { color: #4c6a48; }
.grok-finder { margin-top: clamp(22px, 3vw, 34px); }

.grok-playbooks {
  min-width: 0;
  margin-bottom: clamp(42px, 7vw, 85px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 16px 38px -32px rgb(21 63 52 / .45);
}
.dispatch-scene {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 34px -32px rgb(21 63 52 / .48);
  background: var(--sky);
}
.dispatch-crew {
  width: 100%; height: 100%;
  object-fit: cover;
}
.playbook-body {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  align-items: start; gap: clamp(18px, 5vw, 64px);
  padding: clamp(14px, 3.2vw, 36px);
}
.playbook-intro { padding-top: 8px; }
.playbook-body h2 { margin: 0 0 12px; font-size: clamp(1.42rem, 2.6vw, 2.1rem); }
.playbook-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px; padding: 4px; margin-bottom: 9px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
}
.playbook-picker button {
  min-height: 44px; padding: 5px 3px; border: 1px solid transparent; border-radius: 5px;
  background: transparent; color: var(--muted); font: 600 clamp(.72rem, 1.3vw, .87rem)/1.2 var(--display);
}
.playbook-picker button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.playbook-picker button[aria-pressed="false"]:hover { background: var(--sky); color: var(--ink); }
.playbook-steps {
  --step-height: 64px;
  position: relative; display: grid; grid-auto-rows: minmax(var(--step-height), auto);
  min-block-size: calc(3 * var(--step-height));
  list-style: none; margin: 0; padding: 0;
}
.playbook-steps:not(:empty)::before {
  content: ""; position: absolute; pointer-events: none;
  inset: calc(var(--step-height) / 2) auto calc(var(--step-height) / 2) 12px;
  border-left: 1px solid var(--line);
}
.playbook-step { position: relative; }
.playbook-bot {
  display: grid; width: 100%; min-height: 100%; align-items: center;
  grid-template-columns: 25px 32px minmax(0, 1fr) 32px;
  gap: clamp(7px, 1.3vw, 13px); padding: 5px 0; border: 0; border-radius: 6px;
  background: transparent; text-align: left;
}
.playbook-order {
  display: grid; place-items: center; width: 25px; height: 25px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--white);
  color: var(--muted); font: 500 .75rem/1 var(--task-font);
}
.grok-playbooks .playbook-bot .bot-avatar { width: 29px; height: 28px; grid-area: auto; align-self: center; }
.playbook-label { display: grid; gap: 2px; min-width: 0; }
.playbook-task { color: var(--muted); font-size: .79rem; line-height: 1.19; }
.playbook-bot-name { font-size: 1.06rem; font-weight: 650; line-height: 1.15; }
.playbook-bot .round-arrow { width: 30px; height: 30px; justify-self: end; }
.playbook-bot:is(:hover, :focus-visible) .round-arrow { background: var(--ink); color: var(--white); border-color: var(--ink); }
.playbook-bot:is(:hover, :focus-visible) .playbook-bot-name { text-decoration: underline; text-underline-offset: 3px; }
.playbook-steps.is-switching .playbook-bot { animation: playbook-reveal .27s var(--ease) both; }
.playbook-steps.is-switching li:nth-child(2) .playbook-bot { animation-delay: .045s; }
.playbook-steps.is-switching li:nth-child(3) .playbook-bot { animation-delay: .09s; }
@keyframes playbook-reveal {
  from { opacity: .48; transform: translateY(5px); }
}
.task-preview {
  --task-highlight: #ffda7c;
  display: grid;
  gap: 5px;
  min-width: 0;
  margin-bottom: 12px;
  font: 500 clamp(.9rem, 1.55vw, 1.12rem)/1.4 var(--task-font);
  overflow-wrap: anywhere;
}
.task-prefix { color: var(--muted); font-size: .82em; }
.task-examples { display: grid; min-width: 0; color: var(--ink); }
.task-example {
  grid-area: 1 / 1; visibility: hidden; opacity: 0;
  font-weight: 700;
  transition: opacity .15s ease-out, visibility .15s step-end;
}
.task-example.is-current { visibility: visible; opacity: 1; transition: opacity .2s ease-out; }
.task-letter, .task-marker { padding-block: .06em; background: var(--task-highlight); }
.task-letter:first-child, .task-marker {
  padding-inline-start: .25em;
  border-start-start-radius: .2em;
  border-end-start-radius: .2em;
}
.task-letter:last-child, .task-marker {
  padding-inline-end: .25em;
  border-start-end-radius: .2em;
  border-end-end-radius: .2em;
}
.task-example.is-current.is-typing .task-letter {
  animation: type-task-letter .13s ease-out calc(140ms + var(--letter-delay)) both;
}
@keyframes type-task-letter { from { opacity: 0; } }
.grok-landing .finder {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 0;
  background: var(--white);
  border-radius: 8px;
}
.grok-landing .finder:focus-within { border-color: var(--focus); }
.grok-landing .finder input { height: 39px; }
.grok-landing .task-chips { margin-top: 9px; align-items: center; }
.grok-landing .task-chips button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 5px 11px; border: 1px solid transparent;
  border-radius: 999px; background: #dcebe6; color: var(--ink); font-weight: 600;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.grok-landing .task-chips button span { color: #4a665a; line-height: 1; }
.grok-landing .task-chips button:hover { border-color: #9eb6ab; background: #e9f2ee; }

.grok-recommendation {
  margin-top: 15px;
  padding: 10px 12px 0;
  background: rgb(252 253 255 / .7);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .22s var(--ease);
}
.grok-recommendation:has(.is-search-match) { border-color: #7d9d90; }
.grok-recommendation h2 {
  color: var(--muted);
  font: 600 .77rem/1.35 var(--display);
  letter-spacing: 0;
}
.finder-match {
  --match-title-size: clamp(1.02rem, 2vw, 1.32rem);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  font-size: .88rem;
  line-height: 1.35;
  /* Two title lines, three summary lines, and the button's gap and padding. */
  block-size: calc(2.24 * var(--match-title-size) + 3lh + 19px);
  scroll-margin-block: 16px;
}
.finder-match .bot-row { border: 0; animation: dispatch-match-in .46s var(--ease) both; }
@keyframes dispatch-match-in { from { opacity: .48; } }
.finder-match .bot-row h3 { height: 100%; }
.grok-landing .finder-match .bot-open {
  height: 100%; min-height: 0; padding: 6px 0 8px; grid-template-columns: 39px minmax(0, 1fr) auto;
  gap: 12px; border-radius: 6px;
}
.grok-landing .finder-match .bot-open:hover { background: transparent; }
.finder-match .bot-open:focus-visible { outline-offset: 3px; }
.finder-match .bot-label, .finder-match .bot-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.finder-match .bot-label { font-size: var(--match-title-size); -webkit-line-clamp: 2; }
.finder-match .bot-icon, .finder-match .bot-title, .finder-match .bot-action { grid-row: 1; }
.finder-match .bot-title { grid-column: 2; }
.finder-match .bot-action { grid-column: 3; }
.finder-match .bot-summary { font-size: inherit; line-height: inherit; -webkit-line-clamp: 3; }
.grok-landing .finder-match .empty { align-self: center; border: 0; padding: 12px 0; }

.grok-landing .directory { padding-block: clamp(56px, 8vw, 100px); }
.grok-landing .directory .section-top { padding-top: 0; border-top: 0; }
.grok-landing .directory h2 { font-size: clamp(2.8rem, 5.2vw, 4.9rem); }
.grok-landing .directory-tools {
  position: sticky; top: 0; z-index: 1;
  margin: 24px 0 0; padding-block: 8px;
  border-block: 1px solid var(--line); background: var(--paper);
}
.grok-landing .directory-tools .filters { gap: 5px; }
.grok-landing .directory-tools .filters button { border-radius: 6px; padding-inline: 14px; }
.grok-landing .directory-tools .filters button:not([aria-pressed="true"]):hover { background: #e5eeeb; }
.grok-landing .bot-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(224px, 100%), 1fr));
  gap: 12px; padding-top: 16px;
}
.grok-landing .bot-list .bot-row { border: 0; border-radius: 8px; }
.grok-landing .bot-list .bot-row h3 { height: 100%; }
.grok-landing .bot-list .bot-open {
  grid-template: "avatar action" auto "title title" 1fr / 1fr auto;
  align-items: start; gap: 14px; height: 100%; min-height: 172px; padding: 18px;
  border: 1px solid var(--line); border-radius: inherit; background: var(--white);
  scroll-margin-block: 84px 12px;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.grok-landing .bot-list h3 { border-radius: inherit; }
.grok-landing .bot-list .bot-open:is(:hover, :focus-visible) {
  background: #ecf4f1; border-color: #93afa4;
}
.grok-landing .bot-list .bot-open:focus-visible { outline-offset: 2px; }
.grok-landing .bot-list .bot-icon { grid-area: avatar; }
.grok-landing .bot-list .bot-action { grid-area: action; align-self: center; gap: 6px; }
.grok-landing .bot-list .round-arrow { width: 30px; height: 30px; flex-basis: 30px; }
.grok-landing .bot-list .bot-title { grid-area: title; min-width: 0; gap: 6px; }
.grok-landing .bot-list .bot-label { font-size: 1.26rem; font-weight: 650; }
.grok-landing .bot-list .bot-summary { font-size: .9rem; }
@media (hover: hover) {
  .grok-landing .bot-list .bot-open:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry) {
    .grok-landing .bot-list .bot-row {
      animation: enter-roster linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }
    @keyframes enter-roster { from { opacity: .8; transform: translateY(5px); } }
  }
}
.grok-landing .bot-avatar {
  --bot-color: #61a7e6;
  --bot-shape: 46% 54% 50% 50% / 54% 46% 54% 46%;
  --bot-tilt: -10deg;
  position: relative; display: block; width: 37px; height: 36px;
  background: var(--bot-color); border-radius: var(--bot-shape);
  transform: rotate(var(--bot-tilt));
  box-shadow: inset 0 -3px 0 #15342d1f, 0 2px 0 #203b3221;
  transition: transform .24s var(--ease);
}
.bot-avatar::before, .bot-avatar::after {
  content: ""; position: absolute; top: 35%; left: 36%; width: 10%; height: 26%;
  background: #173430; border-radius: 99px; transform: rotate(-17deg);
}
.bot-avatar::after { left: 58%; top: 32%; height: 23%; }
.bot-avatar[data-look="pen"] { --bot-color: #a590e9; --bot-shape: 45% 45% 50% 50% / 62% 52% 48% 38%; --bot-tilt: -17deg; }
.bot-avatar[data-look="link"] { --bot-color: #58c8b1; --bot-shape: 63% 41% 50% 43% / 52% 62% 43% 46%; --bot-tilt: 13deg; }
.bot-avatar[data-look="chat"] { --bot-color: #f27783; --bot-shape: 48% 52% 48% 48% / 48% 52% 58% 52%; --bot-tilt: 8deg; }
.bot-avatar[data-look="notes"] { --bot-color: #f4bd63; --bot-shape: 33% 55% 40% 42% / 37% 40% 55% 50%; --bot-tilt: -13deg; }
.bot-avatar[data-look="computer"] { --bot-color: #82bf72; --bot-shape: 40% 51% 45% 42% / 48% 34% 55% 55%; --bot-tilt: 13deg; }
.bot-avatar[data-look="book"] { --bot-color: #eb8cb6; --bot-shape: 57% 51% 54% 40% / 47% 60% 51% 45%; --bot-tilt: -6deg; }
@media (prefers-reduced-motion: no-preference) {
  .bot-open:is(:hover, :focus-visible) .bot-avatar { transform: translateY(-2px) rotate(0deg) scale(1.08); }
}
.newsletter-panel {
  border-top: 1px solid var(--line);
  background: #e7f0f7;
}
.newsletter-inner {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 5vw, 70px); align-items: center;
  padding-block: clamp(36px, 6vw, 76px);
}
.grok-newsletter-intro { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 32px); }
.grok-newsletter-intro img { width: clamp(104px, 12vw, 156px); flex-shrink: 0; }
.grok-newsletter-intro h2 { font-size: clamp(1.8rem, 4vw, 3.3rem); margin-bottom: 9px; text-wrap: balance; }
.grok-newsletter-intro p { color: var(--muted); line-height: 1.45; }
@media (max-width: 960px) {
  .finder-match .hire-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .grok-landing .finder { gap: 5px; padding: 6px; }
  .grok-landing .finder .button { font-size: .81rem; min-height: 44px; padding-inline: 9px; gap: 6px; }
  .grok-landing .finder .finder-field { padding: 0 0 0 5px; }
  .grok-landing .finder input { font-size: .91rem; }
  .grok-landing .task-chips { gap: 5px; }
  .grok-landing .task-chips button { font-size: .73rem; padding-inline: 8px; }
}
@media (max-width: 700px) {
  .grok-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 30px 26px; }
  .grok-hero h1 { font-size: clamp(2.86rem, 11vw, 5.2rem); }
  .playbook-body { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .playbook-intro { padding-top: 0; }
  .grok-landing .header nav { gap: 12px; }
  .grok-landing .header nav a { font-size: .8rem; }
  .grok-landing .finder-match .bot-open { grid-template-columns: 31px minmax(0, 1fr) auto; gap: 10px; }
  .grok-landing .finder-match .bot-icon { align-self: center; }
  .grok-landing .bot-avatar { width: 29px; height: 28px; }
  .grok-landing .directory-tools { gap: 3px 8px; }
  .grok-landing .directory-tools .filters button { padding-inline: 9px; }
  .grok-landing .bot-list { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; }
  .grok-landing .bot-list .bot-open { min-height: 152px; padding: 14px; gap: 10px; }
  .grok-landing .bot-list .bot-label { font-size: 1.08rem; }
  .grok-landing .bot-list .bot-open { scroll-margin-block-start: 128px; }
  .newsletter-inner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .grok-landing .header-inner { gap: 8px; }
  .grok-landing .header .wordmark { font-size: 1.07rem; gap: 6px; }
  .grok-landing .header .brand-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .task-examples { min-block-size: 2lh; }
  .grok-landing .task-chips button { padding-inline: 8px; gap: 4px; }
  .playbook-steps { --step-height: 70px; }
  .playbook-bot-name { font-size: .97rem; }
  .grok-landing .header .nav-newsletter { padding-inline: 8px; gap: 4px; }
}
