/* Hero Mac chrome + inner dashboard — scoped; does not touch :root/html */

/* Scale like an image: fixed design width, uniform scale, locked aspect */
.hero-browser-frame {
  width: 100%;
  position: relative;
  overflow: hidden;
  overscroll-behavior: none;
  line-height: 0; /* kill baseline gap under scaled stage */
  /* Clip + paint on the unscaled frame so scale() anti-aliasing
     doesn't leave page-gray wedges in the corner radii. */
  border-radius: 16px 16px 0 0;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  /* Soft side/top shadow only — bottom edge dissolves via mask */
  box-shadow:
    0 18px 40px -18px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  /* Window fades into the pastel hero/steps background */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.55) 78%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 58%,
    rgba(0, 0, 0, 0.55) 78%,
    transparent 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.hero-browser-stage {
  width: 1100px;
  transform-origin: top left;
  will-change: transform;
  line-height: normal;
}

.hero-browser {
  width: 1100px;
  border-radius: 0; /* frame clips the radius post-scale */
  overflow: hidden;
  border: 0;
  background: #fff;
  box-shadow: none;
}

.hero-browser__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f7f7f9 0%, #efeff3 100%);
  border-bottom: 1px solid #e4e4ea;
}

.hero-browser__dots {
  display: flex;
  gap: 7px;
  flex: none;
}
.hero-browser__dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}
.hero-browser__dots span:nth-child(1) { background: #ff5f57; }
.hero-browser__dots span:nth-child(2) { background: #febc2e; }
.hero-browser__dots span:nth-child(3) { background: #28c840; }

.hero-browser__url {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b6b78;
  background: #fff;
  border: 1px solid #e4e4ea;
  border-radius: 8px;
  padding: 5px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-browser__screen {
  background: #fff;
  max-height: none;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ---- dashboard (prefix all demo rules) ---- */
.hero-dashboard {
  --hd-bg: #ffffff;
  --hd-border: #ededf2;
  --hd-title: #7a7a86;
  --hd-text: #4d4d59;
  --hd-muted: #9d9daa;
  --hd-axis: #8d8d9b;
  --hd-grid: #e4e2ec;
  --hd-accent: #882AFF;
  --hd-accent-2: #b58cff;
  --hd-teal: #7ee0da;
  --hd-radius: 14px;
  color: var(--hd-text);
  font-family: inherit;
  background: var(--hd-bg);
  -webkit-font-smoothing: antialiased;
}
.hero-dashboard *,
.hero-dashboard *::before,
.hero-dashboard *::after { box-sizing: border-box; }

.hero-browser,
.hero-browser__screen,
.hero-dashboard {
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: none;
}
.hero-browser,
.hero-dashboard,
.hero-dashboard * {
  cursor: default !important;
}
.hero-dashboard a,
.hero-dashboard button,
.hero-dashboard select,
.hero-dashboard input,
.hero-dashboard .hd-bar,
.hero-dashboard .hd-icon-btn {
  pointer-events: none !important;
}
.hero-dashboard .hd-picker:disabled {
  opacity: 1;
  color: #5f5d6d;
  -webkit-appearance: none;
  appearance: none;
}
.hero-dashboard .hd-bar:hover,
.hero-dashboard .hd-bar:focus-visible {
  background: var(--hd-accent);
}
.hero-dashboard .hd-tip {
  display: none !important;
}

.hero-dashboard .hd-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: #fff;
  border-bottom: 1px solid var(--hd-border);
}
.hero-dashboard .hd-search {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.hero-dashboard .hd-search svg { flex: none; color: #8d8d9b; }
.hero-dashboard .hd-search input {
  border: 0; background: transparent; outline: none; font: inherit; font-size: 14px;
  color: #2f2f3a; width: 100%; padding: 2px 0;
}
.hero-dashboard .hd-search input::placeholder { color: #b6b6c1; }
.hero-dashboard .hd-actions { display: flex; align-items: center; gap: 10px; }
.hero-dashboard .hd-icon-btn {
  position: relative; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%;
  background: #f4f3f9; color: #5d5b6c; display: grid; place-items: center; cursor: default;
}
.hero-dashboard .hd-dot {
  position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: #f0516d; border: 2px solid #fff;
}
.hero-dashboard .hd-user { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.hero-dashboard .hd-user-meta { text-align: right; line-height: 1.25; }
.hero-dashboard .hd-user-meta b { display: block; font-size: 13px; font-weight: 600; color: #33333f; }
.hero-dashboard .hd-user-meta span { font-size: 11.5px; color: var(--hd-muted); }
.hero-dashboard .hd-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, #b58cff, #882AFF);
  display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #fff;
}

.hero-dashboard .hd-main {
  padding: 16px 18px 22px; display: grid; gap: 14px; background: #fff;
}
.hero-dashboard .hd-card {
  background: #fff; border: 1px solid var(--hd-border); border-radius: var(--hd-radius);
  padding: 16px 16px 14px;
}
.hero-dashboard .hd-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.hero-dashboard .hd-card h2 {
  margin: 0; font-size: 17px; font-weight: 600; color: var(--hd-title); letter-spacing: -0.015em;
}
.hero-dashboard .hd-card .hd-sub { margin: 4px 0 0; font-size: 12px; color: var(--hd-muted); }
.hero-dashboard .hd-picker {
  appearance: none; font: inherit; font-size: 12.5px; color: #5f5d6d; background: #fff
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c7a8a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid var(--hd-border); border-radius: 10px; padding: 8px 32px 8px 12px; cursor: default; flex: none;
}

.hero-dashboard .hd-chart { display: flex; gap: 8px; margin-top: 12px; }
.hero-dashboard .hd-y-axis {
  display: flex; flex-direction: column; justify-content: space-between; height: 150px;
  flex: none; font-size: 11px; color: var(--hd-axis); text-align: right;
}
.hero-dashboard .hd-y-axis span { transform: translateY(-50%); display: block; }
.hero-dashboard .hd-plot { flex: 1; min-width: 0; }
.hero-dashboard .hd-bars {
  position: relative; height: 150px; display: flex; align-items: flex-end; gap: 1.1%;
}
.hero-dashboard .hd-gridlines {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; pointer-events: none;
}
.hero-dashboard .hd-gridlines i { display: block; height: 0; border-top: 1px dashed var(--hd-grid); }
.hero-dashboard .hd-bar {
  position: relative; flex: 1; min-width: 3px; border-radius: 4px 4px 2px 2px;
  background: var(--hd-accent); transition: background 0.15s ease; cursor: default;
}
.hero-dashboard .hd-bar:hover,
.hero-dashboard .hd-bar:focus-visible { background: #7018d4; outline: none; }
.hero-dashboard .hd-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) scale(0.96); background: #323041;
  color: #fff; font-size: 11px; white-space: nowrap; padding: 5px 8px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity 0.12s ease, transform 0.12s ease; z-index: 4;
}
.hero-dashboard .hd-tip b { font-weight: 600; }
.hero-dashboard .hd-bar:hover .hd-tip,
.hero-dashboard .hd-bar:focus-visible .hd-tip {
  opacity: 1; transform: translateX(-50%) scale(1);
}
.hero-dashboard .hd-x-axis { display: flex; gap: 1.1%; margin-top: 10px; }
.hero-dashboard .hd-x-axis span {
  flex: 1; text-align: center; font-size: 10px; color: var(--hd-axis); min-width: 0;
}

.hero-dashboard .hd-grid-2 {
  display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}
.hero-dashboard .hd-models { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; gap: 12px; }
.hero-dashboard .hd-models li { display: grid; gap: 6px; }
.hero-dashboard .hd-model-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hero-dashboard .hd-model-name { font-size: 12.5px; font-weight: 500; color: #3a3a46; }
.hero-dashboard .hd-model-name em {
  font-style: normal; font-size: 11px; font-weight: 400; color: var(--hd-muted); margin-left: 6px;
}
.hero-dashboard .hd-model-val {
  font-size: 11.5px; color: var(--hd-muted); flex: none; font-variant-numeric: tabular-nums;
}
.hero-dashboard .hd-track { height: 8px; border-radius: 99px; background: #f2f0fa; overflow: hidden; }
.hero-dashboard .hd-fill { height: 100%; border-radius: 99px; background: var(--hd-accent); }
.hero-dashboard .hd-fill.soft { background: var(--hd-accent-2); }
.hero-dashboard .hd-fill.teal { background: var(--hd-teal); }

.hero-dashboard .hd-donut-wrap {
  display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap;
}
.hero-dashboard .hd-donut { position: relative; width: 140px; height: 140px; flex: none; }
.hero-dashboard .hd-donut svg { transform: rotate(-90deg); display: block; width: 100%; height: 100%; }
.hero-dashboard .hd-donut-center {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px;
}
.hero-dashboard .hd-donut-center b {
  font-size: 20px; font-weight: 600; color: #33333f; letter-spacing: -0.02em;
}
.hero-dashboard .hd-donut-center span { font-size: 11px; color: var(--hd-muted); }
.hero-dashboard .hd-legend {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; flex: 1; min-width: 160px;
}
.hero-dashboard .hd-legend li {
  display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: start;
}
.hero-dashboard .hd-swatch { width: 10px; height: 10px; border-radius: 3px; margin-top: 3px; }
.hero-dashboard .hd-legend b { display: block; font-size: 12.5px; font-weight: 500; color: #3a3a46; }
.hero-dashboard .hd-legend span { font-size: 11.5px; color: var(--hd-muted); }
.hero-dashboard .hd-legend .hd-num { font-size: 12.5px; font-weight: 600; color: #3a3a46; }

@media (prefers-reduced-motion: reduce) {
  .hero-dashboard * { transition: none !important; }
}
