/* Blog: Zoho Deluge scripts (.pbdlg-) */
.pbdlg-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.pbdlg-meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 18px 0 0; font: 500 14px/1.4 var(--f-body); color: #64748B; }
.pbdlg-meta span:not(:last-child)::after { content: "/"; margin: 0 12px; color: #CBD5E1; }

/* app colors */
[data-app="crm"] { --a: #0A84C1; --ab: #E8F5FC; }
[data-app="books"] { --a: #1E8A4C; --ab: #E3F6EA; }
[data-app="creator"] { --a: #B4432A; --ab: #FFF1EC; }

/* hero: shuffling deck of script cards */
.pbdlg-deck { margin: 0; justify-self: center; width: min(100%, 440px); }
.pbdlg-deck__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.pbdlg-deck__cap b { font: 700 16px/1.3 var(--f-display); color: #082238; }
.pbdlg-deck__cap em { font: 600 11.5px/1.4 var(--f-body); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: #64748B; }
.pbdlg-deck__stack { position: relative; height: 300px; }
.pbdlg-card { position: absolute; inset: 0; padding: 20px 20px 18px; border-radius: 22px; background: #fff; border: 1px solid #E2E8F0; border-top: 5px solid var(--a); box-shadow: 0 34px 60px -40px rgba(8,34,56,.65); transform-origin: 50% 110%; transition: transform .8s cubic-bezier(.3,1.15,.4,1), opacity .5s, box-shadow .5s; transform: translate(26px, 14px) rotate(5deg) scale(.94); opacity: .55; z-index: 1; display: flex; flex-direction: column; }
.pbdlg-card.is-mid { transform: translate(-22px, 8px) rotate(-4deg) scale(.97); opacity: .8; z-index: 2; }
.pbdlg-card.is-front { transform: none; opacity: 1; z-index: 3; box-shadow: 0 44px 70px -40px rgba(8,34,56,.75); }
.pbdlg-card__tab { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0; padding: 5px 11px 5px 6px; border-radius: 999px; background: var(--ab); color: var(--a); font: 700 12.5px/1.3 var(--f-body); }
.pbdlg-card__tab img { width: 20px; height: 20px; }
.pbdlg-card__t { margin: 12px 0 10px; font: 700 21px/1.25 var(--f-display); letter-spacing: -.01em; color: #082238; }
.pbdlg-card__code { flex: 1; margin: 0; padding: 14px 16px; border-radius: 14px; background: #0B1B2B; color: #D7E3EE; font: 500 13.5px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; overflow: hidden; }
.pbdlg-card__code i { font-style: normal; }
.pbdlg-card__code .k, .pbdlg-code .k { color: #7CC7FF; }
.pbdlg-card__code .s, .pbdlg-code .s { color: #9BE3B5; }
.pbdlg-card__foot { margin: 12px 0 0; display: flex; align-items: center; gap: 8px; font: 600 13.5px/1.4 var(--f-body); color: #1E7A4A; }
.pbdlg-card__foot::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #DDF4E6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-5' fill='none' stroke='%231E7A4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.pbdlg-deck__dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.pbdlg-deck__dots button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; position: relative; }
.pbdlg-deck__dots button::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #CBD5E1; transition: background .3s, transform .3s; }
.pbdlg-deck__dots button[aria-pressed="true"]::before { background: #082238; transform: scale(1.3); }
.pbdlg-deck__dots button:focus-visible { outline: 3px solid #00A3D9; outline-offset: 1px; }

/* article */
.pbdlg-art { padding-top: clamp(24px, 4vw, 48px); }
.pbdlg-art--2 { padding-top: clamp(40px, 6vw, 72px); }
.pbdlg-art__grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: clamp(28px, 5vw, 72px); align-items: start; }
.pbdlg-body { max-width: 74ch; font-size: 17.5px; line-height: 1.72; color: #334155; min-width: 0; }
.pbdlg-body > p { margin: 0 0 18px; }
.pbdlg-body a, .pbdlg-after a { color: #0A6FA8; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pbdlg-body code, .pbdlg-lib .pg-answer code, .pbdlg-keys code, .pbdlg-s__warn code, .pbdlg-how code { padding: 1px 6px; border-radius: 6px; background: #EEF2F6; font: 500 .88em/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #0B3B5E; overflow-wrap: anywhere; }
.pbdlg-h2 { margin: 58px 0 0; font: 700 clamp(25px, 1rem + 1.2vw, 33px)/1.22 var(--f-display); letter-spacing: -.02em; color: #082238; scroll-margin-top: 100px; text-wrap: balance; }
.pbdlg-h2:first-child { margin-top: 0; }
.pbdlg-answer { margin: 14px 0 22px; padding: 18px 20px; border-radius: 16px; background: #FFF8E6; border: 1px solid #F6E2AE; font-weight: 500; color: #082238; }
.pbdlg-answer::before { content: "Short answer"; display: block; margin-bottom: 6px; font: 700 11.5px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: #9A5B00; }
.pbdlg-list { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; }
.pbdlg-list li { padding: 14px 16px; border-radius: 12px; background: #F3F7F9; border-left: 4px solid #FFB81C; }
.pbdlg-list b { color: #082238; }
.pbdlg-list--num { counter-reset: n; }
.pbdlg-list--num li { counter-increment: n; position: relative; padding-left: 52px; }
.pbdlg-list--num li::before { content: counter(n); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 8px; background: #082238; color: #fff; display: grid; place-items: center; font: 700 13px/1 var(--f-body); }

/* side index */
.pbdlg-side { position: sticky; top: 100px; }
.pbdlg-side__card { padding: 20px; border-radius: 20px; background: #F3F7F9; border: 1px solid #E2E8F0; }
.pbdlg-side__t { margin: 0 0 10px; font: 700 12px/1.2 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: #64748B; }
.pbdlg-side ol { margin: 0; padding: 0 0 0 22px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.4; color: #64748B; }
.pbdlg-side ol a { color: #082238; font-weight: 600; text-decoration: none; }
.pbdlg-side ol a:hover { color: #0A6FA8; text-decoration: underline; }
.pbdlg-side__go { display: inline-block; margin-top: 14px; font: 700 14px/1.3 var(--f-body); color: #0A6FA8; text-decoration: none; }

/* code blocks */
.pbdlg-code { margin: 18px 0 16px; border-radius: 18px; background: #0B1B2B; border: 1px solid #13314B; overflow: hidden; box-shadow: 0 30px 50px -40px rgba(8,34,56,.8); min-width: 0; }
.pbdlg-code__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; background: #0F2438; border-bottom: 1px solid #16344F; font: 600 12.5px/1.3 var(--f-body); color: #8FA9BF; }
.pbdlg-code__bar span { position: relative; padding-left: 46px; }
.pbdlg-code__bar span::before { content: ""; position: absolute; left: 0; top: 50%; width: 34px; height: 10px; margin-top: -5px; background: radial-gradient(circle at 5px 5px, #F87171 4px, transparent 4.5px), radial-gradient(circle at 17px 5px, #FBBF24 4px, transparent 4.5px), radial-gradient(circle at 29px 5px, #34D399 4px, transparent 4.5px); }
.pbdlg-copy { flex: none; min-height: 34px; padding: 7px 14px; border-radius: 10px; border: 1px solid #2A4D6B; background: #132E47; color: #E6F0F7; font: 700 13px/1 var(--f-body); cursor: pointer; transition: background .2s, border-color .2s; }
.pbdlg-copy:hover { background: #1B3D5C; border-color: #3E6A8E; }
.pbdlg-copy:focus-visible { outline: 3px solid #FFB81C; outline-offset: 2px; }
.pbdlg-copy.is-done { background: #1E7A4A; border-color: #2FAE6B; }
.pbdlg-code pre { margin: 0; padding: 14px 0; overflow-x: auto; tab-size: 4; -moz-tab-size: 4; }
.pbdlg-code code { display: block; min-width: max-content; font: 500 14px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: #D7E3EE; padding: 0 18px; }
.pbdlg-code .ln { display: block; position: relative; padding-left: 44px; margin: 0 -18px; padding-right: 18px; border-left: 3px solid transparent; }
.pbdlg-code .ln::before { content: attr(data-n); position: absolute; left: 0; width: 30px; text-align: right; color: #4E6A82; user-select: none; -webkit-user-select: none; }
.pbdlg-code .ln.has-note { cursor: pointer; background: rgba(255,184,28,.07); border-left-color: rgba(255,184,28,.55); }
.pbdlg-code .ln.has-note:hover, .pbdlg-code .ln.has-note:focus-visible { background: rgba(255,184,28,.16); outline: none; }
.pbdlg-code .ln.is-on { background: rgba(255,184,28,.24); border-left-color: #FFB81C; }
.pbdlg-code .c { color: #7F93A6; font-style: italic; }
.pbdlg-code .n { color: #FFCB6B; }

/* library */
.pbdlg-lib .pg-answer { max-width: 76ch; }
.pbdlg-filter { position: sticky; top: 76px; z-index: 5; margin: 26px 0 30px; padding: 14px 16px; border-radius: 20px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid #E2E8F0; box-shadow: 0 20px 40px -34px rgba(8,34,56,.55); display: grid; gap: 10px; }
.pbdlg-filter__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pbdlg-filter__l { min-width: 78px; font: 700 12px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: #64748B; }
.pbdlg-filter button { min-height: 38px; padding: 8px 14px; border-radius: 999px; border: 1px solid #D5DEE6; background: #fff; color: #334155; font: 600 14px/1.2 var(--f-body); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.pbdlg-filter button:hover { border-color: #94A9BC; }
.pbdlg-filter button[aria-pressed="true"] { background: #082238; border-color: #082238; color: #fff; }
.pbdlg-filter button:focus-visible { outline: 3px solid #00A3D9; outline-offset: 2px; }
.pbdlg-filter__say { margin: 0; font: 500 13.5px/1.4 var(--f-body); color: #64748B; }
.pbdlg-scripts { display: grid; gap: 26px; }
.pbdlg-s { padding: clamp(18px, 3vw, 30px); border-radius: 24px; background: #fff; border: 1px solid #E2E8F0; scroll-margin-top: 220px; min-width: 0; transition: opacity .35s, transform .35s; }
.pbdlg-s[hidden] { display: none; }
.pbdlg-s.is-in { animation: pbdlgIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes pbdlgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pbdlg-s__head { display: flex; gap: 14px; align-items: flex-start; }
.pbdlg-s__n { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #082238; color: #FFB81C; font: 800 17px/1 var(--f-display); }
.pbdlg-s__head h3 { margin: 2px 0 8px; font: 700 clamp(19px, .9rem + .6vw, 23px)/1.3 var(--f-display); letter-spacing: -.01em; color: #082238; }
.pbdlg-s__tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pbdlg-s__tags span { padding: 4px 10px; border-radius: 8px; background: #F3F7F9; color: #475569; font: 600 12.5px/1.35 var(--f-body); }
.pbdlg-s__tags span[data-app] { background: var(--ab); color: var(--a); }
.pbdlg-s > p { margin: 16px 0 0; max-width: 78ch; font-size: 16.5px; line-height: 1.65; color: #334155; }
.pbdlg-keys { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.pbdlg-keys li { padding: 12px 14px; border-radius: 12px; background: #F8FAFC; border: 1px solid #E2E8F0; font-size: 14.5px; line-height: 1.55; color: #334155; cursor: default; transition: background .25s, border-color .25s; }
.pbdlg-keys li b { display: block; margin-bottom: 2px; font: 700 12px/1.3 var(--f-body); letter-spacing: .06em; text-transform: uppercase; color: #9A5B00; }
.pbdlg-keys li.is-on { background: #FFF8E6; border-color: #F2C866; }
.pbdlg-s__warn { padding: 12px 14px; border-radius: 12px; background: #FFF1EC; border: 1px solid #F6C9B9; font-size: 15px !important; }
.pbdlg-none { margin: 20px 0 0; padding: 18px; border-radius: 16px; background: #fff; border: 1px dashed #CBD5E1; text-align: center; color: #475569; }
.pbdlg-code--mini { margin-top: 10px; }

/* closing paragraph under flips */
.pbdlg-after { margin: 26px 0 0; max-width: 78ch; font-size: 16.5px; line-height: 1.65; color: #334155; }
.pbdlg-how .mk-road code { font-size: .86em; }

@media (max-width: 1020px) {
  .pbdlg-art__grid { grid-template-columns: minmax(0, 1fr); }
  .pbdlg-side { display: none; }
}
@media (max-width: 900px) {
  .pbdlg-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .pbdlg-deck { width: min(100%, 420px); }
}
@media (max-width: 600px) {
  .pbdlg-deck__stack { height: 290px; }
  .pbdlg-card { transform: translate(12px, 12px) rotate(3deg) scale(.95); }
  .pbdlg-card.is-mid { transform: translate(-10px, 6px) rotate(-2.5deg) scale(.97); }
  .pbdlg-card__code { font-size: 12.5px; }
  .pbdlg-filter { position: static; padding: 12px; }
  .pbdlg-filter__row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .pbdlg-filter__row::-webkit-scrollbar { display: none; }
  .pbdlg-filter button { flex: none; }
  .pbdlg-filter__l { min-width: 0; flex: none; }
  .pbdlg-s__head { gap: 10px; }
  .pbdlg-s__n { width: 34px; height: 34px; font-size: 15px; }
  .pbdlg-code code { font-size: 13px; }
  .pbdlg-code__bar span { padding-left: 0; }
  .pbdlg-code__bar span::before { display: none; }
  .pbdlg-keys { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pbdlg-card, .pbdlg-s { transition: none; }
  .pbdlg-s.is-in { animation: none; }
}
