/* Furrow: the page for people building AI agents. It is built from the landing page's pieces
   (landing.css) and the two-column first screen of pages.css. What is its own is here: a code
   window holding the real files, the weight of one answer read as pages and as a file, the
   way a request is designed to go, and what is free beside what has to be run. */

/* The first screen: under the title, a well of the site's dithered light with a request
   standing in it beside what comes back. Both stand on the well's floor, the way a piece of
   the workspace does in a tile, so their feet are square. The title is set a little smaller
   than on the other pages, so the two are in sight before any scrolling. */
.agents-hero {
  padding-top: clamp(120px, 15svh, 164px);
}

.agents-hero h1 {
  max-width: 12em;
  font-size: clamp(46px, 6.1vw, 92px);
}

.agents-hero .lede {
  max-width: 40em;
  margin-top: 22px;
}

.agents-hero .actions {
  margin-top: 26px;
}

.sky-hero.agents-hero .term-well {
  margin-top: clamp(52px, 5.4vw, 76px);
}

.agents-hero .term-well {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: 20px;
  align-items: end;
  min-height: 0;
  padding: clamp(40px, 4.5vw, 64px) clamp(20px, 3.4vw, 48px) 0;
  border-radius: 28px;
}

.term-well .term {
  border-radius: 20px 20px 0 0;
}

.agents-hero .caption {
  margin: 18px auto 0;
  text-align: center;
}

/* What one request carries: a name and its value to a line. */
.ask-rows {
  display: grid;
  gap: 17px;
  margin: 0;
  padding: 12px 22px 30px;
}

.ask-rows div {
  display: grid;
  grid-template-columns: 5.6em minmax(0, 1fr);
  column-gap: 12px;
  align-items: baseline;
}

.ask-rows dt {
  color: var(--soft);
  font: 500 12px/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ask-rows dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.45;
}

.ask-rows dd span {
  margin-right: 10px;
  color: var(--soft);
}

.ask-rows dd b {
  color: var(--ember);
  font-weight: 500;
}

@media (max-width: 900px) {
  .agents-hero .term-well {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Stacked, the request no longer stands on the well's floor, so its foot is rounded. */
  .ask-card {
    border-radius: 16px;
  }
}

/* The three files, as tabs that are still real radios: focusable, and the arrow keys move
   between them. */
.term-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.term-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.term-files label {
  position: relative;
  cursor: pointer;
}

.term-files input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.term-files span {
  display: block;
  padding: 7px 14px 8px;
  border-radius: 999px;
  color: var(--soft);
  font: 500 13px/1.3 var(--mono);
}

.term-files label:hover span {
  color: var(--fg);
}

.term-files input:checked + span {
  background: rgba(244, 239, 233, 0.09);
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    inset 0 1px 0 rgba(255, 244, 230, 0.14);
  color: var(--fg);
}

.term-files input:focus-visible + span {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.term-size {
  padding-right: 6px;
}

/* The request, cut into the window like a well, with its copy button at the end. A long
   address breaks inside the well rather than widening it. */
.term-request {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 20px 0;
  padding: 8px 8px 8px 20px;
  border-radius: 18px;
  background: var(--well);
  box-shadow: var(--sunk);
}

.term-command {
  flex: 1;
  min-width: 0;
  color: var(--body);
  font: 400 14px/1.5 var(--mono);
  overflow-wrap: anywhere;
}

.term-command b {
  color: var(--ember);
  font-weight: 500;
}

/* The button's three words are set in one cell, so it is as wide as the longest and does not
   move when the word changes. */
.term-copy {
  display: grid;
  flex: none;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(244, 239, 233, 0.08);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--fg);
  font: 500 13px/1.2 var(--mono);
  cursor: pointer;
}

.term-copy:hover {
  background: rgba(244, 239, 233, 0.14);
}

.term-copy span {
  grid-area: 1 / 1;
  text-align: center;
}

.term-copy [data-word],
.term-copy[data-state] span {
  visibility: hidden;
}

.term-copy[data-state="copied"] [data-word="copied"],
.term-copy[data-state="selected"] [data-word="selected"] {
  visibility: visible;
  color: var(--ember);
}

/* The file itself. It keeps its own lines and wraps the long ones, and scrolls inside the
   window, so the page never does sideways. */
.term-text {
  max-height: 560px;
  margin: 0;
  padding: 24px 28px 30px;
  overflow: auto;
  color: var(--body);
  font: 400 13.5px/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  scrollbar-color: rgba(244, 239, 233, 0.2) transparent;
  scrollbar-width: thin;
}

/* The window clips anything outside it, so the ring is drawn inside its edge. */
.term-text:focus-visible {
  outline-offset: -4px;
}

/* A file's lines, tinted by what they are. Here and in the smaller files further down. The
   passages are the brightest thing in a file, and their key and the answer's numbers are ember,
   because they are the evidence. */
.md-title,
.md-head,
.md-source {
  color: var(--fg);
  font-weight: 600;
}

.md-source {
  font-weight: 500;
}

.md-key {
  color: var(--soft);
}

.md-mark,
.md-passage .md-key {
  color: var(--ember);
}

.md-passage {
  color: var(--fg);
}

.md-link {
  color: var(--iris);
}

/* Why markdown: one answer's reading, measured. Each row is a well, and what was read fills it
   to scale from the left. The pages are filled with the start of their own HTML; the file is a
   sliver of ember. */
.weigh-rows {
  display: grid;
  gap: 30px;
  padding: 30px 32px 40px;
}

.weigh-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 24px;
  row-gap: 12px;
  align-items: end;
}

.weigh-name {
  color: var(--fg);
  font-size: 16px;
  line-height: 1.4;
}

.weigh-name span {
  display: block;
  color: var(--soft);
  font-size: 14.5px;
}

.weigh-count {
  font: 400 clamp(32px, 3.6vw, 48px) / 0.9 var(--display);
  letter-spacing: -0.01em;
}

.weigh-well {
  grid-column: 1 / -1;
  height: 72px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--well);
  box-shadow: var(--sunk);
}

.weigh-fill {
  display: block;
  width: calc(var(--share) * 100%);
  height: 100%;
  padding: 7px 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #3D1C58 0%, #24113A 100%);
  box-shadow: inset 0 1px 0 rgba(255, 244, 230, 0.16);
  color: #A63C86;
  font: 400 10px/14px var(--mono);
  word-break: break-all;
}

.weigh-ours .weigh-fill {
  padding: 0;
  background: var(--ember);
  box-shadow: 0 0 16px 2px rgba(255, 122, 92, 0.75);
}

.weigh-ours .weigh-count {
  color: var(--ember);
}

/* How it will work: the three legs of one request, each a piece of the interface under its
   title. The pieces start on one line, however long the words over them run. */
.route-legs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto 1fr;
  column-gap: 20px;
  padding: 28px 32px 32px;
}

.route-legs > li {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
}

.route-legs h3 {
  font: 400 clamp(25px, 2.3vw, 31px) / 1.08 var(--display);
  letter-spacing: -0.01em;
}

.route-legs > li > p {
  max-width: 24em;
  margin-top: 10px;
  color: var(--body);
  font-size: 15.5px;
}

/* Here the pieces stand on nothing, so they are rounded all round and throw their shadow down. */
.route-legs .ui {
  margin-top: 24px;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--edge), var(--lift);
}

.ui-bar--between {
  border-top: 1px solid var(--line);
}

.engines {
  display: grid;
  gap: 2px;
  padding: 12px 18px 16px;
}

.engines li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  padding: 6px 0;
  font-size: 15px;
}

/* A pixel for each engine; the library's is lit, since it is asked first. */
.engines li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--line-strong);
  transform: translateY(-2px);
}

.engines-own::before {
  background: var(--ember);
}

.engines b {
  font-weight: 500;
}

.engines span {
  margin-left: auto;
  color: var(--soft);
  font-size: 13.5px;
}

.lead {
  padding: 14px 18px 16px;
}

.lead-title {
  margin-top: 4px;
  color: var(--iris);
  font: 400 21px/1.2 var(--display);
}

.lead-snippet {
  margin-top: 6px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
}

.lead-passage {
  padding: 14px 18px 20px;
  font: 400 20px/1.3 var(--display);
}

.lead-passage mark {
  margin: 0 -2px;
  padding: 0 2px;
  border-radius: 3px;
  background: var(--wash);
  color: inherit;
  text-decoration: underline var(--ember) 2px;
  text-underline-offset: 0.2em;
}

/* A path keeps its case in a bar of capitals. */
.ui-path {
  letter-spacing: 0;
  text-transform: none;
}

/* A file, or a piece of one, set small inside a piece of the interface. */
.snip {
  margin: 0;
  padding: 14px 18px 18px;
  color: var(--body);
  font: 400 12.5px/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.snip a {
  color: var(--fg);
  text-decoration-color: var(--ember);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.snip a:hover {
  color: #fff;
}

.route-after {
  max-width: 44em;
  margin-top: 36px;
  color: var(--body);
}

/* Access: the library's real index, a question it does not hold yet, and under both the plan
   for anyone without a model of their own, said quietly, then what is real today. */
.snip--index {
  padding-bottom: 24px;
  font-size: 13px;
}

.fresh {
  padding: 18px 20px 24px;
}

.fresh-q {
  font: 400 clamp(23px, 2.2vw, 28px) / 1.15 var(--display);
}

.fresh-then {
  margin-top: 12px;
  color: var(--body);
  font-size: 15px;
}

.access-plan {
  max-width: 40em;
  margin-top: 44px;
  color: var(--body);
  font-size: 16px;
}

#access .today {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .route-legs {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 44px;
  }

  .route-legs > li {
    display: block;
  }
}

@media (max-width: 720px) {
  .term-bar {
    padding: 12px 14px;
  }

  .term-files span {
    padding: 6px 11px 7px;
    font-size: 12px;
  }

  .term-size {
    padding-left: 6px;
  }

  .term-request {
    gap: 10px;
    margin: 14px 14px 0;
    padding: 6px 6px 6px 14px;
  }

  .term-command {
    font-size: 12.5px;
  }

  .term-text {
    max-height: 62svh;
    padding: 18px 18px 22px;
    font-size: 12.5px;
  }

  .weigh-rows {
    gap: 24px;
    padding: 22px 20px 28px;
  }

  .weigh-rows li {
    column-gap: 14px;
  }

  .weigh-well {
    height: 52px;
    border-radius: 14px;
  }

  .route-legs {
    padding: 22px 20px 24px;
  }

  .access-plan {
    margin-top: 36px;
  }
}
