/* The look, in the tokens' words. Every value that is a choice — a colour, a space, a radius, a size — is a var(--…) from /tokens.css, which design/tokens.json compiles to at boot; `bun run lint:design` refuses a raw colour here. Light and dark are the tokens' business, not this file's. */ /* The page. */ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } body { margin: 0; background: var(--color-bg); color: var(--color-fg); font: var(--text-base) / var(--leading-body) var(--font-sans); } .page { max-width: 60rem; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6); } .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-3) var(--space-4); margin-bottom: var(--space-5); } h1 { margin: 0; font-size: var(--text-xl); font-weight: 650; letter-spacing: -0.01em; line-height: var(--leading-tight); } p { margin: 0; } a { color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; } code, .mono { font-family: var(--font-mono); font-size: var(--text-sm); } :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; } .muted { color: var(--color-muted); } .you { color: var(--color-muted); white-space: nowrap; } /* Blocks. */ .card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-5); } .row { display: flex; align-items: center; gap: var(--space-2); } .list { list-style: none; margin: 0; padding: 0; } .note { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--color-line); } .note:first-child { border-top: 0; } .note p { overflow-wrap: anywhere; } .note small { font-size: var(--text-sm); } .empty { padding: var(--space-6) var(--space-4); text-align: center; color: var(--color-muted); border: 1px dashed var(--color-line); border-radius: var(--radius-md); } footer { margin-top: var(--space-6); font-size: var(--text-sm); display: grid; gap: var(--space-1); } footer code { overflow-wrap: anywhere; } /* Drawing. */ .compose { display: grid; gap: var(--space-3); } .label { font-weight: 600; } .prompt { padding: var(--space-3); resize: vertical; line-height: var(--leading-body); } .wrap { flex-wrap: wrap; } .tight { gap: var(--space-1); } .spacer { flex: 1; } .kinds { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; border: 0; } .examples { display: flex; flex-wrap: wrap; gap: var(--space-2); } .examples[hidden] { display: none; } .chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--size-tap); padding: 0 var(--space-3); font: inherit; font-size: var(--text-sm); color: var(--color-fg); background: var(--color-bg); border: 1px solid var(--color-line); border-radius: var(--radius-pill); cursor: pointer; text-decoration: none; } .chip:hover { border-color: var(--color-muted); } .chip:has(input:checked), .chip[aria-current] { border-color: var(--color-accent); color: var(--color-accent); font-weight: 600; } .chip input { accent-color: var(--color-accent); margin: 0; } .palettes { margin-bottom: var(--space-4); } .dots { display: inline-flex; gap: 3px; padding: 4px; border-radius: var(--radius-pill); border: 1px solid var(--color-line); } .dots i { width: 10px; height: 10px; border-radius: 50%; } .drawing { padding: var(--space-4) 0; border-top: 1px solid var(--color-line); } .drawing:first-child { border-top: 0; } .drawing-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); } .prompt-text { font-weight: 600; overflow-wrap: anywhere; } .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); } @media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } } .tile-wrap { margin: 0; display: grid; gap: var(--space-1); } .tile { aspect-ratio: 1; border-radius: var(--radius-md); border: 1px solid var(--color-line); display: grid; place-items: center; overflow: hidden; } .tile img { width: 72%; height: 72%; transition: transform 160ms ease; } .tile:hover img { transform: scale(1.06); } .tile.pending { animation: pulse 1.4s ease-in-out infinite; } @keyframes pulse { 50% { opacity: 0.45; } } figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-1); min-width: 0; } /* The name has its own line on a narrow tile; the buttons follow. */ figcaption .name { flex: 1 0 100%; padding-top: var(--space-1); } .name { font-size: var(--text-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .small { font-size: var(--text-sm); } .button.small { padding: 0 var(--space-2); } .error { color: var(--color-danger); overflow-wrap: anywhere; } [hidden] { display: none !important; } /* Controls: at least 44px on a side, keyboard and mouse alike. */ .input { flex: 1; min-width: 0; min-height: var(--size-tap); padding: 0 var(--space-3); font: inherit; font-size: max(16px, var(--text-base)); color: inherit; background: var(--color-bg); border: 1px solid var(--color-line); border-radius: var(--radius-md); } .input::placeholder { color: var(--color-muted); } .button { min-height: var(--size-tap); padding: 0 var(--space-4); font: inherit; font-weight: 600; color: var(--color-accent-fg); background: var(--color-accent); border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; } .button:hover { filter: brightness(1.08); } .button-quiet { color: var(--color-muted); background: transparent; padding: 0 var(--space-3); } .button-quiet:hover { color: var(--color-fg); border-color: var(--color-line); filter: none; } .pill { display: inline-block; padding: 0.1rem 0.6rem; font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); border: 1px solid var(--color-line); border-radius: var(--radius-pill); } .pill[data-env="production"] { color: var(--color-accent); border-color: currentColor; } /* A word from the last request, shown once, gone in a moment. */ .toast { position: fixed; left: 50%; bottom: var(--space-5); transform: translateX(-50%); max-width: calc(100% - 2 * var(--space-4)); padding: var(--space-3) var(--space-4); color: var(--color-toast-fg); background: var(--color-toast-bg); border-radius: var(--radius-pill); box-shadow: 0 8px 24px var(--color-shadow); animation: toast 6s forwards; } @keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } } /* Motion is a courtesy: whoever asked for less gets none. */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } .toast { animation: none; } }