/* for-agents.css - page-specific styles for humanintheloop.stream/for-agents (v1.18).
   Everything already covered by tokens.css, reset.css, layout.css, base-v15.css,
   masthead.css, footer.css and alerts.css is NOT redeclared here - this file is
   only the page's own novel elements. See decision.md at
   docs/design/2026-08-29-for-agents/decision.md for the design rationale behind
   every rule below; treat that file as canon, this file as its port. */

:root {
  /* AA-safe tint of --violet for small/bold text-on-dark roles this page
     introduces (type-tag--api, limits-strip__tag, address-row__verb,
     url-card__meta dt). Base --violet fails WCAG AA (~3.6-4.4:1) at these
     sizes; this tint clears 5.5:1+ everywhere it is used, same hue.
     Backgrounds/borders/dots on this page keep --violet. Scoped to this
     file only - see the Design note in Task 1 of the implementation plan
     for why this is not promoted into tokens.css. */
  --violet-text: #A78BFA;
}

/* ============================================================
   PAGE HEADER - slim panel strip, not a centered hero
============================================================ */
.fa-header {
  padding: var(--space-48) 0 var(--space-32);
  border-bottom: 1px solid var(--border);
}
.fa-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ember);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 var(--space-12);
}
.fa-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-16);
  max-width: 18ch;
}
.fa-dek {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 56ch;
  margin: 0;
}
.fa-dek strong { color: var(--white); font-weight: 600; }

/* ============================================================
   CONSOLE LAYOUT - two-column split at desktop, stacked mobile
============================================================ */
.fa-console {
  padding: var(--space-48) 0 var(--space-64);
}
.console-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-32);
  align-items: start;
}
@media (min-width: 1024px) {
  .console-grid {
    grid-template-columns: minmax(390px, 420px) 1fr;
    gap: var(--space-48);
  }
}

/* ---- Left rail: persistent URL card ---- */
.console-rail { min-width: 0; }
@media (min-width: 1024px) {
  /* 60px = the real masthead-nav's height (44px logo + 6px top/bottom
     padding + 1px border), NOT the mockup's 84px - the mockup's simplified
     standalone chrome used a 40px inline brand mark, ~4px shorter than the
     real site's 44px <img> logo, and had no reason to guess low. Step 6
     verifies this against the real rendered topbar and corrects it if the
     rail overlaps or gaps visibly. */
  .console-rail { position: sticky; top: 60px; }
}

.url-card {
  background: var(--surface);
  border: 1px solid rgba(224, 90, 43, 0.35);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  position: relative;
  overflow: hidden;
}
.url-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ember) 0%, var(--violet) 100%);
}
.url-card__glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: var(--ember);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.09;
  pointer-events: none;
}
.url-card__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ember);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.url-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--white);
}
.url-readout {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding: var(--space-8);
  background: rgba(224, 90, 43, 0.07);
  border: 1px solid rgba(224, 90, 43, 0.25);
  border-radius: var(--radius-md);
}
/* ---- address bar: GET tag + single-line URL ---- */
.address-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-width: 0;
  container-type: inline-size;
  container-name: addressbar;
}
.address-row__verb {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--violet-text);
  background: rgba(139, 92, 246, 0.12);
  border-right: 1px solid var(--border);
}
.address-row code {
  flex: 1;
  min-width: 0;
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  line-height: 1.4;
  padding: 6px 8px;
  /* Container-proportional: scales to the address bar's own width (a
     container query, not the viewport) so the full URL never wraps or
     clips at 375px or 1280px alike. */
  font-size: clamp(0.66rem, 3.6cqw, 0.8rem);
}
.url-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ember);
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-base);
}
.url-copy-btn:hover { background: var(--ember-hover); }
.url-copy-btn:active { transform: scale(0.98); }
.url-copy-btn[data-copied="true"] {
  background: var(--surface);
  color: var(--ember);
  border: 1px solid var(--ember);
}
.url-copy-btn svg { flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .url-copy-btn { transition: none; }
  .url-copy-btn:active { transform: none; }
}

.url-card__caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.url-card__caption strong { color: var(--white); font-weight: 500; }

/* ---- About-the-show meta: fills the rail's vertical gutter at 1280px ---- */
.url-card__about {
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}
.url-card__about-kicker {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-12);
}
.url-card__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin: 0;
}
.url-card__meta-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
}
.url-card__meta dt {
  flex: 0 0 64px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet-text);
}
.url-card__meta dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--white);
  opacity: 0.9;
  line-height: 1.5;
}

.url-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
.url-stat {
  padding: var(--space-12);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}
.url-stat__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.url-stat__label {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.url-card__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}
.url-card__link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color var(--transition-base);
}
.url-card__link:hover { color: var(--white); }

/* ---- Right column ---- */
.console-main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-48); }
.console-block h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 var(--space-16);
  color: var(--white);
}

/* Honest limits - calm single-row strip, alerts-bar language */
.limits-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-12);
  padding: var(--space-16) var(--space-16);
  background: linear-gradient(90deg, rgba(139,92,246,0.10), rgba(139,92,246,0.02)), var(--surface);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--radius-md);
}
.limits-strip__tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-text);
  background: rgba(0,0,0,0.2);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.limits-strip__body {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--white);
  opacity: 0.9;
  line-height: 1.7;
  flex: 1;
  min-width: 240px;
}
.limits-strip__body .sep { color: var(--muted); margin: 0 2px; }

/* Curl cards - tool-card visual language */
.curl-stack { display: flex; flex-direction: column; gap: var(--space-16); }
.curl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  /* min-width:0 so a column-flex child never inflates past its grid
     track from a long unbroken content string. */
  min-width: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.curl-card:hover {
  border-color: rgba(224, 90, 43, 0.35);
  box-shadow: 0 0 0 1px rgba(224, 90, 43, 0.08), 0 4px 24px rgba(224, 90, 43, 0.05);
}
.curl-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}
.curl-card__cmd {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--white);
  line-height: 1.6;
  word-break: break-all;
}
.curl-card__cmd .prompt { color: var(--ember); font-weight: 700; margin-right: 6px; }
.curl-card__returns {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.curl-card__returns strong { color: var(--white); font-weight: 600; }

.curl-card__response {
  margin-top: var(--space-4);
  border-top: 1px solid var(--border);
  padding-top: var(--space-16);
}
.curl-card__response-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-8);
}
.curl-card__response pre {
  margin: 0;
  padding: var(--space-16);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  /* Wrapping keeps every JSON value fully visible - no invisible-overlay
     horizontal scrollbar that reads as clipped content. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--white);
}
.curl-card__response code { font-family: var(--font-mono); }
.json-key { color: var(--violet-text); }
.json-str { color: var(--white); opacity: 0.85; }
.json-bool { color: var(--ember); }
.json-muted { color: var(--muted); }

/* What it serves - loose pill wrap */
.serves-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}
.serves-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 14px;
}
.serves-pill::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ember);
  flex-shrink: 0;
}
.serves-pill:nth-child(even)::before { background: var(--violet); }

/* Reference link list - footer language */
.ref-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.ref-list li { border-top: 1px solid var(--border); }
.ref-list li:first-child { border-top: none; }
.ref-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-16);
  text-decoration: none;
  transition: background var(--transition-base);
}
.ref-list a:hover { background: rgba(255,255,255,0.02); }
.ref-list__name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ember);
}
.ref-list__desc {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 2px;
}
.ref-list__arrow { font-family: var(--font-mono); color: var(--muted); flex-shrink: 0; }
.ref-note {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 var(--space-16);
}

/* Page-scoped type-tag - do not confuse with resources.css's own
   .type-tag/.type-tag--skill/--walkthrough/--api, which is a separate
   component used only in the homepage Tools grid (Task 4). */
.type-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid;
  flex-shrink: 0;
}
.type-tag--api {
  color: var(--violet-text);
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.1);
}

/* ---- Address bar at mobile: GET tag moves above the URL line so the
   URL itself gets the readout's full inner width. ---- */
@media (max-width: 480px) {
  .address-row {
    flex-direction: column;
  }
  .address-row__verb {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 4px 8px;
    align-self: flex-start;
  }
  .address-row code {
    padding: 6px 4px;
  }
}
