/* bld402 — shared styles
   Light theme adaptation of run402 design language.
   Fonts: Inter (UI) + JetBrains Mono (technical).
   Palette: white bg, #1a1a2e text, #0066cc accent (blue). */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #FFFFFF;
  color: #1a1a2e;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Hero: full viewport (root page) ---- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.hero-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #0066cc;
  border: 1px solid rgba(0, 102, 204, 0.3);
  border-radius: 4px;
  padding: 5px 12px;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .accent { color: #0066cc; }

.hero .subtitle {
  font-size: 18px;
  color: #6B7280;
  max-width: 520px;
  margin-bottom: 48px;
}

.human-link {
  display: inline-block;
  background: rgba(0, 102, 204, 0.08);
  color: #0066cc;
  border: 1px solid rgba(0, 102, 204, 0.3);
  border-radius: 8px;
  padding: 16px 40px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.human-link:hover {
  background: rgba(0, 102, 204, 0.15);
  border-color: rgba(0, 102, 204, 0.5);
  transform: translateY(-1px);
}

.scroll-hint {
  margin-top: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #9CA3AF;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ---- Agent docs section (below hero) ---- */
.docs {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  border-top: 1px solid #E5E7EB;
}

.docs-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #0066cc;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}

/* ---- Content pages (human-facing, step pages) ---- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 60px;
}

/* Typography */
h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: #374151;
  margin: 28px 0 8px;
}

p { margin: 0 0 14px; }

strong { color: #1a1a2e; }

a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Lists */
ol, ul {
  margin: 8px 0 14px 24px;
}

li { margin-bottom: 4px; }

/* Code */
code {
  font-family: 'JetBrains Mono', monospace;
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #92400E;
}

pre {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0 16px;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: #374151;
  font-size: 13px;
}

/* Blockquote */
blockquote {
  border-left: 3px solid #0066cc;
  padding-left: 16px;
  margin: 12px 0;
  color: #6B7280;
}

hr {
  border: none;
  border-top: 1px solid #E5E7EB;
  margin: 32px 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid #D1D5DB;
  color: #1a1a2e;
  font-weight: 600;
}

td {
  padding: 6px 12px;
  border-bottom: 1px solid #E5E7EB;
  color: #374151;
}

tr:hover td { background: rgba(0, 102, 204, 0.03); }

/* ---- Top banner (back to AI page) ---- */
.top-banner {
  text-align: center;
  padding: 10px 16px;
  margin: 0;
  background: #F3F4F6;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  border-bottom: 1px solid #E5E7EB;
}

.top-banner a {
  color: #0066cc;
  text-decoration: none;
}

.top-banner a:hover {
  text-decoration: underline;
}

/* ---- Site header ---- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header a.logo {
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  color: #1a1a2e;
  letter-spacing: -0.5px;
}

.site-header a.logo .accent {
  color: #0066cc;
}

/* Navigation */
.human-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  border: none;
  padding: 0;
  margin: 0;
}

.human-nav a {
  font-weight: 500;
  font-size: 15px;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.15s;
}

.human-nav a:hover {
  color: #0066cc;
  text-decoration: none;
}

/* ---- Site footer ---- */
.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: #9CA3AF;
  border-top: 1px solid #E5E7EB;
}

.site-footer a {
  color: #6B7280;
  text-decoration: none;
}

.site-footer a:hover {
  color: #0066cc;
}

/* ---- Cards (template gallery, showcase) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(0, 102, 204, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 16px;
}

.card p {
  font-size: 14px;
  color: #6B7280;
}

/* Card with link */
.card a.card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #0066cc;
}

/* ---- Agent instruction sections (step pages) ---- */
#agent-instructions {
  border-left: 3px solid #0066cc;
  padding-left: 20px;
  margin-top: 24px;
}

/* ---- Prompt box (example text) ---- */
.prompt-box {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  padding: 24px;
  border-radius: 12px;
  text-align: left;
  max-width: 480px;
  margin: 32px auto;
}

.prompt-box .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #9CA3AF;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.prompt-box .text {
  font-size: 17px;
  font-style: italic;
  color: #374151;
  line-height: 1.5;
}

/* ---- CTA buttons ---- */
.cta-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: #0066cc;
  color: #FFFFFF;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #0052a3;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-secondary {
  display: inline-block;
  padding: 12px 32px;
  background: #F3F4F6;
  color: #374151;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, transform 0.15s;
}

.btn-secondary:hover {
  background: #E5E7EB;
  transform: translateY(-1px);
  text-decoration: none;
}

/* ---- Accessibility ---- */
a:focus-visible, button:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #0066cc;
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-link:focus { top: 0; }

/* ---- Utility ---- */
.muted { color: #6B7280; }
.small { font-size: 14px; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 12px 16px;
  }

  .human-nav {
    gap: 16px;
    justify-content: center;
  }

  .page {
    padding: 40px 16px 40px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .cta-group {
    flex-direction: column;
    align-items: center;
  }
}
