/* Blueprint & Programmatic SEO Detail Stylesheet */

.blueprint-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.blueprint-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.badge-pill {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.badge-pill.category {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--brand-cyan);
}

.badge-pill.difficulty {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--text-highlight);
}

.blueprint-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.blueprint-lead {
  font-size: 1.1875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 52rem;
  margin-bottom: 1.5rem;
}

.blueprint-quick-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.quick-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.quick-spec-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.quick-spec-value {
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: #fff;
}

/* Two Column Layout: Main Content + Sticky Sandbox / TOC */
.blueprint-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 2.5rem;
  margin-bottom: 4rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .blueprint-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Interactive Parameter Injection Sandbox (The Core Tool) */
.sandbox-card {
  position: sticky;
  top: 5.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg), 0 0 25px rgba(6, 182, 212, 0.1);
  max-width: 100%;
}

.sandbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border-color);
}

.sandbox-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.sandbox-status {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--brand-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sandbox-fields-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.param-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.param-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.param-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.param-key-tag {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--brand-cyan);
}

.param-input, .param-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  color: #fff;
  transition: border-color 0.15s ease;
}

.param-input:focus, .param-select:focus {
  border-color: var(--border-accent);
  outline: none;
}

.param-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.live-preview-box {
  background-color: #070b12;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.prompt-stream-content {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
  user-select: text;
}

.prompt-stream-content mark {
  background-color: rgba(56, 189, 248, 0.25);
  color: var(--brand-cyan);
  padding: 0.1rem 0.2rem;
  border-radius: var(--radius-sm);
}

.sandbox-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-copy-injected {
  flex: 1;
  background: var(--gradient-brand);
  border: none;
  color: #fff;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-copy-injected:hover {
  transform: translateY(-1px);
}

.btn-reset-params {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  cursor: pointer;
}

.btn-reset-params:hover {
  border-color: var(--border-hover);
  color: #fff;
}

/* Deep Technical Guide (Content Body) */
.blueprint-content {
  color: var(--text-secondary);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.blueprint-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.015em;
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blueprint-content h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.25rem;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.blueprint-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand-cyan);
  margin: 2rem 0 0.75rem;
}

.blueprint-content p {
  line-height: 1.8;
  margin-bottom: 1.35rem;
  font-size: 1.05rem;
  color: #cbd5e1;
}

.blueprint-content ul, .blueprint-content ol {
  padding-left: 1.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.blueprint-content li {
  margin-bottom: 0.65rem;
}

.blueprint-content strong {
  color: #fff;
  font-weight: 600;
}

/* Code Snippet Blocks */
.code-block-wrapper {
  background: #060911;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin: 1.75rem 0;
  overflow: hidden;
  max-width: 100%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.15rem;
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.code-copy-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.code-block-wrapper pre {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Tables for Hyperparameters & Model Benchmarks */
.blueprint-table-wrapper {
  overflow-x: auto;
  margin: 1.75rem 0 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 100%;
  background: var(--bg-card);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.spec-table th {
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Callout Boxes */
.callout-box {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
}

.callout-box.tip {
  background-color: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #e0f2fe;
}

.callout-box.warning {
  background-color: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fef3c7;
}

.callout-box.guardrail {
  background-color: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #d1fae5;
}

.callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.callout-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* FAQ Accordion Section */
.faq-section {
  margin: 3.5rem 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
  cursor: pointer;
  gap: 1rem;
}

.faq-icon-arrow {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--brand-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding: 0 1.25rem 1.25rem;
  max-height: 500px;
}

/* Related Blueprints Internal Silo Cross-linking */
.related-blueprints-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
}
