/* The one header and the one footer of usemastiff.com.
   Every page uses these classes: the main pages, the guides, the switching
   page and the 404 (app/root.tsx). The privacy route redirects to the app.
   The markup is SiteHeader and SiteFooter in
   app/components/mastiff-brand/site-frame.tsx; scripts/test-landing-route.mjs
   compares the header and footer across the site's pages.
   Selectors use two classes so page styles such as ".page a" do not win. */

/* Guides and the guide index set no body margin of their own. Without this
   rule the browser's 8px margin puts their header lower than on other pages. */
body {
  margin: 0;
}

.mf-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
.mf-top,
.mf-top *,
.mf-foot,
.mf-foot * {
  box-sizing: border-box;
}
.mf-top .mf-wrap,
.mf-foot .mf-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.mf-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.mf-top .mf-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 56px;
}
.mf-top .mf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.mf-top .mf-tagmark {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
.mf-top .mf-tagmark img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: block;
}
.mf-top .mf-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  align-self: stretch;
  font-weight: 500;
  font-size: 13.5px;
}
.mf-top .mf-nav a {
  display: flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}
.mf-top .mf-nav a:hover {
  color: var(--ink);
}
.mf-top .mf-nav a.on {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--accent);
}
.mf-top .mf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 11px 16px;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.mf-top a:focus-visible,
.mf-foot a:focus-visible,
.mf-lost a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Footer */
.mf-foot {
  margin-top: auto;
  width: 100%;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.mf-foot .mf-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.mf-foot .mf-cols b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 700;
}
.mf-foot .mf-cols a {
  display: block;
  min-height: 26px;
  margin: 2px 0;
  padding: 3px 0;
  color: var(--muted);
  text-decoration: none;
}
.mf-foot .mf-cols a:hover {
  color: var(--accent);
}
.mf-foot .mf-cols p {
  margin: 2px 0;
  padding: 3px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.mf-foot .mf-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 0;
  padding: 10px 0 20px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.mf-foot .motion-toggle {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

/* The 404 and error page body (app/root.tsx) */
.mf-lost {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 72px var(--gutter) 96px;
  box-sizing: border-box;
}
.mf-lost .mf-code {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.mf-lost h1 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-weight: var(--fw-head);
  letter-spacing: var(--ls-head);
  font-size: 30px;
  line-height: 1.15;
}
.mf-lost p {
  margin: 0;
  color: var(--muted);
}
.mf-lost .mf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.mf-lost .mf-row a {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 11px 16px;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid transparent;
  text-decoration: none;
}
.mf-lost .mf-row a + a {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

@media (max-width: 640px) {
  .mf-top .mf-wrap,
  .mf-foot .mf-wrap {
    padding: 0 16px;
  }
  .mf-top .mf-wrap {
    gap: 12px;
  }
  .mf-top .mf-nav {
    gap: 16px;
  }
  /* "Apps" in the menu opens the same page, so the button gives its room to the menu. */
  .mf-top .mf-btn {
    display: none;
  }
  .mf-foot .mf-cols {
    grid-template-columns: 1fr 1fr;
  }
  .mf-lost {
    padding: 44px 16px 64px;
  }
}
