.moonshot-card {
  box-sizing: border-box;
  padding: 1.5rem;
  border: 1px solid var(--moonshot-border, #f1f5f9);
  border-radius: 1rem;
  background-color: var(--moonshot-surface, #fff);
  box-shadow: 0 2px 8px rgb(15 23 42 / 2%);
}

.moonshot-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  max-width: 100%;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.moonshot-button--primary {
  color: var(--moonshot-on-primary, #fff);
  background-color: var(--moonshot-primary, #148759);
  box-shadow: 0 4px 6px rgb(20 135 89 / 20%);
}

.moonshot-button--primary:hover:enabled,
a.moonshot-button--primary:hover {
  background-color: var(--moonshot-primary-hover, #106b47);
}

.moonshot-button--secondary {
  color: var(--moonshot-button-secondary-text, #334155);
  background-color: var(--moonshot-surface, #fff);
  border-color: var(--moonshot-button-border, #e2e8f0);
  font-weight: 500;
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}

.moonshot-button--secondary:hover:enabled,
a.moonshot-button--secondary:hover {
  background-color: var(--moonshot-button-secondary-hover, #f8fafc);
}

.moonshot-button:focus-visible {
  outline: 2px solid var(--moonshot-primary, #148759);
  outline-offset: 2px;
}

.moonshot-button:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (min-width: 40rem) {
  .moonshot-button { min-height: 3rem; }
}

/* Layer the layout so a consumer's utilities can override page typography and spacing. */
@layer components {
  .moonshot-page { --moonshot-gutter: 1rem; padding: var(--moonshot-gutter); height: 100%; box-sizing: border-box; }
  .moonshot-page__inner { width: 100%; max-width: 80rem; height: 100%; margin-inline: auto; }
  .moonshot-page__inner > :where(:not(:last-child)) { margin-block-end: 1.5rem; }
  .moonshot-page__header { display: flex; flex-direction: column; gap: 1rem; }
  .moonshot-page__header--sticky {
    position: sticky; top: 0; z-index: 20;
    margin-inline: calc(-1 * var(--moonshot-gutter)); padding: .75rem var(--moonshot-gutter);
    background: color-mix(in srgb, var(--moonshot-canvas, #fafaf9) 95%, transparent);
    backdrop-filter: blur(8px);
  }
  .moonshot-page__breadcrumbs, .moonshot-page__search-row { display: flex; align-items: center; gap: .5rem; }
  .moonshot-page__breadcrumbs { color: var(--moonshot-muted, #586d66); font-size: .875rem; font-weight: 500; }
  .moonshot-page__breadcrumbs a { color: var(--moonshot-link, #0f6a44); text-decoration: none; }
  .moonshot-page__row { display: flex; width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
  .moonshot-page__heading { display: flex; order: 1; min-width: 0; flex-grow: 1; align-items: center; gap: .75rem; }
  .moonshot-page__heading h1 { margin: 0; color: var(--moonshot-ink, #142e26); font-size: 1.5rem; font-weight: 700; line-height: 1.25; letter-spacing: -.025em; }
  .moonshot-page__subtitle { margin: 0; color: var(--moonshot-muted, #586d66); font-size: .875rem; line-height: 1.625; }
  .moonshot-page__actions { order: 2; display: flex; align-items: center; flex-wrap: wrap; flex-shrink: 0; gap: .75rem; }
  .moonshot-page__actions--new-row { flex-basis: 100%; padding-top: .25rem; gap: .5rem; }
  .moonshot-page__search, .moonshot-page__extra { flex-basis: 100%; padding-top: .25rem; }
  .moonshot-page__search { order: 3; }
  .moonshot-page__extra { order: 4; }
  .moonshot-page__field { position: relative; flex-grow: 1; }
  .moonshot-page__field svg { position: absolute; top: 50%; inset-inline-start: 1rem; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
  .moonshot-page__field input[type="text"] {
    box-sizing: border-box; width: 100%; height: 2.5rem; padding-inline: 2.25rem .75rem;
    color: var(--moonshot-ink, #142e26); border: 1px solid var(--moonshot-field-border, #d7e2dd);
    background: var(--moonshot-surface, white); border-radius: .5rem; font: inherit; font-size: .875rem;
  }
  .moonshot-page__field input:focus-visible, .moonshot-page__back:focus-visible { outline: 2px solid var(--moonshot-primary, #148759); outline-offset: 2px; }
  .moonshot-page__back, .moonshot-page__reset { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
  .moonshot-page__back { flex-shrink: 0; width: 2rem; height: 2rem; box-sizing: border-box; border-radius: .5rem; border: 1px solid var(--moonshot-field-border, #d7e2dd); background: var(--moonshot-surface, white); color: var(--moonshot-muted, #586d66); }
  .moonshot-page__back:hover { background: #eaf3ee; color: #104c3b; }
  .moonshot-page__reset { height: 2.25rem; padding-inline: .5rem; font-size: .75rem; font-weight: 600; color: #006caf; }
  @media (min-width: 40rem) {
    .moonshot-page { --moonshot-gutter: 1.5rem; }
    .moonshot-page__heading h1 { font-size: 1.875rem; }
    .moonshot-page__subtitle { font-size: 1rem; }
  }
  @media (min-width: 48rem) {
    .moonshot-page__row { flex-wrap: nowrap; gap: 1.25rem; }
    .moonshot-page__heading { flex-grow: 0; }
    .moonshot-page__search, .moonshot-page__extra, .moonshot-page__actions--new-row { flex-basis: auto; padding-top: 0; }
    .moonshot-page__search { order: 2; flex-grow: 1; }
    .moonshot-page__actions { order: 3; justify-content: flex-end; }
  }
  @media (min-width: 64rem) { .moonshot-page { --moonshot-gutter: 2rem; } }
}
