.difficulty-page .entry-content {
  overflow: visible;
}

.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-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 [hidden] {
  display: none !important;
}

.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__lead {
  color: var(--hfmpc-muted);
  font-size: 17px;
  margin: 0;
  max-width: 920px;
}

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

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

.hfmpc__market strong {
  color: var(--hfmpc-text);
  font-weight: 800;
}

.hfmpc__market-change {
  background: linear-gradient(135deg, rgba(12, 108, 242, 0.12) 0%, rgba(52, 162, 255, 0.1) 100%);
  border-color: rgba(12, 108, 242, 0.22);
  color: var(--hfmpc-primary);
}

.hfmpc__market-change.is-positive {
  background: rgba(20, 150, 109, 0.1);
  border-color: rgba(20, 150, 109, 0.22);
  color: var(--hfmpc-success);
}

.hfmpc__market-change.is-negative {
  background: rgba(196, 69, 69, 0.1);
  border-color: rgba(196, 69, 69, 0.22);
  color: var(--hfmpc-danger);
}

.hfmpc__workspace,
.hfmpc__field-grid,
.difficulty-tool__metric-grid,
.hfmpc-results__summary,
.hfmpc__content-grid,
.hfmpc__faq {
  display: grid;
  gap: 16px;
}

.hfmpc__workspace {
  align-items: start;
  grid-template-columns: minmax(0, 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;
}

.difficulty-tool__toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.difficulty-tool__toolbar .hfmpc__section-title {
  margin-bottom: 0;
}

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

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

.hfmpc__field > span {
  color: var(--hfmpc-text);
  font-size: 16px;
  font-weight: 700;
}

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

.hfmpc__field input,
.hfmpc__field select {
  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;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  width: 100%;
}

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

.hfmpc__field input:focus,
.hfmpc__field select:focus {
  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[readonly] {
  cursor: default;
}

.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: 44px;
  text-overflow: ellipsis;
  width: 100%;
}

.hfmpc__amount-input {
  position: relative;
}

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

.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--plain input {
  padding-right: 14px;
}

.hfmpc__amount-input--plain span {
  display: none;
}

.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: filter 0.2s ease, transform 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 {
  background: #fff2f1;
  border: 1px solid #efc2bd;
  border-radius: 18px;
  color: #a34338;
  margin-top: 16px;
  overflow-wrap: anywhere;
  padding: 13px 15px;
}

.difficulty-tool__headline,
.difficulty-tool__metric-grid {
  display: grid;
  gap: 16px;
}

.difficulty-tool__headline {
  justify-items: center;
  margin-bottom: 20px;
  padding: 12px 0 4px;
  text-align: center;
}

.difficulty-tool__headline-label {
  color: var(--hfmpc-text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.difficulty-tool__headline-value {
  display: block;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.difficulty-tool__headline-meta {
  display: grid;
  gap: 10px;
}

.difficulty-tool__headline-note {
  color: var(--hfmpc-muted);
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.difficulty-tool__headline-note strong {
  color: var(--hfmpc-text);
  font-weight: 800;
}

.difficulty-tool__headline-note strong.is-positive {
  color: var(--hfmpc-success);
}

.difficulty-tool__headline-note strong.is-negative {
  color: var(--hfmpc-danger);
}

.difficulty-tool__insights {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.difficulty-tool__insights-grid {
  display: grid;
  gap: 14px;
}

.difficulty-tool__insights-grid--primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.difficulty-tool__insights-grid--secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.difficulty-tool__insight-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(12, 108, 242, 0.16);
  border-radius: 20px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px;
}

.difficulty-tool__insight-card--primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(234, 243, 255, 0.9) 100%);
}

.difficulty-tool__insight-label {
  color: var(--hfmpc-muted);
  display: block;
  font-size: 15px;
  line-height: 1.4;
}

.difficulty-tool__insight-value {
  color: var(--hfmpc-text);
  display: block;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.difficulty-tool__metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.hfmpc-kpi,
.hfmpc-results__summary-card,
.hfmpc-results__row,
.hfmpc__content-card,
.hfmpc__faq-item {
  border: 1px solid var(--hfmpc-border);
  border-radius: 20px;
}

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

.hfmpc-kpi__label,
.hfmpc-results__summary-card span {
  color: var(--hfmpc-muted);
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.hfmpc-kpi__value,
.hfmpc-results__summary-card strong {
  display: block;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

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

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

.hfmpc__period-chip {
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.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);
  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: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hfmpc__period-chip:hover span,
.hfmpc__period-chip:focus-visible span,
.hfmpc__period-chip.is-active span {
  background: var(--hfmpc-primary-soft);
  border-color: rgba(12, 108, 242, 0.24);
  color: var(--hfmpc-primary);
  outline: 0;
}

.difficulty-chart {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(12, 108, 242, 0.14);
  border-radius: 24px;
  margin-bottom: 16px;
  padding: 16px;
  position: relative;
}

.difficulty-chart__svg {
  display: block;
  height: 22rem;
  width: 100%;
}

.difficulty-chart__area {
  fill: url(#difficulty-chart-fill);
}

.difficulty-chart__line {
  fill: none;
  stroke: #0c6cf2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
}

.difficulty-chart__hover-line {
  stroke: rgba(12, 108, 242, 0.3);
  stroke-dasharray: 5 5;
  stroke-width: 1.5;
}

.difficulty-chart__hover-point {
  fill: #0c6cf2;
  stroke: #fff;
  stroke-width: 3;
}

.difficulty-chart__overlay {
  fill: transparent;
  pointer-events: all;
}

.difficulty-chart__tooltip {
  background: rgba(13, 19, 33, 0.94);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(6, 16, 37, 0.18);
  color: #fff;
  display: grid;
  gap: 4px;
  left: 0;
  max-width: min(240px, calc(100% - 24px));
  padding: 10px 12px;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: translate(-50%, calc(-100% - 12px));
  z-index: 2;
}

.difficulty-chart__tooltip[data-position="below"] {
  transform: translate(-50%, 12px);
}

.difficulty-chart__tooltip-date {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.3;
}

.difficulty-chart__tooltip-value {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.difficulty-chart__meta {
  color: var(--hfmpc-muted);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.difficulty-chart__meta-item:nth-child(2),
.difficulty-chart__meta-item:nth-child(3) {
  text-align: center;
}

.difficulty-chart__meta-item:last-child {
  text-align: right;
}

.difficulty-chart__note {
  color: var(--hfmpc-muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 12px 0 0;
}

.hfmpc-results__summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

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

.hfmpc-results__meta {
  color: var(--hfmpc-muted);
  font-size: 16px;
  margin: 0 0 12px;
}

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

.hfmpc-results__row + .hfmpc-results__row {
  margin-top: 12px;
}

.hfmpc-results__row strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.difficulty-tool__history {
  margin-top: 18px;
}

.difficulty-tool__history-table-wrap {
  overflow-x: auto;
}

.difficulty-tool__history-table {
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 100%;
  width: 100%;
}

.difficulty-tool__history-table thead th {
  color: var(--hfmpc-muted);
  font-size: 14px;
  font-weight: 700;
  padding: 0 0 12px;
  text-align: left;
}

.difficulty-tool__history-table thead th:nth-child(1),
.difficulty-tool__history-table tbody td:nth-child(1) {
  width: 34%;
}

.difficulty-tool__history-table thead th:nth-child(2),
.difficulty-tool__history-table tbody td:nth-child(2) {
  width: 46%;
}

.difficulty-tool__history-table thead th:nth-child(3),
.difficulty-tool__history-table tbody td:nth-child(3) {
  text-align: right;
  width: 20%;
}

.difficulty-tool__history-table tbody td {
  border-top: 1px solid var(--hfmpc-border);
  font-size: 16px;
  line-height: 1.5;
  padding: 14px 0;
  vertical-align: top;
}

.difficulty-tool__history-table tbody td:nth-child(2),
.difficulty-tool__history-table tbody td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.difficulty-tool__history-table tbody td.is-positive {
  color: var(--hfmpc-success);
  font-weight: 700;
}

.difficulty-tool__history-table tbody td.is-negative {
  color: var(--hfmpc-danger);
  font-weight: 700;
}

.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: 18px;
  margin-top: 16px;
}

.hfmpc__content-block {
  display: grid;
  gap: 14px;
}

.hfmpc__content-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}

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

.hfmpc__content-grid--steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hfmpc__content-card,
.hfmpc__faq-item {
  background: #fff;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.hfmpc__content-card-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

.hfmpc__content-card p,
.hfmpc__faq-answer p {
  color: var(--hfmpc-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.hfmpc__step-index {
  align-items: center;
  background: var(--hfmpc-primary-soft);
  border-radius: 999px;
  color: var(--hfmpc-primary);
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

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

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

.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;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: normal;
}

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

.hfmpc__quick-link.is-current {
  background: var(--hfmpc-primary-soft);
  border-color: rgba(12, 108, 242, 0.24);
}

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

@media (max-width: 1100px) {
  .difficulty-tool__metric-grid,
  .difficulty-tool__insights-grid--secondary,
  .hfmpc__content-grid--steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .hfmpc {
    margin-top: 20px;
  }

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

  .difficulty-tool__toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .difficulty-tool__field-grid,
  .difficulty-tool__metric-grid,
  .difficulty-tool__insights-grid--primary,
  .difficulty-tool__insights-grid--secondary,
  .hfmpc-results__summary,
  .hfmpc__content-grid,
  .hfmpc__content-grid--steps,
  .hfmpc__faq {
    grid-template-columns: 1fr;
  }

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

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

  .hfmpc__section-title,
  .hfmpc__content-title {
    font-size: 18px;
  }

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

  .difficulty-chart__svg {
    height: 18rem;
  }

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

  .difficulty-chart__meta-item:nth-child(2),
  .difficulty-chart__meta-item:nth-child(3),
  .difficulty-chart__meta-item:last-child {
    text-align: left;
  }
}
