/* Blog: Zoho CRM workflow rules (.pbwr-) */
.pbwr-hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.pbwr-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 18px 0 0; font: 500 14px/1.4 var(--f-body); color: #64748B; }
.pbwr-meta span:not(:last-child)::after { content: "·"; margin: 0 10px; color: #94A3B8; }

/* hero: anatomy card */
.pbwr-anat { margin: 0; min-width: 0; }
.pbwr-anat__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 12px; font: 700 15px/1.3 var(--f-display); color: #082238; }
.pbwr-anat__cap em { font: 600 12px/1.6 var(--f-body); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: #64748B; }
.pbwr-anat__card { position: relative; padding: 18px 18px 14px; border-radius: 22px; background: #fff; border: 1px solid #E2E8F0; box-shadow: 0 34px 64px -40px rgba(8,34,56,.6); overflow: hidden; }
.pbwr-anat__card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #1D3F8F, #00A3D9, #00B2A9, #3FB97A); }
.pbwr-anat__head { display: flex; align-items: center; gap: 10px; padding: 4px 2px 14px; border-bottom: 1px dashed #E2E8F0; font: 700 15px/1.3 var(--f-display); color: #082238; }
.pbwr-anat__head span { flex: 1; min-width: 0; }
.pbwr-anat__head i { font: 700 11px/1 var(--f-body); font-style: normal; padding: 5px 9px; border-radius: 999px; background: #DDF4E6; color: #15803D; }
.pbwr-anat__parts { position: relative; margin: 14px 0 0; padding: 0 0 0 0; list-style: none; display: grid; gap: 10px; }
.pbwr-anat__parts::before { content: ""; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 2px; background: repeating-linear-gradient(#CBD5E1 0 5px, transparent 5px 9px); }
.pbwr-part { position: relative; display: grid; grid-template-columns: 32px 88px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px 10px 0; border-radius: 14px; opacity: 0; transform: translateX(14px); animation: pbwrIn .55s calc(.35s + var(--i) * .22s) forwards; }
.pbwr-part__n { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #082238; color: #FFB81C; font: 800 14px/1 var(--f-display); box-shadow: 0 0 0 4px #fff; }
.pbwr-part__k { padding-top: 7px; font: 700 11.5px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #00A3D9; }
.pbwr-part__v { padding: 6px 10px; border-radius: 10px; background: #F3F7F9; font-size: 14.5px; line-height: 1.45; color: #334155; }
.pbwr-part__v b { color: #082238; }
.pbwr-part--later .pbwr-part__k { color: #B7791F; }
.pbwr-part--later .pbwr-part__v { background: #FFF7E6; border: 1px dashed #F6C766; }
.pbwr-anat__pulse { position: absolute; left: 30px; top: 70px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #00B2A9; box-shadow: 0 0 0 5px rgba(0,178,169,.2); animation: pbwrPulse 4.2s 1.6s ease-in-out infinite; opacity: 0; }
.pbwr-anat__note { margin: 10px 2px 0; font-size: 12.5px; color: #64748B; }
@keyframes pbwrIn { to { opacity: 1; transform: none; } }
@keyframes pbwrPulse { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 85% { opacity: 1; transform: translateY(var(--pbwr-run, 230px)); } 100% { opacity: 0; transform: translateY(var(--pbwr-run, 230px)); } }

/* article */
.pbwr-art { padding-top: clamp(24px, 4vw, 48px); }
.pbwr-art__grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: clamp(28px, 5vw, 72px); align-items: start; }
.pbwr-body { max-width: 74ch; font-size: 17.5px; line-height: 1.72; color: #334155; min-width: 0; }
.pbwr-body--wide { max-width: 980px; }
.pbwr-body--wide > p, .pbwr-body--wide > .pbwr-h2, .pbwr-body--wide > .pbwr-ol { max-width: 74ch; }
.pbwr-body > p { margin: 0 0 18px; }
.pbwr-body a, .pbwr-help a, .pbwr-flow__more a { color: #0A6FA8; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pbwr-h2 { margin: 56px 0 0; font: 700 clamp(25px, 1rem + 1.2vw, 33px)/1.25 var(--f-display); letter-spacing: -.02em; color: #082238; scroll-margin-top: 100px; text-wrap: balance; }
.pbwr-h2:first-child { margin-top: 0; }
.pbwr-h3 { margin: 32px 0 10px; font: 700 clamp(19px, .9rem + .5vw, 22px)/1.3 var(--f-display); letter-spacing: -.01em; color: #082238; }
.pbwr-body .pbwr-answer { position: relative; max-width: 74ch; margin: 30px 0 22px; padding: 22px 20px 16px; border-radius: 14px; background: #fff; border: 1.5px solid #BFE3E0; font-weight: 500; color: #082238; }
.pbwr-answer::before { content: "Quick answer"; position: absolute; top: -11px; left: 16px; padding: 3px 10px; border-radius: 999px; background: #082238; color: #fff; font: 700 11px/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.pbwr-body b { color: #082238; }

.pbwr-steps { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; }
.pbwr-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid #E2E8F0; }
.pbwr-steps__n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #082238; color: #FFB81C; font: 800 14px/1 var(--f-display); }
.pbwr-list { margin: 0 0 20px; padding: 0 0 0 4px; list-style: none; display: grid; gap: 10px; }
.pbwr-list li { padding-left: 20px; position: relative; }
.pbwr-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; border-radius: 2px; background: #00A3D9; transform: rotate(45deg); }
.pbwr-ol { margin: 0 0 20px; padding: 0 0 0 22px; display: grid; gap: 10px; }
.pbwr-ol li::marker { font: 800 15px var(--f-display); color: #00A3D9; }

.pbwr-tw { margin: 0 0 20px; overflow-x: auto; border-radius: 16px; border: 1px solid #E2E8F0; }
.pbwr-table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; background: #fff; }
.pbwr-table--lim { min-width: 860px; }
.pbwr-table th, .pbwr-table td { padding: 11px 13px; text-align: left; border-bottom: 1px solid #F1F5F9; vertical-align: top; }
.pbwr-table thead th { background: #082238; color: #fff; font: 600 12.5px/1.35 var(--f-body); }
.pbwr-table tbody th { font-weight: 700; color: #082238; white-space: nowrap; }
.pbwr-table tr.is-key td:nth-child(3) { font-weight: 700; color: #07605E; }

/* order of execution */
.pbwr-order { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: o; display: flex; flex-wrap: wrap; gap: 8px 6px; }
.pbwr-order li { counter-increment: o; position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: #fff; border: 1px solid #E2E8F0; font: 600 14px/1.2 var(--f-body); color: #082238; }
.pbwr-order li::before { content: counter(o); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #EEF2F6; font: 800 12px/1 var(--f-display); color: #475569; }
.pbwr-order li:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 50%; width: 8px; height: 2px; background: #CBD5E1; }
.pbwr-order li.is-wr { background: #082238; border-color: #082238; color: #fff; }
.pbwr-order li.is-wr::before { background: #FFB81C; color: #082238; }

/* examples */
.pbwr-ex { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.pbwr-ex__i { padding: 16px; border-radius: 16px; background: #fff; border: 1px solid #E2E8F0; border-top: 3px solid #00B2A9; }
.pbwr-ex__i:nth-child(even) { border-top-color: #00A3D9; }
.pbwr-ex__m { margin: 0 0 6px; font: 700 11px/1.3 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: #64748B; }
.pbwr-ex__i h3 { margin: 0 0 6px; font: 700 16.5px/1.3 var(--f-display); color: #082238; }
.pbwr-ex__i p:last-child { margin: 0; font-size: 14.5px; line-height: 1.5; }

/* side */
.pbwr-side { position: sticky; top: 100px; }
.pbwr-side__card { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid #E2E8F0; }
.pbwr-side__t { margin: 0 0 10px; font: 700 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: #64748B; }
.pbwr-side ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: s; }
.pbwr-side li { counter-increment: s; }
.pbwr-side li a { display: flex; gap: 10px; padding: 7px 6px; border-radius: 9px; color: #082238; font: 600 14.5px/1.35 var(--f-body); text-decoration: none; }
.pbwr-side li a::before { content: counter(s, decimal-leading-zero); flex: none; font: 700 12px/1.6 var(--f-display); color: #00A3D9; }
.pbwr-side li a:hover { background: #F3F7F9; }

/* simulator */
.pbwr-sim__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; margin-top: 30px; align-items: start; }
.pbwr-rec { padding: 20px; border-radius: 20px; background: #fff; border: 1px solid #E2E8F0; box-shadow: 0 24px 50px -40px rgba(8,34,56,.6); display: grid; gap: 14px; }
.pbwr-rec__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 700 15px/1.3 var(--f-display); color: #082238; }
.pbwr-rec__top b { flex: 1; min-width: 0; }
.pbwr-rec__top em { font: 700 10.5px/1 var(--f-body); font-style: normal; letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: #EEF2F6; color: #475569; }
.pbwr-f { display: grid; gap: 6px; font: 600 13px/1.2 var(--f-body); color: #475569; }
.pbwr-f select, .pbwr-f input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #CBD5E1; background: #fff; font: 500 16px/1.2 var(--f-body); color: #082238; }
.pbwr-f select:focus, .pbwr-f input:focus { outline: none; border-color: #00A3D9; box-shadow: 0 0 0 3px rgba(0,163,217,.18); }
.pbwr-rec__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.pbwr-save { min-width: 120px; justify-content: center; }
.pbwr-rec__hint { margin: 0; font-size: 13.5px; color: #64748B; }

.pbwr-rules { display: grid; gap: 10px; min-width: 0; }
.pbwr-rule { padding: 14px 16px; border-radius: 16px; background: #fff; border: 1.5px solid #E2E8F0; transition: border-color .3s, box-shadow .3s, transform .3s; }
.pbwr-rule.is-fired { border-color: #00B2A9; box-shadow: 0 0 0 4px rgba(0,178,169,.15); transform: translateX(4px); }
.pbwr-rule__n { margin: 0; font: 700 15px/1.3 var(--f-display); color: #082238; }
.pbwr-rule__d { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #475569; }
.pbwr-mode { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pbwr-mode button { min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid #CBD5E1; background: #fff; font: 600 13px/1.25 var(--f-body); color: #334155; cursor: pointer; text-align: left; }
.pbwr-mode button[aria-checked="true"] { background: #082238; border-color: #082238; color: #fff; }
.pbwr-mode button:focus-visible { outline: 3px solid #00A3D9; outline-offset: 2px; }

.pbwr-log { padding: 14px 16px; border-radius: 16px; background: #082238; color: #BFD3E2; }
.pbwr-log__t { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 0 0 8px; font: 700 12px/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.pbwr-log__t b { color: #FFB81C; letter-spacing: .02em; text-transform: none; font-size: 13px; }
.pbwr-log__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; max-height: 220px; overflow-y: auto; font: 500 13.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.pbwr-log__list li { padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.06); animation: pbwrLog .35s ease-out; }
.pbwr-log__list li b { color: #fff; }
.pbwr-log__list li.is-dup { background: rgba(255,120,90,.18); color: #FFD7CC; }
.pbwr-log__list li.is-empty { background: none; color: #7FA3BD; }
.pbwr-log__warn { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #FFB81C; color: #082238; font: 600 14px/1.45 var(--f-body); }
@keyframes pbwrLog { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pbwr-sim__note { margin: 16px 0 0; font-size: 14px; color: #64748B; }

.pbwr-flow .mk-wipe { margin-top: 30px; }
.pbwr-flow__more { margin: 18px 0 0; font-size: 16px; color: #334155; }

.pbwr-help__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.pbwr-help__body { font-size: 17px; line-height: 1.7; color: #334155; }
.pbwr-help__body p { margin: 0 0 16px; }

@media (max-width: 1100px) { .pbwr-ex { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .pbwr-hero__grid, .pbwr-art__grid, .pbwr-sim__grid, .pbwr-help__grid { grid-template-columns: minmax(0, 1fr); }
  .pbwr-side { display: none; }
}
@media (max-width: 640px) {
  .pbwr-body { font-size: 16.5px; }
  .pbwr-part { grid-template-columns: 32px minmax(0, 1fr); padding-right: 0; }
  .pbwr-part__k { padding-top: 8px; }
  .pbwr-part__v { grid-column: 2; }
  .pbwr-anat__card { padding: 16px 14px 12px; }
  .pbwr-anat__pulse { display: none; }
  .pbwr-ex { grid-template-columns: minmax(0, 1fr); }
  .pbwr-order li:not(:last-child)::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pbwr-part { animation: none; opacity: 1; transform: none; }
  .pbwr-anat__pulse { display: none; }
  .pbwr-rule, .pbwr-log__list li { transition: none; animation: none; }
}
