import { css } from 'lit'; /** * Shared host styles every component pulls in. Sets default font, color, * container query support, and the entry fade-in. */ export const baseStyles = css` :host { display: block; container-type: inline-size; /* The one place the "label column never exceeds a quarter of the card" * rule is stated. A label beside a bar, a badge, or a value (a planet * name, a Bazi element, a compatibility category) reads this instead of * a bespoke rem width, so a long translation wraps inside its own * quarter rather than pushing the value column toward half the card. * utils/label-row.ts reuses it for the label-plus-prose row shape that * also stacks below 30rem; components with a shorter, non-prose second * column read it directly. */ --roxy-label-col: minmax(0, 25%); /* The one fallback per status ink, the light derivation of tokens.css resolved, for a page that loads no tokens. */ --_success-fg: var(--roxy-success-fg, #09632a); --_warning-fg: var(--roxy-warning-fg, #913304); --_danger-fg: var(--roxy-danger-fg, #881313); --_info-fg: var(--roxy-info-fg, #014f7a); font-family: var( --roxy-font-sans, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ); color: var(--roxy-fg, #0a0a0a); background: transparent; font-size: var(--roxy-text-base, 1rem); line-height: var(--roxy-leading-normal, 1.5); animation: roxy-fade-in var(--roxy-motion-duration, 200ms) var(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1)) both; } /* The host display above outranks the user agent hidden rule, so it is restated. */ :host([hidden]) { display: none; } /** * Opt out of the component's own card surface. When the embedder already * wraps the component in their own card, set the \`bare\` attribute to drop * the painted background + shadow so there is no nested card chrome. The * inner border stays a hairline; override --roxy-border to remove it too. */ :host([bare]) { --roxy-surface: transparent; --roxy-shadow-sm: none; --roxy-shadow-md: none; } *, *::before, *::after { box-sizing: border-box; } /* Every component result heading and the self-fetch form title read the * display-font token. It defaults to --roxy-font-sans, so this is a no-op for * existing consumers; a preset that sets --roxy-font-display (the practitioner * theme ships a serif) restyles every heading in one token with no per-component * markup change. */ h1, h2, h3, h4 { font-family: var( --roxy-font-display, var( --roxy-font-sans, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif ) ); } /* Motion only: text never passes through a partial opacity, so a scan mid-entry measures full contrast. */ @keyframes roxy-fade-in { from { transform: translateY(2px); } to { transform: translateY(0); } } @media (prefers-reduced-motion: reduce) { :host { animation: none; } } .roxy-skeleton { background: linear-gradient( 90deg, var(--roxy-border, #e4e4e7) 0%, color-mix(in srgb, var(--roxy-border, #e4e4e7) 60%, transparent) 50%, var(--roxy-border, #e4e4e7) 100% ); background-size: 200% 100%; animation: roxy-shimmer 1.4s ease-in-out infinite; border-radius: var(--roxy-radius-md, 8px); } @keyframes roxy-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } @media (prefers-reduced-motion: reduce) { .roxy-skeleton { animation: none; } } /* Removed from the visual layout but kept in the accessibility tree. The data * tables use it on their