/* ============================================================
   AMP ALLOCATOR · "See how $1,000 takes a seat."
   Interactive, illustrative structure-only allocator.
   Built TO ~/WEB-DESIGN-RULESET.md (§3 motion, §4 legibility,
   §5 brand, §6 copy, §7 compliance). Self-hosted. Additive.
   STRUCTURE ONLY: no yield / return / performance anywhere.
   ============================================================ */

.amp-alloc{
  position:relative;
  padding:90px 32px 96px;
  background:linear-gradient(180deg, #02071a 0%, #050f24 52%, #02071a 100%);
  border-bottom:1px solid rgba(201,168,76,0.10);
  color:#F3EFE6;
}
.amp-alloc *{ box-sizing:border-box; }
.amp-alloc__inner{ max-width:1100px;margin:0 auto; }

/* ---- header ---- */
.amp-alloc__head{ text-align:center;max-width:740px;margin:0 auto 44px; }
.amp-alloc__eyebrow{
  font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:0.22em;
  text-transform:uppercase;color:#C9A84C;margin-bottom:20px;
}
.amp-alloc__title{
  font-family:'IBM Plex Serif',serif;font-weight:300;
  font-size:clamp(32px,4.6vw,52px);line-height:1.07;letter-spacing:-0.018em;
  color:#F3EFE6;margin:0 0 22px;
}
.amp-alloc__title em{ font-style:italic;color:#C9A84C;font-weight:400; }
.amp-alloc__sub{
  font-family:'IBM Plex Serif',serif;font-style:italic;
  font-size:clamp(16px,1.6vw,20px);line-height:1.55;
  color:rgba(243,239,230,0.82);margin:0;
}

/* ---- console card ---- */
.amp-alloc__console{
  display:grid;grid-template-columns:minmax(0,420px) minmax(0,1fr);
  gap:40px;align-items:start;
  max-width:1000px;margin:0 auto;
  padding:40px;
  border:1px solid rgba(201,168,76,0.22);
  border-radius:10px;
  background:rgba(255,255,255,0.025);
}

/* ---- control column ---- */
.amp-alloc__control-label{
  font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:0.14em;
  text-transform:uppercase;color:rgba(243,239,230,0.62);margin-bottom:14px;
}
.amp-alloc__amount-row{
  display:flex;align-items:baseline;gap:8px;margin-bottom:6px;
}
.amp-alloc__currency{
  font-family:'IBM Plex Serif',serif;font-weight:300;font-size:clamp(26px,3vw,34px);color:#C9A84C;
}
.amp-alloc__amount{
  font-family:'IBM Plex Serif',serif;font-weight:300;
  font-size:clamp(40px,5.4vw,64px);line-height:1;letter-spacing:-0.02em;
  color:#FFD56B;
}
.amp-alloc__amount-foot{
  font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:0.06em;
  color:rgba(243,239,230,0.50);margin-bottom:26px;
}

/* numeric input (synced with slider) */
.amp-alloc__numwrap{ position:relative;margin-bottom:24px; }
.amp-alloc__numwrap-prefix{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  font-family:'IBM Plex Mono',monospace;font-size:15px;color:rgba(243,239,230,0.6);pointer-events:none;
}
.amp-alloc__num{
  width:100%;padding:13px 14px 13px 28px;
  font-family:'IBM Plex Mono',monospace;font-size:16px;font-weight:500;
  color:#F3EFE6;background:rgba(2,7,26,0.6);
  border:1px solid rgba(201,168,76,0.30);border-radius:6px;
  letter-spacing:0.02em;
}
.amp-alloc__num:focus{
  outline:none;border-color:#C9A84C;box-shadow:0 0 0 3px rgba(201,168,76,0.18);
}
.amp-alloc__num::-webkit-outer-spin-button,
.amp-alloc__num::-webkit-inner-spin-button{ -webkit-appearance:none;margin:0; }

/* range slider */
.amp-alloc__slider{
  width:100%;height:34px;background:transparent;cursor:pointer;
  -webkit-appearance:none;appearance:none;margin:0 0 8px;
}
.amp-alloc__slider:focus{ outline:none; }
.amp-alloc__slider::-webkit-slider-runnable-track{
  height:6px;border-radius:3px;
  background:linear-gradient(90deg,#C9A84C 0%,#C9A84C var(--amp-alloc-fill,1%),rgba(243,239,230,0.16) var(--amp-alloc-fill,1%),rgba(243,239,230,0.16) 100%);
}
.amp-alloc__slider::-moz-range-track{
  height:6px;border-radius:3px;background:rgba(243,239,230,0.16);
}
.amp-alloc__slider::-moz-range-progress{
  height:6px;border-radius:3px;background:#C9A84C;
}
.amp-alloc__slider::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;
  width:26px;height:26px;border-radius:50%;margin-top:-10px;
  background:radial-gradient(circle at 35% 30%, #FFD56B, #C9A84C 70%);
  border:2px solid #02071a;
  box-shadow:0 2px 10px rgba(201,168,76,0.45);
}
.amp-alloc__slider::-moz-range-thumb{
  width:26px;height:26px;border-radius:50%;border:2px solid #02071a;
  background:radial-gradient(circle at 35% 30%, #FFD56B, #C9A84C 70%);
  box-shadow:0 2px 10px rgba(201,168,76,0.45);
}
.amp-alloc__slider:focus-visible::-webkit-slider-thumb{
  box-shadow:0 0 0 4px rgba(255,213,107,0.30),0 2px 10px rgba(201,168,76,0.45);
}
.amp-alloc__slider:focus-visible::-moz-range-thumb{
  box-shadow:0 0 0 4px rgba(255,213,107,0.30),0 2px 10px rgba(201,168,76,0.45);
}
.amp-alloc__slider-ends{
  display:flex;justify-content:space-between;
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.10em;
  color:rgba(243,239,230,0.45);margin-top:2px;
}

/* structural readouts */
.amp-alloc__readouts{
  display:flex;gap:10px;margin-top:26px;flex-wrap:wrap;
}
.amp-alloc__readout{
  flex:1;min-width:120px;padding:14px 16px;
  border:1px solid rgba(255,255,255,0.10);border-radius:6px;
  background:rgba(255,255,255,0.02);
}
.amp-alloc__readout-val{
  font-family:'IBM Plex Serif',serif;font-weight:300;font-size:clamp(20px,2.4vw,28px);
  color:#F3EFE6;line-height:1;margin-bottom:8px;
}
.amp-alloc__readout-lbl{
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.10em;
  text-transform:uppercase;color:rgba(243,239,230,0.58);line-height:1.4;
}

/* ---- structure column (bars) ---- */
.amp-alloc__structure-head{
  font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:0.14em;
  text-transform:uppercase;color:rgba(243,239,230,0.62);margin-bottom:18px;
}
.amp-alloc__cats{ display:flex;flex-direction:column;gap:16px; }
.amp-alloc__cat{ display:block; }
.amp-alloc__cat-top{
  display:flex;justify-content:space-between;align-items:baseline;
  margin-bottom:7px;gap:12px;
}
.amp-alloc__cat-name{
  font-family:'IBM Plex Sans',sans-serif;font-weight:500;font-size:14px;
  color:#F3EFE6;letter-spacing:0.01em;
}
.amp-alloc__cat-fig{
  font-family:'IBM Plex Mono',monospace;font-size:13px;color:#C9A84C;
  white-space:nowrap;
}
.amp-alloc__cat-fig .amp-alloc__cat-pctlbl{
  color:rgba(243,239,230,0.50);margin-left:8px;
}
.amp-alloc__bar-track{
  position:relative;height:14px;border-radius:7px;
  background:rgba(243,239,230,0.08);overflow:hidden;
}
.amp-alloc__bar-fill{
  position:absolute;left:0;top:0;height:100%;width:0;
  border-radius:7px;
  transform-origin:left center;
  transition:width 320ms cubic-bezier(0.22,0.61,0.36,1);
}
.amp-alloc__cat--c1 .amp-alloc__bar-fill{ background:linear-gradient(90deg,#C9A84C,#FFD56B); }
.amp-alloc__cat--c2 .amp-alloc__bar-fill{ background:linear-gradient(90deg,#9c7f3a,#C9A84C); }
.amp-alloc__cat--c3 .amp-alloc__bar-fill{ background:linear-gradient(90deg,#6f6f86,#9aa0b8); }
.amp-alloc__cat--c4 .amp-alloc__bar-fill{ background:linear-gradient(90deg,#3f4d66,#5d7299); }

.amp-alloc__stack{
  margin-top:24px;padding:16px 18px;
  border:1px solid rgba(201,168,76,0.30);border-radius:6px;
  background:rgba(201,168,76,0.05);
}
.amp-alloc__stack-lbl{
  font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:0.12em;
  text-transform:uppercase;color:rgba(243,239,230,0.55);margin-bottom:7px;
}
.amp-alloc__stack-val{
  font-family:'IBM Plex Serif',serif;font-style:italic;font-size:clamp(15px,1.5vw,18px);
  line-height:1.4;color:#F3EFE6;
}

/* ---- disclaimer ---- */
.amp-alloc__disclaimer{
  max-width:1000px;margin:26px auto 0;
  font-family:'IBM Plex Sans',sans-serif;font-size:12.5px;line-height:1.6;
  color:rgba(243,239,230,0.58);text-align:center;
}
.amp-alloc__disclaimer strong{ color:rgba(243,239,230,0.8);font-weight:500; }

/* ---- mobile ---- */
@media (max-width:780px){
  .amp-alloc{ padding:64px 18px 72px; }
  .amp-alloc__console{
    grid-template-columns:1fr;gap:32px;padding:26px 20px;
  }
}
@media (max-width:390px){
  .amp-alloc__console{ padding:22px 16px; }
  .amp-alloc__readout{ min-width:100%; }
}

/* ---- reduced motion: tool still works, no animated growth ---- */
@media (prefers-reduced-motion: reduce){
  .amp-alloc__bar-fill{ transition:none; }
}
