/* The shop's own pages: the header and footer,
   accounts, My designs, share links, and the age question. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding: 1.25rem 1.5rem;
}

.wordmark {
  margin-right: auto;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  font-weight: 700;
}
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* button_to forms that should look like links (Sign out). */
.link-button {
  appearance: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

.button.secondary {
  color: var(--plum);
  background: var(--card-strong);
  box-shadow: inset 0 0 0 2px var(--line-strong);
}
.button.secondary:hover { background: var(--white); }
.button.small { padding: 0.45rem 1.1rem; }
a.button { display: inline-block; text-decoration: none; }

.flash {
  max-width: 40rem;
  margin: 0 auto 1rem;
  padding: 0.7rem 1.1rem;
  font-weight: 600;
  text-align: center;
  background: var(--card-strong);
  border-radius: 1rem;
}
.flash.is-alert { color: var(--alert); }

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 4rem 1.5rem 2rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* The front page. */
.hero {
  max-width: 40rem;
  margin: 8vh auto 0;
  padding: 0 1.5rem;
  text-align: center;
}
.hero h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
.hero p {
  margin-top: 1.25rem;
  font-size: 1.1rem;
}
.hero .note {
  font-size: 0.95rem;
  opacity: 0.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem !important;
}

/* Signing in and up, passwords. */
.auth {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 26rem;
  margin: 4vh auto 0;
  padding: 0 1.5rem;
}
.auth h1 { font-size: 2.2rem; }
.auth .lede { margin-top: -0.5rem; opacity: 0.8; }
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-form .field { font-size: 0.95rem; }
.auth-form .field small { font-weight: 500; opacity: 0.75; }
.auth-form .button { align-self: flex-start; }
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 600;
}
.check input {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--plum);
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
}
.form-errors {
  padding: 0.8rem 1.1rem;
  color: var(--alert);
  font-weight: 600;
  background: var(--card-strong);
  border-radius: 1rem;
}
.form-errors ul { padding-left: 1.2rem; font-weight: 500; }

/* Pages with a heading and content: My designs, a shared design, the policies. */
.page {
  width: 100%;
  max-width: 60rem;
  margin: 2vh auto 0;
  padding: 0 1.5rem;
}
.page h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.empty { font-size: 1.1rem; }
.meta {
  font-size: 0.9rem;
  opacity: 0.75;
}

.design-list {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}
.design-card {
  display: grid;
  grid-template-columns: minmax(0, 22rem) 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  background: var(--card);
  border-radius: 1.25rem;
}
.design-preview canvas,
.shared-side canvas {
  display: block;
  width: 100%;
  border-radius: 0.6rem;
}
.design-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.design-info h2 {
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}
.design-info h2 a { text-decoration: none; }
.design-info h2 a:hover { text-decoration: underline; }
.design-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
}
.design-actions form { display: inline; }
a.tool { display: inline-block; text-decoration: none; }

/* <details> that open a small form in place (Rename, Delete). */
.popover summary { list-style: none; }
.popover summary::-webkit-details-marker { display: none; }
.popover[open] summary { color: var(--on-button); background: var(--button); }
.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.inline-form input[type="text"] { padding: 0.45rem 0.9rem; }

.share-link {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.share-link label { display: flex; flex: 1; flex-direction: column; gap: 0.25rem; min-width: 14rem; }
.share-link input { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

.shared-design { display: flex; flex-direction: column; gap: 1rem; }
.shared-side figcaption {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.prose { max-width: 42rem; }
.prose h2 { margin-top: 1.75rem; font-size: 1.3rem; }
.prose p,
.prose ul { margin-top: 0.75rem; }

/* The age question (AgeGate), over the whole page. */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.1rem;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 1.5rem;
  color: var(--plum);
  text-align: center;
  background: rgb(255 228 239 / 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0;
}
.age-gate h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; }
.age-gate p { max-width: 26rem; }
.age-gate-leave { font-size: 0.95rem; opacity: 0.75; }
.behind-gate { display: contents; }

@media (max-width: 40rem) {
  .design-card { grid-template-columns: 1fr; }
}
