/* Grok Bot setup page. Scoped to .gl; extends the Cartographic Instrument tokens from site.css. */
main.gl-main { padding: 0; }
.gl-draft {
  margin: 0;
  max-width: none;
  padding: 0.7rem var(--gutter);
  background: #fff3cd;
  color: #332701;
  font: 500 0.82rem/1.4 var(--font-mono);
  text-align: center;
}
.gl { --gl-w: 74rem; --gl-charcoal: #17191c; --gl-charcoal-2: #23262b; --gl-paper: #f5f5f4; }
.gl h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); letter-spacing: -0.04em; line-height: 1.02; margin: 0 0 1rem; }
.gl h3 { font-size: 1.12rem; letter-spacing: -0.02em; margin: 0 0 0.35rem; }

/* Hero: the site's Prussian grid, at full strength */
.gl-hero {
  --focus: #7dc0ff;
  color: #f2f6fc;
  background:
    radial-gradient(70% 80% at 92% 8%, rgba(4, 102, 200, 0.42), transparent 62%),
    linear-gradient(to right, rgba(151, 157, 172, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(151, 157, 172, 0.09) 1px, transparent 1px),
    linear-gradient(165deg, var(--prussian-blue-3) 0%, var(--prussian-blue-2) 60%, var(--prussian-blue) 100%);
  background-size: 100% 100%, 48px 48px, 48px 48px, 100% 100%;
  border-bottom: 1px solid rgba(151, 157, 172, 0.22);
}
.gl-hero-inner {
  max-width: var(--gl-w);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) var(--gutter) clamp(3rem, 7vw, 5.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.gl-hero h1 {
  font-size: clamp(2.9rem, 7.4vw, 5.9rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0 0 1.6rem;
  color: #ffffff;
}
.gl-hero h1 span { display: block; }
.gl-h1-accent { color: #7cc0ff; }
.gl-lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: #cbd5e6; max-width: 34ch; margin: 0 0 2rem; }
.gl-facts {
  list-style: none;
  margin: 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid rgba(151, 157, 172, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  font: 500 0.86rem/1.3 var(--font-mono);
  color: #e5eefc;
}
.gl-facts li { display: inline-flex; align-items: center; gap: 0.55rem; }
.gl-facts li::before { content: ''; width: 7px; height: 7px; background: var(--smart-blue); border: 1px solid #7cc0ff; }

/* Connect panel: Grok-compatible charcoal/white, matching the consent surface and icon plate */
.gl-connect {
  --focus: #ffffff;
  background: var(--gl-charcoal);
  color: var(--gl-paper);
  border: 1px solid #34383e;
  border-radius: 24px;
  padding: clamp(1.35rem, 3vw, 2rem);
  box-shadow: 0 28px 60px -24px rgba(0, 6, 20, 0.85);
  min-width: 0;
}
.gl-connect-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.gl-connect h2 { font-size: 1.3rem; letter-spacing: -0.025em; margin: 0; color: #ffffff; }
.gl-mark { width: 2.5rem; height: 2.5rem; border-radius: 12px; background: var(--gl-charcoal-2); display: inline-grid; place-items: center; flex-shrink: 0; color: var(--gl-paper); }
.gl-connect-hint { margin: 0 0 0.6rem; font-size: 0.9rem; color: #b9bcc1; }
.gl-connect pre {
  --focus: #ffffff;
  margin: 0 0 1rem;
  background: #0d0e10;
  border: 1px solid #34383e;
  border-radius: 14px;
  color: #f5f5f4;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gl-connect pre code { overflow-wrap: anywhere; }
.gl button.gl-copy {
  width: 100%;
  min-height: 3.25rem;
  border-radius: 999px;
  background: #f5f5f4;
  border: 1px solid #f5f5f4;
  color: #17191c;
  font: 600 1rem/1.3 var(--font-sans);
}
.gl.gl button.gl-copy.gl-copy:not(:disabled):hover { background: #dedede; border-color: #dedede; }
.gl-endpoint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #34383e;
  min-width: 0;
}
.gl-endpoint-label { font: 500 0.75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: #b9bcc1; flex-shrink: 0; }
.gl-endpoint code { flex: 1; min-width: 0; font-size: 0.88rem; color: #ffffff; overflow-wrap: anywhere; }
.gl button.gl-copy-quiet {
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid #4a4f56;
  color: #f5f5f4;
  font: 500 0.84rem/1.2 var(--font-sans);
  flex-shrink: 0;
}
.gl.gl button.gl-copy-quiet.gl-copy-quiet:not(:disabled):hover { background: var(--gl-charcoal-2); border-color: #8a8f96; }
.gl-status { margin: 0.75rem 0 0; min-height: 1.4em; font-size: 0.85rem; color: #b9bcc1; }
.gl-status-ink { color: var(--ink-muted); margin-top: 0.4rem; }
.gl-status-ink:empty { min-height: 0; margin: 0; }

/* Higher specificity beats the shared site button hover, keeping copy buttons in their own palette. */
/* Shared band rhythm */
.gl-band { max-width: var(--gl-w); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); }
.gl-band + .gl-band { border-top: 1px solid var(--border); }

/* Route: three stations on one line, the site's grid cells as markers */
.gl-route h2 { max-width: 20ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.gl-stations {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 3vw, 3rem);
  counter-reset: station;
  position: relative;
}
.gl-stations::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent) 0 66%, var(--border-strong) 66%);
}
.gl-stations li { position: relative; padding-top: 2.4rem; min-width: 0; }
.gl-station { position: absolute; top: 0; left: 0; width: 20px; height: 20px; background: var(--ground); border: 2px solid var(--accent); }
.gl-stations li:last-child .gl-station { background: var(--accent); }
.gl-stations p { margin: 0; color: var(--ink-muted); }
.gl-token { font-family: var(--font-mono); font-size: 0.92em; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--gl-charcoal); color: #ffffff; white-space: nowrap; }
.gl-say { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-top: 0.75rem !important; }
.gl-say code { padding: 0.45rem 0.7rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink); font-size: 0.86rem; }
.gl-band button.gl-copy-quiet { color: var(--ink); border-color: var(--border-strong); }
.gl .gl-band.gl-band button.gl-copy-quiet.gl-copy-quiet:not(:disabled):hover { background: var(--signal-soft); border-color: var(--accent); }

/* Query anatomy: the prompt itself is the artifact */
.gl-query { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.gl-query-intro p { color: var(--ink-muted); font-size: 1.08rem; }
.gl-anatomy { margin: 0; min-width: 0; }
.gl-anatomy pre {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.85;
  white-space: pre-wrap;
  background:
    linear-gradient(to right, rgba(151, 157, 172, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(151, 157, 172, 0.07) 1px, transparent 1px),
    var(--code-bg);
  background-size: 32px 32px, 32px 32px, auto;
}
.gl-anatomy pre code { overflow-wrap: anywhere; }
.gl-hl { position: relative; padding: 0.1rem 0.15rem; border-bottom: 2px solid #7cc0ff; color: #ffffff; }
.gl-hl::after {
  content: attr(data-n);
  position: relative;
  top: -0.7em;
  margin-left: 0.2rem;
  font-size: 0.62em;
  font-weight: 700;
  color: #7cc0ff;
}
.gl-anatomy-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 0.6rem; }
.gl-anatomy-bar .gl-status { margin: 0; }
.gl-legend { all: unset; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; margin-top: 1.75rem; }
.gl-legend div { min-width: 0; }
.gl-legend dt { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--ink); margin: 0 0 0.25rem; }
.gl-legend dd { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }
.gl-n { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; font: 700 0.75rem/1 var(--font-mono); color: #ffffff; background: var(--sapphire); }

/* Pricing ledger */
.gl-pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.gl-free { display: flex; align-items: flex-end; gap: 1rem; margin: 2rem 0 0; max-width: none; }
.gl-free-n { font-size: clamp(5.5rem, 13vw, 9rem); font-weight: 700; line-height: 0.8; letter-spacing: -0.06em; color: var(--accent); font-variant-numeric: tabular-nums; }
.gl-free-text { font-size: 1.1rem; font-weight: 500; max-width: 16ch; padding-bottom: 0.2rem; }
.gl-ledger-wrap { min-width: 0; }
.gl-ledger { border: 1px solid var(--border-strong); background: var(--surface); }
.gl-ledger caption { text-transform: none; letter-spacing: 0; font: 500 0.88rem/1.4 var(--font-sans); color: var(--ink-muted); padding: 0 0 0.75rem; border: 0; }
.gl-ledger thead { background: var(--prussian-blue-2); }
.gl-ledger th, .gl-ledger td { padding: 1rem 1.25rem; }
.gl-ledger thead th { font: 600 0.75rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.gl-ledger thead th:last-child, .gl-ledger td { text-align: right; }
.gl-ledger tbody th, .gl-ledger tbody td { font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 700; letter-spacing: -0.03em; }
.gl-ledger tbody td { color: var(--accent); }
.gl-ledger tbody tr:nth-child(even) { background: var(--surface-alt); }
.gl-terms { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.7rem; color: var(--ink-muted); font-size: 0.95rem; }
.gl-terms li { display: grid; grid-template-columns: 0.9rem 1fr; gap: 0.6rem; }
.gl-terms li::before { content: ''; width: 6px; height: 6px; margin-top: 0.6em; background: var(--accent); }

/* Habit: fifty cells, the allowance at actual scale */
.gl-habit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.gl-habit-copy p { color: var(--ink-muted); font-size: 1.05rem; }
.gl-month { margin: 0; }
.gl-cells { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; max-width: 30rem; }
.gl-cells span { aspect-ratio: 1; border: 1.5px solid var(--border-strong); }
.gl-cells span:nth-child(-n+22) { background: var(--accent); border-color: var(--accent); }
.gl-month figcaption { margin-top: 1rem; color: var(--ink-muted); max-width: 44ch; font-size: 0.95rem; }
.gl-month strong { color: var(--ink); }

/* Details */
.gl-details h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
.gl-facts-list { all: unset; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2rem; margin: 1.5rem 0 0; }
.gl-facts-list div { min-width: 0; padding-top: 0.9rem; border-top: 2px solid var(--ink); }
.gl-facts-list dt { font: 600 0.78rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); margin: 0 0 0.45rem; }
.gl-facts-list dd { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }
.gl-colophon { margin: 3rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--ink-faint); max-width: none; }
.gl-colophon a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: no-preference) {
  .gl-cells span:nth-child(-n+22) { animation: gl-fill 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .gl-cells span:nth-child(-n+22):nth-child(n+6) { animation-delay: 0.12s; }
  .gl-cells span:nth-child(-n+22):nth-child(n+11) { animation-delay: 0.24s; }
  .gl-cells span:nth-child(-n+22):nth-child(n+16) { animation-delay: 0.36s; }
  .gl-cells span:nth-child(-n+22):nth-child(n+21) { animation-delay: 0.48s; }
  .gl button.gl-copy, .gl button.gl-copy-quiet { transition: background-color 0.15s ease, border-color 0.15s ease; }
}
@keyframes gl-fill { from { background: transparent; border-color: var(--border-strong); } }

@media (max-width: 900px) {
  .gl-hero-inner, .gl-query, .gl-pricing, .gl-habit { grid-template-columns: minmax(0, 1fr); }
  .gl-facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .gl-hero-inner { padding-top: 2.5rem; gap: 2.25rem; }
  .gl-stations { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-left: 2.25rem; }
  .gl-stations::before { top: 0; bottom: 0; left: 9px; right: auto; width: 2px; height: auto; background: linear-gradient(to bottom, var(--accent) 0 70%, var(--border-strong) 70%); }
  .gl-stations li { padding-top: 0; }
  .gl-station { left: -2.25rem; }
  .gl-legend, .gl-facts-list { grid-template-columns: minmax(0, 1fr); }
  .gl-endpoint { flex-wrap: wrap; }
  .gl-endpoint code { flex-basis: 100%; order: 2; }
  .gl-endpoint .gl-copy-quiet { order: 1; margin-left: auto; }
  .gl-free-n { font-size: 6rem; }
}
