/* ─────────────────────────────────────────────────────────────
   AI in SkiaSharp — page-scoped styles.
   Built on top of the shared site theme in ../style.css. Only
   adds components that the landing page does not already provide:
   the honesty banner, the pipeline ("loop") diagram, workflow
   cards with a metadata grid, and the skills board.
   ───────────────────────────────────────────────────────────── */

/* Human-review accent — used by the loop legend and "human" nodes.
   Theme-aware so it stays legible on both the light and dark themes. */
:root { --human: #15a34a; }
[data-theme="dark"] { --human: #2bd673; }

/* ── Hero additions ───────────────────────────────────────── */

.ai-hero .hero-subtitle {
  margin-bottom: 32px;
}

.ai-honesty {
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 18px 22px;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.ai-honesty strong {
  font-weight: 700;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.stat {
  flex: 1 1 160px;
  max-width: 240px;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Shared section helpers ───────────────────────────────── */

.ai-section {
  padding: 64px 0;
}

.section-lead {
  max-width: 720px;
  margin: -24px auto 36px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
}

.subhead {
  max-width: 760px;
  margin: 40px auto 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ── Legend (who does what) ───────────────────────────────── */

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 32px;
  list-style: none;
  padding: 0;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex: none;
}

.swatch-agent { background: var(--accent); border-color: var(--accent); }
.swatch-auto { background: var(--bg-subtle); }
.swatch-human { background: var(--human); border-color: var(--human); }

/* ── The loop / pipeline diagram ──────────────────────────── */

.loop {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}

.loop-node {
  flex: 1 1 200px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  position: relative;
}

.loop-node[data-actor="agent"] { border-top: 3px solid var(--accent); }
.loop-node[data-actor="auto"] { border-top: 3px solid var(--text-secondary); }
.loop-node[data-actor="human"] { border-top: 3px solid var(--human); }

.loop-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.loop-node h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.loop-node p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.loop-actor {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.loop-arrow {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 700;
  flex: none;
}

.loop-note {
  max-width: 760px;
  margin: 28px auto 0;
  padding: 16px 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.loop-note code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}

/* ── Phase labels ─────────────────────────────────────────── */

.loop-band-label {
  max-width: 900px;
  margin: 36px auto 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.loop-band-label:first-of-type { margin-top: 8px; }

/* ── Vertical connector between the two phases ────────────── */

.flow-connect {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 26px auto;
  color: var(--text-secondary);
}

.flow-connect-arrow {
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
}

.flow-connect-label {
  font-size: 13px;
  font-style: italic;
}

/* ── Two parallel publish flows ───────────────────────────── */

.parallel {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 20px;
}

/* Shared box chrome for a phase / track container */
.flow-box,
.flow-row {
  padding: 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.flow-row {
  flex: 1 1 0;
  min-width: 0;
}

/* Inside the parallel block each track flows top-to-bottom */
.parallel .loop {
  flex-direction: column;
  align-items: stretch;
}

.parallel .loop-node {
  flex: none;
  max-width: none;
}

.parallel .loop-arrow {
  justify-content: center;
  transform: rotate(90deg);
}

.track-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.track-target {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

a.track-target:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .loop { flex-direction: column; align-items: stretch; }
  .loop-node { max-width: none; }
  .loop-arrow { justify-content: center; transform: rotate(90deg); }
  .parallel { flex-direction: column; }
}

/* ── Workflow cards ───────────────────────────────────────── */

.wf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.wf-card {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.wf-card:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.wf-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wf-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-right: auto;
}

.wf-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-agentic { background: var(--accent-subtle); color: var(--accent); }
.badge-auto {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.badge-model {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* metadata grid */
.wf-meta {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.wf-meta dt {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.wf-meta dd {
  color: var(--text-secondary);
  line-height: 1.5;
}

.wf-meta code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
}

.wf-foot {
  margin-top: 16px;
}

.wf-foot a {
  font-size: 13px;
  font-weight: 600;
}

/* ── Skills board ─────────────────────────────────────────── */

.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.skill-group {
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.skill-group h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-list li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.skill-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.skill-auto {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-subtle);
  border-radius: 999px;
  padding: 1px 7px;
}

/* ── Guardrails ───────────────────────────────────────────── */

.guard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.guard {
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

.guard-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent);
  margin-bottom: 14px;
}

.guard-icon svg { width: 20px; height: 20px; }

.guard h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.guard p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Call to action ───────────────────────────────────────── */

.cta {
  text-align: center;
}

.cta .hero-actions {
  flex-wrap: wrap;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .ai-section { padding: 44px 0; }
  .wf-grid { grid-template-columns: 1fr; }
  .ai-honesty { font-size: 15px; }
}
