:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #8a8a8a;
  --line: #e6e6e6;
  --size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: var(--size);
  line-height: 1.4;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  padding: 18px 24px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 120ms ease;
}
a:hover { opacity: 0.5; }

header.site {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand nav rms";
  align-items: center;
  gap: 24px;
}
header.site .brand { grid-area: brand; justify-self: start; }
header.site nav.site { grid-area: nav; justify-self: center; }
header.site .rms-corner { grid-area: rms; justify-self: end; }

.brand {
  display: inline-block;
  font-weight: 400;
  font-size: var(--size);
}

nav.site {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: var(--size);
}
nav.site a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
nav.site a[aria-current="page"] { opacity: 0.5; }

.nav-icon {
  width: 18px;
  height: 18px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 0;
}

.page-body {
  max-width: 520px;
  width: 100%;
  text-align: left;
  font-size: var(--size);
}

.page-body h1 {
  font-size: var(--size);
  font-weight: 400;
  margin-bottom: 16px;
}

.page-body p { margin-bottom: 12px; }
.page-body p.muted { color: var(--muted); }

.embed-slot {
  margin-top: 24px;
  border: 1px solid var(--line);
  padding: 24px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

ul.links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

body.home {
  background-image: url("images/background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #ffffff;
}
body.home a { color: #ffffff; }

.rms-corner {
  display: block;
  line-height: 0;
}
.rms-corner img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.untitled-embed {
  display: block;
  width: 100%;
  margin-top: 24px;
  border: 0;
  border-radius: 24px;
}

.kit-link {
  display: block;
  margin-top: 16px;
  max-width: 540px;
}
.kit-cover {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.embed-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 32px;
  width: 100%;
  max-width: 540px;
}

.embed { width: 100%; }

.embed.youtube {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
}
.embed.youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.embed.instagram { min-width: 0; }
.embed.instagram .instagram-media {
  margin: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.back {
  position: fixed;
  top: 18px;
  left: 24px;
  font-size: var(--size);
}

footer.site {
  text-align: center;
  color: var(--muted);
  font-size: var(--size);
  padding-top: 24px;
}

@media (max-width: 640px) {
  header.site {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand rms"
      "nav   nav";
    row-gap: 12px;
    column-gap: 16px;
  }
  header.site nav.site { justify-self: start; }
  nav.site {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  nav.site a { font-size: 14px; }
  .nav-icon { width: 16px; height: 16px; }
  .rms-corner img { width: 16px; height: 16px; }
}
