.mc-converter {
  --mc-accent: #3157e5;
  --mc-accent-dark: #2545bc;
  --mc-border: #dfe3ec;
  --mc-text: #172033;
  --mc-muted: #667085;
  --mc-surface: #fff;
  --mc-soft: #f5f7fb;
  color: var(--mc-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 24px auto;
  max-width: 920px;
}
.mc-back-to-categories { color: #3157e5; display: inline-flex; font-size: 15px; font-weight: 700; margin: 0 0 12px; text-decoration: none; }
.mc-back-to-categories:hover { text-decoration: underline; }
.mc-back-to-categories:focus-visible { border-radius: 3px; outline: 3px solid rgba(49, 87, 229, .28); outline-offset: 3px; }

/*
 * Block themes often reserve a large hero-like gap above page content.
 * The body class is added only to pages that contain our shortcode.
 */
.mixconverter-page .wp-site-blocks > main,
.mixconverter-page main.wp-block-group,
.mixconverter-page main.wp-block-post-content {
  margin-block-start: 0 !important;
  padding-block-start: clamp(20px, 3vw, 44px) !important;
}

.mixconverter-page main > .wp-block-group:first-child,
.mixconverter-page main > .entry-content:first-child {
  padding-block-start: 0 !important;
}

.mixconverter-page .wp-block-post-title {
  margin-block-start: 0 !important;
  margin-block-end: clamp(18px, 2.5vw, 34px) !important;
}

.mixconverter-page .wp-block-post-content {
  margin-block-start: 0 !important;
}

/* Twenty Twenty-Four places a dedicated large spacer before the page title. */
.mixconverter-page main > .wp-block-group:first-child > .wp-block-spacer:first-child {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
}

.mixconverter-page main > .wp-block-group:first-child > .wp-block-post-title + .wp-block-spacer {
  height: clamp(14px, 2vw, 28px) !important;
  margin: 0 !important;
}

.mc-converter *, .mc-converter *::before, .mc-converter *::after { box-sizing: border-box; }
.mc-card { background: var(--mc-surface); border: 1px solid var(--mc-border); border-radius: 20px; box-shadow: 0 12px 35px rgba(20, 35, 70, .08); padding: 30px; }
.mc-title { font-size: 28px; line-height: 1.2; margin: 0 0 24px; }
.mc-category-wrap { margin-bottom: 24px; max-width: 430px; }
.mc-category-wrap[hidden] { display: none; }
.mc-label { display: block; font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.mc-grid { align-items: center; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr); }
.mc-field-group { min-width: 0; }
.mc-input, .mc-output, .mc-select { border: 1px solid var(--mc-border); border-radius: 12px; color: var(--mc-text); font: inherit; width: 100%; }
.mc-input, .mc-output { background: var(--mc-soft); display: flex; font-size: 27px; font-weight: 700; min-height: 64px; padding: 14px 16px; }
.mc-output { align-items: center; overflow-wrap: anywhere; }
.mc-select { appearance: auto; background: #fff; cursor: pointer; font-size: 16px; margin-top: 10px; min-height: 48px; padding: 10px 12px; }
.mc-category { margin-top: 0; }
.mc-input:focus, .mc-select:focus { border-color: var(--mc-accent); box-shadow: 0 0 0 3px rgba(49, 87, 229, .14); outline: 0; }
.mc-swap { align-items: center; align-self: center; background: var(--mc-accent); border: 0; border-radius: 50%; color: #fff; cursor: pointer; display: flex; font-size: 24px; height: 48px; justify-content: center; margin-top: 20px; transition: background .15s ease, transform .15s ease; width: 48px; }
.mc-swap:hover { background: var(--mc-accent-dark); transform: rotate(180deg); }
.mc-swap:focus-visible, .mc-button:focus-visible { outline: 3px solid rgba(49, 87, 229, .28); outline-offset: 2px; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.mc-button { border: 1px solid transparent; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 700; min-height: 44px; padding: 10px 17px; }
.mc-button-primary { background: var(--mc-accent); color: #fff; }
.mc-button-primary:hover { background: var(--mc-accent-dark); }
.mc-button-secondary { background: #fff; border-color: var(--mc-border); color: var(--mc-text); }
.mc-button-secondary:hover { background: var(--mc-soft); }
.mc-formula { color: var(--mc-muted); font-size: 15px; margin: 18px 0 0; min-height: 23px; }
.mc-notice { color: #08783e; font-size: 14px; font-weight: 700; margin: 4px 0 0; min-height: 21px; }
.mc-unit-guide { background: #fff; border: 1px solid var(--mc-border, #dfe3ec); border-radius: 20px; color: var(--mc-text, #172033); margin: clamp(32px, 5vw, 58px) auto 0; max-width: 920px; padding: clamp(22px, 4vw, 38px); }
.mc-unit-guide h2 { font-size: clamp(25px, 3vw, 34px); margin: 0 0 14px; }
.mc-unit-guide h3 { font-size: clamp(18px, 2vw, 22px); margin: 26px 0 10px; }
.mc-unit-guide p, .mc-unit-guide li { color: #556176; line-height: 1.7; }
.mc-unit-guide ol { padding-left: 22px; }
.mc-unit-note { background: #edf1ff; border-radius: 10px; color: #2443ba; margin-top: 22px; padding: 13px 15px; }
.mc-unit-faq { border-top: 1px solid #dfe3ec; }
.mc-unit-faq details { border-bottom: 1px solid #dfe3ec; padding: 15px 0; }
.mc-unit-faq summary { cursor: pointer; font-weight: 750; }
.mc-unit-faq details p { margin: 10px 0 0; }

@media (max-width: 680px) {
  .mixconverter-page .wp-site-blocks > main,
  .mixconverter-page main.wp-block-group,
  .mixconverter-page main.wp-block-post-content { padding-block-start: 16px !important; }
  .mc-card { border-radius: 14px; padding: 20px; }
  .mc-grid { grid-template-columns: 1fr; gap: 10px; }
  .mc-swap { justify-self: center; margin: 0; transform: rotate(90deg); }
  .mc-swap:hover { transform: rotate(270deg); }
  .mc-input, .mc-output { font-size: 23px; min-height: 58px; }
  .mc-actions { display: grid; }
}
