.hfmpc {
  --hfmpc-bg: #f3f6fb;
  --hfmpc-panel: #ffffff;
  --hfmpc-panel-soft: #f7f9fd;
  --hfmpc-border: #d7dfeb;
  --hfmpc-border-strong: #c1ccdd;
  --hfmpc-text: #122033;
  --hfmpc-muted: #5f6f86;
  --hfmpc-primary: #0c6cf2;
  --hfmpc-primary-soft: #eaf3ff;
  --hfmpc-success: #14966d;
  --hfmpc-danger: #c44545;
  --hfmpc-warning: #f39c12;
  --hfmpc-shadow: 0 22px 60px rgba(18, 32, 51, 0.08);
  color: var(--hfmpc-text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 28px auto;
  max-width: 1240px;
}

.hfmpc,
.hfmpc * {
  box-sizing: border-box;
}

.hfmpc-panel {
  background:
    radial-gradient(circle at top right, rgba(12, 108, 242, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--hfmpc-border);
  border-radius: 28px;
  box-shadow: var(--hfmpc-shadow);
  padding: 28px;
}

.hfmpc__header {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.hfmpc__eyebrow {
  align-items: center;
  background: var(--hfmpc-primary-soft);
  border: 1px solid rgba(12, 108, 242, 0.12);
  border-radius: 999px;
  color: var(--hfmpc-primary);
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  max-width: 100%;
  padding: 8px 12px;
  text-transform: uppercase;
  width: fit-content;
}

.hfmpc__title {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  max-width: 760px;
}

.hfmpc__lead {
  color: var(--hfmpc-muted);
  font-size: 17px;
  margin: 0;
  max-width: 900px;
}

.hfmpc__source-note {
  background: #fff8ea;
  border: 1px solid #f0d49a;
  border-radius: 18px;
  color: #8c6517;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 900px;
  padding: 13px 15px;
}

.hfmpc__source-note strong {
  color: #67460d;
}

.hfmpc__source-note a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.hfmpc__market {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hfmpc__market span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--hfmpc-border);
  border-radius: 999px;
  color: var(--hfmpc-muted);
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 9px 12px;
}

.hfmpc__quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hfmpc__details {
  border-top: 1px solid var(--hfmpc-border);
  margin-top: 20px;
  padding-top: 20px;
}

.hfmpc__details-summary {
  color: var(--hfmpc-primary);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  list-style: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  user-select: none;
  width: fit-content;
}

.hfmpc__details-summary::-webkit-details-marker {
  display: none;
}

.hfmpc__details-summary::after {
  content: " +";
}

.hfmpc__details[open] .hfmpc__details-summary::after {
  content: " -";
}

.hfmpc__details-content {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.hfmpc__quick-link {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(12, 108, 242, 0.18);
  border-radius: 999px;
  color: var(--hfmpc-primary);
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 9px 12px;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.hfmpc__quick-link:hover,
.hfmpc__quick-link:focus-visible {
  border-color: rgba(12, 108, 242, 0.36);
  outline: 0;
}

.hfmpc-hub {
  margin-top: 34px;
}

.hfmpc-hub .container {
  width: min(1240px, calc(100% - 32px));
}

.hfmpc-hub__hero {
  display: grid;
  gap: 24px;
}

.hfmpc-hub__stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hfmpc-hub__stat {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--hfmpc-border);
  border-radius: 22px;
  display: grid;
  gap: 6px;
  padding: 18px 20px;
}

.hfmpc-hub__stat strong {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.hfmpc-hub__stat span {
  color: var(--hfmpc-muted);
  font-size: 15px;
  font-weight: 700;
}

.hfmpc-hub__section {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.hfmpc-hub__section-head {
  display: grid;
  gap: 8px;
}

.hfmpc-hub__section-head p {
  color: var(--hfmpc-muted);
  margin: 0;
  max-width: 900px;
}

.hfmpc-hub__grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hfmpc-hub__grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hfmpc-hub-card {
  background:
    radial-gradient(circle at top right, rgba(12, 108, 242, 0.09), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--hfmpc-border);
  border-radius: 24px;
  color: var(--hfmpc-text);
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 22px;
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.hfmpc-hub-card:hover,
.hfmpc-hub-card:focus-visible {
  border-color: rgba(12, 108, 242, 0.34);
  box-shadow: 0 18px 34px rgba(18, 32, 51, 0.08);
  outline: 0;
  transform: translateY(-2px);
}

.hfmpc-hub-card--compact {
  padding: 18px;
}

.hfmpc-hub-card__eyebrow {
  color: var(--hfmpc-primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hfmpc-hub-card__title {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}

.hfmpc-hub-card__description {
  color: var(--hfmpc-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.hfmpc__seo-copy,
.hfmpc__seo-block p {
  color: var(--hfmpc-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.hfmpc__seo-copy {
  max-width: 980px;
}

.hfmpc__seo-block {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.hfmpc__workspace,
.hfmpc__field-grid,
.hfmpc-dashboard__cards,
.hfmpc-dashboard__coins,
.hfmpc-dashboard__horizons,
.hfmpc-results__summary {
  display: grid;
  gap: 16px;
}

.hfmpc__workspace {
  align-items: start;
  grid-template-columns: 1fr;
}

.hfmpc__controls-col,
.hfmpc__results-col {
  display: grid;
  gap: 16px;
}

.hfmpc__box {
  background: var(--hfmpc-panel);
  border: 1px solid var(--hfmpc-border);
  border-radius: 24px;
  padding: 20px;
}

.hfmpc__box--primary {
  background:
    linear-gradient(180deg, rgba(234, 243, 255, 0.9) 0%, rgba(255, 255, 255, 0.96) 100%);
  border-color: rgba(12, 108, 242, 0.25);
}

.hfmpc__section-title,
.hfmpc-results__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hfmpc__field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hfmpc__field--wide {
  grid-column: 1 / -1;
}

.hfmpc__field span {
  font-size: 16px;
  font-weight: 700;
}

.hfmpc__field-heading {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-width: 0;
  position: relative;
  width: fit-content;
}

.hfmpc__field-label {
  min-width: 0;
}

.hfmpc__field-help-trigger {
  align-items: center;
  appearance: none;
  background: var(--hfmpc-primary-soft);
  border: 1px solid rgba(12, 108, 242, 0.22);
  border-radius: 50%;
  color: var(--hfmpc-primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-width: 20px;
  padding: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  width: 20px;
}

.hfmpc__field-help-trigger:hover,
.hfmpc__field-help-trigger:focus-visible,
.hfmpc__field-help.is-open .hfmpc__field-help-trigger {
  background: #fff;
  border-color: rgba(12, 108, 242, 0.38);
  box-shadow: 0 0 0 4px rgba(12, 108, 242, 0.12);
  outline: 0;
}

.hfmpc__field-help-bubble {
  background: rgba(18, 32, 51, 0.96);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(18, 32, 51, 0.18);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  left: 0;
  line-height: 1.45;
  max-width: min(320px, calc(100vw - 48px));
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 10px);
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  visibility: hidden;
  width: max-content;
  z-index: 20;
}

.hfmpc__field-help-bubble::before {
  background: rgba(18, 32, 51, 0.96);
  content: "";
  height: 10px;
  left: 16px;
  position: absolute;
  top: -4px;
  transform: rotate(45deg);
  width: 10px;
}

.hfmpc__field-help:hover .hfmpc__field-help-bubble,
.hfmpc__field-help:focus-within .hfmpc__field-help-bubble,
.hfmpc__field-help.is-open .hfmpc__field-help-bubble {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.hfmpc__field input,
.hfmpc__field select,
.hfmpc__stacked-input input,
.hfmpc__stacked-input select,
.hfmpc-device__inline-field select,
.hfmpc-stepper-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  background-image: none;
  border: 1px solid var(--hfmpc-border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--hfmpc-text);
  font: inherit;
  min-height: 54px;
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  width: 100%;
}

.hfmpc select::-ms-expand,
.hfmpc__stacked-input select::-ms-expand {
  display: none;
}

.hfmpc__field input:hover,
.hfmpc__field select:hover,
.hfmpc__stacked-input input:hover,
.hfmpc__stacked-input select:hover,
.hfmpc-device__inline-field select:hover,
.hfmpc-stepper-input:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: var(--hfmpc-border-strong);
}

.hfmpc__field input:focus,
.hfmpc__field select:focus,
.hfmpc__stacked-input input:focus,
.hfmpc__stacked-input select:focus,
.hfmpc-device__inline-field select:focus,
.hfmpc-stepper-input:focus-within {
  border-color: rgba(12, 108, 242, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 108, 242, 0.12);
  outline: 0;
}

.hfmpc__field input::placeholder,
.hfmpc__stacked-input input::placeholder {
  color: #8a98ad;
}

.hfmpc-select-wrap {
  display: block;
  position: relative;
  width: 100%;
}

.hfmpc-select-wrap::after {
  display: none;
}

.hfmpc-select-wrap--device::after {
  border-bottom: 2px solid var(--hfmpc-muted);
  border-right: 2px solid var(--hfmpc-muted);
  content: "";
  display: block;
  height: 10px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-60%) rotate(45deg);
  width: 10px;
}

.hfmpc-select-wrap select {
  cursor: pointer;
  padding-right: 14px;
  text-overflow: ellipsis;
  width: 100%;
}

.hfmpc-select-wrap--device select {
  padding-right: 44px;
}

.hfmpc-select-wrap--compact::after {
  border-bottom: 2px solid var(--hfmpc-muted);
  border-right: 2px solid var(--hfmpc-muted);
  content: "";
  display: block;
  height: 8px;
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-60%) rotate(45deg);
  width: 8px;
}

.hfmpc-select-wrap--compact select {
  padding-right: 34px;
}

.hfmpc__stacked-input {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.92fr) minmax(120px, 1.08fr);
}

.hfmpc__amount-input {
  position: relative;
}

.hfmpc__amount-input input {
  padding-right: 98px;
}

.hfmpc__amount-input span {
  color: var(--hfmpc-muted);
  font-size: 16px;
  font-weight: 700;
  max-width: calc(100% - 28px);
  overflow-wrap: anywhere;
  pointer-events: none;
  position: absolute;
  right: 14px;
  text-align: right;
  top: 50%;
  transform: translateY(-50%);
}

.hfmpc__amount-input input[name="electricity_rub"] {
  padding-right: 112px;
}

.hfmpc__amount-input input[name="electricity_rub"] + span {
  max-width: none;
  white-space: nowrap;
}

.hfmpc__field-note {
  color: var(--hfmpc-muted);
  font-size: 16px;
  line-height: 1.4;
  margin: 2px 2px 0;
}

.hfmpc-devices {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.hfmpc-devices__list {
  display: grid;
  gap: 14px;
}

.hfmpc-device {
  background: var(--hfmpc-panel-soft);
  border: 1px solid var(--hfmpc-border);
  border-radius: 22px;
  padding: 16px;
}

.hfmpc-device__grid,
.hfmpc-device__top {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 272px);
}

.hfmpc-device__field {
  margin: 0;
}

.hfmpc-device-picker {
  position: relative;
}

.hfmpc-device-picker__trigger {
  align-items: center;
  appearance: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--hfmpc-border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--hfmpc-text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 16px;
  min-height: 54px;
  padding: 0 46px 0 14px;
  position: relative;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  width: 100%;
}

.hfmpc-device-picker__trigger:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border-color: var(--hfmpc-border-strong);
}

.hfmpc-device-picker__trigger:focus-visible,
.hfmpc-device-picker.is-open .hfmpc-device-picker__trigger {
  border-color: rgba(12, 108, 242, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 108, 242, 0.12);
  outline: 0;
}

.hfmpc-device-picker::after {
  border-bottom: 2px solid var(--hfmpc-muted);
  border-right: 2px solid var(--hfmpc-muted);
  content: "";
  height: 10px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 22px;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  width: 10px;
}

.hfmpc-device-picker.is-open::after {
  transform: rotate(225deg);
}

.hfmpc-device-picker__trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.hfmpc-device-picker__panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(12, 108, 242, 0.18);
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(13, 35, 67, 0.12);
  display: grid;
  gap: 10px;
  left: 0;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.hfmpc-device-picker__panel[hidden] {
  display: none;
}

.hfmpc-device-picker .js-hfmpc-device-select {
  display: none;
}

.hfmpc-device-picker .hfmpc-device__search {
  min-height: 46px;
}

.hfmpc-device-picker__options {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.hfmpc-device-picker__option {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--hfmpc-text);
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
  transition: background-color 0.18s ease, color 0.18s ease;
  width: 100%;
}

.hfmpc-device-picker__option:hover {
  background: rgba(12, 108, 242, 0.08);
}

.hfmpc-device-picker__option.is-active {
  background: linear-gradient(135deg, rgba(12, 108, 242, 0.96) 0%, rgba(34, 134, 255, 0.92) 100%);
  color: #fff;
}

.hfmpc-device-picker__option-title,
.hfmpc-device-picker__option-meta,
.hfmpc-device-picker__empty {
  font-size: 16px;
  line-height: 1.35;
}

.hfmpc-device-picker__option-title {
  font-weight: 700;
}

.hfmpc-device-picker__option-meta {
  color: var(--hfmpc-muted);
}

.hfmpc-device-picker__option.is-active .hfmpc-device-picker__option-meta {
  color: rgba(255, 255, 255, 0.86);
}

.hfmpc-device-picker__empty {
  color: var(--hfmpc-muted);
  padding: 10px 12px;
}

.hfmpc-device__main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hfmpc-device__meta {
  color: var(--hfmpc-muted);
  display: block;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hfmpc-device__side {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.hfmpc-device__label {
  color: var(--hfmpc-muted);
  font-size: 16px;
  font-weight: 700;
  text-align: right;
}

.hfmpc-device__controls {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(146px, 1fr) auto;
  justify-content: end;
  min-width: 0;
}

.hfmpc-device__qty {
  align-items: center;
  background: #fff;
  border: 1px solid var(--hfmpc-border);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 42px minmax(52px, auto) 42px;
  min-height: 52px;
  min-width: 146px;
  overflow: hidden;
  width: 100%;
}

.hfmpc-device__inline {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
}

.hfmpc-device__inline-field {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
  flex: 1 1 160px;
}

.hfmpc-device__inline-field--algo {
  flex: 1.05 1 180px;
}

.hfmpc-device__inline-field--hashrate {
  flex: 0.9 1 140px;
}

.hfmpc-device__inline-field--unit {
  flex: 0.72 1 110px;
}

.hfmpc-device__inline-field--power {
  flex: 1.1 1 170px;
}

.hfmpc-device__inline-field span {
  color: var(--hfmpc-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.hfmpc-device__inline-field input,
.hfmpc-device__inline-field select {
  border-radius: 14px;
  font-size: 16px;
  min-height: 46px;
  margin: 0 !important;
  max-width: 100%;
  padding: 10px 12px;
  width: 100%;
}

.hfmpc-device__inline-field input {
  padding-top: 11px;
}

.hfmpc-device__inline-field select {
  padding-right: 12px;
}

.hfmpc-stepper-input {
  align-items: stretch;
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  height: 46px;
  min-height: 46px;
  overflow: hidden;
}

.hfmpc-stepper-input__field {
  appearance: textfield;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--hfmpc-text);
  font: inherit;
  font-size: 16px;
  height: 44px;
  margin: 0;
  min-height: 44px;
  outline: 0;
  padding: 10px 8px 10px 12px;
  text-align: left;
  width: 100%;
}

.hfmpc-device__inline-field .hfmpc-stepper-input__field {
  padding: 10px 8px 10px 8px;
  text-align: left;
}

.hfmpc-stepper-input__field::-webkit-outer-spin-button,
.hfmpc-stepper-input__field::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.hfmpc-stepper-input__actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: 100%;
}

.hfmpc-stepper-input__button {
  appearance: none;
  background: transparent;
  border: 0;
  color: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0;
  font-weight: 800;
  min-height: 0;
  padding: 0;
  position: relative;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hfmpc-stepper-input__button + .hfmpc-stepper-input__button {
  border-top: 0;
}

.hfmpc-stepper-input__button::before {
  content: "";
  left: 62%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.hfmpc-stepper-input__button--up::before {
  border-bottom: 6px solid #7f8ca0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.hfmpc-stepper-input__button--down::before {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #7f8ca0;
}

.hfmpc-stepper-input__button:hover {
  background: transparent;
}

.hfmpc-stepper-input__button:hover::before {
  border-bottom-color: var(--hfmpc-primary);
  border-top-color: var(--hfmpc-primary);
}

.hfmpc-device__qty-button {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--hfmpc-primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  min-width: 42px;
}

.hfmpc-device__qty-button:hover {
  background: rgba(12, 108, 242, 0.06);
}

.hfmpc-device__qty-input {
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
  background: transparent;
  border: 0;
  color: var(--hfmpc-text);
  display: block;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  min-height: 52px;
  min-width: 0;
  padding: 0;
  text-align: center !important;
  text-indent: 0;
  width: 100%;
}

.hfmpc-device__qty-input::-webkit-outer-spin-button,
.hfmpc-device__qty-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.hfmpc-device__remove {
  appearance: none;
  background: transparent;
  border: 1px solid var(--hfmpc-border);
  border-radius: 16px;
  color: var(--hfmpc-muted);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  min-height: 52px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0 16px;
  text-align: center;
  transition: 0.2s ease;
  white-space: nowrap;
}

.hfmpc-device__remove:hover {
  background: rgba(196, 69, 69, 0.05);
  border-color: rgba(196, 69, 69, 0.28);
  color: var(--hfmpc-danger);
}

.hfmpc-device__remove.is-disabled,
.hfmpc-device__remove:disabled {
  cursor: default;
  opacity: 0.45;
}

.hfmpc-devices__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.hfmpc-devices__link {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--hfmpc-primary);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 0;
}

.hfmpc-devices__link--muted {
  color: var(--hfmpc-muted);
}

.hfmpc-devices__link:hover {
  text-decoration: underline;
}

.hfmpc__mini-meta {
  background: var(--hfmpc-panel-soft);
  border: 1px dashed var(--hfmpc-border-strong);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px 16px;
}

.hfmpc__mini-meta span:first-child {
  font-size: 16px;
  font-weight: 800;
}

.hfmpc__mini-meta span:last-child {
  color: var(--hfmpc-muted);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.hfmpc__period-picker {
  margin-bottom: 20px;
}

.hfmpc__periods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hfmpc__period-chip input {
  display: none;
}

.hfmpc__period-chip span {
  align-items: center;
  background: var(--hfmpc-panel-soft);
  border: 1px solid var(--hfmpc-border);
  border-radius: 999px;
  color: var(--hfmpc-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 16px;
  font-weight: 700;
  min-height: 42px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0 14px;
  text-align: center;
  transition: 0.2s ease;
}

.hfmpc__period-chip input:checked + span {
  background: var(--hfmpc-primary-soft);
  border-color: rgba(12, 108, 242, 0.24);
  color: var(--hfmpc-primary);
}

.hfmpc__actions {
  margin-top: 16px;
}

.hfmpc__button {
  align-items: center;
  background: linear-gradient(135deg, #0c6cf2 0%, #34a2ff 100%);
  border: 0;
  border-radius: 18px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  gap: 10px;
  justify-content: center;
  min-height: 56px;
  min-width: 240px;
  overflow-wrap: anywhere;
  padding: 0 22px;
  text-align: center;
  transition: 0.2s ease;
  white-space: normal;
}

.hfmpc__button:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

.hfmpc__button:disabled {
  cursor: wait;
  opacity: 0.82;
}

.hfmpc__button-spinner {
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: currentColor;
  display: none;
  height: 16px;
  width: 16px;
}

.hfmpc--loading .hfmpc__button-spinner {
  animation: hfmpc-spin 0.8s linear infinite;
  display: inline-block;
}

.hfmpc__error,
.hfmpc__compare-note {
  border-radius: 18px;
  margin-top: 16px;
  overflow-wrap: anywhere;
  padding: 13px 15px;
}

.hfmpc__error {
  background: #fff2f1;
  border: 1px solid #efc2bd;
  color: #a34338;
}

.hfmpc__compare-note {
  background: #fff8ea;
  border: 1px solid #f0d49a;
  color: #8c6517;
}

.hfmpc-dashboard__cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hfmpc-kpi,
.hfmpc-coin-card,
.hfmpc-horizon-card,
.hfmpc-breakdown__row,
.hfmpc-results__summary-card,
.hfmpc-results__row {
  border: 1px solid var(--hfmpc-border);
  border-radius: 20px;
}

.hfmpc-kpi,
.hfmpc-coin-card,
.hfmpc-horizon-card {
  background: var(--hfmpc-primary-soft);
  padding: 16px;
}

.hfmpc-kpi__label,
.hfmpc-coin-card__code,
.hfmpc-horizon-card span,
.hfmpc-results__summary-card span,
.hfmpc-results__header span,
.hfmpc-results__meta,
.hfmpc-results__footnote,
.hfmpc-results__source,
.hfmpc__footnote,
.hfmpc__source-note,
.hfmpc-breakdown__row span {
  color: var(--hfmpc-muted);
}

.hfmpc-kpi__label,
.hfmpc-coin-card__code,
.hfmpc-results__summary-card span {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.hfmpc-results__summary-card {
  background: var(--hfmpc-panel-soft);
  padding: 14px 15px;
}

.hfmpc-kpi__value,
.hfmpc-coin-card__value,
.hfmpc-horizon-card strong {
  display: block;
  font-size: clamp(25px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hfmpc-kpi__meta,
.hfmpc-horizon-card small,
.hfmpc-results__name-copy small {
  color: var(--hfmpc-muted);
  display: block;
  font-size: 16px;
  line-height: 1.45;
  margin-top: 6px;
}

.hfmpc--negative .hfmpc-kpi:first-child .hfmpc-kpi__value {
  color: var(--hfmpc-danger);
}

.hfmpc-dashboard__breakdown,
.hfmpc-results__list {
  display: grid;
  gap: 10px;
}

.hfmpc-breakdown__row,
.hfmpc-results__row {
  align-items: center;
  background: #fff;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 15px;
}

.hfmpc-results__pool-card {
  background: #fff;
  border: 1px solid var(--hfmpc-border);
  border-radius: 22px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.hfmpc-results__pool-card--leader {
  background:
    linear-gradient(180deg, rgba(234, 243, 255, 0.9) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-color: rgba(12, 108, 242, 0.25);
}

.hfmpc-results__row--pool {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  padding: 0;
}

.hfmpc-breakdown__row strong,
.hfmpc-results__value-primary,
.hfmpc-results__summary-card strong {
  font-weight: 800;
}

.hfmpc-results__summary-card strong {
  display: block;
}

.hfmpc-dashboard__coins,
.hfmpc-dashboard__horizons,
.hfmpc-results__summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hfmpc-results__summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hfmpc-horizon-card small {
  margin-top: 8px;
}

.hfmpc-results__header {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.hfmpc-results__meta {
  font-size: 16px;
  margin: 0 0 16px;
}

.hfmpc-results__empty {
  color: var(--hfmpc-muted);
  margin: 0;
}

.hfmpc-results__name {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 40px minmax(0, 1fr);
  min-width: 0;
}

.hfmpc-results__name--no-logo {
  grid-template-columns: 28px minmax(0, 1fr);
}

.hfmpc-results__rank {
  color: var(--hfmpc-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  display: inline-flex;
  justify-content: center;
  min-width: 28px;
  padding-top: 3px;
}

.hfmpc-results__logo {
  border-radius: 50%;
  height: 40px;
  object-fit: contain;
  width: 40px;
}

.hfmpc-results__logo--fallback {
  align-items: center;
  background: var(--hfmpc-primary-soft);
  color: var(--hfmpc-primary);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
}

.hfmpc-results__name-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hfmpc-results__name-heading {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.hfmpc-results__pool-meta {
  color: var(--hfmpc-muted);
  margin-left: auto;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: nowrap;
}

.hfmpc-results__name-copy small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.hfmpc-results__name a,
.hfmpc-results__name-text {
  color: var(--hfmpc-primary);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.hfmpc-results__btc-inline {
  color: var(--hfmpc-muted);
}

.hfmpc-results__delta-copy {
  color: var(--hfmpc-text);
}

.hfmpc-results__delta-up {
  color: var(--hfmpc-success);
  font-weight: 800;
}

.hfmpc-results__delta-down {
  color: var(--hfmpc-danger);
  font-weight: 800;
}

.hfmpc-results__values {
  align-items: baseline;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
}

.hfmpc-results__value-caption {
  color: var(--hfmpc-muted);
  font-size: 16px;
  font-weight: 700;
}

.hfmpc-results__value-primary {
  font-size: 18px;
}

.hfmpc-results__value-secondary {
  color: var(--hfmpc-muted);
  font-size: 16px;
}

.hfmpc-results__matrix-wrap {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
}

.hfmpc-results__matrix {
  background: var(--hfmpc-panel-soft);
  border: 1px solid var(--hfmpc-border);
  border-collapse: separate;
  border-radius: 18px;
  border-spacing: 0;
  min-width: 560px;
  overflow: hidden;
  width: 100%;
}

.hfmpc-results__matrix th,
.hfmpc-results__matrix td {
  border-top: 1px solid var(--hfmpc-border);
  padding: 12px 14px;
}

.hfmpc-results__matrix thead th {
  background: rgba(12, 108, 242, 0.06);
  border-top: 0;
  color: var(--hfmpc-muted);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.hfmpc-results__matrix thead th:first-child {
  text-align: left;
}

.hfmpc-results__matrix tbody th {
  background: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.hfmpc-results__matrix td {
  background: #fff;
  text-align: center;
  vertical-align: middle;
}

.hfmpc-results__matrix td strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.hfmpc-results__matrix td small {
  color: var(--hfmpc-muted);
  display: block;
  font-size: 16px;
  margin-top: 4px;
}

.hfmpc-results__matrix-profit--positive strong {
  color: var(--hfmpc-success);
}

.hfmpc-results__matrix-profit--negative strong {
  color: var(--hfmpc-danger);
}

.hfmpc__footer-note {
  border-top: 1px solid var(--hfmpc-border);
  margin-top: 22px;
  padding-top: 18px;
}

.hfmpc__footnote,
.hfmpc__source-note,
.hfmpc-results__footnote,
.hfmpc-results__source {
  font-size: 16px;
  margin: 8px 0 0;
}

@keyframes hfmpc-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .hfmpc-hub__stats,
  .hfmpc-hub__grid,
  .hfmpc-hub__grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hfmpc__workspace {
    grid-template-columns: 1fr;
  }

  .hfmpc__results-col > .hfmpc__box:first-child {
    position: static;
  }

  .hfmpc-device__inline {
    gap: 12px 14px;
  }

  .hfmpc-device__inline-field {
    flex-basis: calc(50% - 7px);
  }
}

@media (max-width: 767px) {
  .hfmpc-hub .container {
    width: min(100%, calc(100% - 20px));
  }

  .hfmpc-hub__stats,
  .hfmpc-hub__grid,
  .hfmpc-hub__grid--compact {
    grid-template-columns: 1fr;
  }

  .hfmpc-hub-card,
  .hfmpc-hub-card--compact {
    padding: 18px;
  }

  .hfmpc {
    margin: 16px auto;
  }

  .entry-content > .hfmpc,
  .post__content > .hfmpc {
    margin-left: -10px;
    margin-right: -10px;
    max-width: none;
    width: calc(100% + 20px);
  }

  .hfmpc-panel {
    border-radius: 20px;
    padding: 14px;
  }

  .hfmpc__box {
    border-radius: 18px;
    padding: 16px;
  }

  .hfmpc__header {
    gap: 10px;
    margin-bottom: 18px;
  }

  .hfmpc__title {
    font-size: clamp(24px, 8vw, 28px);
  }

  .hfmpc__lead {
    font-size: 15px;
    line-height: 1.55;
  }

  .hfmpc__source-note {
    font-size: 14px;
    padding: 12px 14px;
  }

  .hfmpc__market {
    gap: 8px;
  }

  .hfmpc__market span {
    font-size: 15px;
    padding: 8px 10px;
  }

  .hfmpc__quick-links {
    gap: 8px;
  }

  .hfmpc__quick-link {
    border-radius: 16px;
    font-size: 15px;
    width: 100%;
  }

  .hfmpc__field-heading {
    width: 100%;
  }

  .hfmpc__field-help-bubble {
    max-width: calc(100vw - 52px);
    width: min(300px, calc(100vw - 52px));
  }

  .hfmpc__amount-input input[name="electricity_rub"] {
    padding-right: 100px;
  }

  .hfmpc__amount-input input[name="electricity_rub"] + span {
    font-size: 14px;
    right: 12px;
  }

  .hfmpc__field-grid,
  .hfmpc__stacked-input,
  .hfmpc-dashboard__cards,
  .hfmpc-dashboard__coins,
  .hfmpc-dashboard__horizons,
  .hfmpc-results__summary {
    grid-template-columns: 1fr;
  }

  .hfmpc__button {
    min-width: 100%;
    width: 100%;
  }

  .hfmpc-device {
    border-radius: 18px;
    padding: 14px;
  }

  .hfmpc-device__grid,
  .hfmpc-device__top {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .hfmpc-device__side {
    gap: 10px;
    min-width: 0;
  }

  .hfmpc-device__label {
    text-align: left;
  }

  .hfmpc-device__controls {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: flex-start;
  }

  .hfmpc-device__inline {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hfmpc-device__inline-field {
    flex: none;
  }

  .hfmpc-device__inline-field--power {
    grid-column: 1 / -1;
  }

  .hfmpc-device-picker__trigger {
    min-height: 60px;
    padding-bottom: 10px;
    padding-top: 10px;
  }

  .hfmpc-device-picker__trigger-label {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
  }

  .hfmpc-device__meta {
    font-size: 15px;
  }

  .hfmpc-devices__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hfmpc-breakdown__row,
  .hfmpc-results__row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hfmpc-results__row--pool {
    row-gap: 10px;
  }

  .hfmpc-results__name {
    gap: 10px;
    grid-template-columns: 24px 36px minmax(0, 1fr);
  }

  .hfmpc-results__name--no-logo {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .hfmpc-results__rank {
    min-width: 24px;
  }

  .hfmpc-results__logo {
    height: 36px;
    width: 36px;
  }

  .hfmpc-results__name a,
  .hfmpc-results__name-text {
    font-size: 18px;
  }

  .hfmpc-results__name-heading {
    align-items: flex-start;
    display: grid;
    gap: 4px;
    width: 100%;
  }

  .hfmpc-results__name-copy,
  .hfmpc-results__name-copy small {
    width: 100%;
  }

  .hfmpc-results__pool-meta {
    font-size: 15px;
    line-height: 1.35;
    margin-left: 0;
    text-align: left;
    white-space: normal;
  }

  .hfmpc-results__name-copy small {
    display: grid;
    gap: 6px;
  }

  .hfmpc-results__btc-inline,
  .hfmpc-results__delta-copy {
    display: block;
    font-size: 14px;
    line-height: 1.4;
  }

  .hfmpc-results__values {
    align-items: start;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
    text-align: left;
    white-space: normal;
  }

  .hfmpc-results__value-primary {
    font-size: 17px;
  }

  .hfmpc-results__pool-card {
    padding: 14px;
  }

  .hfmpc-results__matrix-wrap {
    margin-inline: -2px;
    padding-bottom: 2px;
  }

  .hfmpc-results__matrix {
    min-width: 460px;
  }

  .hfmpc-results__matrix th,
  .hfmpc-results__matrix td {
    padding: 10px 12px;
  }

  .hfmpc-results__matrix thead th,
  .hfmpc-results__matrix tbody th,
  .hfmpc-results__matrix td strong,
  .hfmpc-results__matrix td small {
    font-size: 15px;
  }
}

@media (max-width: 580px) {
  .hfmpc {
    margin: 14px auto;
  }

  .entry-content > .hfmpc,
  .post__content > .hfmpc {
    margin-left: -14px;
    margin-right: -14px;
    width: calc(100% + 28px);
  }

  .hfmpc-panel {
    border-radius: 18px;
    padding: 12px;
  }

  .hfmpc__box {
    border-radius: 16px;
    padding: 12px;
  }

  .hfmpc__eyebrow,
  .hfmpc__market span,
  .hfmpc__quick-link,
  .hfmpc__period-chip span {
    font-size: 14px;
  }

  .hfmpc__field-help-trigger {
    font-size: 12px;
    height: 18px;
    min-width: 18px;
    width: 18px;
  }

  .hfmpc__field-help-bubble {
    border-radius: 12px;
    font-size: 13px;
    max-width: calc(100vw - 40px);
    padding: 9px 10px;
    width: min(280px, calc(100vw - 40px));
  }

  .hfmpc-device__controls {
    grid-template-columns: 1fr;
  }

  .hfmpc-device__qty,
  .hfmpc-device__remove {
    width: 100%;
  }

  .hfmpc-device__remove {
    white-space: normal;
  }

  .hfmpc-device__inline {
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .hfmpc-device__inline-field {
    flex-basis: auto;
  }

  .hfmpc-device__inline-field--power {
    grid-column: auto;
  }

  .hfmpc-results__name {
    grid-template-columns: 20px 32px minmax(0, 1fr);
  }

  .hfmpc-results__name--no-logo {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .hfmpc-results__logo {
    height: 32px;
    width: 32px;
  }

  .hfmpc-results__pool-meta {
    font-size: 15px;
  }

  .hfmpc-results__matrix {
    min-width: 400px;
  }

  .hfmpc-results__matrix th,
  .hfmpc-results__matrix td {
    padding: 9px 10px;
  }

  .hfmpc__amount-input input[name="electricity_rub"] {
    padding-right: 84px;
  }

  .hfmpc__amount-input input[name="electricity_rub"] + span {
    display: block;
    font-size: 12px;
    line-height: 1.1;
    max-width: none;
    position: absolute;
    right: 10px;
    text-align: right;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
  }
}
