/* Page-specific styles layered on top of https://tools.dryan.tech/theme.css.
   The hero keeps its original gradient; everything else uses theme tokens
   and components (.card, .cards, .button, .stack, .full-bleed(--contained)). */

.hero {
  gap: var(--size-3);
  padding-block: var(--size-8);
  color: white;
  text-align: center;
  background: linear-gradient(
    135deg,
    color-mix(in oklch, #667eea, Canvas 20%) 0%,
    color-mix(in oklch, #764ba2, Canvas 20%) 100%
  );
}

.hero h1 {
  /* "@prideraiser/flags" has no spaces to wrap at, so it needs to shrink
     to fit narrow screens instead of overflowing the column. */
  font-size: clamp(1.5rem, 5vw + 0.5rem, var(--font-size-7));
  font-weight: var(--font-weight-8);
}

.hero .subtitle {
  font-size: var(--font-size-4);
  font-weight: var(--font-weight-3);
}

.hero a {
  color: inherit;
  text-underline-offset: 2px;
}

main {
  padding-block: var(--size-6) var(--size-8);
}

/* Without an explicit (shrinkable) column, a long unwrapped line in a <pre>
   forces main/.stack's implicit grid track wider than the page itself
   instead of letting the <pre> scroll internally. */
main,
.stack {
  grid-template-columns: minmax(0, 1fr);
}

main > * {
  min-inline-size: 0;
}

.example {
  text-align: start;
}

.table-wrap {
  overflow-x: auto;
}

.period-info {
  margin-block-start: var(--size-3);
  font-style: italic;
  color: var(--text-2);
}

footer p {
  margin: 0;
}

#flags-grid pride-flag {
  display: block;
  inline-size: 100%;
}

#flags-grid p {
  font-size: var(--font-size-1);
  color: var(--text-2);
}

.copy-button {
  display: block;
  inline-size: 100%;
  text-align: start;
}

.copy-button code {
  color: var(--text-1);
  background: none;
}

.copy-button.copied {
  color: white;
  background-color: var(--ok);
  border-color: var(--ok);
}

.copy-button.copied code {
  color: inherit;
}

.copy-button.copied code::after {
  font-family: var(--font-sans);
  content: " ✓ Copied!";
}

@media (width <= 768px) {
  .hero {
    padding-block: var(--size-6);
  }

  .hero .subtitle {
    font-size: var(--font-size-2);
  }

  .copy-button code {
    word-break: break-all;
  }
}

@media (width <= 480px) {
  .hero .subtitle {
    font-size: var(--font-size-1);
  }
}
