/* ------------------------------------------------------------------
   tools/assets/script-generator.css (v=1, 2026-10-19): page-only rules for
   /roblox-ai-script-generator, rebuilt on the game maker's system
   (<body class="sl gm sg">: tokens.css, landing.css, seo-landing.css,
   game-maker.css, tools.css, maker-box.css). Everything here is an .sg-*
   name or scoped under body.sg, so the shared files stay as they are.
   Pieces:
     .sg-example: the example prompt, its Explorer placement and the script
       under the prompt box (.sg-example-ask, .sg-tree, .sg-example-code)
     .sg-facts: the three key facts (the .info-fact markup is kept, so the
       credits deck's replace text still matches)
     .sg-runs: the three "You type / RoCode does" cards
     .sg-table: the demand table and the keyword rules
     .sg-duo, .sg-final: the two cards under the table, the centred close
   Static apart from hover; prefers-reduced-motion removes the transitions.
   ------------------------------------------------------------------ */

/* ---------- the example under the prompt box ---------- */
.sg-example {
  display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr); gap: 16px;
  width: 100%; max-width: 1120px; margin: 48px auto 0; text-align: left;
}
.sg-example-ask {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 22px 22px;
  border: 1px solid rgba(167, 139, 250, .3); border-radius: 18px;
  background: linear-gradient(180deg, rgba(139, 92, 246, .12), rgba(21, 16, 31, .6) 70%), #15101f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.sg-example-label { margin: 0; font-size: 11.5px; font-weight: 600; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: #a78bfa; }
.sg-example-label + .sg-example-prompt { margin-top: -2px; }
.sg-example-prompt { margin: 0 0 8px; font-size: 15.5px; line-height: 1.6; color: #f6f1ff; text-wrap: pretty; }
.sg-tree {
  margin: 0; padding: 12px 14px; overflow-x: auto; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; background: #0f0c16;
  font-family: var(--rc-font-mono); font-size: 13.5px; line-height: 1.75; color: #e6def3; white-space: pre;
}
.sg-tree .tk-cls { color: #8f84a3; }
.sg-tree .tk-new { margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: rgba(52, 211, 153, .14); font-family: var(--rc-font, Inter, sans-serif); font-size: 11.5px; font-weight: 600; color: #6ee7b7; }
.sg-example-code { display: flex; flex-direction: column; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); }
.sg-example-code pre { flex: 1; font-size: 13px; line-height: 1.65; tab-size: 2; }
/* the code wraps instead of running past the edge: nothing is ever cut off, and it only wraps where the pane is narrow */
.sg-example-code pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-example-code pre:focus-visible { outline: 2px solid var(--rc-focus); outline-offset: -2px; }
.sg-example-code .tk-k { color: var(--rc-code-keyword); }
.sg-example-code .tk-s { color: var(--rc-code-string); }
.sg-example-code .tk-n { color: var(--rc-code-number); }
.sg-example-code .tk-c { color: var(--rc-code-comment); font-style: italic; }
.sg-example-code .tk-g { color: var(--rc-code-global); }
.sg .sg-example-cap { max-width: 720px; margin: 14px auto 0; }

/* ---------- the three key facts ---------- */
.sg-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 1040px; margin: 44px auto 0; text-align: left; }
.sg-facts .info-fact { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 18px 20px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; background: rgba(255, 255, 255, .02); }
.sg-facts .info-fact-value { font-size: 24px; font-weight: 650; line-height: 1.15; letter-spacing: -.02em; color: #f6f1ff; }
.sg-facts .info-fact-label { font-size: 13.5px; line-height: 1.45; color: #b7abc8; }

/* ---------- what it does ---------- */
.sg .mb-what code, .sg .more-body code, .sg .sc-steps code, .sg .faq-item code { font-family: var(--rc-font-mono); font-size: .9em; color: #f6f1ff; }
.sg .mb-what a { color: var(--rc-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(167, 139, 250, .5); }

/* ---------- examples: the wall and the three runs ---------- */
.sg .sg-wall-wrap { margin-top: 8px; }
/* the wall's glow and tilt reach past the sides: clip them to the section, as the hero does for the game maker */
body.sg main > #examples { overflow-x: clip; }
.sg .sg-runs { margin-top: 40px; }
.sg-runs .mb-card { display: flex; flex-direction: column; gap: 10px; }
.sg-run-label { margin: 0; font-size: 11.5px; font-weight: 600; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: #8f84a3; }
.sg-run-prompt { margin: 0 0 6px; padding: 10px 12px; border-radius: 12px; background: rgba(139, 92, 246, .12); font-size: 15px; line-height: 1.5; color: #f6f1ff; text-wrap: pretty; }
.sg-runs .sl-ticks li { font-size: 14px; }

/* ---------- the demand table and the keyword rules ---------- */
.sg-table-wrap {
  max-width: 880px; margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px; background: #15101f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.sg-table-wrap:focus-visible { outline: 2px solid var(--rc-focus); outline-offset: 2px; }
.sg-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; color: var(--rc-text-2); }
.sg-table caption { padding: 16px 20px 6px; text-align: left; font-size: 13px; line-height: 1.5; color: #8f84a3; caption-side: bottom; }
.sg-table th, .sg-table td { padding: 12px 20px; text-align: left; vertical-align: top; border-top: 1px solid rgba(255, 255, 255, .06); }
.sg-table thead th { border-top: 0; padding-top: 16px; padding-bottom: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #a78bfa; white-space: nowrap; }
.sg-table tbody th { font-weight: 500; color: #e6def3; }
.sg-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sg-table td:last-child { font-weight: 600; color: #f6f1ff; }
.sg-table thead th:not(:first-child) { text-align: right; }
.sg-table a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(167, 139, 250, .5); }
.sg-table a:hover { color: #fff; }
.sg-table.is-rules { font-size: 13.5px; }
.sg-table.is-rules td { text-align: left; white-space: normal; font-weight: 400; color: var(--rc-text-2); }
.sg-table.is-rules thead th:not(:first-child) { text-align: left; }
.sg-table.is-rules tbody th { white-space: nowrap; }
.sg .more-body .sg-table-wrap { max-width: none; margin-top: 14px; border-radius: 14px; }
.sg .sg-duo { max-width: 880px; margin: 32px auto 0; }
.sg-duo .sl-duo-title { margin-bottom: 12px; }
.sg-duo .sl-duo-title .mb-ico { flex: none; }
.sg-duo p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--rc-text-2); text-wrap: pretty; }
.sg-duo a { color: var(--rc-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(167, 139, 250, .5); }
.sg-duo + details.more { margin-top: 24px; }

/* ---------- steps note, the centred close ---------- */
.sg .sc-wrap + .v3-note { margin-top: 28px; }
.sg-final .final-inner { display: block; max-width: 760px; text-align: center; }
.sg-final .final-inner h2 { max-width: none; margin: 0 auto; }
.sg-final .final-inner > p { max-width: 56ch; margin: 16px auto 0; font-size: 17px; line-height: 1.6; color: var(--rc-text-2); }
.sg-final .final-actions { justify-content: center; }
.sg-final .final-actions .btn-quiet { min-height: 52px; padding: 0 22px; border-radius: 12px; }

/* ---------- layout steps ---------- */
@media (max-width: 900px) {
  .sg-example { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}
@media (max-width: 720px) {
  .sg-facts { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
}
@media (max-width: 640px) {
  .sg-example { margin-top: 36px; }
  .sg-example-ask { padding: 16px 16px 18px; }
  .sg-example-prompt { font-size: 15px; }
  .sg-example-code pre { font-size: 12.5px; }
  .sg-facts { margin-top: 36px; }
  .sg-facts .info-fact { padding: 14px 16px; }
  .sg-facts .info-fact-value { font-size: 21px; }
  .sg-table { font-size: 13.5px; }
  .sg-table th, .sg-table td { padding: 10px 10px; }
  .sg-table th:first-child, .sg-table td:first-child { padding-left: 14px; }
  .sg-table th:last-child, .sg-table td:last-child { padding-right: 14px; }
  .sg-table thead th { font-size: 10.5px; letter-spacing: .06em; }
  .sg-table.is-rules tbody th { white-space: normal; }
  .sg-final .final-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sg-example-code, .sg-runs .mb-card { transition: none; }
}
