/* Components for the redesigned pages (home, agents, pricing, mcp, guides,
   compare, faq). Loaded after chrome.css; never together with styles.css. */

h1, h2, h3 { font-weight: 500; margin: 0; }
p { margin: 0; }

.btn {
  display: inline-block; padding: 13px 22px; font-size: 15px; white-space: nowrap; flex: none;
  border: 1px solid var(--line); color: var(--ink);
}
.btn:hover { border-color: var(--mute); color: var(--ink); }
.btn-solid { background: var(--ink); color: var(--bg); font-weight: 500; border-color: var(--ink); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }


/* ---------- Hero ---------- */
.hero {
  padding: clamp(64px, 9vw, 120px) var(--gutter) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero .eyebrow { color: var(--label); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.hero h1 {
  margin-top: 24px; font-size: clamp(52px, 9vw, 124px); line-height: .95; letter-spacing: -0.045em; text-wrap: balance;
}
.hero .lede {
  margin-top: 28px; max-width: 580px; font-size: clamp(17px, 1.6vw, 20px); color: var(--body); text-wrap: pretty;
}
.hero-actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-code { margin: 72px 0 -1px; width: 100%; max-width: 920px; }

/* ---------- Code tabs (CSS only: every panel stays in the HTML) ---------- */
.tabs { border: 1px solid var(--line); background: var(--raised); text-align: left; min-width: 0; }
.tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.tabs-bar { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs-bar label {
  cursor: pointer; padding: 12px 18px; white-space: nowrap; font-family: var(--mono); font-size: 13px;
  color: var(--soft); border-right: 1px solid var(--line);
}
.tabs-bar label:hover { color: var(--ink); }
.tabs-meta { margin-left: auto; display: flex; align-items: center; gap: 14px; padding: 8px 16px; }
.tabs-meta span { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.copy {
  all: unset; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--label);
  border: 1px solid var(--line); padding: 4px 9px;
}
.copy:hover { color: var(--ink); border-color: var(--mute); }
.copy:focus-visible { outline: 2px solid var(--accent); }
.tabs .panel { display: none; }
.tabs .code {
  display: block; margin: 0; padding: 22px 24px 28px; min-height: 300px;
  font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--code);
  overflow-x: auto; white-space: pre;
}
.tabs .code .c { color: var(--mute); }
.tabs .code .v { color: var(--accent); }
#t-curl:checked ~ .tabs-bar label[for="t-curl"],
#t-py:checked ~ .tabs-bar label[for="t-py"],
#t-ts:checked ~ .tabs-bar label[for="t-ts"] {
  color: var(--ink); background: var(--bg); box-shadow: inset 0 -2px 0 var(--accent);
}
#t-curl:focus-visible ~ .tabs-bar label[for="t-curl"],
#t-py:focus-visible ~ .tabs-bar label[for="t-py"],
#t-ts:focus-visible ~ .tabs-bar label[for="t-ts"] { outline: 2px solid var(--accent); outline-offset: -2px; }
#t-curl:checked ~ #p-curl, #t-py:checked ~ #p-py, #t-ts:checked ~ #p-ts { display: block; }

/* ---------- Works with (marquee) ---------- */
.works { display: flex; align-items: stretch; overflow: hidden; }
.works-label {
  flex: none; padding: 22px clamp(20px, 3vw, 32px); border-right: 1px solid var(--line);
  display: flex; align-items: center; background: var(--bg); position: relative; z-index: 1;
}
.works-track-wrap {
  flex: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.works-track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; }
.works-track li {
  padding: 22px 32px; font-family: var(--mono); font-size: 14px; color: var(--bright); white-space: nowrap;
  display: flex; align-items: center; gap: 32px;
}
.works-track li::after { content: ""; width: 5px; height: 5px; background: var(--dim); }
.works-track.is-moving { animation: marquee 48s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .works-track.is-moving { animation: none; } }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.split-text { padding: clamp(48px, 7vw, 96px) var(--gutter); display: flex; flex-direction: column; gap: 22px; }
.split-side { border-left: 1px solid var(--line); min-width: 0; }
.h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
.body { color: var(--body); max-width: 460px; text-wrap: pretty; }
.pull {
  margin: auto 0 0; padding: 24px 0 0; border-top: 1px solid var(--line);
  font-size: 19px; line-height: 1.45; letter-spacing: -0.01em; max-width: 460px;
}
.pull .mono { font-size: 16px; color: var(--accent); }
.caps-note { font-family: var(--mono); font-size: 12px; color: var(--mute); }

/* Example inbox */
.inbox { background: var(--raised); display: flex; flex-direction: column; }
.inbox-head {
  display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px;
}
.inbox-head .addr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-head .meta { margin-left: auto; flex: none; white-space: nowrap; color: var(--mute); }
.inbox ol { list-style: none; margin: 0; padding: 0; }
.msg {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background .8s;
}
.msg::before { content: ""; width: 7px; height: 7px; margin-top: 8px; background: var(--dim); }
.msg:first-child::before { background: var(--accent); }
.msg.fresh { background: oklch(0.84 0.16 150 / .08); }
.msg-from {
  font-family: var(--mono); font-size: 12px; color: var(--mute);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-subj { font-size: 15px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg time { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.msg:first-child time { color: var(--accent); }
.inbox-json {
  margin: 0; padding: 18px 20px; flex: 1; font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  color: var(--bright); overflow-x: auto; white-space: pre;
}
.inbox-json .c { color: var(--mute); }

/* ---------- Header + cell grids ---------- */
.sec-head { padding: clamp(48px, 7vw, 96px) var(--gutter) 48px; display: flex; flex-direction: column; gap: 20px; }
.sec-head .body { max-width: 520px; }
.cells {
  display: grid; gap: 1px; background: var(--line); border-top: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 280px)), 1fr));
}
.cell { background: var(--bg); padding: 32px var(--cell) 44px; display: flex; flex-direction: column; gap: 12px; }
.cell h3 { font-size: 22px; letter-spacing: -0.02em; }
.cell p { color: var(--body); font-size: 15px; text-wrap: pretty; }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.step-n + h3 { margin-top: 24px; }
.feat { gap: 10px; min-height: 220px; }
.feat:hover { background: var(--raised); }
.tag {
  align-self: flex-start; margin-bottom: auto; font-family: var(--mono); font-size: 12px; color: var(--accent);
  border: 1px solid var(--line); padding: 4px 8px; white-space: nowrap;
}
.tag + h3 { margin-top: 36px; }
.case { padding: 32px clamp(20px, 3vw, 32px) 40px; color: var(--ink); }
.case:hover { background: var(--raised); color: var(--ink); }
.case-n { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 13px; color: var(--mute); }
.case h3 { margin-top: 40px; font-size: 21px; }

/* ---------- Guides list ---------- */
.more-link { align-self: flex-start; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--cell); border-bottom: 1px solid var(--line); font-size: 15.5px;
}
.list a::after { content: "→"; font-family: var(--mono); color: var(--mute); }
.list a:hover { background: var(--raised); color: var(--accent); }
.list li:last-child a { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 32px minmax(0, 1fr) 20px; gap: 12px;
  padding: 22px var(--cell); font-size: 17px; font-weight: 500; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--raised); }
.faq .numeral { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--mute); padding-top: 3px; }
.faq .q { text-wrap: pretty; }
.faq .mark::after { content: "+"; font-family: var(--mono); color: var(--mute); }
.faq details[open] .mark::after { content: "−"; color: var(--accent); }
.faq .a {
  padding: 0 var(--cell) 26px calc(var(--cell) + 44px); color: var(--body); font-size: 15px; line-height: 1.6;
  text-wrap: pretty; max-width: 760px;
}
.faq .a a { color: var(--accent); }

/* ---------- Closing CTA ---------- */
.cta {
  padding: clamp(72px, 10vw, 140px) var(--gutter); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 24px; background: var(--raised);
}
.cta h2 { font-size: clamp(44px, 7vw, 96px); line-height: .95; letter-spacing: -0.045em; }
.cta p { max-width: 560px; color: var(--body); font-size: 18px; text-wrap: pretty; }
.cta .btn { margin-top: 8px; padding: 14px 24px; font-size: 16px; }
