.cpg-attribution-bar, .cpg-site-footer, .cpg-panel, .cpg-popup {
  --footer-body: "CPG Barlow", Barlow, Arial, sans-serif;
  --footer-display: "CPG Barlow Condensed", "Barlow Condensed", "Arial Narrow", sans-serif;
  --footer-width: min(calc(100% - 2 * clamp(18px, 3.8vw, 76px)), 1590px);
  box-sizing: border-box;
  font: 400 16px/1.45 var(--footer-body);
}

.cpg-attribution-bar {
  width: var(--footer-width);
  margin-inline: auto;
  display: flex;
  justify-content: flex-end;
  color: var(--soft, #455345);
}
.cpg-attribution-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}

footer.cpg-site-footer {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--band, #263d32);
  color: var(--band-ink, #fff8e5);
}
.cpg-footer-inner {
  width: var(--footer-width);
  margin-inline: auto;
  padding-block: clamp(24px, 2.3vw, 42px);
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) repeat(2, minmax(150px, .85fr));
  align-items: start;
  gap: 16px clamp(20px, 5vw, 85px);
}
.cpg-footer-brand, .cpg-footer-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.cpg-site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font: 400 16px/1.35 var(--footer-body);
  text-decoration: underline;
  text-underline-offset: .22em;
}
:is(body, #cpg-wall) .cpg-site-footer .cpg-footer-name {
  display: inline-block;
  position: relative;
  padding-left: 45px;
  font: 700 clamp(25px, 2.2vw, 36px)/.87 var(--footer-display);
  letter-spacing: -.035em;
  text-decoration: none;
}
.cpg-footer-name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: radial-gradient(circle, #fff8e5 0 5%, #a5442d 6% 21%, #20251f 22% 36%, #fff8e5 37% 38%, #20251f 39% 56%, #fff8e5 57% 58%, #20251f 59%);
}
.cpg-footer-top { margin-top: 10px; gap: .4em; }
:is(body, #cpg-wall) .cpg-footer-group h2 {
  margin: 0 0 5px;
  color: var(--highlight, #f6cc77);
  font: 600 15px/1.35 var(--footer-body);
  letter-spacing: normal;
}
:is(body, #cpg-wall) .cpg-site-footer a:hover { color: var(--highlight, #f6cc77); }
:is(body, #cpg-wall) .cpg-site-footer a:focus-visible {
  outline: 3px solid var(--highlight, #f6cc77);
  outline-offset: 2px;
}

.cpg-panel { display: none; color: var(--ink, #20251f); overflow-wrap: break-word; }
.cpg-panel:target {
  display: block;
  width: min(580px, calc(100% - 36px));
  margin: 20px auto;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--rule, #777e6d);
  background: var(--paper, #fffaf0);
}
:is(body, #cpg-wall) dialog.cpg-popup {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: min(580px, calc(100% - 32px));
  max-height: min(86dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 2px solid var(--ink, #20251f);
  border-radius: 0;
  background: var(--paper, #fffaf0);
  color: var(--ink, #20251f);
  box-shadow: 4px 5px 0 #20251f4f;
}
:is(body, #cpg-wall) dialog.cpg-popup::backdrop { background: #161a16ad; }
.cpg-popup .cpg-panel {
  display: block;
  width: auto;
  margin: 0;
  padding: 0 clamp(18px, 3vw, 32px) clamp(18px, 3vw, 32px);
  border: none;
}
.cpg-popup-tools {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: 4px 9px 0;
  background: var(--paper, #fffaf0);
}
.cpg-popup-tools button {
  min-height: 44px;
  min-width: 44px;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 15px/1.3 var(--footer-body);
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
:is(body, #cpg-wall) .cpg-panel h2 {
  font: 700 clamp(32px, 4vw, 44px)/1 var(--footer-display);
  letter-spacing: -.025em;
  margin: 0 0 17px;
}
:is(body, #cpg-wall) .cpg-panel h3 {
  margin: 17px 0 5px;
  font: 600 17px/1.25 var(--footer-body);
}
:is(body, #cpg-wall) .cpg-panel p { margin: 0; }
:is(body, #cpg-wall) .cpg-panel p + p { margin-top: 10px; }
:is(body, #cpg-wall) .cpg-panel a {
  color: var(--verm, #9d361e);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.cpg-panel-back { display: inline-flex; align-items: center; margin-top: 12px; min-height: 44px; }
.cpg-popup .cpg-panel-back { display: none; }
:is(body, #cpg-wall) :is(.cpg-attribution-bar, .cpg-panel, .cpg-popup-tools) :focus-visible {
  outline: 3px solid var(--verm, #9d361e);
  outline-offset: 2px;
}
@media (max-width: 650px) {
  .cpg-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cpg-footer-brand { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .cpg-footer-top { margin: 0; }
}
@media (forced-colors: active) {
  .cpg-site-footer, .cpg-popup { border: 1px solid CanvasText; }
}
