/* Project Dynasty public Home hero — "peek behind the glass" (2026-10-09).
   Left-column owner-product previews for the M27 home hero: rebalances the
   hero to a video-forward split, drops the preview stack under the existing
   headline/CTAs, and ends with the claim-a-team route. Preview surfaces sit on
   the always-dark hero panel: light theme renders the real light product
   palette, dark theme renders the real dark product palette. Loaded after the
   home stylesheets; only adds .hpk-* surfaces and the hero split. */

@media (min-width: 981px) {
  .m27-home .m27-hero { grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); }
}

.m27-home .m27-hero-copy.has-hpk { justify-content: flex-start; min-width: 0; }

.hpk {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.hpk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.hpk-kicker { color: #f1c95b; font: 1000 9.5px/1.2 var(--pd-font-mono, monospace); letter-spacing: .22em; text-transform: uppercase; }
.hpk-progress { color: #b9c3ce; font: 1000 9.5px/1 var(--pd-font-mono, monospace); letter-spacing: .12em; }

.hpk-tabs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.hpk .hpk-tab {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #cdd5de;
  font-family: var(--pd-font-mono, monospace);
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.hpk .hpk-tab b { flex: 0 0 auto; color: #c3ccd6; font-size: 8.5px; }
.hpk-tab-label { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
.hpk .hpk-tab:hover { border-color: rgba(241, 201, 91, .6); color: #fff; }
.hpk .hpk-tab:active { transform: scale(.96); }
.hpk .hpk-tab.is-active { border-color: #f1c95b; background: rgba(241, 201, 91, .14); color: #ffe9ad; }
.hpk .hpk-tab.is-active b { color: #f1c95b; }
.hpk .hpk-tab:focus-visible { outline: 2px solid #f1c95b; outline-offset: 2px; }

.hpk-viewport {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-width: 0;
  min-height: 150px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  overflow: hidden;
}

.hpk-panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f4f7fa);
  color: #102944;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .28s ease, transform .28s ease, visibility .28s;
}
.hpk-panel.is-active { opacity: 1; visibility: visible; transform: none; }

.hpk-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hpk-panel-title { display: grid; gap: 1px; min-width: 0; }
.hpk-panel-title b { color: inherit; font: 1000 12px/1.1 var(--pd-font-mono, monospace); letter-spacing: .02em; }
.hpk-panel-title small { color: #5b6b7f; font-size: 9px; font-weight: 800; }
.hpk-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #e7c976;
  border-radius: 999px;
  background: #fdf3d7;
  color: #775508;
  font: 1000 8.5px/1 var(--pd-font-mono, monospace);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hpk-lock-icon { width: 10px; height: 10px; fill: currentColor; }

.hpk-panel-note { display: block; margin: auto 0 0; padding-top: 8px; color: #5b6b7f; font-size: 9px; font-weight: 700; }

.hpk-desk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.hpk-desk-tile {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #dfe6ee;
  border-radius: 9px;
  background: #fff;
}
.hpk-desk-tile i {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  background: linear-gradient(135deg, #1c4a7a, #0c2745);
  color: #fff;
  font: 1000 8.5px/1 var(--pd-font-mono, monospace);
  font-style: normal;
}
.hpk-desk-tile span { display: grid; min-width: 0; }
.hpk-desk-tile b { overflow: hidden; color: #102944; font-size: 9.5px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.hpk-desk-tile small { overflow: hidden; color: #5b6b7f; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.hpk-cap { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; align-items: end; height: 76px; margin-top: 10px; }
.hpk-cap-col { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 4px; align-items: end; height: 100%; min-width: 0; }
.hpk-cap-bar {
  display: block;
  width: 100%;
  height: var(--hpk-bar, 40%);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #2b5fa8, #173c63);
  transform: scaleY(.1);
  transform-origin: bottom;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.hpk-panel.is-active .hpk-cap-bar { transform: scaleY(1); }
.hpk-panel.is-active .hpk-cap-col:nth-child(2) .hpk-cap-bar { transition-delay: .05s; }
.hpk-panel.is-active .hpk-cap-col:nth-child(3) .hpk-cap-bar { transition-delay: .1s; }
.hpk-panel.is-active .hpk-cap-col:nth-child(4) .hpk-cap-bar { transition-delay: .15s; }
.hpk-panel.is-active .hpk-cap-col:nth-child(5) .hpk-cap-bar { transition-delay: .2s; }
.hpk-panel.is-active .hpk-cap-col:nth-child(6) .hpk-cap-bar { transition-delay: .25s; }
.hpk-cap-col small { overflow: hidden; color: #5b6b7f; font: 900 8px/1 var(--pd-font-mono, monospace); letter-spacing: .04em; text-align: center; }
.hpk-cap-avg { position: absolute; left: 0; right: 0; bottom: 43px; border-top: 1px dashed #c9922f; }
.hpk-cap-legend { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; color: #5b6b7f; font-size: 8.5px; font-weight: 800; }
.hpk-cap-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hpk-cap-legend i { width: 14px; border-top: 1px dashed #c9922f; }
.hpk-cap-legend b { color: #7a5a0c; font-weight: 1000; }

.hpk-edge { display: grid; gap: 7px; margin-top: 9px; }
.hpk-edge-top { display: flex; align-items: baseline; gap: 7px; }
.hpk-edge-top span { color: #5b6b7f; font: 900 9px/1 var(--pd-font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; }
.hpk-edge-top b { color: #7a5a0c; font: 1000 24px/1 var(--pd-font-mono, monospace); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hpk-edge-top em { color: #5b6b7f; font-size: 10px; font-style: normal; font-weight: 800; }
.hpk-edge-track { display: block; height: 7px; overflow: hidden; border-radius: 99px; background: #e4ebf3; }
.hpk-edge-track i {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #c7961d, #f1c95b);
  transform: scaleX(.04);
  transform-origin: left;
  transition: transform .65s cubic-bezier(.2, .7, .3, 1);
}
.hpk-panel.is-active .hpk-edge-track i { transform: scaleX(1); }
.hpk-edge-rows { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.hpk-edge-rows li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border: 1px solid #e6ecf3; border-radius: 8px; background: #fff; }
.hpk-edge-rows span { overflow: hidden; color: #31465d; font-size: 9.5px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hpk-edge-rows b { flex: 0 0 auto; color: #7a5a0c; font: 1000 10px/1 var(--pd-font-mono, monospace); }

.hpk-trade { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; align-items: stretch; margin-top: 9px; }
.hpk-trade-side { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 7px 8px; border: 1px solid #dfe6ee; border-radius: 10px; background: #fff; }
.hpk-trade-side small { color: #5b6b7f; font: 900 8px/1 var(--pd-font-mono, monospace); letter-spacing: .08em; text-transform: uppercase; }
.hpk-trade-side span { overflow: hidden; padding: 3px 6px; border-radius: 6px; background: #eef3f8; color: #31465d; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hpk-trade-swap { align-self: center; color: #f1c95b; font-size: 15px; }
.hpk-trade-balance { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: #5b6b7f; font-size: 8.5px; font-weight: 800; }
.hpk-trade-balance i { position: relative; flex: 1; height: 6px; border-radius: 99px; background: #e4ebf3; }
.hpk-trade-balance i::before { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #c9922f; content: ""; }
.hpk-trade-balance i b { display: block; width: 54%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2b5fa8, #7fb2ff); }
.hpk-trade-balance em { color: #1f7a4d; font-style: normal; font-weight: 1000; }

.hpk-foot { display: grid; gap: 7px; min-width: 0; margin-top: auto; }
.hpk-note { color: #b9c3ce; font-size: 9px; font-weight: 700; text-align: center; }
.hpk .hpk-claim {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(120deg, #d92b3a, #c8202f 55%, #8f1223);
  color: #fff;
  font: 1000 11.5px/1 var(--pd-font-mono, monospace);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(200, 32, 47, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hpk .hpk-claim i { font-style: normal; font-size: 14px; transition: transform .15s ease; }
.hpk .hpk-claim:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(200, 32, 47, .45); }
.hpk .hpk-claim:hover i { transform: translateX(3px); }
.hpk .hpk-claim:active { transform: scale(.985); }
.hpk .hpk-claim:focus-visible { outline: 3px solid #f1c95b; outline-offset: 2px; }

html[data-theme="dark"] .hpk-panel { border-color: #2c4158; background: linear-gradient(180deg, #12243a, #0d1b2c); color: #eef3f8; }
html[data-theme="dark"] .hpk-panel-title small,
html[data-theme="dark"] .hpk-panel-note,
html[data-theme="dark"] .hpk-cap-col small,
html[data-theme="dark"] .hpk-cap-legend,
html[data-theme="dark"] .hpk-edge-top span,
html[data-theme="dark"] .hpk-edge-top em,
html[data-theme="dark"] .hpk-trade-side small,
html[data-theme="dark"] .hpk-trade-balance { color: #9fb0c2; }
html[data-theme="dark"] .hpk-lock { border-color: #5c4a14; background: #33270f; color: #ffe9ad; }
html[data-theme="dark"] .hpk-desk-tile { border-color: #2c4158; background: #101f31; }
html[data-theme="dark"] .hpk-desk-tile b { color: #f4f7fa; }
html[data-theme="dark"] .hpk-desk-tile small { color: #9fb0c2; }
html[data-theme="dark"] .hpk-cap-bar { background: linear-gradient(180deg, #4f8df7, #2b5fa8); }
html[data-theme="dark"] .hpk-cap-legend b { color: #f1c95b; }
html[data-theme="dark"] .hpk-edge-top b { color: #f1c95b; }
html[data-theme="dark"] .hpk-edge-track { background: #23364d; }
html[data-theme="dark"] .hpk-edge-rows li { border-color: #2c4158; background: #101f31; }
html[data-theme="dark"] .hpk-edge-rows span { color: #dbe6f1; }
html[data-theme="dark"] .hpk-edge-rows b { color: #f1c95b; }
html[data-theme="dark"] .hpk-trade-side { border-color: #2c4158; background: #101f31; }
html[data-theme="dark"] .hpk-trade-side span { background: #1b2c42; color: #dbe6f1; }
html[data-theme="dark"] .hpk-trade-balance i { background: #23364d; }
html[data-theme="dark"] .hpk-trade-balance i b { background: linear-gradient(90deg, #4f8df7, #9cc2ff); }
html[data-theme="dark"] .hpk-trade-balance em { color: #8ef0b1; }
html[data-theme="dark"] .hpk-claim { background: linear-gradient(120deg, #d92b3a, #c8202f 55%, #8f1223); color: #fff; }

@media (max-width: 980px) {
  .m27-home .m27-hero-copy.has-hpk { gap: 12px; }
  .hpk { margin-top: 2px; }
  .hpk-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .hpk-viewport { min-height: 168px; }
  .hpk-desk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpk-cap { gap: 5px; height: 66px; }
  .hpk .hpk-tab { padding: 7px 9px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .hpk-panel,
  .hpk-cap-bar,
  .hpk-edge-track i { transition: none; }
}
