/* R282 · 有涵智能官网
   1) Section rhythm on an 8px scale: less empty space between blocks.
   2) AI products page: problems grid, six-step chain with real screens, storyboard frames. */

/* ---------- 1. Section rhythm ----------
   Target: ~48px from the end of one block to the divider, ~22px from divider to eyebrow.
   Selectors out-rank the R266 inner-page rules (body[data-r266-inner] / body.is-inner). */
html body[data-r266-inner] main :is(.r247-block,.g251-section,.g249-section,.a251-section,.r263-section),
html body.is-inner main :is(.r247-block,.g251-section,.g249-section,.a251-section,.r263-section) {
  margin-top: 12px !important; margin-bottom: 12px !important; padding-top: 12px !important; padding-bottom: 24px !important;
}
html body[data-r266-inner] main :is(.r247-section-head,.g251-heading,.g249-section-head,.a251-heading,.r263-section-head,.r185-collection-heading),
html body.is-inner main :is(.r247-section-head,.g251-heading,.g249-section-head,.a251-heading,.r263-section-head,.r185-collection-heading) {
  padding-top: 22px !important; margin-bottom: 20px !important;
}
html body.is-inner main .r279-cap { margin-top: 12px !important; margin-bottom: 12px !important; padding-top: 22px !important; }
html body.is-inner main .r279-head { margin-bottom: 20px !important; }
html body.is-inner main .r280-cta { margin-top: 12px !important; margin-bottom: 24px !important; }

@media (max-width: 760px) {
  html body[data-r266-inner] main :is(.r247-block,.g251-section,.g249-section,.a251-section,.r263-section),
  html body.is-inner main :is(.r247-block,.g251-section,.g249-section,.a251-section,.r263-section) {
    margin-top: 8px !important; margin-bottom: 8px !important; padding-top: 8px !important; padding-bottom: 16px !important;
  }
  html body[data-r266-inner] main :is(.r247-section-head,.g251-heading,.g249-section-head,.a251-heading,.r263-section-head,.r185-collection-heading),
  html body.is-inner main :is(.r247-section-head,.g251-heading,.g249-section-head,.a251-heading,.r263-section-head,.r185-collection-heading) {
    padding-top: 18px !important; margin-bottom: 16px !important;
  }
  html body.is-inner main .r279-cap { margin-top: 8px !important; margin-bottom: 8px !important; padding-top: 18px !important; }
  html body.is-inner main .r279-head { margin-bottom: 16px !important; }
  html body.is-inner main .r280-cta { margin-top: 8px !important; margin-bottom: 16px !important; }
}

/* ---------- 2. AI products page ---------- */
.r282-num { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 13px; background: #f3eefb; color: #7853ac; font: 700 13px/1 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: .02em; }

/* problems */
.r282-pain-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.r282-pain-card { background: #fff; border: 1px solid #e6e1ec; border-radius: 18px; padding: 22px 22px 20px; position: relative; overflow: hidden; }
.r282-pain-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, #7853ac, #c9b4e8); }
.r282-pain-card h3 { margin: 14px 0 8px; font: 700 18px/1.4 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #1c1426; }
.r282-pain-card p { margin: 0; font-size: 15px; line-height: 1.75; color: #4a4458; }

/* six-step chain */
.r282-case { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; background: #f6f3fb; color: #4f3380; font-size: 14px; line-height: 1.6; font-weight: 600; }
.r282-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.r282-step { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid #e6e1ec; border-radius: 18px; padding: 20px; min-width: 0; }
.r282-step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.r282-step-head h3 { margin: 0; flex: 1 1 auto; min-width: 0; font: 700 18px/1.4 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #1c1426; }
.r282-step > p { margin: 0; font-size: 15px; line-height: 1.75; color: #4a4458; }
.r282-shot { margin: 2px 0 0; border: 1px solid #e6e1ec; border-radius: 12px; overflow: hidden; background: #f6f3fb; }
.r282-shot img { display: block; width: 100%; height: 220px; object-fit: cover; object-position: left top; }
.r282-gate { margin: auto 0 0 !important; padding: 10px 12px; border-radius: 10px; background: #eff7f6; border: 1px solid #cfe2df; font-size: 13.5px !important; line-height: 1.65 !important; color: #2f4a46 !important; }
.r282-gate b { display: inline-block; margin-right: 8px; color: #1f6f63; }
.r282-step--final { background: linear-gradient(160deg, #2b1f45 0%, #3c2a63 100%); border-color: #3c2a63; color: #fff; }
.r282-step--final h3, .r282-step--final > p { color: #fff !important; }
.r282-step--final .r282-num { background: rgba(255,255,255,.14); color: #fff; }
.r282-step--final .p0-status { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); color: #fff; }
.r282-final-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 0; }
.r282-final-flow span { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 14px; font-weight: 600; }
.r282-final-flow i { font-style: normal; opacity: .7; }
.r282-step--final .r282-gate { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #efe9fb !important; }
.r282-step--final .r282-gate b { color: #b7f0e4; }

/* storyboard frames */
.r282-frames { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.r282-frame { margin: 0; background: #fff; border: 1px solid #e6e1ec; border-radius: 10px; padding: 8px; min-width: 0; }
.r282-frame img { display: block; width: 100%; height: auto !important; aspect-ratio: 3 / 4 !important; object-fit: cover; object-position: center; border-radius: 6px; background: #f6f3fb; }
.r282-frame figcaption { display: flex; flex-direction: column; gap: 4px; padding: 8px 2px 2px; }
.r282-frame figcaption b { font-size: 13.5px; line-height: 1.4; color: #1c1426; }
.r282-tag { align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.6; }
.r282-tag--real { background: #eff7f6; color: #1f6f63; border: 1px solid #cfe2df; }
.r282-tag--ai { background: #f3eefb; color: #4f3380; border: 1px solid #cfc4df; }

@media (max-width: 1100px) {
  .r282-pain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .r282-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .r282-pain-grid, .r282-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .r282-pain-card, .r282-step { padding: 18px; }
  .r282-shot img { height: 200px; }
  .r282-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .r282-step, .r282-pain-card { transition: none; } }

/* ---------- 1b. Space above the footer ---------- */
html body.is-inner > main,
html body[data-r266-inner] > main { padding-bottom: 28px !important; }
html body.is-inner main section.r247-block.r280-cta,
html body[data-r266-inner] main section.r247-block.r280-cta { margin-bottom: 12px !important; }
@media (max-width: 760px) {
  html body.is-inner > main,
  html body[data-r266-inner] > main { padding-bottom: 20px !important; }
  html body.is-inner main section.r247-block.r280-cta,
  html body[data-r266-inner] main section.r247-block.r280-cta { margin-bottom: 8px !important; }
}

/* ---------- 3. Chatbot real conversations ---------- */
.r282-chatshow { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin: 20px 0 0; padding: 22px; border-radius: 18px; background: #f6f3fb; border: 1px solid #e6e1ec; }
.r282-chatshow .r282-chatshow-copy h3 { margin: 6px 0 10px !important; font: 700 22px/1.4 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #1c1426; }
.r282-chatshow .r282-chatshow-copy > p:not(.r279-k):not(.r282-chat-note) { margin: 0 0 14px !important; font-size: 15px; line-height: 1.8; color: #4a4458; }
html body .r282-chatshow ul.r282-caps { list-style: none; margin: 0 0 14px !important; padding: 0 !important; display: grid; gap: 8px; }
html body .r282-chatshow ul.r282-caps > li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; margin: 0 !important; padding: 10px 12px !important; background: #fff; border: 1px solid #e6e1ec; border-radius: 12px; }
.r282-cap-ic { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #f3eefb; color: #7853ac; }
.r282-caps b { font-size: 14.5px; line-height: 1.5; color: #1c1426; }
.r282-caps li > span:last-child { font-size: 13.5px; line-height: 1.6; color: #4a4458; }
.r282-chatshow .r282-chat-note { margin: 0 !important; font-size: 12.5px; line-height: 1.6; color: #77708a; }
.r282-chatshot { margin: 0; min-width: 0; }
.r282-chatshot img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 28px rgba(30, 20, 50, .18); background: #1e1e1f; }
.r282-chatshot figcaption { margin-top: 8px !important; text-align: center; font-size: 13px; font-weight: 700; color: #4f3380; }
@media (max-width: 1100px) {
  .r282-chatshow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .r282-chatshow-copy { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .r282-chatshow { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .r282-chatshot { max-width: 340px; width: 100%; justify-self: center; }
  .r282-chatshow-copy h3 { font-size: 19px; }
}

/* reading of the second conversation, fills the space under it */
.r282-chatcol { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
html body .r282-chatshow .r282-read { margin: 0 !important; padding: 12px 14px !important; background: #fff; border: 1px solid #e6e1ec; border-radius: 14px; }
html body .r282-chatshow .r282-read-h { margin: 0 0 8px !important; font-size: 14px !important; font-weight: 700; line-height: 1.5; color: #4f3380 !important; }
html body .r282-chatshow .r282-read ol { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: 6px; counter-reset: r282read; }
html body .r282-chatshow .r282-read li { position: relative; margin: 0 !important; padding: 0 0 0 30px !important; font-size: 13.5px; line-height: 1.6; color: #4a4458; counter-increment: r282read; }
html body .r282-chatshow .r282-read li::before { content: counter(r282read) !important; display: block !important; position: absolute !important; left: 0 !important; top: 1px !important; width: 20px !important; height: 20px !important; border-radius: 50% !important; background: #f3eefb !important; color: #7853ac !important; font-size: 12px !important; font-weight: 700; line-height: 20px !important; text-align: center; opacity: 1 !important; transform: none !important; }
html body .r282-chatshow .r282-read li b { margin-right: 6px; color: #1c1426; }
@media (max-width: 760px) { .r282-chatcol { max-width: 340px; width: 100%; justify-self: center; } .r282-chatcol .r282-chatshot { max-width: none; } }
