Skip to content

The Open Standard for Generative UI

7.7 KB
Raw Blame
.page {
  min-height: 100vh;
  background: var(--openui-foreground);
  color: var(--openui-text-neutral-primary);
}

[data-theme="dark"] .page {
  background: #000;
}

.directorySection,
.submitSection {
  max-width: var(--home-container-max);
  margin-inline: auto;
}

.cardLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  border-radius: var(--openui-radius-full, 999px);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.cardLink:hover {
  border-color: var(--openui-border-interactive, var(--openui-text-neutral-primary));
  box-shadow: var(--openui-shadow-m);
}

.actionIcon,
.linkIcon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.contentSection {
  position: relative;
  background: linear-gradient(
    to bottom,
    var(--openui-foreground),
    var(--openui-background) 10rem,
    var(--openui-background) calc(100% - 10rem),
    var(--openui-foreground)
  );
}

[data-theme="dark"] .contentSection {
  background: linear-gradient(
    to bottom,
    #000,
    var(--swatch-neutral-950) 28rem,
    var(--swatch-neutral-950) calc(100% - 28rem),
    #000
  );
}

.directorySection {
  padding: 5rem var(--home-section-padding-inline, 1.25rem) 5rem;
}

.sectionHeader {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sectionTitle {
  margin: 0.125rem 0 0;
  font-family: var(--home-font-display);
  font-size: var(--home-title-size);
  font-weight: var(--home-title-weight);
  letter-spacing: var(--home-title-tracking);
  line-height: var(--home-title-leading);
}

.sectionDescription {
  margin: 0;
  color: var(--openui-text-neutral-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-align: right;
  justify-self: end;
}

/* Mobile: center the section header (title + count) to match the centered hero,
   instead of the count floating to the right. */
@media (max-width: 767px) {
  .sectionHeader {
    justify-items: center;
    text-align: center;
  }

  .sectionDescription {
    justify-self: center;
    text-align: center;
  }

  /* Center the submit CTAs (already a matched 320px pair) and add space above them. */
  .submitActions {
    justify-content: center;
    margin-top: 2rem;
  }
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  --card-accent: var(--openui-text-neutral-primary);
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  border: 1px solid var(--home-hairline);
  border-radius: var(--openui-radius-4xl);
  padding: 1.25rem;
  background: var(--openui-foreground);
  box-shadow: var(--home-card-lift);
}

.card[data-accent="blue"] {
  --card-accent: #2563eb;
}

.card[data-accent="green"] {
  --card-accent: #059669;
}

.card[data-accent="purple"] {
  --card-accent: #7c3aed;
}

.card[data-accent="orange"] {
  --card-accent: #ea580c;
}

.card[data-accent="slate"] {
  --card-accent: #475569;
}

/* The accent hexes above are tuned for light cards. Lighten/desaturate them in
   dark mode so the type-tag text + tint read on the dark card surface. */
[data-theme="dark"] .card[data-accent="blue"] {
  --card-accent: #60a5fa;
}

[data-theme="dark"] .card[data-accent="green"] {
  --card-accent: #34d399;
}

[data-theme="dark"] .card[data-accent="purple"] {
  --card-accent: #a78bfa;
}

[data-theme="dark"] .card[data-accent="orange"] {
  --card-accent: #fb923c;
}

[data-theme="dark"] .card[data-accent="slate"] {
  --card-accent: #94a3b8;
}

.cardHeader {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.cardHeaderContent {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.typeTag {
  display: inline-flex;
  height: 1.375rem;
  align-items: center;
  gap: 0.3rem;
  border-radius: 7px;
  padding-inline: 0.5rem;
  background: color-mix(in srgb, var(--card-accent) 14%, transparent);
  color: var(--card-accent);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.statusMeta {
  display: inline-flex;
  align-items: center;
  color: var(--openui-text-neutral-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.cardTitle {
  margin: 0;
  font-family: var(--home-font-display);
  font-size: var(--home-heading-size);
  /* Fixed at the desktop heading weight so the card title stays medium on mobile
     instead of dropping to the token's 400. */
  font-weight: 500;
  letter-spacing: var(--home-heading-tracking);
  line-height: var(--home-heading-leading);
}

.cardDescription {
  margin: 1.75rem 0 0;
  color: var(--openui-text-neutral-secondary);
  font-family: var(--home-font-text);
  font-size: var(--home-body-size);
  font-weight: var(--home-body-weight);
  line-height: 1.65;
}

.cardLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.5rem;
}

.cardLink {
  min-height: 1.75rem;
  /* Equal padding on the top, right and bottom so the hover arrow-circle sits
     evenly inset (mirrors the BevelButton badge); roomier on the left for the label. */
  padding: 0.25rem 0.25rem 0.25rem 0.875rem;
  border: 1px solid var(--openui-border-default);
  background: var(--openui-foreground);
  box-shadow: var(--openui-shadow-s);
  color: var(--openui-text-neutral-primary);
  font-size: 0.875rem;
  font-weight: 500;
}

/* The arrow is revealed on hover inside a contrast-filled circle (dark circle /
   light icon in light mode, inverted in dark). Hidden by collapsing its width. */
.cardLinkArrow {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 0;
  height: 1.25rem;
  padding: 0;
  border-radius: 999px;
  background: var(--openui-text-neutral-primary);
  color: var(--openui-background);
  opacity: 0;
  overflow: hidden;
  transition:
    width 0.18s ease,
    padding 0.18s ease,
    opacity 0.18s ease;
}

.cardLink:hover .cardLinkArrow {
  width: 1.25rem;
  padding: 0.25rem;
  opacity: 1;
}

.submitSection {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 2rem;
  padding: 4rem var(--home-section-padding-inline, 1.25rem) 6rem;
}

.submitCopy {
  max-width: 42rem;
}

.submitDescription {
  margin: 0.75rem 0 0;
  color: var(--openui-text-neutral-secondary);
  font-family: var(--home-font-text);
  font-size: var(--home-lead-size);
  font-weight: var(--home-lead-weight);
  line-height: 1.6;
}

.submitSteps {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: submit-step;
}

.submitSteps li {
  position: relative;
  margin-top: 0.625rem;
  padding-inline-start: 2rem;
  color: var(--openui-text-neutral-primary);
  font-size: 0.9375rem;
  line-height: 1.5;
  counter-increment: submit-step;
}

.submitSteps li:first-child {
  margin-top: 0;
}

.submitSteps li::before {
  content: counter(submit-step);
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  width: 1.375rem;
  height: 1.375rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--openui-border-default);
  border-radius: 999px;
  background: var(--openui-highlight);
  color: var(--openui-text-neutral-primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.stepDetail {
  color: var(--openui-text-neutral-secondary);
}

.submitActions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sectionHeader {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.7fr);
    align-items: end;
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .submitSection {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}