/* Blog lead card in the Run-It platform's own styling (owner 2026-11-17: "styling we use in the
   platform ... the correct inner glow, correct card, correct bar charts").
   Values copied from the app: dashboard/build/static/ui-foundation.css + ui-components.css
   (.ri-card, .ri-card-head hairline, .ri-tile--glow, .ri-level-track/.ri-level-fill).
   Keep it light: a title, at most four tiles or bars, one source line. */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500&display=swap');

@property --tile-lift {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

.bpc {
  --bpc-cyan: 46, 209, 244;
  --bpc-green: 52, 211, 153;
  --bpc-amber: 251, 191, 36;
  --bpc-red: 248, 113, 113;
  --bar-rgb: var(--bpc-cyan);
  position: relative;
  box-sizing: border-box;
  max-width: 870px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)), #0a0820;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 30px rgba(200, 200, 200, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.96);
  font-family: 'Noto Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  text-align: left;
}
.bpc *, .bpc *::before, .bpc *::after { box-sizing: border-box; }

.bpc__head {
  margin: 0 0 16px;
  padding: 0 0 16px;
  background: linear-gradient(90deg, rgba(46, 209, 244, 0.4) 0%, rgba(46, 209, 244, 0.2) 50%, transparent 100%) left bottom / 100% 1px no-repeat;
}
.bpc__title {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.96) !important;
  font-family: inherit !important;
  font-size: 24px !important;
  font-weight: 300 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em;
}
.bpc__sub {
  margin: 6px 0 0 !important;
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}

/* Tiles: .ri-tile--glow, a soft edge and a little light at the bottom in the tile's colour. */
.bpc__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.bpc__tile {
  --tile-rgb: var(--bpc-cyan);
  --tile-color: rgb(var(--tile-rgb));
  --_tile-edge: 18%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background:
    radial-gradient(130% calc(22% + 53% * var(--tile-lift)) at 50% 104%, color-mix(in srgb, var(--tile-color) calc(50% * var(--tile-lift)), transparent), color-mix(in srgb, var(--tile-color) calc(17% * var(--tile-lift)), transparent) 50%, transparent 78%),
    linear-gradient(0deg, color-mix(in srgb, var(--tile-color) calc(10% * var(--tile-lift)), transparent), transparent 70%),
    radial-gradient(120% 55% at 50% 108%, color-mix(in srgb, var(--tile-color) 20%, transparent), color-mix(in srgb, var(--tile-color) 5%, transparent) 55%, transparent 80%),
    rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tile-color) var(--_tile-edge), transparent), inset 0 0 16px color-mix(in srgb, var(--tile-color) calc(6% + 6% * var(--tile-lift)), transparent);
  transition: --tile-lift 380ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
@media (hover: hover) {
  .bpc__tile:hover { --tile-lift: 1; --_tile-edge: 45%; transition: --tile-lift 800ms cubic-bezier(0.3, 0.1, 0.3, 1) 140ms, box-shadow 240ms cubic-bezier(0.4, 0, 0.2, 1); }
}
.bpc__tile[aria-pressed="true"] { --tile-lift: 1; --_tile-edge: 100%; transition: --tile-lift 800ms cubic-bezier(0.3, 0.1, 0.3, 1) 140ms, box-shadow 240ms cubic-bezier(0.4, 0, 0.2, 1); }
.bpc__tile:focus-visible, .bpc__row:focus-visible { outline: 2px solid #2ED1F4; outline-offset: 2px; }
.bpc__label { color: rgba(255, 255, 255, 0.96); font-size: 15px; font-weight: 400; line-height: 1.3; }
.bpc__value { color: rgb(var(--tile-rgb)); font-size: 13px; line-height: 1.35; }

.bpc [data-tone="green"] { --tile-rgb: var(--bpc-green); --bar-rgb: var(--bpc-green); }
.bpc [data-tone="amber"] { --tile-rgb: var(--bpc-amber); --bar-rgb: var(--bpc-amber); }
.bpc [data-tone="red"] { --tile-rgb: var(--bpc-red); --bar-rgb: var(--bpc-red); }

/* Bars: .ri-level, a glass track, a faint haze that brightens toward the value, one glowing line at the value. */
.bpc__rows { display: grid; gap: 6px; }
.bpc__row {
  --bar-rgb: var(--bpc-cyan);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 12px;
  width: 100%;
  margin: 0;
  padding: 10px 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
button.bpc__row { cursor: pointer; transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1); }
@media (hover: hover) { button.bpc__row:hover { background: rgba(255, 255, 255, 0.07); } }
.bpc__row[aria-pressed="true"] { background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(var(--bar-rgb), 0.35); }
.bpc__row .bpc__label small { display: block; margin-top: 2px; color: rgba(255, 255, 255, 0.62); font-size: 12px; }
.bpc__num { color: rgb(var(--bar-rgb)); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bpc__track {
  position: relative;
  grid-column: 1 / -1;
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
}
.bpc__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--bar-rgb), 0.02), rgba(var(--bar-rgb), 0.28));
  transform-origin: left center;
  animation: bpc-grow 700ms cubic-bezier(0.2, 0, 0, 1) both;
}
.bpc__fill::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -1px;
  bottom: -4px;
  width: 3px;
  border-radius: 2px;
  background: rgb(var(--bar-rgb));
  box-shadow: 0 0 8px rgba(var(--bar-rgb), 0.9), 0 0 2px rgba(var(--bar-rgb), 0.9);
}
.bpc__fill--seg { border-radius: 0; animation-delay: var(--seg-delay, 0ms); }
.bpc__fill--seg:first-child { border-radius: 3px 0 0 3px; }
@keyframes bpc-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .bpc__fill { animation: none; } }

/* A reference line (e.g. "same risk as one pair") across the bars. */
.bpc__ref { position: absolute; top: -10px; bottom: -6px; width: 0; border-left: 1px dashed rgba(255, 255, 255, 0.38); }
.bpc__reflabel { position: relative; height: 18px; margin: 0 12px 2px !important; color: rgba(255, 255, 255, 0.62) !important; font-size: 12px !important; line-height: 18px !important; }
.bpc__reflabel span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }

.bpc__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; padding: 0 12px; list-style: none; color: rgba(255, 255, 255, 0.74); font-size: 13px; }
.bpc__legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.bpc__legend li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--bar-rgb)); box-shadow: 0 0 6px rgba(var(--bar-rgb), 0.8); }

.bpc__detail {
  margin: 16px 0 0 !important;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(46, 209, 244, 0.08), inset 0 0 14px rgba(46, 209, 244, 0.06);
  color: rgba(255, 255, 255, 0.74) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}
.bpc__detail[hidden] { display: none; }
.bpc [data-bpc-copy] { display: none; }
.bpc__note, .bpc__source {
  margin: 16px 0 0 !important;
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}
.bpc__note + .bpc__source { margin-top: 6px !important; }

@media (max-width: 640px) {
  .bpc { padding: 20px 16px; }
  .bpc__title { font-size: 22px !important; }
  .bpc__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bpc__tile { padding: 14px 12px; }
  .bpc__label { font-size: 14px; }
}
