/* Shared styles for /ai-builder/docs/* pages */

/* Top nav */
.docs-top-nav {
  position: sticky; top: 0; z-index: 100; background: #fff;
  border-bottom: 1px solid #e5e5e5; padding: 14px 28px;
  display: flex; align-items: center; gap: 0;
}
.docs-top-nav .nav-sep {
  display: inline-block; width: 1px; height: 18px; background: #d8d8d8;
  margin: 0 14px; flex-shrink: 0;
}
.docs-top-nav .course-label {
  font-size: 0.8125rem; font-weight: 500; color: #888; letter-spacing: 0.01em;
}
.docs-top-nav .back-link {
  margin-left: auto; font-size: 0.8125rem; color: #15b078;
  text-decoration: none; font-weight: 500;
}
.docs-top-nav .back-link:hover { text-decoration: underline; }

:root {
  --green: #15B078;
  --dark-green: #113A2D;
  --med-green: #185440;
  --green-bg: rgba(21, 176, 120, 0.10);
  --green-border: rgba(21, 176, 120, 0.25);
  --black: #000;
  --text-dark: #333;
  --text-light: #707070;
  --text-muted: #9B9B9B;
  --stroke: #E5E5E5;
  --offwhite: #F8F8F8;
  --white: #FFF;
  --orange: #EF8509;
  --orange-bg: rgba(239, 133, 9, 0.10);
  --blue: #3B7DFD;
  --blue-bg: rgba(59, 125, 253, 0.10);
  --purple: #7C3AED;
  --purple-bg: rgba(124, 58, 237, 0.08);
  --purple-border: rgba(124, 58, 237, 0.2);
  --code-bg: #1C1C1E;
  --code-text: #F8F8F2;
}

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

body {
  font-family: "Calibre", "Inter", Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 780px; margin: 0 auto; padding: 56px 40px 80px; }

.doc-header { border-bottom: 2px solid var(--stroke); padding-bottom: 32px; margin-bottom: 48px; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); margin-bottom: 10px; }
.eyebrow.purple { color: var(--purple); }
.doc-header h1 { font-size: 36px; font-weight: 700; color: var(--black); line-height: 1.2; margin-bottom: 12px; }
.doc-header p { font-size: 17px; color: var(--text-light); max-width: 560px; }

.section { margin-bottom: 48px; }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); margin-bottom: 8px; }
.section h2 { font-size: 24px; font-weight: 700; color: var(--black); margin-bottom: 20px; }
.section p { color: var(--text-dark); margin-bottom: 14px; line-height: 1.65; }
.section p:last-child { margin-bottom: 0; }

.steps { margin: 8px 0; }
.step { display: flex; gap: 16px; margin-bottom: 28px; align-items: flex-start; }
.step:last-child { margin-bottom: 0; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--green-bg); border: 1px solid var(--green-border); font-size: 13px; font-weight: 700; color: var(--med-green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.step-content { flex: 1; }
.step-content > strong { display: block; font-weight: 600; color: var(--black); margin-bottom: 4px; font-size: 16px; }
.step-content p strong { font-weight: 600; color: var(--black); }
.step-content p { font-size: 15px; color: var(--text-dark); margin: 0 0 8px; }
.step-content p:last-child { margin-bottom: 0; }

.callout { border-radius: 10px; padding: 20px 24px; margin: 16px 0; display: flex; gap: 16px; align-items: flex-start; }
.callout.green { background: var(--green-bg); border: 1px solid var(--green-border); }
.callout.orange { background: var(--orange-bg); border: 1px solid rgba(239,133,9,0.25); }
.callout.blue { background: var(--blue-bg); border: 1px solid rgba(59,125,253,0.25); }
.callout.purple { background: var(--purple-bg); border: 1px solid var(--purple-border); }
.callout.dark { background: var(--dark-green); border: 1px solid var(--dark-green); }
.callout-icon { flex-shrink: 0; font-size: 20px; margin-top: 2px; }
.callout-icon svg { width: 20px; height: 20px; }
.callout-body { flex: 1; }
.callout-body > strong { display: block; font-weight: 700; margin-bottom: 6px; font-size: 16px; }
.callout-body p strong, .callout-body li strong { font-weight: 700; color: var(--black); }
.callout.dark .callout-body > strong { color: var(--white); }
.callout.dark .callout-body p, .callout.dark .callout-body li { color: rgba(255,255,255,0.8); }
.callout-body p { font-size: 15px; color: var(--text-dark); margin: 0 0 8px; line-height: 1.55; }
.callout-body p:last-child { margin-bottom: 0; }
.callout-body ul { list-style: none; padding: 0; margin: 10px 0 0; }
.callout-body ul li { font-size: 15px; color: var(--text-dark); margin-bottom: 8px; padding-left: 20px; position: relative; line-height: 1.5; }
.callout-body ul li::before { content: "→"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.download-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; background: var(--green); color: #fff; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: background 0.15s; }
.download-btn:hover { background: var(--med-green); }
.download-btn svg { width: 16px; height: 16px; }

.prompt-block { background: var(--code-bg); border-radius: 10px; padding: 20px 24px; margin: 12px 0; font-family: "SF Mono","Fira Code","Consolas",monospace; font-size: 14px; line-height: 1.7; color: var(--code-text); }
.prompt-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); margin-bottom: 10px; display: block; }

code.inline, .inline-code { font-family: "SF Mono","Fira Code","Consolas",monospace; font-size: 13px; background: var(--offwhite); border: 1px solid var(--stroke); border-radius: 4px; padding: 2px 6px; color: var(--dark-green); }

.tells-grid { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.tell-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 14px 16px; background: var(--offwhite); border: 1px solid var(--stroke); border-radius: 10px; }
.tell-name { font-weight: 600; font-size: 14px; color: var(--black); }
.tell-desc { font-size: 14px; color: var(--text-light); line-height: 1.5; }

.divider { border: none; border-top: 1px solid var(--stroke); margin: 40px 0; }
.doc-footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--stroke); display: flex; align-items: center; justify-content: space-between; }
.doc-footer span { font-size: 13px; color: var(--text-muted); }

/* Collapsible toggles */
.toggle { border: 1px solid var(--stroke); border-radius: 10px; overflow: hidden; background: var(--white); margin: 8px 0; }
.toggle > summary { list-style: none; cursor: pointer; padding: 13px 18px; display: flex; align-items: center; gap: 10px; user-select: none; }
.toggle > summary::-webkit-details-marker { display: none; }
.toggle-icon { flex-shrink: 0; display: inline-flex; }
.toggle-title { font-size: 14.5px; font-weight: 600; flex: 1; }
.toggle-chev { margin-left: auto; flex-shrink: 0; color: inherit; opacity: 0.6; transition: transform 0.18s ease; }
.toggle[open] > summary .toggle-chev { transform: rotate(180deg); }
.toggle-body { padding: 4px 18px 18px; border-top: 1px solid var(--stroke); }
.toggle-body p { font-size: 15px; color: var(--text-dark); margin: 12px 0 8px; line-height: 1.6; }
.toggle-body p:first-child { margin-top: 12px; }
.toggle-body p:last-child { margin-bottom: 0; }
.toggle-body ul { padding-left: 20px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.toggle-body ul li { font-size: 15px; line-height: 1.55; color: var(--text-dark); }
.toggle-body strong { font-weight: 600; color: var(--black); }
.toggle-body ol { padding-left: 20px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.toggle-body ol li { font-size: 15px; line-height: 1.55; color: var(--text-dark); }

/* Concept toggle (blue) */
.toggle-concept > summary { background: rgba(59,125,253,0.06); color: var(--blue); }
.toggle-concept[open] > summary { border-bottom: 1px solid rgba(59,125,253,0.15); }
.toggle-concept:not([open]) > summary { border-bottom: none; }

/* Troubleshooting toggle (orange) */
.toggle-trouble > summary { background: var(--orange-bg); color: var(--orange); }
.toggle-trouble[open] > summary { border-bottom: 1px solid rgba(239,133,9,0.2); }
.toggle-trouble:not([open]) > summary { border-bottom: none; }
.toggle-trouble .toggle-body { background: rgba(255,255,255,0.55); }

/* Go further toggle (purple) */
.toggle-go > summary { background: var(--purple-bg); color: var(--purple); }
.toggle-go[open] > summary { border-bottom: 1px solid var(--purple-border); }
.toggle-go:not([open]) > summary { border-bottom: none; }

/* Prompt wrap + copy button */
.prompt-wrap { position: relative; }
.prompt-wrap .prompt-block { padding-right: 72px; }
.copy-btn { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: 6px; color: #aaa; font-size: 11.5px; font-weight: 600; padding: 4px 10px; cursor: pointer; font-family: inherit; transition: all 0.15s; letter-spacing: 0.02em; }
.copy-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.copy-btn.copied { color: var(--green); border-color: var(--green); background: rgba(21,176,120,0.12); }

/* Prompt note (how this works) */
.prompt-note-text { font-size: 13.5px; color: var(--text-light); line-height: 1.55; margin-top: 8px; }

/* Trouble list */
.trouble-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

@media (max-width: 600px) {
  .page { padding: 32px 20px 60px; }
  .doc-header h1 { font-size: 28px; }
  .tell-row { grid-template-columns: 1fr; gap: 4px; }
}
