/* Plain-text author rows must not inherit the photo-card flex layout. */
.ba-article p.ba-author { display: block; }

/* Real author portraits keep their full frame, including in compact author rows. */
.ba-author img.bg-author-portrait,
.ab-author img.bg-author-portrait,
.ec-author img.bg-author-portrait,
.selection-author img.bg-author-portrait {
  display: block;
  height: auto;
  max-height: none;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
}
.selection-author img.bg-author-portrait { width: 90px; max-width: 90px; }
.ba-article .vg-intro .portrait img.bg-author-portrait,
.ba-article .portrait img.bg-author-portrait,
.budget-article .budget-portrait img.bg-author-portrait {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

/* One topic-specific conclusion and contact action after the complete article. */
.ba-final-cta {
  box-sizing: border-box;
  width: min(860px, calc(100% - 2 * var(--pad, 24px)));
  margin: 12px auto 36px;
  padding: 30px;
  border: 1px solid #dedcf1;
  border-radius: 22px;
  background: #f3f1fc;
  color: #242335;
  font-family: var(--body, 'Onest', sans-serif);
  overflow-wrap: anywhere;
}
.ba-final-cta h2 {
  margin: 0 0 18px;
  color: #242335;
  font-family: var(--display, 'Golos Text', sans-serif);
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.4px;
  scroll-margin-top: 110px;
}
.ba-final-cta p { margin: 0 0 18px; font-size: 18px; line-height: 1.7; }
.ba-final-cta a { color: #3933a7; text-decoration: underline; text-underline-offset: 3px; }
.ba-final-cta .btn { width: auto; min-height: 50px; margin: 5px 0 0; padding: 14px 24px; color: #fff; white-space: normal; }
.ba-final-cta .ba-final-cta__links { margin: 18px 0 0; font-size: 15px; line-height: 1.6; }
.ba-final-cta :focus-visible { outline: 3px solid #4340e2; outline-offset: 4px; }
@media (max-width: 600px) {
  .selection-author img.bg-author-portrait { width: 64px; max-width: 64px; }
  .ba-final-cta { padding: 22px 20px; border-radius: 18px; }
  .ba-final-cta p { font-size: 17px; }
  .ba-final-cta .btn { width: 100%; }
}

/* The approved v11 personal-work block, scoped for existing article templates. */
.bpw {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  width: min(1240px, calc(100% - 2 * var(--pad, 24px)));
  margin: 32px auto 48px;
  padding: 40px 0;
  border-top: 1px solid #dedee9;
  border-bottom: 1px solid #eeeef4;
  background: linear-gradient(125deg, #fdfdff, #f4f3fc);
  color: #141426;
  font-family: var(--body, 'Onest', sans-serif);
  line-height: 1.45;
}
.bpw *, .bpw *::before, .bpw *::after { box-sizing: border-box; }
.bpw .bpw__main, .bpw .bpw__copy, .bpw .bpw__step { min-width: 0; }
.bpw .bpw__label {
  display: inline-block;
  margin: 0 0 16px;
  padding: 7px 13px;
  border-radius: 7px;
  background: #dcd8ff;
  color: #2916b3;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}
.bpw .bpw__title {
  max-width: none;
  margin: 0 0 26px;
  color: #141426;
  font-family: var(--display, 'Golos Text', sans-serif);
  font-size: 44px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1.1px;
  text-transform: none;
}
.bpw .bpw__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bpw .bpw__step {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  min-height: 170px;
  margin: 0;
  padding: 16px;
  border: 1px solid #dcdbea;
  border-radius: 16px;
  background: linear-gradient(130deg, #fff, #fafaff);
  box-shadow: 0 3px 4px #26203b0b;
}
.bpw .bpw__copy h3 {
  max-width: none;
  margin: 0 0 10px;
  padding: 0;
  color: #141426;
  font-family: var(--body, 'Onest', sans-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  text-transform: none;
}
.bpw .bpw__copy p { margin: 0; color: #44445f; font-size: 14px; line-height: 1.45; }
.bpw .bpw__mini {
  position: relative;
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 125px;
  padding: 10px;
  border: 1px solid #e4e4ee;
  border-radius: 9px;
  background: linear-gradient(120deg, #fff, #f1f2fa);
  box-shadow: 0 4px 8px #322f5815;
  color: #292639;
  font-size: 10px;
  line-height: 1.3;
}
.bpw .bpw__mini b { font-size: 10px; font-weight: 700; }
.bpw .bpw__queries > b { display: flex; align-items: center; padding-bottom: 5px; border-bottom: 1px solid #e5e3ef; }
.bpw .bpw__search { margin-right: 3px; font-size: 17px; line-height: 1; }
.bpw .bpw__queries > span { display: flex; align-items: center; gap: 7px; }
.bpw .bpw__check { flex-shrink: 0; color: #68ad3d; font-size: 21px; line-height: 1; text-shadow: 0 1px #d5edbf; }
.bpw .bpw__windowbar { display: flex; align-items: center; gap: 3px; margin: -3px -3px 3px; padding-bottom: 4px; border-bottom: 1px solid #e2e1ed; }
.bpw .bpw__windowbar i { width: 4px; height: 4px; border-radius: 50%; background: #f47174; }
.bpw .bpw__windowbar i:nth-child(2) { background: #efbf43; }
.bpw .bpw__windowbar i:nth-child(3) { background: #65bf84; }
.bpw .bpw__windowbar > span { flex: 1; height: 5px; margin-left: 4px; border-radius: 4px; background: #e8e7ee; }
.bpw .bpw__site-body { display: grid; grid-template-columns: 1fr 30%; gap: 5px; height: 42px; }
.bpw .bpw__site-body > div:first-child { padding-top: 3px; }
.bpw .bpw__site-body span { display: block; height: 3px; margin-bottom: 5px; border-radius: 2px; background: #dedce8; }
.bpw .bpw__site-body span:last-child { width: 65%; }
.bpw .bpw__building { border-radius: 3px; background: url('/img/personal-work-20261106/house-demo.webp') center / cover; }
.bpw .bpw__mini-cta { width: max-content; max-width: 100%; padding: 6px 8px; border-radius: 4px; background: linear-gradient(#9980ff, #6040ed); box-shadow: 0 2px 4px #6445d934; color: #fff; font-size: 8px; font-style: normal; }
.bpw .bpw__cursor { position: absolute; right: 20px; bottom: -7px; width: 37px; height: 42px; }
.bpw .bpw__routing { grid-template-columns: 37% 13% 50%; gap: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.bpw .bpw__routing-source { z-index: 1; display: grid; place-items: center; padding: 10px 3px; border: 1px solid #e5e2ef; border-radius: 8px; background: linear-gradient(#fff, #f4f3fc); box-shadow: 0 3px 7px #38286010; font-size: 9px; line-height: 1.2; text-align: center; }
.bpw .bpw__routing-source svg { width: 32px; height: 36px; margin-bottom: 4px; }
.bpw .bpw__routing-lines { width: 100%; height: 104px; overflow: visible; }
.bpw .bpw__routing-targets { display: grid; gap: 16px; min-width: 0; }
.bpw .bpw__routing-targets > div { display: flex; align-items: center; gap: 2px; padding: 7px 3px; border: 1px solid #e5e2ef; border-radius: 7px; background: linear-gradient(#fff, #f3f2fa); box-shadow: 0 3px 6px #38286012; font-size: 8px; }
.bpw .bpw__routing-targets svg { flex-shrink: 0; width: 23px; height: 23px; }
.bpw .bpw__leads > span { display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: 4px; border-radius: 4px; background: #f1f0f6; font-size: 9px; }
.bpw .bpw__leads em { padding: 3px 5px; border-radius: 4px; background: #c6e9a4; box-shadow: inset 0 1px #fff7; color: #355528; font-size: 8px; font-style: normal; font-weight: 700; }
.bpw .bpw__leads > span:nth-child(3) em { background: #f4e58b; color: #61540d; }
.bpw .bpw__contact {
  display: flex;
  flex-direction: column;
  align-self: end;
  justify-content: center;
  gap: 20px;
  min-width: 0;
  min-height: 440px;
  margin: 0;
  padding: 28px;
  border: 1px solid #7565fc;
  border-radius: 21px;
  background: radial-gradient(ellipse at 25% 5%, #4d3cf2, #3926da 70%, #3021bb);
  box-shadow: inset 0 1px #a198ff66;
  color: #fff;
}
.bpw .bpw__contact h3 { max-width: none; margin: 0 0 5px; padding: 0; color: #fff; font-family: var(--display, 'Golos Text', sans-serif); font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -.5px; text-transform: none; }
.bpw .bpw__bubble { position: relative; align-self: flex-start; max-width: 100%; margin: 0; padding: 14px 13px 23px; border-radius: 14px 14px 14px 3px; background: linear-gradient(#fff, #ece8ff); box-shadow: 0 4px 9px #22118718; color: #171332; font-size: 14px; line-height: 1.35; }
.bpw .bpw__bubble--answer { align-self: flex-end; margin-left: 20px; border-radius: 14px 14px 3px 14px; background: linear-gradient(#e7e2ff, #bfb4ff); color: #211758; }
.bpw .bpw__bubble time { position: absolute; right: 8px; bottom: 6px; color: #797090; font-size: 9px; }
.bpw .bpw__bubble time span { color: #7162d9; }
.bpw .bpw__button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 50px; margin: 5px 0 0; padding: 13px 10px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 3px 8px #30209933; color: #252050; font-family: var(--body, 'Onest', sans-serif); font-size: 16px; font-weight: 700; line-height: 1.3; text-align: center; cursor: pointer; }
.bpw .bpw__button:hover { background: #f0eeff; }
.bpw .bpw__button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.bpw .bpw__contact > small { display: block; margin: 0; color: #f4f2ff; font-size: 12px; line-height: 1.4; text-align: center; }

@media (max-width: 1100px) {
  .bpw { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 32px 0; }
  .bpw .bpw__title { font-size: 38px; }
  .bpw .bpw__contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 16px 24px; min-height: 0; }
  .bpw .bpw__contact h3 { grid-column: 1; grid-row: 1 / 3; max-width: 300px; }
  .bpw .bpw__bubble { grid-column: 2; justify-self: start; }
  .bpw .bpw__bubble--answer { justify-self: end; }
  .bpw .bpw__button, .bpw .bpw__contact > small { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .bpw { gap: 20px; margin-top: 24px; margin-bottom: 32px; padding: 26px 0; }
  .bpw .bpw__label { margin-bottom: 12px; padding: 6px 10px; font-size: 12px; }
  .bpw .bpw__title { margin-bottom: 20px; font-size: 31px; line-height: 1.1; letter-spacing: -.8px; }
  .bpw .bpw__steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bpw .bpw__step { gap: 10px; min-height: 146px; padding: 13px 11px; }
  .bpw .bpw__copy h3 { margin-bottom: 9px; font-size: 20px; }
  .bpw .bpw__copy p { font-size: 13px; }
  .bpw .bpw__mini { min-height: 112px; padding: 7px; gap: 7px; font-size: 9px; }
  .bpw .bpw__mini b { font-size: 9px; }
  .bpw .bpw__queries > span { gap: 5px; }
  .bpw .bpw__check { font-size: 20px; }
  .bpw .bpw__site-body { height: 37px; }
  .bpw .bpw__mini-cta { padding: 5px 6px; font-size: 7px; }
  .bpw .bpw__cursor { width: 31px; height: 35px; }
  .bpw .bpw__routing { grid-template-columns: 34% 10% 56%; gap: 0; padding: 0; }
  .bpw .bpw__routing-source { padding: 9px 2px; font-size: 8px; }
  .bpw .bpw__routing-source svg { width: 29px; height: 32px; }
  .bpw .bpw__routing-lines { height: 98px; }
  .bpw .bpw__routing-targets { gap: 12px; }
  .bpw .bpw__routing-targets > div { padding: 7px 2px; font-size: 7px; }
  .bpw .bpw__routing-targets svg { width: 20px; height: 20px; }
  .bpw .bpw__leads > span { gap: 2px; padding: 4px 3px; font-size: 8px; }
  .bpw .bpw__leads em { padding: 3px; font-size: 7px; }
  .bpw .bpw__contact { gap: 14px; padding: 22px 18px; }
  .bpw .bpw__contact h3 { font-size: 25px; }
  .bpw .bpw__bubble { padding: 11px 9px 22px; font-size: 11px; }
  .bpw .bpw__bubble--answer { margin-left: 8px; }
  .bpw .bpw__bubble time { bottom: 5px; font-size: 8px; }
  .bpw .bpw__button { min-height: 48px; font-size: 15px; }
}
@media (max-width: 359px) {
  .bpw .bpw__title { font-size: 28px; }
  .bpw .bpw__step { gap: 8px; padding: 12px 8px; }
  .bpw .bpw__copy h3 { font-size: 18px; }
  .bpw .bpw__contact { grid-template-columns: minmax(0, 1fr); }
  .bpw .bpw__contact h3, .bpw .bpw__bubble { grid-column: 1; grid-row: auto; }
  .bpw .bpw__contact h3 { margin-bottom: 8px; }
  .bpw .bpw__bubble { max-width: 90%; }
}
