/* sub-page chrome — the shared header, breadcrumb trail and footer.
   Used by the RAM Folder sub-pages (help center, macOS RAM Disks Guide,
   privacy policy, and the app page's own footer). Linked before each page's
   own stylesheet, so a page can still override anything here.

   Uses --container-wide (declared below): the site home's column, which the
   footer keeps instead of a page's narrower article column. Pages set
   --container-pad (the horizontal padding of their content column) and
   --container-pad-narrow (its phone value) in their :root; pages that define
   the site home's --sp keep the footer's responsive padding.

   Markup:
   .header-inner > .header-studio + .header-content
     (.header-content > .header-app + .header-label)
   nav.crumbs (aria-label="Breadcrumb") below the header
   footer.footer > .container > .footer-brand + .footer-rule + .footer-bottom */

:root {
  /* The site home's column — wide enough that the footer's brand, copyright
     and links line up across every RAM Folder page. */
  --container-wide: 1180px;
}

.header-inner {
  position: relative;
  height: 64px;
}

.header-studio {
  position: absolute;
  left: var(--container-pad, 32px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-content {
  position: relative;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--container-pad, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-app {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0px;
  color: inherit;
  text-decoration: none;
}

.header-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.mono {
  font-family: var(--font-mono);
}

@media (max-width: 1150px) {
  .header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 var(--container-pad, 32px);
  }

  .header-studio {
    position: static;
    transform: none;
  }

  .header-content {
    flex: 1 1 0%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
}

@media (max-width: 720px) {
  .header-inner {
    padding: 0 var(--container-pad-narrow, 22px);
  }

  .header-studio img {
    height: 32px;
  }

  /* No room left between the app link and the header title on phones. */
  .header-label {
    display: none;
  }
}

/* Breadcrumb trail; each page sets its own margins around it. The trail is
   muted end to end — underline included — whichever way a page styles its own
   content links (accent underline, ink <strong>). The nav.crumbs prefix keeps
   these rules above page-level selectors such as `main a` or `main strong`. */
nav.crumbs {
  font-size: 13px;
  color: var(--muted);
}

nav.crumbs a,
nav.crumbs a:link,
nav.crumbs a:visited,
nav.crumbs a:hover,
nav.crumbs a:active {
  color: var(--muted);
  text-decoration: underline;
  border-bottom: 0;
}

nav.crumbs strong {
  color: var(--muted);
  font-weight: 600;
}

nav.crumbs span {
  margin: 0 6px;
}

nav.crumbs span:last-child {
  margin-left: 0;
}

/* Footer — same markup/styling as the site home. It also keeps the site home's
   wider column instead of the page's narrower article column. Pages that
   define the home page's --sp keep its responsive padding; the rest get the
   1x value. */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding-top: calc(72px * var(--sp, 1));
  padding-bottom: 40px;
}

.footer > .container {
  max-width: var(--container-wide);
}

.footer-brand {
  max-width: none;
}

/* Logo and Trustpilot review collector share one row: the widget sits at the
   right edge, vertically centred on the logo. */
.footer-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  display: inline-block;
}

.footer-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.footer-tagline {
  margin-top: 14px;
  max-width: 320px;
  font-size: 14.5px;
  color: color-mix(in oklab, var(--paper) 62%, transparent);
  line-height: 1.55;
}

.footer .trustpilot-widget {
  flex: 0 1 420px;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
  overflow: hidden;
}

/* The TrustBox runs inside a cross-origin iframe, so #tp-widget-wrapper in
   that frame cannot be reached from this stylesheet. The rule below states
   the intended offset; the iframe is shifted by the same amount instead,
   with the widget container clipping the overflow. */
#tp-widget-wrapper {
  position: relative !important;
  left: 102px !important;
}

.footer .trustpilot-widget iframe {
  position: relative !important;
  left: 102px !important;
}

@media (max-width: 640px) {
  .footer-brand-row {
    align-items: flex-start;
  }

  .footer .trustpilot-widget {
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }

  .footer .trustpilot-widget iframe {
    left: 0 !important;
  }
}

.footer-rule {
  height: 1px;
  background: color-mix(in oklab, var(--paper) 14%, transparent);
  margin: 48px 0px 24px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: color-mix(in oklab, var(--paper) 50%, transparent);
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Footer links keep the footer's own colors in every state: pages style their
   own `a:hover` (e.g. the app page turns links blue on hover), so the states
   have to be pinned here too. */
.footer a,
.footer a:visited,
.footer a:hover,
.footer a:active {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.footer-nav a {
  text-decoration: underline;
}
