The Open Standard for Generative UI
/* The OpenUI stack diagram: five layers grouped into an agentic frontend and an
agentic backend, bridged by OpenUI Lang. Hovering a layer swaps the
description panel on the right.
Note: `.homeTheme` pins BOTH --openui-foreground (near-white) and
--openui-text-neutral-primary (near-black) in either theme, so those tokens
cannot drive dark mode here. The section defines its own surface/text scale
below and re-points it once under [data-theme="dark"]. */
.section {
--sd-card: var(--openui-foreground);
--sd-sunken: rgba(10, 10, 10, 0.045);
--sd-text: var(--openui-text-neutral-primary);
--sd-muted: var(--openui-text-neutral-secondary);
--sd-border: var(--openui-border-default);
--sd-lift: 0 4px 10px -6px rgba(10, 10, 10, 0.14), 0 1px 3px -2px rgba(10, 10, 10, 0.07);
/* Spine chip column plus its gap; the connector shifts by this so the bridge
centres on the cards rather than on the whole diagram. */
--sd-spine: 2rem;
--sd-card-active: var(--sd-card);
--sd-contrast-bg: #17171b;
--sd-contrast-fg: #ffffff;
width: 100%;
padding-top: 1rem;
padding-bottom: 3.5rem;
padding-inline: 1.25rem;
}
[data-theme="dark"] .section {
--sd-card: var(--home-surface-ink);
--sd-sunken: rgba(255, 255, 255, 0.06);
--sd-text: rgba(255, 255, 255, 0.94);
--sd-muted: rgba(255, 255, 255, 0.55);
--sd-border: rgba(255, 255, 255, 0.12);
--sd-lift: 0 4px 10px -6px rgba(0, 0, 0, 0.7), 0 1px 3px -2px rgba(0, 0, 0, 0.45);
--sd-card-active: #1c1c1f;
--sd-contrast-bg: #f3f3f4;
--sd-contrast-fg: #0d0d0f;
}
.container {
max-width: 58rem;
margin-inline: auto;
display: grid;
grid-template-columns: minmax(0, 0.85fr) minmax(12rem, 1.05fr);
gap: clamp(3.5rem, 7vw, 6rem);
align-items: stretch;
}
.diagram {
display: flex;
flex-direction: column;
gap: 1rem;
min-width: 0;
}
/* ---- Group (chip + its layers) ----
A grid so the spine chip can span exactly the card rows. */
.group {
display: grid;
grid-template-columns: calc(var(--sd-spine) - 0.5rem) minmax(0, 1fr);
column-gap: 0.5rem;
row-gap: 0.5rem;
}
/* Cards share the content column; the chip owns the spine column. */
.group > * {
grid-column: 2;
min-width: 0;
}
/* Sleek vertical spine label; height follows its cards. */
.chip {
position: relative;
grid-column: 1;
grid-row: 1 / 3;
align-self: stretch;
color: var(--sd-muted);
opacity: 0.55;
overflow: hidden;
transition: opacity 0.15s ease;
}
.chip > span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(180deg);
writing-mode: vertical-rl;
white-space: nowrap;
font-family: var(--home-font-text);
font-size: var(--home-label-size);
font-weight: var(--home-body-weight);
letter-spacing: 0.02em;
}
.group:has(.layerSelected) .chip {
opacity: 0.85;
}
/* ---- Layer card ---- */
.layer {
min-width: 0;
cursor: pointer;
position: relative;
background: var(--sd-card);
border: 1px solid var(--sd-border);
border-radius: 0.875rem;
overflow: hidden;
transition:
background-color 0.2s ease,
box-shadow 0.2s ease,
transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Selection lifts the card off the page rather than darkening its stroke. On
dark it also brightens, where a shadow alone barely registers. Hover mirrors
it, but only where hover is real: on a phone the tap is the interaction. */
.layerSelected {
transform: translateY(-1px);
background: var(--sd-card-active);
box-shadow: var(--sd-lift);
z-index: 2;
}
@media (hover: hover) {
.layer:hover {
transform: translateY(-1px);
background: var(--sd-card-active);
box-shadow: var(--sd-lift);
z-index: 2;
}
.layer:hover .layerArrow {
opacity: 1;
transform: translateY(-50%) scale(1);
}
}
.layer:focus-visible {
outline: 2px solid var(--sd-text);
outline-offset: 2px;
}
/* ---- Connector row: rails behind the OpenUI Lang card ---- */
/* Extra breathing room around the bridge. --sd-bleed is that space plus the
diagram's own row gap, so the rails still reach both cards. */
.connector {
--sd-bleed: 1.75rem;
position: relative;
margin-block: 0.75rem;
margin-left: var(--sd-spine);
display: flex;
align-items: stretch;
justify-content: center;
}
/* The two lanes run vertically through the centre, behind the protocol card.
They bleed into the diagram gaps above and below so the chevrons stay visible
where the opaque card does not cover them. */
.rails {
position: absolute;
top: calc(-1 * var(--sd-bleed));
bottom: calc(-1 * var(--sd-bleed));
left: 50%;
transform: translateX(-50%);
z-index: 0;
display: flex;
align-items: stretch;
gap: 0.25rem;
pointer-events: none;
}
.langLayer {
position: relative;
z-index: 1;
flex: 0 1 auto;
min-width: 0;
}
/* The rail spans the full gap between the runtime and orchestration cards; the
track is twice its height and shifts by half, so the motion never seams. */
.rail {
position: relative;
flex: 0 0 auto;
width: 0.625rem;
align-self: stretch;
min-height: 4rem;
overflow: hidden;
color: var(--sd-muted);
/* Fade both ends so chevrons emerge from and vanish into the cards. */
-webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}
.railTrack {
position: absolute;
inset: 0;
height: 200%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
gap: 0.125rem;
}
.railUp .railTrack {
animation: railUp 3.2s linear infinite;
}
.railDown .railTrack {
animation: railDown 3.2s linear infinite;
}
@keyframes railUp {
from {
transform: translateY(0);
}
to {
transform: translateY(-50%);
}
}
@keyframes railDown {
from {
transform: translateY(-50%);
}
to {
transform: translateY(0);
}
}
.chevron {
flex: 0 0 auto;
width: 0.625rem;
height: 0.3125rem;
opacity: 0.5;
}
@media (prefers-reduced-motion: reduce) {
.railUp .railTrack,
.railDown .railTrack {
animation: none;
}
.layer:hover,
.layerSelected {
transform: none;
}
}
/* ---- Card content ---- */
.content {
display: flex;
align-items: stretch;
/* Taller cards; sides widen to match so the ratio stays balanced. */
padding: 1.125rem 1.25rem;
}
/* Single-item card (OpenUI Lang): hugs its label, with room kept on the right
for the arrow. */
.contentSingle {
justify-content: center;
padding-right: 3.25rem;
}
.contentSingle .item {
flex: 0 1 auto;
}
/* Title on the left; everything after it rides to the right edge. */
/* Title row: vertically centred, with the arrow pinned to the right edge. */
.contentSplit {
align-items: center;
}
.contentSplit .item {
flex: 0 1 auto;
}
.item {
flex: 1 1 0;
min-width: 0;
display: flex;
align-items: center;
gap: 0.625rem;
}
.itemIcon {
flex: 0 0 auto;
display: grid;
place-items: center;
color: var(--sd-muted);
}
/* Arrow affordance pinned to the card's right edge, out of flow so it never
shifts the card's contents. */
.layerArrow {
position: absolute;
top: 50%;
right: 1.25rem;
z-index: 1;
width: 1.375rem;
height: 1.375rem;
border-radius: 9999px;
display: grid;
place-items: center;
background: var(--sd-contrast-bg);
color: var(--sd-contrast-fg);
opacity: 0;
transform: translateY(-50%) scale(0.85);
transition:
opacity 0.15s ease,
transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.layerSelected .layerArrow {
opacity: 1;
transform: translateY(-50%) scale(1);
}
.itemTitle {
display: block;
font-family: var(--home-font-text);
font-size: var(--home-body-size);
font-weight: var(--home-heading-weight);
letter-spacing: var(--home-heading-tracking);
color: var(--sd-text);
}
/* The panel content is keyed on the selected layer, so swapping layers remounts
it and replays this fade. Opacity only, no movement: anything that shifts
position reads as the panel jumping. Sections stagger a touch so the swap
feels sequential rather than a single flash. Desktop only; the mobile tray
has its own motion. */
.panelInner {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
@media (min-width: 768px) {
.panelInner > * {
animation: panelFade 220ms ease-out both;
}
.panelInner > :nth-child(2) {
animation-delay: 55ms;
}
.panelInner > :nth-child(3) {
animation-delay: 110ms;
}
.panelInner > :nth-child(4) {
animation-delay: 165ms;
}
.panelInner > :nth-child(5) {
animation-delay: 220ms;
}
}
@keyframes panelFade {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.panelInner > * {
animation: none;
}
}
/* ---- Mobile tray ----
Both are phone-only. Without this the backdrop counts as a grid item and
pushes the panel onto its own row on desktop. The media query at the foot
turns them on. */
.trayBackdrop,
.trayClose {
display: none;
}
/* ---- Description panel ---- */
.panel {
display: flex;
flex-direction: column;
padding: 0.375rem 0.25rem;
}
.panelTitle {
margin: 0.5625rem 0 0;
font-family: var(--home-font-display);
font-size: var(--home-heading-size);
font-weight: var(--home-heading-weight);
letter-spacing: var(--home-heading-tracking);
line-height: var(--home-heading-leading);
text-wrap: balance;
color: var(--sd-text);
}
/* ---- Works with ----
Takes the free space so it settles at the foot of the panel, directly above
the Cloud block. When a layer has no logos, the Cloud block takes it instead. */
.panelWorks {
margin-top: auto;
}
.panelWorksLabel {
margin: 0 0 0.5rem;
font-family: var(--home-font-text);
font-size: var(--home-label-size);
font-weight: var(--home-label-weight);
color: var(--sd-text);
}
.panelWorksLogos {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.875rem;
}
.wordmarkText {
font-family: var(--home-font-text);
font-size: 0.9375rem;
font-weight: var(--home-heading-weight);
letter-spacing: var(--home-heading-tracking);
color: var(--sd-text);
white-space: nowrap;
}
/* Wordmarks render whole; only the cut matching the theme is shown. */
.wordmark {
display: inline-flex;
align-items: center;
}
.wordmark img {
width: auto;
display: block;
}
/* Scoped to .wordmark so these outrank `.wordmark img` above; as bare class
selectors they lost to it and both cuts rendered at once. */
.wordmark .wordmarkWhite {
display: none;
}
[data-theme="dark"] .wordmark .wordmarkDark {
display: none;
}
[data-theme="dark"] .wordmark .wordmarkWhite {
display: block;
}
/* A hairline ring around each badge so dark marks stay defined on either theme.
box-shadow rather than border, to avoid resizing the shared badge box. */
.panelWorksLogos > span:not(.wordmark):not(.wordmarkText) {
box-shadow: 0 0 0 1px var(--sd-border);
}
/* Pinned to the foot of the panel: margin-top auto holds the same line however
tall a layer's copy runs. */
.panelCloud {
margin-top: auto;
padding-top: 1rem;
/* Rule drawn as a gradient so it dissolves towards the right edge. */
border-top: 0;
background-image: linear-gradient(to right, var(--sd-border), transparent);
background-repeat: no-repeat;
background-size: 100% 1px;
background-position: top left;
}
.panel:has(.panelWorks) .panelCloud {
margin-top: 1.25rem;
}
.panelCloudLabel {
margin: 0 0 0.5rem;
font-family: var(--home-font-text);
font-size: var(--home-label-size);
font-weight: var(--home-label-weight);
color: var(--sd-text);
}
.panelCloudChips {
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-wrap: wrap;
gap: 0.375rem;
}
.panelCloudChip {
padding: 0.25rem 0.5625rem;
border-radius: 9999px;
background: var(--sd-sunken);
font-family: var(--home-font-text);
font-size: var(--home-label-size);
font-weight: var(--home-body-weight);
line-height: 1.35;
color: var(--sd-muted);
}
.panelCta {
margin-top: 1rem;
align-self: flex-start;
}
.ctaBlock {
display: none;
}
.panelBody {
margin: 0.75rem 0 0;
font-family: var(--home-font-text);
font-size: var(--home-body-size);
font-weight: var(--home-body-weight);
line-height: var(--home-body-leading);
color: var(--sd-muted);
}
/* ---- Mobile ---- */
@media (max-width: 767px) {
.container {
grid-template-columns: 1fr;
gap: 1.5rem;
}
/* Group labels sit above their cards instead of running down the spine. */
.group {
grid-template-columns: minmax(0, 1fr);
row-gap: 0.5rem;
}
.group > * {
grid-column: 1;
}
.chip {
grid-row: auto;
grid-column: 1;
align-self: start;
}
.chip > span {
position: static;
transform: none;
writing-mode: horizontal-tb;
white-space: normal;
}
/* The rails stay: the flow still reads top to bottom on a phone. */
.connector {
margin-left: 0;
}
.contentSplit {
align-items: center;
}
/* Compact cards, with a taller rail between the halves. */
.content {
padding: 0.875rem 1rem;
}
.layerArrow {
right: 1rem;
}
.contentSingle {
padding-right: 2.75rem;
}
.connector {
--sd-bleed: 2.5rem;
margin-block: 1.25rem;
}
.rail {
width: 0.75rem;
min-height: 5.5rem;
}
.chevron {
width: 0.75rem;
height: 0.375rem;
}
/* The description becomes a sheet that rises from the bottom on tap. */
.trayBackdrop {
display: block;
position: fixed;
inset: 0;
z-index: 55;
background: rgba(0, 0, 0, 0.45);
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease;
}
.trayBackdropOpen {
opacity: 1;
pointer-events: auto;
}
.panel {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 60;
max-height: 80vh;
overflow-y: auto;
padding: 1.75rem 1.5rem 2.5rem;
background: var(--sd-card);
border-top: 1px solid var(--sd-border);
border-radius: 1rem 1rem 0 0;
box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.28);
transform: translateY(101%);
transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.panelOpen {
transform: translateY(0);
}
.trayClose {
display: grid;
place-items: center;
position: absolute;
top: 0.875rem;
right: 1rem;
width: 1.75rem;
height: 1.75rem;
padding: 0;
border: 0;
border-radius: 9999px;
background: var(--sd-sunken);
color: var(--sd-muted);
cursor: pointer;
}
/* Nothing to push against inside a sheet, so these sit inline. Each block is
ruled off so the sheet reads as distinct sections rather than one column. */
.panelWorks,
.panelCloud {
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--sd-border);
background-image: none;
}
/* One scale for the sheet: 1.125rem title, 0.9375rem content, 0.8125rem
labels and chips. The shared tokens collapse title and body to the same
size on phones, which leaves the sheet with no hierarchy. */
.panelTitle {
padding-right: 2.5rem;
font-size: 1.125rem;
font-weight: 500;
}
.panelBody {
margin-top: 0.75rem;
font-size: 0.9375rem;
}
.wordmarkText {
font-size: 0.9375rem;
}
.panelWorksLabel,
.panelCloudLabel {
font-size: 0.8125rem;
}
.panelCloudChip {
font-size: 0.8125rem;
}
/* The CTA drops to the foot of the sheet as a full-width primary button. */
.panelCta {
order: 9;
align-self: stretch;
width: 100%;
margin-top: 1.5rem;
padding-top: 1.5rem;
border-top: 1px solid var(--sd-border);
}
.ctaInline {
display: none;
}
.ctaBlock {
display: block;
}
.ctaBlock > a {
width: 100%;
max-width: none;
}
.panelWorksLogos {
gap: 1rem;
}
.panelCloudChips {
gap: 0.5rem;
}
.trayClose {
top: 1.25rem;
right: 1.25rem;
width: 2rem;
height: 2rem;
}
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
.panel {
transition: none;
}
}