/* The website (scancomps.com): landing page and help pages. Colors, type
   and the brand come from style.css; this adds page layout only. */
body.site {
  min-height: 100vh;
  line-height: 1.5;
}
.site a {
  color: inherit;
}
/* The app's main is a flex row; pages here flow top to bottom. */
.site main:not(.docs) {
  display: block;
}
.site main,
.site-header,
.site-footer {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
}
.site h1,
.site h2 {
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
.site h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
.site p {
  margin: 0;
}

/* Header: brand, the site's sections in one framed row, then the app. Where
   the page is (or which section is on screen) gets a lime mark. */
.site-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}
.site-header .brand {
  text-decoration: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.875rem;
}
.site-nav a:not(.site-button) {
  position: relative;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}
.site-nav a:not(.site-button):hover {
  color: var(--text);
  background: var(--raised);
}
.site-nav a[aria-current] {
  color: var(--text);
  background: var(--raised);
}
.site-nav a[aria-current]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}
.site-nav .nav-app {
  display: none;
}
.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  cursor: pointer;
}
/* Two lines that turn into a cross while the menu is open. */
.menu-lines,
.menu-lines::before {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    translate 0.2s ease;
}
.menu-lines {
  translate: 0 -3px;
}
.menu-lines::before {
  content: "";
  translate: 0 6px;
}
.menu-open .menu-lines {
  translate: 0 0;
  transform: rotate(45deg);
}
.menu-open .menu-lines::before {
  translate: 0 0;
  transform: rotate(-90deg);
}
.menu-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
/* Phones, with scripts: the links fold into a menu under the header. */
@media (max-width: 760px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }
  .js .menu-button {
    display: block;
  }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 20px;
    border-radius: 0;
    background: var(--bg);
    box-shadow:
      0 1px 0 var(--line),
      0 24px 40px rgb(0 0 0 / 0.5);
    font-size: 1.0625rem;
  }
  .js .menu-open .site-nav {
    display: flex;
    animation: menu-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .js .site-nav a:not(.site-button) {
    display: flex;
    justify-content: space-between;
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    background: none;
  }
  .js .site-nav a:not(.site-button)::after {
    content: "→";
    position: static;
    height: auto;
    background: none;
    color: var(--faint);
  }
  .js .site-nav a[aria-current]::after {
    color: var(--accent);
  }
  .js .site-nav .nav-app {
    display: inline-flex;
    margin-top: 16px;
  }
  .header-actions .site-button {
    min-height: 40px;
  }
}
@keyframes menu-in {
  from {
    opacity: 0;
    translate: 0 -8px;
  }
}

.site-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--on-accent) !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--glow);
  transition: transform 0.15s ease;
}
.site-button:active {
  transform: scale(0.97);
}
.site-button.secondary {
  background: var(--surface);
  color: var(--text) !important;
  box-shadow: inset 0 0 0 1px var(--line);
}
.site-button.small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  box-shadow: none;
}
.site-button:focus-visible,
.site a:focus-visible,
.site summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Footer: the brand and the app, then games, help and ScanComps links; the
   year and the trademark line underneath. */
.site-footer {
  margin-top: 96px;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.875rem;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.footer-brand .brand {
  color: var(--text);
  text-decoration: none;
}
.footer-brand p {
  max-width: 30ch;
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.footer-title {
  margin-bottom: 4px !important;
  color: var(--text);
  font-weight: 700;
}
.site-footer nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer nav a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.footer-bottom p:last-child {
  max-width: 70ch;
  text-align: right;
}
@media (max-width: 760px) {
  .site-footer {
    margin-top: 64px;
    padding-top: 36px;
  }
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
  .footer-bottom p:last-child {
    text-align: left;
  }
}

/* Home page layout lives in home.css. */
.doc a {
  color: var(--accent);
}

/* Help pages */
.docs {
  display: grid;
  grid-template-columns: 200px minmax(0, 720px);
  gap: 56px;
  padding: 32px 0 0;
}
.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 24px;
  align-self: start;
}
.docs-nav a {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  text-decoration: none;
}
.docs-nav a:hover {
  color: var(--text);
}
.docs-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.doc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.doc h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin-bottom: 4px;
}
.doc h2 {
  font-size: 1.5rem;
  margin-top: 24px;
}
.doc p,
.doc li {
  color: var(--muted);
}
.doc strong {
  color: var(--text);
}
.doc ol,
.doc ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-cards {
  list-style: none;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px !important;
}
.doc-cards a {
  display: block;
  height: 100%;
  padding: 20px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
}
.doc-cards a:hover {
  border-color: var(--accent);
}
.doc-cards strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.0625rem;
}
.doc .next {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .docs {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 8px;
  }
  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 560px) {
  .doc-cards {
    grid-template-columns: 1fr;
  }
}
