:root {
  --pte-ink: #253c50;
  --pte-blue: #48677e;
  --pte-slate: #334d63;
  --pte-muted: #596b7a;
  --pte-line: #d8e1e8;
  --pte-paper: #f3f6f8;
  --pte-gold: #c19353;
}

/* Brand framing is scoped so the original case study layout stays intact. */
.pte-header, .pte-footer, .pte-topbar { font-family: Arial, Helvetica, sans-serif; color: var(--pte-ink); line-height: 1.6; }
.pte-header *, .pte-footer *, .pte-topbar * { box-sizing: border-box; }
.pte-header a, .pte-footer a { color: var(--pte-blue); text-underline-offset: 4px; }
.pte-header a:focus-visible, .pte-header button:focus-visible, .pte-footer a:focus-visible, .pte-skip:focus-visible { outline: 3px solid #b3833d; outline-offset: 4px; }
.pte-skip { position: absolute; top: -100px; left: 16px; background: white; color: var(--pte-ink); padding: 12px 16px; z-index: 1000000; }
.pte-skip:focus { top: 10px; }
.pte-topbar { background: var(--pte-slate); color: #f1f5f8; font-size: 12px; letter-spacing: 1px; }
.pte-topbar-inner { max-width: 1320px; margin: auto; padding: 7px 40px; display: flex; align-items: center; gap: 24px; }
.pte-topbar span { letter-spacing: 0; opacity: .85; }
.pte-header { background: #fff; border-bottom: 3px solid var(--pte-gold); }
.pte-header-inner { max-width: 1320px; margin: auto; padding: 21px 40px; display: flex; align-items: center; gap: 28px; }
.pte-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pte-brand-logo { display: block; flex-shrink: 0; }
.pte-brand-logo img { display: block; width: 48px; height: 48px; object-fit: contain; }
.pte-wordmark { min-width: 0; }
.pte-wordmark .pte-name { display: block; font: bold 20px/1.2 Georgia, 'Times New Roman', serif; letter-spacing: .2px; color: var(--pte-ink); text-decoration: none; white-space: nowrap; }
.pte-name em { font-size: 13px; font-weight: normal; }
.pte-wordmark .pte-website { display: block; font: normal 14px/1.4 Arial, sans-serif; color: var(--pte-blue); text-decoration: none; margin-top: 3px; overflow-wrap: anywhere; }
.pte-wordmark .pte-website:hover { text-decoration: underline; }
.pte-wordmark small { display: block; font: normal 12px/1.4 Arial, sans-serif; letter-spacing: 1px; margin-top: 4px; color: var(--pte-muted); }
.pte-nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.pte-nav a, .pte-mobile-nav a { font-size: 14px; text-decoration: none; color: var(--pte-ink); }
.pte-nav a { padding: 8px 0; white-space: nowrap; }
.pte-nav a:hover, .pte-mobile-nav a:hover { color: #a36b2e; }
.pte-call { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; text-decoration: none; border-left: 1px solid var(--pte-line); padding-left: 22px; font-weight: bold; flex-shrink: 0; white-space: nowrap; }
.pte-call svg { width: 17px; height: 17px; flex-shrink: 0; }
.pte-menu { display: none; border: 0; background: none; color: var(--pte-ink); padding: 10px; cursor: pointer; }
.pte-menu svg { width: 22px; height: 22px; display: block; }
.pte-mobile-nav { padding: 0 22px 18px; flex-direction: column; align-items: flex-start; gap: 4px; }
.pte-mobile-nav:not([hidden]) { display: flex; }
.pte-mobile-nav[hidden] { display: none; }
.pte-mobile-nav a { padding: 8px 0; }

.pte-footer { background: var(--pte-paper); border-top: 3px solid var(--pte-gold); margin-top: 24px; }
.pte-footer-grid { width: min(1180px, calc(100% - 80px)); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) 260px; gap: 35px; padding: 32px 0; align-items: start; }
.pte-footer-grid > div { min-width: 0; }
.pte-footer p { margin: 10px 0 13px; font-size: 13px; color: var(--pte-muted); line-height: 1.6; }
.pte-footer .pte-brand-logo img { width: 40px; height: 40px; }
.pte-footer .pte-wordmark .pte-name { font-size: 17px; }
.pte-footer .pte-wordmark small { letter-spacing: .6px; }
.pte-agent { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.pte-agent-photo { display: block; width: 104px; height: auto; flex-shrink: 0; object-fit: contain; object-position: center; background: #fff; border: 1px solid var(--pte-line); border-radius: 6px; }
.pte-agent-details strong, .pte-agent-details span, .pte-agent-details small { display: block; line-height: 1.5; }
.pte-agent-details strong { font-size: 17px; font-weight: 600; }
.pte-agent-details span { font-size: 14px; color: var(--pte-muted); }
.pte-agent-details small { font-size: 12px; color: var(--pte-muted); margin-top: 3px; }
.pte-footer .pte-phone, .pte-footer .pte-email { margin: 8px 0 0; }
.pte-phone a, .pte-email a { font-size: 14px; }
.pte-email { overflow-wrap: anywhere; }
.pte-address { font-style: normal; margin-top: 18px; font-size: 14px; line-height: 1.65; }
.pte-address strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.pte-address a { font-size: 14px; display: inline-block; text-decoration: none; }
.pte-address a:hover { text-decoration: underline; }
.pte-map iframe { display: block; border: 0; width: 100%; height: 180px; background: #e7eef4; border-radius: 6px; }
.pte-map-link { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 7px; border: 1px solid #c8d5df; border-radius: 4px; font-size: 14px; text-decoration: none; color: var(--pte-blue); background: #fff; text-align: center; padding: 8px 12px; }
.pte-map-link:hover { background: #e5edf3; }
.pte-resource { width: 100%; max-width: 260px; }
.pte-resource-link { display: block; border-radius: 7px; overflow: hidden; text-decoration: none; transition: box-shadow .2s; }
.pte-resource-link:hover { box-shadow: 0 4px 18px #253c5026; }
.pte-resource-link img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.pte-education { grid-column: 1 / -1; font-size: 13px; border-top: 1px solid var(--pte-line); padding-top: 20px; }
.pte-education p { margin: 8px 0 12px; }
.pte-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pte-footer-links a { font-size: 13px; }

/* The existing headings and buttons pick up Protect the Estate's palette. */
#pte-case-study [style*="color: rgb(186, 0, 0)"],
#pte-case-study [style*="color: rgb(228, 59, 44)"] { color: var(--pte-ink) !important; }
#pte-case-study [style*="color: rgb(0, 117, 178)"],
#pte-case-study [style*="color: rgb(1, 116, 199)"] { color: var(--pte-blue) !important; }
#pte-case-study .elHeadline b { color: inherit !important; }
#pte-case-study .elButton { background: var(--pte-blue) !important; background-image: none !important; color: #fff !important; border-color: var(--pte-gold) !important; }
#pte-case-study .elButton:hover { background: var(--pte-slate) !important; color: #fff !important; }
#pte-case-study .elButton:focus-visible { outline: 3px solid var(--pte-gold); outline-offset: 4px; }
#pte-case-study .elDividerInner { border-color: var(--pte-gold); }
.pte-original-footer { background: var(--pte-paper) !important; border-top: 1px solid var(--pte-line); color: var(--pte-ink); }

/* Restore the legacy layout's missing desktop/mobile visibility rules. */
@media (min-width: 771px) {
  #pte-case-study [data-hide-on="mobile"],
  .pte-original-footer[data-hide-on="mobile"] { display: none !important; }
}
@media (max-width: 770px) {
  #pte-case-study [data-hide-on="desktop"],
  .pte-original-footer[data-hide-on="desktop"] { display: none !important; }
  #tmp_headline1-93297-162 .elHeadline { font-size: 30px; line-height: 1.2; }
}

@media (max-width: 1100px) {
  .pte-header-inner { gap: 18px; padding: 18px 25px; }
  .pte-nav { gap: 16px; }
  .pte-nav a { font-size: 13px; }
  .pte-wordmark .pte-name { font-size: 18px; }
  .pte-wordmark small { letter-spacing: .5px; }
  .pte-call { padding-left: 15px; }
  .pte-call span { display: none; }
}
@media (max-width: 950px) {
  .pte-footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  .pte-resource { grid-column: 2; }
  .pte-footer-grid { width: calc(100% - 48px); }
}
@media (max-width: 760px) {
  .pte-nav { display: none; }
  .pte-menu { display: block; }
  .pte-header-inner { gap: 12px; padding: 15px 18px; }
  .pte-header-inner .pte-brand { flex: 1; gap: 8px; }
  .pte-header-inner .pte-brand-logo img { width: 32px; height: 32px; }
  .pte-header-inner .pte-name { font-size: clamp(14px, 4vw, 18px); }
  .pte-header-inner .pte-website { font-size: 12px; }
  .pte-header-inner .pte-wordmark small { letter-spacing: 0; font-size: 10px; }
  .pte-call { padding: 10px 0; border: 0; }
  .pte-topbar-inner { padding: 6px 18px; font-size: 10px; }
  .pte-topbar span { display: none; }
}
@media (min-width: 761px) { .pte-mobile-nav { display: none !important; } }
@media (max-width: 640px) {
  .pte-footer-grid { width: calc(100% - 36px); grid-template-columns: 1fr; gap: 25px; padding: 28px 0; }
  .pte-resource { grid-column: auto; }
  .pte-education { grid-column: auto; }
  .pte-address { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .pte-resource-link { transition: none; } }
@media print { .pte-header, .pte-topbar, .pte-skip, .pte-footer { display: none !important; } }
