.mto-home,
.mto-calc-page {
  overflow-x: clip;
}

.mto-home {
  padding-bottom: 28px;
}

.mto-home h1,
.mto-calc-page h1 {
  font-size: clamp(34px, 8vw, 58px);
  max-width: 16ch;
}

.mto-calc-page {
  padding-top: 28px;
  padding-bottom: 96px;
}

.mto-back {
  margin-bottom: 18px;
}

.mto-pills,
.mto-switch {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin: 8px 0 18px;
  padding-bottom: 2px;
}

.mto-pills::-webkit-scrollbar,
.mto-switch::-webkit-scrollbar {
  display: none;
}

.mto-pill,
.mto-switch a,
.mto-calc {
  min-height: 44px;
}

.mto-pill,
.mto-switch a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.mto-pill.is-active,
.mto-switch a.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--signal);
}

.mto-pill.is-active:hover,
.mto-switch a.is-active:hover {
  color: #fff;
}

.mto-category-copy {
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 62ch;
}

.mto-calc-list {
  display: grid;
  gap: 12px;
}

.mto-calc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
}

.mto-calc:hover {
  color: var(--ink);
  border-color: var(--green);
}

.mto-calc strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.mto-calc small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mto-calc > span:last-child {
  font-size: 20px;
  color: var(--green);
}

.mto-layout {
  display: grid;
  gap: 22px;
  margin-top: 8px;
}

.mto-inputs fieldset {
  margin-bottom: 8px;
}

.mto-inputs legend {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.mto-fields {
  display: grid;
  gap: 14px;
}

.mto-field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.mto-field label span {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.mto-field input,
.mto-field select {
  width: 100%;
  margin-top: 0;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
  border: 1px solid #b8beb3;
  border-radius: 2px;
}

.mto-hint,
.mto-error {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.mto-hint {
  color: var(--muted);
}

.mto-error {
  color: #762b20;
}

.mto-more {
  margin: 8px 0 16px;
  border-top: 1px solid var(--line);
}

.mto-more summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  list-style: none;
}

.mto-more summary::-webkit-details-marker {
  display: none;
}

.mto-more summary:after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
  font-weight: 400;
}

.mto-more[open] summary:after {
  content: "–";
}

.mto-more .mto-fields {
  padding-bottom: 8px;
}

.mto-actions {
  display: flex;
  margin-top: 8px;
}

.mto-actions .button {
  min-height: 48px;
  min-width: 120px;
}

.mto-results h2 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.mto-feature {
  display: grid;
  gap: 10px;
}

.mto-stat {
  background: var(--green);
  color: #fff;
  padding: 16px 16px 14px;
  border-radius: 2px;
  min-width: 0;
}

.mto-stat p {
  font-size: 13px;
  letter-spacing: 0.01em;
  color: #d7e4dc;
}

.mto-stat strong {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 8vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.mto-stat.is-order {
  background: #12352d;
  box-shadow: inset 4px 0 0 var(--signal);
}

.mto-secondary {
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px 14px;
}

.mto-secondary p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.mto-secondary p:last-child {
  border-bottom: 0;
}

.mto-secondary span {
  color: var(--muted);
}

.mto-secondary b {
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}

.mto-notes {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

.mto-notes li + li {
  margin-top: 6px;
}

.mto-waiting {
  margin: 0;
  padding: 14px;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
}

.mto-disclaimer {
  margin-top: 28px;
  max-width: 68ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mto-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #12352d;
  color: #fff;
  box-shadow: 0 -8px 24px #173f3524;
}

.mto-sticky span {
  font-size: 12px;
  color: #d7e4dc;
}

.mto-sticky strong {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-align: right;
}

@media (min-width: 760px) {
  .mto-fields {
    grid-template-columns: 1fr 1fr;
  }

  .mto-calc-list {
    grid-template-columns: 1fr 1fr;
  }

  .mto-sticky {
    display: none;
  }

  .mto-calc-page {
    padding-bottom: 64px;
  }
}

@media (min-width: 980px) {
  .mto-pills {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }

  .mto-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: start;
    gap: 36px;
  }

  .mto-results {
    position: sticky;
    top: 20px;
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .site-header nav {
    gap: 14px;
  }
}
