:root {
  --mth-bg: var(--mth-light-background);
  --mth-surface: #ffffff;
  --mth-surface-soft: #f8fafc;
  --mth-line: rgba(23, 50, 77, 0.12);
  --mth-line-strong: rgba(23, 50, 77, 0.22);
  --mth-text: #17222f;
  --mth-text-muted: #617285;
  --mth-primary: var(--mth-light-primary);
  --mth-secondary: var(--mth-light-secondary);
  --mth-accent: var(--mth-light-accent);
  --mth-shadow: 0 20px 44px rgba(16, 33, 58, 0.08);
  --mth-radius: 28px;
  --mth-shell: min(1180px, calc(100vw - 32px));
}

html[data-theme="dark"],
body[data-theme="dark"] {
  --mth-bg: var(--mth-dark-background);
  --mth-surface: #101927;
  --mth-surface-soft: #131f30;
  --mth-line: rgba(147, 185, 239, 0.14);
  --mth-line-strong: rgba(147, 185, 239, 0.24);
  --mth-text: #eaf0f7;
  --mth-text-muted: #aab9cc;
  --mth-primary: var(--mth-dark-primary);
  --mth-secondary: var(--mth-dark-secondary);
  --mth-accent: var(--mth-dark-accent);
  --mth-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mth-bg);
  color: var(--mth-text);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mth-shell {
  width: var(--mth-shell);
  margin: 0 auto;
}

.mth-site-main {
  padding-bottom: 3rem;
}

.mth-skip-link {
  position: absolute;
  left: -9999px;
}

.mth-skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 99;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--mth-primary);
  color: #fff;
}

.mth-site-header {
  position: relative;
  z-index: 20;
  padding-top: 12px;
}

.mth-header-shell {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid var(--mth-line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--mth-shadow);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .mth-header-shell {
  background: rgba(16, 25, 39, 0.9);
}

.mth-branding {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mth-site-title {
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.mth-site-tagline {
  margin: 0;
  color: var(--mth-text-muted);
  font-size: 0.88rem;
}

.mth-primary-nav {
  justify-self: center;
}

.mth-nav-list,
.mth-footer-menu {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mth-nav-list a,
.mth-footer-menu a,
.mth-link {
  color: var(--mth-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mth-nav-list a:hover,
.mth-footer-menu a:hover,
.mth-link:hover {
  color: var(--mth-text);
}

.mth-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mth-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--mth-line);
  background: var(--mth-surface);
}

.mth-search-form input {
  width: 120px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--mth-text);
}

.mth-search-form button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--mth-primary);
  color: #fff;
  cursor: pointer;
}

.mth-language-native {
  position: relative;
  min-width: 122px;
}

.mth-language-select {
  width: 100%;
  min-height: 40px;
  padding: 0.6rem 2rem 0.6rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--mth-line);
  background: var(--mth-surface);
  color: var(--mth-text);
  appearance: none;
}

.mth-language-caret {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--mth-text-muted);
  border-bottom: 2px solid var(--mth-text-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.mth-theme-toggle {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mth-theme-toggle-track {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--mth-primary);
}

.mth-theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

html[data-theme="dark"] .mth-theme-toggle-thumb {
  transform: translateX(22px);
}

.mth-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.mth-menu-toggle span:not(.screen-reader-text) {
  width: 22px;
  height: 2px;
  background: var(--mth-text);
}

.mth-header-ad-shell {
  margin-top: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mth-header-ad-shell.is-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.mth-ad-slot {
  margin-top: 12px;
}

.mth-ad-placeholder,
.mth-ad-custom {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--mth-line-strong);
  background: rgba(255, 255, 255, 0.4);
  color: var(--mth-text-muted);
}

.mth-ad-placeholder span {
  display: block;
  margin-bottom: 6px;
  color: var(--mth-text);
  font-weight: 700;
}

.mth-section {
  padding: 2rem 0;
}

.mth-section.is-alt {
  background: rgba(255, 255, 255, 0.36);
}

html[data-theme="dark"] .mth-section.is-alt {
  background: rgba(255, 255, 255, 0.02);
}

.mth-home-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 2rem;
}

.mth-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(182, 109, 58, 0.12), transparent 34%), linear-gradient(180deg, rgba(255, 255, 255, 0.82), transparent);
  pointer-events: none;
}

.mth-home-hero-grid,
.mth-support-grid,
.mth-blog-home-grid,
.mth-single-grid,
.mth-page-hero {
  display: grid;
  gap: 20px;
}

.mth-home-hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
}

.mth-home-copy h1,
.mth-page-hero h1,
.mth-blog-masthead h1 {
  margin: 0.2rem 0 0.9rem;
  font-family: Georgia, serif;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.mth-home-copy h1 {
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  max-width: 12ch;
}

.mth-hero-body {
  max-width: 54ch;
  color: var(--mth-text-muted);
  font-size: 1.03rem;
}

.mth-home-visual img,
.mth-page-hero img {
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--mth-line);
  box-shadow: var(--mth-shadow);
  background: var(--mth-surface);
}

.mth-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.2rem;
}

.mth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--mth-primary);
  background: var(--mth-primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.mth-button.is-secondary {
  background: transparent;
  color: var(--mth-primary);
}

.mth-home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1.4rem;
}

.mth-stat-pill {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--mth-line);
  background: var(--mth-surface);
  box-shadow: 0 10px 24px rgba(18, 35, 64, 0.05);
}

.mth-stat-pill strong {
  display: block;
  font-size: 1.2rem;
}

.mth-stat-pill span {
  color: var(--mth-text-muted);
}

.mth-topic-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.mth-topic-bar a,
.mth-topic-bar button {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--mth-line);
  background: var(--mth-surface);
  color: var(--mth-text-muted);
  text-decoration: none;
  cursor: pointer;
}

.mth-topic-bar a:hover,
.mth-topic-bar button:hover,
.mth-topic-bar button.is-active {
  color: var(--mth-text);
  border-color: var(--mth-primary);
}

.mth-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.mth-tool-card,
.mth-blog-card,
.mth-stream-card,
.mth-surface,
.mth-editorial-lead,
.mth-faq-card {
  border-radius: 24px;
  border: 1px solid var(--mth-line);
  background: var(--mth-surface);
  box-shadow: var(--mth-shadow);
}

.mth-tool-card {
  overflow: hidden;
}

.mth-tool-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--mth-secondary);
}

.mth-tool-card-media img,
.mth-blog-card-media img,
.mth-stream-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mth-tool-card-copy,
.mth-blog-card-copy,
.mth-editorial-lead-copy,
.mth-surface {
  padding: 1rem;
}

.mth-tool-grid.is-compact .mth-tool-card-copy {
  padding: 0.9rem;
}

.mth-card-category,
.mth-post-meta {
  margin: 0 0 0.35rem;
  color: var(--mth-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mth-tool-card h3,
.mth-blog-card h3,
.mth-aside-article h3,
.mth-stream-card h3,
.mth-faq-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  line-height: 1.24;
}

.mth-card-meta,
.mth-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mth-chip,
.mth-keyword-list li {
  list-style: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--mth-secondary);
  color: var(--mth-text-muted);
  font-size: 0.78rem;
}

.mth-section-heading,
.mth-blog-masthead {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.mth-blog-card-grid,
.mth-trust-grid,
.mth-faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.mth-step-list,
.mth-related-list {
  padding-left: 18px;
  margin: 0;
  display: grid;
  gap: 10px;
}

.mth-blog-home-head {
  padding: 3rem 0 1.4rem;
}

.mth-blog-home-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: start;
}

.mth-editorial-lead {
  overflow: hidden;
}

.mth-editorial-lead-media {
  display: block;
}

.mth-editorial-lead-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.mth-editorial-lead-copy h2 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.mth-editorial-stream,
.mth-aside-list {
  display: grid;
  gap: 14px;
}

.mth-stream-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.mth-stream-card div {
  padding: 1rem;
}

.mth-page-shell,
.mth-archive-shell,
.mth-single-shell {
  padding: 2rem 0 3rem;
}

.mth-page-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: center;
  padding: 1.2rem 0 1.8rem;
}

.mth-page-hero.is-tool img,
.mth-page-hero.is-article img {
  max-width: 420px;
  justify-self: end;
}

.mth-single-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.mth-sidebar {
  display: grid;
  gap: 16px;
}

.mth-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--mth-text-muted);
  font-size: 0.9rem;
}

.mth-entry-content > *:first-child {
  margin-top: 0;
}

.mth-runtime-note,
.mth-form-status {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(182, 109, 58, 0.08);
  color: var(--mth-text);
}

.mth-runtime-note.is-error,
.mth-form-status.is-error {
  background: rgba(173, 67, 54, 0.12);
}

.mth-form-status.is-success {
  background: rgba(55, 140, 81, 0.12);
}

.mth-dropzone {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--mth-line-strong);
  background: var(--mth-surface-soft);
  cursor: pointer;
}

.mth-dropzone.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mth-dropzone.is-dragging {
  border-color: var(--mth-primary);
}

.mth-file-input {
  display: none;
}

.mth-drop-title {
  font-weight: 700;
}

.mth-drop-copy,
.mth-form-field small {
  color: var(--mth-text-muted);
}

.mth-tool-options {
  display: grid;
  gap: 14px;
  margin: 1rem 0;
}

.mth-form-field {
  display: grid;
  gap: 8px;
}

.mth-form-field input,
.mth-form-field select,
.mth-form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--mth-line);
  background: var(--mth-surface);
  color: var(--mth-text);
}

.mth-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 1rem 0 0.4rem;
}

.mth-progress-bar {
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 50, 77, 0.1);
}

.mth-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mth-primary);
  transition: width 0.2s ease;
}

.mth-inline-result {
  color: var(--mth-text-muted);
}

.mth-tool-demo-media img,
.mth-tool-demo-media video {
  width: 100%;
  border-radius: 18px;
}

.mth-site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--mth-line);
}

.mth-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.mth-footer-bottom {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--mth-line);
  color: var(--mth-text-muted);
}

.mth-empty-state {
  padding: 22px;
  border-radius: 20px;
  border: 1px dashed var(--mth-line-strong);
  background: rgba(255, 255, 255, 0.42);
  color: var(--mth-text-muted);
}

@media (max-width: 1100px) {
  .mth-home-hero-grid,
  .mth-support-grid,
  .mth-blog-home-grid,
  .mth-single-grid,
  .mth-page-hero,
  .mth-footer-grid {
    grid-template-columns: 1fr;
  }

  .mth-page-hero.is-tool img,
  .mth-page-hero.is-article img {
    justify-self: stretch;
    max-width: none;
  }

  .mth-section-heading,
  .mth-blog-masthead {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .mth-header-shell {
    grid-template-columns: auto auto;
  }

  .mth-primary-nav {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .mth-primary-nav.is-open {
    display: block;
  }

  .mth-nav-list {
    flex-direction: column;
  }

  .mth-menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .mth-header-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .mth-tool-grid,
  .mth-blog-card-grid,
  .mth-trust-grid,
  .mth-faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mth-tool-grid,
  .mth-blog-card-grid,
  .mth-trust-grid,
  .mth-faq-grid,
  .mth-stream-card {
    grid-template-columns: 1fr;
  }

  .mth-header-actions,
  .mth-hero-actions,
  .mth-home-stats {
    flex-direction: column;
    align-items: stretch;
  }

  .mth-search-form input {
    width: 100%;
  }
}
