[data-hm-create-plugin-stage] {
  container-type: inline-size;
  width: 100%;
  min-width: 0;
}

.hmcp-panel {
  --case: #1a1d20;
  --upper: #16191c;
  --well: #111417;
  --key: #292c2f;
  --key-foot: #22262a;
  --key-hover: #32363b;
  --shadow: #020304;
  --silver: #d9e2e8;
  --micro: #7f8b95;
  --edge: rgba(214, 226, 236, .08);
  --glint: rgba(214, 226, 236, .13);
  --legend-inset: 4.15cqi;
  --rack-inset: 10.3cqi;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 15.3% minmax(0, 1fr) 12.4% 14.6%;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1000 / 380;
  color: var(--silver);
  background-color: var(--case);
  background-image: linear-gradient(180deg, transparent 2%, var(--upper) 25%, var(--well) 60%, #0b0e10 85%, var(--shadow) 100%);
  border: 1px solid var(--edge);
  border-radius: clamp(3px, .65cqi, 7px);
  box-shadow: inset 0 1px var(--glint), inset 0 -2px var(--shadow), 0 9px 20px -14px var(--shadow);
  font: 400 14px/1.45 Inter, "Segoe UI", "Microsoft YaHei UI", sans-serif;
  text-align: start;
  letter-spacing: normal;
}

.hmcp-panel *, .hmcp-panel *::before, .hmcp-panel *::after { box-sizing: border-box; }
.hmcp-panel a { text-decoration: none; }
.hmcp-panel :is(a, button):focus-visible {
  outline: 2px solid var(--micro);
  outline-offset: 1px;
  z-index: 2;
}

.hmcp-plate, .hmcp-telemetry, .hmcp-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0 8px;
  min-width: 0;
}
.hmcp-plate {
  margin-inline: 1%;
  padding-inline: calc(var(--legend-inset) - 1%);
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px var(--edge);
  line-height: 1;
}
.hmcp-brand { font-size: clamp(8px, 1.2cqi, 12px); letter-spacing: .23em; }
.hmcp-model {
  display: inline-flex;
  align-items: center;
  gap: clamp(4px, .8cqi, 8px);
  font-size: clamp(8px, 1.05cqi, 11px);
  letter-spacing: .14em;
}
.hmcp-led {
  width: clamp(3px, .45cqi, 5px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--micro);
  box-shadow: 0 0 3px var(--glint);
  animation: hmcp-breathe 5s ease-in-out infinite;
}
@keyframes hmcp-breathe { 50% { opacity: .55; } }

/* The recess and the two raised keys share CONNECT's horizontal mounting centres. */
.hmcp-bay {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "core core" "a b";
  grid-template-rows: 6.6cqi minmax(0, 1fr);
  column-gap: 2.8cqi;
  row-gap: 4.3cqi;
  margin: 3.6cqi var(--rack-inset) .45cqi;
  min-height: 0;
}
.hmcp-core {
  grid-area: core;
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border-radius: 999px;
  border: 1px solid var(--shadow);
  color: #b8c5ce;
  background-color: var(--well);
  background-image: linear-gradient(180deg, transparent 48%, var(--edge) 49.5%, transparent 51%);
  box-shadow: inset 0 2px 5px var(--shadow), 0 1px var(--glint);
}
.hmcp-core::before, .hmcp-core::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 72%;
  aspect-ratio: 1;
  pointer-events: none;
  border: 1px solid var(--glint);
  border-radius: 50%;
  background: radial-gradient(circle, var(--pin) 0 14%, var(--shadow) 17% 23%, var(--well) 26% 50%, transparent 53%),
    linear-gradient(147deg, #566067, var(--key) 44%, #394047 78%, #69747b);
  box-shadow: 0 0 0 1px var(--shadow), inset 0 -1px var(--glint);
}
.hmcp-core::before { left: 1.1%; --pin: #b0bec7; }
.hmcp-core::after { right: 1.1%; --pin: var(--shadow); }
.hmcp-core svg {
  display: block;
  width: 41%;
  height: 76%;
  border: 1px solid var(--shadow);
  border-radius: clamp(3px, .65cqi, 7px);
  background: linear-gradient(180deg, #0e1114, var(--well));
  box-shadow: inset 0 1px var(--edge);
}
.hmcp-dial { stroke: #38424a; stroke-width: 1; }
.hmcp-tick { stroke: #4a555d; stroke-width: 1; }
.hmcp-index { stroke: var(--micro); stroke-width: 1.35; }
.hmcp-mark { transform-origin: 80px 72px; transform: scale(1.35); }
.hmcp-tube { stroke: currentColor; stroke-width: 4.5; }
.hmcp-contact { fill: currentColor; }
.hmcp-core:is(:hover, :focus-visible) { color: var(--silver); }
.hmcp-core:is(:hover, :focus-visible) .hmcp-dial { stroke: var(--micro); }

.hmcp-idea {
  display: grid;
  place-content: center;
  position: relative;
  min-width: 0;
  margin-inline: .8cqi;
  padding: .45cqi 1.35cqi;
  color: var(--silver);
  background-color: var(--key);
  background-image: linear-gradient(180deg, transparent 0 88%, var(--key-foot));
  border: 1px solid var(--shadow);
  border-radius: clamp(2px, .45cqi, 5px);
  box-shadow: inset 0 1px var(--glint), inset 1px 0 var(--edge), inset 0 -1px var(--key-foot), 0 2px 0 var(--shadow);
  font-size: clamp(12px, 1.52cqi, 16px);
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
  transition: background-color .22s ease;
}
.hmcp-idea[data-slot="0"] { grid-area: a; margin-right: 0; }
.hmcp-idea[data-slot="1"] { grid-area: b; margin-left: 0; }
.hmcp-idea[data-slot="2"] { grid-area: c; margin-right: 0; }
.hmcp-idea[data-slot="3"] { grid-area: d; margin-left: 0; }
.hmcp-speech { display: block; animation: hmcp-arrive .65s ease-out both; }
@keyframes hmcp-arrive { from { opacity: .68; } to { opacity: 1; } }
.hmcp-panel:is(:hover, :focus-within) .hmcp-led { animation-play-state: paused; }
.hmcp-panel .hmcp-idea:is(:hover, :focus-visible) { background-color: var(--key-hover); }

.hmcp-controls { margin-inline: calc(var(--rack-inset) + .8cqi); }
.hmcp-action, .hmcp-next {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-height: 24px;
  padding: 0;
  line-height: 1.2;
  font-family: inherit;
}
.hmcp-action { color: var(--silver); font-size: clamp(11px, 1.24cqi, 13px); }
.hmcp-arrow { font-size: 1.15em; }
.hmcp-next {
  border: 0;
  background: transparent;
  color: var(--micro);
  font-size: clamp(11px, 1.15cqi, 12px);
  cursor: pointer;
}
.hmcp-next svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.3; }
.hmcp-next:hover, .hmcp-share:hover { color: var(--silver); }
.hmcp-action:hover { text-decoration: underline; text-underline-offset: .22em; }
.hmcp-telemetry {
  flex-wrap: wrap;
  align-content: center;
  padding-inline: var(--legend-inset);
  border-top: 1px solid var(--edge);
  border-radius: 0 0 clamp(2px, .55cqi, 6px) clamp(2px, .55cqi, 6px);
  background: var(--shadow);
  color: var(--micro);
  font: 400 clamp(8px, 1cqi, 10px)/1.2 "Segoe UI", "Microsoft YaHei UI", sans-serif;
}
.hmcp-share { color: inherit; }
.hmcp-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[data-variant="row"] > .hmcp-panel {
  aspect-ratio: auto;
  grid-template-rows: auto auto auto auto;
}
[data-variant="row"] .hmcp-plate { padding-block: clamp(10px, 2.2cqi, 22px); }
[data-variant="row"] .hmcp-bay {
  grid-template-areas: "core core" "a b" "c d";
  grid-template-rows: clamp(34px, 6.6cqi, 66px) repeat(2, 1fr);
  row-gap: clamp(8px, 1.8cqi, 18px);
}
[data-variant="row"] .hmcp-idea { min-height: calc(3lh + 1.5cqi + 2px); }
[data-variant="row"] .hmcp-controls { padding-block: .85cqi; }
[data-variant="row"] .hmcp-telemetry { padding-block: clamp(7px, 1.8cqi, 18px); }

@container (max-width: 670px) {
  .hmcp-panel { --rack-inset: 7cqi; grid-template-rows: 14% minmax(0, 1fr) 14% 13%; }
  .hmcp-bay { margin-top: 2cqi; row-gap: 1.8cqi; }
}
@container (max-width: 450px) {
  .hmcp-panel { --rack-inset: 4cqi; grid-template-rows: 14% minmax(0, 1fr) 20% 12%; }
  .hmcp-bay {
    grid-template-areas: "core core" "a a";
    grid-template-rows: 6.4cqi minmax(0, 1fr);
    margin-top: 1.2cqi;
    row-gap: 1.3cqi;
  }
  .hmcp-idea { line-height: 1.3; padding: 2px 7px; }
  .hmcp-core svg { height: 88%; }
  .hmcp-mark { transform: scale(1.7); }
  .hmcp-tube { stroke-width: 5; }
  [data-variant="hero"] .hmcp-idea[data-slot="0"] { margin-inline: .8cqi; }
  [data-variant="hero"] .hmcp-idea[data-slot="1"] { display: none; }
  [data-variant="row"] .hmcp-idea { font-size: 13px; line-height: 1.5; min-height: calc(4lh + 10px); }
}
@container (max-width: 305px) {
  .hmcp-panel { min-height: 124px; }
  [data-variant="row"] .hmcp-idea { min-height: calc(5lh + 10px); }
}
@media (prefers-reduced-motion: reduce) {
  .hmcp-panel :is(.hmcp-idea, .hmcp-speech, .hmcp-led) { animation: none; transition: none; }
}
