:root {
  --accent: hsl(186, 100%, 33%);
  --accent-dark: hsl(186, 100%, 23%);
  --text: #111;
  --muted: #767676;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --serif: "Hoefler Text", Garamond, "Times New Roman", serif;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); font: 1.125rem/1.8 var(--serif); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4, .site-header, .site-footer, table { font-family: var(--sans); }

/* Header: logo beside a stacked title and menu, lined up with the old theme's column on wider screens */
.site-header { padding: 1rem 1.25rem; }
.site-branding { display: flex; align-items: flex-start; gap: 0.75rem; }
.site-branding-text { min-width: 0; }
.site-logo img { display: block; border-radius: 50%; background: #fff; }
.site-title { font-size: 1.25rem; color: inherit; text-decoration: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.main-menu { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.25rem !important; }
.main-menu > li { position: relative; }
.site-nav a { font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; }
.sub-menu { display: none; position: absolute; z-index: 10; background: var(--accent); padding: 0.5rem 1rem !important; min-width: 14rem; }
.sub-menu a { color: #fff; font-size: 1.125rem; }
.main-menu > li:hover .sub-menu, .main-menu > li:focus-within .sub-menu { display: block; }

.page-header h1 { font-size: 2rem; line-height: 1.2; margin: 1.5rem 0 0; overflow-wrap: break-word; }
.page-header h1::before { content: ""; display: block; width: 1em; height: 2px; margin: 1rem 0; background: var(--muted); }

/*
 * Home banner: the old theme's (Twenty Nineteen) featured-image filters with its custom color,
 * hsl(186, 100%, 33%). The photo is grayscale, tinted by a screen layer and a multiply layer,
 * lifted by a light overlay, then darkened a little for readable text.
 */
.site-banner { display: none; }
.home .site-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 90vh;
  padding-bottom: 3rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.home .site-banner,
.home .site-banner-image,
.home .site-banner::before,
.home .site-banner::after,
.home .site-branding-container::after,
.home .site-header::after { position: absolute; inset: 0; content: ""; display: block; }
.home .site-banner { z-index: 0; }
.home .site-banner-image { z-index: 1; background: url("/assets/images/header.jpeg") center / cover; filter: grayscale(100%); }
.home .site-banner::before { z-index: 2; background: var(--accent); mix-blend-mode: screen; opacity: 0.1; }
.home .site-banner::after { z-index: 3; background: var(--accent); mix-blend-mode: multiply; }
.home .site-branding-container::after { z-index: 4; background: rgba(255, 255, 255, 0.35); mix-blend-mode: overlay; opacity: 0.5; }
.home .site-header::after { z-index: 5; background: #000e14; opacity: 0.38; }
.home .site-branding, .home .page-header { position: relative; z-index: 6; }
.home .site-title, .home .site-nav > ul > li > a { color: #fff; }
.home .page-header h1 { font-size: 2.25rem; }
.home .page-header h1::before { background: #fff; }

.content { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.content table { width: 100%; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid #ccc; padding: 0.5em; text-align: left; }
.content img { max-width: 100%; height: auto; }

.button { display: inline-block; background: var(--accent); color: #fff; font: 700 1.125rem var(--sans); padding: 0.75rem 1.25rem; border-radius: 5px; text-decoration: none; }
.button:hover { background: var(--accent-dark); color: #fff; }

.site-footer { color: var(--muted); font-size: 0.9rem; padding: 2rem 1.25rem; max-width: 46rem; margin: 0 auto; }

@media (min-width: 768px) {
  .site-header { padding: 3rem 0 1.5rem; }
  .site-branding, .page-header { margin: 0 calc(10% + 60px); }
  .site-branding { position: relative; }
  .content, .site-footer { margin: 0 calc(10% + 60px); padding-left: 0; padding-right: 0; }
  .site-logo { position: absolute; right: calc(100% + 1.25rem); top: -0.25rem; }
  .page-header h1 { font-size: 2.25rem; }
  .home .site-header { min-height: 100vh; padding-bottom: 5rem; }
  .home .site-header::after { opacity: 0.18; }
  .home .page-header h1 { font-size: 3rem; }
}

/* Phones: logo above the title, as on the old site; the Fit Guide page links its three guides */
@media (max-width: 767px) {
  .site-branding { flex-direction: column; }
  .sub-menu { display: none !important; }
}

@media (max-width: 600px) {
  .page-header h1 { font-size: 1.75rem; }
}
