/* AI Builds article detail styles — Developer Studio stylesheet.
 * GENERATED from partials/ — edit partials, then run:
 *   npm run build:article-css  (from widgets/adobe-ai-recipe-library)
 *   OR node stylesheets/ai-builds-article/bin/build-article-css.mjs
 * Scopes to body.rl-recipe-article. Pair with scripts/ai-builds-article.
 * Target: Figma ExL AI Recipe Library Detail Desktop (2344:2211)
 * Ship: tokens + page + sections + try-it + tags + Contribute CTA + Related.
 * Dormant (on disk, not concatenated): _replies.
 */
/* === partials/_tokens.css === */
/* Article CSS custom properties (Adobe Spectrum-ish / Figma R3). */

body.rl-recipe-article {
  --rl-brand:        #1473e6;
  --rl-brand-dark:   #0d66d0;
  --rl-text:         #2c2c2c;
  --rl-text-muted:   #686868;
  --rl-border:       #e8e8e8;
  --rl-surface:      #ffffff;
  --rl-page-bg:      #f5f5f5;
  --rl-banner-bg:    #f8f8f8;
  --rl-cta-bg:       #f3f8fe;
  --rl-radius:       12px;
  --rl-radius-sm:    8px;
  --rl-radius-lg:    16px;
  --rl-font:         adobe-clean, "Adobe Clean", "Segoe UI", system-ui, sans-serif;
}

/* === partials/_page.css === */
/* ── Page background ────────────────────────────────────────── */
body.rl-recipe-article .body-wrapper {
  background: var(--rl-page-bg);
}

/* Soft gradient wash behind content (Figma orbs ≈ subtle) */
body.rl-recipe-article .Template-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  background:
    radial-gradient(ellipse 60% 40% at 10% 20%, rgba(255, 180, 120, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 15%, rgba(120, 170, 255, 0.2), transparent 50%),
    radial-gradient(ellipse 45% 30% at 70% 60%, rgba(255, 140, 180, 0.12), transparent 50%);
}

body.rl-recipe-article .col--main {
  width: 68%;
}
body.rl-recipe-article .col--side {
  width: 30%;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
body.rl-recipe-article .main-navigation--breadcrumb-wrapper {
  background: var(--rl-surface);
  border-bottom: 1px solid var(--rl-border);
}
body.rl-recipe-article .breadcrumb-item-link {
  color: var(--rl-brand) !important;
}

/* ── Article card ───────────────────────────────────────────── */
body.rl-recipe-article .box.pagebox {
  background: var(--rl-surface);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* ── Header: white, black title (replaces purple gradient) ─── */
body.rl-recipe-article .topic__header {
  background: var(--rl-surface);
  padding: 28px 32px 16px;
  border-radius: 0;
  border-bottom: none;
}
body.rl-recipe-article .topic__title {
  color: var(--rl-text) !important;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 12px 0 8px;
  font-family: var(--rl-font);
}
body.rl-recipe-article .list--dot-seperated.text--meta,
body.rl-recipe-article .topic__header .text--meta {
  color: var(--rl-text-muted) !important;
  font-size: 0.875rem;
}
body.rl-recipe-article .topic__header .text--meta a,
body.rl-recipe-article .topic__header .text--meta li {
  color: var(--rl-text-muted) !important;
}
body.rl-recipe-article .topic__header .text--meta a:hover {
  color: var(--rl-brand) !important;
}

/* Chip-like meta for reply count when it is a link */
body.rl-recipe-article .topic__header a[href*="reply"],
body.rl-recipe-article .topic__header .qa-topic-reply-count a {
  color: var(--rl-brand) !important;
  text-decoration: none;
  font-weight: 500;
}

/* ── Author row ─────────────────────────────────────────────── */
body.rl-recipe-article .post__user__info {
  padding: 0 32px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  /* No border here — a bottom border bled through the disclaimer when
     the banner sat in the same vertical band. Divider is on the banner. */
  border-bottom: none;
  margin-bottom: 0;
}
body.rl-recipe-article .username.qa-username {
  color: var(--rl-text) !important;
  font-weight: 600;
  font-size: 0.9375rem;
}
body.rl-recipe-article .post__user__info .text--meta,
body.rl-recipe-article .post__user__info .user-rank {
  color: var(--rl-text-muted) !important;
  font-size: 0.8125rem;
}

/* ── Community disclaimer (injected) ────────────────────────── */
body.rl-recipe-article .rl-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 32px 16px;
  padding: 12px;
  background: var(--rl-banner-bg);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius);
  font-size: 0.875rem;
  color: var(--rl-text);
  line-height: 1.5;
  font-family: var(--rl-font);
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
body.rl-recipe-article .rl-info-banner__icon {
  flex-shrink: 0;
  color: var(--rl-text-muted);
  font-size: 0.875rem;
  margin-top: 1px;
}

/* ── Post body ──────────────────────────────────────────────── */
body.rl-recipe-article .post__content {
  padding: 8px 32px 28px;
  font-family: var(--rl-font);
  /* Match hub body: Adobe Clean stack, 16px, #2B3346 */
  color: #2b3346;
  line-height: 1.65;
  font-size: 16px;
}

/*
 * FOUC gate for recipe topics (body.rl-recipe-article from gate/script).
 * Match legacy `.qa-topic-post-content` and new-editor class (CC may omit qa-).
 * Hide until script rewrites [SECTION] markers; 2s fallback if JS never runs.
 */
body.rl-recipe-article:not(.rl-article-ready) .post__content.qa-topic-post-content,
body.rl-recipe-article:not(.rl-article-ready) .post__content.post__content--new-editor {
  opacity: 0;
  animation: rl-article-reveal-fallback 0s linear 2s forwards;
}
body.rl-recipe-article.rl-article-ready .post__content.qa-topic-post-content,
body.rl-recipe-article.rl-article-ready .post__content.post__content--new-editor {
  opacity: 1;
  animation: none;
}
@keyframes rl-article-reveal-fallback {
  to { opacity: 1; }
}

/* === partials/_sections.css === */
/* Section group titles (About / Try it) */
body.rl-recipe-article .ai-section-group {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rl-text);
  margin: 28px 0 16px;
  line-height: 1.25;
  font-family: var(--rl-font);
}
body.rl-recipe-article .ai-section-group:first-child {
  margin-top: 12px;
}

/* Field labels (Summary, Goals, etc. — rewritten from [PROBLEM] markers) */
body.rl-recipe-article .ai-section-header {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rl-text-muted);
  margin: 24px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rl-border);
  font-family: var(--rl-font);
  line-height: 1.4;
}
body.rl-recipe-article .ai-section-header:first-child {
  margin-top: 0;
}

/* === partials/_try-it.css === */
/* Prompt / try-it pre block */
body.rl-recipe-article .rl-try-it-box {
  margin: 12px 0 16px;
  background: var(--rl-banner-bg);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius-sm);
  overflow: hidden;
}
body.rl-recipe-article .rl-try-it-pre {
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--rl-text);
  max-height: 280px;
  overflow: auto;
}
body.rl-recipe-article .rl-try-it-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  flex-wrap: wrap;
}
body.rl-recipe-article .rl-copy-btn {
  appearance: none;
  border: 1px solid var(--rl-border);
  background: var(--rl-surface);
  color: var(--rl-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--rl-font);
}
body.rl-recipe-article .rl-copy-btn:hover {
  border-color: var(--rl-brand);
  color: var(--rl-brand);
}
body.rl-recipe-article .rl-copy-btn:focus-visible {
  outline: 2px solid var(--rl-brand);
  outline-offset: 2px;
}
body.rl-recipe-article .rl-copy-btn.copied {
  border-color: #2d9f6f;
  color: #2d9f6f;
}

/* === partials/_tags.css === */
/* ── Post footer actions ────────────────────────────────────── */
body.rl-recipe-article .post__footer {
  padding: 14px 32px;
  border-top: 1px solid var(--rl-border);
  background: var(--rl-surface);
}
body.rl-recipe-article .post__action-link {
  color: var(--rl-text) !important;
  font-weight: 500;
  font-size: 0.875rem;
}
body.rl-recipe-article .post__action-link:hover {
  color: var(--rl-brand) !important;
}

/*
 * Public tag chips (Figma Tags row on Detail Desktop 2344:2211 / 2344:2366).
 * CC only renders *public* tags here (.qa-tags-list). Moderator tags
 * (type:/stage:/cat: …) are Control-only and never appear in the DOM —
 * see figma-gap-todo.md. Native "+ Modify tags" (li.canEditTags) is hidden;
 * public chips stay visible. Tags still via dual-write / Control / widget.
 */
body.rl-recipe-article .topic-public-tags-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 0;
  min-height: 0;
}
/* Hide empty public-tags band when no chips (script also collapses it). */
body.rl-recipe-article .rl-tags-label {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--rl-text);
  margin: 0;
  line-height: 1.5;
  font-family: var(--rl-font);
}
body.rl-recipe-article .qa-tags-list,
body.rl-recipe-article .public-tags.list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  float: none;
}
body.rl-recipe-article .qa-tags-list > li,
body.rl-recipe-article .public-tags > li {
  float: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.rl-recipe-article .qa-tags-list a,
body.rl-recipe-article .qa-tags-list .tag,
body.rl-recipe-article .public-tags a,
body.rl-recipe-article .public-tags .tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  box-sizing: border-box;
  background: #e8e8e8;
  color: var(--rl-text) !important;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 7px;
  text-decoration: none !important;
  white-space: nowrap;
  font-family: var(--rl-font);
}
body.rl-recipe-article .qa-tags-list a:hover,
body.rl-recipe-article .public-tags a:hover {
  background: #dedede;
  color: var(--rl-text) !important;
}
body.rl-recipe-article .qa-tags-list a:focus-visible,
body.rl-recipe-article .public-tags a:focus-visible {
  outline: 2px solid var(--rl-brand);
  outline-offset: 2px;
}
/* Hide native "+ Modify tags" (mod Control still edits tags; dual-write / widget too) */
body.rl-recipe-article li.canEditTags,
body.rl-recipe-article .canEditTags {
  display: none !important;
}

/* Header labels (CC badges), when present — same chip language */
body.rl-recipe-article .topic__labels-list:not(:empty) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
body.rl-recipe-article .topic__labels-list a,
body.rl-recipe-article .topic__labels-list .label,
body.rl-recipe-article .topic__labels-list .tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  background: #e8e8e8;
  color: var(--rl-text) !important;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 7px;
  text-decoration: none !important;
  font-family: var(--rl-font);
}

/* Hide off-brand emoji helpfulness */
body.rl-recipe-article .topic-helpfulness {
  display: none;
}

/* === partials/_contribute-cta.css === */
/*
 * Contribute CTA (injected) — Figma Post / Share a Build Banner `2344:2436`
 * Light blue card, dark copy, blue pill + how-to link (not solid brand banner).
 * Mobile Detail stacks actions (`2344:20426`).
 */
body.rl-recipe-article .rl-contribute-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
  margin: 16px 0 20px;
  padding: 24px;
  background: var(--rl-cta-bg);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius-lg);
  color: var(--rl-text);
  font-family: var(--rl-font);
  box-sizing: border-box;
}
body.rl-recipe-article .rl-contribute-cta__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
body.rl-recipe-article .rl-contribute-cta__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--rl-text);
}
body.rl-recipe-article .rl-contribute-cta__body {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--rl-text);
  max-width: 40rem;
}
body.rl-recipe-article .rl-contribute-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
body.rl-recipe-article .rl-contribute-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 18px 6px;
  min-height: 30px;
  background: var(--rl-brand);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 19px;
  border-radius: 100px;
  text-decoration: none !important;
  border: none;
  box-sizing: border-box;
}
body.rl-recipe-article .rl-contribute-cta__btn:hover {
  background: var(--rl-brand-dark);
}
body.rl-recipe-article .rl-contribute-cta__btn:focus-visible {
  outline: 2px solid var(--rl-brand-dark);
  outline-offset: 2px;
}
body.rl-recipe-article .rl-contribute-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rl-brand) !important;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none !important;
}
body.rl-recipe-article .rl-contribute-cta__link:hover {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}
body.rl-recipe-article .rl-contribute-cta__link:focus-visible {
  outline: 2px solid var(--rl-brand);
  outline-offset: 2px;
  border-radius: 2px;
}
body.rl-recipe-article .rl-contribute-cta__chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  body.rl-recipe-article .rl-contribute-cta__actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

/* === partials/_related.css === */
/* ── Related recipes sidebar ────────────────────────────────── */
body.rl-recipe-article .widget--related-topics {
  background: var(--rl-surface);
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius);
  padding: 20px;
  position: sticky;
  top: 16px;
}
body.rl-recipe-article .related-topics__widget-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rl-text-muted);
  margin: 0 0 14px;
}
body.rl-recipe-article .related-topics__topic {
  padding: 10px 0;
  border-bottom: 1px solid var(--rl-border);
}
body.rl-recipe-article .related-topics__topic:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
body.rl-recipe-article .related-topics__topic-title a {
  color: var(--rl-text) !important;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.4;
  text-decoration: none;
}
body.rl-recipe-article .related-topics__topic-title a:hover {
  color: var(--rl-brand) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
body.rl-recipe-article .related-topics__topic .text--meta {
  color: var(--rl-text-muted) !important;
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  body.rl-recipe-article .col--main,
  body.rl-recipe-article .col--side {
    width: 100%;
  }
  body.rl-recipe-article .topic__header,
  body.rl-recipe-article .post__content,
  body.rl-recipe-article .post__user__info,
  body.rl-recipe-article .post__footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  body.rl-recipe-article .rl-info-banner {
    margin-left: 20px;
    margin-right: 20px;
  }
}
