/* Design Standard v3 — widget layer (charts, calculators, explorer, facades).
   Loaded as a separate lightweight stylesheet on pages that carry a widget. */
.p3-widget { border: 1px solid var(--outline); background: var(--surface-1); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.25rem); margin-top: 3rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.p3-widget h2 { font-family: var(--font-display-face, var(--font-sans)); font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 0.4em; letter-spacing: -0.015em; }
.p3-widget h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.35em; }
.p3-widget .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary-v1); }
.p3-bars { display: grid; gap: 0.65rem; margin: 1.4rem 0; }
.p3-bar-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 64px; align-items: center; gap: 0.8rem; }
.p3-bar-label { color: var(--on-variant); font-size: 0.92rem; }
.p3-bar-track { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.p3-bar { height: 100%; width: var(--v); border-radius: 999px; background: var(--accent-grad); }
.p3-bar.pre { transform: scaleX(0); transform-origin: left center; }
.p3-bar.grown { transform: scaleX(1); transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.p3-bar-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.p3-calc { margin-top: 1.6rem; border-top: 1px solid var(--outline); padding-top: 1.4rem; }
.p3-slider-label { display: flex; justify-content: space-between; font-weight: 600; margin-top: 1rem; }
.p3-slider-label output { color: var(--primary-v1); font-variant-numeric: tabular-nums; }
.p3-widget input[type="range"] { width: 100%; accent-color: var(--primary-v1); height: 32px; }
.p3-calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.4rem; }
.p3-calc-cell { border: 1px solid var(--outline); background: var(--surface-2); border-radius: var(--radius); padding: 1rem; display: grid; gap: 0.25rem; }
.p3-calc-num { font-size: 1.55rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.p3-calc-cell span:last-child { color: var(--on-variant); font-size: 0.88rem; }
.p3-calc-note { color: var(--on-variant); font-size: 0.9rem; margin-top: 1.1rem; }
.p3-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0; }
.p3-chip { border: 1px solid var(--outline); background: var(--surface-2); color: var(--on-surface);
  border-radius: 999px; padding: 0.55rem 1.1rem; font-weight: 600; cursor: pointer; min-height: 44px; }
.p3-chip.is-on { background: var(--accent-grad); color: var(--primary-ink); border-color: transparent; }
.p3-panel { border-left: 3px solid var(--primary-v1); padding-left: 1rem; margin-bottom: 1.4rem; }
.p3-facade { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--outline); cursor: pointer; margin: 1.6rem 0; background: #000; }
.p3-facade img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; }
.p3-facade iframe { width: 100%; height: 100%; border: 0; display: block; }
.p3-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px;
  border-radius: 50%; background: var(--accent-grad); color: var(--primary-ink); display: grid; place-items: center;
  font-size: 26px; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.p3-facade-label { position: absolute; left: 12px; bottom: 12px; background: rgba(5,8,12,.78); color: #fff;
  padding: 0.4rem 0.8rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }
@media (max-width: 640px) {
  .p3-bar-row { grid-template-columns: 1fr 52px; }
  .p3-bar-label { grid-column: 1 / -1; }
  .p3-calc-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .p3-bar.grown { transition: none; }
}
