/* The supplied allocation-map concept, restyled and scoped to its homepage section. */
.allocation-map-section { padding-block: clamp(3.5rem, 7vw, 6rem); background: linear-gradient(135deg, var(--promo-warm), var(--promo-mint-wash)); scroll-margin-top: 6.5rem; }
.allocation-map-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 0.5rem 4rem; align-items: end; margin-bottom: 2.25rem; }
.allocation-map-heading .eyebrow { grid-column: 1 / -1; }
.allocation-map-heading h2 { max-width: 17ch; }
.allocation-map-heading > p:last-child { max-width: 47ch; font-size: 1rem; line-height: 1.75; }
.allocation-map {
  --map-ink: #0b1325;
  --map-muted: #4b5d59;
  --map-teal: #246c60;
  --map-line: #d9e2da;
  position: relative;
  padding: clamp(1.1rem, 3vw, 2.5rem);
  border: 1px solid rgba(36,108,96,0.13);
  border-radius: 1.5rem;
  background: rgba(255,255,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  color: var(--map-ink);
}
.allocation-map .maphead, .allocation-map .mapfoot { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.allocation-map .maphead h3 { font-size: 1.25rem; font-weight: 600; }
.allocation-map .badge { padding: 0.4rem 0.65rem; border: 1px solid #d4e4d9; border-radius: 999px; color: var(--map-teal); background: rgba(255,255,255,0.45); font-size: 0.75rem; font-weight: 600; }
.allocation-map .calc { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; margin: 1.75rem 0 1.5rem; }
.allocation-map .value { min-width: 0; padding: 1.15rem 1.25rem; border: 1px solid #dce6dd; border-radius: 0.85rem; background: rgba(255,255,255,0.45); }
.allocation-map .value span { display: block; margin-bottom: 0.35rem; color: var(--map-muted); font-size: 0.875rem; }
.allocation-map .value b { display: block; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.allocation-map .value.final { border-color: #bfd8c8; background: rgba(232,242,237,0.4); }
.allocation-map .value.final b { color: var(--map-teal); }
.allocation-map .math { color: var(--map-teal); font-size: 1.5rem; }
.allocation-map .tray { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.6rem 1.4rem; border-bottom: 1px solid var(--map-line); }
.allocation-map .pool { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; align-items: baseline; margin: 0; color: var(--map-muted); font-size: 0.9375rem; }
.allocation-map .pool strong { color: var(--map-teal); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.allocation-map .pool.deficit, .allocation-map .pool.deficit strong { color: #983c32; }
.allocation-map .allocation-map-token { position: relative; z-index: 3; min-height: 2.75rem; padding: 0.6rem 1.1rem; font-size: 0.875rem; touch-action: none; cursor: grab; }
.allocation-map .allocation-map-token:active { cursor: grabbing; }
.allocation-map .allocation-map-token.is-dragging { transform: translate(var(--x),var(--y)) rotate(-4deg); box-shadow: 0 8px 18px rgba(81,60,38,0.15); }
.allocation-map .branches { display: block; width: 100%; height: 2.25rem; color: #bfd4c7; }
.allocation-map .buckets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 1.5rem; }
.allocation-map .bucket { --dark: #71a58f; --light: #e5f3e9; min-width: 0; padding: 1rem; border: 1px solid #d7e4da; border-radius: 1rem; background: rgba(255,255,255,0.35); box-shadow: inset 0 1px 0 rgba(255,255,255,0.8); transition: border-color 160ms ease, background-color 160ms ease; }
.allocation-map .bucket:nth-child(2) { --dark: #649b9d; --light: #dfefeb; }
.allocation-map .bucket:nth-child(3) { --dark: #7fa98a; --light: #e9f3e4; }
.allocation-map .bucket:nth-child(4) { --dark: #8aae9a; --light: #ecf5eb; }
.allocation-map .bucket:nth-child(5) { --dark: #c79f51; --light: #fff1cf; }
.allocation-map .bucket.over { border-color: #d7aa4c; background: #fff5dd; }
.allocation-map .art { display: block; width: 4.25rem; height: 3.25rem; overflow: visible; margin-bottom: 0.75rem; filter: drop-shadow(0 4px 3px rgba(36,108,96,0.07)); }
.allocation-map .art.hit { animation: allocation-map-lift 250ms ease-out; }
@keyframes allocation-map-lift { 45% { transform: translateY(-5px); } }
.allocation-map .bucket h4 { min-height: 2.7em; margin: 0 0 0.4rem; color: var(--map-ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.allocation-map .amount { display: flex; align-items: center; gap: 0.3rem; color: var(--map-ink); font-size: 1.25rem; font-weight: 600; }
.allocation-map .amount input { width: 100%; min-width: 0; min-height: 2.75rem; padding: 0.3rem 0; border: 0; border-bottom: 1px solid #cbded0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; }
.allocation-map .amount input:hover { background: #f3f8f3; }
.allocation-map .controls { display: flex; gap: 0.4rem; margin-top: 0.75rem; }
.allocation-map button { min-height: 2.75rem; padding: 0.55rem 0.7rem; border: 1px solid #b7cebe; border-radius: 0.55rem; color: var(--map-teal); background: #f9fcf8; font: 600 0.875rem/1.35 var(--font); cursor: pointer; }
.allocation-map .controls button:first-child { flex: 1; }
.allocation-map .controls .btnminus { min-width: 2.75rem; padding-inline: 0.5rem; }
.allocation-map button:not(.btn):hover:not(:disabled) { background: #eaf4ec; border-color: var(--map-teal); }
.allocation-map button:disabled { opacity: 0.45; cursor: default; }
.allocation-map .mapfoot { padding-top: 1.5rem; border-top: 1px solid var(--map-line); }
.allocation-map .mapfoot > p { max-width: 64ch; color: var(--map-muted); font-size: 0.875rem; line-height: 1.65; }
.allocation-map .actions { display: flex; flex-shrink: 0; gap: 0.65rem; }
.allocation-map .allocation-map-copy { min-height: 2.75rem; padding: 0.55rem 1.2rem; font-size: 0.875rem; }
.allocation-map details { margin-top: 1.4rem; color: var(--map-muted); font-size: 0.875rem; }
.allocation-map summary { width: fit-content; min-height: 2.75rem; align-content: center; color: var(--map-teal); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.allocation-map .edit { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 1rem; }
.allocation-map .edit label { display: grid; gap: 0.4rem; font-weight: 600; }
.allocation-map .edit input { max-width: 14rem; min-height: 2.75rem; padding: 0.65rem; border: 1px solid #afc8b8; border-radius: 0.55rem; background: #fff; color: var(--map-ink); font: inherit; font-size: 1rem; }
.allocation-map .feedback { min-height: 1.6em; margin-top: 0.7rem; color: var(--map-teal); font-size: 0.875rem; line-height: 1.6; }
.allocation-map .fallback { display: block; width: 100%; height: 16rem; margin-top: 0.5rem; padding: 1rem; border: 1px solid var(--map-line); border-radius: 0.7rem; background: #fff; color: var(--map-ink); font: inherit; font-size: 1rem; }
.allocation-map [hidden] { display: none !important; }
.allocation-map :focus-visible { outline: 3px solid var(--map-teal); outline-offset: 3px; }
.allocation-map-tip { margin-top: 1rem; color: var(--promo-muted); font-size: 0.875rem; }
@media (max-width: 1000px) {
  .allocation-map-heading { grid-template-columns: 1fr; gap: 1rem; }
  .allocation-map-heading h2 { max-width: 23ch; }
  .allocation-map .buckets { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1rem; }
  .allocation-map .branches { display: none; }
  .allocation-map .mapfoot { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .allocation-map .maphead { align-items: flex-start; }
  .allocation-map .badge { font-size: 0.75rem; }
  .allocation-map .calc { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .allocation-map .value { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1rem; }
  .allocation-map .value span { margin: 0; max-width: 12ch; }
  .allocation-map .value b { font-size: 1.7rem; }
  .allocation-map .math { justify-self: center; font-size: 1.1rem; }
  .allocation-map .tray { flex-wrap: wrap; }
  .allocation-map .buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .allocation-map .bucket:last-child { grid-column: 1 / -1; }
  .allocation-map .bucket { padding: 0.85rem; }
  .allocation-map .bucket h4 { font-size: 0.875rem; }
  .allocation-map .amount { font-size: 1.1rem; }
  .allocation-map .controls button:first-child { padding-inline: 0.3rem; white-space: nowrap; }
  .allocation-map .actions { flex-wrap: wrap; }
  .allocation-map .edit label, .allocation-map .edit input { width: 100%; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .allocation-map *, .allocation-map *::before, .allocation-map *::after { animation: none !important; transition: none !important; }
}
