/*
Theme Name: MY HOMESBLOGS
Theme URI: https://myhomesblogs.com/
Author: MY HOMESBLOGS
Author URI: https://myhomesblogs.com/
Description: Editorial home improvement theme with 20 built-in calculators, blog layouts, SEO tags and structured data. Activating it creates the calculator pages, All Tools, About Us, Contact Us, Privacy Policy, Terms and Conditions and Blog pages.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: myhomesblogs
Tags: blog, news, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Design tokens ---------- */
:root {
  --paper: #f6f7fb;
  --surface: #ffffff;
  --surface-sunk: #eef1f7;
  --sand: #e9ecfb;
  --line: #dfe3ec;
  --line-strong: #7b8599;
  --ink: #1e293b;
  --ink-muted: #475569;
  --ink-subtle: #5b6577;
  --brand: #4150d4;
  --brand-strong: #3340b3;
  --brand-tint: #ecefff;
  --on-brand: #ffffff;
  --accent: #0a7066;
  --accent-bright: #13b8a7;
  --violet: #7c3aed;
  --accent-tint: #e3f6f3;
  --danger: #c0262d;
  --danger-tint: #fdecec;
  --overlay: rgba(15, 23, 42, 0.45);
  --shadow-card: 0 1px 2px rgba(30, 41, 59, 0.06);
  --shadow-raised: 0 14px 36px -18px rgba(65, 80, 212, 0.35);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --container: 1240px;
  --measure: 720px;
  --header-height: 76px;
  --font-display: Poppins, "Segoe UI", system-ui, sans-serif;
  --font-sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
/* Dark mode follows the visitor's system setting. Delete this block to keep the site light only. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1320;
    --surface: #171c2b;
    --surface-sunk: #1e2435;
    --sand: #252c42;
    --line: #2c3448;
    --line-strong: #66718a;
    --ink: #e8ecf4;
    --ink-muted: #aeb7c7;
    --ink-subtle: #8e98ab;
    --brand: #8f9bff;
    --brand-strong: #b0b8ff;
    --brand-tint: #232a4a;
    --on-brand: #0b1030;
    --accent: #4fd1c1;
    --accent-bright: #2dd4bf;
    --violet: #b89cff;
    --accent-tint: #16322f;
    --danger: #ff8f8f;
    --danger-tint: #3a1d22;
    --overlay: rgba(0, 0, 0, 0.6);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-raised: 0 14px 36px -14px rgba(0, 0, 0, 0.75);
  }
  .mh-logo__img { background: #ffffff; border-radius: var(--radius-sm); padding: 4px 8px; box-sizing: content-box; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* ==========================================================================
   MY HOMESBLOGS — component stylesheet
   Every class is prefixed mh-. BEM-ish: .mh-block, .mh-block__part, .mh-block--variant.
   Responsive rules use container queries on .mh-site (wrap the whole page in it,
   header.php → footer.php), so a component responds to the space it is given.
   Breakpoints: 640px (large phone / small tablet), 900px (tablet landscape), 1180px (desktop).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 28px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.mh-site { container: site / inline-size; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 17px; line-height: 28px; min-width: 0; overflow-x: clip; }
.mh-site a { color: inherit; }
.mh-site :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.mh-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mh-skip { position: absolute; left: 16px; top: -60px; background: var(--brand); color: var(--on-brand) !important; padding: 8px 14px; border-radius: var(--radius-sm); z-index: 50; font-weight: 600; font-size: 14px; }
.mh-skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.mh-container { width: 100%; max-width: calc(var(--container) + 2 * var(--space-6)); margin-inline: auto; padding-inline: var(--space-4); }
.mh-measure { max-width: var(--measure); }
.mh-section { padding-block: var(--space-7); }
.mh-section--sunk { background: var(--surface-sunk); }
.mh-section--tight { padding-block: var(--space-6); }
.mh-section + .mh-section:not(.mh-section--sunk) { padding-top: 0; }
.mh-section.mh-section--sunk + .mh-section:not(.mh-section--sunk) { padding-top: var(--space-7); }
.mh-section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-2) var(--space-5); margin-bottom: var(--space-5); }
.mh-section-head__text { max-width: 640px; }
.mh-section-head h2 { margin: 0; }
.mh-section-head p { margin: 6px 0 0; color: var(--ink-muted); font-size: 16px; line-height: 25px; }
.mh-grid { display: grid; gap: var(--space-5) var(--space-4); grid-template-columns: minmax(0, 1fr); }
.mh-stack > * + * { margin-top: var(--space-5); }
.mh-divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

@container site (min-width: 640px) {
  .mh-container { padding-inline: var(--space-5); }
  .mh-grid--2, .mh-grid--3, .mh-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mh-grid { gap: var(--space-6) var(--space-5); }
}
@container site (min-width: 900px) {
  .mh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mh-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mh-section { padding-block: var(--space-8); }
  .mh-section.mh-section--sunk + .mh-section:not(.mh-section--sunk) { padding-top: var(--space-8); }
}
@container site (min-width: 1180px) {
  .mh-container { padding-inline: var(--space-6); }
  .mh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Type ---------- */
.mh-site h1, .mh-site h2, .mh-site h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); text-wrap: balance; }
.mh-h1 { font-size: 30px; line-height: 38px; letter-spacing: -0.015em; margin: 0; }
.mh-h2 { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; margin: 0; }
.mh-h3 { font-size: 21px; line-height: 27px; margin: 0; }
.mh-lede { font-family: var(--font-sans); font-size: 19px; line-height: 29px; color: var(--ink-muted); margin: 12px 0 0; max-width: 680px; }
.mh-eyebrow { display: inline-block; font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
a.mh-eyebrow:hover { text-decoration: underline; text-underline-offset: 3px; }
.mh-caption { font-size: 13px; line-height: 18px; color: var(--ink-subtle); font-weight: 500; }
@container site (min-width: 640px) {
  .mh-h1 { font-size: 40px; line-height: 48px; }
  .mh-h2 { font-size: 28px; line-height: 36px; }
  .mh-h3 { font-size: 22px; line-height: 28px; }
  .mh-lede { font-size: 21px; line-height: 32px; }
}

/* ---------- Links & buttons ---------- */
.mh-link { color: var(--brand); font-weight: 600; font-size: 15px; line-height: 22px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.mh-link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.mh-link:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 4px; }
.mh-link:hover svg { transform: translateX(2px); }

.mh-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 15px; line-height: 20px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.mh-btn svg { width: 18px; height: 18px; flex: none; }
.mh-btn--primary { background: var(--brand); color: var(--on-brand) !important; }
.mh-btn--primary:hover { background: var(--brand-strong); }
.mh-btn--secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink) !important; }
.mh-btn--secondary:hover { border-color: var(--ink); }
.mh-btn--ghost { background: transparent; color: var(--ink-muted) !important; }
.mh-btn--ghost:hover { background: var(--surface-sunk); color: var(--ink) !important; }
.mh-btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.mh-btn--lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.mh-btn--block { width: 100%; }
.mh-btn[disabled] { opacity: .5; cursor: not-allowed; }

.mh-iconbtn { appearance: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.mh-iconbtn svg { width: 22px; height: 22px; }
.mh-iconbtn:hover { background: var(--surface-sunk); }
.mh-iconbtn[aria-expanded="true"] { background: var(--surface-sunk); border-color: var(--line); }

.mh-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 10px; text-decoration: none; white-space: nowrap; }
a.mh-tag:hover { border-color: var(--line-strong); color: var(--ink); }

/* ---------- Icons ---------- */
.mh-icon { width: 24px; height: 24px; flex: none; }
.mh-icontile { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--sand); color: var(--brand); flex: none; }
.mh-icontile svg { width: 26px; height: 26px; }
.mh-icontile--sm { width: 36px; height: 36px; }
.mh-icontile--sm svg { width: 20px; height: 20px; }
.mh-icontile--lg { width: 56px; height: 56px; border-radius: var(--radius-md); }
.mh-icontile--lg svg { width: 30px; height: 30px; }

/* ---------- Media (images + graceful fallback) ---------- */
.mh-media { position: relative; overflow: hidden; background-color: var(--sand); border-radius: var(--radius-md); aspect-ratio: 3 / 2; }
.mh-media::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, transparent 0 14px, var(--line) 14px 15px); opacity: .55; }
.mh-media::after { content: attr(data-label); position: absolute; left: 14px; bottom: 12px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.mh-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mh-media.is-broken img { display: none; }
.mh-media--wide { aspect-ratio: 16 / 9; }
.mh-media--square { aspect-ratio: 1 / 1; }
.mh-media--tall { aspect-ratio: 4 / 5; }
.mh-figure { margin: 0; }
.mh-figure figcaption { margin-top: 10px; font-size: 13px; line-height: 18px; color: var(--ink-subtle); }

/* ---------- Header ----------
   Row 1: logo · search · actions. Row 2 (desktop): the primary menu on its own bar.
   Nav labels never wrap; items that do not fit move into "More" (see fitNav in the script). */
.mh-header { position: relative; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.mh-header::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--accent-bright) 0%, var(--brand) 55%, var(--violet) 100%); }
.mh-header__bar { display: flex; align-items: center; gap: var(--space-4); height: 64px; }
.mh-logo { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.mh-header__search { display: none; flex: 1 1 auto; max-width: 440px; margin-left: auto; }
.mh-header__search .mh-search { max-width: none; }
.mh-header__actions { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.mh-header__cta { display: none; }
.mh-navbar { display: none; border-top: 1px solid var(--line); }
.mh-nav { position: relative; min-width: 0; }
.mh-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.mh-nav.is-fitted .mh-nav__list { flex-wrap: nowrap; }
.mh-nav__item { position: relative; flex: none; }
.mh-nav__link { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 48px; padding: 0 14px; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink-muted) !important; text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; font-family: var(--font-sans); }
.mh-nav__list > .mh-nav__item:first-child > .mh-nav__link { padding-left: 0; }
.mh-nav__list > .mh-nav__item:first-child > .mh-nav__link[aria-current="page"]::after { left: 0; }
.mh-nav__link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.mh-nav__link:hover { color: var(--brand) !important; }
.mh-nav__link[aria-current="page"] { color: var(--ink) !important; }
.mh-nav__link[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.mh-nav__link[aria-expanded="true"] { color: var(--brand) !important; }
.mh-nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.mh-dropdown { position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-raised); padding: var(--space-2); display: none; z-index: 30; }
.mh-dropdown.is-open { display: block; }
.mh-dropdown--grid { width: 540px; }
.mh-dropdown--grid.is-open { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mh-dropdown--right { left: auto; right: 0; }
.mh-dropdown a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink) !important; font-size: 15px; line-height: 20px; font-weight: 500; }
.mh-dropdown a:hover { background: var(--brand-tint); color: var(--brand) !important; }
.mh-dropdown strong { display: block; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.mh-dropdown span.mh-dropdown__desc { display: block; font-size: 13px; line-height: 18px; color: var(--ink-subtle); margin-top: 2px; }
.mh-dropdown__foot { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 6px; padding: 10px 12px 4px; }
.mh-dropdown__foot a { padding: 0; display: inline-flex; }
.mh-dropdown__foot a:hover { background: none; }
.mh-dropdown ul { list-style: none; margin: 0; padding: 0; }
/* items moved into "More" show as plain rows; their own submenus open inline */
.mh-more .mh-nav__item { display: block; }
.mh-more .mh-nav__link, .mh-more .mh-nav__item:first-child > .mh-nav__link { height: auto; width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); justify-content: space-between; color: var(--ink) !important; font-weight: 500; }
.mh-more .mh-nav__link:hover { background: var(--brand-tint); }
.mh-more .mh-nav__link[aria-current="page"]::after { display: none; }
.mh-more .mh-dropdown { position: static; box-shadow: none; border: 0; min-width: 0; width: auto; padding: 0 0 4px 12px; }
.mh-more .mh-dropdown--grid.is-open { display: block; }
.mh-more .mh-dropdown .mh-icontile, .mh-more .mh-dropdown__desc { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .mh-nav__list > .mh-nav__item:hover > .mh-dropdown { display: block; }
  .mh-nav__list > .mh-nav__item:hover > .mh-dropdown--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
}
.mh-searchpanel { display: none; border-top: 1px solid var(--line); background: var(--surface); padding-block: var(--space-4); }
.mh-searchpanel.is-open { display: block; }
.mh-searchpanel__hint { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-subtle); }
.mh-mobilemenu { display: none; border-top: 1px solid var(--line); background: var(--surface); padding: var(--space-3) 0 var(--space-5); }
.mh-mobilemenu.is-open { display: block; }
.mh-mobilemenu__list { list-style: none; margin: 0; padding: 0; }
.mh-mobilemenu__list > li > a, .mh-mobilemenu__list > li > button { display: flex; width: 100%; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; font-family: var(--font-sans); font-size: 17px; font-weight: 600; text-decoration: none; color: var(--ink) !important; cursor: pointer; text-align: left; }
.mh-mobilemenu__list > li > a[aria-current="page"] { color: var(--brand) !important; }
.mh-mobilemenu__list svg { width: 18px; height: 18px; color: var(--ink-subtle); transition: transform .15s ease; flex: none; }
.mh-mobilemenu__list button[aria-expanded="true"] svg { transform: rotate(180deg); }
.mh-mobilemenu__sub { display: none; list-style: none; margin: 0; padding: 6px 0 12px 4px; columns: 2; column-gap: 16px; border-bottom: 1px solid var(--line); }
.mh-mobilemenu__sub.is-open { display: block; }
.mh-mobilemenu__sub a { display: block; padding: 8px 0; font-size: 15px; color: var(--ink-muted) !important; text-decoration: none; break-inside: avoid; }
.mh-mobilemenu__foot { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
@container site (min-width: 900px) {
  .mh-header__bar { height: var(--header-height); gap: var(--space-6); }
  .mh-header__search { display: block; }
  .mh-header__search-toggle, .mh-burger { display: none !important; }
  .mh-mobilemenu, .mh-searchpanel { display: none !important; }
  .mh-navbar { display: block; }
  .mh-header__cta { display: inline-flex; }
  .mh-header__actions { margin-left: 0; }
}
.mh-logo__img { display: block; width: auto; height: 38px; }
.mh-logo--footer .mh-logo__img { height: 52px; }
@container site (min-width: 900px) { .mh-logo--header .mh-logo__img { height: 50px; } }
/* ---------- Search ---------- */
.mh-search { position: relative; display: flex; align-items: center; width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 5px 5px 5px 48px; }
.mh-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.mh-search > svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-subtle); }
.mh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 42px; font-size: 16px; color: var(--ink); }
.mh-search input::placeholder { color: var(--ink-subtle); }
.mh-search .mh-btn { border-radius: var(--radius-pill); min-height: 42px; }
.mh-search--sm { padding-left: 42px; }
.mh-search--sm > svg { left: 15px; width: 18px; height: 18px; }
.mh-search--sm input { height: 34px; font-size: 15px; }
.mh-search--sm .mh-btn { min-height: 34px; }
.mh-search--flat { border-radius: var(--radius-sm); }
.mh-search--flat .mh-btn { border-radius: calc(var(--radius-sm) - 2px); }
@container site (max-width: 479px) { .mh-search .mh-btn span { display: none; } .mh-search .mh-btn { padding: 0 14px; } }

/* ---------- Breadcrumbs ---------- */
.mh-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; line-height: 20px; color: var(--ink-subtle); }
.mh-breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.mh-breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; margin-right: 2px; }
.mh-breadcrumbs a { color: var(--ink-muted) !important; text-decoration: none; font-weight: 500; }
.mh-breadcrumbs a:hover { color: var(--brand) !important; text-decoration: underline; text-underline-offset: 3px; }
.mh-breadcrumbs [aria-current] { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60cqi; }

/* ---------- Page header ---------- */
.mh-pagehead { padding-block: var(--space-5) var(--space-6); border-bottom: 1px solid var(--line); background: var(--paper); }
.mh-pagehead .mh-breadcrumbs { margin-bottom: var(--space-4); }
.mh-pagehead .mh-eyebrow { margin-bottom: 10px; }
.mh-pagehead__meta { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.mh-pagehead--plain { border-bottom: 0; padding-bottom: var(--space-4); }
@container site (min-width: 900px) { .mh-pagehead { padding-block: var(--space-6) var(--space-7); } .mh-pagehead--plain { padding-bottom: var(--space-5); } }

/* ---------- Meta row ---------- */
.mh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; line-height: 18px; color: var(--ink-subtle); font-weight: 500; }
.mh-meta > * + *::before { content: "·"; margin-right: 10px; color: var(--line-strong); }
.mh-meta a { color: var(--ink-muted) !important; text-decoration: none; }
.mh-meta a:hover { text-decoration: underline; }
.mh-byline { display: flex; align-items: center; gap: 12px; }
.mh-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.mh-avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.mh-byline__name { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.mh-byline__name a { text-decoration: none; }

/* ---------- Hero ---------- */
.mh-hero { padding-block: var(--space-6) var(--space-7); background: var(--paper); border-bottom: 1px solid var(--line); }
.mh-hero__grid { display: grid; gap: var(--space-6); }
.mh-hero__kicker { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-4); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.mh-hero__kicker::before { content: ""; width: 32px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent-bright), var(--violet)); }
.mh-hero h1 { font-size: 34px; line-height: 42px; letter-spacing: -0.02em; margin: 0; max-width: 16ch; }
.mh-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent) 0%, var(--brand) 55%, var(--violet) 100%); -webkit-background-clip: text; background-clip: text; color: var(--brand); -webkit-text-fill-color: transparent; }
.mh-hero__text { font-size: 18px; line-height: 29px; color: var(--ink-muted); margin: var(--space-4) 0 var(--space-5); max-width: 560px; }
.mh-hero__topics { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mh-hero__topics > span { font-size: 13px; color: var(--ink-subtle); font-weight: 500; margin-right: 4px; }
.mh-hero__stats { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.mh-hero__stats div { font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.mh-hero__stats strong { display: block; font-family: var(--font-display); font-size: 26px; line-height: 30px; font-weight: 500; color: var(--ink); }
.mh-hero__feature { display: block; text-decoration: none; }
.mh-hero__feature .mh-media { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; }
.mh-hero__feature-body { margin-top: var(--space-4); }
.mh-hero__feature-body h2 { font-size: 22px; line-height: 28px; margin: 8px 0 6px; }
.mh-hero__feature:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
@container site (min-width: 640px) { .mh-hero h1 { font-size: 44px; line-height: 52px; } }
@container site (min-width: 900px) {
  .mh-hero { padding-block: var(--space-8); }
  .mh-hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-8); align-items: center; }
}
@container site (min-width: 1180px) { .mh-hero h1 { font-size: 52px; line-height: 60px; } }

/* ---------- Article card ---------- */
.mh-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.mh-card .mh-media { margin-bottom: var(--space-4); }
.mh-card:hover .mh-media img { transform: scale(1.03); }
.mh-card__title { font-family: var(--font-display); font-size: 19px; line-height: 27px; font-weight: 600; margin: 8px 0 8px; color: var(--ink); text-wrap: balance; }
.mh-card__title a { text-decoration: none; }
.mh-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.mh-card:hover .mh-card__title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.mh-card__excerpt { margin: 0 0 12px; font-size: 15px; line-height: 23px; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mh-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mh-card__foot .mh-link { position: relative; z-index: 3; }
.mh-card .mh-eyebrow { position: relative; z-index: 3; align-self: flex-start; }
/* horizontal list variant */
.mh-card--row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-4); align-items: start; padding-block: var(--space-4); border-top: 1px solid var(--line); }
.mh-card--row .mh-media { margin: 0; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); }
.mh-card--row .mh-card__title { font-size: 18px; line-height: 24px; margin: 4px 0 6px; }
.mh-card--row .mh-card__excerpt { -webkit-line-clamp: 2; margin-bottom: 8px; display: none; }
@container site (min-width: 640px) {
  .mh-card--row { grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-5); padding-block: var(--space-5); }
  .mh-card--row .mh-media { aspect-ratio: 3 / 2; border-radius: var(--radius-md); }
  .mh-card--row .mh-card__title { font-size: 21px; line-height: 27px; }
  .mh-card--row .mh-card__excerpt { display: -webkit-box; }
}
/* text-only compact variant */
.mh-card--compact { padding-block: var(--space-4); border-top: 1px solid var(--line); }
.mh-card--compact .mh-card__title { font-size: 18px; line-height: 24px; margin: 6px 0 6px; }
/* numbered guide variant */
.mh-guide { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-4); padding-block: var(--space-5); border-top: 1px solid var(--line); }
.mh-guide__num { font-family: var(--font-display); font-size: 28px; line-height: 32px; color: var(--brand); font-weight: 600; }
.mh-guide h3 { font-size: 20px; line-height: 26px; margin: 0 0 6px; }
.mh-guide h3 a { text-decoration: none; }
.mh-guide h3 a::after { content: ""; position: absolute; inset: 0; }
.mh-guide:hover h3 a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.mh-guide p { margin: 0 0 8px; font-size: 15px; line-height: 23px; color: var(--ink-muted); }

/* ---------- Featured article ---------- */
.mh-feature { position: relative; display: grid; gap: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3); box-shadow: var(--shadow-card); }
.mh-feature .mh-media { border-radius: var(--radius-md); aspect-ratio: 16 / 10; }
.mh-feature__body { padding: 0 var(--space-3) var(--space-4); display: flex; flex-direction: column; justify-content: center; }
.mh-feature__title { font-family: var(--font-display); font-size: 25px; line-height: 33px; font-weight: 600; margin: 10px 0 10px; letter-spacing: -0.01em; text-wrap: balance; }
.mh-feature__title a { text-decoration: none; }
.mh-feature__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.mh-feature:hover .mh-feature__title a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.mh-feature__excerpt { font-size: 16px; line-height: 26px; color: var(--ink-muted); margin: 0 0 var(--space-4); }
.mh-feature .mh-eyebrow, .mh-feature .mh-link { position: relative; z-index: 3; }
.mh-feature__foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
@container site (min-width: 900px) {
  .mh-feature { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-4); }
  .mh-feature__body { padding: var(--space-4) var(--space-4) var(--space-4) 0; }
  .mh-feature__title { font-size: 34px; line-height: 40px; }
}

/* ---------- Tool card ---------- */
.mh-tool { position: relative; display: flex; flex-direction: column; gap: var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-card); transition: border-color .15s ease, box-shadow .15s ease; min-width: 0; }
.mh-tool:hover { border-color: var(--line-strong); box-shadow: var(--shadow-raised); }
.mh-tool:hover .mh-icontile { background: var(--brand-tint); }
.mh-tool__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mh-site .mh-tool__name { font-size: 18px; line-height: 25px; font-weight: 600; margin: 4px 0 0; color: var(--ink); font-family: var(--font-sans); }
.mh-tool__name a { text-decoration: none; }
.mh-tool__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.mh-tool__desc { margin: 0; font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.mh-tool__foot { margin-top: auto; padding-top: var(--space-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mh-tool__cat { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); }
.mh-tool__open { font-size: 14px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
.mh-tool__open svg { width: 16px; height: 16px; }
/* compact list variant (sidebars, related tools) */
.mh-toolrow { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink) !important; }
.mh-toolrow:hover { background: var(--surface-sunk); }
.mh-toolrow strong { display: block; font-size: 15px; line-height: 20px; font-weight: 600; }
.mh-toolrow span.mh-toolrow__desc { display: block; font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.mh-toolrow > svg { margin-left: auto; width: 16px; height: 16px; color: var(--ink-subtle); flex: none; }

/* ---------- Category card ---------- */
.mh-catcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); text-decoration: none; color: var(--ink) !important; transition: border-color .15s ease, background-color .15s ease; min-width: 0; }
.mh-catcard:hover { border-color: var(--brand); }
.mh-catcard__name { font-family: var(--font-display); font-size: 18px; line-height: 25px; font-weight: 600; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mh-catcard__name svg { width: 18px; height: 18px; color: var(--ink-subtle); transition: transform .15s ease, color .15s ease; }
.mh-catcard:hover .mh-catcard__name svg { transform: translateX(3px); color: var(--brand); }
.mh-catcard__desc { font-size: 14px; line-height: 21px; color: var(--ink-muted); margin: 0; }
.mh-catcard__count { font-size: 13px; line-height: 18px; color: var(--ink-subtle); font-weight: 500; margin-top: auto; }
.mh-catgrid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mh-catgrid .mh-catcard { padding: var(--space-4); }
.mh-catgrid .mh-catcard__desc { display: none; }
.mh-catgrid .mh-catcard__name { font-size: 18px; line-height: 23px; }
@container site (min-width: 640px) { .mh-catgrid { gap: var(--space-4); } .mh-catgrid .mh-catcard { padding: var(--space-5); } .mh-catgrid .mh-catcard__desc { display: block; } .mh-catgrid .mh-catcard__name { font-size: 21px; line-height: 26px; } }
@container site (min-width: 900px) { .mh-catgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Chips / filters ---------- */
.mh-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.mh-chips--wrap { flex-wrap: wrap; overflow: visible; }
.mh-chip { appearance: none; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink) !important; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.mh-chip:hover { border-color: var(--ink); }
.mh-chip[aria-pressed="true"], .mh-chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand) !important; }
.mh-chip__count { font-size: 12px; opacity: .75; font-weight: 600; }

/* ---------- Tool directory toolbar ---------- */
.mh-toolbar { display: grid; gap: var(--space-4); margin-bottom: var(--space-6); }
.mh-toolbar__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.mh-toolbar__count { font-size: 14px; color: var(--ink-subtle); font-weight: 500; }
.mh-toolgroup + .mh-toolgroup { margin-top: var(--space-7); }
.mh-toolgroup__head { display: flex; flex-direction: column; gap: 4px !important; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: var(--space-3); margin-bottom: var(--space-5); border-bottom: 1px solid var(--line); }
.mh-toolgroup__head h2 { font-size: 24px; line-height: 30px; margin: 0; }
.mh-toolgroup__head span { font-size: 13px; color: var(--ink-subtle); font-weight: 500; }

/* ---------- Calculator ---------- */
.mh-calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); overflow: hidden; }
.mh-calc__head { display: flex; align-items: center; gap: 12px; padding: var(--space-4); border-bottom: 1px solid var(--line); }
.mh-calc__head strong { display: block; font-size: 16px; line-height: 22px; font-weight: 600; }
.mh-calc__head span { display: block; font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.mh-calc__units { margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 10px; white-space: nowrap; }
.mh-calc__body { display: grid; }
.mh-calc__form { padding: var(--space-4); display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); align-content: start; }
.mh-calc__actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: var(--space-2); grid-column: 1 / -1; }
.mh-calc__actions .mh-btn--primary { flex: 1 1 180px; }
.mh-calc__alert { grid-column: 1 / -1; }
.mh-calc__out { padding: var(--space-4); background: var(--surface-sunk); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
@container site (min-width: 640px) {
  .mh-calc__form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); padding: var(--space-5); }
  .mh-calc__head { padding: var(--space-4) var(--space-5); }
  .mh-calc__out { padding: var(--space-5); }
  .mh-field--full { grid-column: 1 / -1; }
}
@container site (min-width: 1180px) {
  .mh-calc__body { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .mh-calc__out { border-top: 0; border-left: 1px solid var(--line); padding: var(--space-6) var(--space-5); }
  .mh-calc__form { padding: var(--space-6); }
}

/* ---------- Form fields ---------- */
.mh-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mh-field[hidden] { display: none; }
.mh-field__label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; }
.mh-field__label em { font-style: normal; font-weight: 500; color: var(--ink-subtle); font-size: 13px; }
.mh-field__hint { font-size: 13px; line-height: 18px; color: var(--ink-subtle); margin: 0; }
.mh-input { position: relative; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.mh-input:hover { border-color: var(--ink-muted); }
.mh-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.mh-input input, .mh-input select, .mh-input textarea { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; height: 46px; padding: 0 12px; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mh-input textarea { height: auto; min-height: 150px; padding: 12px; line-height: 24px; resize: vertical; }
.mh-input select { appearance: none; padding-right: 40px; cursor: pointer; }
.mh-input--select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.mh-input select option { background: var(--surface); color: var(--ink); }
.mh-input__unit { display: inline-flex; align-items: center; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--ink-muted); background: var(--surface-sunk); border-left: 1px solid var(--line); border-radius: 0 calc(var(--radius-sm) - 1px) calc(var(--radius-sm) - 1px) 0; white-space: nowrap; }
.mh-input__prefix { display: inline-flex; align-items: center; padding-left: 12px; font-size: 16px; color: var(--ink-muted); }
.mh-input__prefix + input { padding-left: 4px; }
.mh-input input::placeholder, .mh-input textarea::placeholder { color: var(--ink-subtle); opacity: .8; }
.mh-field__error { display: none; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--danger); }
.mh-field__error svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.mh-field.is-invalid .mh-input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.mh-field.is-invalid .mh-field__error { display: flex; }
.mh-field.is-invalid .mh-field__hint { display: none; }
.mh-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mh-seg label { position: relative; }
.mh-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.mh-seg span { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 500; cursor: pointer; }
.mh-seg input:checked + span { background: var(--brand-tint); border-color: var(--brand); color: var(--brand); font-weight: 600; box-shadow: inset 0 0 0 1px var(--brand); }
.mh-seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Result box ---------- */
.mh-result { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.mh-result__label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.mh-result__value { font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.02em; color: var(--brand); font-variant-numeric: tabular-nums; margin-top: 6px; overflow-wrap: anywhere; }
.mh-result__value small { font-size: 18px; font-weight: 600; letter-spacing: 0; color: var(--ink-muted); margin-left: 4px; }
.mh-result__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.mh-result__list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; }
.mh-result__list li span { color: var(--ink-muted); }
.mh-result__list li strong { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.mh-result__note { font-size: 13px; line-height: 19px; color: var(--ink-muted); margin: 0; display: flex; gap: 8px; }
.mh-result__note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.mh-result__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.mh-result--empty { align-items: center; justify-content: center; text-align: center; min-height: 220px; color: var(--ink-muted); gap: 10px; }
.mh-result--empty .mh-icontile { background: var(--surface); border: 1px dashed var(--line-strong); color: var(--ink-subtle); }
.mh-result--empty p { margin: 0; font-size: 15px; line-height: 23px; max-width: 260px; }
.mh-result--empty strong { color: var(--ink); font-size: 16px; }
.mh-result.is-fresh .mh-result__value { animation: mh-pop .35s ease; }
@keyframes mh-pop { from { opacity: .2; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mh-result.is-fresh .mh-result__value { animation: none; } .mh-card:hover .mh-media img { transform: none; } }

/* ---------- Alerts ---------- */
.mh-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; line-height: 21px; border: 1px solid; }
.mh-alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.mh-alert strong { display: block; font-weight: 600; }
.mh-alert--error { background: var(--danger-tint); border-color: var(--danger); color: var(--ink); }
.mh-alert--error svg { color: var(--danger); }
.mh-alert--success { background: var(--brand-tint); border-color: var(--brand); color: var(--ink); }
.mh-alert--success svg { color: var(--brand); }
.mh-alert--note { background: var(--accent-tint); border-color: transparent; color: var(--ink); }
.mh-alert--note svg { color: var(--accent); }

/* ---------- Tool page layout ---------- */
.mh-toolpage__top { padding-block: var(--space-5) var(--space-6); }
.mh-toolpage__intro { margin-bottom: var(--space-5); }
.mh-toolpage__intro .mh-breadcrumbs { margin-bottom: var(--space-4); }
.mh-toolpage__intro .mh-lede { font-family: var(--font-sans); font-size: 17px; line-height: 27px; margin-top: 10px; }
.mh-toolpage__meta { margin-top: 12px; }
.mh-toolpage__grid { display: grid; gap: var(--space-5); }
.mh-aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); }
.mh-aside-card + .mh-aside-card { margin-top: var(--space-4); }
.mh-aside-card h2 { font-family: var(--font-sans) !important; font-size: 13px; line-height: 18px; font-weight: 600 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted) !important; margin: 4px 4px 8px; }
.mh-aside-card ul { list-style: none; margin: 0; padding: 0; }
.mh-jump a { display: block; padding: 7px 4px; font-size: 14px; line-height: 20px; color: var(--ink-muted) !important; text-decoration: none; border-radius: 4px; }
.mh-jump a:hover { color: var(--brand) !important; }
.mh-toolpage__aside { display: none; }
@container site (min-width: 640px) { .mh-toolpage__intro .mh-lede { font-size: 18px; line-height: 29px; } }
@container site (min-width: 900px) {
  .mh-toolpage__top { padding-block: var(--space-6) var(--space-7); }
  .mh-toolpage__grid { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-6); align-items: start; }
  .mh-toolpage__aside { display: block; }
}

/* ---------- Content layout (article / tool body) ---------- */
.mh-content { display: grid; gap: var(--space-6); }
.mh-content__main { min-width: 0; max-width: var(--measure); }
.mh-content__side { min-width: 0; }
@container site (min-width: 1180px) {
  .mh-content { grid-template-columns: minmax(0, var(--measure)) minmax(0, 300px); justify-content: space-between; gap: var(--space-8); }
  .mh-content__side .mh-sticky { position: sticky; top: 24px; }
}

/* ---------- Prose ---------- */
.mh-prose { font-size: 17px; line-height: 29px; color: var(--ink); }
.mh-prose > * { margin: 0; }
.mh-prose > * + * { margin-top: 18px; }
.mh-prose h2 { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; margin-top: 48px; scroll-margin-top: 24px; }
.mh-prose h3 { font-size: 21px; line-height: 27px; margin-top: 32px; }
.mh-prose h2 + *, .mh-prose h3 + * { margin-top: 12px; }
.mh-prose > h2:first-child { margin-top: 0; }
.mh-prose a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 500; }
.mh-prose a:hover { color: var(--brand-strong); text-decoration-thickness: 2px; }
.mh-prose ul, .mh-prose ol { padding-left: 1.3em; }
.mh-prose li + li { margin-top: 8px; }
.mh-prose li::marker { color: var(--accent); font-weight: 600; }
.mh-prose strong { font-weight: 600; }
.mh-prose blockquote { border-left: 2px solid var(--accent); padding-left: 20px; font-family: var(--font-display); font-size: 19px; line-height: 30px; color: var(--ink); font-weight: 500; }
.mh-prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-sunk); border: 1px solid var(--line); padding: 1px 6px; border-radius: 4px; }
.mh-prose .mh-figure { margin-top: 32px; margin-bottom: 8px; }
.mh-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.mh-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; min-width: 460px; }
.mh-table th, .mh-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mh-table th { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-muted); background: var(--surface-sunk); }
.mh-table tr:last-child td { border-bottom: 0; }
.mh-table td.num { font-variant-numeric: tabular-nums; }
@container site (min-width: 640px) { .mh-prose { font-size: 18px; line-height: 31px; } .mh-prose h2 { font-size: 27px; line-height: 35px; } }

.mh-formula { background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); }
.mh-formula__eq { font-family: var(--font-mono); font-size: 15px; line-height: 26px; font-weight: 500; color: var(--ink); overflow-x: auto; white-space: pre-wrap; }
.mh-formula__eq + .mh-formula__eq { margin-top: 6px; }
.mh-formula dl { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; line-height: 21px; }
.mh-formula dt { font-family: var(--font-mono); font-weight: 500; color: var(--brand); }
.mh-formula dd { margin: 0; color: var(--ink-muted); }
.mh-example { background: var(--accent-tint); border-radius: var(--radius-md); padding: var(--space-5); }
.mh-example__label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.mh-example__label svg { width: 16px; height: 16px; }
.mh-example p { margin: 0 0 10px; font-size: 16px; line-height: 26px; }
.mh-example ol { margin: 0; padding-left: 1.2em; font-size: 16px; line-height: 26px; }
.mh-example ol li + li { margin-top: 6px; }
.mh-example .mh-example__answer { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(10, 112, 102, .25); font-weight: 600; }
.mh-callout { display: flex; gap: 14px; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--brand-tint); font-size: 16px; line-height: 26px; }
.mh-callout svg { width: 22px; height: 22px; color: var(--brand); flex: none; margin-top: 2px; }
.mh-callout p { margin: 0; }
.mh-callout strong { font-weight: 600; }

/* ---------- TOC ---------- */
.mh-toc { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: var(--space-4) var(--space-4) var(--space-3); }
.mh-toc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.mh-toc summary::-webkit-details-marker { display: none; }
.mh-toc summary svg { width: 18px; height: 18px; transition: transform .15s ease; }
.mh-toc[open] summary svg { transform: rotate(180deg); }
.mh-toc ol { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: toc; }
.mh-toc li { counter-increment: toc; }
.mh-toc a { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; line-height: 21px; color: var(--ink) !important; text-decoration: none; border-top: 1px solid var(--line); }
.mh-toc a::before { content: counter(toc, decimal-leading-zero); font-size: 12px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 1px; }
.mh-toc a:hover { color: var(--brand) !important; }

/* ---------- FAQ accordion ---------- */
.mh-faq { border-top: 1px solid var(--line); }
.mh-faq__item { border-bottom: 1px solid var(--line); }
.mh-faq__item summary { list-style: none; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: 18px 0; cursor: pointer; font-size: 17px; line-height: 25px; font-weight: 600; color: var(--ink); }
.mh-faq__item summary::-webkit-details-marker { display: none; }
.mh-faq__item summary:hover { color: var(--brand); }
.mh-faq__icon { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); margin-top: -2px; }
.mh-faq__icon::before, .mh-faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .2s ease; }
.mh-faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.mh-faq__item[open] .mh-faq__icon { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.mh-faq__item[open] .mh-faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.mh-faq__answer { padding: 0 44px 20px 0; font-size: 16px; line-height: 26px; color: var(--ink-muted); }
.mh-faq__answer p { margin: 0; }
.mh-faq__answer p + p { margin-top: 10px; }
.mh-faq__answer a { color: var(--brand); font-weight: 500; }

/* ---------- Related blocks ---------- */
.mh-related { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.mh-related .mh-tool { padding: var(--space-4); }
@container site (min-width: 640px) { .mh-related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); } }
@container site (min-width: 900px) { .mh-related--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mh-block { margin-top: var(--space-7); }
.mh-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: var(--space-4); }
.mh-block__head h2 { font-size: 24px; line-height: 30px; margin: 0; }
@container site (min-width: 640px) { .mh-block__head h2 { font-size: 28px; line-height: 34px; } }

/* ---------- Author box ---------- */
.mh-author { display: flex; gap: var(--space-4); padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.mh-author h3 { font-family: var(--font-sans) !important; font-size: 16px !important; line-height: 22px !important; font-weight: 600 !important; margin: 0 !important; }
.mh-author p { margin: 6px 0 0; font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.mh-author .mh-caption { display: block; margin-top: 2px; }

/* ---------- Post navigation ---------- */
.mh-postnav { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.mh-postnav a { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4) var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); text-decoration: none; color: var(--ink) !important; }
.mh-postnav a:hover { border-color: var(--brand); }
.mh-postnav span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-subtle); }
.mh-postnav span svg { width: 14px; height: 14px; }
.mh-postnav strong { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 24px; }
.mh-postnav__next { text-align: right; align-items: flex-end; }
@container site (min-width: 640px) { .mh-postnav { grid-template-columns: 1fr 1fr; } }

/* ---------- Share row ---------- */
.mh-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mh-share > span { font-size: 13px; font-weight: 600; color: var(--ink-subtle); margin-right: 4px; }

/* ---------- Pagination ---------- */
.mh-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--space-7); flex-wrap: wrap; }
.mh-pagination a, .mh-pagination span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink) !important; border: 1px solid var(--line); background: var(--surface); }
.mh-pagination a:hover { border-color: var(--ink); }
.mh-pagination [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand) !important; }
.mh-pagination .mh-pagination__gap { border: 0; background: none; color: var(--ink-subtle) !important; min-width: 20px; }
.mh-pagination .mh-pagination__dir { display: inline-flex; gap: 6px; padding: 0 14px; }
.mh-pagination .mh-pagination__dir svg { width: 16px; height: 16px; }
.mh-pagination .is-disabled { opacity: .45; pointer-events: none; }
@container site (max-width: 479px) { .mh-pagination .mh-pagination__dir b { display: none; } .mh-pagination .mh-pagination__num-far { display: none; } }

/* ---------- Empty state ---------- */
.mh-empty { text-align: center; padding: var(--space-7) var(--space-4); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.mh-empty .mh-icontile { margin: 0 auto var(--space-4); background: var(--surface-sunk); color: var(--ink-muted); }
.mh-empty h2, .mh-empty h3 { font-size: 24px; line-height: 30px; margin: 0 0 8px; }
.mh-empty p { margin: 0 auto; max-width: 460px; color: var(--ink-muted); font-size: 16px; line-height: 25px; }
.mh-empty__actions { margin-top: var(--space-5); display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Newsletter ---------- */
.mh-newsletter { display: grid; gap: var(--space-5); padding: var(--space-6) var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.mh-newsletter h2 { font-size: 26px; line-height: 32px; margin: 0 0 8px; }
.mh-newsletter p { margin: 0; color: var(--ink-muted); font-size: 16px; line-height: 25px; }
.mh-newsletter form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.mh-newsletter .mh-input { flex: 1 1 220px; }
.mh-newsletter small { display: block; width: 100%; font-size: 13px; color: var(--ink-subtle); }
@container site (min-width: 900px) { .mh-newsletter { grid-template-columns: 1fr 1fr; align-items: center; padding: var(--space-7); gap: var(--space-7); } }

/* ---------- Forms (contact) ---------- */
.mh-form { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
.mh-form__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mh-form__actions small { font-size: 13px; color: var(--ink-subtle); }
.mh-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.mh-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
@container site (min-width: 640px) { .mh-form--2 { grid-template-columns: 1fr 1fr; } .mh-form--2 .mh-field--full, .mh-form--2 .mh-form__actions, .mh-form--2 .mh-alert, .mh-form--2 .mh-check { grid-column: 1 / -1; } }
.mh-contact { display: grid; gap: var(--space-6); }
.mh-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); }
.mh-infolist { list-style: none; margin: 0; padding: 0; }
.mh-infolist li { display: flex; gap: 14px; padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.mh-infolist li:first-child { border-top: 0; padding-top: 0; }
.mh-infolist strong { display: block; font-size: 15px; line-height: 21px; font-weight: 600; }
.mh-infolist span, .mh-infolist a { font-size: 15px; line-height: 23px; color: var(--ink-muted) !important; }
@container site (min-width: 900px) { .mh-contact { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-7); align-items: start; } .mh-panel { padding: var(--space-6); } }

/* ---------- About ---------- */
.mh-values { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.mh-value { padding: var(--space-5); border-top: 2px solid var(--ink); background: var(--surface); }
.mh-value h3 { font-size: 20px; line-height: 26px; margin: 12px 0 8px; }
.mh-value p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
@container site (min-width: 640px) { .mh-values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container site (min-width: 1180px) { .mh-values { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mh-split { display: grid; gap: var(--space-6); align-items: center; }
@container site (min-width: 900px) { .mh-split { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.mh-team { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.mh-person { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.mh-person strong { display: block; font-size: 16px; line-height: 22px; }
.mh-person p { margin: 6px 0 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
@container site (min-width: 900px) { .mh-team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Legal ---------- */
.mh-legal { display: grid; gap: var(--space-6); }
.mh-legal__nav { display: none; }
@container site (min-width: 1180px) {
  .mh-legal { grid-template-columns: 260px minmax(0, var(--measure)); gap: var(--space-8); }
  .mh-legal__nav { display: block; }
  .mh-legal__nav .mh-sticky { position: sticky; top: 24px; }
}
.mh-legal .mh-prose h2 { font-size: 22px; line-height: 28px; margin-top: 40px; }
.mh-legal .mh-prose { font-size: 16px; line-height: 27px; }
.mh-legal__updated { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 6px 14px; margin-top: var(--space-4); }
.mh-legal__updated svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- Footer ---------- */
.mh-footer { background: var(--surface-sunk); border-top: 1px solid var(--line); padding-top: var(--space-7); margin-top: 0; }
.mh-footer__grid { display: grid; gap: var(--space-6) var(--space-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mh-footer__brand { grid-column: 1 / -1; max-width: 360px; }
.mh-footer__brand p { margin: var(--space-4) 0 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.mh-footer h2 { font-family: var(--font-sans) !important; font-size: 13px !important; line-height: 18px !important; font-weight: 600 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--ink) !important; margin: 0 0 var(--space-3); }
.mh-footer ul { list-style: none; margin: 0; padding: 0; }
.mh-footer li a { display: inline-block; padding: 5px 0; font-size: 15px; line-height: 22px; color: var(--ink-muted) !important; text-decoration: none; }
.mh-footer li a:hover { color: var(--brand) !important; text-decoration: underline; text-underline-offset: 3px; }
.mh-footer__bottom { margin-top: var(--space-7); padding-block: var(--space-5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; font-size: 13px; line-height: 20px; color: var(--ink-subtle); }
.mh-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.mh-footer__legal a { color: var(--ink-subtle) !important; text-decoration: none; }
.mh-footer__legal a:hover { color: var(--ink) !important; text-decoration: underline; }
.mh-footer__disclaimer { font-size: 13px; line-height: 20px; color: var(--ink-subtle); margin-top: var(--space-4) !important; }
@container site (min-width: 640px) { .mh-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container site (min-width: 1180px) { .mh-footer { padding-top: var(--space-8); } .mh-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; } .mh-footer__brand { grid-column: auto; } }

/* TOC placement: inline above the article below 1180px, sticky in the sidebar above it */
.mh-content__side .mh-toc { display: none; }
@container site (min-width: 1180px) { .mh-toc-mobile { display: none; } .mh-content__side .mh-toc { display: block; } }

@container site (min-width: 640px) { .mh-toolgroup__head { flex-direction: row; align-items: baseline; } }
@container site (min-width: 1180px) { .mh-content--wide { grid-template-columns: minmax(0, 1fr) 340px; } .mh-related--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container site (max-width: 479px) { .mh-calc__head span:not(.mh-icontile):not(.mh-calc__units) { display: none; } }

/* ---------- Logo on dark & brand link ---------- */
[data-theme="dark"] .mh-logo__img { background: #ffffff; border-radius: var(--radius-sm); padding: 4px 8px; box-sizing: content-box; }
.mh-site a.mh-sitelink { color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.mh-site a.mh-sitelink:hover { color: var(--brand-strong); text-decoration-thickness: 2px; }
.mh-footer__bottom a.mh-sitelink, .mh-footer__brand a.mh-sitelink { color: var(--ink) !important; }


/* ---------- WordPress additions ---------- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.screen-reader-text:focus { position: static !important; width: auto; height: auto; clip: auto; }
.mh-prose img, .mh-prose .wp-block-image img { border-radius: var(--radius-md); height: auto; }
.mh-prose figure { margin: 32px 0 8px; }
.mh-prose figcaption, .mh-prose .wp-element-caption { margin-top: 10px; font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.mh-prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.mh-prose table th, .mh-prose table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mh-prose table th { background: var(--surface-sunk); font-size: 13px; color: var(--ink-muted); }
.mh-prose .wp-block-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.mh-prose .wp-block-quote { border-left: 2px solid var(--accent); padding-left: 20px; }
.mh-prose .alignwide, .mh-prose .alignfull { max-width: none; }
.mh-prose .aligncenter { margin-left: auto; margin-right: auto; }
.mh-media img { width: 100%; height: 100%; object-fit: cover; }
.mh-hero__feature .mh-media img, .mh-feature .mh-media img { height: 100%; }
.mh-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; }
.mh-pagination .mh-pagination__dir { display: inline-flex; align-items: center; gap: 6px; }
.mh-pagination .mh-pagination__dir svg { width: 16px; height: 16px; }
.mh-about-content > .mh-section:first-child { padding-top: var(--space-7); }
.admin-bar .mh-content__side .mh-sticky { top: 56px; }
.comment-list { list-style: none; padding: 0; }
.comment-respond input[type=text], .comment-respond input[type=email], .comment-respond input[type=url], .comment-respond textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); font: inherit; }
.comment-respond .submit { background: var(--brand); color: var(--on-brand); border: 0; border-radius: var(--radius-sm); min-height: 44px; padding: 0 20px; font-weight: 600; cursor: pointer; }
@media print { .mh-header, .mh-footer, .mh-content__side, .mh-toolpage__aside, .mh-block, .mh-result__actions, .mh-calc__actions { display: none !important; } }
.mh-icon--16 { width: 16px; height: 16px; }
